@builder.io/sdk-react-nextjs 0.14.10 → 0.14.12
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/README.md +50 -38
- package/lib/browser/USE_CLIENT_BUNDLE-2bbdea6c.cjs +21 -0
- package/lib/browser/{USE_CLIENT_BUNDLE-23f56a7a.js → USE_CLIENT_BUNDLE-c82c8713.js} +202 -211
- package/lib/{edge/USE_SERVER_BUNDLE-87f6dbbe.cjs → browser/USE_SERVER_BUNDLE-62b1c4be.cjs} +1 -1
- package/lib/{edge/USE_SERVER_BUNDLE-d7280e1d.js → browser/USE_SERVER_BUNDLE-c1a3d2f3.js} +1 -1
- package/lib/browser/{bundle-8b50c7b8.cjs → bundle-4a0b6a84.cjs} +10 -10
- package/lib/browser/{bundle-53becb42.js → bundle-98fafe36.js} +158 -134
- package/lib/browser/index.cjs +1 -1
- package/lib/browser/index.mjs +5 -5
- package/lib/{node/USE_CLIENT_BUNDLE-1dd54b7e.js → edge/USE_CLIENT_BUNDLE-75473f15.js} +202 -211
- package/lib/edge/USE_CLIENT_BUNDLE-cf915435.cjs +21 -0
- package/lib/{node/USE_SERVER_BUNDLE-3c851565.cjs → edge/USE_SERVER_BUNDLE-0b27a689.cjs} +1 -1
- package/lib/{node/USE_SERVER_BUNDLE-df48fc17.js → edge/USE_SERVER_BUNDLE-2a938215.js} +1 -1
- package/lib/edge/{bundle-9f94b090.js → bundle-85357ad0.js} +367 -343
- package/lib/edge/{bundle-3db41e4c.cjs → bundle-eb2a536e.cjs} +13 -13
- package/lib/edge/index.cjs +1 -1
- package/lib/edge/index.mjs +5 -5
- package/lib/node/USE_CLIENT_BUNDLE-75f2f077.cjs +21 -0
- package/lib/{edge/USE_CLIENT_BUNDLE-fa4982fd.js → node/USE_CLIENT_BUNDLE-fb4f77f0.js} +202 -211
- package/lib/{browser/USE_SERVER_BUNDLE-e0504825.cjs → node/USE_SERVER_BUNDLE-16129827.cjs} +1 -1
- package/lib/{browser/USE_SERVER_BUNDLE-e89c8b6f.js → node/USE_SERVER_BUNDLE-63519b03.js} +1 -1
- package/lib/node/{bundle-ece0becd.cjs → bundle-2c8e3747.cjs} +9 -9
- package/lib/node/{bundle-6a6e07b9.js → bundle-5867f6cd.js} +139 -115
- package/lib/node/index.cjs +1 -1
- package/lib/node/index.mjs +5 -5
- package/package.json +1 -1
- package/types/cjs/components/content-variants/helpers.d.ts +1 -1
- package/types/cjs/components/inlined-script.d.ts +1 -1
- package/types/cjs/components/inlined-styles.d.ts +1 -1
- package/types/cjs/constants/sdk-version.d.ts +1 -1
- package/types/esm/components/content-variants/helpers.d.ts +1 -1
- package/types/esm/components/inlined-script.d.ts +1 -1
- package/types/esm/components/inlined-styles.d.ts +1 -1
- package/types/esm/constants/sdk-version.d.ts +1 -1
- package/lib/browser/USE_CLIENT_BUNDLE-eacd2786.cjs +0 -21
- package/lib/edge/USE_CLIENT_BUNDLE-47f68f73.cjs +0 -21
- package/lib/node/USE_CLIENT_BUNDLE-d7df2675.cjs +0 -21
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { jsx as l, Fragment as
|
|
1
|
+
import { jsx as l, Fragment as k, jsxs as R } from "react/jsx-runtime";
|
|
2
2
|
import "react";
|
|
3
3
|
import { LRUCache as We } from "lru-cache";
|
|
4
|
-
import { I as Oe, B as
|
|
4
|
+
import { I as Oe, B as Ne, a as $e, D as Fe, C as Le, E as Ue, b as De, V as _e, c as Me, F as je, d as He, S as Ke, e as ze } from "./USE_CLIENT_BUNDLE-c82c8713.js";
|
|
5
5
|
import "next/navigation";
|
|
6
6
|
const qe = /* @__PURE__ */ new Set(["area", "base", "br", "col", "embed", "hr", "img", "input", "keygen", "link", "meta", "param", "source", "track", "wbr"]), so = (e) => typeof e == "string" && qe.has(e.toLowerCase()), T = "rsc", M = () => {
|
|
7
7
|
switch (T) {
|
|
@@ -203,25 +203,25 @@ function K({
|
|
|
203
203
|
localState: n
|
|
204
204
|
};
|
|
205
205
|
if (s) {
|
|
206
|
-
const
|
|
206
|
+
const u = V.getCacheKey(c), p = V.getCachedValue(u);
|
|
207
207
|
if (p)
|
|
208
208
|
return p.value;
|
|
209
209
|
}
|
|
210
210
|
try {
|
|
211
|
-
const
|
|
211
|
+
const u = it(c);
|
|
212
212
|
if (s) {
|
|
213
213
|
const p = V.getCacheKey(c);
|
|
214
|
-
V.setCachedValue(p,
|
|
214
|
+
V.setCachedValue(p, u);
|
|
215
215
|
}
|
|
216
|
-
return
|
|
217
|
-
} catch (
|
|
218
|
-
x.error("Failed code evaluation: " +
|
|
216
|
+
return u;
|
|
217
|
+
} catch (u) {
|
|
218
|
+
x.error("Failed code evaluation: " + u.message, {
|
|
219
219
|
code: e
|
|
220
220
|
});
|
|
221
221
|
return;
|
|
222
222
|
}
|
|
223
223
|
}
|
|
224
|
-
const
|
|
224
|
+
const N = (e) => JSON.parse(JSON.stringify(e)), rt = (e, t, n) => {
|
|
225
225
|
if (Object(e) !== e)
|
|
226
226
|
return e;
|
|
227
227
|
const o = Array.isArray(t) ? t : t.toString().match(/[^.[\]]+/g);
|
|
@@ -236,7 +236,7 @@ const at = ({
|
|
|
236
236
|
}) => {
|
|
237
237
|
if (!e.bindings)
|
|
238
238
|
return e;
|
|
239
|
-
const r =
|
|
239
|
+
const r = N(e), a = {
|
|
240
240
|
...r,
|
|
241
241
|
properties: {
|
|
242
242
|
...r.properties
|
|
@@ -246,7 +246,7 @@ const at = ({
|
|
|
246
246
|
}
|
|
247
247
|
};
|
|
248
248
|
for (const s in e.bindings) {
|
|
249
|
-
const c = e.bindings[s],
|
|
249
|
+
const c = e.bindings[s], u = K({
|
|
250
250
|
code: c,
|
|
251
251
|
localState: n,
|
|
252
252
|
rootState: o,
|
|
@@ -254,7 +254,7 @@ const at = ({
|
|
|
254
254
|
context: t,
|
|
255
255
|
enableCache: !0
|
|
256
256
|
});
|
|
257
|
-
rt(a, s,
|
|
257
|
+
rt(a, s, u);
|
|
258
258
|
}
|
|
259
259
|
return a;
|
|
260
260
|
};
|
|
@@ -360,15 +360,15 @@ const ut = ({
|
|
|
360
360
|
if (!Array.isArray(i))
|
|
361
361
|
return;
|
|
362
362
|
const r = n.collection.split(".").pop(), a = n.itemName || (r ? r + "Item" : "item");
|
|
363
|
-
return i.map((c,
|
|
363
|
+
return i.map((c, u) => ({
|
|
364
364
|
context: {
|
|
365
365
|
...t,
|
|
366
366
|
localState: {
|
|
367
367
|
...t.localState,
|
|
368
|
-
$index:
|
|
368
|
+
$index: u,
|
|
369
369
|
$item: c,
|
|
370
370
|
[a]: c,
|
|
371
|
-
[`$${a}Index`]:
|
|
371
|
+
[`$${a}Index`]: u
|
|
372
372
|
}
|
|
373
373
|
},
|
|
374
374
|
block: o
|
|
@@ -393,7 +393,7 @@ const ut = ({
|
|
|
393
393
|
small: e,
|
|
394
394
|
medium: t
|
|
395
395
|
}) => {
|
|
396
|
-
const n =
|
|
396
|
+
const n = N(pe);
|
|
397
397
|
if (!e || !t)
|
|
398
398
|
return n;
|
|
399
399
|
const o = Math.floor(e / 2);
|
|
@@ -416,8 +416,14 @@ const ut = ({
|
|
|
416
416
|
default: r + 1
|
|
417
417
|
}, n;
|
|
418
418
|
};
|
|
419
|
-
function
|
|
420
|
-
return /* @__PURE__ */ l(
|
|
419
|
+
function $(e) {
|
|
420
|
+
return /* @__PURE__ */ l(
|
|
421
|
+
"style",
|
|
422
|
+
{
|
|
423
|
+
dangerouslySetInnerHTML: { __html: e.styles },
|
|
424
|
+
"data-id": e.id
|
|
425
|
+
}
|
|
426
|
+
);
|
|
421
427
|
}
|
|
422
428
|
function ft(e) {
|
|
423
429
|
const t = function() {
|
|
@@ -441,21 +447,21 @@ function ft(e) {
|
|
|
441
447
|
shouldEvaluateBindings: !0
|
|
442
448
|
}), r = i.responsiveStyles, a = e.context.content, s = ge(
|
|
443
449
|
((m = a == null ? void 0 : a.meta) == null ? void 0 : m.breakpoints) || {}
|
|
444
|
-
), c = r == null ? void 0 : r.large,
|
|
445
|
-
if (!
|
|
450
|
+
), c = r == null ? void 0 : r.large, u = r == null ? void 0 : r.medium, p = r == null ? void 0 : r.small, d = i.id;
|
|
451
|
+
if (!d)
|
|
446
452
|
return "";
|
|
447
453
|
const f = c ? L({
|
|
448
|
-
className:
|
|
454
|
+
className: d,
|
|
449
455
|
styles: c
|
|
450
|
-
}) : "", b =
|
|
451
|
-
className:
|
|
452
|
-
styles:
|
|
456
|
+
}) : "", b = u ? L({
|
|
457
|
+
className: d,
|
|
458
|
+
styles: u,
|
|
453
459
|
mediaQuery: J(
|
|
454
460
|
"medium",
|
|
455
461
|
s
|
|
456
462
|
)
|
|
457
463
|
}) : "", h = p ? L({
|
|
458
|
-
className:
|
|
464
|
+
className: d,
|
|
459
465
|
styles: p,
|
|
460
466
|
mediaQuery: J(
|
|
461
467
|
"small",
|
|
@@ -464,7 +470,7 @@ function ft(e) {
|
|
|
464
470
|
}) : "";
|
|
465
471
|
return [f, b, h].join(" ");
|
|
466
472
|
};
|
|
467
|
-
return /* @__PURE__ */ l(
|
|
473
|
+
return /* @__PURE__ */ l(k, { children: n() && t() ? /* @__PURE__ */ l(k, { children: /* @__PURE__ */ l($, { id: "builderio-block", styles: n() }) }) : null });
|
|
468
474
|
}
|
|
469
475
|
function ht(e) {
|
|
470
476
|
return e.charAt(0).toUpperCase() + e.slice(1);
|
|
@@ -528,7 +534,7 @@ function St({
|
|
|
528
534
|
block: e
|
|
529
535
|
});
|
|
530
536
|
}
|
|
531
|
-
const
|
|
537
|
+
const vt = ({
|
|
532
538
|
componentOptions: e,
|
|
533
539
|
builderBlock: t,
|
|
534
540
|
context: n,
|
|
@@ -561,10 +567,10 @@ const kt = ({
|
|
|
561
567
|
function Q(e) {
|
|
562
568
|
var n;
|
|
563
569
|
const t = e.isInteractive ? Oe : e.componentRef;
|
|
564
|
-
return /* @__PURE__ */ l(
|
|
570
|
+
return /* @__PURE__ */ l(k, { children: e.componentRef ? /* @__PURE__ */ l(k, { children: /* @__PURE__ */ l(
|
|
565
571
|
t,
|
|
566
572
|
{
|
|
567
|
-
...
|
|
573
|
+
...vt({
|
|
568
574
|
componentOptions: e.componentOptions,
|
|
569
575
|
builderBlock: e.builderBlock,
|
|
570
576
|
context: e.context,
|
|
@@ -587,7 +593,7 @@ function Q(e) {
|
|
|
587
593
|
}
|
|
588
594
|
) }) : null });
|
|
589
595
|
}
|
|
590
|
-
function
|
|
596
|
+
function kt(e) {
|
|
591
597
|
const t = e.repeatContext;
|
|
592
598
|
return /* @__PURE__ */ l(
|
|
593
599
|
F,
|
|
@@ -600,7 +606,7 @@ function vt(e) {
|
|
|
600
606
|
);
|
|
601
607
|
}
|
|
602
608
|
function F(e) {
|
|
603
|
-
var c,
|
|
609
|
+
var c, u, p;
|
|
604
610
|
const t = function() {
|
|
605
611
|
return ut({
|
|
606
612
|
block: e.block,
|
|
@@ -635,7 +641,7 @@ function F(e) {
|
|
|
635
641
|
var b;
|
|
636
642
|
return !((b = t()) != null && b.component) && !n() ? o().children ?? [] : [];
|
|
637
643
|
}, s = function() {
|
|
638
|
-
var f, b, h, m, y, g, C, E,
|
|
644
|
+
var f, b, h, m, y, g, C, E, v, I;
|
|
639
645
|
return {
|
|
640
646
|
blockChildren: o().children ?? [],
|
|
641
647
|
componentRef: (f = t()) == null ? void 0 : f.component,
|
|
@@ -653,13 +659,13 @@ function F(e) {
|
|
|
653
659
|
linkComponent: e.linkComponent,
|
|
654
660
|
registeredComponents: e.registeredComponents,
|
|
655
661
|
builderBlock: o(),
|
|
656
|
-
includeBlockProps: ((
|
|
662
|
+
includeBlockProps: ((v = t()) == null ? void 0 : v.noWrap) === !0,
|
|
657
663
|
isInteractive: !((I = t()) != null && I.isRSC)
|
|
658
664
|
};
|
|
659
665
|
};
|
|
660
|
-
return /* @__PURE__ */ l(
|
|
666
|
+
return /* @__PURE__ */ l(k, { children: r() ? /* @__PURE__ */ R(k, { children: [
|
|
661
667
|
/* @__PURE__ */ l(ft, { block: e.block, context: e.context }),
|
|
662
|
-
(c = t()) != null && c.noWrap ? /* @__PURE__ */ l(
|
|
668
|
+
(c = t()) != null && c.noWrap ? /* @__PURE__ */ l(k, { children: /* @__PURE__ */ l(
|
|
663
669
|
Q,
|
|
664
670
|
{
|
|
665
671
|
componentRef: s().componentRef,
|
|
@@ -672,17 +678,17 @@ function F(e) {
|
|
|
672
678
|
includeBlockProps: s().includeBlockProps,
|
|
673
679
|
isInteractive: s().isInteractive
|
|
674
680
|
}
|
|
675
|
-
) }) : /* @__PURE__ */ l(
|
|
676
|
-
|
|
681
|
+
) }) : /* @__PURE__ */ l(k, { children: n() ? /* @__PURE__ */ l(k, { children: (p = n()) == null ? void 0 : p.map((d, f) => /* @__PURE__ */ l(
|
|
682
|
+
kt,
|
|
677
683
|
{
|
|
678
|
-
repeatContext:
|
|
679
|
-
block:
|
|
684
|
+
repeatContext: d.context,
|
|
685
|
+
block: d.block,
|
|
680
686
|
registeredComponents: e.registeredComponents,
|
|
681
687
|
linkComponent: e.linkComponent
|
|
682
688
|
},
|
|
683
689
|
f
|
|
684
690
|
)) }) : /* @__PURE__ */ R(
|
|
685
|
-
|
|
691
|
+
Ne,
|
|
686
692
|
{
|
|
687
693
|
Wrapper: i(),
|
|
688
694
|
block: o(),
|
|
@@ -703,15 +709,15 @@ function F(e) {
|
|
|
703
709
|
isInteractive: s().isInteractive
|
|
704
710
|
}
|
|
705
711
|
),
|
|
706
|
-
(
|
|
712
|
+
(u = a()) == null ? void 0 : u.map((d) => /* @__PURE__ */ l(
|
|
707
713
|
F,
|
|
708
714
|
{
|
|
709
|
-
block:
|
|
715
|
+
block: d,
|
|
710
716
|
registeredComponents: e.registeredComponents,
|
|
711
717
|
linkComponent: e.linkComponent,
|
|
712
718
|
context: e.context
|
|
713
719
|
},
|
|
714
|
-
|
|
720
|
+
d.id
|
|
715
721
|
))
|
|
716
722
|
]
|
|
717
723
|
}
|
|
@@ -721,7 +727,7 @@ function F(e) {
|
|
|
721
727
|
function z(e) {
|
|
722
728
|
var t, n, o;
|
|
723
729
|
return /* @__PURE__ */ l(
|
|
724
|
-
|
|
730
|
+
$e,
|
|
725
731
|
{
|
|
726
732
|
blocks: e.blocks,
|
|
727
733
|
parent: e.parent,
|
|
@@ -729,7 +735,7 @@ function z(e) {
|
|
|
729
735
|
styleProp: e.styleProp,
|
|
730
736
|
BlocksWrapper: (t = e.context) == null ? void 0 : t.BlocksWrapper,
|
|
731
737
|
BlocksWrapperProps: (n = e.context) == null ? void 0 : n.BlocksWrapperProps,
|
|
732
|
-
children: e.blocks ? /* @__PURE__ */ l(
|
|
738
|
+
children: e.blocks ? /* @__PURE__ */ l(k, { children: (o = e.blocks) == null ? void 0 : o.map((i) => /* @__PURE__ */ l(
|
|
733
739
|
F,
|
|
734
740
|
{
|
|
735
741
|
block: i,
|
|
@@ -760,7 +766,7 @@ function xt(e) {
|
|
|
760
766
|
desktopStyle: y
|
|
761
767
|
}) {
|
|
762
768
|
return o === "never" ? y : m;
|
|
763
|
-
}, c = e.stackColumnsAt === "never" ? "row" : e.reverseColumnsWhenStacked ? "column-reverse" : "column",
|
|
769
|
+
}, c = e.stackColumnsAt === "never" ? "row" : e.reverseColumnsWhenStacked ? "column-reverse" : "column", u = function() {
|
|
764
770
|
return {
|
|
765
771
|
"--flex-dir": c,
|
|
766
772
|
"--flex-dir-tablet": a({
|
|
@@ -769,7 +775,7 @@ function xt(e) {
|
|
|
769
775
|
})
|
|
770
776
|
};
|
|
771
777
|
}, p = function(m) {
|
|
772
|
-
const y = m === 0 ? 0 : t, g = r(m), C = `${y}px`, E = "100%",
|
|
778
|
+
const y = m === 0 ? 0 : t, g = r(m), C = `${y}px`, E = "100%", v = 0;
|
|
773
779
|
return {
|
|
774
780
|
...{
|
|
775
781
|
display: "flex",
|
|
@@ -783,7 +789,7 @@ function xt(e) {
|
|
|
783
789
|
desktopStyle: g
|
|
784
790
|
}),
|
|
785
791
|
"--column-margin-left-mobile": s({
|
|
786
|
-
stackedStyle:
|
|
792
|
+
stackedStyle: v,
|
|
787
793
|
desktopStyle: C
|
|
788
794
|
}),
|
|
789
795
|
"--column-width-tablet": a({
|
|
@@ -791,18 +797,18 @@ function xt(e) {
|
|
|
791
797
|
desktopStyle: g
|
|
792
798
|
}),
|
|
793
799
|
"--column-margin-left-tablet": a({
|
|
794
|
-
stackedStyle:
|
|
800
|
+
stackedStyle: v,
|
|
795
801
|
desktopStyle: C
|
|
796
802
|
})
|
|
797
803
|
};
|
|
798
|
-
},
|
|
804
|
+
}, d = function(m) {
|
|
799
805
|
var g, C;
|
|
800
806
|
return ge(
|
|
801
807
|
((C = (g = e.builderContext.content) == null ? void 0 : g.meta) == null ? void 0 : C.breakpoints) || {}
|
|
802
808
|
)[m].max;
|
|
803
809
|
}, f = function() {
|
|
804
810
|
return `
|
|
805
|
-
@media (max-width: ${
|
|
811
|
+
@media (max-width: ${d("medium")}px) {
|
|
806
812
|
.${e.builderBlock.id}-breakpoints {
|
|
807
813
|
flex-direction: var(--flex-dir-tablet);
|
|
808
814
|
align-items: stretch;
|
|
@@ -814,7 +820,7 @@ function xt(e) {
|
|
|
814
820
|
}
|
|
815
821
|
}
|
|
816
822
|
|
|
817
|
-
@media (max-width: ${
|
|
823
|
+
@media (max-width: ${d("small")}px) {
|
|
818
824
|
.${e.builderBlock.id}-breakpoints {
|
|
819
825
|
flex-direction: var(--flex-dir);
|
|
820
826
|
align-items: stretch;
|
|
@@ -827,14 +833,14 @@ function xt(e) {
|
|
|
827
833
|
},
|
|
828
834
|
`;
|
|
829
835
|
};
|
|
830
|
-
return /* @__PURE__ */ R(
|
|
836
|
+
return /* @__PURE__ */ R(k, { children: [
|
|
831
837
|
/* @__PURE__ */ R(
|
|
832
838
|
"div",
|
|
833
839
|
{
|
|
834
|
-
className: `builder-columns ${e.builderBlock.id}-breakpoints div-
|
|
835
|
-
style:
|
|
840
|
+
className: `builder-columns ${e.builderBlock.id}-breakpoints div-664216e4`,
|
|
841
|
+
style: u(),
|
|
836
842
|
children: [
|
|
837
|
-
/* @__PURE__ */ l(
|
|
843
|
+
/* @__PURE__ */ l($, { id: "builderio-columns", styles: f() }),
|
|
838
844
|
(b = e.columns) == null ? void 0 : b.map((h, m) => /* @__PURE__ */ l(
|
|
839
845
|
Fe,
|
|
840
846
|
{
|
|
@@ -867,7 +873,7 @@ function xt(e) {
|
|
|
867
873
|
]
|
|
868
874
|
}
|
|
869
875
|
),
|
|
870
|
-
/* @__PURE__ */ l("style", { children: `.div-
|
|
876
|
+
/* @__PURE__ */ l("style", { children: `.div-664216e4 {
|
|
871
877
|
display: flex;
|
|
872
878
|
line-height: normal;
|
|
873
879
|
}` })
|
|
@@ -961,7 +967,7 @@ const It = (e) => {
|
|
|
961
967
|
name: q(e),
|
|
962
968
|
value: t,
|
|
963
969
|
canTrack: !0
|
|
964
|
-
}),
|
|
970
|
+
}), ve = (e) => w(e.id) && w(e.variations) && Object.keys(e.variations).length > 0, Wt = ({
|
|
965
971
|
id: e,
|
|
966
972
|
variations: t
|
|
967
973
|
}) => {
|
|
@@ -974,7 +980,7 @@ const It = (e) => {
|
|
|
974
980
|
return r;
|
|
975
981
|
}
|
|
976
982
|
return e;
|
|
977
|
-
},
|
|
983
|
+
}, ke = (e) => {
|
|
978
984
|
const t = Wt(e);
|
|
979
985
|
return Bt({
|
|
980
986
|
contentId: e.id,
|
|
@@ -1004,11 +1010,11 @@ const It = (e) => {
|
|
|
1004
1010
|
return e;
|
|
1005
1011
|
if (!e)
|
|
1006
1012
|
return;
|
|
1007
|
-
if (!
|
|
1013
|
+
if (!ve(e))
|
|
1008
1014
|
return e;
|
|
1009
1015
|
const n = Vt({
|
|
1010
1016
|
contentId: e.id
|
|
1011
|
-
}) ||
|
|
1017
|
+
}) || ke({
|
|
1012
1018
|
variations: e.variations,
|
|
1013
1019
|
id: e.id
|
|
1014
1020
|
}), o = xe({
|
|
@@ -1019,15 +1025,15 @@ const It = (e) => {
|
|
|
1019
1025
|
...e,
|
|
1020
1026
|
...o
|
|
1021
1027
|
};
|
|
1022
|
-
},
|
|
1028
|
+
}, Nt = async ({
|
|
1023
1029
|
item: e,
|
|
1024
1030
|
canTrack: t
|
|
1025
1031
|
}) => {
|
|
1026
|
-
if (!t || !
|
|
1032
|
+
if (!t || !ve(e))
|
|
1027
1033
|
return e;
|
|
1028
1034
|
const o = await At({
|
|
1029
1035
|
contentId: e.id
|
|
1030
|
-
}) ||
|
|
1036
|
+
}) || ke({
|
|
1031
1037
|
variations: e.variations,
|
|
1032
1038
|
id: e.id
|
|
1033
1039
|
}), i = xe({
|
|
@@ -1038,7 +1044,7 @@ const It = (e) => {
|
|
|
1038
1044
|
...e,
|
|
1039
1045
|
...i
|
|
1040
1046
|
};
|
|
1041
|
-
}, U = (e) => w(e) ? e : !0,
|
|
1047
|
+
}, U = (e) => w(e) ? e : !0, $t = {
|
|
1042
1048
|
name: "Core:Button",
|
|
1043
1049
|
image: "https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2F81a15681c3e74df09677dfc57a615b13",
|
|
1044
1050
|
defaultStyles: {
|
|
@@ -1299,15 +1305,15 @@ const It = (e) => {
|
|
|
1299
1305
|
onChange: (e) => {
|
|
1300
1306
|
e.delete("srcset"), e.delete("noWebp");
|
|
1301
1307
|
function n(a, s = 6e4) {
|
|
1302
|
-
return new Promise((c,
|
|
1308
|
+
return new Promise((c, u) => {
|
|
1303
1309
|
const p = document.createElement("img");
|
|
1304
|
-
let
|
|
1310
|
+
let d = !1;
|
|
1305
1311
|
p.onload = () => {
|
|
1306
|
-
|
|
1312
|
+
d = !0, c(p);
|
|
1307
1313
|
}, p.addEventListener("error", (f) => {
|
|
1308
|
-
console.warn("Image load failed", f.error),
|
|
1314
|
+
console.warn("Image load failed", f.error), u(f.error);
|
|
1309
1315
|
}), p.src = a, setTimeout(() => {
|
|
1310
|
-
|
|
1316
|
+
d || u(new Error("Image load timed out"));
|
|
1311
1317
|
}, s);
|
|
1312
1318
|
});
|
|
1313
1319
|
}
|
|
@@ -1675,7 +1681,7 @@ const zt = {
|
|
|
1675
1681
|
...Jt
|
|
1676
1682
|
}], Z = () => [{
|
|
1677
1683
|
component: Me,
|
|
1678
|
-
|
|
1684
|
+
...$t
|
|
1679
1685
|
}, {
|
|
1680
1686
|
component: xt,
|
|
1681
1687
|
...Ft
|
|
@@ -1703,11 +1709,11 @@ const zt = {
|
|
|
1703
1709
|
}), Xt = (e) => {
|
|
1704
1710
|
const t = e.toString().trim();
|
|
1705
1711
|
return `return (${!t.startsWith("function") && !t.startsWith("(") ? "function " : ""}${t}).apply(this, arguments)`;
|
|
1706
|
-
}, Zt = (e) => typeof e == "function" ? Xt(e) :
|
|
1712
|
+
}, Zt = (e) => typeof e == "function" ? Xt(e) : N(e), D = ({
|
|
1707
1713
|
inputs: e,
|
|
1708
1714
|
...t
|
|
1709
1715
|
}) => ({
|
|
1710
|
-
|
|
1716
|
+
...N(t),
|
|
1711
1717
|
inputs: e == null ? void 0 : e.map((n) => Object.entries(n).reduce((o, [i, r]) => ({
|
|
1712
1718
|
...o,
|
|
1713
1719
|
[i]: Zt(r)
|
|
@@ -1826,7 +1832,7 @@ function _(e) {
|
|
|
1826
1832
|
"script",
|
|
1827
1833
|
{
|
|
1828
1834
|
dangerouslySetInnerHTML: { __html: e.scriptStr },
|
|
1829
|
-
id: e.id
|
|
1835
|
+
"data-id": e.id
|
|
1830
1836
|
}
|
|
1831
1837
|
);
|
|
1832
1838
|
}
|
|
@@ -1894,9 +1900,9 @@ const hn = "v3", ee = "builder.", pn = "options.", Te = (e) => {
|
|
|
1894
1900
|
enrich: a,
|
|
1895
1901
|
locale: s,
|
|
1896
1902
|
apiVersion: c = hn,
|
|
1897
|
-
fields:
|
|
1903
|
+
fields: u,
|
|
1898
1904
|
omit: p,
|
|
1899
|
-
offset:
|
|
1905
|
+
offset: d,
|
|
1900
1906
|
cacheSeconds: f,
|
|
1901
1907
|
staleCacheSeconds: b,
|
|
1902
1908
|
sort: h,
|
|
@@ -1907,30 +1913,30 @@ const hn = "v3", ee = "builder.", pn = "options.", Te = (e) => {
|
|
|
1907
1913
|
if (!["v3"].includes(c))
|
|
1908
1914
|
throw new Error(`Invalid apiVersion: expected 'v3', received '${c}'`);
|
|
1909
1915
|
const y = t !== 1, g = new URL(`https://cdn.builder.io/api/${c}/content/${i}`);
|
|
1910
|
-
if (g.searchParams.set("apiKey", r), g.searchParams.set("limit", String(t)), g.searchParams.set("noTraverse", String(y)), g.searchParams.set("includeRefs", String(!0)), s && g.searchParams.set("locale", s), a && g.searchParams.set("enrich", String(a)), g.searchParams.set("omit", p || "meta.componentsUsed"),
|
|
1911
|
-
const
|
|
1916
|
+
if (g.searchParams.set("apiKey", r), g.searchParams.set("limit", String(t)), g.searchParams.set("noTraverse", String(y)), g.searchParams.set("includeRefs", String(!0)), s && g.searchParams.set("locale", s), a && g.searchParams.set("enrich", String(a)), g.searchParams.set("omit", p || "meta.componentsUsed"), u && g.searchParams.set("fields", u), Number.isFinite(d) && d > -1 && g.searchParams.set("offset", String(Math.floor(d))), typeof m == "boolean" && g.searchParams.set("includeUnpublished", String(m)), f && te(f) && g.searchParams.set("cacheSeconds", String(f)), b && te(b) && g.searchParams.set("staleCacheSeconds", String(b)), h) {
|
|
1917
|
+
const v = W({
|
|
1912
1918
|
sort: h
|
|
1913
1919
|
});
|
|
1914
|
-
for (const I in
|
|
1915
|
-
g.searchParams.set(I, JSON.stringify(
|
|
1920
|
+
for (const I in v)
|
|
1921
|
+
g.searchParams.set(I, JSON.stringify(v[I]));
|
|
1916
1922
|
}
|
|
1917
1923
|
const C = {
|
|
1918
1924
|
...gn(),
|
|
1919
1925
|
...le(e.options || {})
|
|
1920
1926
|
}, E = W(C);
|
|
1921
|
-
for (const
|
|
1922
|
-
g.searchParams.set(
|
|
1927
|
+
for (const v in E)
|
|
1928
|
+
g.searchParams.set(v, String(E[v]));
|
|
1923
1929
|
if (n && g.searchParams.set("userAttributes", JSON.stringify(n)), o) {
|
|
1924
|
-
const
|
|
1930
|
+
const v = W({
|
|
1925
1931
|
query: o
|
|
1926
1932
|
});
|
|
1927
|
-
for (const I in
|
|
1928
|
-
g.searchParams.set(I, JSON.stringify(
|
|
1933
|
+
for (const I in v)
|
|
1934
|
+
g.searchParams.set(I, JSON.stringify(v[I]));
|
|
1929
1935
|
}
|
|
1930
1936
|
return g;
|
|
1931
1937
|
}, bn = (e) => "results" in e;
|
|
1932
1938
|
async function Ee(e) {
|
|
1933
|
-
const t = await
|
|
1939
|
+
const t = await vn({
|
|
1934
1940
|
...e,
|
|
1935
1941
|
limit: 1
|
|
1936
1942
|
});
|
|
@@ -1954,7 +1960,7 @@ const yn = async (e) => {
|
|
|
1954
1960
|
try {
|
|
1955
1961
|
const r = [];
|
|
1956
1962
|
for (const a of t.results)
|
|
1957
|
-
r.push(await
|
|
1963
|
+
r.push(await Nt({
|
|
1958
1964
|
item: a,
|
|
1959
1965
|
canTrack: o
|
|
1960
1966
|
}));
|
|
@@ -1964,7 +1970,7 @@ const yn = async (e) => {
|
|
|
1964
1970
|
}
|
|
1965
1971
|
return t.results;
|
|
1966
1972
|
};
|
|
1967
|
-
async function
|
|
1973
|
+
async function vn(e) {
|
|
1968
1974
|
try {
|
|
1969
1975
|
const t = Y(e), n = await yn(e);
|
|
1970
1976
|
return bn(n) ? Sn(e, n) : (x.error("Error fetching data. ", {
|
|
@@ -1982,14 +1988,14 @@ function fo(e) {
|
|
|
1982
1988
|
const t = de(e || window.location.search);
|
|
1983
1989
|
return j(t) ? !1 : t.indexOf("builder.preview=") !== -1;
|
|
1984
1990
|
}
|
|
1985
|
-
function
|
|
1991
|
+
function kn() {
|
|
1986
1992
|
return "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, function(e) {
|
|
1987
1993
|
const t = Math.random() * 16 | 0;
|
|
1988
1994
|
return (e == "x" ? t : t & 3 | 8).toString(16);
|
|
1989
1995
|
});
|
|
1990
1996
|
}
|
|
1991
1997
|
function Re() {
|
|
1992
|
-
return
|
|
1998
|
+
return kn().replace(/-/g, "");
|
|
1993
1999
|
}
|
|
1994
2000
|
const Pe = "builderSessionId", xn = async ({
|
|
1995
2001
|
canTrack: e
|
|
@@ -2166,12 +2172,12 @@ const Wn = (e, t, n = !0) => {
|
|
|
2166
2172
|
builderElementIndex: n && o ? [].slice.call(document.getElementsByClassName(o)).indexOf(n) : void 0
|
|
2167
2173
|
}
|
|
2168
2174
|
};
|
|
2169
|
-
},
|
|
2175
|
+
}, Nn = ["*.beta.builder.io", "beta.builder.io", "builder.io", "localhost", "qa.builder.io"];
|
|
2170
2176
|
function Be(e, t) {
|
|
2171
2177
|
const n = new URL(t.origin), o = n.hostname;
|
|
2172
|
-
return (e ||
|
|
2178
|
+
return (e || Nn).findIndex((i) => i.startsWith("*.") ? o.endsWith(i.slice(1)) : i === o) > -1;
|
|
2173
2179
|
}
|
|
2174
|
-
const
|
|
2180
|
+
const $n = "0.14.12", ie = {};
|
|
2175
2181
|
function Fn(e, t) {
|
|
2176
2182
|
let n = ie[e];
|
|
2177
2183
|
if (n || (n = ie[e] = []), n.push(t), S()) {
|
|
@@ -2219,7 +2225,7 @@ const Ln = (e = {}) => {
|
|
|
2219
2225
|
type: "builder.sdkInfo",
|
|
2220
2226
|
data: {
|
|
2221
2227
|
target: T,
|
|
2222
|
-
version:
|
|
2228
|
+
version: $n,
|
|
2223
2229
|
supportsPatchUpdates: !1,
|
|
2224
2230
|
// Supports builder-model="..." attribute which is needed to
|
|
2225
2231
|
// scope our '+ add block' button styling
|
|
@@ -2241,33 +2247,33 @@ const Ln = (e = {}) => {
|
|
|
2241
2247
|
if (i != null && i.type)
|
|
2242
2248
|
switch (i.type) {
|
|
2243
2249
|
case "builder.evaluate": {
|
|
2244
|
-
const s = i.data.text, c = i.data.arguments || [],
|
|
2245
|
-
let
|
|
2250
|
+
const s = i.data.text, c = i.data.arguments || [], u = i.data.id, p = new Function(s);
|
|
2251
|
+
let d, f = null;
|
|
2246
2252
|
try {
|
|
2247
|
-
|
|
2253
|
+
d = p.apply(null, c);
|
|
2248
2254
|
} catch (b) {
|
|
2249
2255
|
f = b;
|
|
2250
2256
|
}
|
|
2251
2257
|
f ? (r = window.parent) == null || r.postMessage({
|
|
2252
2258
|
type: "builder.evaluateError",
|
|
2253
2259
|
data: {
|
|
2254
|
-
id:
|
|
2260
|
+
id: u,
|
|
2255
2261
|
error: f.message
|
|
2256
2262
|
}
|
|
2257
|
-
}, "*") :
|
|
2263
|
+
}, "*") : d && typeof d.then == "function" ? d.then((b) => {
|
|
2258
2264
|
var h;
|
|
2259
2265
|
(h = window.parent) == null || h.postMessage({
|
|
2260
2266
|
type: "builder.evaluateResult",
|
|
2261
2267
|
data: {
|
|
2262
|
-
id:
|
|
2268
|
+
id: u,
|
|
2263
2269
|
result: b
|
|
2264
2270
|
}
|
|
2265
2271
|
}, "*");
|
|
2266
2272
|
}).catch(console.error) : (a = window.parent) == null || a.postMessage({
|
|
2267
2273
|
type: "builder.evaluateResult",
|
|
2268
2274
|
data: {
|
|
2269
|
-
result:
|
|
2270
|
-
id:
|
|
2275
|
+
result: d,
|
|
2276
|
+
id: u
|
|
2271
2277
|
}
|
|
2272
2278
|
}, "*");
|
|
2273
2279
|
break;
|
|
@@ -2424,7 +2430,7 @@ ${Kn({
|
|
|
2424
2430
|
})}
|
|
2425
2431
|
${Yn(e.isNestedRender)}
|
|
2426
2432
|
`.trim();
|
|
2427
|
-
return /* @__PURE__ */ l(
|
|
2433
|
+
return /* @__PURE__ */ l($, { id: "builderio-content", styles: t });
|
|
2428
2434
|
}
|
|
2429
2435
|
const Jn = ({
|
|
2430
2436
|
content: e,
|
|
@@ -2455,7 +2461,7 @@ const Jn = ({
|
|
|
2455
2461
|
meta: e == null ? void 0 : e.meta
|
|
2456
2462
|
} : void 0;
|
|
2457
2463
|
function se(e) {
|
|
2458
|
-
var i, r, a, s, c,
|
|
2464
|
+
var i, r, a, s, c, u, p, d, f;
|
|
2459
2465
|
const t = sn({
|
|
2460
2466
|
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion, @typescript-eslint/no-non-null-asserted-optional-chain
|
|
2461
2467
|
variationId: (i = e.content) == null ? void 0 : i.testVariationId,
|
|
@@ -2520,20 +2526,26 @@ function se(e) {
|
|
|
2520
2526
|
linkComponent: e.linkComponent,
|
|
2521
2527
|
trustedHosts: e.trustedHosts,
|
|
2522
2528
|
children: [
|
|
2523
|
-
e.isSsrAbTest ? /* @__PURE__ */ l(
|
|
2529
|
+
e.isSsrAbTest ? /* @__PURE__ */ l(
|
|
2530
|
+
_,
|
|
2531
|
+
{
|
|
2532
|
+
id: "builderio-variant-visibility",
|
|
2533
|
+
scriptStr: t
|
|
2534
|
+
}
|
|
2535
|
+
) : null,
|
|
2524
2536
|
/* @__PURE__ */ l(
|
|
2525
2537
|
Gn,
|
|
2526
2538
|
{
|
|
2527
2539
|
isNestedRender: e.isNestedRender,
|
|
2528
2540
|
contentId: (a = o.content) == null ? void 0 : a.id,
|
|
2529
2541
|
cssCode: (c = (s = o.content) == null ? void 0 : s.data) == null ? void 0 : c.cssCode,
|
|
2530
|
-
customFonts: (p = (
|
|
2542
|
+
customFonts: (p = (u = o.content) == null ? void 0 : u.data) == null ? void 0 : p.customFonts
|
|
2531
2543
|
}
|
|
2532
2544
|
),
|
|
2533
2545
|
/* @__PURE__ */ l(
|
|
2534
2546
|
z,
|
|
2535
2547
|
{
|
|
2536
|
-
blocks: (f = (
|
|
2548
|
+
blocks: (f = (d = o.content) == null ? void 0 : d.data) == null ? void 0 : f.blocks,
|
|
2537
2549
|
context: o,
|
|
2538
2550
|
registeredComponents: n,
|
|
2539
2551
|
linkComponent: e.linkComponent
|
|
@@ -2544,47 +2556,59 @@ function se(e) {
|
|
|
2544
2556
|
);
|
|
2545
2557
|
}
|
|
2546
2558
|
function Xn(e) {
|
|
2547
|
-
var r
|
|
2559
|
+
var r;
|
|
2548
2560
|
const t = nn({
|
|
2549
2561
|
canTrack: U(e.canTrack),
|
|
2550
2562
|
content: e.content
|
|
2551
2563
|
}), n = function() {
|
|
2552
|
-
var
|
|
2564
|
+
var s;
|
|
2553
2565
|
return an(
|
|
2554
|
-
B(e.content).map((
|
|
2555
|
-
id:
|
|
2556
|
-
testRatio:
|
|
2566
|
+
B(e.content).map((c) => ({
|
|
2567
|
+
id: c.testVariationId,
|
|
2568
|
+
testRatio: c.testRatio
|
|
2557
2569
|
})),
|
|
2558
|
-
((
|
|
2570
|
+
((s = e.content) == null ? void 0 : s.id) || ""
|
|
2559
2571
|
);
|
|
2560
2572
|
}, o = function() {
|
|
2561
|
-
return B(e.content).map((
|
|
2573
|
+
return B(e.content).map((s) => `.variant-${s.testVariationId} { display: none; } `).join("");
|
|
2562
2574
|
}, i = function() {
|
|
2563
|
-
var
|
|
2575
|
+
var s;
|
|
2564
2576
|
return t ? {
|
|
2565
2577
|
...e.content,
|
|
2566
|
-
testVariationId: (
|
|
2578
|
+
testVariationId: (s = e.content) == null ? void 0 : s.id
|
|
2567
2579
|
} : Ot({
|
|
2568
2580
|
item: e.content,
|
|
2569
2581
|
canTrack: U(e.canTrack)
|
|
2570
2582
|
});
|
|
2571
2583
|
};
|
|
2572
|
-
return /* @__PURE__ */ R(
|
|
2573
|
-
!e.isNestedRender && T !== "reactNative" ? /* @__PURE__ */ l(
|
|
2574
|
-
|
|
2584
|
+
return /* @__PURE__ */ R(k, { children: [
|
|
2585
|
+
!e.isNestedRender && T !== "reactNative" ? /* @__PURE__ */ l(
|
|
2586
|
+
_,
|
|
2587
|
+
{
|
|
2588
|
+
id: "builderio-init-variants-fns",
|
|
2589
|
+
scriptStr: rn()
|
|
2590
|
+
}
|
|
2591
|
+
) : null,
|
|
2592
|
+
t ? /* @__PURE__ */ R(k, { children: [
|
|
2575
2593
|
/* @__PURE__ */ l(
|
|
2576
|
-
|
|
2594
|
+
$,
|
|
2577
2595
|
{
|
|
2578
|
-
id:
|
|
2596
|
+
id: "builderio-variants",
|
|
2579
2597
|
styles: o()
|
|
2580
2598
|
}
|
|
2581
2599
|
),
|
|
2582
|
-
/* @__PURE__ */ l(
|
|
2583
|
-
|
|
2600
|
+
/* @__PURE__ */ l(
|
|
2601
|
+
_,
|
|
2602
|
+
{
|
|
2603
|
+
id: "builderio-variants-visibility",
|
|
2604
|
+
scriptStr: n()
|
|
2605
|
+
}
|
|
2606
|
+
),
|
|
2607
|
+
(r = B(e.content)) == null ? void 0 : r.map((a) => /* @__PURE__ */ l(
|
|
2584
2608
|
se,
|
|
2585
2609
|
{
|
|
2586
2610
|
isNestedRender: e.isNestedRender,
|
|
2587
|
-
content:
|
|
2611
|
+
content: a,
|
|
2588
2612
|
showContent: !1,
|
|
2589
2613
|
model: e.model,
|
|
2590
2614
|
data: e.data,
|
|
@@ -2603,7 +2627,7 @@ function Xn(e) {
|
|
|
2603
2627
|
contentWrapperProps: e.contentWrapperProps,
|
|
2604
2628
|
trustedHosts: e.trustedHosts
|
|
2605
2629
|
},
|
|
2606
|
-
|
|
2630
|
+
a.testVariationId
|
|
2607
2631
|
))
|
|
2608
2632
|
] }) : null,
|
|
2609
2633
|
/* @__PURE__ */ l(
|
|
@@ -2654,11 +2678,11 @@ const Zn = async ({
|
|
|
2654
2678
|
async function eo(e) {
|
|
2655
2679
|
var o, i, r, a, s;
|
|
2656
2680
|
const t = function() {
|
|
2657
|
-
var
|
|
2681
|
+
var u, p;
|
|
2658
2682
|
return [
|
|
2659
2683
|
e.attributes[M()],
|
|
2660
2684
|
"builder-symbol",
|
|
2661
|
-
(
|
|
2685
|
+
(u = e.symbol) != null && u.inline ? "builder-inline-symbol" : void 0,
|
|
2662
2686
|
(p = e.symbol) != null && p.dynamic || e.dynamic ? "builder-dynamic-symbol" : void 0
|
|
2663
2687
|
].filter(Boolean).join(" ");
|
|
2664
2688
|
}, n = ((o = e.symbol) == null ? void 0 : o.content) || await Zn({
|
|
@@ -2700,7 +2724,7 @@ function So(e) {
|
|
|
2700
2724
|
parent.postMessage(t, "*");
|
|
2701
2725
|
}
|
|
2702
2726
|
}
|
|
2703
|
-
const
|
|
2727
|
+
const vo = async (e) => {
|
|
2704
2728
|
var o, i, r;
|
|
2705
2729
|
const t = e.path || ((o = e.url) == null ? void 0 : o.pathname) || ((i = e.userAttributes) == null ? void 0 : i.urlPath), n = {
|
|
2706
2730
|
...e,
|
|
@@ -2725,9 +2749,9 @@ export {
|
|
|
2725
2749
|
z as B,
|
|
2726
2750
|
xt as C,
|
|
2727
2751
|
bo as D,
|
|
2728
|
-
|
|
2752
|
+
vo as E,
|
|
2729
2753
|
Sn as F,
|
|
2730
|
-
|
|
2754
|
+
vn as G,
|
|
2731
2755
|
eo as S,
|
|
2732
2756
|
Kt as T,
|
|
2733
2757
|
Bn as _,
|
|
@@ -2745,13 +2769,13 @@ export {
|
|
|
2745
2769
|
x as l,
|
|
2746
2770
|
K as m,
|
|
2747
2771
|
po as n,
|
|
2748
|
-
|
|
2749
|
-
|
|
2750
|
-
|
|
2772
|
+
fn as o,
|
|
2773
|
+
N as p,
|
|
2774
|
+
mo as q,
|
|
2751
2775
|
go as r,
|
|
2752
2776
|
Ln as s,
|
|
2753
2777
|
yo as t,
|
|
2754
|
-
|
|
2778
|
+
Ee as u,
|
|
2755
2779
|
ln as v,
|
|
2756
2780
|
Xn as w,
|
|
2757
2781
|
Fn as x,
|