@builder.io/sdk-react 2.0.19 → 2.0.21
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/browser/blocks-exports.cjs +31 -31
- package/lib/browser/blocks-exports.mjs +833 -833
- package/lib/browser/index.cjs +1 -1
- package/lib/browser/index.mjs +1 -1
- package/lib/browser/{server-entry-c8020f19.cjs → server-entry-6e52be8e.cjs} +2 -2
- package/lib/browser/{server-entry-12189812.js → server-entry-8f273525.js} +1 -2
- package/lib/browser/server-entry.cjs +1 -1
- package/lib/browser/server-entry.mjs +1 -1
- package/lib/edge/{accordion-634b0466.js → accordion-0fa0cd9f.js} +1 -1
- package/lib/edge/{accordion-eaf2e50a.cjs → accordion-98e5d925.cjs} +1 -1
- package/lib/edge/blocks-4dac2e8c.cjs +12 -0
- package/lib/edge/{blocks-51761337.js → blocks-805edb5d.js} +240 -233
- package/lib/edge/blocks-exports.cjs +1 -1
- package/lib/edge/blocks-exports.mjs +2 -2
- package/lib/edge/{button-a0aad19e.cjs → button-04692c59.cjs} +1 -1
- package/lib/edge/{button-6d2144c3.js → button-8c912189.js} +2 -2
- package/lib/edge/{columns-44d76a14.cjs → columns-4d8db53c.cjs} +4 -4
- package/lib/edge/{columns-030a6892.js → columns-70a13cfe.js} +6 -6
- package/lib/edge/content-variants-7570438f.cjs +134 -0
- package/lib/edge/{content-variants-46a433c2.js → content-variants-d11198bc.js} +306 -308
- package/lib/edge/{evaluate-6febb3ef.js → evaluate-29e9d055.js} +671 -659
- package/lib/edge/{evaluate-29260bf8.cjs → evaluate-826010e9.cjs} +11 -13
- package/lib/edge/form-13c77d47.cjs +1 -0
- package/lib/edge/{form-855a28fc.js → form-28c6dcde.js} +6 -6
- package/lib/edge/{get-class-prop-name-6320e936.cjs → get-class-prop-name-182b0edb.cjs} +1 -1
- package/lib/edge/{get-class-prop-name-a6353748.js → get-class-prop-name-c9e11804.js} +1 -1
- package/lib/edge/{image-eebfcbac.cjs → image-54d2f755.cjs} +3 -3
- package/lib/edge/{image-6a074aab.js → image-6970c193.js} +24 -24
- package/lib/edge/{img-1f88586f.cjs → img-8f2d03d2.cjs} +1 -1
- package/lib/edge/{img-56b4a196.js → img-ca1be569.js} +1 -1
- package/lib/edge/index.cjs +1 -1
- package/lib/edge/index.mjs +1 -1
- package/lib/edge/{input-35f6fbdd.cjs → input-0456a323.cjs} +1 -1
- package/lib/edge/{input-7873f170.js → input-3db08208.js} +1 -1
- package/lib/edge/{select-eb16d7cc.js → select-251dfaa4.js} +1 -1
- package/lib/edge/{select-f03c5ba6.cjs → select-b851ff58.cjs} +1 -1
- package/lib/edge/{server-entry-77a5a1a0.js → server-entry-05e6ebef.js} +1 -2
- package/lib/edge/{server-entry-dbe27fb2.cjs → server-entry-75427eb3.cjs} +2 -2
- package/lib/edge/server-entry.cjs +1 -1
- package/lib/edge/server-entry.mjs +1 -1
- package/lib/edge/{slot-93865012.cjs → slot-279f992e.cjs} +1 -1
- package/lib/edge/{slot-c9a7a451.js → slot-76c2cebc.js} +4 -4
- package/lib/edge/{symbol-b6b36212.cjs → symbol-020487c5.cjs} +1 -1
- package/lib/edge/{symbol-6657c638.js → symbol-47130603.js} +2 -2
- package/lib/edge/{tabs-44484f49.js → tabs-3cc397e4.js} +4 -4
- package/lib/edge/{tabs-020fedaa.cjs → tabs-c6053c2d.cjs} +1 -1
- package/lib/edge/{text-e00e3cdc.js → text-29ef4fd5.js} +2 -2
- package/lib/edge/{text-562c8568.cjs → text-c9d83141.cjs} +1 -1
- package/lib/node/blocks-exports.cjs +31 -31
- package/lib/node/blocks-exports.mjs +817 -844
- package/lib/node/index.cjs +1 -1
- package/lib/node/index.mjs +2 -2
- package/lib/node/init.cjs +1 -1
- package/lib/node/init.mjs +2 -2
- package/lib/node/{server-entry-902ea0c4.js → server-entry-83392238.js} +1 -2
- package/lib/node/{server-entry-82ab17f2.cjs → server-entry-b5908591.cjs} +2 -2
- package/lib/node/server-entry.cjs +1 -1
- package/lib/node/server-entry.mjs +1 -1
- package/lib/node/{should-force-browser-runtime-in-node-0b0cefdf.js → should-force-browser-runtime-in-node-31b1e2f2.js} +56 -29
- package/lib/node/{should-force-browser-runtime-in-node-f20178fa.cjs → should-force-browser-runtime-in-node-391032cf.cjs} +4 -4
- package/package.json +1 -1
- package/types/constants/sdk-version.d.ts +1 -1
- package/types/functions/evaluate/browser-runtime/browser.d.ts +0 -6
- package/types/functions/evaluate/helpers.d.ts +5 -0
- package/lib/edge/blocks-b8c9a72a.cjs +0 -12
- package/lib/edge/content-variants-3eef022e.cjs +0 -134
- package/lib/edge/form-59059e97.cjs +0 -1
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { lazy as v, useRef as
|
|
3
|
-
import { isBrowser as
|
|
4
|
-
import { Video as
|
|
5
|
-
import { triggerAnimation as
|
|
6
|
-
import { evaluate as
|
|
7
|
-
import "./get-class-prop-name-
|
|
1
|
+
import { jsx as b, jsxs as N, Fragment as M } from "react/jsx-runtime";
|
|
2
|
+
import { lazy as v, useRef as q, useState as T, useEffect as C } from "react";
|
|
3
|
+
import { isBrowser as j, TARGET as G, isEditing as A, registerInsertMenu as ie, setupBrowserForEditing as oe, createRegisterComponentMessage as re, getDefaultCanTrack as D, _track as O, isPreviewing as le, fetchOneEntry as se, createEditorListener as de, serializeIncludingFunctions as _, logger as ue, handleABTestingSync as ce } from "./server-entry-05e6ebef.js";
|
|
4
|
+
import { Video as me, Button as pe, Columns as ge, Fragment as fe, Image as he, Section as be, Symbol as ye, Text as xe, BuilderContext as ve } from "./blocks-exports.mjs";
|
|
5
|
+
import { triggerAnimation as Se, fastClone as Te, InlinedStyles as X, ComponentsContext as ke, Blocks as Ie } from "./blocks-805edb5d.js";
|
|
6
|
+
import { evaluate as Z } from "./evaluate-29e9d055.js";
|
|
7
|
+
import "./get-class-prop-name-c9e11804.js";
|
|
8
8
|
import "./dynamic-renderer-8b343325.js";
|
|
9
|
-
const
|
|
9
|
+
const U = {
|
|
10
10
|
"@type": "@builder.io/sdk:Element",
|
|
11
11
|
layerName: "Accordion item title",
|
|
12
12
|
responsiveStyles: {
|
|
@@ -35,7 +35,7 @@ const B = {
|
|
|
35
35
|
}
|
|
36
36
|
}
|
|
37
37
|
}]
|
|
38
|
-
},
|
|
38
|
+
}, L = {
|
|
39
39
|
"@type": "@builder.io/sdk:Element",
|
|
40
40
|
layerName: "Accordion item detail",
|
|
41
41
|
responsiveStyles: {
|
|
@@ -66,7 +66,7 @@ const B = {
|
|
|
66
66
|
}
|
|
67
67
|
}
|
|
68
68
|
}]
|
|
69
|
-
},
|
|
69
|
+
}, Ce = {
|
|
70
70
|
name: "Builder:Accordion",
|
|
71
71
|
canHaveChildren: !0,
|
|
72
72
|
image: "https://cdn.builder.io/api/v1/image/assets%2FagZ9n5CUKRfbL9t6CaJOyVSK4Es2%2Ffab6c1fd3fe542408cbdec078bca7f35",
|
|
@@ -83,19 +83,19 @@ const B = {
|
|
|
83
83
|
name: "title",
|
|
84
84
|
type: "uiBlocks",
|
|
85
85
|
hideFromUI: !0,
|
|
86
|
-
defaultValue: [
|
|
86
|
+
defaultValue: [U]
|
|
87
87
|
}, {
|
|
88
88
|
name: "detail",
|
|
89
89
|
type: "uiBlocks",
|
|
90
90
|
hideFromUI: !0,
|
|
91
|
-
defaultValue: [
|
|
91
|
+
defaultValue: [L]
|
|
92
92
|
}],
|
|
93
93
|
defaultValue: [{
|
|
94
|
-
title: [
|
|
95
|
-
detail: [
|
|
94
|
+
title: [U],
|
|
95
|
+
detail: [L]
|
|
96
96
|
}, {
|
|
97
|
-
title: [
|
|
98
|
-
detail: [
|
|
97
|
+
title: [U],
|
|
98
|
+
detail: [L]
|
|
99
99
|
}],
|
|
100
100
|
showIf: (e) => !e.get("useChildrenForItems")
|
|
101
101
|
}, {
|
|
@@ -130,7 +130,7 @@ const B = {
|
|
|
130
130
|
builderComponents: !0,
|
|
131
131
|
builderLinkComponent: !0
|
|
132
132
|
}
|
|
133
|
-
},
|
|
133
|
+
}, we = v(() => import("./accordion-0fa0cd9f.js")), Ve = {
|
|
134
134
|
name: "Core:Button",
|
|
135
135
|
image: "https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2F81a15681c3e74df09677dfc57a615b13",
|
|
136
136
|
defaultStyles: {
|
|
@@ -166,7 +166,7 @@ const B = {
|
|
|
166
166
|
shouldReceiveBuilderProps: {
|
|
167
167
|
builderLinkComponent: !0
|
|
168
168
|
}
|
|
169
|
-
},
|
|
169
|
+
}, Re = {
|
|
170
170
|
// TODO: ways to statically preprocess JSON for references, functions, etc
|
|
171
171
|
name: "Columns",
|
|
172
172
|
isRSC: !0,
|
|
@@ -373,13 +373,13 @@ const B = {
|
|
|
373
373
|
builderComponents: !0,
|
|
374
374
|
builderLinkComponent: !0
|
|
375
375
|
}
|
|
376
|
-
},
|
|
376
|
+
}, Ee = {
|
|
377
377
|
name: "Fragment",
|
|
378
378
|
static: !0,
|
|
379
379
|
hidden: !0,
|
|
380
380
|
canHaveChildren: !0,
|
|
381
381
|
noWrap: !0
|
|
382
|
-
},
|
|
382
|
+
}, Fe = {
|
|
383
383
|
name: "Image",
|
|
384
384
|
static: !0,
|
|
385
385
|
image: "https://firebasestorage.googleapis.com/v0/b/builder-3b0a2.appspot.com/o/images%2Fbaseline-insert_photo-24px.svg?alt=media&token=4e5d0ef4-f5e8-4e57-b3a9-38d63a9b9dc4",
|
|
@@ -400,15 +400,15 @@ const B = {
|
|
|
400
400
|
onChange: (e) => {
|
|
401
401
|
e.delete("srcset"), e.delete("noWebp");
|
|
402
402
|
function n(a, o = 6e4) {
|
|
403
|
-
return new Promise((p,
|
|
404
|
-
const
|
|
405
|
-
let
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
},
|
|
409
|
-
console.warn("Image load failed",
|
|
410
|
-
}),
|
|
411
|
-
|
|
403
|
+
return new Promise((p, S) => {
|
|
404
|
+
const y = document.createElement("img");
|
|
405
|
+
let w = !1;
|
|
406
|
+
y.onload = () => {
|
|
407
|
+
w = !0, p(y);
|
|
408
|
+
}, y.addEventListener("error", (k) => {
|
|
409
|
+
console.warn("Image load failed", k.error), S(k.error);
|
|
410
|
+
}), y.src = a, setTimeout(() => {
|
|
411
|
+
w || S(new Error("Image load timed out"));
|
|
412
412
|
}, o);
|
|
413
413
|
});
|
|
414
414
|
}
|
|
@@ -487,7 +487,7 @@ const B = {
|
|
|
487
487
|
shouldReceiveBuilderProps: {
|
|
488
488
|
builderBlock: !0
|
|
489
489
|
}
|
|
490
|
-
},
|
|
490
|
+
}, Pe = {
|
|
491
491
|
name: "Core:Section",
|
|
492
492
|
static: !0,
|
|
493
493
|
image: "https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2F682efef23ace49afac61748dd305c70a",
|
|
@@ -526,7 +526,7 @@ const B = {
|
|
|
526
526
|
}
|
|
527
527
|
}
|
|
528
528
|
}]
|
|
529
|
-
},
|
|
529
|
+
}, We = {
|
|
530
530
|
name: "Slot",
|
|
531
531
|
isRSC: !0,
|
|
532
532
|
description: "Allow child blocks to be inserted into this content when used as a Symbol",
|
|
@@ -543,7 +543,7 @@ const B = {
|
|
|
543
543
|
builderContext: !0,
|
|
544
544
|
builderComponents: !0
|
|
545
545
|
}
|
|
546
|
-
},
|
|
546
|
+
}, Ae = v(() => import("./slot-76c2cebc.js")), Be = {
|
|
547
547
|
name: "Symbol",
|
|
548
548
|
noWrap: !0,
|
|
549
549
|
static: !0,
|
|
@@ -582,7 +582,7 @@ const B = {
|
|
|
582
582
|
builderComponents: !0,
|
|
583
583
|
builderLinkComponent: !0
|
|
584
584
|
}
|
|
585
|
-
},
|
|
585
|
+
}, H = {
|
|
586
586
|
"@type": "@builder.io/sdk:Element",
|
|
587
587
|
responsiveStyles: {
|
|
588
588
|
large: {
|
|
@@ -604,7 +604,7 @@ const B = {
|
|
|
604
604
|
text: "New tab"
|
|
605
605
|
}
|
|
606
606
|
}
|
|
607
|
-
},
|
|
607
|
+
}, $ = {
|
|
608
608
|
"@type": "@builder.io/sdk:Element",
|
|
609
609
|
responsiveStyles: {
|
|
610
610
|
large: {
|
|
@@ -620,7 +620,7 @@ const B = {
|
|
|
620
620
|
text: "New tab content "
|
|
621
621
|
}
|
|
622
622
|
}
|
|
623
|
-
},
|
|
623
|
+
}, De = {
|
|
624
624
|
name: "Builder: Tabs",
|
|
625
625
|
inputs: [{
|
|
626
626
|
name: "tabs",
|
|
@@ -630,16 +630,16 @@ const B = {
|
|
|
630
630
|
name: "label",
|
|
631
631
|
type: "uiBlocks",
|
|
632
632
|
hideFromUI: !0,
|
|
633
|
-
defaultValue: [
|
|
633
|
+
defaultValue: [H]
|
|
634
634
|
}, {
|
|
635
635
|
name: "content",
|
|
636
636
|
type: "uiBlocks",
|
|
637
637
|
hideFromUI: !0,
|
|
638
|
-
defaultValue: [
|
|
638
|
+
defaultValue: [$]
|
|
639
639
|
}],
|
|
640
640
|
defaultValue: [{
|
|
641
641
|
label: [{
|
|
642
|
-
...
|
|
642
|
+
...H,
|
|
643
643
|
component: {
|
|
644
644
|
name: "Text",
|
|
645
645
|
options: {
|
|
@@ -648,7 +648,7 @@ const B = {
|
|
|
648
648
|
}
|
|
649
649
|
}],
|
|
650
650
|
content: [{
|
|
651
|
-
|
|
651
|
+
...$,
|
|
652
652
|
component: {
|
|
653
653
|
name: "Text",
|
|
654
654
|
options: {
|
|
@@ -658,7 +658,7 @@ const B = {
|
|
|
658
658
|
}]
|
|
659
659
|
}, {
|
|
660
660
|
label: [{
|
|
661
|
-
...
|
|
661
|
+
...H,
|
|
662
662
|
component: {
|
|
663
663
|
name: "Text",
|
|
664
664
|
options: {
|
|
@@ -667,7 +667,7 @@ const B = {
|
|
|
667
667
|
}
|
|
668
668
|
}],
|
|
669
669
|
content: [{
|
|
670
|
-
|
|
670
|
+
...$,
|
|
671
671
|
component: {
|
|
672
672
|
name: "Text",
|
|
673
673
|
options: {
|
|
@@ -723,7 +723,7 @@ const B = {
|
|
|
723
723
|
builderComponents: !0,
|
|
724
724
|
builderLinkComponent: !0
|
|
725
725
|
}
|
|
726
|
-
},
|
|
726
|
+
}, Ue = v(() => import("./tabs-3cc397e4.js")), Le = {
|
|
727
727
|
shouldReceiveBuilderProps: {
|
|
728
728
|
builderBlock: !1,
|
|
729
729
|
builderContext: !0
|
|
@@ -745,7 +745,7 @@ const B = {
|
|
|
745
745
|
height: "auto",
|
|
746
746
|
textAlign: "center"
|
|
747
747
|
}
|
|
748
|
-
},
|
|
748
|
+
}, He = {
|
|
749
749
|
name: "Custom Code",
|
|
750
750
|
static: !0,
|
|
751
751
|
requiredPermissions: ["editCode"],
|
|
@@ -767,7 +767,7 @@ const B = {
|
|
|
767
767
|
helperText: "Only print and run scripts on the client. Important when scripts influence DOM that could be replaced when client loads",
|
|
768
768
|
advanced: !0
|
|
769
769
|
}]
|
|
770
|
-
},
|
|
770
|
+
}, $e = v(() => import("./custom-code-7786788e.js")), Ne = {
|
|
771
771
|
name: "Embed",
|
|
772
772
|
static: !0,
|
|
773
773
|
inputs: [{
|
|
@@ -782,7 +782,7 @@ const B = {
|
|
|
782
782
|
defaultValue: '<div style="padding: 20px; text-align: center">(Choose an embed URL)<div>',
|
|
783
783
|
hideFromUI: !0
|
|
784
784
|
}]
|
|
785
|
-
},
|
|
785
|
+
}, qe = v(() => import("./embed-5c1bbe12.js")), je = {
|
|
786
786
|
name: "Form:Form",
|
|
787
787
|
// editableTags: ['builder-form-error']
|
|
788
788
|
defaults: {
|
|
@@ -1019,7 +1019,7 @@ const B = {
|
|
|
1019
1019
|
builderComponents: !0,
|
|
1020
1020
|
builderLinkComponent: !0
|
|
1021
1021
|
}
|
|
1022
|
-
},
|
|
1022
|
+
}, Ke = v(() => import("./form-28c6dcde.js")), Me = {
|
|
1023
1023
|
name: "Form:Input",
|
|
1024
1024
|
image: "https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2Fad6f37889d9e40bbbbc72cdb5875d6ca",
|
|
1025
1025
|
inputs: [
|
|
@@ -1070,7 +1070,7 @@ const B = {
|
|
|
1070
1070
|
borderStyle: "solid",
|
|
1071
1071
|
borderColor: "#ccc"
|
|
1072
1072
|
}
|
|
1073
|
-
},
|
|
1073
|
+
}, Oe = v(() => import("./input-3db08208.js")), _e = {
|
|
1074
1074
|
name: "Form:Select",
|
|
1075
1075
|
image: "https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2F83acca093fb24aaf94dee136e9a4b045",
|
|
1076
1076
|
defaultStyles: {
|
|
@@ -1112,7 +1112,7 @@ const B = {
|
|
|
1112
1112
|
}],
|
|
1113
1113
|
static: !0,
|
|
1114
1114
|
noWrap: !0
|
|
1115
|
-
},
|
|
1115
|
+
}, ze = v(() => import("./select-251dfaa4.js")), Je = {
|
|
1116
1116
|
name: "Form:SubmitButton",
|
|
1117
1117
|
image: "https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2Fdf2820ffed1f4349a94c40b3221f5b98",
|
|
1118
1118
|
defaultStyles: {
|
|
@@ -1137,7 +1137,7 @@ const B = {
|
|
|
1137
1137
|
// that only shows if advanced setting is flipped
|
|
1138
1138
|
// TODO: defaultChildren
|
|
1139
1139
|
// canHaveChildren: true,
|
|
1140
|
-
},
|
|
1140
|
+
}, Ye = v(() => import("./submit-button-b48361a7.js")), Qe = {
|
|
1141
1141
|
name: "Form:TextArea",
|
|
1142
1142
|
image: "https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2Ff74a2f3de58c4c3e939204e5b6b8f6c3",
|
|
1143
1143
|
inputs: [{
|
|
@@ -1173,7 +1173,7 @@ const B = {
|
|
|
1173
1173
|
},
|
|
1174
1174
|
static: !0,
|
|
1175
1175
|
noWrap: !0
|
|
1176
|
-
},
|
|
1176
|
+
}, Ge = v(() => import("./textarea-d29025e9.js")), Xe = {
|
|
1177
1177
|
// friendlyName?
|
|
1178
1178
|
name: "Raw:Img",
|
|
1179
1179
|
hideFromInsertMenu: !0,
|
|
@@ -1187,7 +1187,7 @@ const B = {
|
|
|
1187
1187
|
}],
|
|
1188
1188
|
noWrap: !0,
|
|
1189
1189
|
static: !0
|
|
1190
|
-
},
|
|
1190
|
+
}, Ze = v(() => import("./img-ca1be569.js")), et = {
|
|
1191
1191
|
name: "Video",
|
|
1192
1192
|
canHaveChildren: !0,
|
|
1193
1193
|
defaultStyles: {
|
|
@@ -1271,64 +1271,64 @@ const B = {
|
|
|
1271
1271
|
shouldReceiveBuilderProps: {
|
|
1272
1272
|
builderBlock: !0
|
|
1273
1273
|
}
|
|
1274
|
-
},
|
|
1275
|
-
component:
|
|
1276
|
-
...
|
|
1274
|
+
}, tt = () => [{
|
|
1275
|
+
component: $e,
|
|
1276
|
+
...He
|
|
1277
1277
|
}, {
|
|
1278
|
-
component:
|
|
1279
|
-
...
|
|
1278
|
+
component: qe,
|
|
1279
|
+
...Ne
|
|
1280
1280
|
}, {
|
|
1281
|
-
component:
|
|
1282
|
-
...
|
|
1281
|
+
component: Ke,
|
|
1282
|
+
...je
|
|
1283
1283
|
}, {
|
|
1284
|
-
component:
|
|
1285
|
-
...
|
|
1284
|
+
component: Oe,
|
|
1285
|
+
...Me
|
|
1286
1286
|
}, {
|
|
1287
|
-
component:
|
|
1288
|
-
...
|
|
1287
|
+
component: Ye,
|
|
1288
|
+
...Je
|
|
1289
1289
|
}, {
|
|
1290
|
-
component:
|
|
1291
|
-
...
|
|
1290
|
+
component: ze,
|
|
1291
|
+
..._e
|
|
1292
1292
|
}, {
|
|
1293
|
-
component:
|
|
1294
|
-
...
|
|
1293
|
+
component: Ge,
|
|
1294
|
+
...Qe
|
|
1295
1295
|
}, {
|
|
1296
|
-
component:
|
|
1297
|
-
...
|
|
1296
|
+
component: Ze,
|
|
1297
|
+
...Xe
|
|
1298
1298
|
}, {
|
|
1299
|
-
component:
|
|
1300
|
-
...
|
|
1301
|
-
}],
|
|
1302
|
-
component:
|
|
1303
|
-
...
|
|
1299
|
+
component: me,
|
|
1300
|
+
...et
|
|
1301
|
+
}], z = () => [{
|
|
1302
|
+
component: pe,
|
|
1303
|
+
...Ve
|
|
1304
1304
|
}, {
|
|
1305
|
-
component:
|
|
1306
|
-
...
|
|
1305
|
+
component: ge,
|
|
1306
|
+
...Re
|
|
1307
1307
|
}, {
|
|
1308
|
-
component:
|
|
1309
|
-
...
|
|
1308
|
+
component: fe,
|
|
1309
|
+
...Ee
|
|
1310
1310
|
}, {
|
|
1311
|
-
component:
|
|
1312
|
-
...
|
|
1311
|
+
component: he,
|
|
1312
|
+
...Fe
|
|
1313
1313
|
}, {
|
|
1314
|
-
component:
|
|
1315
|
-
...
|
|
1314
|
+
component: be,
|
|
1315
|
+
...Pe
|
|
1316
1316
|
}, {
|
|
1317
|
-
component:
|
|
1318
|
-
...
|
|
1317
|
+
component: Ae,
|
|
1318
|
+
...We
|
|
1319
1319
|
}, {
|
|
1320
|
-
component:
|
|
1321
|
-
|
|
1320
|
+
component: ye,
|
|
1321
|
+
...Be
|
|
1322
1322
|
}, {
|
|
1323
|
-
component:
|
|
1324
|
-
...
|
|
1323
|
+
component: xe,
|
|
1324
|
+
...Le
|
|
1325
1325
|
}, {
|
|
1326
|
-
component:
|
|
1327
|
-
...
|
|
1326
|
+
component: Ue,
|
|
1327
|
+
...De
|
|
1328
1328
|
}, {
|
|
1329
|
-
component:
|
|
1330
|
-
...
|
|
1331
|
-
}, ...
|
|
1329
|
+
component: we,
|
|
1330
|
+
...Ce
|
|
1331
|
+
}, ...tt()], nt = `function updateCookiesAndStyles(contentId, variants, isHydrationTarget) {
|
|
1332
1332
|
function getAndSetVariantId() {
|
|
1333
1333
|
function setCookie(name, value, days) {
|
|
1334
1334
|
let expires = '';
|
|
@@ -1384,7 +1384,7 @@ const B = {
|
|
|
1384
1384
|
}).join('');
|
|
1385
1385
|
styleEl.innerHTML = newStyleStr;
|
|
1386
1386
|
}
|
|
1387
|
-
}`,
|
|
1387
|
+
}`, at = `function updateVariantVisibility(variantContentId, defaultContentId, isHydrationTarget) {
|
|
1388
1388
|
if (!navigator.cookieEnabled) {
|
|
1389
1389
|
return;
|
|
1390
1390
|
}
|
|
@@ -1418,27 +1418,27 @@ const B = {
|
|
|
1418
1418
|
thisScriptEl?.remove();
|
|
1419
1419
|
}
|
|
1420
1420
|
return;
|
|
1421
|
-
}`,
|
|
1421
|
+
}`, ee = "builderIoAbTest", te = "builderIoRenderContent", B = (e) => Object.values((e == null ? void 0 : e.variations) || {}).map((t) => ({
|
|
1422
1422
|
...t,
|
|
1423
1423
|
testVariationId: t.id,
|
|
1424
1424
|
id: e == null ? void 0 : e.id
|
|
1425
|
-
})),
|
|
1425
|
+
})), it = ({
|
|
1426
1426
|
canTrack: e,
|
|
1427
1427
|
content: t
|
|
1428
|
-
}) => !(!(
|
|
1429
|
-
window.${
|
|
1430
|
-
window.${
|
|
1431
|
-
`,
|
|
1432
|
-
window.${
|
|
1433
|
-
"${t}",${JSON.stringify(e)}, ${
|
|
1434
|
-
)`,
|
|
1428
|
+
}) => !(!(B(t).length > 0) || !e || j()), ot = (e) => e === "react" || e === "reactNative", ne = ot(G), rt = () => `
|
|
1429
|
+
window.${ee} = ${nt}
|
|
1430
|
+
window.${te} = ${at}
|
|
1431
|
+
`, lt = (e, t) => `
|
|
1432
|
+
window.${ee}(
|
|
1433
|
+
"${t}",${JSON.stringify(e)}, ${ne}
|
|
1434
|
+
)`, st = ({
|
|
1435
1435
|
contentId: e,
|
|
1436
1436
|
variationId: t
|
|
1437
|
-
}) => `window.${
|
|
1438
|
-
"${t}", "${e}", ${
|
|
1437
|
+
}) => `window.${te}(
|
|
1438
|
+
"${t}", "${e}", ${ne}
|
|
1439
1439
|
)`;
|
|
1440
|
-
function
|
|
1441
|
-
return /* @__PURE__ */
|
|
1440
|
+
function K(e) {
|
|
1441
|
+
return /* @__PURE__ */ b(
|
|
1442
1442
|
"script",
|
|
1443
1443
|
{
|
|
1444
1444
|
dangerouslySetInnerHTML: { __html: e.scriptStr },
|
|
@@ -1447,10 +1447,10 @@ function N(e) {
|
|
|
1447
1447
|
}
|
|
1448
1448
|
);
|
|
1449
1449
|
}
|
|
1450
|
-
function
|
|
1450
|
+
function J(e) {
|
|
1451
1451
|
return Math.round(e * 1e3) / 1e3;
|
|
1452
1452
|
}
|
|
1453
|
-
const
|
|
1453
|
+
const dt = (e, t, n = !0) => {
|
|
1454
1454
|
if (!(e instanceof HTMLElement))
|
|
1455
1455
|
return null;
|
|
1456
1456
|
let i = n ? e : e.parentElement;
|
|
@@ -1461,35 +1461,35 @@ const gt = (e, t, n = !0) => {
|
|
|
1461
1461
|
return i;
|
|
1462
1462
|
} while (i = i.parentElement);
|
|
1463
1463
|
return null;
|
|
1464
|
-
},
|
|
1464
|
+
}, ut = (e) => dt(e, (t) => {
|
|
1465
1465
|
const n = t.getAttribute("builder-id") || t.id;
|
|
1466
1466
|
return (n == null ? void 0 : n.indexOf("builder-")) === 0;
|
|
1467
|
-
}),
|
|
1467
|
+
}), Y = ({
|
|
1468
1468
|
event: e,
|
|
1469
1469
|
target: t
|
|
1470
1470
|
}) => {
|
|
1471
|
-
const n = t.getBoundingClientRect(), i = e.clientX - n.left, d = e.clientY - n.top, m =
|
|
1471
|
+
const n = t.getBoundingClientRect(), i = e.clientX - n.left, d = e.clientY - n.top, m = J(i / n.width), a = J(d / n.height);
|
|
1472
1472
|
return {
|
|
1473
1473
|
x: m,
|
|
1474
1474
|
y: a
|
|
1475
1475
|
};
|
|
1476
|
-
},
|
|
1477
|
-
const t = e.target, n = t &&
|
|
1476
|
+
}, ct = (e) => {
|
|
1477
|
+
const t = e.target, n = t && ut(t), i = (n == null ? void 0 : n.getAttribute("builder-id")) || (n == null ? void 0 : n.id);
|
|
1478
1478
|
return {
|
|
1479
1479
|
targetBuilderElement: i || void 0,
|
|
1480
1480
|
metadata: {
|
|
1481
|
-
targetOffset: t ?
|
|
1481
|
+
targetOffset: t ? Y({
|
|
1482
1482
|
event: e,
|
|
1483
1483
|
target: t
|
|
1484
1484
|
}) : void 0,
|
|
1485
|
-
builderTargetOffset: n ?
|
|
1485
|
+
builderTargetOffset: n ? Y({
|
|
1486
1486
|
event: e,
|
|
1487
1487
|
target: n
|
|
1488
1488
|
}) : void 0,
|
|
1489
1489
|
builderElementIndex: n && i ? [].slice.call(document.getElementsByClassName(i)).indexOf(n) : void 0
|
|
1490
1490
|
}
|
|
1491
1491
|
};
|
|
1492
|
-
},
|
|
1492
|
+
}, mt = (e) => {
|
|
1493
1493
|
var m, a;
|
|
1494
1494
|
const t = e.family + (e.kind && !e.kind.includes("#") ? ", " + e.kind : ""), n = t.split(",")[0], i = (a = e.fileUrl) != null ? a : (m = e == null ? void 0 : e.files) == null ? void 0 : m.regular;
|
|
1495
1495
|
let d = "";
|
|
@@ -1504,26 +1504,26 @@ font-weight: 400;
|
|
|
1504
1504
|
for (const o in e.files) {
|
|
1505
1505
|
if (!(String(Number(o)) === o))
|
|
1506
1506
|
continue;
|
|
1507
|
-
const
|
|
1508
|
-
|
|
1507
|
+
const S = e.files[o];
|
|
1508
|
+
S && S !== i && (d += `
|
|
1509
1509
|
@font-face {
|
|
1510
1510
|
font-family: "${t}";
|
|
1511
|
-
src: url('${
|
|
1511
|
+
src: url('${S}') format('woff2');
|
|
1512
1512
|
font-display: fallback;
|
|
1513
1513
|
font-weight: ${o};
|
|
1514
1514
|
}
|
|
1515
1515
|
`.trim());
|
|
1516
1516
|
}
|
|
1517
1517
|
return d;
|
|
1518
|
-
},
|
|
1518
|
+
}, pt = ({
|
|
1519
1519
|
customFonts: e
|
|
1520
1520
|
}) => {
|
|
1521
1521
|
var t;
|
|
1522
|
-
return ((t = e == null ? void 0 : e.map((n) =>
|
|
1523
|
-
},
|
|
1522
|
+
return ((t = e == null ? void 0 : e.map((n) => mt(n))) == null ? void 0 : t.join(" ")) || "";
|
|
1523
|
+
}, gt = ({
|
|
1524
1524
|
cssCode: e,
|
|
1525
1525
|
contentId: t
|
|
1526
|
-
}) => e ? t ? (e == null ? void 0 : e.replace(/&/g, `div[builder-content-id="${t}"]`)) || "" : e : "",
|
|
1526
|
+
}) => e ? t ? (e == null ? void 0 : e.replace(/&/g, `div[builder-content-id="${t}"]`)) || "" : e : "", ft = `
|
|
1527
1527
|
.builder-button {
|
|
1528
1528
|
all: unset;
|
|
1529
1529
|
}
|
|
@@ -1540,39 +1540,39 @@ font-weight: ${o};
|
|
|
1540
1540
|
text-align: inherit;
|
|
1541
1541
|
font-family: inherit;
|
|
1542
1542
|
}
|
|
1543
|
-
`,
|
|
1544
|
-
function
|
|
1545
|
-
var
|
|
1546
|
-
const t =
|
|
1543
|
+
`, ht = (e) => e ? "" : ft, bt = (e) => `variant-${e}`;
|
|
1544
|
+
function yt(e) {
|
|
1545
|
+
var g, u, E;
|
|
1546
|
+
const t = q(null);
|
|
1547
1547
|
function n(r) {
|
|
1548
|
-
var
|
|
1549
|
-
const
|
|
1548
|
+
var f, s;
|
|
1549
|
+
const c = {
|
|
1550
1550
|
...e.builderContextSignal.rootState,
|
|
1551
1551
|
...r
|
|
1552
1552
|
};
|
|
1553
|
-
e.builderContextSignal.rootSetState ? (s = (
|
|
1553
|
+
e.builderContextSignal.rootSetState ? (s = (f = e.builderContextSignal).rootSetState) == null || s.call(f, c) : e.setBuilderContextSignal((l) => ({
|
|
1554
1554
|
...l,
|
|
1555
|
-
rootState:
|
|
1555
|
+
rootState: c
|
|
1556
1556
|
}));
|
|
1557
1557
|
}
|
|
1558
1558
|
function i(r) {
|
|
1559
|
-
var
|
|
1560
|
-
const
|
|
1559
|
+
var f, s, l, h, V;
|
|
1560
|
+
const c = {
|
|
1561
1561
|
...e.builderContextSignal.content,
|
|
1562
1562
|
...r,
|
|
1563
1563
|
data: {
|
|
1564
|
-
...(
|
|
1564
|
+
...(f = e.builderContextSignal.content) == null ? void 0 : f.data,
|
|
1565
1565
|
...r == null ? void 0 : r.data
|
|
1566
1566
|
},
|
|
1567
1567
|
meta: {
|
|
1568
1568
|
...(s = e.builderContextSignal.content) == null ? void 0 : s.meta,
|
|
1569
1569
|
...r == null ? void 0 : r.meta,
|
|
1570
|
-
breakpoints: ((l = r == null ? void 0 : r.meta) == null ? void 0 : l.breakpoints) || ((
|
|
1570
|
+
breakpoints: ((l = r == null ? void 0 : r.meta) == null ? void 0 : l.breakpoints) || ((V = (h = e.builderContextSignal.content) == null ? void 0 : h.meta) == null ? void 0 : V.breakpoints)
|
|
1571
1571
|
}
|
|
1572
1572
|
};
|
|
1573
|
-
e.setBuilderContextSignal((
|
|
1574
|
-
...
|
|
1575
|
-
content:
|
|
1573
|
+
e.setBuilderContextSignal((x) => ({
|
|
1574
|
+
...x,
|
|
1575
|
+
content: c
|
|
1576
1576
|
}));
|
|
1577
1577
|
}
|
|
1578
1578
|
function d() {
|
|
@@ -1581,76 +1581,61 @@ function kt(e) {
|
|
|
1581
1581
|
"aria-hidden": !0
|
|
1582
1582
|
};
|
|
1583
1583
|
}
|
|
1584
|
-
const [m, a] =
|
|
1584
|
+
const [m, a] = T(
|
|
1585
1585
|
() => e.contentWrapper || "div"
|
|
1586
1586
|
);
|
|
1587
1587
|
function o(r) {
|
|
1588
|
-
return
|
|
1588
|
+
return de({
|
|
1589
1589
|
model: e.model,
|
|
1590
1590
|
trustedHosts: e.trustedHosts,
|
|
1591
1591
|
callbacks: {
|
|
1592
|
-
configureSdk: (
|
|
1592
|
+
configureSdk: (c) => {
|
|
1593
1593
|
var l;
|
|
1594
|
-
const { breakpoints:
|
|
1595
|
-
!s || s !== ((l = e.builderContextSignal.content) == null ? void 0 : l.id) ||
|
|
1594
|
+
const { breakpoints: f, contentId: s } = c;
|
|
1595
|
+
!s || s !== ((l = e.builderContextSignal.content) == null ? void 0 : l.id) || f && i({
|
|
1596
1596
|
meta: {
|
|
1597
|
-
breakpoints:
|
|
1597
|
+
breakpoints: f
|
|
1598
1598
|
}
|
|
1599
1599
|
});
|
|
1600
1600
|
},
|
|
1601
|
-
animation: (
|
|
1602
|
-
|
|
1601
|
+
animation: (c) => {
|
|
1602
|
+
Se(c);
|
|
1603
1603
|
},
|
|
1604
|
-
contentUpdate: (
|
|
1605
|
-
i(
|
|
1604
|
+
contentUpdate: (c) => {
|
|
1605
|
+
i(c);
|
|
1606
1606
|
}
|
|
1607
1607
|
}
|
|
1608
1608
|
})(r);
|
|
1609
1609
|
}
|
|
1610
|
-
|
|
1611
|
-
|
|
1612
|
-
|
|
1613
|
-
r && Q({
|
|
1614
|
-
code: r,
|
|
1615
|
-
context: e.context || {},
|
|
1616
|
-
localState: void 0,
|
|
1617
|
-
rootState: e.builderContextSignal.rootState,
|
|
1618
|
-
rootSetState: e.builderContextSignal.rootSetState,
|
|
1619
|
-
/**
|
|
1620
|
-
* We don't want to cache the result of the JS code, since it's arbitrary side effect code.
|
|
1621
|
-
*/
|
|
1622
|
-
enableCache: !1
|
|
1623
|
-
});
|
|
1624
|
-
}
|
|
1625
|
-
const [b, C] = k(() => ({})), [T, V] = k(() => ({})), [E, F] = k(() => !1);
|
|
1626
|
-
function x(r) {
|
|
1627
|
-
var u, g;
|
|
1610
|
+
const [p, S] = T(() => ({})), [y, w] = T(() => ({})), [k, F] = T(() => !1);
|
|
1611
|
+
function P(r) {
|
|
1612
|
+
var c, f;
|
|
1628
1613
|
if (e.builderContextSignal.content) {
|
|
1629
|
-
const s = (
|
|
1630
|
-
|
|
1614
|
+
const s = (c = e.builderContextSignal.content) == null ? void 0 : c.testVariationId, l = (f = e.builderContextSignal.content) == null ? void 0 : f.id;
|
|
1615
|
+
O({
|
|
1631
1616
|
type: "click",
|
|
1632
|
-
canTrack:
|
|
1617
|
+
canTrack: D(e.canTrack),
|
|
1633
1618
|
contentId: l,
|
|
1634
1619
|
apiKey: e.apiKey,
|
|
1635
1620
|
variationId: s !== l ? s : void 0,
|
|
1636
|
-
...
|
|
1637
|
-
unique: !
|
|
1621
|
+
...ct(r),
|
|
1622
|
+
unique: !k
|
|
1638
1623
|
});
|
|
1639
1624
|
}
|
|
1640
|
-
|
|
1625
|
+
k || F(!0);
|
|
1641
1626
|
}
|
|
1642
|
-
function
|
|
1643
|
-
var
|
|
1644
|
-
const r = (s = (
|
|
1645
|
-
Object.entries(r).forEach(([l,
|
|
1646
|
-
if (!
|
|
1627
|
+
function W() {
|
|
1628
|
+
var c, f, s;
|
|
1629
|
+
const r = (s = (f = (c = e.builderContextSignal.content) == null ? void 0 : c.data) == null ? void 0 : f.httpRequests) != null ? s : {};
|
|
1630
|
+
Object.entries(r).forEach(([l, h]) => {
|
|
1631
|
+
if (!h || y[l] || p[l] && !A())
|
|
1647
1632
|
return;
|
|
1648
|
-
|
|
1649
|
-
const
|
|
1633
|
+
y[l] = !0;
|
|
1634
|
+
const V = h.replace(
|
|
1650
1635
|
/{{([^}]+)}}/g,
|
|
1651
|
-
(
|
|
1652
|
-
|
|
1653
|
-
code:
|
|
1636
|
+
(x, ae) => String(
|
|
1637
|
+
Z({
|
|
1638
|
+
code: ae,
|
|
1654
1639
|
context: e.context || {},
|
|
1655
1640
|
localState: void 0,
|
|
1656
1641
|
rootState: e.builderContextSignal.rootState,
|
|
@@ -1659,24 +1644,24 @@ function kt(e) {
|
|
|
1659
1644
|
})
|
|
1660
1645
|
)
|
|
1661
1646
|
);
|
|
1662
|
-
|
|
1647
|
+
fetch(V).then((x) => x.json()).then((x) => {
|
|
1663
1648
|
n({
|
|
1664
|
-
[l]:
|
|
1665
|
-
}),
|
|
1666
|
-
}).catch((
|
|
1667
|
-
console.error("error fetching dynamic data",
|
|
1649
|
+
[l]: x
|
|
1650
|
+
}), p[l] = !0;
|
|
1651
|
+
}).catch((x) => {
|
|
1652
|
+
console.error("error fetching dynamic data", h, x);
|
|
1668
1653
|
}).finally(() => {
|
|
1669
|
-
|
|
1654
|
+
y[l] = !1;
|
|
1670
1655
|
});
|
|
1671
1656
|
});
|
|
1672
1657
|
}
|
|
1673
|
-
function
|
|
1674
|
-
|
|
1658
|
+
function I() {
|
|
1659
|
+
A() && window.dispatchEvent(
|
|
1675
1660
|
new CustomEvent(
|
|
1676
1661
|
"builder:component:stateChange",
|
|
1677
1662
|
{
|
|
1678
1663
|
detail: {
|
|
1679
|
-
state:
|
|
1664
|
+
state: Te(e.builderContextSignal.rootState),
|
|
1680
1665
|
ref: {
|
|
1681
1666
|
name: e.model
|
|
1682
1667
|
}
|
|
@@ -1685,10 +1670,11 @@ function kt(e) {
|
|
|
1685
1670
|
)
|
|
1686
1671
|
);
|
|
1687
1672
|
}
|
|
1688
|
-
|
|
1689
|
-
|
|
1690
|
-
|
|
1691
|
-
|
|
1673
|
+
const R = q(!1);
|
|
1674
|
+
return R.current || (W(), I(), R.current = !0), C(() => {
|
|
1675
|
+
var r, c;
|
|
1676
|
+
if (j()) {
|
|
1677
|
+
if (A() && (window.addEventListener("message", o), ie(), oe({
|
|
1692
1678
|
...e.locale ? {
|
|
1693
1679
|
locale: e.locale
|
|
1694
1680
|
} : {},
|
|
@@ -1701,89 +1687,81 @@ function kt(e) {
|
|
|
1701
1687
|
}), Object.values(
|
|
1702
1688
|
e.builderContextSignal.componentInfos
|
|
1703
1689
|
).forEach((s) => {
|
|
1704
|
-
var
|
|
1705
|
-
const l =
|
|
1706
|
-
(
|
|
1690
|
+
var h;
|
|
1691
|
+
const l = re(s);
|
|
1692
|
+
(h = window.parent) == null || h.postMessage(l, "*");
|
|
1707
1693
|
}), window.addEventListener(
|
|
1708
1694
|
"builder:component:stateChangeListenerActivated",
|
|
1709
|
-
|
|
1710
|
-
)), e.builderContextSignal.content &&
|
|
1711
|
-
const s = (r = e.builderContextSignal.content) == null ? void 0 : r.testVariationId, l = (
|
|
1712
|
-
|
|
1695
|
+
I
|
|
1696
|
+
)), e.builderContextSignal.content && D(e.canTrack)) {
|
|
1697
|
+
const s = (r = e.builderContextSignal.content) == null ? void 0 : r.testVariationId, l = (c = e.builderContextSignal.content) == null ? void 0 : c.id, h = e.apiKey;
|
|
1698
|
+
O({
|
|
1713
1699
|
type: "impression",
|
|
1714
1700
|
canTrack: !0,
|
|
1715
1701
|
contentId: l,
|
|
1716
|
-
apiKey:
|
|
1702
|
+
apiKey: h,
|
|
1717
1703
|
variationId: s !== l ? s : void 0
|
|
1718
1704
|
});
|
|
1719
1705
|
}
|
|
1720
|
-
if (
|
|
1721
|
-
const s = new URL(location.href).searchParams, l = s.get("builder.preview"),
|
|
1706
|
+
if (le() && !A()) {
|
|
1707
|
+
const s = new URL(location.href).searchParams, l = s.get("builder.preview"), h = s.get(
|
|
1722
1708
|
`builder.overrides.${l}`
|
|
1723
|
-
),
|
|
1724
|
-
l === e.model &&
|
|
1709
|
+
), V = s.get("apiKey") || s.get("builder.space");
|
|
1710
|
+
l === e.model && V === e.apiKey && (!e.content || h === e.content.id) && se({
|
|
1725
1711
|
model: e.model,
|
|
1726
1712
|
apiKey: e.apiKey,
|
|
1727
1713
|
apiVersion: e.builderContextSignal.apiVersion
|
|
1728
|
-
}).then((
|
|
1729
|
-
|
|
1714
|
+
}).then((x) => {
|
|
1715
|
+
x && i(x);
|
|
1730
1716
|
});
|
|
1731
1717
|
}
|
|
1732
1718
|
}
|
|
1733
|
-
}, []),
|
|
1734
|
-
e.apiKey || pe.error(
|
|
1735
|
-
"No API key provided to `Content` component. This can cause issues. Please provide an API key using the `apiKey` prop."
|
|
1736
|
-
), p(), c(), w();
|
|
1737
|
-
}, []), S(() => {
|
|
1719
|
+
}, []), C(() => {
|
|
1738
1720
|
e.content && i(e.content);
|
|
1739
|
-
}, [e.content]),
|
|
1740
|
-
|
|
1741
|
-
}, [
|
|
1742
|
-
c();
|
|
1743
|
-
}, [(K = (j = e.builderContextSignal.content) == null ? void 0 : j.data) == null ? void 0 : K.httpRequests]), S(() => {
|
|
1744
|
-
w();
|
|
1745
|
-
}, [e.builderContextSignal.rootState]), S(() => {
|
|
1721
|
+
}, [e.content]), C(() => {
|
|
1722
|
+
I();
|
|
1723
|
+
}, [e.builderContextSignal.rootState]), C(() => {
|
|
1746
1724
|
e.data && n(e.data);
|
|
1747
|
-
}, [e.data]),
|
|
1725
|
+
}, [e.data]), C(() => {
|
|
1748
1726
|
e.locale && n({
|
|
1749
1727
|
locale: e.locale
|
|
1750
1728
|
});
|
|
1751
|
-
}, [e.locale]),
|
|
1752
|
-
|
|
1729
|
+
}, [e.locale]), C(() => () => {
|
|
1730
|
+
j() && (window.removeEventListener("message", o), window.removeEventListener(
|
|
1753
1731
|
"builder:component:stateChangeListenerActivated",
|
|
1754
|
-
|
|
1732
|
+
I
|
|
1755
1733
|
));
|
|
1756
|
-
}, []), /* @__PURE__ */
|
|
1734
|
+
}, []), /* @__PURE__ */ b(ve.Provider, { value: e.builderContextSignal, children: e.builderContextSignal.content ? /* @__PURE__ */ b(
|
|
1757
1735
|
m,
|
|
1758
1736
|
{
|
|
1759
1737
|
ref: t,
|
|
1760
|
-
onClick: (r) =>
|
|
1761
|
-
"builder-content-id": (
|
|
1738
|
+
onClick: (r) => P(r),
|
|
1739
|
+
"builder-content-id": (g = e.builderContextSignal.content) == null ? void 0 : g.id,
|
|
1762
1740
|
"builder-model": e.model,
|
|
1741
|
+
className: bt(
|
|
1742
|
+
((u = e.content) == null ? void 0 : u.testVariationId) || ((E = e.content) == null ? void 0 : E.id)
|
|
1743
|
+
),
|
|
1763
1744
|
...d(),
|
|
1764
1745
|
...e.contentWrapperProps,
|
|
1765
|
-
className: Tt(
|
|
1766
|
-
((O = e.content) == null ? void 0 : O.testVariationId) || ((_ = e.content) == null ? void 0 : _.id)
|
|
1767
|
-
),
|
|
1768
1746
|
children: e.children
|
|
1769
1747
|
}
|
|
1770
1748
|
) : null });
|
|
1771
1749
|
}
|
|
1772
|
-
function
|
|
1773
|
-
const [t, n] =
|
|
1750
|
+
function xt(e) {
|
|
1751
|
+
const [t, n] = T(
|
|
1774
1752
|
() => `
|
|
1775
|
-
${
|
|
1753
|
+
${gt({
|
|
1776
1754
|
cssCode: e.cssCode,
|
|
1777
1755
|
contentId: e.contentId
|
|
1778
1756
|
})}
|
|
1779
|
-
${
|
|
1757
|
+
${pt({
|
|
1780
1758
|
customFonts: e.customFonts
|
|
1781
1759
|
})}
|
|
1782
|
-
${
|
|
1760
|
+
${ht(e.isNestedRender)}
|
|
1783
1761
|
`.trim()
|
|
1784
1762
|
);
|
|
1785
|
-
return /* @__PURE__ */
|
|
1786
|
-
|
|
1763
|
+
return /* @__PURE__ */ b(
|
|
1764
|
+
X,
|
|
1787
1765
|
{
|
|
1788
1766
|
id: "builderio-content",
|
|
1789
1767
|
styles: t,
|
|
@@ -1791,7 +1769,7 @@ ${St(e.isNestedRender)}
|
|
|
1791
1769
|
}
|
|
1792
1770
|
);
|
|
1793
1771
|
}
|
|
1794
|
-
const
|
|
1772
|
+
const vt = ({
|
|
1795
1773
|
content: e,
|
|
1796
1774
|
data: t,
|
|
1797
1775
|
locale: n
|
|
@@ -1808,7 +1786,7 @@ const It = ({
|
|
|
1808
1786
|
locale: n
|
|
1809
1787
|
} : {}
|
|
1810
1788
|
};
|
|
1811
|
-
},
|
|
1789
|
+
}, St = ({
|
|
1812
1790
|
content: e,
|
|
1813
1791
|
data: t
|
|
1814
1792
|
}) => e ? {
|
|
@@ -1819,51 +1797,51 @@ const It = ({
|
|
|
1819
1797
|
},
|
|
1820
1798
|
meta: e == null ? void 0 : e.meta
|
|
1821
1799
|
} : void 0;
|
|
1822
|
-
function
|
|
1823
|
-
var
|
|
1824
|
-
const [t, n] =
|
|
1800
|
+
function Q(e) {
|
|
1801
|
+
var S, y, w, k, F, P, W, I, R;
|
|
1802
|
+
const [t, n] = T(
|
|
1825
1803
|
() => {
|
|
1826
|
-
var
|
|
1827
|
-
return
|
|
1804
|
+
var g, u;
|
|
1805
|
+
return st({
|
|
1828
1806
|
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion, @typescript-eslint/no-non-null-asserted-optional-chain
|
|
1829
|
-
variationId: (
|
|
1807
|
+
variationId: (g = e.content) == null ? void 0 : g.testVariationId,
|
|
1830
1808
|
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion, @typescript-eslint/no-non-null-asserted-optional-chain
|
|
1831
|
-
contentId: (
|
|
1809
|
+
contentId: (u = e.content) == null ? void 0 : u.id
|
|
1832
1810
|
});
|
|
1833
1811
|
}
|
|
1834
1812
|
);
|
|
1835
|
-
function i(
|
|
1836
|
-
o((
|
|
1837
|
-
...
|
|
1838
|
-
rootState:
|
|
1813
|
+
function i(g) {
|
|
1814
|
+
o((u) => ({
|
|
1815
|
+
...u,
|
|
1816
|
+
rootState: g
|
|
1839
1817
|
}));
|
|
1840
1818
|
}
|
|
1841
|
-
const [d, m] =
|
|
1819
|
+
const [d, m] = T(
|
|
1842
1820
|
() => {
|
|
1843
|
-
var
|
|
1821
|
+
var g;
|
|
1844
1822
|
return [
|
|
1845
|
-
...
|
|
1846
|
-
...((
|
|
1823
|
+
...z(),
|
|
1824
|
+
...((g = e.customComponents) == null ? void 0 : g.filter(({ models: u }) => !(u != null && u.length) || !e.model ? !0 : u.includes(e.model))) || []
|
|
1847
1825
|
].reduce(
|
|
1848
|
-
(
|
|
1849
|
-
...
|
|
1850
|
-
[
|
|
1851
|
-
component:
|
|
1852
|
-
...
|
|
1826
|
+
(u, { component: E, ...r }) => ({
|
|
1827
|
+
...u,
|
|
1828
|
+
[r.name]: {
|
|
1829
|
+
component: E,
|
|
1830
|
+
..._(r)
|
|
1853
1831
|
}
|
|
1854
1832
|
}),
|
|
1855
1833
|
{}
|
|
1856
1834
|
);
|
|
1857
1835
|
}
|
|
1858
|
-
), [a, o] =
|
|
1859
|
-
var
|
|
1836
|
+
), [a, o] = T(() => {
|
|
1837
|
+
var g;
|
|
1860
1838
|
return {
|
|
1861
|
-
content:
|
|
1839
|
+
content: St({
|
|
1862
1840
|
content: e.content,
|
|
1863
1841
|
data: e.data
|
|
1864
1842
|
}),
|
|
1865
1843
|
localState: void 0,
|
|
1866
|
-
rootState:
|
|
1844
|
+
rootState: vt({
|
|
1867
1845
|
content: e.content,
|
|
1868
1846
|
data: e.data,
|
|
1869
1847
|
locale: e.locale
|
|
@@ -1874,12 +1852,12 @@ function ee(e) {
|
|
|
1874
1852
|
apiKey: e.apiKey,
|
|
1875
1853
|
apiVersion: e.apiVersion,
|
|
1876
1854
|
componentInfos: [
|
|
1877
|
-
...
|
|
1878
|
-
...((
|
|
1855
|
+
...z(),
|
|
1856
|
+
...((g = e.customComponents) == null ? void 0 : g.filter(({ models: u }) => !(u != null && u.length) || !e.model ? !0 : u.includes(e.model))) || []
|
|
1879
1857
|
].reduce(
|
|
1880
|
-
(
|
|
1881
|
-
...
|
|
1882
|
-
[
|
|
1858
|
+
(u, { component: E, ...r }) => ({
|
|
1859
|
+
...u,
|
|
1860
|
+
[r.name]: _(r)
|
|
1883
1861
|
}),
|
|
1884
1862
|
{}
|
|
1885
1863
|
),
|
|
@@ -1888,15 +1866,35 @@ function ee(e) {
|
|
|
1888
1866
|
BlocksWrapperProps: e.blocksWrapperProps || {},
|
|
1889
1867
|
nonce: e.nonce || ""
|
|
1890
1868
|
};
|
|
1891
|
-
});
|
|
1892
|
-
|
|
1893
|
-
|
|
1869
|
+
}), p = q(!1);
|
|
1870
|
+
if (!p.current) {
|
|
1871
|
+
e.apiKey || ue.error(
|
|
1872
|
+
"No API key provided to `Content` component. This can cause issues. Please provide an API key using the `apiKey` prop."
|
|
1873
|
+
);
|
|
1874
|
+
const g = (y = (S = a.content) == null ? void 0 : S.data) == null ? void 0 : y.jsCode;
|
|
1875
|
+
g && Z({
|
|
1876
|
+
code: g,
|
|
1877
|
+
context: e.context || {},
|
|
1878
|
+
localState: void 0,
|
|
1879
|
+
rootState: a.rootState,
|
|
1880
|
+
rootSetState: (u) => {
|
|
1881
|
+
Object.assign(a.rootState, u);
|
|
1882
|
+
},
|
|
1883
|
+
isExpression: !1,
|
|
1884
|
+
/**
|
|
1885
|
+
* We don't want to cache the result of the JS code, since it's arbitrary side effect code.
|
|
1886
|
+
*/
|
|
1887
|
+
enableCache: !1
|
|
1888
|
+
}), p.current = !0;
|
|
1889
|
+
}
|
|
1890
|
+
return /* @__PURE__ */ b(
|
|
1891
|
+
ke.Provider,
|
|
1894
1892
|
{
|
|
1895
1893
|
value: {
|
|
1896
1894
|
registeredComponents: d
|
|
1897
1895
|
},
|
|
1898
|
-
children: /* @__PURE__ */
|
|
1899
|
-
|
|
1896
|
+
children: /* @__PURE__ */ N(
|
|
1897
|
+
yt,
|
|
1900
1898
|
{
|
|
1901
1899
|
nonce: e.nonce,
|
|
1902
1900
|
content: e.content,
|
|
@@ -1914,28 +1912,28 @@ function ee(e) {
|
|
|
1914
1912
|
trustedHosts: e.trustedHosts,
|
|
1915
1913
|
setBuilderContextSignal: o,
|
|
1916
1914
|
children: [
|
|
1917
|
-
e.isSsrAbTest ? /* @__PURE__ */
|
|
1918
|
-
|
|
1915
|
+
e.isSsrAbTest ? /* @__PURE__ */ b(
|
|
1916
|
+
K,
|
|
1919
1917
|
{
|
|
1920
1918
|
id: "builderio-variant-visibility",
|
|
1921
1919
|
scriptStr: t,
|
|
1922
1920
|
nonce: e.nonce || ""
|
|
1923
1921
|
}
|
|
1924
1922
|
) : null,
|
|
1925
|
-
/* @__PURE__ */
|
|
1926
|
-
|
|
1923
|
+
/* @__PURE__ */ b(
|
|
1924
|
+
xt,
|
|
1927
1925
|
{
|
|
1928
1926
|
nonce: e.nonce || "",
|
|
1929
1927
|
isNestedRender: e.isNestedRender,
|
|
1930
|
-
contentId: (
|
|
1931
|
-
cssCode: (
|
|
1932
|
-
customFonts: (
|
|
1928
|
+
contentId: (w = a.content) == null ? void 0 : w.id,
|
|
1929
|
+
cssCode: (F = (k = a.content) == null ? void 0 : k.data) == null ? void 0 : F.cssCode,
|
|
1930
|
+
customFonts: (W = (P = a.content) == null ? void 0 : P.data) == null ? void 0 : W.customFonts
|
|
1933
1931
|
}
|
|
1934
1932
|
),
|
|
1935
|
-
/* @__PURE__ */
|
|
1936
|
-
|
|
1933
|
+
/* @__PURE__ */ b(
|
|
1934
|
+
Ie,
|
|
1937
1935
|
{
|
|
1938
|
-
blocks: (
|
|
1936
|
+
blocks: (R = (I = a.content) == null ? void 0 : I.data) == null ? void 0 : R.blocks,
|
|
1939
1937
|
context: a,
|
|
1940
1938
|
registeredComponents: d,
|
|
1941
1939
|
linkComponent: e.linkComponent
|
|
@@ -1947,18 +1945,18 @@ function ee(e) {
|
|
|
1947
1945
|
}
|
|
1948
1946
|
);
|
|
1949
1947
|
}
|
|
1950
|
-
function
|
|
1948
|
+
function Ft(e) {
|
|
1951
1949
|
var a;
|
|
1952
|
-
const [t, n] =
|
|
1953
|
-
() =>
|
|
1954
|
-
canTrack:
|
|
1950
|
+
const [t, n] = T(
|
|
1951
|
+
() => it({
|
|
1952
|
+
canTrack: D(e.canTrack),
|
|
1955
1953
|
content: e.content
|
|
1956
1954
|
})
|
|
1957
1955
|
);
|
|
1958
1956
|
function i() {
|
|
1959
1957
|
var o;
|
|
1960
|
-
return
|
|
1961
|
-
|
|
1958
|
+
return lt(
|
|
1959
|
+
B(e.content).map((p) => ({
|
|
1962
1960
|
id: p.testVariationId,
|
|
1963
1961
|
testRatio: p.testRatio
|
|
1964
1962
|
})),
|
|
@@ -1966,47 +1964,47 @@ function Dt(e) {
|
|
|
1966
1964
|
);
|
|
1967
1965
|
}
|
|
1968
1966
|
function d() {
|
|
1969
|
-
return
|
|
1967
|
+
return B(e.content).map((o) => `.variant-${o.testVariationId} { display: none; } `).join("");
|
|
1970
1968
|
}
|
|
1971
1969
|
function m() {
|
|
1972
1970
|
var o;
|
|
1973
1971
|
return t ? {
|
|
1974
1972
|
...e.content,
|
|
1975
1973
|
testVariationId: (o = e.content) == null ? void 0 : o.id
|
|
1976
|
-
} :
|
|
1974
|
+
} : ce({
|
|
1977
1975
|
item: e.content,
|
|
1978
|
-
canTrack:
|
|
1976
|
+
canTrack: D(e.canTrack)
|
|
1979
1977
|
});
|
|
1980
1978
|
}
|
|
1981
|
-
return
|
|
1982
|
-
}, []), /* @__PURE__ */
|
|
1983
|
-
!e.isNestedRender &&
|
|
1984
|
-
|
|
1979
|
+
return C(() => {
|
|
1980
|
+
}, []), /* @__PURE__ */ N(M, { children: [
|
|
1981
|
+
!e.isNestedRender && G !== "reactNative" ? /* @__PURE__ */ b(
|
|
1982
|
+
K,
|
|
1985
1983
|
{
|
|
1986
1984
|
id: "builderio-init-variants-fns",
|
|
1987
|
-
scriptStr:
|
|
1985
|
+
scriptStr: rt(),
|
|
1988
1986
|
nonce: e.nonce || ""
|
|
1989
1987
|
}
|
|
1990
1988
|
) : null,
|
|
1991
|
-
t ? /* @__PURE__ */
|
|
1992
|
-
/* @__PURE__ */
|
|
1993
|
-
|
|
1989
|
+
t ? /* @__PURE__ */ N(M, { children: [
|
|
1990
|
+
/* @__PURE__ */ b(
|
|
1991
|
+
X,
|
|
1994
1992
|
{
|
|
1995
1993
|
id: "builderio-variants",
|
|
1996
1994
|
styles: d(),
|
|
1997
1995
|
nonce: e.nonce || ""
|
|
1998
1996
|
}
|
|
1999
1997
|
),
|
|
2000
|
-
/* @__PURE__ */
|
|
2001
|
-
|
|
1998
|
+
/* @__PURE__ */ b(
|
|
1999
|
+
K,
|
|
2002
2000
|
{
|
|
2003
2001
|
id: "builderio-variants-visibility",
|
|
2004
2002
|
scriptStr: i(),
|
|
2005
2003
|
nonce: e.nonce || ""
|
|
2006
2004
|
}
|
|
2007
2005
|
),
|
|
2008
|
-
(a =
|
|
2009
|
-
|
|
2006
|
+
(a = B(e.content)) == null ? void 0 : a.map((o) => /* @__PURE__ */ b(
|
|
2007
|
+
Q,
|
|
2010
2008
|
{
|
|
2011
2009
|
isNestedRender: e.isNestedRender,
|
|
2012
2010
|
nonce: e.nonce,
|
|
@@ -2032,8 +2030,8 @@ function Dt(e) {
|
|
|
2032
2030
|
o.testVariationId
|
|
2033
2031
|
))
|
|
2034
2032
|
] }) : null,
|
|
2035
|
-
/* @__PURE__ */
|
|
2036
|
-
|
|
2033
|
+
/* @__PURE__ */ b(
|
|
2034
|
+
Q,
|
|
2037
2035
|
{
|
|
2038
2036
|
nonce: e.nonce,
|
|
2039
2037
|
isNestedRender: e.isNestedRender,
|
|
@@ -2060,5 +2058,5 @@ function Dt(e) {
|
|
|
2060
2058
|
] });
|
|
2061
2059
|
}
|
|
2062
2060
|
export {
|
|
2063
|
-
|
|
2061
|
+
Ft as default
|
|
2064
2062
|
};
|