@charisol/plexo-sdk 2.0.25 → 2.0.26
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/dist/index.js +4 -0
- package/dist/plexo-sdk.css +1 -1
- package/dist/{v1-DzPIZH4r.js → v1-CvbzlaB_.js} +882 -780
- package/dist/v2/components/properties/ProductPicker.d.ts +9 -0
- package/dist/v2/host/HostContext.d.ts +22 -0
- package/dist/v2/index.d.ts +1 -1
- package/dist/v2/render/dynamicBlocks.d.ts +1 -1
- package/dist/v2/sections/catalog/productOffer.d.ts +2 -0
- package/dist/v2/sections/types.d.ts +2 -2
- package/dist/v2-compile.js +1 -1
- package/dist/v2.js +372 -246
- package/package.json +1 -1
|
@@ -6462,7 +6462,7 @@ var Dt = (e, t = "x") => (typeof e == "string" ? e.replace(/[^A-Za-z0-9_-]/g, "-
|
|
|
6462
6462
|
label: "Product",
|
|
6463
6463
|
note: "The product’s pictures, price and buy button appear here.",
|
|
6464
6464
|
uses: ["productId", "mode"],
|
|
6465
|
-
sample: () => [A("div", { class: "plx-dyn-row" }, Nt("1 / 1"), A("div", { class: "plx-dyn-stack" }, P("65%", !0), P("25%"), P("100%"), P("80%"), Pt("Add to cart")))]
|
|
6465
|
+
sample: (e) => e.mode === "buy" ? [A("div", { class: "plx-dyn-row" }, Nt("1 / 1"), A("div", { class: "plx-dyn-stack" }, A("strong", null, "Your product"), A("span", { class: "plx-dyn-text" }, "$49.00"), P("100%"), P("80%"), Pt("Buy now")))] : [A("div", { class: "plx-dyn-row" }, Nt("1 / 1"), A("div", { class: "plx-dyn-stack" }, P("65%", !0), P("25%"), P("100%"), P("80%"), Pt("Add to cart")))]
|
|
6466
6466
|
},
|
|
6467
6467
|
booking: {
|
|
6468
6468
|
group: "Store",
|
|
@@ -6587,7 +6587,12 @@ function qt(e, t, n) {
|
|
|
6587
6587
|
}
|
|
6588
6588
|
function Jt(e, t) {
|
|
6589
6589
|
if (!jt(e.type)) return null;
|
|
6590
|
-
let n = zt[e.type], r = e.props ?? {}
|
|
6590
|
+
let n = zt[e.type], r = e.props ?? {};
|
|
6591
|
+
if (e.type === "product" && r.mode === "buy" && !Gt(r.productId)) return t.placeholders ? A("div", {
|
|
6592
|
+
class: "plx-el plx-dyn",
|
|
6593
|
+
"data-plx-dynamic": e.type
|
|
6594
|
+
}, A("div", { class: "plx-dyn-head" }, A("span", { class: "plx-dyn-tag" }, n.group), A("strong", null, "Pick a product to sell")), A("div", { class: "plx-dyn-note" }, "Choose which product this section sells, and a buy-now card appears here.")) : A("div", { "aria-hidden": "true" });
|
|
6595
|
+
let i = qt(e.type, r, t);
|
|
6591
6596
|
return t.placeholders ? A("div", {
|
|
6592
6597
|
...i,
|
|
6593
6598
|
class: "plx-el plx-dyn",
|
|
@@ -6764,7 +6769,7 @@ function Qt(e) {
|
|
|
6764
6769
|
}
|
|
6765
6770
|
//#endregion
|
|
6766
6771
|
//#region src/v2/render/socialIcons.ts
|
|
6767
|
-
var
|
|
6772
|
+
var F = {
|
|
6768
6773
|
facebook: {
|
|
6769
6774
|
label: "Facebook",
|
|
6770
6775
|
path: "M9.101 23.691v-7.98H6.627v-3.667h2.474v-1.58c0-4.085 1.848-5.978 5.858-5.978.401 0 .955.042 1.468.103a8.68 8.68 0 0 1 1.141.195v3.325a8.623 8.623 0 0 0-.653-.036 26.805 26.805 0 0 0-.733-.009c-.707 0-1.259.096-1.675.309a1.686 1.686 0 0 0-.679.622c-.258.42-.374.995-.374 1.752v1.297h3.919l-.386 2.103-.287 1.564h-3.246v8.245C19.396 23.238 24 18.179 24 12.044c0-6.627-5.373-12-12-12s-12 5.373-12 12c0 5.628 3.874 10.35 9.101 11.647Z",
|
|
@@ -6837,7 +6842,7 @@ var $t = {
|
|
|
6837
6842
|
outline: !0,
|
|
6838
6843
|
brand: "#6B7280"
|
|
6839
6844
|
}
|
|
6840
|
-
},
|
|
6845
|
+
}, $t = [
|
|
6841
6846
|
{
|
|
6842
6847
|
key: "eyebrow",
|
|
6843
6848
|
label: "Small label above",
|
|
@@ -6894,7 +6899,7 @@ var $t = {
|
|
|
6894
6899
|
key: "network",
|
|
6895
6900
|
label: "Network",
|
|
6896
6901
|
type: "select",
|
|
6897
|
-
options: Object.keys(
|
|
6902
|
+
options: Object.keys(F).map((e) => [e, F[e].label])
|
|
6898
6903
|
}, {
|
|
6899
6904
|
key: "url",
|
|
6900
6905
|
label: "Link",
|
|
@@ -6933,8 +6938,8 @@ var $t = {
|
|
|
6933
6938
|
max: 120,
|
|
6934
6939
|
hint: "What people read once their message is sent."
|
|
6935
6940
|
}
|
|
6936
|
-
],
|
|
6937
|
-
function
|
|
6941
|
+
], en = (e) => typeof e == "string" && e.trim().length > 0;
|
|
6942
|
+
function tn(e, t, n = !1) {
|
|
6938
6943
|
let r = n || e.align === "center" ? { align: "center" } : {};
|
|
6939
6944
|
return [
|
|
6940
6945
|
e.text("eyebrow", t.eyebrow, "eyebrow", r),
|
|
@@ -6945,14 +6950,14 @@ function nn(e, t, n = !1) {
|
|
|
6945
6950
|
})
|
|
6946
6951
|
];
|
|
6947
6952
|
}
|
|
6948
|
-
var
|
|
6953
|
+
var nn = {
|
|
6949
6954
|
name: "Your full name",
|
|
6950
6955
|
email: "name@email.com",
|
|
6951
6956
|
message: "Tell us a little about what you need"
|
|
6952
|
-
},
|
|
6957
|
+
}, rn = (e, t) => {
|
|
6953
6958
|
let n = typeof e == "string" ? e : t;
|
|
6954
6959
|
return n.trim() ? { placeholder: n.trim() } : {};
|
|
6955
|
-
},
|
|
6960
|
+
}, an = (e, t) => ({
|
|
6956
6961
|
id: e.id("form"),
|
|
6957
6962
|
type: "form",
|
|
6958
6963
|
name: "Contact form",
|
|
@@ -6964,33 +6969,33 @@ var rn = {
|
|
|
6964
6969
|
label: "Your name",
|
|
6965
6970
|
type: "text",
|
|
6966
6971
|
required: !0,
|
|
6967
|
-
...
|
|
6972
|
+
...rn(t.namePlaceholder, nn.name)
|
|
6968
6973
|
},
|
|
6969
6974
|
{
|
|
6970
6975
|
id: "email",
|
|
6971
6976
|
label: "Email",
|
|
6972
6977
|
type: "email",
|
|
6973
6978
|
required: !0,
|
|
6974
|
-
...
|
|
6979
|
+
...rn(t.emailPlaceholder, nn.email)
|
|
6975
6980
|
},
|
|
6976
6981
|
{
|
|
6977
6982
|
id: "message",
|
|
6978
6983
|
label: "How can we help?",
|
|
6979
6984
|
type: "textarea",
|
|
6980
6985
|
required: !0,
|
|
6981
|
-
...
|
|
6986
|
+
...rn(t.messagePlaceholder, nn.message)
|
|
6982
6987
|
}
|
|
6983
6988
|
],
|
|
6984
|
-
submitLabel:
|
|
6985
|
-
successMessage:
|
|
6989
|
+
submitLabel: en(t.submitLabel) ? t.submitLabel : "Send message",
|
|
6990
|
+
successMessage: en(t.successMessage) ? t.successMessage : "Thanks! We got your message and will reply soon."
|
|
6986
6991
|
},
|
|
6987
6992
|
styles: {
|
|
6988
6993
|
width: "100%",
|
|
6989
6994
|
textColor: e.tone.heading
|
|
6990
6995
|
}
|
|
6991
|
-
}),
|
|
6996
|
+
}), on = (e, t, n) => {
|
|
6992
6997
|
let r = "clamp(1.25rem, 4vw, 2.25rem)";
|
|
6993
|
-
return e.card("form-card", [
|
|
6998
|
+
return e.card("form-card", [an(e, t)], {
|
|
6994
6999
|
paddingTop: r,
|
|
6995
7000
|
paddingBottom: r,
|
|
6996
7001
|
paddingLeft: r,
|
|
@@ -7002,7 +7007,7 @@ var rn = {
|
|
|
7002
7007
|
margin: "0 auto"
|
|
7003
7008
|
} : {}
|
|
7004
7009
|
});
|
|
7005
|
-
},
|
|
7010
|
+
}, sn = (e, t, n, r, i = !1) => ({
|
|
7006
7011
|
id: e.id(t),
|
|
7007
7012
|
type: "button",
|
|
7008
7013
|
name: We(t),
|
|
@@ -7016,20 +7021,20 @@ var rn = {
|
|
|
7016
7021
|
textAlign: i ? "center" : "left",
|
|
7017
7022
|
display: "inline-block"
|
|
7018
7023
|
}
|
|
7019
|
-
}),
|
|
7020
|
-
function
|
|
7024
|
+
}), cn = (e) => `tel:${e.replace(/[^\d+]/g, "")}`;
|
|
7025
|
+
function ln(e, t, n = !1) {
|
|
7021
7026
|
return [
|
|
7022
7027
|
{
|
|
7023
7028
|
slot: "email",
|
|
7024
7029
|
icon: "mail",
|
|
7025
7030
|
title: "Email",
|
|
7026
|
-
node:
|
|
7031
|
+
node: en(t.email) ? sn(e, "email-link", t.email.trim(), `mailto:${t.email.trim()}`, n) : null
|
|
7027
7032
|
},
|
|
7028
7033
|
{
|
|
7029
7034
|
slot: "phone",
|
|
7030
7035
|
icon: "phone",
|
|
7031
7036
|
title: "Phone",
|
|
7032
|
-
node:
|
|
7037
|
+
node: en(t.phone) ? sn(e, "phone-link", t.phone.trim(), cn(t.phone), n) : null
|
|
7033
7038
|
},
|
|
7034
7039
|
{
|
|
7035
7040
|
slot: "address",
|
|
@@ -7043,10 +7048,10 @@ function un(e, t, n = !1) {
|
|
|
7043
7048
|
}
|
|
7044
7049
|
].filter((e) => e.node);
|
|
7045
7050
|
}
|
|
7046
|
-
var
|
|
7051
|
+
var un = (e, t, n = !1) => e.text("hours", t.hours, "small", {
|
|
7047
7052
|
color: e.tone.muted,
|
|
7048
7053
|
align: n ? "center" : "left"
|
|
7049
|
-
}),
|
|
7054
|
+
}), dn = (e, t) => e.row(`row-${t.slot}`, [e.icon(`${t.slot}-icon`, t.icon, {
|
|
7050
7055
|
circle: !0,
|
|
7051
7056
|
size: "22px"
|
|
7052
7057
|
}), e.stack(`row-${t.slot}-text`, [{
|
|
@@ -7066,8 +7071,8 @@ var dn = (e, t, n = !1) => e.text("hours", t.hours, "small", {
|
|
|
7066
7071
|
})], {
|
|
7067
7072
|
gap: "var(--semantic-space-md)",
|
|
7068
7073
|
align: "center"
|
|
7069
|
-
}),
|
|
7070
|
-
let n = (Array.isArray(t.socials) ? t.socials : []).filter((e) => e && e.network && e.network in
|
|
7074
|
+
}), fn = (e, t) => {
|
|
7075
|
+
let n = (Array.isArray(t.socials) ? t.socials : []).filter((e) => e && e.network && e.network in F && en(e.url));
|
|
7071
7076
|
return n.length ? {
|
|
7072
7077
|
id: e.id("socials"),
|
|
7073
7078
|
type: "social",
|
|
@@ -7084,12 +7089,12 @@ var dn = (e, t, n = !1) => e.text("hours", t.hours, "small", {
|
|
|
7084
7089
|
width: "fit-content"
|
|
7085
7090
|
}
|
|
7086
7091
|
} : null;
|
|
7087
|
-
},
|
|
7092
|
+
}, pn = {
|
|
7088
7093
|
kind: "contact",
|
|
7089
7094
|
label: "Contact",
|
|
7090
7095
|
description: "Help people reach you: a message form, your details, or both.",
|
|
7091
7096
|
group: "Convert",
|
|
7092
|
-
fields:
|
|
7097
|
+
fields: $t,
|
|
7093
7098
|
defaults: {
|
|
7094
7099
|
eyebrow: "Contact",
|
|
7095
7100
|
heading: "Let’s talk",
|
|
@@ -7112,9 +7117,9 @@ var dn = (e, t, n = !1) => e.text("hours", t.hours, "small", {
|
|
|
7112
7117
|
url: "https://linkedin.com/"
|
|
7113
7118
|
}
|
|
7114
7119
|
],
|
|
7115
|
-
namePlaceholder:
|
|
7116
|
-
emailPlaceholder:
|
|
7117
|
-
messagePlaceholder:
|
|
7120
|
+
namePlaceholder: nn.name,
|
|
7121
|
+
emailPlaceholder: nn.email,
|
|
7122
|
+
messagePlaceholder: nn.message,
|
|
7118
7123
|
submitLabel: "Send message",
|
|
7119
7124
|
successMessage: "Thanks! We got your message and will reply soon."
|
|
7120
7125
|
},
|
|
@@ -7135,19 +7140,19 @@ var dn = (e, t, n = !1) => e.text("hours", t.hours, "small", {
|
|
|
7135
7140
|
...e.style,
|
|
7136
7141
|
align: "left"
|
|
7137
7142
|
}
|
|
7138
|
-
}), n = e.content, r =
|
|
7139
|
-
...
|
|
7140
|
-
t.stack("details", [...r,
|
|
7143
|
+
}), n = e.content, r = ln(t, n).map((e) => dn(t, e)), i = t.stack("info", [
|
|
7144
|
+
...tn(t, n),
|
|
7145
|
+
t.stack("details", [...r, un(t, n)], {
|
|
7141
7146
|
gap: "var(--semantic-space-lg)",
|
|
7142
7147
|
align: "flex-start",
|
|
7143
7148
|
styles: { marginTop: "var(--semantic-space-md)" }
|
|
7144
7149
|
}),
|
|
7145
|
-
|
|
7150
|
+
fn(t, n)
|
|
7146
7151
|
], {
|
|
7147
7152
|
gap: "var(--semantic-space-md)",
|
|
7148
7153
|
align: "flex-start"
|
|
7149
7154
|
});
|
|
7150
|
-
return [t.container([t.split("split", i,
|
|
7155
|
+
return [t.container([t.split("split", i, on(t, n), {
|
|
7151
7156
|
ratio: [1, 1.1],
|
|
7152
7157
|
align: "flex-start"
|
|
7153
7158
|
})])];
|
|
@@ -7180,10 +7185,10 @@ var dn = (e, t, n = !1) => e.text("hours", t.hours, "small", {
|
|
|
7180
7185
|
align: "center"
|
|
7181
7186
|
}
|
|
7182
7187
|
}), n = e.content;
|
|
7183
|
-
return [t.container([t.stack("head",
|
|
7188
|
+
return [t.container([t.stack("head", tn(t, n, !0), {
|
|
7184
7189
|
align: "center",
|
|
7185
7190
|
gap: "var(--semantic-space-sm)"
|
|
7186
|
-
}),
|
|
7191
|
+
}), on(t, n, "38rem")], {
|
|
7187
7192
|
gap: "calc(var(--semantic-space-xl) * 1.5)",
|
|
7188
7193
|
alignItems: "center"
|
|
7189
7194
|
})];
|
|
@@ -7205,7 +7210,7 @@ var dn = (e, t, n = !1) => e.text("hours", t.hours, "small", {
|
|
|
7205
7210
|
...e.style,
|
|
7206
7211
|
align: "center"
|
|
7207
7212
|
}
|
|
7208
|
-
}), n = e.content, r =
|
|
7213
|
+
}), n = e.content, r = ln(t, n, !0).map((e) => t.card(`card-${e.slot}`, [
|
|
7209
7214
|
t.icon(`${e.slot}-icon`, e.icon, {
|
|
7210
7215
|
circle: !0,
|
|
7211
7216
|
size: "22px"
|
|
@@ -7231,14 +7236,14 @@ var dn = (e, t, n = !1) => e.text("hours", t.hours, "small", {
|
|
|
7231
7236
|
i,
|
|
7232
7237
|
Math.min(i, 2),
|
|
7233
7238
|
1
|
|
7234
|
-
], { gap: "var(--semantic-space-lg)" }) : null, o = t.stack("head", [...
|
|
7239
|
+
], { gap: "var(--semantic-space-lg)" }) : null, o = t.stack("head", [...tn(t, n, !0), un(t, n, !0)], {
|
|
7235
7240
|
align: "center",
|
|
7236
7241
|
gap: "var(--semantic-space-sm)"
|
|
7237
7242
|
});
|
|
7238
7243
|
return [t.container([
|
|
7239
7244
|
o,
|
|
7240
7245
|
a,
|
|
7241
|
-
|
|
7246
|
+
on(t, n, "40rem")
|
|
7242
7247
|
], {
|
|
7243
7248
|
gap: "var(--semantic-space-xl)",
|
|
7244
7249
|
alignItems: "stretch"
|
|
@@ -7271,17 +7276,17 @@ var dn = (e, t, n = !1) => e.text("hours", t.hours, "small", {
|
|
|
7271
7276
|
...e.style,
|
|
7272
7277
|
align: "left"
|
|
7273
7278
|
}
|
|
7274
|
-
}), n = e.content, r =
|
|
7279
|
+
}), n = e.content, r = ln(t, n), i = [];
|
|
7275
7280
|
r.forEach((e, n) => {
|
|
7276
|
-
n && i.push(t.divider(`rule-${e.slot}`)), i.push(
|
|
7281
|
+
n && i.push(t.divider(`rule-${e.slot}`)), i.push(dn(t, e));
|
|
7277
7282
|
});
|
|
7278
|
-
let a = t.stack("head", [...
|
|
7283
|
+
let a = t.stack("head", [...tn(t, n), fn(t, n)], {
|
|
7279
7284
|
gap: "var(--semantic-space-md)",
|
|
7280
7285
|
align: "flex-start"
|
|
7281
7286
|
}), o = t.stack("details", [
|
|
7282
7287
|
...i,
|
|
7283
|
-
r.length &&
|
|
7284
|
-
|
|
7288
|
+
r.length && en(n.hours) ? t.divider("rule-hours") : null,
|
|
7289
|
+
un(t, n)
|
|
7285
7290
|
], {
|
|
7286
7291
|
gap: "var(--semantic-space-lg)",
|
|
7287
7292
|
align: "stretch"
|
|
@@ -7293,7 +7298,7 @@ var dn = (e, t, n = !1) => e.text("hours", t.hours, "small", {
|
|
|
7293
7298
|
}
|
|
7294
7299
|
}
|
|
7295
7300
|
]
|
|
7296
|
-
},
|
|
7301
|
+
}, mn = [
|
|
7297
7302
|
{
|
|
7298
7303
|
key: "eyebrow",
|
|
7299
7304
|
label: "Small label above",
|
|
@@ -7330,7 +7335,7 @@ var dn = (e, t, n = !1) => e.text("hours", t.hours, "small", {
|
|
|
7330
7335
|
type: "image"
|
|
7331
7336
|
}
|
|
7332
7337
|
];
|
|
7333
|
-
function
|
|
7338
|
+
function hn(e, t, n = {}) {
|
|
7334
7339
|
let r = n.centered || e.align === "center" ? { align: "center" } : {};
|
|
7335
7340
|
return [
|
|
7336
7341
|
e.text("eyebrow", t.eyebrow, "eyebrow", r),
|
|
@@ -7344,13 +7349,13 @@ function gn(e, t, n = {}) {
|
|
|
7344
7349
|
})
|
|
7345
7350
|
];
|
|
7346
7351
|
}
|
|
7347
|
-
function
|
|
7352
|
+
function gn(e, t, n) {
|
|
7348
7353
|
return !t.cta?.label?.trim() && !t.cta2?.label?.trim() ? null : e.row("buttons", [e.button("cta", t.cta, "primary"), e.button("cta2", t.cta2, "secondary")], {
|
|
7349
7354
|
wrap: !0,
|
|
7350
7355
|
justify: n ? "center" : "flex-start"
|
|
7351
7356
|
});
|
|
7352
7357
|
}
|
|
7353
|
-
var
|
|
7358
|
+
var _n = (e, t) => ({
|
|
7354
7359
|
id: e.id("signup"),
|
|
7355
7360
|
type: "form",
|
|
7356
7361
|
name: "Sign-up form",
|
|
@@ -7372,12 +7377,12 @@ var vn = (e, t) => ({
|
|
|
7372
7377
|
margin: "0 auto",
|
|
7373
7378
|
textColor: e.tone.heading
|
|
7374
7379
|
}
|
|
7375
|
-
}),
|
|
7380
|
+
}), vn = {
|
|
7376
7381
|
kind: "cta",
|
|
7377
7382
|
label: "Call to action",
|
|
7378
7383
|
description: "A bold prompt that nudges visitors to take the next step.",
|
|
7379
7384
|
group: "Convert",
|
|
7380
|
-
fields:
|
|
7385
|
+
fields: mn,
|
|
7381
7386
|
defaults: {
|
|
7382
7387
|
eyebrow: "Ready when you are",
|
|
7383
7388
|
heading: "Let’s get started today",
|
|
@@ -7419,7 +7424,7 @@ var vn = (e, t) => ({
|
|
|
7419
7424
|
align: "center"
|
|
7420
7425
|
}
|
|
7421
7426
|
}), n = e.content;
|
|
7422
|
-
return [t.container([t.stack("copy", [...
|
|
7427
|
+
return [t.container([t.stack("copy", [...hn(t, n, { centered: !0 }), gn(t, n, !0)], {
|
|
7423
7428
|
gap: "var(--semantic-space-lg)",
|
|
7424
7429
|
align: "center"
|
|
7425
7430
|
})], { alignItems: "center" })];
|
|
@@ -7435,7 +7440,7 @@ var vn = (e, t) => ({
|
|
|
7435
7440
|
"primary"
|
|
7436
7441
|
],
|
|
7437
7442
|
build(e) {
|
|
7438
|
-
let t = k(e), n = e.content, r = t.stack("copy", [...
|
|
7443
|
+
let t = k(e), n = e.content, r = t.stack("copy", [...hn(t, n), gn(t, n, t.align === "center")], { gap: "var(--semantic-space-lg)" }), i = t.image("image", n.image, n.imageAlt, {
|
|
7439
7444
|
ratio: "5 / 4",
|
|
7440
7445
|
radius: "var(--radius-2xl)"
|
|
7441
7446
|
});
|
|
@@ -7466,7 +7471,7 @@ var vn = (e, t) => ({
|
|
|
7466
7471
|
...e.style,
|
|
7467
7472
|
align: "center"
|
|
7468
7473
|
}
|
|
7469
|
-
}), r = e.content, i = "clamp(2rem, 6vw, 4.5rem)", a = n.box("panel", [n.stack("copy", [...
|
|
7474
|
+
}), r = e.content, i = "clamp(2rem, 6vw, 4.5rem)", a = n.box("panel", [n.stack("copy", [...hn(n, r, { centered: !0 }), gn(n, r, !0)], {
|
|
7470
7475
|
gap: "var(--semantic-space-lg)",
|
|
7471
7476
|
align: "center"
|
|
7472
7477
|
})], {
|
|
@@ -7505,7 +7510,7 @@ var vn = (e, t) => ({
|
|
|
7505
7510
|
align: "center"
|
|
7506
7511
|
}
|
|
7507
7512
|
}), n = e.content;
|
|
7508
|
-
return [t.container([t.stack("copy", [...
|
|
7513
|
+
return [t.container([t.stack("copy", [...hn(t, n, { centered: !0 }), _n(t, n)], {
|
|
7509
7514
|
gap: "var(--semantic-space-lg)",
|
|
7510
7515
|
align: "center"
|
|
7511
7516
|
})], { alignItems: "center" })];
|
|
@@ -7557,7 +7562,7 @@ var vn = (e, t) => ({
|
|
|
7557
7562
|
}
|
|
7558
7563
|
}
|
|
7559
7564
|
]
|
|
7560
|
-
},
|
|
7565
|
+
}, yn = [
|
|
7561
7566
|
{
|
|
7562
7567
|
key: "eyebrow",
|
|
7563
7568
|
label: "Small label above",
|
|
@@ -7602,8 +7607,8 @@ var vn = (e, t) => ({
|
|
|
7602
7607
|
type: "button",
|
|
7603
7608
|
hint: "Optional — for people who still have questions. Leave the text empty to hide it."
|
|
7604
7609
|
}
|
|
7605
|
-
],
|
|
7606
|
-
function
|
|
7610
|
+
], bn = (e) => (Array.isArray(e.items) ? e.items : []).filter((e) => e && (e.question?.trim() || e.answer?.trim()));
|
|
7611
|
+
function xn(e, t, n = {}) {
|
|
7607
7612
|
let r = n.centered || e.align === "center" ? { align: "center" } : {};
|
|
7608
7613
|
return [
|
|
7609
7614
|
e.text("eyebrow", t.eyebrow, "eyebrow", r),
|
|
@@ -7617,8 +7622,8 @@ function Sn(e, t, n = {}) {
|
|
|
7617
7622
|
})
|
|
7618
7623
|
];
|
|
7619
7624
|
}
|
|
7620
|
-
var
|
|
7621
|
-
let n =
|
|
7625
|
+
var Sn = (e, t) => {
|
|
7626
|
+
let n = bn(t);
|
|
7622
7627
|
return n.length ? {
|
|
7623
7628
|
id: e.id("accordion"),
|
|
7624
7629
|
type: "accordion",
|
|
@@ -7637,19 +7642,19 @@ var Cn = (e, t) => {
|
|
|
7637
7642
|
textColor: e.tone.heading
|
|
7638
7643
|
}
|
|
7639
7644
|
} : null;
|
|
7640
|
-
},
|
|
7645
|
+
}, Cn = (e, t, n) => e.stack(`item-${n}`, [e.text(`items.${n}.question`, t.items[n].question, "h4"), e.text(`items.${n}.answer`, t.items[n].answer, "body")], {
|
|
7641
7646
|
gap: "var(--semantic-space-xs)",
|
|
7642
7647
|
align: "flex-start",
|
|
7643
7648
|
styles: { textAlign: "left" }
|
|
7644
|
-
}),
|
|
7649
|
+
}), wn = (e) => (Array.isArray(e.items) ? e.items : []).map((e, t) => e && (e.question?.trim() || e.answer?.trim()) ? t : -1).filter((e) => e >= 0), Tn = (e, t, n = "flex-start") => {
|
|
7645
7650
|
let r = e.button("cta", t.cta, "primary");
|
|
7646
7651
|
return r ? e.row("more", [r], { justify: n }) : null;
|
|
7647
|
-
},
|
|
7652
|
+
}, En = {
|
|
7648
7653
|
kind: "faq",
|
|
7649
7654
|
label: "Questions",
|
|
7650
7655
|
description: "Answer the things people ask most, so they don’t have to.",
|
|
7651
7656
|
group: "Content",
|
|
7652
|
-
fields:
|
|
7657
|
+
fields: yn,
|
|
7653
7658
|
defaults: {
|
|
7654
7659
|
eyebrow: "FAQ",
|
|
7655
7660
|
heading: "Questions, answered",
|
|
@@ -7702,10 +7707,10 @@ var Cn = (e, t) => {
|
|
|
7702
7707
|
...e.style,
|
|
7703
7708
|
align: "center"
|
|
7704
7709
|
}
|
|
7705
|
-
}), n = e.content, r = t.stack("head",
|
|
7710
|
+
}), n = e.content, r = t.stack("head", xn(t, n, { centered: !0 }), {
|
|
7706
7711
|
align: "center",
|
|
7707
7712
|
gap: "var(--semantic-space-sm)"
|
|
7708
|
-
}), i = t.stack("body", [
|
|
7713
|
+
}), i = t.stack("body", [Sn(t, n), Tn(t, n, "center")], {
|
|
7709
7714
|
gap: "var(--semantic-space-xl)",
|
|
7710
7715
|
align: "stretch",
|
|
7711
7716
|
styles: {
|
|
@@ -7735,11 +7740,11 @@ var Cn = (e, t) => {
|
|
|
7735
7740
|
...e.style,
|
|
7736
7741
|
align: "left"
|
|
7737
7742
|
}
|
|
7738
|
-
}), n = e.content, r = t.stack("head", [...
|
|
7743
|
+
}), n = e.content, r = t.stack("head", [...xn(t, n), Tn(t, n)], {
|
|
7739
7744
|
gap: "var(--semantic-space-md)",
|
|
7740
7745
|
align: "flex-start"
|
|
7741
7746
|
});
|
|
7742
|
-
return [t.container([t.split("split", r, t.box("body", [
|
|
7747
|
+
return [t.container([t.split("split", r, t.box("body", [Sn(t, n)]), {
|
|
7743
7748
|
ratio: [1, 1.5],
|
|
7744
7749
|
align: "flex-start"
|
|
7745
7750
|
})])];
|
|
@@ -7761,10 +7766,10 @@ var Cn = (e, t) => {
|
|
|
7761
7766
|
...e.style,
|
|
7762
7767
|
align: "center"
|
|
7763
7768
|
}
|
|
7764
|
-
}), n = e.content, r = t.stack("head",
|
|
7769
|
+
}), n = e.content, r = t.stack("head", xn(t, n, { centered: !0 }), {
|
|
7765
7770
|
align: "center",
|
|
7766
7771
|
gap: "var(--semantic-space-sm)"
|
|
7767
|
-
}), i = "clamp(1.25rem, 4vw, 2.5rem)", a = t.card("card", [
|
|
7772
|
+
}), i = "clamp(1.25rem, 4vw, 2.5rem)", a = t.card("card", [Sn(t, n), Tn(t, n, "center")], {
|
|
7768
7773
|
paddingTop: i,
|
|
7769
7774
|
paddingBottom: i,
|
|
7770
7775
|
paddingLeft: i,
|
|
@@ -7798,8 +7803,8 @@ var Cn = (e, t) => {
|
|
|
7798
7803
|
align: "left"
|
|
7799
7804
|
}
|
|
7800
7805
|
}), n = e.content, r = [];
|
|
7801
|
-
for (let e of
|
|
7802
|
-
let i = t.stack("head", [...
|
|
7806
|
+
for (let e of wn(n)) r.length && r.push(t.divider(`rule-${e}`)), r.push(Cn(t, n, e));
|
|
7807
|
+
let i = t.stack("head", [...xn(t, n), Tn(t, n)], {
|
|
7803
7808
|
gap: "var(--semantic-space-md)",
|
|
7804
7809
|
align: "flex-start"
|
|
7805
7810
|
}), a = t.stack("list", r, {
|
|
@@ -7822,7 +7827,7 @@ var Cn = (e, t) => {
|
|
|
7822
7827
|
"surface"
|
|
7823
7828
|
],
|
|
7824
7829
|
build(e) {
|
|
7825
|
-
let t = k(e), n = e.content, r = t.align === "center", i = t.stack("head",
|
|
7830
|
+
let t = k(e), n = e.content, r = t.align === "center", i = t.stack("head", xn(t, n), { gap: "var(--semantic-space-sm)" }), a = wn(n).map((e) => t.card(`cell-${e}`, [Cn(t, n, e)], {
|
|
7826
7831
|
paddingTop: "1.5rem",
|
|
7827
7832
|
paddingBottom: "1.5rem"
|
|
7828
7833
|
}));
|
|
@@ -7833,12 +7838,12 @@ var Cn = (e, t) => {
|
|
|
7833
7838
|
1,
|
|
7834
7839
|
1
|
|
7835
7840
|
], { gap: "var(--semantic-space-lg)" }),
|
|
7836
|
-
|
|
7841
|
+
Tn(t, n, r ? "center" : "flex-start")
|
|
7837
7842
|
], { gap: "calc(var(--semantic-space-xl) * 1.5)" })];
|
|
7838
7843
|
}
|
|
7839
7844
|
}
|
|
7840
7845
|
]
|
|
7841
|
-
},
|
|
7846
|
+
}, Dn = [
|
|
7842
7847
|
{
|
|
7843
7848
|
key: "eyebrow",
|
|
7844
7849
|
label: "Small label above",
|
|
@@ -7898,8 +7903,8 @@ var Cn = (e, t) => {
|
|
|
7898
7903
|
}
|
|
7899
7904
|
]
|
|
7900
7905
|
}
|
|
7901
|
-
],
|
|
7902
|
-
function
|
|
7906
|
+
], On = (e) => Array.isArray(e.items) ? e.items : [], kn = (e, t) => `items.${e}.${t}`;
|
|
7907
|
+
function An(e, t, n = {}) {
|
|
7903
7908
|
let r = !!n.centered || e.align === "center", i = [
|
|
7904
7909
|
e.text("eyebrow", t.eyebrow, "eyebrow", { align: r ? "center" : "left" }),
|
|
7905
7910
|
e.text("heading", t.heading, "h2", { align: r ? "center" : "left" }),
|
|
@@ -7917,17 +7922,17 @@ function jn(e, t, n = {}) {
|
|
|
7917
7922
|
}
|
|
7918
7923
|
}) : null;
|
|
7919
7924
|
}
|
|
7920
|
-
var
|
|
7925
|
+
var jn = (e, t, n) => e.button(kn(n, "link"), t.link, "ghost"), Mn = (e, t, n, r = {}) => t.icon ? e.icon(kn(n, "icon"), t.icon, r) : null, Nn = (e, t, n, r = "h4", i = {}) => e.text(kn(n, "title"), t.title, r, i), Pn = (e, t, n, r = {}) => e.text(kn(n, "text"), t.text, "body", r), Fn = (e, t) => e <= Math.min(3, t) ? Math.max(e, 1) : e === 4 ? Math.min(4, t) : e <= 6 ? 3 : t, In = "calc(var(--plx-gap) * 2)", Ln = {
|
|
7921
7926
|
paddingTop: "2rem",
|
|
7922
7927
|
paddingBottom: "2rem",
|
|
7923
7928
|
paddingLeft: "2rem",
|
|
7924
7929
|
paddingRight: "2rem"
|
|
7925
|
-
},
|
|
7930
|
+
}, Rn = {
|
|
7926
7931
|
kind: "features",
|
|
7927
7932
|
label: "Features",
|
|
7928
7933
|
description: "What you offer: a handful of benefits or services, each with an icon and a few words.",
|
|
7929
7934
|
group: "Content",
|
|
7930
|
-
fields:
|
|
7935
|
+
fields: Dn,
|
|
7931
7936
|
defaults: {
|
|
7932
7937
|
eyebrow: "What we offer",
|
|
7933
7938
|
heading: "Everything you need, nothing you don’t",
|
|
@@ -8018,20 +8023,20 @@ var Mn = (e, t, n) => e.button(An(n, "link"), t.link, "ghost"), Nn = (e, t, n, r
|
|
|
8018
8023
|
"items"
|
|
8019
8024
|
],
|
|
8020
8025
|
build(e) {
|
|
8021
|
-
let t = k(e), n =
|
|
8022
|
-
|
|
8026
|
+
let t = k(e), n = On(e.content).map((e, n) => t.stack(`item-${n}`, [
|
|
8027
|
+
Mn(t, e, n, {
|
|
8023
8028
|
circle: !0,
|
|
8024
8029
|
size: "26px"
|
|
8025
8030
|
}),
|
|
8031
|
+
Nn(t, e, n),
|
|
8026
8032
|
Pn(t, e, n),
|
|
8027
|
-
|
|
8028
|
-
Mn(t, e, n)
|
|
8033
|
+
jn(t, e, n)
|
|
8029
8034
|
], { gap: "var(--semantic-space-sm)" }));
|
|
8030
|
-
return [t.container([
|
|
8031
|
-
|
|
8035
|
+
return [t.container([An(t, e.content), t.grid("items", n, [
|
|
8036
|
+
Fn(n.length, 3),
|
|
8032
8037
|
2,
|
|
8033
8038
|
1
|
|
8034
|
-
], { gap:
|
|
8039
|
+
], { gap: In })], { gap: In })];
|
|
8035
8040
|
}
|
|
8036
8041
|
},
|
|
8037
8042
|
{
|
|
@@ -8050,17 +8055,17 @@ var Mn = (e, t, n) => e.button(An(n, "link"), t.link, "ghost"), Nn = (e, t, n, r
|
|
|
8050
8055
|
"items"
|
|
8051
8056
|
],
|
|
8052
8057
|
build(e) {
|
|
8053
|
-
let t = k(e), n =
|
|
8054
|
-
t.row(`head-${n}`, [
|
|
8058
|
+
let t = k(e), n = On(e.content).map((e, n) => t.stack(`item-${n}`, [
|
|
8059
|
+
t.row(`head-${n}`, [Mn(t, e, n, {
|
|
8055
8060
|
size: "22px",
|
|
8056
8061
|
styles: { flexShrink: 0 }
|
|
8057
|
-
}),
|
|
8062
|
+
}), Nn(t, e, n)], {
|
|
8058
8063
|
gap: "var(--semantic-space-sm)",
|
|
8059
8064
|
align: "center",
|
|
8060
8065
|
styles: { width: "100%" }
|
|
8061
8066
|
}),
|
|
8062
|
-
|
|
8063
|
-
|
|
8067
|
+
Pn(t, e, n),
|
|
8068
|
+
jn(t, e, n)
|
|
8064
8069
|
], {
|
|
8065
8070
|
gap: "var(--semantic-space-sm)",
|
|
8066
8071
|
styles: {
|
|
@@ -8070,11 +8075,11 @@ var Mn = (e, t, n) => e.button(An(n, "link"), t.link, "ghost"), Nn = (e, t, n, r
|
|
|
8070
8075
|
paddingTop: "var(--semantic-space-md)"
|
|
8071
8076
|
}
|
|
8072
8077
|
}));
|
|
8073
|
-
return [t.container([
|
|
8074
|
-
|
|
8078
|
+
return [t.container([An(t, e.content), t.grid("items", n, [
|
|
8079
|
+
Fn(n.length, 4),
|
|
8075
8080
|
2,
|
|
8076
8081
|
1
|
|
8077
|
-
], { gap:
|
|
8082
|
+
], { gap: In })], { gap: In })];
|
|
8078
8083
|
}
|
|
8079
8084
|
},
|
|
8080
8085
|
{
|
|
@@ -8093,24 +8098,24 @@ var Mn = (e, t, n) => e.button(An(n, "link"), t.link, "ghost"), Nn = (e, t, n, r
|
|
|
8093
8098
|
"items"
|
|
8094
8099
|
],
|
|
8095
8100
|
build(e) {
|
|
8096
|
-
let t = k(e), n =
|
|
8097
|
-
|
|
8101
|
+
let t = k(e), n = On(e.content).map((e, n) => t.card(`item-${n}`, [
|
|
8102
|
+
Mn(t, e, n, {
|
|
8098
8103
|
circle: !0,
|
|
8099
8104
|
size: "26px"
|
|
8100
8105
|
}),
|
|
8106
|
+
Nn(t, e, n),
|
|
8101
8107
|
Pn(t, e, n),
|
|
8102
|
-
|
|
8103
|
-
Mn(t, e, n)
|
|
8108
|
+
jn(t, e, n)
|
|
8104
8109
|
], {
|
|
8105
|
-
...
|
|
8110
|
+
...Ln,
|
|
8106
8111
|
alignItems: "flex-start",
|
|
8107
8112
|
gap: "var(--semantic-space-sm)"
|
|
8108
8113
|
}));
|
|
8109
|
-
return [t.container([
|
|
8114
|
+
return [t.container([An(t, e.content), t.grid("items", n, [
|
|
8110
8115
|
2,
|
|
8111
8116
|
2,
|
|
8112
8117
|
1
|
|
8113
|
-
], { gap: "var(--plx-gap)" })], { gap:
|
|
8118
|
+
], { gap: "var(--plx-gap)" })], { gap: In })];
|
|
8114
8119
|
}
|
|
8115
8120
|
},
|
|
8116
8121
|
{
|
|
@@ -8135,13 +8140,13 @@ var Mn = (e, t, n) => e.button(An(n, "link"), t.link, "ghost"), Nn = (e, t, n, r
|
|
|
8135
8140
|
...e.style,
|
|
8136
8141
|
align: "left"
|
|
8137
8142
|
}
|
|
8138
|
-
}), n =
|
|
8143
|
+
}), n = On(e.content).flatMap((e, n) => [n > 0 ? t.divider(`rule-${n}`) : null, t.row(`item-${n}`, [Mn(t, e, n, {
|
|
8139
8144
|
circle: !0,
|
|
8140
8145
|
size: "24px"
|
|
8141
8146
|
}), t.stack(`copy-${n}`, [
|
|
8147
|
+
Nn(t, e, n),
|
|
8142
8148
|
Pn(t, e, n),
|
|
8143
|
-
|
|
8144
|
-
Mn(t, e, n)
|
|
8149
|
+
jn(t, e, n)
|
|
8145
8150
|
], {
|
|
8146
8151
|
gap: "var(--semantic-space-xs)",
|
|
8147
8152
|
styles: {
|
|
@@ -8159,7 +8164,7 @@ var Mn = (e, t, n) => e.button(An(n, "link"), t.link, "ghost"), Nn = (e, t, n, r
|
|
|
8159
8164
|
gap: "var(--semantic-space-md)",
|
|
8160
8165
|
align: "stretch"
|
|
8161
8166
|
});
|
|
8162
|
-
return [t.container([t.split("split",
|
|
8167
|
+
return [t.container([t.split("split", An(t, e.content, { maxWidth: "26rem" }) ?? t.box("intro", []), r, {
|
|
8163
8168
|
ratio: [1, 1.5],
|
|
8164
8169
|
align: "flex-start"
|
|
8165
8170
|
})])];
|
|
@@ -8181,16 +8186,16 @@ var Mn = (e, t, n) => e.button(An(n, "link"), t.link, "ghost"), Nn = (e, t, n, r
|
|
|
8181
8186
|
...e.style,
|
|
8182
8187
|
align: "left"
|
|
8183
8188
|
}
|
|
8184
|
-
}), n =
|
|
8189
|
+
}), n = On(e.content).map((e, n) => {
|
|
8185
8190
|
let r = t.stack(`copy-${n}`, [
|
|
8186
|
-
|
|
8191
|
+
Mn(t, e, n, {
|
|
8187
8192
|
circle: !0,
|
|
8188
8193
|
size: "24px"
|
|
8189
8194
|
}),
|
|
8190
|
-
|
|
8191
|
-
t.text(
|
|
8192
|
-
|
|
8193
|
-
], { gap: "var(--semantic-space-md)" }), i = t.image(
|
|
8195
|
+
Nn(t, e, n, "h3"),
|
|
8196
|
+
t.text(kn(n, "text"), e.text, "lead"),
|
|
8197
|
+
jn(t, e, n)
|
|
8198
|
+
], { gap: "var(--semantic-space-md)" }), i = t.image(kn(n, "image"), e.image, e.imageAlt || e.title, {
|
|
8194
8199
|
ratio: "4 / 3",
|
|
8195
8200
|
radius: "var(--radius-2xl)"
|
|
8196
8201
|
});
|
|
@@ -8199,7 +8204,7 @@ var Mn = (e, t, n) => e.button(An(n, "link"), t.link, "ghost"), Nn = (e, t, n, r
|
|
|
8199
8204
|
gap: "calc(var(--plx-gap) * 3)"
|
|
8200
8205
|
});
|
|
8201
8206
|
});
|
|
8202
|
-
return [t.container([
|
|
8207
|
+
return [t.container([An(t, e.content, { centered: !0 }), t.stack("rows", n, {
|
|
8203
8208
|
gap: "calc(var(--plx-gap) * 3)",
|
|
8204
8209
|
align: "stretch"
|
|
8205
8210
|
})], { gap: "calc(var(--plx-gap) * 3)" })];
|
|
@@ -8227,7 +8232,7 @@ var Mn = (e, t, n) => e.button(An(n, "link"), t.link, "ghost"), Nn = (e, t, n, r
|
|
|
8227
8232
|
...e.style,
|
|
8228
8233
|
align: "center"
|
|
8229
8234
|
}
|
|
8230
|
-
}), n =
|
|
8235
|
+
}), n = On(e.content).map((e, n) => t.card(`item-${n}`, [
|
|
8231
8236
|
t.box(`bar-${n}`, [], {
|
|
8232
8237
|
width: "3rem",
|
|
8233
8238
|
height: "4px",
|
|
@@ -8235,20 +8240,20 @@ var Mn = (e, t, n) => e.button(An(n, "link"), t.link, "ghost"), Nn = (e, t, n, r
|
|
|
8235
8240
|
backgroundColor: t.tone.accent,
|
|
8236
8241
|
flexShrink: 0
|
|
8237
8242
|
}),
|
|
8238
|
-
|
|
8239
|
-
|
|
8240
|
-
|
|
8241
|
-
|
|
8243
|
+
Mn(t, e, n, { size: "30px" }),
|
|
8244
|
+
Nn(t, e, n, "h4", { align: "left" }),
|
|
8245
|
+
Pn(t, e, n, { align: "left" }),
|
|
8246
|
+
jn(t, e, n)
|
|
8242
8247
|
], {
|
|
8243
|
-
...
|
|
8248
|
+
...Ln,
|
|
8244
8249
|
alignItems: "flex-start",
|
|
8245
8250
|
gap: "var(--semantic-space-sm)"
|
|
8246
8251
|
}));
|
|
8247
|
-
return [t.container([
|
|
8248
|
-
|
|
8252
|
+
return [t.container([An(t, e.content, { centered: !0 }), t.grid("items", n, [
|
|
8253
|
+
Fn(n.length, 3),
|
|
8249
8254
|
2,
|
|
8250
8255
|
1
|
|
8251
|
-
], { gap: "var(--plx-gap)" })], { gap:
|
|
8256
|
+
], { gap: "var(--plx-gap)" })], { gap: In })];
|
|
8252
8257
|
}
|
|
8253
8258
|
},
|
|
8254
8259
|
{
|
|
@@ -8261,21 +8266,21 @@ var Mn = (e, t, n) => e.button(An(n, "link"), t.link, "ghost"), Nn = (e, t, n, r
|
|
|
8261
8266
|
"surface"
|
|
8262
8267
|
],
|
|
8263
8268
|
build(e) {
|
|
8264
|
-
let t = k(e), n =
|
|
8265
|
-
let a = r[i] === 2, o = e.image ? t.image(
|
|
8269
|
+
let t = k(e), n = On(e.content), r = zn(n.length), i = n.map((e, i) => {
|
|
8270
|
+
let a = r[i] === 2, o = e.image ? t.image(kn(i, "image"), e.image, e.imageAlt || e.title, {
|
|
8266
8271
|
ratio: a ? "16 / 7" : "16 / 9",
|
|
8267
8272
|
radius: "var(--radius-lg)"
|
|
8268
8273
|
}) : null, s = t.card(`item-${i}`, [
|
|
8269
8274
|
o,
|
|
8270
|
-
|
|
8275
|
+
Mn(t, e, i, {
|
|
8271
8276
|
circle: !0,
|
|
8272
8277
|
size: "24px"
|
|
8273
8278
|
}),
|
|
8274
|
-
|
|
8275
|
-
|
|
8276
|
-
|
|
8279
|
+
Nn(t, e, i, a ? "h3" : "h4"),
|
|
8280
|
+
Pn(t, e, i),
|
|
8281
|
+
jn(t, e, i)
|
|
8277
8282
|
], {
|
|
8278
|
-
...
|
|
8283
|
+
...Ln,
|
|
8279
8284
|
alignItems: "flex-start",
|
|
8280
8285
|
gap: "var(--semantic-space-sm)",
|
|
8281
8286
|
minHeight: a ? "15rem" : "12rem",
|
|
@@ -8289,16 +8294,16 @@ var Mn = (e, t, n) => e.button(An(n, "link"), t.link, "ghost"), Nn = (e, t, n, r
|
|
|
8289
8294
|
}
|
|
8290
8295
|
};
|
|
8291
8296
|
});
|
|
8292
|
-
return [t.container([
|
|
8297
|
+
return [t.container([An(t, e.content), t.grid("items", i, [
|
|
8293
8298
|
3,
|
|
8294
8299
|
2,
|
|
8295
8300
|
1
|
|
8296
|
-
], { gap: "var(--plx-gap)" })], { gap:
|
|
8301
|
+
], { gap: "var(--plx-gap)" })], { gap: In })];
|
|
8297
8302
|
}
|
|
8298
8303
|
}
|
|
8299
8304
|
]
|
|
8300
8305
|
};
|
|
8301
|
-
function
|
|
8306
|
+
function zn(e) {
|
|
8302
8307
|
let t = [
|
|
8303
8308
|
2,
|
|
8304
8309
|
1,
|
|
@@ -8313,7 +8318,7 @@ function Bn(e) {
|
|
|
8313
8318
|
}
|
|
8314
8319
|
//#endregion
|
|
8315
8320
|
//#region src/v2/sections/catalog/footer.ts
|
|
8316
|
-
var
|
|
8321
|
+
var Bn = [
|
|
8317
8322
|
{
|
|
8318
8323
|
key: "brand",
|
|
8319
8324
|
label: "Site name",
|
|
@@ -8358,7 +8363,7 @@ var Vn = [
|
|
|
8358
8363
|
key: "network",
|
|
8359
8364
|
label: "Network",
|
|
8360
8365
|
type: "select",
|
|
8361
|
-
options: Object.keys(
|
|
8366
|
+
options: Object.keys(F).map((e) => [e, F[e].label])
|
|
8362
8367
|
}, {
|
|
8363
8368
|
key: "url",
|
|
8364
8369
|
label: "Link",
|
|
@@ -8385,7 +8390,7 @@ var Vn = [
|
|
|
8385
8390
|
max: 120
|
|
8386
8391
|
}
|
|
8387
8392
|
];
|
|
8388
|
-
function
|
|
8393
|
+
function Vn(e) {
|
|
8389
8394
|
return typeof e == "string" ? e.split(/\r?\n/).map((e) => {
|
|
8390
8395
|
let [t, ...n] = e.split("|");
|
|
8391
8396
|
return {
|
|
@@ -8394,11 +8399,11 @@ function Hn(e) {
|
|
|
8394
8399
|
};
|
|
8395
8400
|
}).filter((e) => e.label).slice(0, 10) : [];
|
|
8396
8401
|
}
|
|
8397
|
-
var
|
|
8402
|
+
var Hn = (e) => (Array.isArray(e.columns) ? e.columns : []).map((e, t) => ({
|
|
8398
8403
|
index: t,
|
|
8399
8404
|
title: e?.title?.trim() ?? "",
|
|
8400
|
-
links:
|
|
8401
|
-
})).filter((e) => e.title || e.links.length),
|
|
8405
|
+
links: Vn(e?.links)
|
|
8406
|
+
})).filter((e) => e.title || e.links.length), Un = (e, t, n, r) => n.length ? {
|
|
8402
8407
|
id: e.id(t),
|
|
8403
8408
|
type: "menu",
|
|
8404
8409
|
name: "Links",
|
|
@@ -8411,15 +8416,15 @@ var Un = (e) => (Array.isArray(e.columns) ? e.columns : []).map((e, t) => ({
|
|
|
8411
8416
|
textColor: e.tone.body,
|
|
8412
8417
|
width: r === "horizontal" ? "100%" : "fit-content"
|
|
8413
8418
|
}
|
|
8414
|
-
} : null,
|
|
8419
|
+
} : null, Wn = (e, t, n = !1) => e.text("brand", t.brand, "lead", {
|
|
8415
8420
|
color: e.tone.heading,
|
|
8416
8421
|
align: n ? "center" : "left",
|
|
8417
8422
|
styles: { fontWeight: "700" }
|
|
8418
|
-
}),
|
|
8423
|
+
}), Gn = (e, t, n = !1) => e.text("text", t.text, "body", {
|
|
8419
8424
|
align: n ? "center" : "left",
|
|
8420
8425
|
maxWidth: "24rem"
|
|
8421
|
-
}),
|
|
8422
|
-
let n = (Array.isArray(t.socials) ? t.socials : []).filter((e) => e && e.network && e.network in
|
|
8426
|
+
}), Kn = (e, t) => {
|
|
8427
|
+
let n = (Array.isArray(t.socials) ? t.socials : []).filter((e) => e && e.network && e.network in F && typeof e.url == "string" && e.url.trim());
|
|
8423
8428
|
return n.length ? {
|
|
8424
8429
|
id: e.id("socials"),
|
|
8425
8430
|
type: "social",
|
|
@@ -8436,17 +8441,17 @@ var Un = (e) => (Array.isArray(e.columns) ? e.columns : []).map((e, t) => ({
|
|
|
8436
8441
|
width: "fit-content"
|
|
8437
8442
|
}
|
|
8438
8443
|
} : null;
|
|
8439
|
-
},
|
|
8444
|
+
}, qn = (e, t, n = !1) => e.text("copyright", t.copyright, "small", {
|
|
8440
8445
|
color: e.tone.muted,
|
|
8441
8446
|
align: n ? "center" : "left"
|
|
8442
8447
|
});
|
|
8443
|
-
function
|
|
8444
|
-
let n =
|
|
8448
|
+
function Jn(e, t) {
|
|
8449
|
+
let n = Hn(t);
|
|
8445
8450
|
if (!n.length) return null;
|
|
8446
8451
|
let r = n.map((t) => e.stack(`col-${t.index}`, [e.text(`columns.${t.index}.title`, t.title, "eyebrow", {
|
|
8447
8452
|
color: e.tone.heading,
|
|
8448
8453
|
align: "left"
|
|
8449
|
-
}),
|
|
8454
|
+
}), Un(e, `col-${t.index}-links`, t.links, "vertical")], {
|
|
8450
8455
|
gap: "var(--semantic-space-md)",
|
|
8451
8456
|
align: "flex-start"
|
|
8452
8457
|
}));
|
|
@@ -8456,8 +8461,8 @@ function Yn(e, t) {
|
|
|
8456
8461
|
2
|
|
8457
8462
|
], { gap: "var(--semantic-space-xl)" });
|
|
8458
8463
|
}
|
|
8459
|
-
var
|
|
8460
|
-
let r = [
|
|
8464
|
+
var Yn = (e, t, n) => {
|
|
8465
|
+
let r = [qn(e, t), n ? Kn(e, t) : null].filter(Boolean);
|
|
8461
8466
|
return r.length ? e.stack("bottom", [e.divider("rule"), e.row("legal", r, {
|
|
8462
8467
|
justify: "space-between",
|
|
8463
8468
|
gap: "var(--semantic-space-md)",
|
|
@@ -8466,12 +8471,12 @@ var Xn = (e, t, n) => {
|
|
|
8466
8471
|
gap: "var(--semantic-space-lg)",
|
|
8467
8472
|
align: "stretch"
|
|
8468
8473
|
}) : null;
|
|
8469
|
-
},
|
|
8474
|
+
}, Xn = (e) => Hn(e).flatMap((e) => e.links).slice(0, 5), Zn = {
|
|
8470
8475
|
kind: "footer",
|
|
8471
8476
|
label: "Footer",
|
|
8472
8477
|
description: "The closing strip of your page: links, a short description and the small print.",
|
|
8473
8478
|
group: "Footer",
|
|
8474
|
-
fields:
|
|
8479
|
+
fields: Bn,
|
|
8475
8480
|
defaults: {
|
|
8476
8481
|
brand: "Your brand",
|
|
8477
8482
|
text: "Friendly, reliable help for people and small businesses. We’re here whenever you need us.",
|
|
@@ -8530,13 +8535,13 @@ var Xn = (e, t, n) => {
|
|
|
8530
8535
|
...e.style,
|
|
8531
8536
|
align: "left"
|
|
8532
8537
|
}
|
|
8533
|
-
}), n = e.content, r =
|
|
8534
|
-
|
|
8538
|
+
}), n = e.content, r = Un(t, "links", Xn(n), "horizontal"), i = t.row("bar", [
|
|
8539
|
+
Wn(t, n),
|
|
8535
8540
|
r ? t.box("links-wrap", [r], {
|
|
8536
8541
|
flexGrow: 1,
|
|
8537
8542
|
alignItems: "center"
|
|
8538
8543
|
}) : null,
|
|
8539
|
-
|
|
8544
|
+
qn(t, n)
|
|
8540
8545
|
].filter(Boolean), {
|
|
8541
8546
|
justify: "space-between",
|
|
8542
8547
|
gap: "var(--semantic-space-xl)",
|
|
@@ -8564,17 +8569,17 @@ var Xn = (e, t, n) => {
|
|
|
8564
8569
|
align: "left"
|
|
8565
8570
|
}
|
|
8566
8571
|
}), n = e.content, r = t.stack("about", [
|
|
8572
|
+
Wn(t, n),
|
|
8567
8573
|
Gn(t, n),
|
|
8568
|
-
Kn(t, n)
|
|
8569
|
-
qn(t, n)
|
|
8574
|
+
Kn(t, n)
|
|
8570
8575
|
], {
|
|
8571
8576
|
gap: "var(--semantic-space-md)",
|
|
8572
8577
|
align: "flex-start"
|
|
8573
|
-
}), i =
|
|
8578
|
+
}), i = Jn(t, n), a = i ? t.split("top", r, i, {
|
|
8574
8579
|
ratio: [1, 1.6],
|
|
8575
8580
|
align: "flex-start"
|
|
8576
8581
|
}) : r;
|
|
8577
|
-
return [t.container([a,
|
|
8582
|
+
return [t.container([a, Yn(t, n, !1)], { gap: "calc(var(--semantic-space-xl) * 1.5)" })];
|
|
8578
8583
|
}
|
|
8579
8584
|
},
|
|
8580
8585
|
{
|
|
@@ -8601,15 +8606,15 @@ var Xn = (e, t, n) => {
|
|
|
8601
8606
|
...e.style,
|
|
8602
8607
|
align: "center"
|
|
8603
8608
|
}
|
|
8604
|
-
}), n = e.content, r =
|
|
8609
|
+
}), n = e.content, r = Un(t, "links", Xn(n), "horizontal"), i = t.stack("top", [
|
|
8610
|
+
Wn(t, n, !0),
|
|
8605
8611
|
Gn(t, n, !0),
|
|
8606
|
-
Kn(t, n, !0),
|
|
8607
8612
|
r ? t.box("links-wrap", [r], {
|
|
8608
8613
|
width: "fit-content",
|
|
8609
8614
|
alignItems: "center",
|
|
8610
8615
|
margin: "0 auto"
|
|
8611
8616
|
}) : null,
|
|
8612
|
-
|
|
8617
|
+
Kn(t, n)
|
|
8613
8618
|
], {
|
|
8614
8619
|
gap: "var(--semantic-space-lg)",
|
|
8615
8620
|
align: "center"
|
|
@@ -8617,7 +8622,7 @@ var Xn = (e, t, n) => {
|
|
|
8617
8622
|
return [t.container([
|
|
8618
8623
|
i,
|
|
8619
8624
|
t.divider("rule"),
|
|
8620
|
-
|
|
8625
|
+
qn(t, n, !0)
|
|
8621
8626
|
], {
|
|
8622
8627
|
gap: "var(--semantic-space-xl)",
|
|
8623
8628
|
alignItems: "center"
|
|
@@ -8663,8 +8668,8 @@ var Xn = (e, t, n) => {
|
|
|
8663
8668
|
textColor: t.tone.heading
|
|
8664
8669
|
}
|
|
8665
8670
|
}, i = t.stack("about", [
|
|
8671
|
+
Wn(t, n),
|
|
8666
8672
|
Gn(t, n),
|
|
8667
|
-
Kn(t, n),
|
|
8668
8673
|
t.text("signupTitle", n.signupTitle, "small", {
|
|
8669
8674
|
color: t.tone.heading,
|
|
8670
8675
|
styles: {
|
|
@@ -8673,19 +8678,19 @@ var Xn = (e, t, n) => {
|
|
|
8673
8678
|
}
|
|
8674
8679
|
}),
|
|
8675
8680
|
r,
|
|
8676
|
-
|
|
8681
|
+
Kn(t, n)
|
|
8677
8682
|
], {
|
|
8678
8683
|
gap: "var(--semantic-space-md)",
|
|
8679
8684
|
align: "flex-start"
|
|
8680
|
-
}), a =
|
|
8685
|
+
}), a = Jn(t, n), o = a ? t.split("top", i, a, {
|
|
8681
8686
|
ratio: [1.1, 1.3],
|
|
8682
8687
|
align: "flex-start"
|
|
8683
8688
|
}) : i;
|
|
8684
|
-
return [t.container([o,
|
|
8689
|
+
return [t.container([o, Yn(t, n, !1)], { gap: "calc(var(--semantic-space-xl) * 1.5)" })];
|
|
8685
8690
|
}
|
|
8686
8691
|
}
|
|
8687
8692
|
]
|
|
8688
|
-
},
|
|
8693
|
+
}, Qn = [
|
|
8689
8694
|
{
|
|
8690
8695
|
key: "eyebrow",
|
|
8691
8696
|
label: "Small label above",
|
|
@@ -8723,8 +8728,8 @@ var Xn = (e, t, n) => {
|
|
|
8723
8728
|
hint: "Optional."
|
|
8724
8729
|
}]
|
|
8725
8730
|
}
|
|
8726
|
-
],
|
|
8727
|
-
function
|
|
8731
|
+
], $n = (e) => Array.isArray(e.content.items) ? e.content.items : [];
|
|
8732
|
+
function er(e, t = !1) {
|
|
8728
8733
|
let n = k(t ? {
|
|
8729
8734
|
...e,
|
|
8730
8735
|
style: {
|
|
@@ -8744,7 +8749,7 @@ function tr(e, t = !1) {
|
|
|
8744
8749
|
}
|
|
8745
8750
|
});
|
|
8746
8751
|
}
|
|
8747
|
-
var
|
|
8752
|
+
var tr = (e, t, n, r = {}) => {
|
|
8748
8753
|
let i = e.image(`items.${t}.image`, n.image, n.imageAlt || n.caption || "", {
|
|
8749
8754
|
ratio: r.ratio ?? "4 / 3",
|
|
8750
8755
|
radius: r.radius ?? "var(--radius-xl)"
|
|
@@ -8768,12 +8773,12 @@ var nr = (e, t, n, r = {}) => {
|
|
|
8768
8773
|
gridRowSpan: 1
|
|
8769
8774
|
}
|
|
8770
8775
|
} } : {});
|
|
8771
|
-
},
|
|
8776
|
+
}, nr = {
|
|
8772
8777
|
kind: "gallery",
|
|
8773
8778
|
label: "Gallery",
|
|
8774
8779
|
description: "A collection of pictures — your work, your place, your people.",
|
|
8775
8780
|
group: "Content",
|
|
8776
|
-
fields:
|
|
8781
|
+
fields: Qn,
|
|
8777
8782
|
defaults: {
|
|
8778
8783
|
eyebrow: "Gallery",
|
|
8779
8784
|
heading: "A closer look",
|
|
@@ -8817,7 +8822,7 @@ var nr = (e, t, n, r = {}) => {
|
|
|
8817
8822
|
],
|
|
8818
8823
|
build(e) {
|
|
8819
8824
|
let t = k(e);
|
|
8820
|
-
return [t.container([
|
|
8825
|
+
return [t.container([er(e), t.grid("grid", $n(e).map((e, n) => tr(t, n, e)), [
|
|
8821
8826
|
3,
|
|
8822
8827
|
2,
|
|
8823
8828
|
1
|
|
@@ -8840,7 +8845,7 @@ var nr = (e, t, n, r = {}) => {
|
|
|
8840
8845
|
"inverted"
|
|
8841
8846
|
],
|
|
8842
8847
|
build(e) {
|
|
8843
|
-
let t = k(e), n = t.grid("grid",
|
|
8848
|
+
let t = k(e), n = t.grid("grid", $n(e).map((e, n) => tr(t, n, e, {
|
|
8844
8849
|
ratio: "1 / 1",
|
|
8845
8850
|
radius: "var(--radius-md)",
|
|
8846
8851
|
caption: !1
|
|
@@ -8849,7 +8854,7 @@ var nr = (e, t, n, r = {}) => {
|
|
|
8849
8854
|
3,
|
|
8850
8855
|
2
|
|
8851
8856
|
], { gap: "var(--semantic-space-sm)" });
|
|
8852
|
-
return [t.container([
|
|
8857
|
+
return [t.container([er(e), n], { gap: "var(--semantic-space-xl)" })];
|
|
8853
8858
|
}
|
|
8854
8859
|
},
|
|
8855
8860
|
{
|
|
@@ -8858,20 +8863,20 @@ var nr = (e, t, n, r = {}) => {
|
|
|
8858
8863
|
description: "The first picture big, the others around it — a magazine-style spread.",
|
|
8859
8864
|
backgrounds: ["canvas", "sunken"],
|
|
8860
8865
|
build(e) {
|
|
8861
|
-
let t = k(e), n =
|
|
8866
|
+
let t = k(e), n = $n(e).slice(0, 9), r = n.length > 5 && (n.length - 5) % 4 == 1, i = n.map((e, i) => i === 0 ? tr(t, i, e, {
|
|
8862
8867
|
ratio: "1 / 1",
|
|
8863
8868
|
span: {
|
|
8864
8869
|
cols: 2,
|
|
8865
8870
|
rows: 2
|
|
8866
8871
|
}
|
|
8867
|
-
}) : r && i === n.length - 1 ?
|
|
8872
|
+
}) : r && i === n.length - 1 ? tr(t, i, e, {
|
|
8868
8873
|
ratio: "3 / 1",
|
|
8869
8874
|
span: {
|
|
8870
8875
|
cols: 4,
|
|
8871
8876
|
rows: 1
|
|
8872
8877
|
}
|
|
8873
|
-
}) :
|
|
8874
|
-
return [t.container([
|
|
8878
|
+
}) : tr(t, i, e, { ratio: "4 / 3" }));
|
|
8879
|
+
return [t.container([er(e), t.grid("grid", i, [
|
|
8875
8880
|
4,
|
|
8876
8881
|
2,
|
|
8877
8882
|
1
|
|
@@ -8888,7 +8893,7 @@ var nr = (e, t, n, r = {}) => {
|
|
|
8888
8893
|
"inverted"
|
|
8889
8894
|
],
|
|
8890
8895
|
build(e) {
|
|
8891
|
-
let t = k(e), n =
|
|
8896
|
+
let t = k(e), n = $n(e).map((e) => ({
|
|
8892
8897
|
src: e.image ?? "",
|
|
8893
8898
|
alt: e.imageAlt || e.caption || "",
|
|
8894
8899
|
caption: e.caption ?? ""
|
|
@@ -8912,11 +8917,11 @@ var nr = (e, t, n, r = {}) => {
|
|
|
8912
8917
|
textColor: e.tone.heading
|
|
8913
8918
|
}
|
|
8914
8919
|
};
|
|
8915
|
-
return [t.container([
|
|
8920
|
+
return [t.container([er(e, !0), r], { gap: "var(--semantic-space-xl)" })];
|
|
8916
8921
|
}
|
|
8917
8922
|
}
|
|
8918
8923
|
]
|
|
8919
|
-
},
|
|
8924
|
+
}, rr = [
|
|
8920
8925
|
{
|
|
8921
8926
|
key: "brand",
|
|
8922
8927
|
label: "Site name",
|
|
@@ -8954,7 +8959,7 @@ var nr = (e, t, n, r = {}) => {
|
|
|
8954
8959
|
hint: "Optional."
|
|
8955
8960
|
}
|
|
8956
8961
|
];
|
|
8957
|
-
function
|
|
8962
|
+
function ir(e) {
|
|
8958
8963
|
let t = k(e), n = e.content;
|
|
8959
8964
|
return {
|
|
8960
8965
|
k: t,
|
|
@@ -8988,7 +8993,7 @@ function ar(e) {
|
|
|
8988
8993
|
cta: t.button("cta", n.cta, "primary")
|
|
8989
8994
|
};
|
|
8990
8995
|
}
|
|
8991
|
-
var
|
|
8996
|
+
var ar = (e, t, n = "space-between") => t.container([t.row("bar", e, {
|
|
8992
8997
|
justify: n,
|
|
8993
8998
|
gap: "var(--semantic-space-xl)",
|
|
8994
8999
|
align: "center",
|
|
@@ -8996,13 +9001,13 @@ var or = (e, t, n = "space-between") => t.container([t.row("bar", e, {
|
|
|
8996
9001
|
paddingTop: "0px",
|
|
8997
9002
|
paddingBottom: "0px"
|
|
8998
9003
|
}
|
|
8999
|
-
})], { gap: "0px" }),
|
|
9004
|
+
})], { gap: "0px" }), or = {
|
|
9000
9005
|
kind: "header",
|
|
9001
9006
|
label: "Header & menu",
|
|
9002
9007
|
description: "Your logo and navigation, at the top of the page.",
|
|
9003
9008
|
group: "Navigation",
|
|
9004
9009
|
compact: !0,
|
|
9005
|
-
fields:
|
|
9010
|
+
fields: rr,
|
|
9006
9011
|
defaults: {
|
|
9007
9012
|
brand: "Your brand",
|
|
9008
9013
|
logo: "",
|
|
@@ -9041,8 +9046,8 @@ var or = (e, t, n = "space-between") => t.container([t.row("bar", e, {
|
|
|
9041
9046
|
borderColor: "var(--color-border-subtle)"
|
|
9042
9047
|
},
|
|
9043
9048
|
build(e) {
|
|
9044
|
-
let { k: t, brand: n, links: r, cta: i } =
|
|
9045
|
-
return [
|
|
9049
|
+
let { k: t, brand: n, links: r, cta: i } = ir(e);
|
|
9050
|
+
return [ar([n, t.row("right", [r, i], {
|
|
9046
9051
|
gap: "var(--semantic-space-xl)",
|
|
9047
9052
|
align: "center",
|
|
9048
9053
|
justify: "flex-end",
|
|
@@ -9061,7 +9066,7 @@ var or = (e, t, n = "space-between") => t.container([t.row("bar", e, {
|
|
|
9061
9066
|
borderColor: "var(--color-border-subtle)"
|
|
9062
9067
|
},
|
|
9063
9068
|
build(e) {
|
|
9064
|
-
let { k: t, brand: n, links: r, cta: i } =
|
|
9069
|
+
let { k: t, brand: n, links: r, cta: i } = ir({
|
|
9065
9070
|
...e,
|
|
9066
9071
|
style: {
|
|
9067
9072
|
...e.style,
|
|
@@ -9092,7 +9097,7 @@ var or = (e, t, n = "space-between") => t.container([t.row("bar", e, {
|
|
|
9092
9097
|
borderColor: "var(--color-border-subtle)"
|
|
9093
9098
|
},
|
|
9094
9099
|
build(e) {
|
|
9095
|
-
let { k: t, brand: n, links: r, cta: i } =
|
|
9100
|
+
let { k: t, brand: n, links: r, cta: i } = ir(e), a = t.box("bar", [
|
|
9096
9101
|
t.box("l", [r], { alignItems: "flex-start" }),
|
|
9097
9102
|
t.box("c", [n], { alignItems: "center" }),
|
|
9098
9103
|
t.box("r", [i], { alignItems: "flex-end" })
|
|
@@ -9122,12 +9127,12 @@ var or = (e, t, n = "space-between") => t.container([t.row("bar", e, {
|
|
|
9122
9127
|
borderColor: "var(--color-border-subtle)"
|
|
9123
9128
|
},
|
|
9124
9129
|
build(e) {
|
|
9125
|
-
let { k: t, brand: n, cta: r } =
|
|
9126
|
-
return [
|
|
9130
|
+
let { k: t, brand: n, cta: r } = ir(e);
|
|
9131
|
+
return [ar([n, r], t)];
|
|
9127
9132
|
}
|
|
9128
9133
|
}
|
|
9129
9134
|
]
|
|
9130
|
-
},
|
|
9135
|
+
}, sr = [
|
|
9131
9136
|
{
|
|
9132
9137
|
key: "eyebrow",
|
|
9133
9138
|
label: "Small label above",
|
|
@@ -9169,7 +9174,7 @@ var or = (e, t, n = "space-between") => t.container([t.row("bar", e, {
|
|
|
9169
9174
|
label: "Picture",
|
|
9170
9175
|
type: "image"
|
|
9171
9176
|
}
|
|
9172
|
-
],
|
|
9177
|
+
], cr = (e, t, n = {}) => {
|
|
9173
9178
|
let r = n.centered || t.align === "center", i = t.row("buttons", [t.button("cta", e.cta, "primary"), t.button("cta2", e.cta2, "secondary")], {
|
|
9174
9179
|
gap: "var(--semantic-space-md)",
|
|
9175
9180
|
wrap: !0,
|
|
@@ -9192,21 +9197,21 @@ var or = (e, t, n = "space-between") => t.container([t.row("bar", e, {
|
|
|
9192
9197
|
})
|
|
9193
9198
|
];
|
|
9194
9199
|
};
|
|
9195
|
-
function
|
|
9200
|
+
function lr(e) {
|
|
9196
9201
|
return (t) => {
|
|
9197
|
-
let n = k(t), r = t.content, i = n.stack("copy",
|
|
9202
|
+
let n = k(t), r = t.content, i = n.stack("copy", cr(r, n), { gap: "var(--semantic-space-lg)" }), a = n.image("image", r.image, r.imageAlt, {
|
|
9198
9203
|
ratio: "5 / 4",
|
|
9199
9204
|
radius: "var(--radius-2xl)"
|
|
9200
9205
|
});
|
|
9201
9206
|
return [n.container([n.split("split", e ? a : i, e ? i : a, { ratio: [1.05, 1] })])];
|
|
9202
9207
|
};
|
|
9203
9208
|
}
|
|
9204
|
-
var
|
|
9209
|
+
var ur = {
|
|
9205
9210
|
kind: "hero",
|
|
9206
9211
|
label: "Hero",
|
|
9207
9212
|
description: "The big opening of a page: a headline, a line of text and a button.",
|
|
9208
9213
|
group: "Intro",
|
|
9209
|
-
fields:
|
|
9214
|
+
fields: sr,
|
|
9210
9215
|
defaults: {
|
|
9211
9216
|
eyebrow: "Welcome",
|
|
9212
9217
|
headline: "Build something your customers will love",
|
|
@@ -9229,14 +9234,14 @@ var dr = {
|
|
|
9229
9234
|
label: "Text left, picture right",
|
|
9230
9235
|
description: "The classic: words on one side, a picture on the other.",
|
|
9231
9236
|
backgrounds: ["canvas", "sunken"],
|
|
9232
|
-
build:
|
|
9237
|
+
build: lr(!1)
|
|
9233
9238
|
},
|
|
9234
9239
|
{
|
|
9235
9240
|
id: "image-left",
|
|
9236
9241
|
label: "Picture left, text right",
|
|
9237
9242
|
description: "The same, mirrored.",
|
|
9238
9243
|
backgrounds: ["canvas", "sunken"],
|
|
9239
|
-
build:
|
|
9244
|
+
build: lr(!0)
|
|
9240
9245
|
},
|
|
9241
9246
|
{
|
|
9242
9247
|
id: "centered",
|
|
@@ -9254,7 +9259,7 @@ var dr = {
|
|
|
9254
9259
|
...e.style,
|
|
9255
9260
|
align: "center"
|
|
9256
9261
|
}
|
|
9257
|
-
}), n = e.content, r = [t.stack("copy",
|
|
9262
|
+
}), n = e.content, r = [t.stack("copy", cr(n, t, { centered: !0 }), {
|
|
9258
9263
|
gap: "var(--semantic-space-lg)",
|
|
9259
9264
|
align: "center"
|
|
9260
9265
|
}), n.image ? t.image("image", n.image, n.imageAlt, {
|
|
@@ -9284,7 +9289,7 @@ var dr = {
|
|
|
9284
9289
|
],
|
|
9285
9290
|
build(e) {
|
|
9286
9291
|
let t = k(e);
|
|
9287
|
-
return [t.container([t.stack("copy",
|
|
9292
|
+
return [t.container([t.stack("copy", cr(e.content, t), {
|
|
9288
9293
|
gap: "var(--semantic-space-lg)",
|
|
9289
9294
|
styles: {
|
|
9290
9295
|
minHeight: "26rem",
|
|
@@ -9313,7 +9318,7 @@ var dr = {
|
|
|
9313
9318
|
],
|
|
9314
9319
|
build(e) {
|
|
9315
9320
|
let t = k(e);
|
|
9316
|
-
return [t.container([t.stack("copy",
|
|
9321
|
+
return [t.container([t.stack("copy", cr(e.content, t), {
|
|
9317
9322
|
gap: "var(--semantic-space-lg)",
|
|
9318
9323
|
styles: { maxWidth: "52rem" }
|
|
9319
9324
|
})])];
|
|
@@ -9366,7 +9371,7 @@ var dr = {
|
|
|
9366
9371
|
}
|
|
9367
9372
|
};
|
|
9368
9373
|
return [t.container([t.stack("copy", [
|
|
9369
|
-
...
|
|
9374
|
+
...cr(n, t, { centered: !0 }).slice(0, 3),
|
|
9370
9375
|
r,
|
|
9371
9376
|
t.text("note", n.note, "small", {
|
|
9372
9377
|
color: e.tone.muted,
|
|
@@ -9379,7 +9384,7 @@ var dr = {
|
|
|
9379
9384
|
}
|
|
9380
9385
|
}
|
|
9381
9386
|
]
|
|
9382
|
-
},
|
|
9387
|
+
}, dr = [{
|
|
9383
9388
|
key: "heading",
|
|
9384
9389
|
label: "Heading",
|
|
9385
9390
|
type: "text",
|
|
@@ -9403,9 +9408,9 @@ var dr = {
|
|
|
9403
9408
|
type: "text",
|
|
9404
9409
|
max: 32
|
|
9405
9410
|
}]
|
|
9406
|
-
}],
|
|
9407
|
-
function
|
|
9408
|
-
let i =
|
|
9411
|
+
}], fr = (e) => Array.isArray(e.items) ? e.items : [];
|
|
9412
|
+
function pr(e, t, n, r = {}) {
|
|
9413
|
+
let i = fr(t)[n];
|
|
9409
9414
|
return i.image ? e.image(`items.${n}.image`, i.image, i.imageAlt || i.name, {
|
|
9410
9415
|
ratio: "auto",
|
|
9411
9416
|
radius: "0px",
|
|
@@ -9422,16 +9427,16 @@ function mr(e, t, n, r = {}) {
|
|
|
9422
9427
|
styles: { width: "auto" }
|
|
9423
9428
|
});
|
|
9424
9429
|
}
|
|
9425
|
-
var
|
|
9430
|
+
var mr = (e, t, n, r = {}) => e.box(`item-${n}`, [pr(e, t, n)], {
|
|
9426
9431
|
alignItems: "center",
|
|
9427
9432
|
justifyContent: "center",
|
|
9428
9433
|
...r
|
|
9429
|
-
}),
|
|
9434
|
+
}), hr = (e) => e <= 4 ? Math.max(e, 1) : e <= 6 ? 3 : 4, gr = (e, t, n = {}) => fr(t).map((r, i) => mr(e, t, i, n)), _r = {
|
|
9430
9435
|
kind: "logos",
|
|
9431
9436
|
label: "Logos",
|
|
9432
9437
|
description: "A “trusted by” strip of customer, partner or press logos.",
|
|
9433
9438
|
group: "Proof",
|
|
9434
|
-
fields:
|
|
9439
|
+
fields: dr,
|
|
9435
9440
|
defaults: {
|
|
9436
9441
|
heading: "Trusted by teams at",
|
|
9437
9442
|
items: [
|
|
@@ -9484,7 +9489,7 @@ var hr = (e, t, n, r = {}) => e.box(`item-${n}`, [mr(e, t, n)], {
|
|
|
9484
9489
|
...e.style,
|
|
9485
9490
|
align: "center"
|
|
9486
9491
|
}
|
|
9487
|
-
}), n = t.row("logos",
|
|
9492
|
+
}), n = t.row("logos", gr(t, e.content, { width: "auto" }), {
|
|
9488
9493
|
gap: "var(--semantic-space-lg) calc(var(--plx-gap) * 1.5)",
|
|
9489
9494
|
justify: "center",
|
|
9490
9495
|
wrap: !0
|
|
@@ -9514,7 +9519,7 @@ var hr = (e, t, n, r = {}) => e.box(`item-${n}`, [mr(e, t, n)], {
|
|
|
9514
9519
|
...e.style,
|
|
9515
9520
|
align: "center"
|
|
9516
9521
|
}
|
|
9517
|
-
}), n =
|
|
9522
|
+
}), n = fr(e.content).length, r = hr(n), i = fr(e.content).map((n, r) => t.card(`card-${r}`, [pr(t, e.content, r)], {
|
|
9518
9523
|
alignItems: "center",
|
|
9519
9524
|
justifyContent: "center",
|
|
9520
9525
|
minHeight: "5.5rem",
|
|
@@ -9547,7 +9552,7 @@ var hr = (e, t, n, r = {}) => e.box(`item-${n}`, [mr(e, t, n)], {
|
|
|
9547
9552
|
...e.style,
|
|
9548
9553
|
align: "left"
|
|
9549
9554
|
}
|
|
9550
|
-
}), n = t.stack("copy", [t.text("heading", e.content.heading, "h3", { maxWidth: "18rem" })], { align: "flex-start" }), r = t.grid("logos",
|
|
9555
|
+
}), n = t.stack("copy", [t.text("heading", e.content.heading, "h3", { maxWidth: "18rem" })], { align: "flex-start" }), r = t.grid("logos", gr(t, e.content, { minHeight: "4rem" }), [
|
|
9551
9556
|
3,
|
|
9552
9557
|
3,
|
|
9553
9558
|
2
|
|
@@ -9574,7 +9579,7 @@ var hr = (e, t, n, r = {}) => e.box(`item-${n}`, [mr(e, t, n)], {
|
|
|
9574
9579
|
...e.style,
|
|
9575
9580
|
align: "center"
|
|
9576
9581
|
}
|
|
9577
|
-
}), n =
|
|
9582
|
+
}), n = fr(e.content).length, r = Math.min(Math.max(Math.ceil(n / 2), 1), 6), i = fr(e.content).map((n, r) => mr(t, e.content, r, {
|
|
9578
9583
|
backgroundColor: t.tone.card,
|
|
9579
9584
|
minHeight: "6rem",
|
|
9580
9585
|
paddingLeft: "var(--semantic-space-md)",
|
|
@@ -9600,7 +9605,7 @@ var hr = (e, t, n, r = {}) => e.box(`item-${n}`, [mr(e, t, n)], {
|
|
|
9600
9605
|
}
|
|
9601
9606
|
}
|
|
9602
9607
|
]
|
|
9603
|
-
},
|
|
9608
|
+
}, vr = [
|
|
9604
9609
|
{
|
|
9605
9610
|
key: "eyebrow",
|
|
9606
9611
|
label: "Small label above",
|
|
@@ -9680,7 +9685,7 @@ var hr = (e, t, n, r = {}) => e.box(`item-${n}`, [mr(e, t, n)], {
|
|
|
9680
9685
|
}
|
|
9681
9686
|
]
|
|
9682
9687
|
}
|
|
9683
|
-
],
|
|
9688
|
+
], yr = (e) => Array.isArray(e.content.items) ? e.content.items : [], br = (e) => typeof e == "string" ? e.split(/\r?\n/).map((e) => e.trim()).filter(Boolean) : [], xr = (e) => (e?.props && (delete e.props.bind, Object.keys(e.props).length || delete e.props), e), Sr = (e) => e >= 4 ? [
|
|
9684
9689
|
4,
|
|
9685
9690
|
2,
|
|
9686
9691
|
1
|
|
@@ -9697,7 +9702,7 @@ var hr = (e, t, n, r = {}) => e.box(`item-${n}`, [mr(e, t, n)], {
|
|
|
9697
9702
|
1,
|
|
9698
9703
|
1
|
|
9699
9704
|
];
|
|
9700
|
-
function
|
|
9705
|
+
function Cr(e, t = !0) {
|
|
9701
9706
|
let n = k(t ? {
|
|
9702
9707
|
...e,
|
|
9703
9708
|
style: {
|
|
@@ -9717,15 +9722,15 @@ function wr(e, t = !0) {
|
|
|
9717
9722
|
}
|
|
9718
9723
|
});
|
|
9719
9724
|
}
|
|
9720
|
-
function
|
|
9725
|
+
function wr(e) {
|
|
9721
9726
|
let t = e.tone.inverse;
|
|
9722
9727
|
return {
|
|
9723
9728
|
tone: Ge(t ? "canvas" : "primary"),
|
|
9724
9729
|
bg: t ? "var(--color-bg-canvas)" : "var(--color-action-primary-bg)"
|
|
9725
9730
|
};
|
|
9726
9731
|
}
|
|
9727
|
-
function
|
|
9728
|
-
let r =
|
|
9732
|
+
function Tr(e, t, n) {
|
|
9733
|
+
let r = br(n);
|
|
9729
9734
|
if (!r.length) return null;
|
|
9730
9735
|
let i = (n) => ({
|
|
9731
9736
|
id: e.id(`i${t}t${n}`),
|
|
@@ -9743,7 +9748,7 @@ function Er(e, t, n) {
|
|
|
9743
9748
|
flexShrink: 0,
|
|
9744
9749
|
backgroundColor: e.tone.inverse ? e.tone.card : "color-mix(in srgb, var(--color-brand-primary-500) 14%, var(--color-bg-canvas))"
|
|
9745
9750
|
}
|
|
9746
|
-
}), a = r.flatMap((n, r) => [i(r),
|
|
9751
|
+
}), a = r.flatMap((n, r) => [i(r), xr(e.text(`items.${t}.features.${r}`, n, "body", {
|
|
9747
9752
|
color: e.tone.body,
|
|
9748
9753
|
align: "left"
|
|
9749
9754
|
}))]);
|
|
@@ -9757,7 +9762,7 @@ function Er(e, t, n) {
|
|
|
9757
9762
|
flexGrow: 1
|
|
9758
9763
|
});
|
|
9759
9764
|
}
|
|
9760
|
-
function
|
|
9765
|
+
function Er(e, t, n, r = "h1") {
|
|
9761
9766
|
return !n.price?.trim() && !n.period?.trim() ? null : e.row(`items-${t}-priceline`, [e.text(`items.${t}.price`, n.price, r, {
|
|
9762
9767
|
align: "left",
|
|
9763
9768
|
styles: { width: "auto" }
|
|
@@ -9773,7 +9778,7 @@ function Dr(e, t, n, r = "h1") {
|
|
|
9773
9778
|
align: "flex-end"
|
|
9774
9779
|
});
|
|
9775
9780
|
}
|
|
9776
|
-
var
|
|
9781
|
+
var Dr = (e, t) => {
|
|
9777
9782
|
let n = t.content.badge;
|
|
9778
9783
|
return typeof n != "string" || !n.trim() ? null : e.box("badge-wrap", [e.text("badge", n, "eyebrow", {
|
|
9779
9784
|
color: e.tone.accent,
|
|
@@ -9792,15 +9797,15 @@ var Or = (e, t) => {
|
|
|
9792
9797
|
borderColor: e.tone.line
|
|
9793
9798
|
});
|
|
9794
9799
|
};
|
|
9795
|
-
function
|
|
9796
|
-
let i = !!n.highlighted, a =
|
|
9800
|
+
function Or(e, t, n, r = {}) {
|
|
9801
|
+
let i = !!n.highlighted, a = wr(e), o = k(i ? {
|
|
9797
9802
|
...e,
|
|
9798
9803
|
tone: a.tone
|
|
9799
9804
|
} : e), s = r.pad ?? "2rem", c = [
|
|
9800
|
-
i ?
|
|
9805
|
+
i ? Dr(o, e) : null,
|
|
9801
9806
|
o.stack(`items-${t}-top`, [
|
|
9802
9807
|
o.text(`items.${t}.name`, n.name, "h3", { align: "left" }),
|
|
9803
|
-
|
|
9808
|
+
Er(o, t, n, r.big),
|
|
9804
9809
|
o.text(`items.${t}.description`, n.description, "small", {
|
|
9805
9810
|
color: o.tone.muted,
|
|
9806
9811
|
align: "left"
|
|
@@ -9810,7 +9815,7 @@ function kr(e, t, n, r = {}) {
|
|
|
9810
9815
|
align: "flex-start"
|
|
9811
9816
|
}),
|
|
9812
9817
|
o.divider(`items-${t}-rule`),
|
|
9813
|
-
|
|
9818
|
+
Tr(o, t, n.features),
|
|
9814
9819
|
o.button(`items.${t}.cta`, n.cta, "primary")
|
|
9815
9820
|
], l = o.card(`items-${t}-card`, c, {
|
|
9816
9821
|
paddingTop: s,
|
|
@@ -9850,12 +9855,12 @@ function kr(e, t, n, r = {}) {
|
|
|
9850
9855
|
}
|
|
9851
9856
|
} : u;
|
|
9852
9857
|
}
|
|
9853
|
-
var
|
|
9858
|
+
var kr = {
|
|
9854
9859
|
kind: "pricing",
|
|
9855
9860
|
label: "Pricing",
|
|
9856
9861
|
description: "Your plans and prices, side by side, with what each one includes.",
|
|
9857
9862
|
group: "Convert",
|
|
9858
|
-
fields:
|
|
9863
|
+
fields: vr,
|
|
9859
9864
|
defaults: {
|
|
9860
9865
|
eyebrow: "Pricing",
|
|
9861
9866
|
heading: "Simple plans that grow with you",
|
|
@@ -9912,8 +9917,8 @@ var Ar = {
|
|
|
9912
9917
|
"gradient"
|
|
9913
9918
|
],
|
|
9914
9919
|
build(e) {
|
|
9915
|
-
let t = k(e), n =
|
|
9916
|
-
return [t.container([
|
|
9920
|
+
let t = k(e), n = yr(e).slice(0, 4);
|
|
9921
|
+
return [t.container([Cr(e), t.grid("plans", n.map((t, r) => Or(e, r, t, { raise: n.some((e) => e.highlighted) })), Sr(n.length), { styles: { alignItems: "stretch" } })], { gap: "calc(var(--plx-gap) * 2)" })];
|
|
9917
9922
|
}
|
|
9918
9923
|
},
|
|
9919
9924
|
{
|
|
@@ -9926,11 +9931,11 @@ var Ar = {
|
|
|
9926
9931
|
"surface"
|
|
9927
9932
|
],
|
|
9928
9933
|
build(e) {
|
|
9929
|
-
let t = k(e), n =
|
|
9934
|
+
let t = k(e), n = yr(e).slice(0, 2).map((t, n) => Or(e, n, t, {
|
|
9930
9935
|
big: "display",
|
|
9931
9936
|
pad: "2.5rem"
|
|
9932
9937
|
}));
|
|
9933
|
-
return [t.container([
|
|
9938
|
+
return [t.container([Cr(e), t.grid("plans", n, [
|
|
9934
9939
|
2,
|
|
9935
9940
|
1,
|
|
9936
9941
|
1
|
|
@@ -9951,12 +9956,12 @@ var Ar = {
|
|
|
9951
9956
|
"surface"
|
|
9952
9957
|
],
|
|
9953
9958
|
build(e) {
|
|
9954
|
-
let t = k(e), n =
|
|
9955
|
-
let r = !!t.highlighted, i =
|
|
9959
|
+
let t = k(e), n = yr(e).map((t, n) => {
|
|
9960
|
+
let r = !!t.highlighted, i = wr(e), a = k(r ? {
|
|
9956
9961
|
...e,
|
|
9957
9962
|
tone: i.tone
|
|
9958
9963
|
} : e), o = a.stack(`items-${n}-left`, [
|
|
9959
|
-
r ?
|
|
9964
|
+
r ? Dr(a, e) : null,
|
|
9960
9965
|
a.text(`items.${n}.name`, t.name, "h3", { align: "left" }),
|
|
9961
9966
|
a.text(`items.${n}.description`, t.description, "small", {
|
|
9962
9967
|
color: a.tone.muted,
|
|
@@ -9965,7 +9970,7 @@ var Ar = {
|
|
|
9965
9970
|
], {
|
|
9966
9971
|
gap: "var(--semantic-space-sm)",
|
|
9967
9972
|
align: "flex-start"
|
|
9968
|
-
}), s = a.stack(`items-${n}-right`, [
|
|
9973
|
+
}), s = a.stack(`items-${n}-right`, [Er(a, n, t), t.cta?.label ? {
|
|
9969
9974
|
...a.button(`items.${n}.cta`, t.cta, "primary"),
|
|
9970
9975
|
styles: {
|
|
9971
9976
|
...a.button(`items.${n}.cta`, t.cta, "primary").styles,
|
|
@@ -9976,7 +9981,7 @@ var Ar = {
|
|
|
9976
9981
|
align: "stretch"
|
|
9977
9982
|
}), c = a.box(`items-${n}-grid`, [
|
|
9978
9983
|
o,
|
|
9979
|
-
|
|
9984
|
+
Tr(a, n, t.features),
|
|
9980
9985
|
s
|
|
9981
9986
|
], {
|
|
9982
9987
|
layoutMode: "grid",
|
|
@@ -10000,7 +10005,7 @@ var Ar = {
|
|
|
10000
10005
|
} : {}
|
|
10001
10006
|
});
|
|
10002
10007
|
});
|
|
10003
|
-
return [t.container([
|
|
10008
|
+
return [t.container([Cr(e), t.stack("plans", n, {
|
|
10004
10009
|
gap: "var(--semantic-space-md)",
|
|
10005
10010
|
align: "stretch"
|
|
10006
10011
|
})], { gap: "calc(var(--plx-gap) * 2)" })];
|
|
@@ -10022,9 +10027,9 @@ var Ar = {
|
|
|
10022
10027
|
"surface"
|
|
10023
10028
|
],
|
|
10024
10029
|
build(e) {
|
|
10025
|
-
let t = k(e), n =
|
|
10026
|
-
for (let e of n) for (let t of
|
|
10027
|
-
let i = (e, t) =>
|
|
10030
|
+
let t = k(e), n = yr(e).slice(0, 4), r = [];
|
|
10031
|
+
for (let e of n) for (let t of br(e.features)) r.some((e) => e.toLowerCase() === t.toLowerCase()) || r.push(t);
|
|
10032
|
+
let i = (e, t) => br(e.features).some((e) => e.toLowerCase() === t.toLowerCase()), a = [
|
|
10028
10033
|
["", ...n.map((e) => e.name ?? "")],
|
|
10029
10034
|
["Price", ...n.map((e) => [e.price, e.period].filter(Boolean).join(" "))],
|
|
10030
10035
|
...r.map((e) => [e, ...n.map((t) => i(t, e) ? "✓" : "—")])
|
|
@@ -10051,14 +10056,14 @@ var Ar = {
|
|
|
10051
10056
|
justifyItems: "center"
|
|
10052
10057
|
} });
|
|
10053
10058
|
return [t.container([
|
|
10054
|
-
|
|
10059
|
+
Cr(e),
|
|
10055
10060
|
o,
|
|
10056
10061
|
n.some((e) => e.cta?.label) ? s : null
|
|
10057
10062
|
], { gap: "var(--semantic-space-xl)" })];
|
|
10058
10063
|
}
|
|
10059
10064
|
}
|
|
10060
10065
|
]
|
|
10061
|
-
},
|
|
10066
|
+
}, Ar = [
|
|
10062
10067
|
{
|
|
10063
10068
|
key: "heading",
|
|
10064
10069
|
label: "Heading",
|
|
@@ -10093,8 +10098,8 @@ var Ar = {
|
|
|
10093
10098
|
max: 40
|
|
10094
10099
|
}]
|
|
10095
10100
|
}
|
|
10096
|
-
],
|
|
10097
|
-
function
|
|
10101
|
+
], jr = (e) => Array.isArray(e.items) ? e.items : [], Mr = (e) => e <= 4 ? Math.max(e, 1) : e === 5 ? 5 : 3;
|
|
10102
|
+
function Nr(e, t, n, r, i, a = 1.3) {
|
|
10098
10103
|
let o = e.text(`items.${t}.value`, n, "body", {
|
|
10099
10104
|
color: r,
|
|
10100
10105
|
align: i,
|
|
@@ -10110,7 +10115,7 @@ function Pr(e, t, n, r, i, a = 1.3) {
|
|
|
10110
10115
|
responsive: { mobile: { fontSize: "var(--font-size-4xl)" } }
|
|
10111
10116
|
};
|
|
10112
10117
|
}
|
|
10113
|
-
function
|
|
10118
|
+
function Pr(e, t, n) {
|
|
10114
10119
|
let r = n ? "center" : "left", i = [e.text("heading", t.heading, "h2", { align: r }), e.text("text", t.text, "lead", {
|
|
10115
10120
|
align: r,
|
|
10116
10121
|
maxWidth: "36rem"
|
|
@@ -10124,18 +10129,18 @@ function Fr(e, t, n) {
|
|
|
10124
10129
|
}
|
|
10125
10130
|
}) : null;
|
|
10126
10131
|
}
|
|
10127
|
-
var
|
|
10132
|
+
var Fr = (e, t, n, r, i = {}) => {
|
|
10128
10133
|
let a = r ? "center" : "left";
|
|
10129
|
-
return [
|
|
10134
|
+
return [Nr(e, n, t.value, i.valueColor ?? e.tone.accent, a, i.scale), e.text(`items.${n}.label`, t.label, "body", {
|
|
10130
10135
|
color: e.tone.body,
|
|
10131
10136
|
align: a
|
|
10132
10137
|
})];
|
|
10133
|
-
},
|
|
10138
|
+
}, Ir = {
|
|
10134
10139
|
kind: "stats",
|
|
10135
10140
|
label: "Numbers",
|
|
10136
10141
|
description: "A few big numbers that show your track record at a glance.",
|
|
10137
10142
|
group: "Proof",
|
|
10138
|
-
fields:
|
|
10143
|
+
fields: Ar,
|
|
10139
10144
|
defaults: {
|
|
10140
10145
|
heading: "Trusted by people who care about quality",
|
|
10141
10146
|
text: "",
|
|
@@ -10175,13 +10180,13 @@ var Ir = (e, t, n, r, i = {}) => {
|
|
|
10175
10180
|
...e.style,
|
|
10176
10181
|
align: "center"
|
|
10177
10182
|
}
|
|
10178
|
-
}), n =
|
|
10183
|
+
}), n = jr(e.content).map((e, n) => t.stack(`stat-${n}`, Fr(t, e, n, !0), {
|
|
10179
10184
|
gap: "var(--semantic-space-xs)",
|
|
10180
10185
|
align: "center"
|
|
10181
10186
|
}));
|
|
10182
|
-
return [t.container([
|
|
10183
|
-
|
|
10184
|
-
Math.min(
|
|
10187
|
+
return [t.container([Pr(t, e.content, !0), t.grid("items", n, [
|
|
10188
|
+
Mr(n.length),
|
|
10189
|
+
Math.min(Mr(n.length), 2),
|
|
10185
10190
|
2
|
|
10186
10191
|
], { gap: "calc(var(--plx-gap) * 1.5)" })], { gap: "calc(var(--plx-gap) * 2)" })];
|
|
10187
10192
|
}
|
|
@@ -10202,15 +10207,15 @@ var Ir = (e, t, n, r, i = {}) => {
|
|
|
10202
10207
|
...e.style,
|
|
10203
10208
|
align: "center"
|
|
10204
10209
|
}
|
|
10205
|
-
}), n =
|
|
10210
|
+
}), n = jr(e.content).map((e, n) => t.card(`stat-${n}`, Fr(t, e, n, !0, { scale: 1.1 }), {
|
|
10206
10211
|
alignItems: "center",
|
|
10207
10212
|
gap: "var(--semantic-space-xs)",
|
|
10208
10213
|
paddingTop: "2rem",
|
|
10209
10214
|
paddingBottom: "2rem"
|
|
10210
10215
|
}));
|
|
10211
|
-
return [t.container([
|
|
10212
|
-
|
|
10213
|
-
Math.min(
|
|
10216
|
+
return [t.container([Pr(t, e.content, !0), t.grid("items", n, [
|
|
10217
|
+
Mr(n.length),
|
|
10218
|
+
Math.min(Mr(n.length), 2),
|
|
10214
10219
|
1
|
|
10215
10220
|
], { gap: "var(--plx-gap)" })], { gap: "calc(var(--plx-gap) * 2)" })];
|
|
10216
10221
|
}
|
|
@@ -10231,7 +10236,7 @@ var Ir = (e, t, n, r, i = {}) => {
|
|
|
10231
10236
|
...e.style,
|
|
10232
10237
|
align: "left"
|
|
10233
10238
|
}
|
|
10234
|
-
}), n =
|
|
10239
|
+
}), n = jr(e.content).map((e, n) => t.stack(`stat-${n}`, Fr(t, e, n, !1, { scale: 1.1 }), {
|
|
10235
10240
|
gap: "var(--semantic-space-xs)",
|
|
10236
10241
|
styles: {
|
|
10237
10242
|
borderWidth: "2px 0 0 0",
|
|
@@ -10244,7 +10249,7 @@ var Ir = (e, t, n, r, i = {}) => {
|
|
|
10244
10249
|
2,
|
|
10245
10250
|
1
|
|
10246
10251
|
], { gap: "calc(var(--plx-gap) * 1.5)" });
|
|
10247
|
-
return [t.container([t.split("split",
|
|
10252
|
+
return [t.container([t.split("split", Pr(t, e.content, !1) ?? t.box("intro", []), r, { ratio: [1, 1.3] })])];
|
|
10248
10253
|
}
|
|
10249
10254
|
},
|
|
10250
10255
|
{
|
|
@@ -10263,7 +10268,7 @@ var Ir = (e, t, n, r, i = {}) => {
|
|
|
10263
10268
|
...e.style,
|
|
10264
10269
|
align: "center"
|
|
10265
10270
|
}
|
|
10266
|
-
}), n =
|
|
10271
|
+
}), n = jr(e.content).map((e, n) => t.stack(`stat-${n}`, Fr(t, e, n, !0, {
|
|
10267
10272
|
valueColor: t.tone.heading,
|
|
10268
10273
|
scale: 1.5
|
|
10269
10274
|
}), {
|
|
@@ -10275,15 +10280,15 @@ var Ir = (e, t, n, r, i = {}) => {
|
|
|
10275
10280
|
borderColor: t.tone.line
|
|
10276
10281
|
} : {}
|
|
10277
10282
|
}));
|
|
10278
|
-
return [t.container([
|
|
10279
|
-
|
|
10280
|
-
Math.min(
|
|
10283
|
+
return [t.container([Pr(t, e.content, !0), t.grid("items", n, [
|
|
10284
|
+
Mr(n.length),
|
|
10285
|
+
Math.min(Mr(n.length), 2),
|
|
10281
10286
|
2
|
|
10282
10287
|
], { gap: "var(--plx-gap)" })], { gap: "calc(var(--plx-gap) * 2)" })];
|
|
10283
10288
|
}
|
|
10284
10289
|
}
|
|
10285
10290
|
]
|
|
10286
|
-
},
|
|
10291
|
+
}, Lr = [
|
|
10287
10292
|
{
|
|
10288
10293
|
key: "eyebrow",
|
|
10289
10294
|
label: "Small label above",
|
|
@@ -10331,8 +10336,8 @@ var Ir = (e, t, n, r, i = {}) => {
|
|
|
10331
10336
|
}
|
|
10332
10337
|
]
|
|
10333
10338
|
}
|
|
10334
|
-
],
|
|
10335
|
-
function
|
|
10339
|
+
], Rr = (e) => Array.isArray(e.items) ? e.items : [], zr = (e) => e <= 4 ? Math.max(e, 1) : 3, Br = "calc(var(--plx-gap) * 2)";
|
|
10340
|
+
function Vr(e, t, n, r = "44rem") {
|
|
10336
10341
|
let i = n ? "center" : "left", a = [
|
|
10337
10342
|
e.text("eyebrow", t.eyebrow, "eyebrow", { align: i }),
|
|
10338
10343
|
e.text("heading", t.heading, "h2", { align: i }),
|
|
@@ -10350,7 +10355,7 @@ function Hr(e, t, n, r = "44rem") {
|
|
|
10350
10355
|
}
|
|
10351
10356
|
}) : null;
|
|
10352
10357
|
}
|
|
10353
|
-
function
|
|
10358
|
+
function Hr(e, t, n) {
|
|
10354
10359
|
let r = String(t + 1), i = {
|
|
10355
10360
|
id: e.id(`num-${t}`),
|
|
10356
10361
|
type: "paragraph",
|
|
@@ -10389,12 +10394,12 @@ function Ur(e, t, n) {
|
|
|
10389
10394
|
flexShrink: 0
|
|
10390
10395
|
});
|
|
10391
10396
|
}
|
|
10392
|
-
var
|
|
10397
|
+
var Ur = (e, t, n, r, i = "h4") => [e.text(`items.${n}.title`, t.title, i, { align: r }), e.text(`items.${n}.text`, t.text, "body", { align: r })], Wr = {
|
|
10393
10398
|
kind: "steps",
|
|
10394
10399
|
label: "Steps",
|
|
10395
10400
|
description: "“How it works”: a few simple steps from start to finish.",
|
|
10396
10401
|
group: "Content",
|
|
10397
|
-
fields:
|
|
10402
|
+
fields: Lr,
|
|
10398
10403
|
defaults: {
|
|
10399
10404
|
eyebrow: "How it works",
|
|
10400
10405
|
heading: "Up and running in four simple steps",
|
|
@@ -10439,12 +10444,12 @@ var Wr = (e, t, n, r, i = "h4") => [e.text(`items.${n}.title`, t.title, i, { ali
|
|
|
10439
10444
|
"items"
|
|
10440
10445
|
],
|
|
10441
10446
|
build(e) {
|
|
10442
|
-
let t = k(e), n = t.align === "center" ? "center" : "left", r =
|
|
10443
|
-
return [t.container([
|
|
10444
|
-
|
|
10447
|
+
let t = k(e), n = t.align === "center" ? "center" : "left", r = Rr(e.content).map((e, r) => t.stack(`step-${r}`, [Hr(t, r, "badge"), ...Ur(t, e, r, n)], { gap: "var(--semantic-space-sm)" }));
|
|
10448
|
+
return [t.container([Vr(t, e.content, t.align === "center"), t.grid("items", r, [
|
|
10449
|
+
zr(r.length),
|
|
10445
10450
|
2,
|
|
10446
10451
|
1
|
|
10447
|
-
], { gap:
|
|
10452
|
+
], { gap: Br })], { gap: Br })];
|
|
10448
10453
|
}
|
|
10449
10454
|
},
|
|
10450
10455
|
{
|
|
@@ -10469,8 +10474,8 @@ var Wr = (e, t, n, r, i = "h4") => [e.text(`items.${n}.title`, t.title, i, { ali
|
|
|
10469
10474
|
...e.style,
|
|
10470
10475
|
align: "left"
|
|
10471
10476
|
}
|
|
10472
|
-
}), n =
|
|
10473
|
-
let i = t.stack(`rail-${r}`, [
|
|
10477
|
+
}), n = Rr(e.content), r = n.map((e, r) => {
|
|
10478
|
+
let i = t.stack(`rail-${r}`, [Hr(t, r, "badge"), r < n.length - 1 ? t.box(`line-${r}`, [], {
|
|
10474
10479
|
width: "2px",
|
|
10475
10480
|
flexGrow: 1,
|
|
10476
10481
|
minHeight: "1.5rem",
|
|
@@ -10483,7 +10488,7 @@ var Wr = (e, t, n, r, i = "h4") => [e.text(`items.${n}.title`, t.title, i, { ali
|
|
|
10483
10488
|
flexShrink: 0
|
|
10484
10489
|
}
|
|
10485
10490
|
});
|
|
10486
|
-
return t.row(`step-${r}`, [i, t.stack(`copy-${r}`,
|
|
10491
|
+
return t.row(`step-${r}`, [i, t.stack(`copy-${r}`, Ur(t, e, r, "left"), {
|
|
10487
10492
|
gap: "var(--semantic-space-xs)",
|
|
10488
10493
|
styles: {
|
|
10489
10494
|
paddingTop: "0.5rem",
|
|
@@ -10498,7 +10503,7 @@ var Wr = (e, t, n, r, i = "h4") => [e.text(`items.${n}.title`, t.title, i, { ali
|
|
|
10498
10503
|
}), i = t.stack("items", r, {
|
|
10499
10504
|
gap: "0px",
|
|
10500
10505
|
align: "stretch"
|
|
10501
|
-
}), a =
|
|
10506
|
+
}), a = Vr(t, e.content, !1, "26rem");
|
|
10502
10507
|
return [t.container([a ? t.split("split", a, i, {
|
|
10503
10508
|
ratio: [1, 1.3],
|
|
10504
10509
|
align: "flex-start"
|
|
@@ -10521,7 +10526,7 @@ var Wr = (e, t, n, r, i = "h4") => [e.text(`items.${n}.title`, t.title, i, { ali
|
|
|
10521
10526
|
"items"
|
|
10522
10527
|
],
|
|
10523
10528
|
build(e) {
|
|
10524
|
-
let t = k(e), n =
|
|
10529
|
+
let t = k(e), n = Rr(e.content).map((e, n) => t.card(`step-${n}`, [Hr(t, n, "big"), ...Ur(t, e, n, "left")], {
|
|
10525
10530
|
alignItems: "flex-start",
|
|
10526
10531
|
gap: "var(--semantic-space-sm)",
|
|
10527
10532
|
paddingTop: "2rem",
|
|
@@ -10529,11 +10534,11 @@ var Wr = (e, t, n, r, i = "h4") => [e.text(`items.${n}.title`, t.title, i, { ali
|
|
|
10529
10534
|
paddingLeft: "2rem",
|
|
10530
10535
|
paddingRight: "2rem"
|
|
10531
10536
|
}));
|
|
10532
|
-
return [t.container([
|
|
10533
|
-
|
|
10537
|
+
return [t.container([Vr(t, e.content, t.align === "center"), t.grid("items", n, [
|
|
10538
|
+
zr(n.length),
|
|
10534
10539
|
2,
|
|
10535
10540
|
1
|
|
10536
|
-
], { gap: "var(--plx-gap)" })], { gap:
|
|
10541
|
+
], { gap: "var(--plx-gap)" })], { gap: Br })];
|
|
10537
10542
|
}
|
|
10538
10543
|
},
|
|
10539
10544
|
{
|
|
@@ -10552,7 +10557,7 @@ var Wr = (e, t, n, r, i = "h4") => [e.text(`items.${n}.title`, t.title, i, { ali
|
|
|
10552
10557
|
...e.style,
|
|
10553
10558
|
align: "center"
|
|
10554
10559
|
}
|
|
10555
|
-
}), n =
|
|
10560
|
+
}), n = Rr(e.content).map((e, n) => {
|
|
10556
10561
|
let r = {
|
|
10557
10562
|
id: t.id(`label-${n}`),
|
|
10558
10563
|
type: "paragraph",
|
|
@@ -10571,21 +10576,21 @@ var Wr = (e, t, n, r, i = "h4") => [e.text(`items.${n}.title`, t.title, i, { ali
|
|
|
10571
10576
|
size: "26px"
|
|
10572
10577
|
}) : null,
|
|
10573
10578
|
r,
|
|
10574
|
-
...
|
|
10579
|
+
...Ur(t, e, n, "center")
|
|
10575
10580
|
], {
|
|
10576
10581
|
gap: "var(--semantic-space-sm)",
|
|
10577
10582
|
align: "center"
|
|
10578
10583
|
});
|
|
10579
10584
|
});
|
|
10580
|
-
return [t.container([
|
|
10581
|
-
|
|
10585
|
+
return [t.container([Vr(t, e.content, !0), t.grid("items", n, [
|
|
10586
|
+
zr(n.length),
|
|
10582
10587
|
2,
|
|
10583
10588
|
1
|
|
10584
|
-
], { gap:
|
|
10589
|
+
], { gap: Br })], { gap: Br })];
|
|
10585
10590
|
}
|
|
10586
10591
|
}
|
|
10587
10592
|
]
|
|
10588
|
-
},
|
|
10593
|
+
}, Gr = [
|
|
10589
10594
|
{
|
|
10590
10595
|
key: "eyebrow",
|
|
10591
10596
|
label: "Small label above",
|
|
@@ -10639,11 +10644,11 @@ var Wr = (e, t, n, r, i = "h4") => [e.text(`items.${n}.title`, t.title, i, { ali
|
|
|
10639
10644
|
}
|
|
10640
10645
|
]
|
|
10641
10646
|
}
|
|
10642
|
-
],
|
|
10647
|
+
], Kr = "color-mix(in srgb, var(--color-brand-primary-500) 16%, var(--color-bg-canvas))", qr = (e) => Array.isArray(e.content.items) ? e.content.items : [], Jr = (e) => {
|
|
10643
10648
|
let t = (typeof e == "string" ? e : "").trim().split(/\s+/).filter(Boolean);
|
|
10644
10649
|
return t.length ? ((t[0][0] ?? "") + (t.length > 1 ? t[t.length - 1][0] ?? "" : "")).toUpperCase() : "";
|
|
10645
10650
|
};
|
|
10646
|
-
function
|
|
10651
|
+
function Yr(e, t = !1) {
|
|
10647
10652
|
let n = k(t ? {
|
|
10648
10653
|
...e,
|
|
10649
10654
|
style: {
|
|
@@ -10663,7 +10668,7 @@ function Xr(e, t = !1) {
|
|
|
10663
10668
|
}
|
|
10664
10669
|
});
|
|
10665
10670
|
}
|
|
10666
|
-
function
|
|
10671
|
+
function Xr(e, t, n, r = {}) {
|
|
10667
10672
|
let i = n.imageAlt || n.name || "", a = r.circle ? {
|
|
10668
10673
|
width: r.circle,
|
|
10669
10674
|
height: r.circle,
|
|
@@ -10683,7 +10688,7 @@ function Zr(e, t, n, r = {}) {
|
|
|
10683
10688
|
id: e.id(`items-${t}-initials`),
|
|
10684
10689
|
type: "paragraph",
|
|
10685
10690
|
name: "Initials",
|
|
10686
|
-
content:
|
|
10691
|
+
content: Jr(n.name) || "·",
|
|
10687
10692
|
styles: {
|
|
10688
10693
|
textStyle: "h2",
|
|
10689
10694
|
fontSize: r.circle ? `calc(${r.circle} * 0.34)` : "var(--font-size-4xl)",
|
|
@@ -10696,13 +10701,13 @@ function Zr(e, t, n, r = {}) {
|
|
|
10696
10701
|
...a,
|
|
10697
10702
|
alignItems: "center",
|
|
10698
10703
|
justifyContent: "center",
|
|
10699
|
-
backgroundColor: e.tone.inverse ? e.tone.card :
|
|
10704
|
+
backgroundColor: e.tone.inverse ? e.tone.card : Kr,
|
|
10700
10705
|
borderWidth: e.tone.inverse ? "1px" : "0px",
|
|
10701
10706
|
borderStyle: "solid",
|
|
10702
10707
|
borderColor: e.tone.line
|
|
10703
10708
|
});
|
|
10704
10709
|
}
|
|
10705
|
-
function
|
|
10710
|
+
function Zr(e, t, n, r = {}) {
|
|
10706
10711
|
let i = r.center ? "center" : "left";
|
|
10707
10712
|
return e.stack(`items-${t}-words`, [
|
|
10708
10713
|
e.text(`items.${t}.name`, n.name, r.nameStyle ?? "h4", { align: i }),
|
|
@@ -10720,16 +10725,16 @@ function Qr(e, t, n, r = {}) {
|
|
|
10720
10725
|
align: r.center ? "center" : "flex-start"
|
|
10721
10726
|
});
|
|
10722
10727
|
}
|
|
10723
|
-
var
|
|
10728
|
+
var Qr = (e, t = 3) => [
|
|
10724
10729
|
Math.max(1, Math.min(e, t)),
|
|
10725
10730
|
Math.min(e, 2) || 1,
|
|
10726
10731
|
1
|
|
10727
|
-
],
|
|
10732
|
+
], $r = {
|
|
10728
10733
|
kind: "team",
|
|
10729
10734
|
label: "Team",
|
|
10730
10735
|
description: "Introduce the people behind your business.",
|
|
10731
10736
|
group: "Content",
|
|
10732
|
-
fields:
|
|
10737
|
+
fields: Gr,
|
|
10733
10738
|
defaults: {
|
|
10734
10739
|
eyebrow: "Our team",
|
|
10735
10740
|
heading: "Meet the people behind the work",
|
|
@@ -10772,8 +10777,8 @@ var $r = (e, t = 3) => [
|
|
|
10772
10777
|
"surface"
|
|
10773
10778
|
],
|
|
10774
10779
|
build(e) {
|
|
10775
|
-
let t = k(e), n =
|
|
10776
|
-
return [t.container([
|
|
10780
|
+
let t = k(e), n = qr(e), r = n.map((e, n) => t.box(`items-${n}-card`, [Xr(t, n, e, { ratio: "4 / 5" }), Zr(t, n, e)], { gap: "var(--semantic-space-md)" }));
|
|
10781
|
+
return [t.container([Yr(e), t.grid("grid", r, Qr(n.length, 4), { styles: { alignItems: "flex-start" } })], { gap: "var(--semantic-space-xl)" })];
|
|
10777
10782
|
}
|
|
10778
10783
|
},
|
|
10779
10784
|
{
|
|
@@ -10788,7 +10793,7 @@ var $r = (e, t = 3) => [
|
|
|
10788
10793
|
...e.style,
|
|
10789
10794
|
align: "center"
|
|
10790
10795
|
}
|
|
10791
|
-
}), n =
|
|
10796
|
+
}), n = qr(e), r = n.map((e, n) => t.stack(`items-${n}-card`, [Xr(t, n, e, { circle: "8rem" }), Zr(t, n, e, { center: !0 })], {
|
|
10792
10797
|
gap: "var(--semantic-space-md)",
|
|
10793
10798
|
align: "center"
|
|
10794
10799
|
})), i = [
|
|
@@ -10796,7 +10801,7 @@ var $r = (e, t = 3) => [
|
|
|
10796
10801
|
2,
|
|
10797
10802
|
1
|
|
10798
10803
|
];
|
|
10799
|
-
return [t.container([
|
|
10804
|
+
return [t.container([Yr(e, !0), t.grid("grid", r, i, { gap: "var(--semantic-space-xl)" })], { gap: "calc(var(--plx-gap) * 2)" })];
|
|
10800
10805
|
}
|
|
10801
10806
|
},
|
|
10802
10807
|
{
|
|
@@ -10805,8 +10810,8 @@ var $r = (e, t = 3) => [
|
|
|
10805
10810
|
description: "One person per row: picture and name on the left, their story on the right.",
|
|
10806
10811
|
backgrounds: ["canvas", "surface"],
|
|
10807
10812
|
build(e) {
|
|
10808
|
-
let t = k(e), n =
|
|
10809
|
-
let r = t.row(`items-${n}-who`, [
|
|
10813
|
+
let t = k(e), n = qr(e).flatMap((e, n) => {
|
|
10814
|
+
let r = t.row(`items-${n}-who`, [Xr(t, n, e, { circle: "4.5rem" }), t.stack(`items-${n}-id`, [t.text(`items.${n}.name`, e.name, "h4", { align: "left" }), t.text(`items.${n}.role`, e.role, "small", {
|
|
10810
10815
|
color: t.tone.accent,
|
|
10811
10816
|
align: "left",
|
|
10812
10817
|
styles: { fontWeight: "var(--font-weight-semibold)" }
|
|
@@ -10820,7 +10825,7 @@ var $r = (e, t = 3) => [
|
|
|
10820
10825
|
gap: "var(--semantic-space-lg)"
|
|
10821
10826
|
})];
|
|
10822
10827
|
});
|
|
10823
|
-
return [t.container([
|
|
10828
|
+
return [t.container([Yr(e), t.stack("list", n, {
|
|
10824
10829
|
gap: "var(--semantic-space-lg)",
|
|
10825
10830
|
align: "stretch"
|
|
10826
10831
|
})], { gap: "var(--semantic-space-xl)" })];
|
|
@@ -10836,18 +10841,18 @@ var $r = (e, t = 3) => [
|
|
|
10836
10841
|
"inverted"
|
|
10837
10842
|
],
|
|
10838
10843
|
build(e) {
|
|
10839
|
-
let t = k(e), [n, ...r] =
|
|
10840
|
-
if (!n) return [t.container([
|
|
10841
|
-
let i = t.split("feature",
|
|
10844
|
+
let t = k(e), [n, ...r] = qr(e);
|
|
10845
|
+
if (!n) return [t.container([Yr(e)])];
|
|
10846
|
+
let i = t.split("feature", Xr(t, 0, n, {
|
|
10842
10847
|
ratio: "1 / 1",
|
|
10843
10848
|
radius: "var(--radius-2xl)"
|
|
10844
|
-
}),
|
|
10849
|
+
}), Zr(t, 0, n, {
|
|
10845
10850
|
nameStyle: "h3",
|
|
10846
10851
|
bio: "body"
|
|
10847
10852
|
}), {
|
|
10848
10853
|
ratio: [.8, 1],
|
|
10849
10854
|
gap: "calc(var(--plx-gap) * 2)"
|
|
10850
|
-
}), a = r.map((e, n) => t.card(`items-${n + 1}-card`, [t.row(`items-${n + 1}-line`, [
|
|
10855
|
+
}), a = r.map((e, n) => t.card(`items-${n + 1}-card`, [t.row(`items-${n + 1}-line`, [Xr(t, n + 1, e, { circle: "4.5rem" }), Zr(t, n + 1, e, { bio: "small" })], {
|
|
10851
10856
|
gap: "var(--semantic-space-md)",
|
|
10852
10857
|
align: "flex-start"
|
|
10853
10858
|
})], {
|
|
@@ -10861,14 +10866,14 @@ var $r = (e, t = 3) => [
|
|
|
10861
10866
|
1
|
|
10862
10867
|
];
|
|
10863
10868
|
return [t.container([
|
|
10864
|
-
|
|
10869
|
+
Yr(e),
|
|
10865
10870
|
i,
|
|
10866
10871
|
r.length ? t.grid("others", a, o, { styles: { alignItems: "flex-start" } }) : null
|
|
10867
10872
|
], { gap: "calc(var(--plx-gap) * 2)" })];
|
|
10868
10873
|
}
|
|
10869
10874
|
}
|
|
10870
10875
|
]
|
|
10871
|
-
},
|
|
10876
|
+
}, ei = [
|
|
10872
10877
|
{
|
|
10873
10878
|
key: "eyebrow",
|
|
10874
10879
|
label: "Small label above",
|
|
@@ -10916,11 +10921,11 @@ var $r = (e, t = 3) => [
|
|
|
10916
10921
|
}
|
|
10917
10922
|
]
|
|
10918
10923
|
}
|
|
10919
|
-
],
|
|
10924
|
+
], ti = "color-mix(in srgb, var(--color-brand-primary-500) 16%, var(--color-bg-canvas))", ni = (e) => {
|
|
10920
10925
|
let t = (typeof e == "string" ? e : "").trim().split(/\s+/).filter(Boolean);
|
|
10921
10926
|
return t.length ? ((t[0][0] ?? "") + (t.length > 1 ? t[t.length - 1][0] ?? "" : "")).toUpperCase() : "";
|
|
10922
10927
|
};
|
|
10923
|
-
function
|
|
10928
|
+
function ri(e, t, n, r = "3.5rem") {
|
|
10924
10929
|
let i = {
|
|
10925
10930
|
width: r,
|
|
10926
10931
|
height: r,
|
|
@@ -10936,7 +10941,7 @@ function ii(e, t, n, r = "3.5rem") {
|
|
|
10936
10941
|
id: e.id(`items-${t}-initials`),
|
|
10937
10942
|
type: "paragraph",
|
|
10938
10943
|
name: "Initials",
|
|
10939
|
-
content:
|
|
10944
|
+
content: ni(n.name) || "·",
|
|
10940
10945
|
styles: {
|
|
10941
10946
|
textStyle: "h4",
|
|
10942
10947
|
fontSize: `calc(${r} * 0.36)`,
|
|
@@ -10949,13 +10954,13 @@ function ii(e, t, n, r = "3.5rem") {
|
|
|
10949
10954
|
...i,
|
|
10950
10955
|
alignItems: "center",
|
|
10951
10956
|
justifyContent: "center",
|
|
10952
|
-
backgroundColor: e.tone.inverse ? e.tone.card :
|
|
10957
|
+
backgroundColor: e.tone.inverse ? e.tone.card : ti,
|
|
10953
10958
|
borderWidth: e.tone.inverse ? "1px" : "0px",
|
|
10954
10959
|
borderStyle: "solid",
|
|
10955
10960
|
borderColor: e.tone.line
|
|
10956
10961
|
});
|
|
10957
10962
|
}
|
|
10958
|
-
function
|
|
10963
|
+
function ii(e, t, n, r = {}) {
|
|
10959
10964
|
let i = r.center ?? !1, a = e.stack(`items-${t}-who`, [e.text(`items.${t}.name`, n.name, "body", {
|
|
10960
10965
|
color: e.tone.heading,
|
|
10961
10966
|
align: i ? "center" : "left",
|
|
@@ -10970,7 +10975,7 @@ function ai(e, t, n, r = {}) {
|
|
|
10970
10975
|
width: "auto",
|
|
10971
10976
|
flexShrink: 1
|
|
10972
10977
|
}
|
|
10973
|
-
}), o = [r.showAvatar === !1 ? null :
|
|
10978
|
+
}), o = [r.showAvatar === !1 ? null : ri(e, t, n, r.avatarSize), a];
|
|
10974
10979
|
return i ? e.stack(`items-${t}-person`, o, {
|
|
10975
10980
|
gap: "var(--semantic-space-sm)",
|
|
10976
10981
|
align: "center"
|
|
@@ -10979,8 +10984,8 @@ function ai(e, t, n, r = {}) {
|
|
|
10979
10984
|
align: "center"
|
|
10980
10985
|
});
|
|
10981
10986
|
}
|
|
10982
|
-
var
|
|
10983
|
-
function
|
|
10987
|
+
var ai = (e) => Array.isArray(e.content.items) ? e.content.items : [];
|
|
10988
|
+
function oi(e, t = !1) {
|
|
10984
10989
|
let n = k(t ? {
|
|
10985
10990
|
...e,
|
|
10986
10991
|
style: {
|
|
@@ -10996,10 +11001,10 @@ function si(e, t = !1) {
|
|
|
10996
11001
|
}
|
|
10997
11002
|
});
|
|
10998
11003
|
}
|
|
10999
|
-
var
|
|
11004
|
+
var si = (e, t, n = "2rem") => {
|
|
11000
11005
|
let r = e.icon(t, "quote", { size: n });
|
|
11001
11006
|
return delete r.props.bind, r.props.iconName = "quote", r;
|
|
11002
|
-
},
|
|
11007
|
+
}, ci = (e, t, n = {}) => {
|
|
11003
11008
|
let r = e.text("items.0.quote", t, "lead", {
|
|
11004
11009
|
color: e.tone.heading,
|
|
11005
11010
|
...n,
|
|
@@ -11016,18 +11021,18 @@ var ci = (e, t, n = "2rem") => {
|
|
|
11016
11021
|
mobile: { fontSize: "var(--font-size-xl)" }
|
|
11017
11022
|
}
|
|
11018
11023
|
};
|
|
11019
|
-
},
|
|
11020
|
-
|
|
11024
|
+
}, li = (e, t, n, r = {}) => e.card(`items-${t}-card`, [
|
|
11025
|
+
si(e, `mark-${t}`, "1.75rem"),
|
|
11021
11026
|
e.text(`items.${t}.quote`, n.quote, r.quoteStyle ?? "body", {
|
|
11022
11027
|
color: e.tone.heading,
|
|
11023
11028
|
styles: { flexGrow: 1 }
|
|
11024
11029
|
}),
|
|
11025
|
-
|
|
11030
|
+
ii(e, t, n)
|
|
11026
11031
|
], {
|
|
11027
11032
|
justifyContent: "space-between",
|
|
11028
11033
|
gap: "var(--semantic-space-lg)",
|
|
11029
11034
|
...r.styles ?? {}
|
|
11030
|
-
}),
|
|
11035
|
+
}), ui = (e) => e >= 3 ? [
|
|
11031
11036
|
3,
|
|
11032
11037
|
2,
|
|
11033
11038
|
1
|
|
@@ -11039,12 +11044,12 @@ var ci = (e, t, n = "2rem") => {
|
|
|
11039
11044
|
1,
|
|
11040
11045
|
1,
|
|
11041
11046
|
1
|
|
11042
|
-
],
|
|
11047
|
+
], di = {
|
|
11043
11048
|
kind: "testimonials",
|
|
11044
11049
|
label: "Testimonials",
|
|
11045
11050
|
description: "What happy customers say about you — builds trust at a glance.",
|
|
11046
11051
|
group: "Proof",
|
|
11047
|
-
fields:
|
|
11052
|
+
fields: ei,
|
|
11048
11053
|
defaults: {
|
|
11049
11054
|
eyebrow: "Kind words",
|
|
11050
11055
|
heading: "Loved by the people we work with",
|
|
@@ -11106,15 +11111,15 @@ var ci = (e, t, n = "2rem") => {
|
|
|
11106
11111
|
...e.style,
|
|
11107
11112
|
align: "center"
|
|
11108
11113
|
}
|
|
11109
|
-
}), n =
|
|
11110
|
-
if (!n) return [t.container([
|
|
11114
|
+
}), n = ai(e)[0];
|
|
11115
|
+
if (!n) return [t.container([oi(e, !0)])];
|
|
11111
11116
|
let r = t.stack("feature", [
|
|
11112
|
-
|
|
11113
|
-
|
|
11117
|
+
si(t, "mark-0", "2.5rem"),
|
|
11118
|
+
ci(t, n.quote, {
|
|
11114
11119
|
align: "center",
|
|
11115
11120
|
maxWidth: "44rem"
|
|
11116
11121
|
}),
|
|
11117
|
-
|
|
11122
|
+
ii(t, 0, n, {
|
|
11118
11123
|
center: !0,
|
|
11119
11124
|
avatarSize: "4rem"
|
|
11120
11125
|
})
|
|
@@ -11122,7 +11127,7 @@ var ci = (e, t, n = "2rem") => {
|
|
|
11122
11127
|
gap: "var(--semantic-space-lg)",
|
|
11123
11128
|
align: "center"
|
|
11124
11129
|
});
|
|
11125
|
-
return [t.container([
|
|
11130
|
+
return [t.container([oi(e, !0), r], {
|
|
11126
11131
|
alignItems: "center",
|
|
11127
11132
|
gap: "var(--semantic-space-xl)"
|
|
11128
11133
|
})];
|
|
@@ -11138,8 +11143,8 @@ var ci = (e, t, n = "2rem") => {
|
|
|
11138
11143
|
"surface"
|
|
11139
11144
|
],
|
|
11140
11145
|
build(e) {
|
|
11141
|
-
let t = k(e), n =
|
|
11142
|
-
return [t.container([
|
|
11146
|
+
let t = k(e), n = ai(e).slice(0, 6), r = t.grid("grid", n.map((e, n) => li(t, n, e)), ui(n.length));
|
|
11147
|
+
return [t.container([oi(e), r], { gap: "var(--semantic-space-xl)" })];
|
|
11143
11148
|
}
|
|
11144
11149
|
},
|
|
11145
11150
|
{
|
|
@@ -11148,12 +11153,12 @@ var ci = (e, t, n = "2rem") => {
|
|
|
11148
11153
|
description: "A tidy list: who said it on the left, their words on the right.",
|
|
11149
11154
|
backgrounds: ["canvas", "surface"],
|
|
11150
11155
|
build(e) {
|
|
11151
|
-
let t = k(e), n =
|
|
11156
|
+
let t = k(e), n = ai(e).flatMap((e, n) => [n > 0 ? t.divider(`rule-${n}`) : null, t.split(`row-${n}`, ii(t, n, e, { avatarSize: "4rem" }), t.stack(`items-${n}-words`, [t.text(`items.${n}.quote`, e.quote, "lead", { color: t.tone.heading })], { align: "flex-start" }), {
|
|
11152
11157
|
ratio: [1, 2.2],
|
|
11153
11158
|
align: "flex-start",
|
|
11154
11159
|
gap: "var(--semantic-space-lg)"
|
|
11155
11160
|
})]);
|
|
11156
|
-
return [t.container([
|
|
11161
|
+
return [t.container([oi(e), t.stack("list", n, {
|
|
11157
11162
|
gap: "var(--semantic-space-xl)",
|
|
11158
11163
|
align: "stretch"
|
|
11159
11164
|
})], { gap: "var(--semantic-space-xl)" })];
|
|
@@ -11165,8 +11170,8 @@ var ci = (e, t, n = "2rem") => {
|
|
|
11165
11170
|
description: "A relaxed, staggered wall of cards — great when you have lots of quotes.",
|
|
11166
11171
|
backgrounds: ["sunken", "canvas"],
|
|
11167
11172
|
build(e) {
|
|
11168
|
-
let t = k(e), n =
|
|
11169
|
-
let r =
|
|
11173
|
+
let t = k(e), n = ai(e).map((e, n) => {
|
|
11174
|
+
let r = li(t, n, e, { styles: { justifyContent: "flex-start" } });
|
|
11170
11175
|
return n % 3 == 1 ? {
|
|
11171
11176
|
...r,
|
|
11172
11177
|
styles: {
|
|
@@ -11179,7 +11184,7 @@ var ci = (e, t, n = "2rem") => {
|
|
|
11179
11184
|
}
|
|
11180
11185
|
} : r;
|
|
11181
11186
|
});
|
|
11182
|
-
return [t.container([
|
|
11187
|
+
return [t.container([oi(e), t.grid("wall", n, [
|
|
11183
11188
|
3,
|
|
11184
11189
|
2,
|
|
11185
11190
|
1
|
|
@@ -11196,30 +11201,30 @@ var ci = (e, t, n = "2rem") => {
|
|
|
11196
11201
|
"sunken"
|
|
11197
11202
|
],
|
|
11198
11203
|
build(e) {
|
|
11199
|
-
let t = k(e), [n, ...r] =
|
|
11200
|
-
if (!n) return [t.container([
|
|
11204
|
+
let t = k(e), [n, ...r] = ai(e);
|
|
11205
|
+
if (!n) return [t.container([oi(e)])];
|
|
11201
11206
|
let i = t.stack("feature", [
|
|
11202
|
-
|
|
11203
|
-
|
|
11204
|
-
|
|
11207
|
+
si(t, "mark-0", "2.5rem"),
|
|
11208
|
+
ci(t, n.quote),
|
|
11209
|
+
ii(t, 0, n, { avatarSize: "4rem" })
|
|
11205
11210
|
], {
|
|
11206
11211
|
gap: "var(--semantic-space-lg)",
|
|
11207
11212
|
align: "flex-start"
|
|
11208
|
-
}), a = t.stack("others", r.slice(0, 3).map((e, n) =>
|
|
11213
|
+
}), a = t.stack("others", r.slice(0, 3).map((e, n) => li(t, n + 1, e, { styles: {
|
|
11209
11214
|
paddingTop: "1.25rem",
|
|
11210
11215
|
paddingBottom: "1.25rem"
|
|
11211
11216
|
} })), {
|
|
11212
11217
|
gap: "var(--semantic-space-md)",
|
|
11213
11218
|
align: "stretch"
|
|
11214
11219
|
});
|
|
11215
|
-
return [t.container([
|
|
11220
|
+
return [t.container([oi(e), r.length ? t.split("split", i, a, {
|
|
11216
11221
|
ratio: [1.2, 1],
|
|
11217
11222
|
align: "flex-start"
|
|
11218
11223
|
}) : i], { gap: "var(--semantic-space-xl)" })];
|
|
11219
11224
|
}
|
|
11220
11225
|
}
|
|
11221
11226
|
]
|
|
11222
|
-
},
|
|
11227
|
+
}, fi = [
|
|
11223
11228
|
{
|
|
11224
11229
|
key: "eyebrow",
|
|
11225
11230
|
label: "Small label above",
|
|
@@ -11256,7 +11261,7 @@ var ci = (e, t, n = "2rem") => {
|
|
|
11256
11261
|
type: "button",
|
|
11257
11262
|
hint: "Optional — leave the text empty to hide it."
|
|
11258
11263
|
}
|
|
11259
|
-
],
|
|
11264
|
+
], pi = (e, t, n = {}) => ({
|
|
11260
11265
|
id: e.id("video"),
|
|
11261
11266
|
type: "video",
|
|
11262
11267
|
name: "Video",
|
|
@@ -11273,29 +11278,29 @@ var ci = (e, t, n = "2rem") => {
|
|
|
11273
11278
|
boxShadow: "var(--shadow-lg)",
|
|
11274
11279
|
...n
|
|
11275
11280
|
}
|
|
11276
|
-
}),
|
|
11281
|
+
}), mi = (e, t, n = {}) => [
|
|
11277
11282
|
e.text("eyebrow", t.eyebrow, "eyebrow"),
|
|
11278
11283
|
e.text("heading", t.heading, "h2"),
|
|
11279
11284
|
e.text("text", t.text, "lead", n.lead === !1 ? {} : { maxWidth: "38rem" }),
|
|
11280
11285
|
e.button("cta", t.cta, "primary")
|
|
11281
|
-
],
|
|
11286
|
+
], hi = (e) => (t) => {
|
|
11282
11287
|
let n = k({
|
|
11283
11288
|
...t,
|
|
11284
11289
|
style: {
|
|
11285
11290
|
...t.style,
|
|
11286
11291
|
align: "left"
|
|
11287
11292
|
}
|
|
11288
|
-
}), r = n.stack("copy",
|
|
11293
|
+
}), r = n.stack("copy", mi(n, t.content), {
|
|
11289
11294
|
gap: "var(--semantic-space-md)",
|
|
11290
11295
|
align: "flex-start"
|
|
11291
|
-
}), i =
|
|
11296
|
+
}), i = pi(n, t.content);
|
|
11292
11297
|
return [n.container([n.split("split", e ? i : r, e ? r : i, { ratio: e ? [1.35, 1] : [1, 1.35] })])];
|
|
11293
|
-
},
|
|
11298
|
+
}, gi = {
|
|
11294
11299
|
kind: "video",
|
|
11295
11300
|
label: "Video",
|
|
11296
11301
|
description: "Show a video — a welcome, a product tour, a story.",
|
|
11297
11302
|
group: "Content",
|
|
11298
|
-
fields:
|
|
11303
|
+
fields: fi,
|
|
11299
11304
|
defaults: {
|
|
11300
11305
|
eyebrow: "See it in action",
|
|
11301
11306
|
heading: "Watch how it works in two minutes",
|
|
@@ -11333,7 +11338,7 @@ var ci = (e, t, n = "2rem") => {
|
|
|
11333
11338
|
});
|
|
11334
11339
|
return [t.container([
|
|
11335
11340
|
n.eyebrow || n.heading || n.text ? r : null,
|
|
11336
|
-
|
|
11341
|
+
pi(t, n, {
|
|
11337
11342
|
maxWidth: "58rem",
|
|
11338
11343
|
margin: "0 auto"
|
|
11339
11344
|
}),
|
|
@@ -11349,14 +11354,14 @@ var ci = (e, t, n = "2rem") => {
|
|
|
11349
11354
|
label: "Text left, video right",
|
|
11350
11355
|
description: "Words on one side, the video on the other.",
|
|
11351
11356
|
backgrounds: ["canvas", "sunken"],
|
|
11352
|
-
build:
|
|
11357
|
+
build: hi(!1)
|
|
11353
11358
|
},
|
|
11354
11359
|
{
|
|
11355
11360
|
id: "video-left",
|
|
11356
11361
|
label: "Video left, text right",
|
|
11357
11362
|
description: "The same, mirrored.",
|
|
11358
11363
|
backgrounds: ["canvas", "sunken"],
|
|
11359
|
-
build:
|
|
11364
|
+
build: hi(!0)
|
|
11360
11365
|
},
|
|
11361
11366
|
{
|
|
11362
11367
|
id: "band",
|
|
@@ -11374,7 +11379,7 @@ var ci = (e, t, n = "2rem") => {
|
|
|
11374
11379
|
...e.style,
|
|
11375
11380
|
align: "center"
|
|
11376
11381
|
}
|
|
11377
|
-
}), n = e.content, r = t.stack("copy", [...
|
|
11382
|
+
}), n = e.content, r = t.stack("copy", [...mi(t, n, { lead: !0 }).slice(0, 3)], {
|
|
11378
11383
|
gap: "var(--semantic-space-sm)",
|
|
11379
11384
|
align: "center",
|
|
11380
11385
|
styles: {
|
|
@@ -11384,7 +11389,7 @@ var ci = (e, t, n = "2rem") => {
|
|
|
11384
11389
|
});
|
|
11385
11390
|
return [t.container([
|
|
11386
11391
|
n.eyebrow || n.heading || n.text ? r : null,
|
|
11387
|
-
|
|
11392
|
+
pi(t, n, { borderRadius: "var(--radius-xl)" }),
|
|
11388
11393
|
n.cta?.label ? t.stack("action", [t.button("cta", n.cta, e.style.background === "inverted" ? "secondary" : "primary")], { align: "center" }) : null
|
|
11389
11394
|
], {
|
|
11390
11395
|
gap: "var(--semantic-space-xl)",
|
|
@@ -11394,7 +11399,7 @@ var ci = (e, t, n = "2rem") => {
|
|
|
11394
11399
|
}
|
|
11395
11400
|
}
|
|
11396
11401
|
]
|
|
11397
|
-
},
|
|
11402
|
+
}, I = (e, t, n, r = {}, i = {}) => ({
|
|
11398
11403
|
id: e.id(t),
|
|
11399
11404
|
type: n,
|
|
11400
11405
|
name: Bt(n),
|
|
@@ -11406,14 +11411,14 @@ var ci = (e, t, n = "2rem") => {
|
|
|
11406
11411
|
width: "100%",
|
|
11407
11412
|
...i
|
|
11408
11413
|
}
|
|
11409
|
-
}),
|
|
11414
|
+
}), L = (e, t, n = {}) => {
|
|
11410
11415
|
let r = [
|
|
11411
11416
|
e.text("eyebrow", t.eyebrow, "eyebrow"),
|
|
11412
11417
|
e.text("heading", t.heading, "h2"),
|
|
11413
11418
|
e.text("text", t.text, "lead", { maxWidth: n.maxWidth ?? "40rem" })
|
|
11414
11419
|
].filter((e) => !!e);
|
|
11415
11420
|
return r.length ? e.stack("copy", r, { gap: "var(--semantic-space-sm)" }) : null;
|
|
11416
|
-
},
|
|
11421
|
+
}, _i = {
|
|
11417
11422
|
kind: "blogList",
|
|
11418
11423
|
label: "Blog post list",
|
|
11419
11424
|
description: "Shows your latest blog posts — they fill in by themselves as you write.",
|
|
@@ -11457,7 +11462,7 @@ var ci = (e, t, n = "2rem") => {
|
|
|
11457
11462
|
align: "center"
|
|
11458
11463
|
}
|
|
11459
11464
|
});
|
|
11460
|
-
return [t.container([
|
|
11465
|
+
return [t.container([L(t, e.content), I(t, "posts", "blogPostList")], {
|
|
11461
11466
|
alignItems: "center",
|
|
11462
11467
|
gap: "var(--semantic-space-xl)"
|
|
11463
11468
|
})];
|
|
@@ -11476,7 +11481,7 @@ var ci = (e, t, n = "2rem") => {
|
|
|
11476
11481
|
align: "left"
|
|
11477
11482
|
}
|
|
11478
11483
|
});
|
|
11479
|
-
return [t.container([
|
|
11484
|
+
return [t.container([L(t, e.content), I(t, "posts", "blogPostList")], { gap: "var(--semantic-space-xl)" })];
|
|
11480
11485
|
}
|
|
11481
11486
|
},
|
|
11482
11487
|
{
|
|
@@ -11492,31 +11497,31 @@ var ci = (e, t, n = "2rem") => {
|
|
|
11492
11497
|
align: "left"
|
|
11493
11498
|
}
|
|
11494
11499
|
});
|
|
11495
|
-
return [t.container([t.split("split", t.stack("copy-col", [
|
|
11500
|
+
return [t.container([t.split("split", t.stack("copy-col", [L(t, e.content)], { align: "flex-start" }), I(t, "posts", "blogPostList"), {
|
|
11496
11501
|
ratio: [1, 2],
|
|
11497
11502
|
align: "flex-start"
|
|
11498
11503
|
})])];
|
|
11499
11504
|
}
|
|
11500
11505
|
}
|
|
11501
11506
|
]
|
|
11502
|
-
},
|
|
11507
|
+
}, vi = [{
|
|
11503
11508
|
key: "back",
|
|
11504
11509
|
label: "Link back to the blog",
|
|
11505
11510
|
type: "button",
|
|
11506
11511
|
hint: "Leave the text empty to hide it."
|
|
11507
|
-
}],
|
|
11508
|
-
|
|
11509
|
-
|
|
11510
|
-
|
|
11512
|
+
}], yi = (e) => e.row("meta", [
|
|
11513
|
+
I(e, "author", "blogAuthor", { prefix: "By " }, { width: "auto" }),
|
|
11514
|
+
I(e, "date", "blogDate", {}, { width: "auto" }),
|
|
11515
|
+
I(e, "topics", "blogCategories", {}, { width: "auto" })
|
|
11511
11516
|
], {
|
|
11512
11517
|
gap: "var(--semantic-space-lg)",
|
|
11513
11518
|
wrap: !0
|
|
11514
|
-
}),
|
|
11519
|
+
}), bi = {
|
|
11515
11520
|
kind: "blogArticle",
|
|
11516
11521
|
label: "Blog article",
|
|
11517
11522
|
description: "The page every blog post uses: title, picture, text and comments, filled in from each post.",
|
|
11518
11523
|
group: "Blog",
|
|
11519
|
-
fields:
|
|
11524
|
+
fields: vi,
|
|
11520
11525
|
defaults: { back: {
|
|
11521
11526
|
label: "Back to all posts",
|
|
11522
11527
|
href: "/blog"
|
|
@@ -11537,11 +11542,11 @@ var ci = (e, t, n = "2rem") => {
|
|
|
11537
11542
|
});
|
|
11538
11543
|
return [t.container([
|
|
11539
11544
|
t.button("back", e.content.back, "ghost"),
|
|
11540
|
-
|
|
11541
|
-
|
|
11542
|
-
|
|
11543
|
-
|
|
11544
|
-
|
|
11545
|
+
I(t, "title", "blogTitle"),
|
|
11546
|
+
yi(t),
|
|
11547
|
+
I(t, "picture", "blogFeaturedImage"),
|
|
11548
|
+
I(t, "body", "blogContent"),
|
|
11549
|
+
I(t, "comments", "blogComments")
|
|
11545
11550
|
], {
|
|
11546
11551
|
maxWidth: "48rem",
|
|
11547
11552
|
gap: "var(--semantic-space-lg)"
|
|
@@ -11562,10 +11567,10 @@ var ci = (e, t, n = "2rem") => {
|
|
|
11562
11567
|
}
|
|
11563
11568
|
}), n = t.stack("article", [
|
|
11564
11569
|
t.button("back", e.content.back, "ghost"),
|
|
11565
|
-
|
|
11566
|
-
|
|
11567
|
-
|
|
11568
|
-
|
|
11570
|
+
I(t, "title", "blogTitle"),
|
|
11571
|
+
yi(t),
|
|
11572
|
+
I(t, "body", "blogContent"),
|
|
11573
|
+
I(t, "comments", "blogComments")
|
|
11569
11574
|
], {
|
|
11570
11575
|
align: "stretch",
|
|
11571
11576
|
gap: "var(--semantic-space-lg)",
|
|
@@ -11574,7 +11579,7 @@ var ci = (e, t, n = "2rem") => {
|
|
|
11574
11579
|
margin: "0 auto"
|
|
11575
11580
|
}
|
|
11576
11581
|
});
|
|
11577
|
-
return [t.container([
|
|
11582
|
+
return [t.container([I(t, "picture", "blogFeaturedImage"), n], { gap: "var(--semantic-space-xl)" })];
|
|
11578
11583
|
}
|
|
11579
11584
|
},
|
|
11580
11585
|
{
|
|
@@ -11589,7 +11594,7 @@ var ci = (e, t, n = "2rem") => {
|
|
|
11589
11594
|
...e.style,
|
|
11590
11595
|
align: "center"
|
|
11591
11596
|
}
|
|
11592
|
-
}), n = t.stack("head", [
|
|
11597
|
+
}), n = t.stack("head", [I(t, "title", "blogTitle"), t.row("meta", [I(t, "author", "blogAuthor", { prefix: "By " }, { width: "auto" }), I(t, "date", "blogDate", {}, { width: "auto" })], {
|
|
11593
11598
|
gap: "var(--semantic-space-lg)",
|
|
11594
11599
|
justify: "center",
|
|
11595
11600
|
wrap: !0
|
|
@@ -11597,12 +11602,12 @@ var ci = (e, t, n = "2rem") => {
|
|
|
11597
11602
|
return [t.container([
|
|
11598
11603
|
t.button("back", e.content.back, "ghost"),
|
|
11599
11604
|
n,
|
|
11600
|
-
|
|
11601
|
-
|
|
11605
|
+
I(t, "picture", "blogFeaturedImage"),
|
|
11606
|
+
I(t, "body", "blogContent", {}, {
|
|
11602
11607
|
maxWidth: "48rem",
|
|
11603
11608
|
margin: "0 auto"
|
|
11604
11609
|
}),
|
|
11605
|
-
|
|
11610
|
+
I(t, "comments", "blogComments", {}, {
|
|
11606
11611
|
maxWidth: "48rem",
|
|
11607
11612
|
margin: "0 auto"
|
|
11608
11613
|
})
|
|
@@ -11627,10 +11632,10 @@ var ci = (e, t, n = "2rem") => {
|
|
|
11627
11632
|
});
|
|
11628
11633
|
return [t.container([
|
|
11629
11634
|
t.button("back", e.content.back, "ghost"),
|
|
11630
|
-
|
|
11631
|
-
|
|
11632
|
-
|
|
11633
|
-
|
|
11635
|
+
I(t, "title", "blogTitle"),
|
|
11636
|
+
yi(t),
|
|
11637
|
+
I(t, "body", "blogContent"),
|
|
11638
|
+
I(t, "comments", "blogComments")
|
|
11634
11639
|
], {
|
|
11635
11640
|
maxWidth: "44rem",
|
|
11636
11641
|
gap: "var(--semantic-space-lg)"
|
|
@@ -11638,7 +11643,7 @@ var ci = (e, t, n = "2rem") => {
|
|
|
11638
11643
|
}
|
|
11639
11644
|
}
|
|
11640
11645
|
]
|
|
11641
|
-
},
|
|
11646
|
+
}, xi = {
|
|
11642
11647
|
kind: "shop",
|
|
11643
11648
|
label: "Shop",
|
|
11644
11649
|
description: "Your products, filled in from your store — the whole shop, or a small hand-picked selection.",
|
|
@@ -11692,7 +11697,7 @@ var ci = (e, t, n = "2rem") => {
|
|
|
11692
11697
|
align: "center"
|
|
11693
11698
|
}
|
|
11694
11699
|
});
|
|
11695
|
-
return [t.container([
|
|
11700
|
+
return [t.container([L(t, e.content), I(t, "shop", "shopGrid", {
|
|
11696
11701
|
storeMode: !0,
|
|
11697
11702
|
itemsPerRow: 3
|
|
11698
11703
|
})], {
|
|
@@ -11715,8 +11720,8 @@ var ci = (e, t, n = "2rem") => {
|
|
|
11715
11720
|
}
|
|
11716
11721
|
});
|
|
11717
11722
|
return [t.container([
|
|
11718
|
-
|
|
11719
|
-
|
|
11723
|
+
L(t, e.content),
|
|
11724
|
+
I(t, "shop", "shopGrid", {
|
|
11720
11725
|
storeMode: !1,
|
|
11721
11726
|
category: "best_seller",
|
|
11722
11727
|
limit: 3,
|
|
@@ -11743,8 +11748,8 @@ var ci = (e, t, n = "2rem") => {
|
|
|
11743
11748
|
}
|
|
11744
11749
|
});
|
|
11745
11750
|
return [t.container([
|
|
11746
|
-
|
|
11747
|
-
|
|
11751
|
+
L(t, e.content),
|
|
11752
|
+
I(t, "shop", "shopGrid", {
|
|
11748
11753
|
storeMode: !1,
|
|
11749
11754
|
category: "most_recent",
|
|
11750
11755
|
limit: 4,
|
|
@@ -11755,7 +11760,7 @@ var ci = (e, t, n = "2rem") => {
|
|
|
11755
11760
|
}
|
|
11756
11761
|
}
|
|
11757
11762
|
]
|
|
11758
|
-
},
|
|
11763
|
+
}, Si = {
|
|
11759
11764
|
kind: "productPage",
|
|
11760
11765
|
label: "Product page",
|
|
11761
11766
|
description: "The page every product uses: pictures, price and a buy button, filled in from each product.",
|
|
@@ -11791,7 +11796,7 @@ var ci = (e, t, n = "2rem") => {
|
|
|
11791
11796
|
align: "left"
|
|
11792
11797
|
}
|
|
11793
11798
|
});
|
|
11794
|
-
return [t.container([t.button("back", e.content.back, "ghost"),
|
|
11799
|
+
return [t.container([t.button("back", e.content.back, "ghost"), I(t, "product", "product", { mode: "detail" })], { gap: "var(--semantic-space-lg)" })];
|
|
11795
11800
|
}
|
|
11796
11801
|
}, {
|
|
11797
11802
|
id: "with-more",
|
|
@@ -11805,10 +11810,10 @@ var ci = (e, t, n = "2rem") => {
|
|
|
11805
11810
|
...e.style,
|
|
11806
11811
|
align: "left"
|
|
11807
11812
|
}
|
|
11808
|
-
}), n = t.stack("top", [t.button("back", e.content.back, "ghost"),
|
|
11813
|
+
}), n = t.stack("top", [t.button("back", e.content.back, "ghost"), I(t, "product", "product", { mode: "detail" })], {
|
|
11809
11814
|
align: "stretch",
|
|
11810
11815
|
gap: "var(--semantic-space-lg)"
|
|
11811
|
-
}), r = t.stack("related", [t.text("relatedHeading", e.content.relatedHeading, "h3"),
|
|
11816
|
+
}), r = t.stack("related", [t.text("relatedHeading", e.content.relatedHeading, "h3"), I(t, "more", "shopGrid", {
|
|
11812
11817
|
storeMode: !1,
|
|
11813
11818
|
category: "most_recent",
|
|
11814
11819
|
limit: 3,
|
|
@@ -11820,6 +11825,100 @@ var ci = (e, t, n = "2rem") => {
|
|
|
11820
11825
|
return [t.container([n, r], { gap: "var(--semantic-space-xl)" })];
|
|
11821
11826
|
}
|
|
11822
11827
|
}]
|
|
11828
|
+
}, Ci = {
|
|
11829
|
+
kind: "productOffer",
|
|
11830
|
+
label: "Sell a product",
|
|
11831
|
+
description: "Sell one product on this page — a heading and a buy-now card that takes payment right here.",
|
|
11832
|
+
group: "Store",
|
|
11833
|
+
fields: [
|
|
11834
|
+
{
|
|
11835
|
+
key: "eyebrow",
|
|
11836
|
+
label: "Small label above",
|
|
11837
|
+
type: "text",
|
|
11838
|
+
max: 40
|
|
11839
|
+
},
|
|
11840
|
+
{
|
|
11841
|
+
key: "heading",
|
|
11842
|
+
label: "Heading",
|
|
11843
|
+
type: "text",
|
|
11844
|
+
max: 90
|
|
11845
|
+
},
|
|
11846
|
+
{
|
|
11847
|
+
key: "text",
|
|
11848
|
+
label: "Text",
|
|
11849
|
+
type: "longtext",
|
|
11850
|
+
max: 300
|
|
11851
|
+
},
|
|
11852
|
+
{
|
|
11853
|
+
key: "productId",
|
|
11854
|
+
label: "Product to sell",
|
|
11855
|
+
type: "product",
|
|
11856
|
+
hint: "Visitors can buy it right here, without leaving the page."
|
|
11857
|
+
}
|
|
11858
|
+
],
|
|
11859
|
+
defaults: {
|
|
11860
|
+
eyebrow: "",
|
|
11861
|
+
heading: "Get it today",
|
|
11862
|
+
text: "",
|
|
11863
|
+
productId: ""
|
|
11864
|
+
},
|
|
11865
|
+
variants: [{
|
|
11866
|
+
id: "centered",
|
|
11867
|
+
label: "Centred",
|
|
11868
|
+
description: "A short introduction, then the buy-now card in the middle.",
|
|
11869
|
+
backgrounds: [
|
|
11870
|
+
"canvas",
|
|
11871
|
+
"surface",
|
|
11872
|
+
"sunken"
|
|
11873
|
+
],
|
|
11874
|
+
build(e) {
|
|
11875
|
+
let t = k({
|
|
11876
|
+
...e,
|
|
11877
|
+
style: {
|
|
11878
|
+
...e.style,
|
|
11879
|
+
align: "center"
|
|
11880
|
+
}
|
|
11881
|
+
});
|
|
11882
|
+
return [t.container([L(t, e.content), t.stack("offer-wrap", [I(t, "offer", "product", {
|
|
11883
|
+
productId: e.content.productId,
|
|
11884
|
+
mode: "buy"
|
|
11885
|
+
})], {
|
|
11886
|
+
align: "stretch",
|
|
11887
|
+
styles: { maxWidth: "32rem" }
|
|
11888
|
+
})], {
|
|
11889
|
+
alignItems: "center",
|
|
11890
|
+
gap: "var(--semantic-space-xl)"
|
|
11891
|
+
})];
|
|
11892
|
+
}
|
|
11893
|
+
}, {
|
|
11894
|
+
id: "split",
|
|
11895
|
+
label: "Words and card side by side",
|
|
11896
|
+
description: "Your words on the left, the buy-now card on the right.",
|
|
11897
|
+
backgrounds: [
|
|
11898
|
+
"canvas",
|
|
11899
|
+
"surface",
|
|
11900
|
+
"sunken"
|
|
11901
|
+
],
|
|
11902
|
+
build(e) {
|
|
11903
|
+
let t = k({
|
|
11904
|
+
...e,
|
|
11905
|
+
style: {
|
|
11906
|
+
...e.style,
|
|
11907
|
+
align: "left"
|
|
11908
|
+
}
|
|
11909
|
+
}), n = I(t, "offer", "product", {
|
|
11910
|
+
productId: e.content.productId,
|
|
11911
|
+
mode: "buy"
|
|
11912
|
+
}), r = L(t, e.content);
|
|
11913
|
+
return [t.container([r ? t.split("split", r, n, { ratio: [1, 1] }) : t.stack("offer-wrap", [n], {
|
|
11914
|
+
align: "stretch",
|
|
11915
|
+
styles: {
|
|
11916
|
+
maxWidth: "32rem",
|
|
11917
|
+
margin: "0 auto"
|
|
11918
|
+
}
|
|
11919
|
+
})])];
|
|
11920
|
+
}
|
|
11921
|
+
}]
|
|
11823
11922
|
}, wi = {
|
|
11824
11923
|
kind: "cartCheckout",
|
|
11825
11924
|
label: "Cart & checkout",
|
|
@@ -11867,9 +11966,9 @@ var ci = (e, t, n = "2rem") => {
|
|
|
11867
11966
|
return [t.container([
|
|
11868
11967
|
t.text("heading", e.content.heading, "h2"),
|
|
11869
11968
|
t.text("text", e.content.text, "lead"),
|
|
11870
|
-
|
|
11969
|
+
I(t, "cart", "cart"),
|
|
11871
11970
|
t.text("checkoutHeading", e.content.checkoutHeading, "h2"),
|
|
11872
|
-
|
|
11971
|
+
I(t, "checkout", "checkout")
|
|
11873
11972
|
], {
|
|
11874
11973
|
maxWidth: "52rem",
|
|
11875
11974
|
gap: "var(--semantic-space-lg)"
|
|
@@ -11891,8 +11990,8 @@ var ci = (e, t, n = "2rem") => {
|
|
|
11891
11990
|
}), n = t.stack("cart-col", [
|
|
11892
11991
|
t.text("heading", e.content.heading, "h2"),
|
|
11893
11992
|
t.text("text", e.content.text, "lead"),
|
|
11894
|
-
|
|
11895
|
-
], { align: "stretch" }), r = t.card("checkout-col", [t.text("checkoutHeading", e.content.checkoutHeading, "h3"),
|
|
11993
|
+
I(t, "cart", "cart")
|
|
11994
|
+
], { align: "stretch" }), r = t.card("checkout-col", [t.text("checkoutHeading", e.content.checkoutHeading, "h3"), I(t, "checkout", "checkout")]);
|
|
11896
11995
|
return [t.container([t.split("split", n, r, {
|
|
11897
11996
|
ratio: [1, 1],
|
|
11898
11997
|
align: "flex-start"
|
|
@@ -11915,7 +12014,7 @@ var ci = (e, t, n = "2rem") => {
|
|
|
11915
12014
|
return [t.container([
|
|
11916
12015
|
t.text("heading", e.content.heading, "h2"),
|
|
11917
12016
|
t.text("text", e.content.text, "lead"),
|
|
11918
|
-
|
|
12017
|
+
I(t, "cart", "cart")
|
|
11919
12018
|
], {
|
|
11920
12019
|
maxWidth: "52rem",
|
|
11921
12020
|
gap: "var(--semantic-space-lg)"
|
|
@@ -11970,8 +12069,8 @@ var ci = (e, t, n = "2rem") => {
|
|
|
11970
12069
|
}
|
|
11971
12070
|
});
|
|
11972
12071
|
return [t.container([
|
|
11973
|
-
|
|
11974
|
-
|
|
12072
|
+
L(t, e.content),
|
|
12073
|
+
I(t, "order", "orderConfirmation", {}, { maxWidth: "40rem" }),
|
|
11975
12074
|
e.content.cta?.label ? t.button("cta", e.content.cta, "primary") : null
|
|
11976
12075
|
], {
|
|
11977
12076
|
alignItems: "center",
|
|
@@ -11990,11 +12089,11 @@ var ci = (e, t, n = "2rem") => {
|
|
|
11990
12089
|
...e.style,
|
|
11991
12090
|
align: "left"
|
|
11992
12091
|
}
|
|
11993
|
-
}), n = t.stack("copy-col", [
|
|
12092
|
+
}), n = t.stack("copy-col", [L(t, e.content), e.content.cta?.label ? t.button("cta", e.content.cta, "secondary") : null], {
|
|
11994
12093
|
align: "flex-start",
|
|
11995
12094
|
gap: "var(--semantic-space-lg)"
|
|
11996
12095
|
});
|
|
11997
|
-
return [t.container([t.split("split", n, t.card("order-card", [
|
|
12096
|
+
return [t.container([t.split("split", n, t.card("order-card", [I(t, "order", "orderConfirmation")]), {
|
|
11998
12097
|
ratio: [1, 1.2],
|
|
11999
12098
|
align: "flex-start"
|
|
12000
12099
|
})])];
|
|
@@ -12033,7 +12132,7 @@ var ci = (e, t, n = "2rem") => {
|
|
|
12033
12132
|
align: "center"
|
|
12034
12133
|
}
|
|
12035
12134
|
});
|
|
12036
|
-
return [t.container([
|
|
12135
|
+
return [t.container([L(t, e.content), I(t, "tracking", "orderTracking", {}, { maxWidth: "40rem" })], {
|
|
12037
12136
|
alignItems: "center",
|
|
12038
12137
|
gap: "var(--semantic-space-xl)"
|
|
12039
12138
|
})];
|
|
@@ -12051,7 +12150,7 @@ var ci = (e, t, n = "2rem") => {
|
|
|
12051
12150
|
align: "left"
|
|
12052
12151
|
}
|
|
12053
12152
|
});
|
|
12054
|
-
return [t.container([t.split("split", t.stack("copy-col", [
|
|
12153
|
+
return [t.container([t.split("split", t.stack("copy-col", [L(t, e.content)], { align: "flex-start" }), t.card("tracking-card", [I(t, "tracking", "orderTracking")]), {
|
|
12055
12154
|
ratio: [1, 1],
|
|
12056
12155
|
align: "flex-start"
|
|
12057
12156
|
})])];
|
|
@@ -12076,7 +12175,7 @@ var ci = (e, t, n = "2rem") => {
|
|
|
12076
12175
|
type: "longtext",
|
|
12077
12176
|
max: 300
|
|
12078
12177
|
}
|
|
12079
|
-
], Oi = (e, t = {}) =>
|
|
12178
|
+
], Oi = (e, t = {}) => I(e, "signup", "signupForm", {}, {
|
|
12080
12179
|
minHeight: "280px",
|
|
12081
12180
|
...t
|
|
12082
12181
|
}), ki = {
|
|
@@ -12108,7 +12207,7 @@ var ci = (e, t, n = "2rem") => {
|
|
|
12108
12207
|
align: "center"
|
|
12109
12208
|
}
|
|
12110
12209
|
});
|
|
12111
|
-
return [t.container([
|
|
12210
|
+
return [t.container([L(t, e.content), Oi(t, { maxWidth: "32rem" })], {
|
|
12112
12211
|
alignItems: "center",
|
|
12113
12212
|
gap: "var(--semantic-space-xl)"
|
|
12114
12213
|
})];
|
|
@@ -12131,7 +12230,7 @@ var ci = (e, t, n = "2rem") => {
|
|
|
12131
12230
|
align: "left"
|
|
12132
12231
|
}
|
|
12133
12232
|
});
|
|
12134
|
-
return [t.container([t.split("split", t.stack("copy-col", [
|
|
12233
|
+
return [t.container([t.split("split", t.stack("copy-col", [L(t, e.content)], { align: "flex-start" }), Oi(t), {
|
|
12135
12234
|
ratio: [1, 1],
|
|
12136
12235
|
align: "center"
|
|
12137
12236
|
})])];
|
|
@@ -12154,7 +12253,7 @@ var ci = (e, t, n = "2rem") => {
|
|
|
12154
12253
|
align: "center"
|
|
12155
12254
|
}
|
|
12156
12255
|
});
|
|
12157
|
-
return [t.container([t.card("signup-card", [
|
|
12256
|
+
return [t.container([t.card("signup-card", [L(t, e.content, { maxWidth: "28rem" }), Oi(t)], {
|
|
12158
12257
|
maxWidth: "34rem",
|
|
12159
12258
|
margin: "0 auto",
|
|
12160
12259
|
alignItems: "center"
|
|
@@ -12162,7 +12261,7 @@ var ci = (e, t, n = "2rem") => {
|
|
|
12162
12261
|
}
|
|
12163
12262
|
}
|
|
12164
12263
|
]
|
|
12165
|
-
},
|
|
12264
|
+
}, R = {
|
|
12166
12265
|
paddingTop: "0px",
|
|
12167
12266
|
paddingBottom: "0px"
|
|
12168
12267
|
}, Ai = (e) => {
|
|
@@ -12172,7 +12271,7 @@ var ci = (e, t, n = "2rem") => {
|
|
|
12172
12271
|
styles: r,
|
|
12173
12272
|
...e.children ? { children: e.children.map(Ai) } : {}
|
|
12174
12273
|
};
|
|
12175
|
-
},
|
|
12274
|
+
}, z = (e, t, n = {
|
|
12176
12275
|
top: 32,
|
|
12177
12276
|
bottom: 32
|
|
12178
12277
|
}) => Ai(e.box("column", t, {
|
|
@@ -12228,7 +12327,7 @@ var ci = (e, t, n = "2rem") => {
|
|
|
12228
12327
|
"inverted",
|
|
12229
12328
|
"primary"
|
|
12230
12329
|
],
|
|
12231
|
-
sectionStyles:
|
|
12330
|
+
sectionStyles: R,
|
|
12232
12331
|
build(e) {
|
|
12233
12332
|
let t = k({
|
|
12234
12333
|
...e,
|
|
@@ -12237,7 +12336,7 @@ var ci = (e, t, n = "2rem") => {
|
|
|
12237
12336
|
align: "center"
|
|
12238
12337
|
}
|
|
12239
12338
|
}), n = e.content;
|
|
12240
|
-
return [
|
|
12339
|
+
return [z(t, [n.logo ? t.image("logo", n.logo, n.logoAlt, {
|
|
12241
12340
|
ratio: "auto",
|
|
12242
12341
|
radius: "0px",
|
|
12243
12342
|
styles: {
|
|
@@ -12259,7 +12358,7 @@ var ci = (e, t, n = "2rem") => {
|
|
|
12259
12358
|
"inverted",
|
|
12260
12359
|
"primary"
|
|
12261
12360
|
],
|
|
12262
|
-
sectionStyles:
|
|
12361
|
+
sectionStyles: R,
|
|
12263
12362
|
build(e) {
|
|
12264
12363
|
let t = k({
|
|
12265
12364
|
...e,
|
|
@@ -12275,7 +12374,7 @@ var ci = (e, t, n = "2rem") => {
|
|
|
12275
12374
|
aspectRatio: void 0
|
|
12276
12375
|
}
|
|
12277
12376
|
}) : t.text("name", n.name, "h3"), i = t.button("link", n.link, "ghost");
|
|
12278
|
-
return [
|
|
12377
|
+
return [z(t, [t.row("bar", [r, i], {
|
|
12279
12378
|
gap: "16px",
|
|
12280
12379
|
align: "center",
|
|
12281
12380
|
stack: !1
|
|
@@ -12342,7 +12441,7 @@ var ci = (e, t, n = "2rem") => {
|
|
|
12342
12441
|
"sunken",
|
|
12343
12442
|
"primary"
|
|
12344
12443
|
],
|
|
12345
|
-
sectionStyles:
|
|
12444
|
+
sectionStyles: R,
|
|
12346
12445
|
build(e) {
|
|
12347
12446
|
let t = k({
|
|
12348
12447
|
...e,
|
|
@@ -12351,7 +12450,7 @@ var ci = (e, t, n = "2rem") => {
|
|
|
12351
12450
|
align: "center"
|
|
12352
12451
|
}
|
|
12353
12452
|
}), n = e.content;
|
|
12354
|
-
return [
|
|
12453
|
+
return [z(t, [
|
|
12355
12454
|
n.image ? t.image("image", n.image, n.imageAlt, {
|
|
12356
12455
|
ratio: "auto",
|
|
12357
12456
|
radius: "8px",
|
|
@@ -12381,7 +12480,7 @@ var ci = (e, t, n = "2rem") => {
|
|
|
12381
12480
|
"sunken",
|
|
12382
12481
|
"primary"
|
|
12383
12482
|
],
|
|
12384
|
-
sectionStyles:
|
|
12483
|
+
sectionStyles: R,
|
|
12385
12484
|
build(e) {
|
|
12386
12485
|
let t = k({
|
|
12387
12486
|
...e,
|
|
@@ -12394,7 +12493,7 @@ var ci = (e, t, n = "2rem") => {
|
|
|
12394
12493
|
radius: "8px",
|
|
12395
12494
|
styles: { aspectRatio: void 0 }
|
|
12396
12495
|
}) : null;
|
|
12397
|
-
return [
|
|
12496
|
+
return [z(t, [
|
|
12398
12497
|
t.text("eyebrow", n.eyebrow, "eyebrow"),
|
|
12399
12498
|
t.text("headline", n.headline, "h1"),
|
|
12400
12499
|
t.text("text", n.text, "lead"),
|
|
@@ -12437,10 +12536,10 @@ var ci = (e, t, n = "2rem") => {
|
|
|
12437
12536
|
"surface",
|
|
12438
12537
|
"sunken"
|
|
12439
12538
|
],
|
|
12440
|
-
sectionStyles:
|
|
12539
|
+
sectionStyles: R,
|
|
12441
12540
|
build(e) {
|
|
12442
12541
|
let t = k(e);
|
|
12443
|
-
return [
|
|
12542
|
+
return [z(t, [t.text("heading", e.content.heading, "h2"), t.text("text", e.content.text, "body")])];
|
|
12444
12543
|
}
|
|
12445
12544
|
}, {
|
|
12446
12545
|
id: "centered",
|
|
@@ -12451,7 +12550,7 @@ var ci = (e, t, n = "2rem") => {
|
|
|
12451
12550
|
"surface",
|
|
12452
12551
|
"sunken"
|
|
12453
12552
|
],
|
|
12454
|
-
sectionStyles:
|
|
12553
|
+
sectionStyles: R,
|
|
12455
12554
|
build(e) {
|
|
12456
12555
|
let t = k({
|
|
12457
12556
|
...e,
|
|
@@ -12460,7 +12559,7 @@ var ci = (e, t, n = "2rem") => {
|
|
|
12460
12559
|
align: "center"
|
|
12461
12560
|
}
|
|
12462
12561
|
});
|
|
12463
|
-
return [
|
|
12562
|
+
return [z(t, [t.text("heading", e.content.heading, "h2", { align: "center" }), t.text("text", e.content.text, "body", { align: "center" })])];
|
|
12464
12563
|
}
|
|
12465
12564
|
}]
|
|
12466
12565
|
},
|
|
@@ -12533,7 +12632,7 @@ var ci = (e, t, n = "2rem") => {
|
|
|
12533
12632
|
"surface",
|
|
12534
12633
|
"sunken"
|
|
12535
12634
|
],
|
|
12536
|
-
sectionStyles:
|
|
12635
|
+
sectionStyles: R,
|
|
12537
12636
|
build(e) {
|
|
12538
12637
|
let t = k(e), n = (Array.isArray(e.content.items) ? e.content.items : []).map((e, n) => t.stack(`item-${n}`, [
|
|
12539
12638
|
e.image ? t.image(`items.${n}.image`, e.image, e.imageAlt, {
|
|
@@ -12544,7 +12643,7 @@ var ci = (e, t, n = "2rem") => {
|
|
|
12544
12643
|
t.text(`items.${n}.title`, e.title, "h4"),
|
|
12545
12644
|
t.text(`items.${n}.text`, e.text, "body")
|
|
12546
12645
|
], { gap: "8px" }));
|
|
12547
|
-
return [
|
|
12646
|
+
return [z(t, [t.text("heading", e.content.heading, "h2"), t.row("points", n, {
|
|
12548
12647
|
gap: "24px",
|
|
12549
12648
|
align: "flex-start"
|
|
12550
12649
|
})])];
|
|
@@ -12558,10 +12657,10 @@ var ci = (e, t, n = "2rem") => {
|
|
|
12558
12657
|
"surface",
|
|
12559
12658
|
"sunken"
|
|
12560
12659
|
],
|
|
12561
|
-
sectionStyles:
|
|
12660
|
+
sectionStyles: R,
|
|
12562
12661
|
build(e) {
|
|
12563
12662
|
let t = k(e), n = (Array.isArray(e.content.items) ? e.content.items : []).map((e, n) => t.stack(`item-${n}`, [t.text(`items.${n}.title`, e.title, "h4"), t.text(`items.${n}.text`, e.text, "body")], { gap: "6px" }));
|
|
12564
|
-
return [
|
|
12663
|
+
return [z(t, [t.text("heading", e.content.heading, "h2"), ...n])];
|
|
12565
12664
|
}
|
|
12566
12665
|
}]
|
|
12567
12666
|
},
|
|
@@ -12606,7 +12705,7 @@ var ci = (e, t, n = "2rem") => {
|
|
|
12606
12705
|
"inverted",
|
|
12607
12706
|
"sunken"
|
|
12608
12707
|
],
|
|
12609
|
-
sectionStyles:
|
|
12708
|
+
sectionStyles: R,
|
|
12610
12709
|
build(e) {
|
|
12611
12710
|
let t = k({
|
|
12612
12711
|
...e,
|
|
@@ -12615,7 +12714,7 @@ var ci = (e, t, n = "2rem") => {
|
|
|
12615
12714
|
align: "center"
|
|
12616
12715
|
}
|
|
12617
12716
|
}), n = e.content, r = t.button("cta", n.cta, "primary");
|
|
12618
|
-
return [
|
|
12717
|
+
return [z(t, [
|
|
12619
12718
|
t.text("heading", n.heading, "h2", { align: "center" }),
|
|
12620
12719
|
t.text("text", n.text, "body", { align: "center" }),
|
|
12621
12720
|
r ? {
|
|
@@ -12635,7 +12734,7 @@ var ci = (e, t, n = "2rem") => {
|
|
|
12635
12734
|
label: "Plain",
|
|
12636
12735
|
description: "On the page colour.",
|
|
12637
12736
|
backgrounds: ["canvas", "surface"],
|
|
12638
|
-
sectionStyles:
|
|
12737
|
+
sectionStyles: R,
|
|
12639
12738
|
build(e) {
|
|
12640
12739
|
let t = k({
|
|
12641
12740
|
...e,
|
|
@@ -12644,7 +12743,7 @@ var ci = (e, t, n = "2rem") => {
|
|
|
12644
12743
|
align: "center"
|
|
12645
12744
|
}
|
|
12646
12745
|
}), n = e.content, r = t.button("cta", n.cta, "primary");
|
|
12647
|
-
return [
|
|
12746
|
+
return [z(t, [
|
|
12648
12747
|
t.text("heading", n.heading, "h2", { align: "center" }),
|
|
12649
12748
|
t.text("text", n.text, "body", { align: "center" }),
|
|
12650
12749
|
r ? {
|
|
@@ -12683,10 +12782,10 @@ var ci = (e, t, n = "2rem") => {
|
|
|
12683
12782
|
label: "Full width",
|
|
12684
12783
|
description: "Fills the email.",
|
|
12685
12784
|
backgrounds: ["canvas", "sunken"],
|
|
12686
|
-
sectionStyles:
|
|
12785
|
+
sectionStyles: R,
|
|
12687
12786
|
build(e) {
|
|
12688
12787
|
let t = k(e);
|
|
12689
|
-
return [
|
|
12788
|
+
return [z(t, [t.image("image", e.content.image, e.content.imageAlt, {
|
|
12690
12789
|
ratio: "auto",
|
|
12691
12790
|
radius: "8px",
|
|
12692
12791
|
styles: { aspectRatio: void 0 }
|
|
@@ -12747,7 +12846,7 @@ var ci = (e, t, n = "2rem") => {
|
|
|
12747
12846
|
"canvas",
|
|
12748
12847
|
"inverted"
|
|
12749
12848
|
],
|
|
12750
|
-
sectionStyles:
|
|
12849
|
+
sectionStyles: R,
|
|
12751
12850
|
build(e) {
|
|
12752
12851
|
let t = k({
|
|
12753
12852
|
...e,
|
|
@@ -12756,7 +12855,7 @@ var ci = (e, t, n = "2rem") => {
|
|
|
12756
12855
|
align: "center"
|
|
12757
12856
|
}
|
|
12758
12857
|
}), n = e.content, r = t.button("link", n.link, "ghost");
|
|
12759
|
-
return [
|
|
12858
|
+
return [z(t, [
|
|
12760
12859
|
t.text("name", n.name, "small", {
|
|
12761
12860
|
align: "center",
|
|
12762
12861
|
color: t.tone.body
|
|
@@ -12789,23 +12888,24 @@ new Set(ji.map((e) => e.kind));
|
|
|
12789
12888
|
//#region src/v2/sections/registry.ts
|
|
12790
12889
|
var Mi = [
|
|
12791
12890
|
ut,
|
|
12792
|
-
|
|
12793
|
-
|
|
12794
|
-
|
|
12795
|
-
|
|
12891
|
+
or,
|
|
12892
|
+
ur,
|
|
12893
|
+
_r,
|
|
12894
|
+
Rn,
|
|
12796
12895
|
$e,
|
|
12797
|
-
|
|
12798
|
-
|
|
12799
|
-
|
|
12896
|
+
Ir,
|
|
12897
|
+
Wr,
|
|
12898
|
+
nr,
|
|
12899
|
+
gi,
|
|
12900
|
+
di,
|
|
12901
|
+
kr,
|
|
12902
|
+
$r,
|
|
12903
|
+
En,
|
|
12904
|
+
vn,
|
|
12905
|
+
pn,
|
|
12906
|
+
Zn,
|
|
12800
12907
|
_i,
|
|
12801
|
-
|
|
12802
|
-
Ar,
|
|
12803
|
-
ei,
|
|
12804
|
-
Dn,
|
|
12805
|
-
yn,
|
|
12806
|
-
mn,
|
|
12807
|
-
Qn,
|
|
12808
|
-
vi,
|
|
12908
|
+
bi,
|
|
12809
12909
|
xi,
|
|
12810
12910
|
Si,
|
|
12811
12911
|
Ci,
|
|
@@ -12814,7 +12914,7 @@ var Mi = [
|
|
|
12814
12914
|
Ei,
|
|
12815
12915
|
ki
|
|
12816
12916
|
], Ni = new Map([...Mi, ...ji].map((e) => [e.kind, e]));
|
|
12817
|
-
function
|
|
12917
|
+
function B(e) {
|
|
12818
12918
|
let t = Ni.get(e);
|
|
12819
12919
|
if (!t) throw Error(`Unknown section kind "${e}".`);
|
|
12820
12920
|
return t;
|
|
@@ -12839,12 +12939,12 @@ var Pi = (e) => Ni.has(e), Fi = (e) => JSON.parse(JSON.stringify(e)), Ii = {
|
|
|
12839
12939
|
normal: 1,
|
|
12840
12940
|
airy: 1.5
|
|
12841
12941
|
};
|
|
12842
|
-
function
|
|
12942
|
+
function V(e) {
|
|
12843
12943
|
let t = e?.type === "section" ? e.props?.block : void 0;
|
|
12844
12944
|
return t && typeof t == "object" && typeof t.kind == "string" ? t : null;
|
|
12845
12945
|
}
|
|
12846
12946
|
function Ri(e, t) {
|
|
12847
|
-
let n =
|
|
12947
|
+
let n = B(e), r = n.variants.find((e) => e.id === t) ?? n.variants[0];
|
|
12848
12948
|
return {
|
|
12849
12949
|
kind: e,
|
|
12850
12950
|
variant: r.id,
|
|
@@ -12948,7 +13048,7 @@ function Zi(e, t = D("section")) {
|
|
|
12948
13048
|
...e,
|
|
12949
13049
|
content: n,
|
|
12950
13050
|
...e.overrides ? { overrides: Yi(e.overrides, n) } : {}
|
|
12951
|
-
}, i =
|
|
13051
|
+
}, i = B(r.kind), a = i.variants.find((e) => e.id === r.variant) ?? i.variants[0], o = r.style?.background ?? a.backgrounds?.[0] ?? "canvas", s = {
|
|
12952
13052
|
...r.style,
|
|
12953
13053
|
background: o,
|
|
12954
13054
|
align: r.style?.align ?? "left",
|
|
@@ -13010,7 +13110,7 @@ function Zi(e, t = D("section")) {
|
|
|
13010
13110
|
};
|
|
13011
13111
|
}
|
|
13012
13112
|
function Qi(e) {
|
|
13013
|
-
let t =
|
|
13113
|
+
let t = V(e);
|
|
13014
13114
|
if (!t) return e;
|
|
13015
13115
|
let n = Zi(t, e.id), { block: r, ...i } = e.props ?? {};
|
|
13016
13116
|
return {
|
|
@@ -13039,14 +13139,14 @@ var ta = (e, t) => Qi({
|
|
|
13039
13139
|
}
|
|
13040
13140
|
});
|
|
13041
13141
|
function na(e, t, n) {
|
|
13042
|
-
let r =
|
|
13142
|
+
let r = V(e);
|
|
13043
13143
|
return r ? ta(e, {
|
|
13044
13144
|
...r,
|
|
13045
13145
|
content: ea(r.content, t, n)
|
|
13046
13146
|
}) : e;
|
|
13047
13147
|
}
|
|
13048
13148
|
function ra(e, t) {
|
|
13049
|
-
let n =
|
|
13149
|
+
let n = V(e);
|
|
13050
13150
|
return n ? ta(e, {
|
|
13051
13151
|
...n,
|
|
13052
13152
|
content: {
|
|
@@ -13056,9 +13156,9 @@ function ra(e, t) {
|
|
|
13056
13156
|
}) : e;
|
|
13057
13157
|
}
|
|
13058
13158
|
function ia(e, t) {
|
|
13059
|
-
let n =
|
|
13159
|
+
let n = V(e);
|
|
13060
13160
|
if (!n) return e;
|
|
13061
|
-
let r =
|
|
13161
|
+
let r = B(n.kind), i = r.variants.find((e) => e.id === t);
|
|
13062
13162
|
if (!i || i.id === n.variant) return e;
|
|
13063
13163
|
let a = r.variants.find((e) => e.id === n.variant), o = n.style?.background && n.style.background !== (a?.backgrounds?.[0] ?? "canvas"), s = {
|
|
13064
13164
|
...n.style,
|
|
@@ -13078,7 +13178,7 @@ function ia(e, t) {
|
|
|
13078
13178
|
});
|
|
13079
13179
|
}
|
|
13080
13180
|
function aa(e, t) {
|
|
13081
|
-
let n =
|
|
13181
|
+
let n = V(e);
|
|
13082
13182
|
return n ? ta(e, {
|
|
13083
13183
|
...n,
|
|
13084
13184
|
style: {
|
|
@@ -13088,7 +13188,7 @@ function aa(e, t) {
|
|
|
13088
13188
|
}) : e;
|
|
13089
13189
|
}
|
|
13090
13190
|
function oa(e) {
|
|
13091
|
-
if (!
|
|
13191
|
+
if (!V(e)) return e;
|
|
13092
13192
|
let { block: t, ...n } = e.props ?? {}, r = (e) => {
|
|
13093
13193
|
let { bind: t, ...n } = e.props ?? {};
|
|
13094
13194
|
return {
|
|
@@ -13106,7 +13206,7 @@ function oa(e) {
|
|
|
13106
13206
|
function sa(e, t) {
|
|
13107
13207
|
let n = (e, r) => {
|
|
13108
13208
|
if (e.id === t) return e.type === "section" ? null : r;
|
|
13109
|
-
let i =
|
|
13209
|
+
let i = V(e) ? e : r;
|
|
13110
13210
|
for (let t of e.children ?? []) {
|
|
13111
13211
|
let e = n(t, i);
|
|
13112
13212
|
if (e) return e;
|
|
@@ -13145,10 +13245,10 @@ function ca(e, t, n) {
|
|
|
13145
13245
|
}
|
|
13146
13246
|
function la(e, t) {
|
|
13147
13247
|
let n = Vi(e.id, t);
|
|
13148
|
-
return n === "@section" ? n : Ji(n, Ki(
|
|
13248
|
+
return n === "@section" ? n : Ji(n, Ki(V(e)?.content ?? {}));
|
|
13149
13249
|
}
|
|
13150
13250
|
function ua(e, t, n) {
|
|
13151
|
-
let r =
|
|
13251
|
+
let r = V(e);
|
|
13152
13252
|
if (!r) return e;
|
|
13153
13253
|
let i = la(e, t), a = r.overrides?.[i] ?? {}, o = {
|
|
13154
13254
|
...a,
|
|
@@ -13185,7 +13285,7 @@ function ua(e, t, n) {
|
|
|
13185
13285
|
});
|
|
13186
13286
|
}
|
|
13187
13287
|
function da(e, t) {
|
|
13188
|
-
let n =
|
|
13288
|
+
let n = V(e);
|
|
13189
13289
|
if (!n?.overrides) return e;
|
|
13190
13290
|
if (!t) {
|
|
13191
13291
|
let { overrides: t, ...r } = n;
|
|
@@ -13198,7 +13298,7 @@ function da(e, t) {
|
|
|
13198
13298
|
});
|
|
13199
13299
|
}
|
|
13200
13300
|
var fa = (e) => {
|
|
13201
|
-
let t =
|
|
13301
|
+
let t = V(e), n = Object.keys(t?.overrides ?? {});
|
|
13202
13302
|
if (!t || !n.length) return 0;
|
|
13203
13303
|
let r = /* @__PURE__ */ new Set([Bi]), i = (n) => {
|
|
13204
13304
|
r.add(Ji(Vi(e.id, n.id), t.content)), n.children?.forEach(i);
|
|
@@ -13211,7 +13311,7 @@ function pa(e, t) {
|
|
|
13211
13311
|
let r = null, i = (e) => {
|
|
13212
13312
|
e.id === t ? r = e : e.children?.forEach(i);
|
|
13213
13313
|
};
|
|
13214
|
-
return i(e), r &&
|
|
13314
|
+
return i(e), r && V(r) ? r : null;
|
|
13215
13315
|
}
|
|
13216
13316
|
function ma(e, t, n) {
|
|
13217
13317
|
let r = pa(e, t);
|
|
@@ -13290,11 +13390,11 @@ var ya = [
|
|
|
13290
13390
|
for (let e of ya) delete t[e];
|
|
13291
13391
|
return t;
|
|
13292
13392
|
}, xa = (e) => {
|
|
13293
|
-
let t =
|
|
13393
|
+
let t = V(e)?.overrides?.[Bi];
|
|
13294
13394
|
return !!t && (t.styles?.position === "absolute" || typeof t.styles?.x == "number" || typeof t.styles?.y == "number");
|
|
13295
13395
|
};
|
|
13296
13396
|
function Sa(e) {
|
|
13297
|
-
let t =
|
|
13397
|
+
let t = V(e);
|
|
13298
13398
|
if (!t) return e;
|
|
13299
13399
|
let n = t.overrides?.[Bi];
|
|
13300
13400
|
if (!n) return Qi(e);
|
|
@@ -13590,6 +13690,7 @@ var wa = (e, t = "#") => ({
|
|
|
13590
13690
|
blogArticle: "Blog article",
|
|
13591
13691
|
shop: "Shop",
|
|
13592
13692
|
productPage: "Product",
|
|
13693
|
+
productOffer: "Sell a product",
|
|
13593
13694
|
cartCheckout: "Cart & checkout",
|
|
13594
13695
|
orderConfirmation: "Order confirmed",
|
|
13595
13696
|
orderTracking: "Order tracking",
|
|
@@ -13647,7 +13748,7 @@ function Na(e, t = {}) {
|
|
|
13647
13748
|
});
|
|
13648
13749
|
}
|
|
13649
13750
|
function Pa(e) {
|
|
13650
|
-
return xe(e).every((e) => !
|
|
13751
|
+
return xe(e).every((e) => !V(e) && !e.children?.length);
|
|
13651
13752
|
}
|
|
13652
13753
|
function Fa(e, t) {
|
|
13653
13754
|
let n = Da(e), r = t.seed ?? ja(n.id), i = {
|
|
@@ -14173,9 +14274,9 @@ function ho(e, t = 0) {
|
|
|
14173
14274
|
return "";
|
|
14174
14275
|
}
|
|
14175
14276
|
function go(e) {
|
|
14176
|
-
let t =
|
|
14277
|
+
let t = V(e);
|
|
14177
14278
|
if (!t) return "";
|
|
14178
|
-
let n = Pi(t.kind) ?
|
|
14279
|
+
let n = Pi(t.kind) ? B(t.kind).fields : [];
|
|
14179
14280
|
for (let e of n) {
|
|
14180
14281
|
let n = t.content?.[e.key];
|
|
14181
14282
|
if ((e.type === "text" || e.type === "longtext") && typeof n == "string" && n.trim()) return mo(n.trim());
|
|
@@ -14226,7 +14327,7 @@ function yo(e) {
|
|
|
14226
14327
|
return (e.children ?? []).map((e) => n(e, 0)).filter((e) => !!e);
|
|
14227
14328
|
}
|
|
14228
14329
|
function bo(e) {
|
|
14229
|
-
let t =
|
|
14330
|
+
let t = V(e);
|
|
14230
14331
|
return t ? {
|
|
14231
14332
|
id: e.id,
|
|
14232
14333
|
kind: t.kind,
|
|
@@ -14565,10 +14666,10 @@ var Go = a({
|
|
|
14565
14666
|
function $o(e) {
|
|
14566
14667
|
Qo = e;
|
|
14567
14668
|
}
|
|
14568
|
-
var
|
|
14669
|
+
var H = (e) => ({
|
|
14569
14670
|
ok: !1,
|
|
14570
14671
|
message: e
|
|
14571
|
-
}),
|
|
14672
|
+
}), U = (e, t) => ({
|
|
14572
14673
|
ok: !0,
|
|
14573
14674
|
message: e,
|
|
14574
14675
|
...t ? { sectionId: t } : {}
|
|
@@ -14587,9 +14688,9 @@ var V = (e) => ({
|
|
|
14587
14688
|
...e.rootNode,
|
|
14588
14689
|
children: n
|
|
14589
14690
|
}
|
|
14590
|
-
} : e),
|
|
14591
|
-
let t =
|
|
14592
|
-
return t && Pi(t.kind) ?
|
|
14691
|
+
} : e), W = (e) => e.rootNode.children ?? [], as = (e) => H(`I couldn't find a section called "${e}". It may have been removed already.`), os = (e) => {
|
|
14692
|
+
let t = V(e);
|
|
14693
|
+
return t && Pi(t.kind) ? B(t.kind).label : e.name || "section";
|
|
14593
14694
|
};
|
|
14594
14695
|
function ss(e, t, n) {
|
|
14595
14696
|
if (t.afterSectionId !== void 0) {
|
|
@@ -14624,7 +14725,8 @@ function fs(e, t, n) {
|
|
|
14624
14725
|
case "longtext":
|
|
14625
14726
|
case "image":
|
|
14626
14727
|
case "link":
|
|
14627
|
-
case "icon":
|
|
14728
|
+
case "icon":
|
|
14729
|
+
case "product": return typeof t == "string" ? null : `"${n}" should be text.`;
|
|
14628
14730
|
case "toggle": return typeof t == "boolean" ? null : `"${n}" should be on or off.`;
|
|
14629
14731
|
case "select": {
|
|
14630
14732
|
let r = (e.options ?? []).map(([e]) => e);
|
|
@@ -14655,7 +14757,7 @@ function ps(e, t, n) {
|
|
|
14655
14757
|
return null;
|
|
14656
14758
|
}
|
|
14657
14759
|
function ms(e, t) {
|
|
14658
|
-
let n =
|
|
14760
|
+
let n = B(e);
|
|
14659
14761
|
for (let [e, r] of Object.entries(t)) {
|
|
14660
14762
|
let t = us(n.fields, e.split(".").filter(Boolean));
|
|
14661
14763
|
if (!t) return `A ${n.label.toLowerCase()} section has no "${e}" field. The fields are: ${n.fields.map((e) => e.key).join(", ")}.`;
|
|
@@ -14686,7 +14788,7 @@ function vs(e, t) {
|
|
|
14686
14788
|
case "secondaryColor":
|
|
14687
14789
|
if (!Ba(t)) return {
|
|
14688
14790
|
ds: e,
|
|
14689
|
-
result:
|
|
14791
|
+
result: H(`"${t}" doesn't look like a colour I can use. Try something like #1D4ED8.`)
|
|
14690
14792
|
};
|
|
14691
14793
|
n = i === "primaryColor" ? Za(n, t) : Qa(n, t), r.push(i === "primaryColor" ? "main colour" : "second colour");
|
|
14692
14794
|
break;
|
|
@@ -14695,7 +14797,7 @@ function vs(e, t) {
|
|
|
14695
14797
|
let a = ne.find((e) => e.name.toLowerCase() === t.toLowerCase());
|
|
14696
14798
|
if (!a) return {
|
|
14697
14799
|
ds: e,
|
|
14698
|
-
result:
|
|
14800
|
+
result: H(`I don't have a font called "${t}". Try one of: ${ne.map((e) => e.name).join(", ")}.`)
|
|
14699
14801
|
};
|
|
14700
14802
|
n = co(n, i === "headingFont" ? { heading: a.name } : { body: a.name }), r.push(i === "headingFont" ? "heading font" : "text font");
|
|
14701
14803
|
break;
|
|
@@ -14707,7 +14809,7 @@ function vs(e, t) {
|
|
|
14707
14809
|
"dark"
|
|
14708
14810
|
].includes(t)) return {
|
|
14709
14811
|
ds: e,
|
|
14710
|
-
result:
|
|
14812
|
+
result: H("The background feel should be \"cool\", \"warm\" or \"dark\".")
|
|
14711
14813
|
};
|
|
14712
14814
|
n = no(n, t), r.push("background feel");
|
|
14713
14815
|
break;
|
|
@@ -14718,19 +14820,19 @@ function vs(e, t) {
|
|
|
14718
14820
|
"round"
|
|
14719
14821
|
].includes(t)) return {
|
|
14720
14822
|
ds: e,
|
|
14721
|
-
result:
|
|
14823
|
+
result: H("Corner roundness should be \"sharp\", \"soft\" or \"round\".")
|
|
14722
14824
|
};
|
|
14723
14825
|
n = oo(n, t), r.push("corner roundness");
|
|
14724
14826
|
break;
|
|
14725
14827
|
default: {
|
|
14726
14828
|
if (!i.startsWith("--")) return {
|
|
14727
14829
|
ds: e,
|
|
14728
|
-
result:
|
|
14830
|
+
result: H(`I don't know the brand setting "${i}". I can change: ${gs.join(", ")}.`)
|
|
14729
14831
|
};
|
|
14730
14832
|
let a = ie(n, i);
|
|
14731
14833
|
if (!a) return {
|
|
14732
14834
|
ds: e,
|
|
14733
|
-
result:
|
|
14835
|
+
result: H(`There's no brand setting called "${i}" on this site.`)
|
|
14734
14836
|
};
|
|
14735
14837
|
n = E(n, i, t), r.push(a.name || i);
|
|
14736
14838
|
}
|
|
@@ -14738,15 +14840,15 @@ function vs(e, t) {
|
|
|
14738
14840
|
}
|
|
14739
14841
|
if (!r.length) return {
|
|
14740
14842
|
ds: e,
|
|
14741
|
-
result:
|
|
14843
|
+
result: H("There was nothing to change in the brand.")
|
|
14742
14844
|
};
|
|
14743
14845
|
let i = _s(e), a = w(n).filter((e) => !i.has(`${e.kind}:${e.key}`));
|
|
14744
14846
|
return a.length ? {
|
|
14745
14847
|
ds: e,
|
|
14746
|
-
result:
|
|
14848
|
+
result: H(`That brand change wouldn't work: ${a[0].message}`)
|
|
14747
14849
|
} : {
|
|
14748
14850
|
ds: x(n),
|
|
14749
|
-
result:
|
|
14851
|
+
result: U(`Updated the brand (${r.join(", ")}).`)
|
|
14750
14852
|
};
|
|
14751
14853
|
}
|
|
14752
14854
|
var ys = /* @__PURE__ */ new Set([
|
|
@@ -14757,7 +14859,7 @@ var ys = /* @__PURE__ */ new Set([
|
|
|
14757
14859
|
]);
|
|
14758
14860
|
function bs(e, t) {
|
|
14759
14861
|
for (let n of e) {
|
|
14760
|
-
let e =
|
|
14862
|
+
let e = W(n);
|
|
14761
14863
|
for (let r = 0; r < e.length; r++) {
|
|
14762
14864
|
let i = Vo(e[r], t);
|
|
14763
14865
|
if (i) return {
|
|
@@ -14784,7 +14886,7 @@ var Cs = (e) => {
|
|
|
14784
14886
|
let t = /* @__PURE__ */ new Set();
|
|
14785
14887
|
for (let n of e) Bo(n.rootNode, t);
|
|
14786
14888
|
return t;
|
|
14787
|
-
}, ws = "That belongs to a ready-made section, so change it through the section (its wording and layout) — or rebuild the whole section with replaceSection if it needs a different structure.", Ts = (e) => e.length ? ` (I left out settings I don't know: ${e.slice(0, 5).join(", ")}.)` : "", Es = (e, t, n, r) => is(e, t.id,
|
|
14889
|
+
}, ws = "That belongs to a ready-made section, so change it through the section (its wording and layout) — or rebuild the whole section with replaceSection if it needs a different structure.", Ts = (e) => e.length ? ` (I left out settings I don't know: ${e.slice(0, 5).join(", ")}.)` : "", Es = (e, t, n, r) => is(e, t.id, W(t).map((e, t) => t === n ? r : e));
|
|
14788
14890
|
function Ds(e, t) {
|
|
14789
14891
|
if (t.afterNodeId !== void 0) {
|
|
14790
14892
|
let n = e.findIndex((e) => e.id === t.afterNodeId);
|
|
@@ -14801,13 +14903,13 @@ function Os(e, t, n, r) {
|
|
|
14801
14903
|
switch (n.op) {
|
|
14802
14904
|
case "addSection": {
|
|
14803
14905
|
let r = ns(e, n.pageId);
|
|
14804
|
-
if (!r) return i(
|
|
14805
|
-
if (!Pi(n.kind)) return i(
|
|
14806
|
-
let a =
|
|
14807
|
-
if (n.variant && !a.variants.some((e) => e.id === n.variant)) return i(
|
|
14906
|
+
if (!r) return i(H(`I couldn't find a page called "${n.pageId}".`));
|
|
14907
|
+
if (!Pi(n.kind)) return i(H(`I don't know a "${n.kind}" section. The ones I can add are: ${es()}.`));
|
|
14908
|
+
let a = B(n.kind);
|
|
14909
|
+
if (n.variant && !a.variants.some((e) => e.id === n.variant)) return i(H(`A ${a.label.toLowerCase()} section doesn't have a "${n.variant}" layout. Choose from: ${a.variants.map((e) => e.id).join(", ")}.`));
|
|
14808
14910
|
if (n.content) {
|
|
14809
14911
|
let e = ms(n.kind, n.content);
|
|
14810
|
-
if (e) return i(
|
|
14912
|
+
if (e) return i(H(e));
|
|
14811
14913
|
}
|
|
14812
14914
|
let o = Ri(n.kind, n.variant), s = {
|
|
14813
14915
|
...o,
|
|
@@ -14816,8 +14918,8 @@ function Os(e, t, n, r) {
|
|
|
14816
14918
|
...o.style,
|
|
14817
14919
|
...n.style
|
|
14818
14920
|
}
|
|
14819
|
-
}, c =
|
|
14820
|
-
if ("error" in d) return i(
|
|
14921
|
+
}, c = W(r), l = new Set(e.flatMap((e) => W(e).map((e) => e.id))), u = n.id && /^[A-Za-z0-9_-]{1,40}$/.test(n.id) && !l.has(n.id) ? n.id : D("section"), d = ss(c, n, n.kind === "header" ? 0 : n.kind !== "footer" && c[c.length - 1] && V(c[c.length - 1])?.kind === "footer" ? c.length - 1 : c.length);
|
|
14922
|
+
if ("error" in d) return i(H(d.error));
|
|
14821
14923
|
let f = [
|
|
14822
14924
|
...c.slice(0, d.index),
|
|
14823
14925
|
Zi(s, u),
|
|
@@ -14826,43 +14928,43 @@ function Os(e, t, n, r) {
|
|
|
14826
14928
|
return {
|
|
14827
14929
|
pages: is(e, r.id, f),
|
|
14828
14930
|
ds: t,
|
|
14829
|
-
result:
|
|
14931
|
+
result: U(`Added a ${a.label.toLowerCase()} section to ${r.name}.`, u)
|
|
14830
14932
|
};
|
|
14831
14933
|
}
|
|
14832
14934
|
case "updateSection": {
|
|
14833
14935
|
let r = rs(e, n.sectionId);
|
|
14834
14936
|
if (!r) return i(as(n.sectionId));
|
|
14835
|
-
let a =
|
|
14836
|
-
if (!o) return i(
|
|
14837
|
-
if (n.content === void 0 && n.variant === void 0 && n.style === void 0) return i(
|
|
14838
|
-
let s =
|
|
14839
|
-
if (n.variant && !s.variants.some((e) => e.id === n.variant)) return i(
|
|
14937
|
+
let a = W(r.page)[r.index], o = V(a);
|
|
14938
|
+
if (!o) return i(H("That section was designed by hand, so its words aren't fields: change the elements inside it one at a time instead."));
|
|
14939
|
+
if (n.content === void 0 && n.variant === void 0 && n.style === void 0) return i(H("There was nothing to change in that section."));
|
|
14940
|
+
let s = B(o.kind);
|
|
14941
|
+
if (n.variant && !s.variants.some((e) => e.id === n.variant)) return i(H(`A ${s.label.toLowerCase()} section doesn't have a "${n.variant}" layout. Choose from: ${s.variants.map((e) => e.id).join(", ")}.`));
|
|
14840
14942
|
if (n.content) {
|
|
14841
14943
|
let e = ms(o.kind, n.content);
|
|
14842
|
-
if (e) return i(
|
|
14944
|
+
if (e) return i(H(e));
|
|
14843
14945
|
}
|
|
14844
14946
|
let c = a;
|
|
14845
14947
|
if (n.variant && (c = ia(c, n.variant)), n.content) {
|
|
14846
|
-
let e =
|
|
14948
|
+
let e = V(c);
|
|
14847
14949
|
c = ta(c, {
|
|
14848
14950
|
...e,
|
|
14849
14951
|
content: hs(e.content, n.content)
|
|
14850
14952
|
});
|
|
14851
14953
|
}
|
|
14852
14954
|
n.style && (c = aa(c, n.style));
|
|
14853
|
-
let l =
|
|
14955
|
+
let l = W(r.page).map((e, t) => t === r.index ? c : e);
|
|
14854
14956
|
return {
|
|
14855
14957
|
pages: is(e, r.page.id, l),
|
|
14856
14958
|
ds: t,
|
|
14857
|
-
result:
|
|
14959
|
+
result: U(`Updated the ${s.label.toLowerCase()} section on ${r.page.name}.`, a.id)
|
|
14858
14960
|
};
|
|
14859
14961
|
}
|
|
14860
14962
|
case "updateElement": {
|
|
14861
14963
|
let r = bs(e, n.nodeId);
|
|
14862
|
-
if (!r) return i(
|
|
14863
|
-
let a =
|
|
14864
|
-
if (
|
|
14865
|
-
if (r.node.id === a.id && (n.text !== void 0 || n.href !== void 0 || n.alt !== void 0 || n.src !== void 0)) return i(
|
|
14964
|
+
if (!r) return i(H(`I couldn't find an element called "${n.nodeId}" on the site. It may have been removed already.`));
|
|
14965
|
+
let a = W(r.page)[r.index];
|
|
14966
|
+
if (V(a)) return i(H(ws));
|
|
14967
|
+
if (r.node.id === a.id && (n.text !== void 0 || n.href !== void 0 || n.alt !== void 0 || n.src !== void 0)) return i(H("A section has no words of its own; change the elements inside it."));
|
|
14866
14968
|
if ([
|
|
14867
14969
|
"text",
|
|
14868
14970
|
"href",
|
|
@@ -14872,13 +14974,13 @@ function Os(e, t, n, r) {
|
|
|
14872
14974
|
"hidden",
|
|
14873
14975
|
"style",
|
|
14874
14976
|
"responsive"
|
|
14875
|
-
].every((e) => n[e] === void 0)) return i(
|
|
14977
|
+
].every((e) => n[e] === void 0)) return i(H("There was nothing to change in that element."));
|
|
14876
14978
|
let o = r.node;
|
|
14877
|
-
if (n.text !== void 0 && !ys.has(o.type) && typeof o.content != "string") return i(
|
|
14878
|
-
if (n.href !== void 0 && /^\s*(javascript|data|vbscript):/i.test(n.href)) return i(
|
|
14879
|
-
if ((n.alt !== void 0 || n.src !== void 0) && o.type !== "image") return i(
|
|
14979
|
+
if (n.text !== void 0 && !ys.has(o.type) && typeof o.content != "string") return i(H(`That ${o.type} has no words to change.`));
|
|
14980
|
+
if (n.href !== void 0 && /^\s*(javascript|data|vbscript):/i.test(n.href)) return i(H("That link isn't one I can use. Use a page address like /about or a full https:// address."));
|
|
14981
|
+
if ((n.alt !== void 0 || n.src !== void 0) && o.type !== "image") return i(H("Only a picture has a picture address and description."));
|
|
14880
14982
|
let s = n.style ? jo(n.style) : null, c = ["tablet", "mobile"].map((e) => [e, n.responsive?.[e] ? jo(n.responsive[e]) : null]), l = [...s?.dropped ?? [], ...c.flatMap(([, e]) => e?.dropped ?? [])];
|
|
14881
|
-
if (s && !Object.keys(s.styles).length && n.style && Object.keys(n.style).length && n.text === void 0 && n.href === void 0 && n.alt === void 0 && n.src === void 0 && !c.some(([, e]) => e && Object.keys(e.styles).length)) return i(
|
|
14983
|
+
if (s && !Object.keys(s.styles).length && n.style && Object.keys(n.style).length && n.text === void 0 && n.href === void 0 && n.alt === void 0 && n.src === void 0 && !c.some(([, e]) => e && Object.keys(e.styles).length)) return i(H(`None of those look settings are ones I know${Ts(l)}`));
|
|
14882
14984
|
let u = xs(o), d = Mo({
|
|
14883
14985
|
href: n.href,
|
|
14884
14986
|
alt: n.alt,
|
|
@@ -14915,50 +15017,50 @@ function Os(e, t, n, r) {
|
|
|
14915
15017
|
return {
|
|
14916
15018
|
pages: Es(e, r.page, r.index, Ro(a, n.nodeId, f)),
|
|
14917
15019
|
ds: t,
|
|
14918
|
-
result:
|
|
15020
|
+
result: U(`Changed the ${p} of ${u} on ${r.page.name}.${Ts(l)}`, a.id)
|
|
14919
15021
|
};
|
|
14920
15022
|
}
|
|
14921
15023
|
case "addElement": {
|
|
14922
15024
|
let r = bs(e, n.parentId);
|
|
14923
|
-
if (!r) return i(
|
|
14924
|
-
let a =
|
|
14925
|
-
if (
|
|
15025
|
+
if (!r) return i(H(`I couldn't find the group "${n.parentId}" to add it to.`));
|
|
15026
|
+
let a = W(r.page)[r.index];
|
|
15027
|
+
if (V(a)) return i(H(ws));
|
|
14926
15028
|
if (![
|
|
14927
15029
|
"section",
|
|
14928
15030
|
"container",
|
|
14929
15031
|
"card"
|
|
14930
|
-
].includes(r.node.type)) return i(
|
|
15032
|
+
].includes(r.node.type)) return i(H(`A ${r.node.type} can't hold other elements. Add it to a section, container or card.`));
|
|
14931
15033
|
let o = Ds(r.node.children ?? [], n);
|
|
14932
|
-
if (typeof o == "string") return i(
|
|
15034
|
+
if (typeof o == "string") return i(H(o));
|
|
14933
15035
|
let s;
|
|
14934
15036
|
try {
|
|
14935
15037
|
s = Lo(n.element, Cs(e));
|
|
14936
15038
|
} catch (e) {
|
|
14937
|
-
return i(
|
|
15039
|
+
return i(H(e.message));
|
|
14938
15040
|
}
|
|
14939
15041
|
let c = Uo(a, n.parentId, s.node, o);
|
|
14940
15042
|
return {
|
|
14941
15043
|
pages: Es(e, r.page, r.index, c),
|
|
14942
15044
|
ds: t,
|
|
14943
|
-
result:
|
|
15045
|
+
result: U(`Added ${xs(s.node)} to ${r.page.name}.${Ts(s.dropped)}`, a.id)
|
|
14944
15046
|
};
|
|
14945
15047
|
}
|
|
14946
15048
|
case "removeElement": {
|
|
14947
15049
|
let r = bs(e, n.nodeId);
|
|
14948
|
-
if (!r) return i(
|
|
14949
|
-
let a =
|
|
14950
|
-
return r.node.id === a.id ? i(
|
|
15050
|
+
if (!r) return i(H(`I couldn't find an element called "${n.nodeId}". It may have been removed already.`));
|
|
15051
|
+
let a = W(r.page)[r.index];
|
|
15052
|
+
return r.node.id === a.id ? i(H("That is a whole section. Use removeSection to take it out.")) : V(a) ? i(H(ws)) : {
|
|
14951
15053
|
pages: Es(e, r.page, r.index, Ho(a, n.nodeId)),
|
|
14952
15054
|
ds: t,
|
|
14953
|
-
result:
|
|
15055
|
+
result: U(`Removed ${xs(r.node)} from ${r.page.name}.`, a.id)
|
|
14954
15056
|
};
|
|
14955
15057
|
}
|
|
14956
15058
|
case "duplicateElement": {
|
|
14957
15059
|
let r = bs(e, n.nodeId);
|
|
14958
|
-
if (!r) return i(
|
|
14959
|
-
let a =
|
|
14960
|
-
if (r.node.id === a.id) return i(
|
|
14961
|
-
if (
|
|
15060
|
+
if (!r) return i(H(`I couldn't find an element called "${n.nodeId}".`));
|
|
15061
|
+
let a = W(r.page)[r.index];
|
|
15062
|
+
if (r.node.id === a.id) return i(H("That is a whole section. Use duplicateSection to copy it."));
|
|
15063
|
+
if (V(a)) return i(H(ws));
|
|
14962
15064
|
let o = (function e(t) {
|
|
14963
15065
|
if (t.children?.some((e) => e.id === n.nodeId)) return t;
|
|
14964
15066
|
for (let n of t.children ?? []) {
|
|
@@ -14970,16 +15072,16 @@ function Os(e, t, n, r) {
|
|
|
14970
15072
|
return {
|
|
14971
15073
|
pages: Es(e, r.page, r.index, Uo(a, o.id, c, s + 1)),
|
|
14972
15074
|
ds: t,
|
|
14973
|
-
result:
|
|
15075
|
+
result: U(`Copied ${xs(r.node)} on ${r.page.name}.`, a.id)
|
|
14974
15076
|
};
|
|
14975
15077
|
}
|
|
14976
15078
|
case "moveElement": {
|
|
14977
15079
|
let r = bs(e, n.nodeId);
|
|
14978
|
-
if (!r) return i(
|
|
14979
|
-
let a =
|
|
14980
|
-
if (r.node.id === a.id) return i(
|
|
14981
|
-
if (
|
|
14982
|
-
if (n.parentId === void 0 && n.index === void 0 && n.afterNodeId === void 0) return i(
|
|
15080
|
+
if (!r) return i(H(`I couldn't find an element called "${n.nodeId}".`));
|
|
15081
|
+
let a = W(r.page)[r.index];
|
|
15082
|
+
if (r.node.id === a.id) return i(H("That is a whole section. Use moveSection to move it."));
|
|
15083
|
+
if (V(a)) return i(H(ws));
|
|
15084
|
+
if (n.parentId === void 0 && n.index === void 0 && n.afterNodeId === void 0) return i(H("I need to know where to move it to."));
|
|
14983
15085
|
let o = (function e(t) {
|
|
14984
15086
|
if (t.children?.some((e) => e.id === n.nodeId)) return t;
|
|
14985
15087
|
for (let n of t.children ?? []) {
|
|
@@ -14988,34 +15090,34 @@ function Os(e, t, n, r) {
|
|
|
14988
15090
|
}
|
|
14989
15091
|
return null;
|
|
14990
15092
|
})(a), s = n.parentId ?? o.id;
|
|
14991
|
-
if (zo(r.node, s)) return i(
|
|
15093
|
+
if (zo(r.node, s)) return i(H("An element can't be moved inside itself."));
|
|
14992
15094
|
let c = bs(e, s);
|
|
14993
|
-
if (!c) return i(
|
|
14994
|
-
let l =
|
|
14995
|
-
if (
|
|
15095
|
+
if (!c) return i(H(`I couldn't find the group "${s}" to move it into.`));
|
|
15096
|
+
let l = W(c.page)[c.index];
|
|
15097
|
+
if (V(l)) return i(H(ws));
|
|
14996
15098
|
if (![
|
|
14997
15099
|
"section",
|
|
14998
15100
|
"container",
|
|
14999
15101
|
"card"
|
|
15000
|
-
].includes(c.node.type)) return i(
|
|
15102
|
+
].includes(c.node.type)) return i(H(`A ${c.node.type} can't hold other elements.`));
|
|
15001
15103
|
let u = Es(e, r.page, r.index, Ho(a, n.nodeId)), d = bs(u, s), f = Ds(d.node.children ?? [], n);
|
|
15002
|
-
return typeof f == "string" ? i(
|
|
15003
|
-
pages: Es(u, d.page, d.index, Uo(
|
|
15104
|
+
return typeof f == "string" ? i(H(f)) : {
|
|
15105
|
+
pages: Es(u, d.page, d.index, Uo(W(d.page)[d.index], s, r.node, f)),
|
|
15004
15106
|
ds: t,
|
|
15005
|
-
result:
|
|
15107
|
+
result: U(`Moved ${xs(r.node)} on ${r.page.name}.`, a.id)
|
|
15006
15108
|
};
|
|
15007
15109
|
}
|
|
15008
15110
|
case "addCustomSection": {
|
|
15009
15111
|
let r = ns(e, n.pageId);
|
|
15010
|
-
if (!r) return i(
|
|
15112
|
+
if (!r) return i(H(`I couldn't find a page called "${n.pageId}".`));
|
|
15011
15113
|
let a;
|
|
15012
15114
|
try {
|
|
15013
15115
|
a = Lo(n.element, Cs(e), { section: !0 });
|
|
15014
15116
|
} catch (e) {
|
|
15015
|
-
return i(
|
|
15117
|
+
return i(H(e.message));
|
|
15016
15118
|
}
|
|
15017
|
-
let o =
|
|
15018
|
-
if ("error" in s) return i(
|
|
15119
|
+
let o = W(r), s = ss(o, n, o.length);
|
|
15120
|
+
if ("error" in s) return i(H(s.error));
|
|
15019
15121
|
let c = [
|
|
15020
15122
|
...o.slice(0, s.index),
|
|
15021
15123
|
a.node,
|
|
@@ -15024,13 +15126,13 @@ function Os(e, t, n, r) {
|
|
|
15024
15126
|
return {
|
|
15025
15127
|
pages: is(e, r.id, c),
|
|
15026
15128
|
ds: t,
|
|
15027
|
-
result:
|
|
15129
|
+
result: U(`Added a new ${a.node.name.toLowerCase()} to ${r.name}.${Ts(a.dropped)}`, a.node.id)
|
|
15028
15130
|
};
|
|
15029
15131
|
}
|
|
15030
15132
|
case "replaceSection": {
|
|
15031
15133
|
let r = rs(e, n.sectionId);
|
|
15032
15134
|
if (!r) return i(as(n.sectionId));
|
|
15033
|
-
let a =
|
|
15135
|
+
let a = W(r.page)[r.index], o = Cs(e);
|
|
15034
15136
|
o.delete(a.id), Bo(a).forEach((e) => o.delete(e));
|
|
15035
15137
|
let s;
|
|
15036
15138
|
try {
|
|
@@ -15039,36 +15141,36 @@ function Os(e, t, n, r) {
|
|
|
15039
15141
|
id: a.id
|
|
15040
15142
|
}, o, { section: !0 });
|
|
15041
15143
|
} catch (e) {
|
|
15042
|
-
return i(
|
|
15144
|
+
return i(H(e.message));
|
|
15043
15145
|
}
|
|
15044
|
-
let c =
|
|
15146
|
+
let c = V(a) ? " It is hand-designed now, so it's changed element by element instead of through its fields." : "";
|
|
15045
15147
|
return {
|
|
15046
15148
|
pages: Es(e, r.page, r.index, {
|
|
15047
15149
|
...s.node,
|
|
15048
15150
|
id: a.id
|
|
15049
15151
|
}),
|
|
15050
15152
|
ds: t,
|
|
15051
|
-
result:
|
|
15153
|
+
result: U(`Rebuilt the ${os(a).toLowerCase()} section on ${r.page.name}.${c}${Ts(s.dropped)}`, a.id)
|
|
15052
15154
|
};
|
|
15053
15155
|
}
|
|
15054
15156
|
case "removeSection": {
|
|
15055
15157
|
let r = rs(e, n.sectionId);
|
|
15056
15158
|
if (!r) return i(as(n.sectionId));
|
|
15057
|
-
let a =
|
|
15159
|
+
let a = W(r.page)[r.index];
|
|
15058
15160
|
return {
|
|
15059
|
-
pages: is(e, r.page.id,
|
|
15161
|
+
pages: is(e, r.page.id, W(r.page).filter((e, t) => t !== r.index)),
|
|
15060
15162
|
ds: t,
|
|
15061
|
-
result:
|
|
15163
|
+
result: U(`Removed the ${os(a).toLowerCase()} section from ${r.page.name}.`)
|
|
15062
15164
|
};
|
|
15063
15165
|
}
|
|
15064
15166
|
case "moveSection": {
|
|
15065
15167
|
let r = rs(e, n.sectionId);
|
|
15066
15168
|
if (!r) return i(as(n.sectionId));
|
|
15067
|
-
if (n.index === void 0 && n.afterSectionId === void 0) return i(
|
|
15068
|
-
let a =
|
|
15069
|
-
if (n.afterSectionId === n.sectionId) return i(
|
|
15070
|
-
let o =
|
|
15071
|
-
if ("error" in s) return i(
|
|
15169
|
+
if (n.index === void 0 && n.afterSectionId === void 0) return i(H("I need to know where to move it to."));
|
|
15170
|
+
let a = W(r.page)[r.index];
|
|
15171
|
+
if (n.afterSectionId === n.sectionId) return i(H("A section can't be moved after itself."));
|
|
15172
|
+
let o = W(r.page).filter((e, t) => t !== r.index), s = ss(o, n, o.length);
|
|
15173
|
+
if ("error" in s) return i(H(s.error));
|
|
15072
15174
|
let c = [
|
|
15073
15175
|
...o.slice(0, s.index),
|
|
15074
15176
|
a,
|
|
@@ -15077,13 +15179,13 @@ function Os(e, t, n, r) {
|
|
|
15077
15179
|
return {
|
|
15078
15180
|
pages: is(e, r.page.id, c),
|
|
15079
15181
|
ds: t,
|
|
15080
|
-
result:
|
|
15182
|
+
result: U(`Moved the ${os(a).toLowerCase()} section on ${r.page.name}.`, a.id)
|
|
15081
15183
|
};
|
|
15082
15184
|
}
|
|
15083
15185
|
case "duplicateSection": {
|
|
15084
15186
|
let r = rs(e, n.sectionId);
|
|
15085
15187
|
if (!r) return i(as(n.sectionId));
|
|
15086
|
-
let a =
|
|
15188
|
+
let a = W(r.page), o = a[r.index], s = D("section"), c = V(o), l = c ? Zi(c, s) : {
|
|
15087
15189
|
...ls(o),
|
|
15088
15190
|
id: s
|
|
15089
15191
|
};
|
|
@@ -15094,7 +15196,7 @@ function Os(e, t, n, r) {
|
|
|
15094
15196
|
...a.slice(r.index + 1)
|
|
15095
15197
|
]),
|
|
15096
15198
|
ds: t,
|
|
15097
|
-
result:
|
|
15199
|
+
result: U(`Copied the ${os(o).toLowerCase()} section on ${r.page.name}.`, s)
|
|
15098
15200
|
};
|
|
15099
15201
|
}
|
|
15100
15202
|
case "setBrand": {
|
|
@@ -15107,8 +15209,8 @@ function Os(e, t, n, r) {
|
|
|
15107
15209
|
}
|
|
15108
15210
|
case "addPage": {
|
|
15109
15211
|
let a = n.name.trim();
|
|
15110
|
-
if (!a) return i(
|
|
15111
|
-
if (e.some((e) => e.name.trim().toLowerCase() === a.toLowerCase())) return i(
|
|
15212
|
+
if (!a) return i(H("The new page needs a name."));
|
|
15213
|
+
if (e.some((e) => e.name.trim().toLowerCase() === a.toLowerCase())) return i(H(`There's already a page called "${a}".`));
|
|
15112
15214
|
let o = [], s = "";
|
|
15113
15215
|
if (n.templateId) {
|
|
15114
15216
|
let e = null;
|
|
@@ -15134,20 +15236,20 @@ function Os(e, t, n, r) {
|
|
|
15134
15236
|
return {
|
|
15135
15237
|
pages: [...e, f],
|
|
15136
15238
|
ds: t,
|
|
15137
|
-
result:
|
|
15239
|
+
result: U(`Added a new page called ${a}.${s}`)
|
|
15138
15240
|
};
|
|
15139
15241
|
}
|
|
15140
15242
|
case "renamePage": {
|
|
15141
15243
|
let r = ns(e, n.pageId);
|
|
15142
|
-
if (!r) return i(
|
|
15244
|
+
if (!r) return i(H(`I couldn't find a page called "${n.pageId}".`));
|
|
15143
15245
|
let a = n.name.trim();
|
|
15144
|
-
return e.some((e) => e.id !== r.id && e.name.trim().toLowerCase() === a.toLowerCase()) ? i(
|
|
15246
|
+
return e.some((e) => e.id !== r.id && e.name.trim().toLowerCase() === a.toLowerCase()) ? i(H(`There's already a page called "${a}".`)) : {
|
|
15145
15247
|
pages: e.map((e) => e.id === r.id ? {
|
|
15146
15248
|
...e,
|
|
15147
15249
|
name: a
|
|
15148
15250
|
} : e),
|
|
15149
15251
|
ds: t,
|
|
15150
|
-
result:
|
|
15252
|
+
result: U(`Renamed ${r.name} to ${a}.`)
|
|
15151
15253
|
};
|
|
15152
15254
|
}
|
|
15153
15255
|
}
|
|
@@ -15158,14 +15260,14 @@ function ks(e, t, n, r = {}) {
|
|
|
15158
15260
|
let t = Zo.safeParse(e);
|
|
15159
15261
|
if (!t.success) {
|
|
15160
15262
|
let t = ds(e) && typeof e.op == "string" ? e.op : "";
|
|
15161
|
-
o.push(
|
|
15263
|
+
o.push(H(t ? `I didn't understand one of the "${t}" changes, so I skipped it.` : "I didn't understand one of the changes, so I skipped it."));
|
|
15162
15264
|
continue;
|
|
15163
15265
|
}
|
|
15164
15266
|
try {
|
|
15165
15267
|
let e = Os(i, a, t.data, r);
|
|
15166
15268
|
i = e.pages, a = e.ds, o.push(e.result);
|
|
15167
15269
|
} catch {
|
|
15168
|
-
o.push(
|
|
15270
|
+
o.push(H("Something went wrong with one of the changes, so I skipped it."));
|
|
15169
15271
|
}
|
|
15170
15272
|
}
|
|
15171
15273
|
return {
|
|
@@ -15307,14 +15409,14 @@ function zs(e, t) {
|
|
|
15307
15409
|
}
|
|
15308
15410
|
return null;
|
|
15309
15411
|
}, i = (e) => {
|
|
15310
|
-
let t = r(e), n = t &&
|
|
15311
|
-
return n && Pi(n.kind) ? `the ${
|
|
15412
|
+
let t = r(e), n = t && V(t.s);
|
|
15413
|
+
return n && Pi(n.kind) ? `the ${B(n.kind).label.toLowerCase()} section` : "a section";
|
|
15312
15414
|
}, a = (e) => {
|
|
15313
15415
|
let t = r(e);
|
|
15314
15416
|
return t ? ` on ${t.p.name}` : "";
|
|
15315
15417
|
};
|
|
15316
15418
|
switch (e.op) {
|
|
15317
|
-
case "addSection": return `Add a ${Pi(e.kind) ?
|
|
15419
|
+
case "addSection": return `Add a ${Pi(e.kind) ? B(e.kind).label.toLowerCase() : e.kind} section to ${n(e.pageId)?.name ?? "a page"}`;
|
|
15318
15420
|
case "updateSection": return `Change ${[
|
|
15319
15421
|
e.content && "the wording",
|
|
15320
15422
|
e.variant && "the layout",
|
|
@@ -18596,13 +18698,13 @@ function Nl(e, t) {
|
|
|
18596
18698
|
}));
|
|
18597
18699
|
}
|
|
18598
18700
|
function Pl(e) {
|
|
18599
|
-
let t = Dl(e), n = kt(t.links, 20).filter((e) => e && e.network in
|
|
18701
|
+
let t = Dl(e), n = kt(t.links, 20).filter((e) => e && e.network in F), r = Ot(t.size, 20, 96, 40), i = t.shape === "square" || t.shape === "plain" ? t.shape : "circle", a = t.colorMode === "mono";
|
|
18600
18702
|
return n.length ? {
|
|
18601
18703
|
...A("nav", {
|
|
18602
18704
|
class: `plx-el plx-social plx-social--${i}`,
|
|
18603
18705
|
"aria-label": "Social links"
|
|
18604
18706
|
}, n.map((e) => {
|
|
18605
|
-
let t =
|
|
18707
|
+
let t = F[e.network], n = M(e.url), r = /^https?:/i.test(n);
|
|
18606
18708
|
return {
|
|
18607
18709
|
...A("a", {
|
|
18608
18710
|
href: n,
|
|
@@ -19223,7 +19325,7 @@ function Su(e, t) {
|
|
|
19223
19325
|
let [r, i, a] = bu(n);
|
|
19224
19326
|
return e === "bg" ? a >= .55 ? xu(r, Math.min(i, .35) * .6, .045 + (a - .55) * .2) : null : e === "text" || e === "border" ? a >= .5 ? null : i > .25 ? xu(r, Math.min(i, .7), Math.max(a, .64)) : e === "border" ? xu(r, i, Math.max(a, .55)) : xu(r, i * .8, Math.min(.93, .93 - a * .5)) : e === "btnbg" ? a < .2 && i < .25 ? xu(r, i * .3, .92) : a < .34 ? xu(r, i, .44) : null : e === "btntext" ? a > .8 ? xu(r, Math.min(i, .3), .1) : null : a > .6 ? xu(r, i * .5, .2 + (a - .6) * .15) : null;
|
|
19225
19327
|
}
|
|
19226
|
-
var Cu = "Arial, Helvetica, sans-serif",
|
|
19328
|
+
var Cu = "Arial, Helvetica, sans-serif", G = (e) => `${Math.round(e * 100) / 100}px`;
|
|
19227
19329
|
function wu(e) {
|
|
19228
19330
|
if (typeof e == "number" && Number.isFinite(e)) return e;
|
|
19229
19331
|
if (typeof e != "string") return;
|
|
@@ -19317,10 +19419,10 @@ function Du(e, t = {}) {
|
|
|
19317
19419
|
};
|
|
19318
19420
|
}, ee = (e) => vt(e).replace(/\r?\n/g, "<br>"), y = (e) => e.replace(/\s+/g, " ").trim(), te = (e) => Eu(e.padding, e.paddingTop, e.paddingRight, e.paddingBottom, e.paddingLeft), S = (e) => e === "center" ? "center" : e === "right" || e === "flex-end" ? "right" : e === "left" || e === "flex-start" ? "left" : void 0, C = (e) => {
|
|
19319
19421
|
let t = f(e.borderWidth), n = u(e.borderColor), r = e.borderStyle && e.borderStyle !== "none" ? e.borderStyle : void 0;
|
|
19320
|
-
return t && n && r ? `border:${
|
|
19422
|
+
return t && n && r ? `border:${G(t)} ${r} ${n};` : "";
|
|
19321
19423
|
}, w = (e) => {
|
|
19322
19424
|
let t = f(e.borderRadius);
|
|
19323
|
-
return t ? `border-radius:${
|
|
19425
|
+
return t ? `border-radius:${G(Math.min(t, 999))};` : "";
|
|
19324
19426
|
}, ne = (e) => f(e.gap) ?? 0, T = (e) => {
|
|
19325
19427
|
if (typeof e.backgroundGradient != "string") return "";
|
|
19326
19428
|
let t = /^\s*linear-gradient\(\s*((?:\d{1,3}deg)|(?:to (?:top|bottom|left|right)(?: (?:left|right|top|bottom))?))\s*,(.+)\)\s*$/i.exec(e.backgroundGradient);
|
|
@@ -19343,10 +19445,10 @@ function Du(e, t = {}) {
|
|
|
19343
19445
|
case "badge": {
|
|
19344
19446
|
let t = _(e, r), n = u(r.textColor) ?? u("var(--color-text-primary)") ?? "#111827", i = e.type === "heading" ? `h${Math.min(6, Math.max(1, Math.round(Number(e.props?.level) || 2)))}` : "p", a = typeof e.content == "string" ? e.content : "";
|
|
19345
19447
|
o.push(y(a));
|
|
19346
|
-
let s = S(r.textAlign) ?? "left", d = f(r.letterSpacing), p = `margin:0;padding:0;font-family:${t.family};font-size:${
|
|
19448
|
+
let s = S(r.textAlign) ?? "left", d = f(r.letterSpacing), p = `margin:0;padding:0;font-family:${t.family};font-size:${G(t.size)};line-height:${G(t.lh)};font-weight:${t.weight};color:${n};text-align:${s};${r.isItalic ? "font-style:italic;" : ""}${r.isUnderline ? "text-decoration:underline;" : ""}${r.textTransform && r.textTransform !== "none" ? `text-transform:${r.textTransform};` : ""}${d ? `letter-spacing:${G(d)};` : ""}`, m = u(r.backgroundColor), h = `<${i}${l(c("text", n))} style="${j(p)}">${ee(a)}</${i}>`;
|
|
19347
19449
|
if (e.type === "badge" || m) {
|
|
19348
19450
|
let [e, t, n, i] = te(r);
|
|
19349
|
-
return `<table role="presentation" cellpadding="0" cellspacing="0" border="0"${s === "left" ? "" : ` align="${s}"`}><tr><td${m ? ` bgcolor="${m}"` : ""}${l(c("bg", m))} style="${j(`${m ? `background-color:${m};` : ""}padding:${
|
|
19451
|
+
return `<table role="presentation" cellpadding="0" cellspacing="0" border="0"${s === "left" ? "" : ` align="${s}"`}><tr><td${m ? ` bgcolor="${m}"` : ""}${l(c("bg", m))} style="${j(`${m ? `background-color:${m};` : ""}padding:${G(e)} ${G(t)} ${G(n)} ${G(i)};${w(r)}${C(r)}`)}">${h}</td></tr></table>`;
|
|
19350
19452
|
}
|
|
19351
19453
|
return h;
|
|
19352
19454
|
}
|
|
@@ -19359,21 +19461,21 @@ function Du(e, t = {}) {
|
|
|
19359
19461
|
p || 14,
|
|
19360
19462
|
m || 28
|
|
19361
19463
|
], b = S(r.textAlign) ?? S(r.alignSelf) ?? "left", x = r.backgroundColor === "transparent", ne = w(r) || "border-radius:8px;", T = C(r), E = `${x ? "" : `background-color:${a};`}${ne}${T}`, re = x ? null : Su("btnbg", a), ie = re ? yu(re) : null, ae = !!ie && bu(ie)[2] > .8 && !!Su("btntext", s), oe = r.widthSizing === "fill" || r.width === "100%" || r.isFullWidth;
|
|
19362
|
-
return `<table role="presentation" cellpadding="0" cellspacing="0" border="0"${oe ? " width=\"100%\"" : ""} align="${b}"><tr><td${x ? "" : ` bgcolor="${a}"`}${l([x ? "" : c("btnbg", a), T && u(r.borderColor) ? c("border", u(r.borderColor)) : ""].filter(Boolean).join(" "))} align="center" style="${j(E)}"><a href="${j(i)}" target="_blank"${l(x ? c("text", u(r.textColor) ?? a) : ae ? c("btntext", s) : "")} style="${j(`display:${oe ? "block" : "inline-block"};padding:${
|
|
19464
|
+
return `<table role="presentation" cellpadding="0" cellspacing="0" border="0"${oe ? " width=\"100%\"" : ""} align="${b}"><tr><td${x ? "" : ` bgcolor="${a}"`}${l([x ? "" : c("btnbg", a), T && u(r.borderColor) ? c("border", u(r.borderColor)) : ""].filter(Boolean).join(" "))} align="center" style="${j(E)}"><a href="${j(i)}" target="_blank"${l(x ? c("text", u(r.textColor) ?? a) : ae ? c("btntext", s) : "")} style="${j(`display:${oe ? "block" : "inline-block"};padding:${G(h)} ${G(g)} ${G(v)} ${G(ee)};font-family:${t.family};font-size:${G(t.size)};line-height:${G(Math.round(t.size * 1.2))};font-weight:${t.weight === "400" ? "600" : t.weight};color:${x ? u(r.textColor) ?? a : s};text-decoration:none;white-space:nowrap;${ne}`)}">${vt(n)}</a></td></tr></table>`;
|
|
19363
19465
|
}
|
|
19364
19466
|
case "image": {
|
|
19365
19467
|
let i = xt(e.props?.src);
|
|
19366
19468
|
if (!i) return "";
|
|
19367
|
-
let a = typeof e.props?.alt == "string" ? e.props.alt : "", o = f(r.customWidth ?? r.width), s = Tu(r.customWidth ?? r.width), c = Math.round(Math.min(n, o ?? (s ? n * s / 100 : n))), l = S(r.alignSelf) ?? S(r.textAlign), u = `display:block;border:0;outline:none;text-decoration:none;width:${
|
|
19469
|
+
let a = typeof e.props?.alt == "string" ? e.props.alt : "", o = f(r.customWidth ?? r.width), s = Tu(r.customWidth ?? r.width), c = Math.round(Math.min(n, o ?? (s ? n * s / 100 : n))), l = S(r.alignSelf) ?? S(r.textAlign), u = `display:block;border:0;outline:none;text-decoration:none;width:${G(c)};max-width:100%;height:auto;${w(r)}`, d = t.dark === "off" ? "" : xt(e.props?.srcDark), p = d ? `<img class="plx-light" src="${j(i)}" alt="${j(a)}" width="${c}" style="${j(u)}"><img class="plx-dark" src="${j(d)}" alt="${j(a)}" width="${c}" style="${j(`${u}display:none;max-height:0;overflow:hidden;`)}">` : `<img src="${j(i)}" alt="${j(a)}" width="${c}" style="${j(u)}">`;
|
|
19368
19470
|
return l && l !== "left" ? `<table role="presentation" cellpadding="0" cellspacing="0" border="0" align="${l}"><tr><td>${p}</td></tr></table>` : p;
|
|
19369
19471
|
}
|
|
19370
19472
|
case "divider": {
|
|
19371
19473
|
let e = u(r.borderColor) ?? u("var(--color-border-default)") ?? "#e5e7eb", t = f(r.borderWidth?.toString().split(/\s+/).find((e) => wu(e))) ?? 1;
|
|
19372
|
-
return `<table role="presentation" width="100%" cellpadding="0" cellspacing="0" border="0"><tr><td height="${t}"${l(c("line", e))} style="font-size:1px;line-height:1px;border-top:${
|
|
19474
|
+
return `<table role="presentation" width="100%" cellpadding="0" cellspacing="0" border="0"><tr><td height="${t}"${l(c("line", e))} style="font-size:1px;line-height:1px;border-top:${G(t)} solid ${e};"> </td></tr></table>`;
|
|
19373
19475
|
}
|
|
19374
19476
|
case "spacer": {
|
|
19375
19477
|
let e = Math.min(400, Math.max(1, f(r.height) ?? f(r.minHeight) ?? 24));
|
|
19376
|
-
return `<table role="presentation" width="100%" cellpadding="0" cellspacing="0" border="0"><tr><td height="${e}" style="height:${
|
|
19478
|
+
return `<table role="presentation" width="100%" cellpadding="0" cellspacing="0" border="0"><tr><td height="${e}" style="height:${G(e)};font-size:1px;line-height:${G(e)};"> </td></tr></table>`;
|
|
19377
19479
|
}
|
|
19378
19480
|
default: return re(e, n);
|
|
19379
19481
|
}
|
|
@@ -19386,17 +19488,17 @@ function Du(e, t = {}) {
|
|
|
19386
19488
|
return n === void 0 ? r !== void 0 && r < 99 ? g * r / 100 : void 0 : n;
|
|
19387
19489
|
}), t = e.reduce((e, t) => e + (t ?? 0), 0), n = e.filter((e) => e === void 0).length, c = n ? Math.max(40, (g - t - _ * (i.length - 1)) / n) : 0, l = i.map((t, n) => {
|
|
19388
19490
|
let a = Math.floor(e[n] ?? c), o = n === i.length - 1, s = E(t, a);
|
|
19389
|
-
return `<td${r.stackOnMobile === !1 ? "" : " class=\"plx-col\""} width="${a}" valign="${y}" style="${j(`width:${
|
|
19491
|
+
return `<td${r.stackOnMobile === !1 ? "" : " class=\"plx-col\""} width="${a}" valign="${y}" style="${j(`width:${G(a)};${o ? "" : `padding-right:${G(_)};`}vertical-align:${y};`)}">${s}</td>`;
|
|
19390
19492
|
});
|
|
19391
|
-
b = `<tr><td style="${j(`padding:${
|
|
19493
|
+
b = `<tr><td style="${j(`padding:${G(a)} ${G(o)} ${G(s)} ${G(d)};`)}"><table role="presentation" width="100%" cellpadding="0" cellspacing="0" border="0"><tr>${l.join("")}</tr></table></td></tr>`;
|
|
19392
19494
|
} else b = i.map((e, t) => {
|
|
19393
19495
|
let n = e.styles ?? {}, r = S(n.alignSelf) ?? ee ?? (e.type === "button" || e.type, void 0), c = r === "center" || n.marginLeft === "auto" && n.marginRight === "auto" || n.margin === "0 auto" ? " align=\"center\"" : r === "right" || n.marginLeft === "auto" ? " align=\"right\"" : "", l = E(e, g);
|
|
19394
19496
|
if (!l) return "";
|
|
19395
19497
|
let u = t === 0 ? a : _, [f, , p] = Eu(n.margin, n.marginTop, n.marginRight, n.marginBottom, n.marginLeft);
|
|
19396
|
-
return `<tr><td${c} style="${j(`padding:${
|
|
19498
|
+
return `<tr><td${c} style="${j(`padding:${G(u + f)} ${G(o)} ${G(t === i.length - 1 ? s + p : p)} ${G(d)};`)}">${l}</td></tr>`;
|
|
19397
19499
|
}).join("");
|
|
19398
|
-
else a + s > 0 && (b = `<tr><td height="${a + s}" style="font-size:1px;line-height:${
|
|
19399
|
-
let x = `${p ? `background-color:${p};` : ""}${T(r)}${w(r)}${C(r)}`, re = n ? " width=\"100%\"" : ` width="${Math.round(h)}"`, ie = n ? "" : `max-width:${
|
|
19500
|
+
else a + s > 0 && (b = `<tr><td height="${a + s}" style="font-size:1px;line-height:${G(a + s)};"> </td></tr>`);
|
|
19501
|
+
let x = `${p ? `background-color:${p};` : ""}${T(r)}${w(r)}${C(r)}`, re = n ? " width=\"100%\"" : ` width="${Math.round(h)}"`, ie = n ? "" : `max-width:${G(h)};width:100%;`;
|
|
19400
19502
|
return `<table role="presentation"${re}${p ? ` bgcolor="${p}"` : ""}${l(c("bg", p))} cellpadding="0" cellspacing="0" border="0" style="${j(`${ie}${x}`)}">${b}</table>`;
|
|
19401
19503
|
}
|
|
19402
19504
|
let ie = n.rootNode, oe = u((ie.styles ?? {}).backgroundColor) ?? u("var(--color-bg-canvas)") ?? "#ffffff", se = (ie.children ?? []).filter((e) => hu(e.type)).map((e) => {
|
|
@@ -19492,7 +19594,7 @@ var ju = 1400, Mu = (e) => {
|
|
|
19492
19594
|
sm: "0 1px 3px rgba(15,23,42,0.14)",
|
|
19493
19595
|
md: "0 6px 16px rgba(15,23,42,0.18)",
|
|
19494
19596
|
lg: "0 16px 40px rgba(15,23,42,0.24)"
|
|
19495
|
-
},
|
|
19597
|
+
}, K = (e) => typeof e == "number" && Number.isFinite(e) ? e : void 0, q = (e) => typeof e == "string" && e ? e : void 0, Pu = (e) => `${Math.round(e * 100) / 100}px`, Fu = [
|
|
19496
19598
|
{
|
|
19497
19599
|
name: "desktop",
|
|
19498
19600
|
k: he.desktop / ju,
|
|
@@ -19515,13 +19617,13 @@ function Iu(e, t, n) {
|
|
|
19515
19617
|
}
|
|
19516
19618
|
function Lu(e, t) {
|
|
19517
19619
|
let { nodes: n } = e, r = /* @__PURE__ */ new Set(), i = (e) => {
|
|
19518
|
-
let t = {}, n =
|
|
19620
|
+
let t = {}, n = K(e.borderWidth);
|
|
19519
19621
|
n && n > 0 && (t.borderWidth = Pu(n), t.borderStyle = [
|
|
19520
19622
|
"solid",
|
|
19521
19623
|
"dashed",
|
|
19522
19624
|
"dotted"
|
|
19523
|
-
].includes(String(e.borderStyle)) ? e.borderStyle : "solid", t.borderColor =
|
|
19524
|
-
let r =
|
|
19625
|
+
].includes(String(e.borderStyle)) ? e.borderStyle : "solid", t.borderColor = q(e.borderColor) ?? "#0f172a");
|
|
19626
|
+
let r = K(e.borderRadius);
|
|
19525
19627
|
r !== void 0 && (t.borderRadius = Pu(r));
|
|
19526
19628
|
let i = Nu[String(e.boxShadowPreset)];
|
|
19527
19629
|
return i && (t.boxShadow = i), t;
|
|
@@ -19538,11 +19640,11 @@ function Lu(e, t) {
|
|
|
19538
19640
|
}
|
|
19539
19641
|
};
|
|
19540
19642
|
}, o = (e) => ({
|
|
19541
|
-
x:
|
|
19542
|
-
y:
|
|
19543
|
-
width:
|
|
19544
|
-
height:
|
|
19545
|
-
fontSize:
|
|
19643
|
+
x: K(e.x),
|
|
19644
|
+
y: K(e.y),
|
|
19645
|
+
width: K(e.width),
|
|
19646
|
+
height: K(e.height),
|
|
19647
|
+
fontSize: K(e.fontSize)
|
|
19546
19648
|
}), s = (e) => {
|
|
19547
19649
|
let t = e.id;
|
|
19548
19650
|
for (; r.has(t);) t = `${t}-x`;
|
|
@@ -19581,7 +19683,7 @@ function Lu(e, t) {
|
|
|
19581
19683
|
return {
|
|
19582
19684
|
id: s(e),
|
|
19583
19685
|
type: t,
|
|
19584
|
-
name:
|
|
19686
|
+
name: q(e.props.name) ?? e.type,
|
|
19585
19687
|
...c
|
|
19586
19688
|
};
|
|
19587
19689
|
};
|
|
@@ -19590,7 +19692,7 @@ function Lu(e, t) {
|
|
|
19590
19692
|
let t = /^h[1-6]$/.test(String(r.htmlTag)) ? Number(String(r.htmlTag)[1]) : null;
|
|
19591
19693
|
return {
|
|
19592
19694
|
...u(t ? "heading" : "paragraph", {
|
|
19593
|
-
textColor:
|
|
19695
|
+
textColor: q(r.color),
|
|
19594
19696
|
textAlign: [
|
|
19595
19697
|
"left",
|
|
19596
19698
|
"center",
|
|
@@ -19612,8 +19714,8 @@ function Lu(e, t) {
|
|
|
19612
19714
|
};
|
|
19613
19715
|
case "Button": return {
|
|
19614
19716
|
...u("button", {
|
|
19615
|
-
backgroundColor:
|
|
19616
|
-
textColor:
|
|
19717
|
+
backgroundColor: q(r.backgroundColor),
|
|
19718
|
+
textColor: q(r.color),
|
|
19617
19719
|
fontWeight: String(r.fontWeight ?? 600),
|
|
19618
19720
|
display: "flex",
|
|
19619
19721
|
alignItems: "center",
|
|
@@ -19627,7 +19729,7 @@ function Lu(e, t) {
|
|
|
19627
19729
|
display: "flex",
|
|
19628
19730
|
flexDirection: "row",
|
|
19629
19731
|
layoutMode: "flow",
|
|
19630
|
-
backgroundColor:
|
|
19732
|
+
backgroundColor: q(r.backgroundColor),
|
|
19631
19733
|
...c ? {
|
|
19632
19734
|
position: "absolute",
|
|
19633
19735
|
x: 0,
|
|
@@ -19641,7 +19743,7 @@ function Lu(e, t) {
|
|
|
19641
19743
|
width: void 0
|
|
19642
19744
|
} : o.geo, f = a({
|
|
19643
19745
|
...d,
|
|
19644
|
-
gap:
|
|
19746
|
+
gap: K(r.gap)
|
|
19645
19747
|
}, c ? !0 : o.free, {
|
|
19646
19748
|
...o.base,
|
|
19647
19749
|
...i(r),
|
|
@@ -19659,7 +19761,7 @@ function Lu(e, t) {
|
|
|
19659
19761
|
...u("video"),
|
|
19660
19762
|
props: {
|
|
19661
19763
|
url: String(e.props.url ?? ""),
|
|
19662
|
-
poster:
|
|
19764
|
+
poster: q(e.props.coverImage),
|
|
19663
19765
|
ratio: "16:9"
|
|
19664
19766
|
}
|
|
19665
19767
|
} : {
|
|
@@ -19671,7 +19773,7 @@ function Lu(e, t) {
|
|
|
19671
19773
|
};
|
|
19672
19774
|
case "Menu": return {
|
|
19673
19775
|
...u("menu", {
|
|
19674
|
-
textColor:
|
|
19776
|
+
textColor: q(r.color),
|
|
19675
19777
|
fontSize: void 0
|
|
19676
19778
|
}),
|
|
19677
19779
|
props: {
|
|
@@ -19688,7 +19790,7 @@ function Lu(e, t) {
|
|
|
19688
19790
|
}, u = (e, t) => {
|
|
19689
19791
|
let n = t.filter((e) => e.type === "Input");
|
|
19690
19792
|
if (!n.length) return null;
|
|
19691
|
-
let r = n.slice().sort((e, t) => (
|
|
19793
|
+
let r = n.slice().sort((e, t) => (K(e.styles.y) ?? 0) - (K(t.styles.y) ?? 0) || (K(e.styles.x) ?? 0) - (K(t.styles.x) ?? 0)), i = r.map((e) => o(e.styles)), c = Math.max(...i.map((e) => (e.y ?? 0) + (e.height ?? 0))), l = t.find((e) => e.type === "Button" && (K(e.styles.y) ?? 0) >= c - 6), u = [...i, ...l ? [o(l.styles)] : []], d = Math.min(...u.map((e) => e.x ?? 0)), f = Math.min(...u.map((e) => e.y ?? 0)), p = Math.max(...u.map((e) => (e.x ?? 0) + (e.width ?? 0))) - d, m = r[0], h = r.map((e, t) => ({
|
|
19692
19794
|
id: `${String(e.props.label ?? "field").toLowerCase().replace(/[^a-z0-9]+/g, "-").replace(/^-|-$/g, "") || "field"}-${t + 1}`,
|
|
19693
19795
|
label: String(e.props.label ?? "Field"),
|
|
19694
19796
|
type: [
|
|
@@ -19697,7 +19799,7 @@ function Lu(e, t) {
|
|
|
19697
19799
|
"tel",
|
|
19698
19800
|
"textarea"
|
|
19699
19801
|
].includes(String(e.props.fieldType)) ? e.props.fieldType : "text",
|
|
19700
|
-
placeholder:
|
|
19802
|
+
placeholder: q(e.props.placeholder),
|
|
19701
19803
|
required: !!e.props.required
|
|
19702
19804
|
})), g = a({
|
|
19703
19805
|
x: d,
|
|
@@ -19707,7 +19809,7 @@ function Lu(e, t) {
|
|
|
19707
19809
|
position: "absolute",
|
|
19708
19810
|
horizontalConstraint: "left",
|
|
19709
19811
|
verticalConstraint: "top",
|
|
19710
|
-
textColor:
|
|
19812
|
+
textColor: q(m.styles.color),
|
|
19711
19813
|
padding: "0px"
|
|
19712
19814
|
});
|
|
19713
19815
|
return {
|
|
@@ -19727,18 +19829,18 @@ function Lu(e, t) {
|
|
|
19727
19829
|
}, d = e.pageOrder.map((e) => n[e]).filter((e) => !!e && e.type === "Section").map((e) => {
|
|
19728
19830
|
let t = e.styles, r = e.children.map((e) => n[e]).filter(Boolean), i = u(e, r), o = r.filter((e) => !i?.consumed.has(e.id)).map((t) => l(t, e)).filter((e) => !!e);
|
|
19729
19831
|
i && o.push(i.node);
|
|
19730
|
-
let c =
|
|
19832
|
+
let c = K(t.height) ?? 400, d = a({ minHeight: c }, !1, {
|
|
19731
19833
|
layoutMode: "free",
|
|
19732
|
-
backgroundColor:
|
|
19834
|
+
backgroundColor: q(t.backgroundColor),
|
|
19733
19835
|
...t.pinned === "true" ? { pinned: !0 } : {},
|
|
19734
|
-
backgroundImage:
|
|
19836
|
+
backgroundImage: q(t.backgroundImage),
|
|
19735
19837
|
backgroundSize: t.backgroundImage ? "cover" : void 0,
|
|
19736
19838
|
backgroundPosition: t.backgroundImage ? "center" : void 0
|
|
19737
19839
|
});
|
|
19738
19840
|
return {
|
|
19739
19841
|
id: s(e),
|
|
19740
19842
|
type: "section",
|
|
19741
|
-
name:
|
|
19843
|
+
name: q(e.props.name) ?? "Section",
|
|
19742
19844
|
...d,
|
|
19743
19845
|
children: o
|
|
19744
19846
|
};
|
|
@@ -20114,7 +20216,7 @@ var sd = /* @__PURE__ */ new Set(/* @__PURE__ */ "html.head.body.div.span.sectio
|
|
|
20114
20216
|
"class",
|
|
20115
20217
|
"title",
|
|
20116
20218
|
"hidden"
|
|
20117
|
-
]),
|
|
20219
|
+
]), J = /^\d{1,5}(?:\.\d+)?(?:px|%|em|rem)?$/, pd = /^[\w:.[\]-]{1,200}$/, md = /* @__PURE__ */ new Set([
|
|
20118
20220
|
"text",
|
|
20119
20221
|
"email",
|
|
20120
20222
|
"tel",
|
|
@@ -20144,8 +20246,8 @@ var sd = /* @__PURE__ */ new Set(/* @__PURE__ */ "html.head.body.div.span.sectio
|
|
|
20144
20246
|
alt: "plain",
|
|
20145
20247
|
loading: /^(lazy|eager)$/,
|
|
20146
20248
|
decoding: /^(async|sync|auto)$/,
|
|
20147
|
-
width:
|
|
20148
|
-
height:
|
|
20249
|
+
width: J,
|
|
20250
|
+
height: J
|
|
20149
20251
|
},
|
|
20150
20252
|
video: {
|
|
20151
20253
|
src: "media",
|
|
@@ -20156,8 +20258,8 @@ var sd = /* @__PURE__ */ new Set(/* @__PURE__ */ "html.head.body.div.span.sectio
|
|
|
20156
20258
|
loop: "bool",
|
|
20157
20259
|
autoplay: "bool",
|
|
20158
20260
|
muted: "bool",
|
|
20159
|
-
width:
|
|
20160
|
-
height:
|
|
20261
|
+
width: J,
|
|
20262
|
+
height: J
|
|
20161
20263
|
},
|
|
20162
20264
|
button: {
|
|
20163
20265
|
type: /^(submit|button|reset)$/,
|
|
@@ -20225,8 +20327,8 @@ var sd = /* @__PURE__ */ new Set(/* @__PURE__ */ "html.head.body.div.span.sectio
|
|
|
20225
20327
|
name: pd
|
|
20226
20328
|
},
|
|
20227
20329
|
table: {
|
|
20228
|
-
width:
|
|
20229
|
-
height:
|
|
20330
|
+
width: J,
|
|
20331
|
+
height: J,
|
|
20230
20332
|
align: /^(left|center|right)$/,
|
|
20231
20333
|
cellpadding: /^\d{1,3}$/,
|
|
20232
20334
|
cellspacing: /^\d{1,3}$/,
|
|
@@ -20237,8 +20339,8 @@ var sd = /* @__PURE__ */ new Set(/* @__PURE__ */ "html.head.body.div.span.sectio
|
|
|
20237
20339
|
scope: /^(col|row|colgroup|rowgroup)$/,
|
|
20238
20340
|
colspan: /^\d{1,3}$/,
|
|
20239
20341
|
rowspan: /^\d{1,3}$/,
|
|
20240
|
-
width:
|
|
20241
|
-
height:
|
|
20342
|
+
width: J,
|
|
20343
|
+
height: J,
|
|
20242
20344
|
align: /^(left|center|right)$/,
|
|
20243
20345
|
valign: /^(top|middle|bottom|baseline)$/,
|
|
20244
20346
|
bgcolor: hd
|
|
@@ -20246,8 +20348,8 @@ var sd = /* @__PURE__ */ new Set(/* @__PURE__ */ "html.head.body.div.span.sectio
|
|
|
20246
20348
|
td: {
|
|
20247
20349
|
colspan: /^\d{1,3}$/,
|
|
20248
20350
|
rowspan: /^\d{1,3}$/,
|
|
20249
|
-
width:
|
|
20250
|
-
height:
|
|
20351
|
+
width: J,
|
|
20352
|
+
height: J,
|
|
20251
20353
|
align: /^(left|center|right)$/,
|
|
20252
20354
|
valign: /^(top|middle|bottom|baseline)$/,
|
|
20253
20355
|
bgcolor: hd
|
|
@@ -20314,7 +20416,7 @@ function Dd(e, t) {
|
|
|
20314
20416
|
let e = Cd(n, n.name === "loading" ? /^(lazy|eager)$/ : n.name === "referrerpolicy" ? /^[a-z-]{1,40}$/ : n.name === "allowfullscreen" ? "bool" : "plain");
|
|
20315
20417
|
e !== null && (t += ` ${n.name}${e}`);
|
|
20316
20418
|
} else if (n.name === "allow" && xd.test(e)) t += ` allow${Cd(n, "plain")}`;
|
|
20317
|
-
else if (n.name === "width" || n.name === "height")
|
|
20419
|
+
else if (n.name === "width" || n.name === "height") J.test(e) && (t += ` ${n.name}="${Bu(e)}"`);
|
|
20318
20420
|
else if (n.name === "class") t += ` class${Cd(n, "plain")}`;
|
|
20319
20421
|
else if (n.name === "style") {
|
|
20320
20422
|
let e = wd(n);
|
|
@@ -20543,7 +20645,7 @@ var Vd = {
|
|
|
20543
20645
|
checkout_flow: "checkout",
|
|
20544
20646
|
order_confirmation: "order confirmation",
|
|
20545
20647
|
order_tracking: "order tracking"
|
|
20546
|
-
}, Gd = (e) => !!e && typeof e == "object" && !Array.isArray(e),
|
|
20648
|
+
}, Gd = (e) => !!e && typeof e == "object" && !Array.isArray(e), Y = (e) => Gd(e) ? e : {}, X = (e, t = 500) => Array.isArray(e) ? e.slice(0, t) : [], Z = (e) => typeof e == "string" ? e : typeof e == "number" && Number.isFinite(e) ? String(e) : "", Kd = {
|
|
20547
20649
|
amp: "&",
|
|
20548
20650
|
lt: "<",
|
|
20549
20651
|
gt: ">",
|
|
@@ -20569,35 +20671,35 @@ var Vd = {
|
|
|
20569
20671
|
}
|
|
20570
20672
|
return Kd[t.toLowerCase()] ?? e;
|
|
20571
20673
|
});
|
|
20572
|
-
function
|
|
20674
|
+
function Jd(e) {
|
|
20573
20675
|
let t = /<(a|b|strong|i|em|u|s|span|font|ul|ol|li|img|sup|sub|mark|code)\b/i.test(e);
|
|
20574
20676
|
return {
|
|
20575
20677
|
text: qd(e.replace(/<\s*br\s*\/?>/gi, "\n").replace(/<\/(p|div|li|h[1-6])\s*>/gi, "\n").replace(/<[^>]*>/g, "")).replace(/[ \t\f\v]+/g, " ").replace(/ ?\n ?/g, "\n").replace(/\n{3,}/g, "\n\n").trim().slice(0, 2e4),
|
|
20576
20678
|
rich: t
|
|
20577
20679
|
};
|
|
20578
20680
|
}
|
|
20579
|
-
var
|
|
20580
|
-
let t =
|
|
20581
|
-
return t && t.length <= 300 && !
|
|
20582
|
-
},
|
|
20681
|
+
var Yd = /[;{}<>\\]|\/\*|javascript:|expression\s*\(|@import|behavior\s*:|-moz-binding/i, Xd = (e) => {
|
|
20682
|
+
let t = Z(e).trim();
|
|
20683
|
+
return t && t.length <= 300 && !Yd.test(t) ? t : void 0;
|
|
20684
|
+
}, Zd = /* @__PURE__ */ new Set([
|
|
20583
20685
|
"left",
|
|
20584
20686
|
"center",
|
|
20585
20687
|
"right",
|
|
20586
20688
|
"justify"
|
|
20587
|
-
]),
|
|
20689
|
+
]), Qd = /* @__PURE__ */ new Set([
|
|
20588
20690
|
"solid",
|
|
20589
20691
|
"dashed",
|
|
20590
20692
|
"dotted",
|
|
20591
20693
|
"none"
|
|
20592
|
-
]),
|
|
20694
|
+
]), $d = /* @__PURE__ */ new Set([
|
|
20593
20695
|
"none",
|
|
20594
20696
|
"uppercase",
|
|
20595
20697
|
"lowercase",
|
|
20596
20698
|
"capitalize"
|
|
20597
|
-
]),
|
|
20699
|
+
]), ef = (e) => {
|
|
20598
20700
|
let t = /url\(\s*(?:"([^"]*)"|'([^']*)'|([^)]*))\s*\)/i.exec(e), n = (t?.[1] ?? t?.[2] ?? t?.[3] ?? "").trim();
|
|
20599
20701
|
return n && xt(n) || void 0;
|
|
20600
|
-
},
|
|
20702
|
+
}, tf = /* @__PURE__ */ new Set([
|
|
20601
20703
|
"autoHeight",
|
|
20602
20704
|
"autoWidth",
|
|
20603
20705
|
"position",
|
|
@@ -20615,13 +20717,13 @@ var Jd = /[;{}<>\\]|\/\*|javascript:|expression\s*\(|@import|behavior\s*:|-moz-b
|
|
|
20615
20717
|
"verticalAlign",
|
|
20616
20718
|
"float"
|
|
20617
20719
|
]);
|
|
20618
|
-
function
|
|
20619
|
-
let t =
|
|
20720
|
+
function nf(e) {
|
|
20721
|
+
let t = Y(e), n = {}, r = [], i = (e, t) => {
|
|
20620
20722
|
t !== void 0 && (n[e] = t);
|
|
20621
20723
|
};
|
|
20622
20724
|
for (let [e, a] of Object.entries(t)) {
|
|
20623
|
-
if (a == null || a === "" ||
|
|
20624
|
-
let t =
|
|
20725
|
+
if (a == null || a === "" || tf.has(e)) continue;
|
|
20726
|
+
let t = Xd(a);
|
|
20625
20727
|
switch (e) {
|
|
20626
20728
|
case "color":
|
|
20627
20729
|
i("textColor", t);
|
|
@@ -20642,7 +20744,7 @@ function tf(e) {
|
|
|
20642
20744
|
i("letterSpacing", t);
|
|
20643
20745
|
break;
|
|
20644
20746
|
case "textTransform":
|
|
20645
|
-
t &&
|
|
20747
|
+
t && $d.has(t) && (n.textTransform = t);
|
|
20646
20748
|
break;
|
|
20647
20749
|
case "fontStyle":
|
|
20648
20750
|
t === "italic" && (n.isItalic = !0);
|
|
@@ -20651,7 +20753,7 @@ function tf(e) {
|
|
|
20651
20753
|
t && /underline/.test(t) && (n.isUnderline = !0);
|
|
20652
20754
|
break;
|
|
20653
20755
|
case "textAlign":
|
|
20654
|
-
t &&
|
|
20756
|
+
t && Zd.has(t) && (n.textAlign = t);
|
|
20655
20757
|
break;
|
|
20656
20758
|
case "backgroundColor":
|
|
20657
20759
|
i("backgroundColor", t);
|
|
@@ -20660,7 +20762,7 @@ function tf(e) {
|
|
|
20660
20762
|
case "backgroundImage":
|
|
20661
20763
|
if (t && /gradient\(/i.test(t)) n.backgroundGradient = t;
|
|
20662
20764
|
else if (t && /url\(/i.test(t)) {
|
|
20663
|
-
let i =
|
|
20765
|
+
let i = ef(t);
|
|
20664
20766
|
i ? (n.backgroundImage = i, n.backgroundSize ??= "cover", n.backgroundPosition ??= "center") : r.push(e);
|
|
20665
20767
|
} else e === "background" ? i("backgroundColor", t) : t && r.push(e);
|
|
20666
20768
|
break;
|
|
@@ -20698,7 +20800,7 @@ function tf(e) {
|
|
|
20698
20800
|
i("gap", t);
|
|
20699
20801
|
break;
|
|
20700
20802
|
case "borderStyle":
|
|
20701
|
-
t &&
|
|
20803
|
+
t && Qd.has(t) && (n.borderStyle = t);
|
|
20702
20804
|
break;
|
|
20703
20805
|
case "border": {
|
|
20704
20806
|
let i = t ? /^([\d.]+(?:px|rem|em)?)\s+(solid|dashed|dotted|none)\s*(.*)$/i.exec(t) : null;
|
|
@@ -20721,11 +20823,11 @@ function tf(e) {
|
|
|
20721
20823
|
unmapped: r
|
|
20722
20824
|
};
|
|
20723
20825
|
}
|
|
20724
|
-
var
|
|
20826
|
+
var rf = (e, ...t) => t.some((t) => Z(e[t]).trim() !== ""), Q = (e, t) => {
|
|
20725
20827
|
e.seen.has(t) || (e.seen.add(t), e.warnings.push(t));
|
|
20726
|
-
},
|
|
20727
|
-
function
|
|
20728
|
-
let r =
|
|
20828
|
+
}, af = (e) => e.replace(/([a-z0-9])([A-Z])/g, "$1-$2").replace(/[\s_]+/g, "-").toLowerCase();
|
|
20829
|
+
function of(e, t, n) {
|
|
20830
|
+
let r = nf(t.style), i = nf(t.styleTablet), a = nf(t.styleMobile), o = [.../* @__PURE__ */ new Set([
|
|
20729
20831
|
...r.unmapped,
|
|
20730
20832
|
...i.unmapped,
|
|
20731
20833
|
...a.unmapped
|
|
@@ -20737,7 +20839,7 @@ function af(e, t, n) {
|
|
|
20737
20839
|
responsive: Object.keys(s).length ? s : void 0
|
|
20738
20840
|
};
|
|
20739
20841
|
}
|
|
20740
|
-
function
|
|
20842
|
+
function sf(e, t) {
|
|
20741
20843
|
t !== "center" && t !== "right" || (!e.width && !e.widthSizing && (e.widthSizing = "hug"), e.marginLeft ||= "auto", !e.marginRight && t === "center" && (e.marginRight = "auto"));
|
|
20742
20844
|
}
|
|
20743
20845
|
var $ = (e, t, n, r, i = {}) => ({
|
|
@@ -20746,12 +20848,12 @@ var $ = (e, t, n, r, i = {}) => ({
|
|
|
20746
20848
|
name: n,
|
|
20747
20849
|
styles: r,
|
|
20748
20850
|
...i
|
|
20749
|
-
}),
|
|
20851
|
+
}), cf = {
|
|
20750
20852
|
layoutMode: "flow",
|
|
20751
20853
|
display: "flex",
|
|
20752
20854
|
flexDirection: "column",
|
|
20753
20855
|
width: "100%"
|
|
20754
|
-
},
|
|
20856
|
+
}, lf = {
|
|
20755
20857
|
1: "32px",
|
|
20756
20858
|
2: "24px",
|
|
20757
20859
|
3: "19px",
|
|
@@ -20759,45 +20861,45 @@ var $ = (e, t, n, r, i = {}) => ({
|
|
|
20759
20861
|
5: "13px",
|
|
20760
20862
|
6: "11px"
|
|
20761
20863
|
};
|
|
20762
|
-
function
|
|
20763
|
-
let r =
|
|
20864
|
+
function uf(e, t, n) {
|
|
20865
|
+
let r = Z(t.type), i = Y(t.attributes), { styles: a, responsive: o } = of(e, t, `${Wd[r] ?? r.replace(/_/g, " ")} block`), s = a.textAlign, c = (e, t, r = {}, i = a) => $(n, e, t, i, {
|
|
20764
20866
|
...o ? { responsive: o } : {},
|
|
20765
20867
|
...r
|
|
20766
20868
|
});
|
|
20767
20869
|
switch (r) {
|
|
20768
20870
|
case "heading": {
|
|
20769
|
-
let { text: n, rich: r } = Z(
|
|
20871
|
+
let { text: n, rich: r } = Jd(Z(i.text) || "Heading");
|
|
20770
20872
|
r && (e.approx = !0, Q(e, "Bold, italic and links inside text are simplified to plain text."));
|
|
20771
|
-
let o = /^h([1-6])$/i.exec(
|
|
20772
|
-
return l.fontSize ??=
|
|
20873
|
+
let o = /^h([1-6])$/i.exec(Z(i.headingType)), s = o ? Number(o[1]) : 2, l = { ...a };
|
|
20874
|
+
return l.fontSize ??= lf[s], l.fontWeight ??= "700", rf(Y(t.style), "margin", "marginBottom") || (l.marginBottom = "8px"), [c("heading", n.slice(0, 40) || "Heading", {
|
|
20773
20875
|
content: n,
|
|
20774
20876
|
props: { level: s }
|
|
20775
20877
|
}, l)];
|
|
20776
20878
|
}
|
|
20777
20879
|
case "paragraph":
|
|
20778
20880
|
case "text": {
|
|
20779
|
-
let s =
|
|
20881
|
+
let s = Z(i.text) || (r === "paragraph" ? "Paragraph text content." : ""), { rich: l } = Jd(s);
|
|
20780
20882
|
l && (e.approx = !0, Q(e, "Bold, italic and links inside text are simplified to plain text."));
|
|
20781
|
-
let u = s.split(/<\/p\s*>|(?:<br\s*\/?>\s*){2,}/i).map((e) =>
|
|
20782
|
-
return r === "paragraph" && !
|
|
20883
|
+
let u = s.split(/<\/p\s*>|(?:<br\s*\/?>\s*){2,}/i).map((e) => Jd(e).text).filter(Boolean), d = u.length ? u : [""], f = { ...a };
|
|
20884
|
+
return r === "paragraph" && !rf(Y(t.style), "margin", "marginBottom") && (f.marginBottom = "12px"), d.map((e, t) => t === 0 ? c("paragraph", e.slice(0, 40) || "Text", { content: e }, f) : $(`${n}-p${t + 1}`, "paragraph", e.slice(0, 40) || "Text", f, {
|
|
20783
20885
|
content: e,
|
|
20784
20886
|
...o ? { responsive: o } : {}
|
|
20785
20887
|
}));
|
|
20786
20888
|
}
|
|
20787
20889
|
case "button": {
|
|
20788
20890
|
let t = { ...a };
|
|
20789
|
-
|
|
20790
|
-
let n =
|
|
20891
|
+
sf(t, s), !t.widthSizing && !t.width && (t.widthSizing = "hug");
|
|
20892
|
+
let n = Z(i.href).trim();
|
|
20791
20893
|
return i.openInNewTab && (e.approx = !0, Q(e, "Buttons can't open in a new tab yet, so they open in the same one.")), [c("button", "Button", {
|
|
20792
|
-
content: Z(
|
|
20894
|
+
content: Jd(Z(i.text) || "Button").text,
|
|
20793
20895
|
props: { href: n ? M(n) : "#" }
|
|
20794
20896
|
}, t)];
|
|
20795
20897
|
}
|
|
20796
20898
|
case "image": {
|
|
20797
20899
|
let e = { ...a };
|
|
20798
|
-
return i.autoHeight !== !1 && delete e.height, e.width ??= "100%",
|
|
20900
|
+
return i.autoHeight !== !1 && delete e.height, e.width ??= "100%", sf(e, s), [c("image", Z(i.alt).slice(0, 40) || "Image", { props: {
|
|
20799
20901
|
src: xt(i.src),
|
|
20800
|
-
alt:
|
|
20902
|
+
alt: Z(i.alt)
|
|
20801
20903
|
} }, e)];
|
|
20802
20904
|
}
|
|
20803
20905
|
case "divider": return [c("divider", "Divider", {}, {
|
|
@@ -20809,84 +20911,84 @@ function lf(e, t, n) {
|
|
|
20809
20911
|
case "spacer": return [c("spacer", "Spacer", {}, { height: a.height ?? "24px" })];
|
|
20810
20912
|
case "card": {
|
|
20811
20913
|
let e = {
|
|
20812
|
-
...
|
|
20914
|
+
...cf,
|
|
20813
20915
|
gap: "8px",
|
|
20814
20916
|
...a
|
|
20815
20917
|
};
|
|
20816
|
-
return [c("card",
|
|
20918
|
+
return [c("card", Z(i.title).slice(0, 40) || "Card", { children: [$(`${n}-title`, "heading", "Card title", {
|
|
20817
20919
|
fontSize: "19px",
|
|
20818
20920
|
fontWeight: "700",
|
|
20819
20921
|
textColor: "#ffffff"
|
|
20820
20922
|
}, {
|
|
20821
|
-
content: Z(
|
|
20923
|
+
content: Jd(Z(i.title) || "Card Title").text,
|
|
20822
20924
|
props: { level: 3 }
|
|
20823
20925
|
}), $(`${n}-text`, "paragraph", "Card text", {
|
|
20824
20926
|
fontSize: "14px",
|
|
20825
20927
|
textColor: "#94a3b8"
|
|
20826
|
-
}, { content: Z(
|
|
20928
|
+
}, { content: Jd(Z(i.description) || "Card description.").text })] }, e)];
|
|
20827
20929
|
}
|
|
20828
20930
|
case "icon": {
|
|
20829
|
-
let t =
|
|
20830
|
-
n || (e.approx = !0, Q(e, `The icon "${
|
|
20931
|
+
let t = af(Z(i.iconName)), n = t in Sl;
|
|
20932
|
+
n || (e.approx = !0, Q(e, `The icon "${Z(i.iconName) || "unnamed"}" isn't in the V2 icon set, so a star stands in for it.`)), Z(i.href).trim() && (e.approx = !0, Q(e, "Icons can't be links yet; the icon is kept without its link."));
|
|
20831
20933
|
let r = { ...a };
|
|
20832
|
-
return r.fontSize ??= `${parseInt(
|
|
20934
|
+
return r.fontSize ??= `${parseInt(Z(i.iconSize), 10) || 48}px`, r.textColor ??= "#1e293b", sf(r, s === "left" ? void 0 : s ?? "center"), [c("icon", "Icon", { props: {
|
|
20833
20935
|
iconName: n ? t : "star",
|
|
20834
20936
|
strokeWidth: 2,
|
|
20835
|
-
label:
|
|
20937
|
+
label: Z(i.alt) || Z(i.label)
|
|
20836
20938
|
} }, r)];
|
|
20837
20939
|
}
|
|
20838
20940
|
case "carousel": return [c("carousel", "Carousel", { props: {
|
|
20839
|
-
slides:
|
|
20941
|
+
slides: X(i.images, 30).map((e) => Y(e)).map((e) => ({
|
|
20840
20942
|
src: xt(e.src),
|
|
20841
|
-
alt:
|
|
20842
|
-
caption:
|
|
20943
|
+
alt: Z(e.alt),
|
|
20944
|
+
caption: Z(e.caption)
|
|
20843
20945
|
})),
|
|
20844
20946
|
showArrows: i.showArrows !== !1,
|
|
20845
20947
|
showDots: i.showDots !== !1,
|
|
20846
20948
|
autoplay: !0,
|
|
20847
20949
|
interval: 5
|
|
20848
20950
|
} })];
|
|
20849
|
-
case "video": return
|
|
20850
|
-
url:
|
|
20951
|
+
case "video": return Z(i.videoUrl).trim() ? [c("video", "Video", { props: {
|
|
20952
|
+
url: Z(i.videoUrl),
|
|
20851
20953
|
ratio: "16:9"
|
|
20852
20954
|
} })] : (e.lost = !0, Q(e, "A video block had no video address, so it was left out."), []);
|
|
20853
20955
|
case "social": {
|
|
20854
|
-
let n =
|
|
20855
|
-
network:
|
|
20856
|
-
url: M(
|
|
20857
|
-
})).filter((e) => e.network in
|
|
20956
|
+
let n = X(i.links, 20).map(Y), r = n.map((e) => ({
|
|
20957
|
+
network: Z(e.provider) === "twitter" ? "x" : Z(e.provider),
|
|
20958
|
+
url: M(Z(e.url))
|
|
20959
|
+
})).filter((e) => e.network in F);
|
|
20858
20960
|
r.length < n.length && (e.approx = !0, Q(e, "A social link to a network V2 has no icon for was left out."));
|
|
20859
|
-
let o = parseInt(
|
|
20860
|
-
return
|
|
20961
|
+
let o = parseInt(Z(Y(n[0]).size) || Z(Y(t.style).iconSize), 10), l = { ...a };
|
|
20962
|
+
return sf(l, s), [c("social", "Social links", { props: {
|
|
20861
20963
|
links: r,
|
|
20862
20964
|
size: Number.isFinite(o) ? Math.min(96, Math.max(20, o)) : 40,
|
|
20863
|
-
shape:
|
|
20965
|
+
shape: Z(i.iconType ?? Y(n[0]).iconType) === "square" ? "square" : "circle",
|
|
20864
20966
|
colorMode: i.colorMode === "branded" ? "brand" : "mono"
|
|
20865
20967
|
} }, l)];
|
|
20866
20968
|
}
|
|
20867
20969
|
case "menu": {
|
|
20868
|
-
let e =
|
|
20869
|
-
label:
|
|
20870
|
-
href: M(
|
|
20970
|
+
let e = X(i.links, 40).map(Y).map((e) => ({
|
|
20971
|
+
label: Z(e.label).trim() || "Link",
|
|
20972
|
+
href: M(Z(e.href) || "#")
|
|
20871
20973
|
})), t = { ...a };
|
|
20872
|
-
return (s === "center" || s === "right") &&
|
|
20974
|
+
return (s === "center" || s === "right") && sf(t, s), [c("menu", "Menu", { props: {
|
|
20873
20975
|
links: e,
|
|
20874
20976
|
layout: "horizontal",
|
|
20875
20977
|
mobile: "hamburger"
|
|
20876
20978
|
} }, t)];
|
|
20877
20979
|
}
|
|
20878
20980
|
case "html": {
|
|
20879
|
-
let t =
|
|
20981
|
+
let t = Z(i.htmlContent);
|
|
20880
20982
|
return t.trim() ? (e.approx = !0, Q(e, "HTML blocks now sit in their own box on the page, so they no longer pick up the site’s styles. Check each one."), [c("html", "Embed", { props: {
|
|
20881
20983
|
code: t,
|
|
20882
|
-
title:
|
|
20984
|
+
title: Z(i.title) || "Embedded content"
|
|
20883
20985
|
} }, {
|
|
20884
20986
|
...a,
|
|
20885
20987
|
height: a.height ?? "300px"
|
|
20886
20988
|
})]) : (e.lost = !0, Q(e, "An empty HTML block was left out."), []);
|
|
20887
20989
|
}
|
|
20888
20990
|
case "table": {
|
|
20889
|
-
let t = Math.max(1, Math.min(200, Number(i.rowCount) || 2)), n = Math.max(1, Math.min(30, Number(i.colCount) || 2)), r =
|
|
20991
|
+
let t = Math.max(1, Math.min(200, Number(i.rowCount) || 2)), n = Math.max(1, Math.min(30, Number(i.colCount) || 2)), r = X(i.cells, 200).map((e) => X(e, 30)), a = Array.from({ length: t }, (e, t) => Array.from({ length: n }, (e, n) => Jd(Z(r[t]?.[n])).text));
|
|
20890
20992
|
return i.enableFooter && (e.approx = !0, Q(e, "A table footer row is now an ordinary row.")), [c("table", "Table", { props: {
|
|
20891
20993
|
rows: a,
|
|
20892
20994
|
headerRow: i.enableHeader !== !1,
|
|
@@ -20894,31 +20996,31 @@ function lf(e, t, n) {
|
|
|
20894
20996
|
} })];
|
|
20895
20997
|
}
|
|
20896
20998
|
case "timer": {
|
|
20897
|
-
let t = Date.parse(
|
|
20898
|
-
return Number.isFinite(t) ? (
|
|
20999
|
+
let t = Date.parse(Z(i.targetDate));
|
|
21000
|
+
return Number.isFinite(t) ? (Z(i.timezone) && !/^(utc|gmt)?$/i.test(Z(i.timezone)) && (e.approx = !0, Q(e, "Countdown times now use the date as written, in the visitor’s own time zone. Check the end time.")), [c("timer", "Countdown", { props: {
|
|
20899
21001
|
target: new Date(t).toISOString(),
|
|
20900
|
-
expiredMessage:
|
|
21002
|
+
expiredMessage: Z(i.expiredMessage) || "This offer has ended",
|
|
20901
21003
|
showLabels: i.showLabels !== !1
|
|
20902
21004
|
} })]) : (e.lost = !0, Q(e, "A countdown timer had no valid end date, so it was left out."), []);
|
|
20903
21005
|
}
|
|
20904
21006
|
case "accordion": {
|
|
20905
|
-
let t =
|
|
20906
|
-
t.some((e) =>
|
|
21007
|
+
let t = X(i.items, 50).map(Y);
|
|
21008
|
+
t.some((e) => X(e.children).length) && (e.approx = !0, Q(e, "Questions nested inside other questions were left out of an accordion."));
|
|
20907
21009
|
let n = t.findIndex((e) => !!e.defaultOpen);
|
|
20908
21010
|
return n > 0 && (e.approx = !0, Q(e, "An accordion opens its first question by default now, not the one it used to.")), [c("accordion", "Accordion", { props: {
|
|
20909
21011
|
items: t.map((e, t) => ({
|
|
20910
|
-
title: Z(
|
|
20911
|
-
content: Z(
|
|
21012
|
+
title: Jd(Z(e.title) || `Item ${t + 1}`).text,
|
|
21013
|
+
content: Jd(Z(e.content)).text
|
|
20912
21014
|
})),
|
|
20913
21015
|
allowMultiple: i.mode === "multi",
|
|
20914
21016
|
openFirst: n === 0
|
|
20915
21017
|
} })];
|
|
20916
21018
|
}
|
|
20917
|
-
case "form_container": return
|
|
20918
|
-
default: return r in Vd ?
|
|
21019
|
+
case "form_container": return Z(i.provider) === "maildrip" ? df(e, "maildrip_form", "a MailDrip sign-up form", n, i) : [pf(e, n, i, X(i.fields, 40).map(Y), a, o)];
|
|
21020
|
+
default: return r in Vd ? df(e, r, Wd[r] ?? r, n, i, a, o) : (e.lost = !0, Q(e, `A "${r || "unknown"}" block isn't supported in the new editor and was left out.`), []);
|
|
20919
21021
|
}
|
|
20920
21022
|
}
|
|
20921
|
-
function
|
|
21023
|
+
function df(e, t, n, r, i, a = {}, o) {
|
|
20922
21024
|
let s = Vd[t];
|
|
20923
21025
|
if (s) {
|
|
20924
21026
|
let e = {};
|
|
@@ -20935,11 +21037,11 @@ function uf(e, t, n, r, i, a = {}, o) {
|
|
|
20935
21037
|
})];
|
|
20936
21038
|
}
|
|
20937
21039
|
return e.lost = !0, Q(e, `The ${n} can't be carried over automatically and was left out. Add it again from the new editor's Add panel.`), [$(r, "container", `Needs attention: ${n}`, {
|
|
20938
|
-
...
|
|
21040
|
+
...cf,
|
|
20939
21041
|
minHeight: "40px"
|
|
20940
21042
|
}, { hidden: !0 })];
|
|
20941
21043
|
}
|
|
20942
|
-
var
|
|
21044
|
+
var ff = {
|
|
20943
21045
|
text: "text",
|
|
20944
21046
|
email: "email",
|
|
20945
21047
|
tel: "tel",
|
|
@@ -20951,34 +21053,34 @@ var df = {
|
|
|
20951
21053
|
number: "text",
|
|
20952
21054
|
date: "text"
|
|
20953
21055
|
};
|
|
20954
|
-
function
|
|
21056
|
+
function pf(e, t, n, r, i, a) {
|
|
20955
21057
|
let o = /* @__PURE__ */ new Set(), s = [];
|
|
20956
21058
|
for (let t of r) {
|
|
20957
|
-
let n =
|
|
20958
|
-
(n === "radio" || n === "number" || n === "date" || !(n in
|
|
20959
|
-
let i = Z(
|
|
21059
|
+
let n = Z(t.kind) || Z(t.type) || Z(t.inputType) || "text", r = ff[n] ?? "text";
|
|
21060
|
+
(n === "radio" || n === "number" || n === "date" || !(n in ff)) && (e.approx = !0, Q(e, `A "${n}" form field is now a ${r === "select" ? "drop-down" : "text"} field.`));
|
|
21061
|
+
let i = Jd(Z(t.label) || Z(t.placeholder) || Z(t.name) || "Field").text, a = (Z(t.name) || Z(t.fieldName) || i).toLowerCase().replace(/[^a-z0-9]+/g, "-").replace(/^-+|-+$/g, "") || "field", c = a;
|
|
20960
21062
|
for (let e = 2; o.has(a); e++) a = `${c}-${e}`;
|
|
20961
21063
|
o.add(a);
|
|
20962
|
-
let l =
|
|
21064
|
+
let l = X(t.options, 50).map((e) => Gd(e) ? Z(e.label) || Z(e.value) : Z(e)).filter(Boolean);
|
|
20963
21065
|
s.push({
|
|
20964
21066
|
id: a,
|
|
20965
21067
|
label: i,
|
|
20966
21068
|
type: r,
|
|
20967
|
-
...
|
|
21069
|
+
...Z(t.placeholder) ? { placeholder: Z(t.placeholder) } : {},
|
|
20968
21070
|
...t.required ? { required: !0 } : {},
|
|
20969
21071
|
...r === "select" ? { options: l } : {}
|
|
20970
21072
|
});
|
|
20971
21073
|
}
|
|
20972
21074
|
e.approx = !0, Q(e, "Forms use the new form style, so field and button colours need a quick check.");
|
|
20973
|
-
let c =
|
|
21075
|
+
let c = Z(n.actionUrl) || Z(n.action), l = {
|
|
20974
21076
|
fields: s.length ? s : [{
|
|
20975
21077
|
id: "email",
|
|
20976
21078
|
label: "Email",
|
|
20977
21079
|
type: "email",
|
|
20978
21080
|
required: !0
|
|
20979
21081
|
}],
|
|
20980
|
-
submitLabel:
|
|
20981
|
-
successMessage:
|
|
21082
|
+
submitLabel: Z(n.submitLabel) || "Submit",
|
|
21083
|
+
successMessage: Z(n.successMessage) || "Thanks! We got your message."
|
|
20982
21084
|
};
|
|
20983
21085
|
c && M(c) !== "#" && (l.action = M(c)), s.length || (e.approx = !0, Q(e, "A form had no fields, so it starts with an email field."));
|
|
20984
21086
|
let u = { ...i };
|
|
@@ -20987,35 +21089,35 @@ function ff(e, t, n, r, i, a) {
|
|
|
20987
21089
|
...a ? { responsive: a } : {}
|
|
20988
21090
|
});
|
|
20989
21091
|
}
|
|
20990
|
-
var
|
|
21092
|
+
var mf = /* @__PURE__ */ new Set([
|
|
20991
21093
|
"input",
|
|
20992
21094
|
"textarea",
|
|
20993
21095
|
"select"
|
|
20994
21096
|
]);
|
|
20995
|
-
function
|
|
20996
|
-
let t =
|
|
21097
|
+
function hf(e) {
|
|
21098
|
+
let t = Y(e.attributes), n = Z(e.type);
|
|
20997
21099
|
return {
|
|
20998
|
-
kind: n === "input" ?
|
|
20999
|
-
name:
|
|
21000
|
-
label:
|
|
21001
|
-
placeholder:
|
|
21100
|
+
kind: n === "input" ? Z(t.inputType) || Z(t.type) || "text" : n,
|
|
21101
|
+
name: Z(t.name) || Z(t.fieldName),
|
|
21102
|
+
label: Z(t.label) || Z(t.placeholder),
|
|
21103
|
+
placeholder: Z(t.placeholder),
|
|
21002
21104
|
required: t.required,
|
|
21003
21105
|
options: t.options
|
|
21004
21106
|
};
|
|
21005
21107
|
}
|
|
21006
|
-
function
|
|
21007
|
-
let t =
|
|
21008
|
-
for (let e of t) r.set(
|
|
21108
|
+
function gf(e) {
|
|
21109
|
+
let t = X(e.elements, 200).filter(Gd), n = X(e.nestedRows, 50).filter(Gd), r = /* @__PURE__ */ new Map();
|
|
21110
|
+
for (let e of t) r.set(Z(e.id), {
|
|
21009
21111
|
kind: "el",
|
|
21010
21112
|
item: e
|
|
21011
21113
|
});
|
|
21012
|
-
for (let e of n) r.set(
|
|
21114
|
+
for (let e of n) r.set(Z(e.id), {
|
|
21013
21115
|
kind: "row",
|
|
21014
21116
|
item: e
|
|
21015
21117
|
});
|
|
21016
21118
|
let i = [], a = /* @__PURE__ */ new Set();
|
|
21017
|
-
for (let t of
|
|
21018
|
-
let e = r.get(
|
|
21119
|
+
for (let t of X(e.childOrder, 250)) {
|
|
21120
|
+
let e = r.get(Z(t));
|
|
21019
21121
|
e && !a.has(e.item) && (i.push(e), a.add(e.item));
|
|
21020
21122
|
}
|
|
21021
21123
|
for (let e of t) a.has(e) || i.push({
|
|
@@ -21028,11 +21130,11 @@ function hf(e) {
|
|
|
21028
21130
|
});
|
|
21029
21131
|
return i;
|
|
21030
21132
|
}
|
|
21031
|
-
function
|
|
21133
|
+
function _f(e, t = 1) {
|
|
21032
21134
|
return e.nodes + t > 4980 ? (e.capped || (e.capped = !0, e.lost = !0, Q(e, "This design is very large, so the last part of it was left out.")), !1) : (e.nodes += t, !0);
|
|
21033
21135
|
}
|
|
21034
|
-
function
|
|
21035
|
-
let i = [], a =
|
|
21136
|
+
function vf(e, t, n, r) {
|
|
21137
|
+
let i = [], a = gf(t), o = 0;
|
|
21036
21138
|
for (let t = 0; t < a.length; t++) {
|
|
21037
21139
|
let s = a[t];
|
|
21038
21140
|
if (o += 1, s.kind === "row") {
|
|
@@ -21040,35 +21142,35 @@ function _f(e, t, n, r) {
|
|
|
21040
21142
|
e.lost = !0, Q(e, "Rows nested very deeply were left out.");
|
|
21041
21143
|
continue;
|
|
21042
21144
|
}
|
|
21043
|
-
let t =
|
|
21145
|
+
let t = bf(e, s.item, `${n}-r${o}`, r + 1, !1);
|
|
21044
21146
|
t && i.push(t);
|
|
21045
21147
|
continue;
|
|
21046
21148
|
}
|
|
21047
|
-
if (
|
|
21149
|
+
if (mf.has(Z(s.item.type))) {
|
|
21048
21150
|
let r = [s.item];
|
|
21049
|
-
for (; t + 1 < a.length && a[t + 1].kind === "el" &&
|
|
21050
|
-
if (!
|
|
21051
|
-
e.approx = !0, Q(e, "Separate form fields were grouped into one form. Check its button and where it sends messages."), i.push(
|
|
21151
|
+
for (; t + 1 < a.length && a[t + 1].kind === "el" && mf.has(Z(a[t + 1].item.type));) r.push(a[t + 1].item), t += 1;
|
|
21152
|
+
if (!_f(e)) continue;
|
|
21153
|
+
e.approx = !0, Q(e, "Separate form fields were grouped into one form. Check its button and where it sends messages."), i.push(pf(e, `${n}-e${o}`, {}, r.map(hf), of(e, r[0], "form field").styles, void 0));
|
|
21052
21154
|
continue;
|
|
21053
21155
|
}
|
|
21054
|
-
|
|
21156
|
+
_f(e, 2) && i.push(...uf(e, s.item, `${n}-e${o}`));
|
|
21055
21157
|
}
|
|
21056
21158
|
return i;
|
|
21057
21159
|
}
|
|
21058
|
-
var
|
|
21059
|
-
let t = parseFloat(
|
|
21160
|
+
var yf = (e) => {
|
|
21161
|
+
let t = parseFloat(Z(e));
|
|
21060
21162
|
return Number.isFinite(t) && t > 0 ? t : 0;
|
|
21061
21163
|
};
|
|
21062
|
-
function
|
|
21063
|
-
if (!
|
|
21064
|
-
let { styles: a, responsive: o } =
|
|
21164
|
+
function bf(e, t, n, r, i) {
|
|
21165
|
+
if (!_f(e, 3)) return null;
|
|
21166
|
+
let { styles: a, responsive: o } = of(e, {
|
|
21065
21167
|
style: t.style,
|
|
21066
21168
|
styleTablet: t.styleTablet,
|
|
21067
21169
|
styleMobile: t.styleMobile
|
|
21068
|
-
}, "row"), s =
|
|
21170
|
+
}, "row"), s = X(t.columns, 12).filter(Gd), c = a.gap ?? (s.length > 1 ? "16px" : void 0);
|
|
21069
21171
|
delete a.gap;
|
|
21070
21172
|
let l = s.map((t, i) => {
|
|
21071
|
-
let a = `${n}-c${i + 1}`, { styles: o, responsive: s } =
|
|
21173
|
+
let a = `${n}-c${i + 1}`, { styles: o, responsive: s } = of(e, {
|
|
21072
21174
|
style: t.styles,
|
|
21073
21175
|
styleTablet: t.stylesTablet,
|
|
21074
21176
|
styleMobile: t.stylesMobile
|
|
@@ -21077,13 +21179,13 @@ function yf(e, t, n, r, i) {
|
|
|
21077
21179
|
cid: a,
|
|
21078
21180
|
cs: o,
|
|
21079
21181
|
cr: s,
|
|
21080
|
-
children:
|
|
21182
|
+
children: vf(e, t, a, r)
|
|
21081
21183
|
};
|
|
21082
21184
|
}), u;
|
|
21083
21185
|
if (l.length === 1) {
|
|
21084
21186
|
let e = l[0];
|
|
21085
21187
|
u = $(`${n}-body`, "container", "Content", {
|
|
21086
|
-
...
|
|
21188
|
+
...cf,
|
|
21087
21189
|
...e.cs,
|
|
21088
21190
|
width: "100%"
|
|
21089
21191
|
}, {
|
|
@@ -21091,7 +21193,7 @@ function yf(e, t, n, r, i) {
|
|
|
21091
21193
|
...e.cr ? { responsive: e.cr } : {}
|
|
21092
21194
|
});
|
|
21093
21195
|
} else {
|
|
21094
|
-
let e = s.map((e) =>
|
|
21196
|
+
let e = s.map((e) => yf(e.width)), t = e.reduce((e, t) => e + t, 0), r = l.map((n, r) => t > 0 && e[r] > 0 ? Math.round(e[r] / t * 1e3) / 10 : 100 / Math.max(1, l.length)).map((e) => `minmax(0, ${e}fr)`).join(" "), i = l.length <= 2 ? r : "minmax(0, 1fr) minmax(0, 1fr)";
|
|
21095
21197
|
u = $(`${n}-cols`, "columns", "Columns", {
|
|
21096
21198
|
layoutMode: "grid",
|
|
21097
21199
|
display: "grid",
|
|
@@ -21105,7 +21207,7 @@ function yf(e, t, n, r, i) {
|
|
|
21105
21207
|
mobile: { gridTemplateColumns: "minmax(0, 1fr)" }
|
|
21106
21208
|
},
|
|
21107
21209
|
children: l.map((e) => $(e.cid, "column", "Column", {
|
|
21108
|
-
...
|
|
21210
|
+
...cf,
|
|
21109
21211
|
...e.cs,
|
|
21110
21212
|
width: "100%"
|
|
21111
21213
|
}, {
|
|
@@ -21120,15 +21222,15 @@ function yf(e, t, n, r, i) {
|
|
|
21120
21222
|
marginLeft: "auto",
|
|
21121
21223
|
marginRight: "auto"
|
|
21122
21224
|
});
|
|
21123
|
-
let d =
|
|
21225
|
+
let d = Z(t.htmlId).trim(), f = (function e(t) {
|
|
21124
21226
|
for (let n of t) {
|
|
21125
21227
|
if (n.type === "heading" && n.content) return n.content.split("\n")[0].slice(0, 40);
|
|
21126
21228
|
let t = n.children ? e(n.children) : "";
|
|
21127
21229
|
if (t) return t;
|
|
21128
21230
|
}
|
|
21129
21231
|
return "";
|
|
21130
|
-
})(u.children ?? []), p = d && d.replace(/[-_]+/g, " ") || f || (i ? "Section" : "Row"), m = Et(
|
|
21131
|
-
...
|
|
21232
|
+
})(u.children ?? []), p = d && d.replace(/[-_]+/g, " ") || f || (i ? "Section" : "Row"), m = Et(Z(t.htmlClass)), h = {
|
|
21233
|
+
...cf,
|
|
21132
21234
|
...a,
|
|
21133
21235
|
...m ? { customClasses: m } : {}
|
|
21134
21236
|
};
|
|
@@ -21141,7 +21243,7 @@ function yf(e, t, n, r, i) {
|
|
|
21141
21243
|
...o ? { responsive: o } : {}
|
|
21142
21244
|
});
|
|
21143
21245
|
}
|
|
21144
|
-
var
|
|
21246
|
+
var xf = (e, t = {}) => ({
|
|
21145
21247
|
id: e.id ?? "v1-page",
|
|
21146
21248
|
name: e.name ?? "Home",
|
|
21147
21249
|
slug: e.slug ?? "home",
|
|
@@ -21154,7 +21256,7 @@ var bf = (e, t = {}) => ({
|
|
|
21154
21256
|
children: []
|
|
21155
21257
|
}
|
|
21156
21258
|
});
|
|
21157
|
-
function
|
|
21259
|
+
function Sf(e, t = {}) {
|
|
21158
21260
|
let n = {
|
|
21159
21261
|
warnings: [],
|
|
21160
21262
|
seen: /* @__PURE__ */ new Set(),
|
|
@@ -21164,33 +21266,33 @@ function xf(e, t = {}) {
|
|
|
21164
21266
|
capped: !1
|
|
21165
21267
|
}, r = {};
|
|
21166
21268
|
try {
|
|
21167
|
-
let i =
|
|
21269
|
+
let i = Y(e), a = Gd(i.body) ? i.body : null;
|
|
21168
21270
|
if (!a) return Q(n, "This doesn't look like a design from the old editor, so an empty page was made instead."), {
|
|
21169
|
-
page:
|
|
21271
|
+
page: xf(t),
|
|
21170
21272
|
warnings: n.warnings,
|
|
21171
21273
|
fidelity: "partial",
|
|
21172
21274
|
extras: r
|
|
21173
21275
|
};
|
|
21174
|
-
let o =
|
|
21276
|
+
let o = Y(a.style), { styles: s, unmapped: c } = nf(Object.fromEntries(Object.entries(o).filter(([e]) => ![
|
|
21175
21277
|
"customJs",
|
|
21176
21278
|
"customCss",
|
|
21177
21279
|
"favicon",
|
|
21178
21280
|
"contentMaxWidth"
|
|
21179
21281
|
].includes(e))));
|
|
21180
21282
|
c.length && (n.approx = !0, Q(n, `Some page-wide styling (${c.slice(0, 4).join(", ")}) can't be carried over.`));
|
|
21181
|
-
let l =
|
|
21182
|
-
l && (r.customJs = l),
|
|
21183
|
-
let u =
|
|
21283
|
+
let l = Z(o.customJs).trim();
|
|
21284
|
+
l && (r.customJs = l), Z(o.customCss).trim() && (n.approx = !0, Q(n, "The page's custom CSS can't be carried over; check the page's look.")), Z(o.favicon).trim() && (n.approx = !0, Q(n, "Set the site icon again in the site settings."));
|
|
21285
|
+
let u = xf(t, { ...s }), d = Z(o.contentMaxWidth).trim();
|
|
21184
21286
|
u.rootNode.styles.layoutMode = "flow", u.rootNode.styles.display = "flex", u.rootNode.styles.flexDirection = "column";
|
|
21185
|
-
let f =
|
|
21287
|
+
let f = X(a.rows, 200).filter(Gd), p = [];
|
|
21186
21288
|
if (f.forEach((e, t) => {
|
|
21187
|
-
let r =
|
|
21289
|
+
let r = bf(n, e, `v1-s${t + 1}`, 0, !0);
|
|
21188
21290
|
r && p.push(r);
|
|
21189
21291
|
}), d && d !== "1200px") {
|
|
21190
|
-
let e = d.toLowerCase() === "none" ? "100%" :
|
|
21292
|
+
let e = d.toLowerCase() === "none" ? "100%" : Xd(d);
|
|
21191
21293
|
if (e) for (let t of p) for (let n of t.children ?? []) n.styles.maxWidth = e;
|
|
21192
21294
|
}
|
|
21193
|
-
u.rootNode.children = p,
|
|
21295
|
+
u.rootNode.children = p, Cf(u.rootNode) > 40 && (n.lost = !0, Q(n, "Rows nested too deeply were left out."), u.rootNode.children = p.map((e) => wf(e, 0)));
|
|
21194
21296
|
let m = n.lost ? "partial" : n.approx ? "approximate" : "exact";
|
|
21195
21297
|
return {
|
|
21196
21298
|
page: u,
|
|
@@ -21200,26 +21302,26 @@ function xf(e, t = {}) {
|
|
|
21200
21302
|
};
|
|
21201
21303
|
} catch {
|
|
21202
21304
|
return {
|
|
21203
|
-
page:
|
|
21305
|
+
page: xf(t),
|
|
21204
21306
|
warnings: [...n.warnings, "This design could not be read, so an empty page was made instead."],
|
|
21205
21307
|
fidelity: "partial",
|
|
21206
21308
|
extras: r
|
|
21207
21309
|
};
|
|
21208
21310
|
}
|
|
21209
21311
|
}
|
|
21210
|
-
function
|
|
21312
|
+
function Cf(e) {
|
|
21211
21313
|
let t = 0;
|
|
21212
|
-
for (let n of e.children ?? []) t = Math.max(t,
|
|
21314
|
+
for (let n of e.children ?? []) t = Math.max(t, Cf(n));
|
|
21213
21315
|
return t + 1;
|
|
21214
21316
|
}
|
|
21215
|
-
function
|
|
21317
|
+
function wf(e, t) {
|
|
21216
21318
|
return t >= 38 ? {
|
|
21217
21319
|
...e,
|
|
21218
21320
|
children: []
|
|
21219
21321
|
} : {
|
|
21220
21322
|
...e,
|
|
21221
|
-
children: e.children?.map((e) =>
|
|
21323
|
+
children: e.children?.map((e) => wf(e, t + 1))
|
|
21222
21324
|
};
|
|
21223
21325
|
}
|
|
21224
21326
|
//#endregion
|
|
21225
|
-
export { Qs as $, ua as $t, tl as A, ye as An, Fa as At, Pc as B, Zi as Bt, ql as C, Fe as Cn, Qa as Ct, Sl as D, ve as Dn, Ka as Dt, Ml as E, De as En, Va as Et, $c as F, ge as Fn, ja as Ft, Kc as G, ha as Gt, Ac as H, Ri as Ht, lc as I, me as In, Ca as It, sc as J, Qi as Jt, cc as K, la as Kt, uc as L, pe as Ln, ma as Lt, rl as M, Te as Mn, Da as Mt, nl as N, be as Nn, Pa as Nt, Cl as O, we as On, La as Ot, el as P, he as Pn, ka as Pt, Vs as Q, ra as Qt, Jc as R, D as Rn, ca as Rt, Jl as S, Re as Sn, oo as St, Gl as T, Ae as Tn, Ba as Tt, Qc as U, oa as Ut, Gc as V, fa as Vt, Yc as W, sa as Wt, oc as X, da as Xt, nc as Y, ga as Yt, tc as Z, na as Zt, du as _, Me as _n, io as _t, kd as a, ji as an, Ls as at, $l as b, Pe as bn, no as bt, Od as c, Xt as cn, Zo as ct, ku as d, Bt as dn, bo as dt, aa as en, Us as et, Au as f, Ht as fn, lo as ft, fu as g, pt as gn, so as gt, vu as h, dt as hn, ao as ht, Ad as i,
|
|
21327
|
+
export { Qs as $, ua as $t, tl as A, ye as An, Fa as At, Pc as B, Zi as Bt, ql as C, Fe as Cn, Qa as Ct, Sl as D, ve as Dn, Ka as Dt, Ml as E, De as En, Va as Et, $c as F, ge as Fn, ja as Ft, Kc as G, ha as Gt, Ac as H, Ri as Ht, lc as I, me as In, Ca as It, sc as J, Qi as Jt, cc as K, la as Kt, uc as L, pe as Ln, ma as Lt, rl as M, Te as Mn, Da as Mt, nl as N, be as Nn, Pa as Nt, Cl as O, we as On, La as Ot, el as P, he as Pn, ka as Pt, Vs as Q, ra as Qt, Jc as R, D as Rn, ca as Rt, Jl as S, Re as Sn, oo as St, Gl as T, Ae as Tn, Ba as Tt, Qc as U, oa as Ut, Gc as V, fa as Vt, Yc as W, sa as Wt, oc as X, da as Xt, nc as Y, ga as Yt, tc as Z, na as Zt, du as _, Me as _n, io as _t, kd as a, ji as an, Ls as at, $l as b, Pe as bn, no as bt, Od as c, Xt as cn, Zo as ct, ku as d, Bt as dn, bo as dt, aa as en, Us as et, Au as f, Ht as fn, lo as ft, fu as g, pt as gn, so as gt, vu as h, dt as hn, ao as ht, Ad as i, B as in, Ns as it, il as j, xe as jn, Na as jt, xl as k, Se as kn, Ta as kt, Lu as l, At as ln, So as lt, gu as m, Dt as mn, eo as mt, Hd as n, va as nn, Bs as nt, Bd as o, F as on, ks as ot, Du as p, jt as pn, uo as pt, ec as q, Sa as qt, Sf as r, Mi as rn, zs as rt, td as s, Qt as sn, $o as st, Vd as t, ia as tn, Xs as tt, Mu as u, Vt as un, xo as ut, lu as v, Ne as vn, po as vt, Kl as w, Le as wn, fo as wt, Xl as x, ze as xn, Za as xt, Ql as y, Be as yn, co as yt, Wc as z, V as zt };
|