@builder.io/sdk-react 2.0.31 → 3.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (79) hide show
  1. package/lib/browser/blocks-exports.cjs +31 -31
  2. package/lib/browser/blocks-exports.mjs +743 -696
  3. package/lib/browser/index.cjs +1 -1
  4. package/lib/browser/index.mjs +1 -1
  5. package/lib/browser/{server-entry-77f4513c.js → server-entry-017b8439.js} +24 -26
  6. package/lib/browser/server-entry-9f80066e.cjs +2 -0
  7. package/lib/browser/server-entry.cjs +1 -1
  8. package/lib/browser/server-entry.mjs +1 -1
  9. package/lib/edge/{accordion-d1213549.js → accordion-1572cb0d.js} +1 -1
  10. package/lib/edge/{accordion-696fad97.cjs → accordion-decb24cf.cjs} +1 -1
  11. package/lib/edge/{blocks-9ef79098.js → blocks-9c35be74.js} +314 -268
  12. package/lib/edge/blocks-d3823063.cjs +12 -0
  13. package/lib/edge/blocks-exports.cjs +1 -1
  14. package/lib/edge/blocks-exports.mjs +8 -7
  15. package/lib/edge/{button-b41f1129.js → button-0709893d.js} +2 -2
  16. package/lib/edge/{button-2ed05d22.cjs → button-cf66cf8d.cjs} +1 -1
  17. package/lib/edge/{columns-ca9ac444.cjs → columns-2fdf0656.cjs} +1 -1
  18. package/lib/edge/{columns-5f8497fb.js → columns-e234acc6.js} +4 -4
  19. package/lib/edge/{content-variants-9c4db669.js → content-variants-3ab9230f.js} +323 -323
  20. package/lib/edge/content-variants-616a6c0f.cjs +134 -0
  21. package/lib/edge/{evaluate-8453ffc0.cjs → evaluate-ccf1ad96.cjs} +1 -1
  22. package/lib/edge/{evaluate-f626f584.js → evaluate-f0b82ede.js} +1 -1
  23. package/lib/edge/{form-a5407307.js → form-27bcc23a.js} +4 -4
  24. package/lib/edge/{form-b0c5418b.cjs → form-7c61693d.cjs} +1 -1
  25. package/lib/edge/{get-class-prop-name-86f0330a.cjs → get-class-prop-name-0b3d48a4.cjs} +1 -1
  26. package/lib/edge/{get-class-prop-name-40d6defb.js → get-class-prop-name-a3bd113c.js} +1 -1
  27. package/lib/edge/{image-6970c193.js → image-5c9e156f.js} +28 -28
  28. package/lib/edge/image-94922c87.cjs +17 -0
  29. package/lib/edge/{img-fa36f926.js → img-80be6914.js} +1 -1
  30. package/lib/edge/{img-83ed868e.cjs → img-e0c8f7f9.cjs} +1 -1
  31. package/lib/edge/index.cjs +1 -1
  32. package/lib/edge/index.mjs +1 -1
  33. package/lib/edge/{input-93e42e28.js → input-920922d5.js} +1 -1
  34. package/lib/edge/{input-3106b577.cjs → input-f5ba6b1e.cjs} +1 -1
  35. package/lib/edge/{select-29495824.cjs → select-2ced1aca.cjs} +1 -1
  36. package/lib/edge/{select-4cf4356a.js → select-673864b7.js} +1 -1
  37. package/lib/edge/{server-entry-ea35faa6.js → server-entry-6c0047ea.js} +24 -26
  38. package/lib/edge/server-entry-de142ee8.cjs +2 -0
  39. package/lib/edge/server-entry.cjs +1 -1
  40. package/lib/edge/server-entry.mjs +1 -1
  41. package/lib/edge/{slot-6ad4152e.js → slot-68f2b177.js} +4 -4
  42. package/lib/edge/{slot-c8ab71b6.cjs → slot-cc8b4e5b.cjs} +1 -1
  43. package/lib/edge/{symbol-d2b48e54.js → symbol-7e260a70.js} +2 -2
  44. package/lib/edge/{symbol-74313a4b.cjs → symbol-ded9dba9.cjs} +1 -1
  45. package/lib/edge/{tabs-6d924c90.js → tabs-5156494d.js} +4 -4
  46. package/lib/edge/{tabs-f699b318.cjs → tabs-d422921f.cjs} +1 -1
  47. package/lib/edge/{text-7137a306.js → text-27a917c0.js} +2 -2
  48. package/lib/edge/{text-7120ee0c.cjs → text-5796f488.cjs} +1 -1
  49. package/lib/node/blocks-exports.cjs +30 -30
  50. package/lib/node/blocks-exports.mjs +710 -663
  51. package/lib/node/index.cjs +1 -1
  52. package/lib/node/index.mjs +3 -3
  53. package/lib/node/init.cjs +1 -1
  54. package/lib/node/init.mjs +3 -3
  55. package/lib/node/server-entry-e91e06a3.cjs +2 -0
  56. package/lib/node/{server-entry-32ef60c0.js → server-entry-fdedc1aa.js} +24 -26
  57. package/lib/node/server-entry.cjs +1 -1
  58. package/lib/node/server-entry.mjs +1 -1
  59. package/lib/node/{setIvm-26e65816.js → setIvm-8b303d4e.js} +1 -1
  60. package/lib/node/{setIvm-bf1ad328.cjs → setIvm-aba1bed8.cjs} +1 -1
  61. package/lib/node/setIvm.cjs +1 -1
  62. package/lib/node/setIvm.mjs +2 -2
  63. package/lib/node/{should-force-browser-runtime-in-node-343fd6c7.js → should-force-browser-runtime-in-node-0a037bde.js} +1 -1
  64. package/lib/node/{should-force-browser-runtime-in-node-000957e3.cjs → should-force-browser-runtime-in-node-491a9b55.cjs} +1 -1
  65. package/package.json +1 -1
  66. package/types/components/block/block.helpers.d.ts +6 -3
  67. package/types/components/content/components/enable-editor.helpers.d.ts +11 -0
  68. package/types/constants/file-types.d.ts +2 -0
  69. package/types/constants/sdk-version.d.ts +1 -1
  70. package/types/context/types.d.ts +1 -0
  71. package/types/functions/extract-localized-values.d.ts +2 -0
  72. package/types/functions/traverse.d.ts +34 -0
  73. package/types/types/components.d.ts +3 -0
  74. package/lib/browser/server-entry-d7a13b14.cjs +0 -2
  75. package/lib/edge/blocks-aa67fee8.cjs +0 -12
  76. package/lib/edge/content-variants-2f5a6ccd.cjs +0 -134
  77. package/lib/edge/image-54d2f755.cjs +0 -17
  78. package/lib/edge/server-entry-4cd5389e.cjs +0 -2
  79. package/lib/node/server-entry-9c026e49.cjs +0 -2
@@ -1,12 +1,12 @@
1
- import { jsx as b, jsxs as $, Fragment as M } from "react/jsx-runtime";
2
- import { lazy as v, useRef as q, useState as T, useEffect as w } from "react";
3
- import { isBrowser as j, TARGET as G, isEditing as A, registerInsertMenu as ie, setupBrowserForEditing as oe, createRegisterComponentMessage as re, getDefaultCanTrack as H, _track as O, isPreviewing as le, fetchOneEntry as se, createEditorListener as de, logFetch as ue, serializeIncludingFunctions as _, logger as ce, handleABTestingSync as me } from "./server-entry-ea35faa6.js";
4
- import { Video as pe, Button as ge, Columns as fe, Fragment as he, Image as be, Section as ye, Symbol as xe, Text as ve, BuilderContext as Se } from "./blocks-exports.mjs";
5
- import { triggerAnimation as Te, fastClone as ke, InlinedStyles as X, ComponentsContext as Ie, Blocks as Ce } from "./blocks-9ef79098.js";
6
- import { evaluate as Z } from "./evaluate-f626f584.js";
7
- import "./get-class-prop-name-40d6defb.js";
1
+ import { jsx as h, jsxs as q, Fragment as O } from "react/jsx-runtime";
2
+ import { lazy as v, useRef as $, useState as I, useEffect as V } from "react";
3
+ import { isBrowser as j, TARGET as _, isEditing as F, isPreviewing as ee, registerInsertMenu as le, setupBrowserForEditing as se, createRegisterComponentMessage as de, getDefaultCanTrack as D, _track as z, fetchOneEntry as ce, createEditorListener as ue, logFetch as me, serializeIncludingFunctions as J, logger as pe, handleABTestingSync as fe } from "./server-entry-6c0047ea.js";
4
+ import { Video as ge, Button as he, Columns as be, Fragment as ye, Image as xe, Section as ve, Symbol as Se, Text as Te, BuilderContext as Ie } from "./blocks-exports.mjs";
5
+ import { triggerAnimation as ke, fastClone as Ce, InlinedStyles as te, ComponentsContext as we, Blocks as Ve } from "./blocks-9c35be74.js";
6
+ import { evaluate as ne } from "./evaluate-f0b82ede.js";
7
+ import "./get-class-prop-name-a3bd113c.js";
8
8
  import "./dynamic-renderer-8b343325.js";
9
- const D = {
9
+ const H = {
10
10
  "@type": "@builder.io/sdk:Element",
11
11
  layerName: "Accordion item title",
12
12
  responsiveStyles: {
@@ -35,7 +35,7 @@ const D = {
35
35
  }
36
36
  }
37
37
  }]
38
- }, U = {
38
+ }, L = {
39
39
  "@type": "@builder.io/sdk:Element",
40
40
  layerName: "Accordion item detail",
41
41
  responsiveStyles: {
@@ -66,7 +66,7 @@ const D = {
66
66
  }
67
67
  }
68
68
  }]
69
- }, we = {
69
+ }, Re = {
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 D = {
83
83
  name: "title",
84
84
  type: "uiBlocks",
85
85
  hideFromUI: !0,
86
- defaultValue: [D]
86
+ defaultValue: [H]
87
87
  }, {
88
88
  name: "detail",
89
89
  type: "uiBlocks",
90
90
  hideFromUI: !0,
91
- defaultValue: [U]
91
+ defaultValue: [L]
92
92
  }],
93
93
  defaultValue: [{
94
- title: [D],
95
- detail: [U]
94
+ title: [H],
95
+ detail: [L]
96
96
  }, {
97
- title: [D],
98
- detail: [U]
97
+ title: [H],
98
+ detail: [L]
99
99
  }],
100
100
  showIf: (e) => !e.get("useChildrenForItems")
101
101
  }, {
@@ -130,7 +130,7 @@ const D = {
130
130
  builderComponents: !0,
131
131
  builderLinkComponent: !0
132
132
  }
133
- }, Ve = v(() => import("./accordion-d1213549.js")), Re = {
133
+ }, Ee = v(() => import("./accordion-1572cb0d.js")), Fe = {
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 D = {
166
166
  shouldReceiveBuilderProps: {
167
167
  builderLinkComponent: !0
168
168
  }
169
- }, Ee = {
169
+ }, Pe = {
170
170
  // TODO: ways to statically preprocess JSON for references, functions, etc
171
171
  name: "Columns",
172
172
  isRSC: !0,
@@ -345,7 +345,7 @@ const D = {
345
345
  });
346
346
  }
347
347
  const n = e.get("columns");
348
- Array.isArray(n) && n.find((d) => d.get("width")) && (n.find((m) => !m.get("width")) || n.reduce((o, p) => o + p.get("width"), 0) !== 100) && t();
348
+ Array.isArray(n) && n.find((s) => s.get("width")) && (n.find((u) => !u.get("width")) || n.reduce((o, m) => o + m.get("width"), 0) !== 100) && t();
349
349
  }
350
350
  }, {
351
351
  name: "space",
@@ -373,13 +373,13 @@ const D = {
373
373
  builderComponents: !0,
374
374
  builderLinkComponent: !0
375
375
  }
376
- }, Fe = {
376
+ }, Ae = {
377
377
  name: "Fragment",
378
378
  static: !0,
379
379
  hidden: !0,
380
380
  canHaveChildren: !0,
381
381
  noWrap: !0
382
- }, Pe = {
382
+ }, M = ["jpeg", "jpg", "png", "svg", "webp", "gif", "jfif", "pjpeg", "pjp", "apng", "avif", "tif", "tiff", "heif", "bmp", "eps", "raw", "cr2", "nef", "orf", "sr2", "psd", "heic", "dib", "ai"], We = ["mp4", "webm", "mkv", "flv", "vob", "ogv", "ogg", "drc", "gif", "gifv", "mng", "avi", "mov", "qt", "mts", "m2ts", "ts", "wmv", "yuv", "rm", "rmvb", "viv", "asf", "amv", "m4p", "mpeg", "mpe", "m2v", "m4v", "svi", "3gp", "3g2", "mxf", "roq", "nsv", "f4v", "f4p", "f4a", "f4b"], Be = {
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",
@@ -394,34 +394,34 @@ const D = {
394
394
  name: "image",
395
395
  type: "file",
396
396
  bubble: !0,
397
- allowedFileTypes: ["jpeg", "jpg", "png", "svg", "webp"],
397
+ allowedFileTypes: M,
398
398
  required: !0,
399
399
  defaultValue: "https://cdn.builder.io/api/v1/image/assets%2FYJIGb4i01jvw0SRdL5Bt%2F72c80f114dc149019051b6852a9e3b7a",
400
400
  onChange: (e) => {
401
401
  e.delete("srcset"), e.delete("noWebp");
402
402
  function n(a, o = 6e4) {
403
- return new Promise((p, S) => {
403
+ return new Promise((m, S) => {
404
404
  const y = document.createElement("img");
405
- let V = !1;
405
+ let R = !1;
406
406
  y.onload = () => {
407
- V = !0, p(y);
407
+ R = !0, m(y);
408
408
  }, y.addEventListener("error", (k) => {
409
409
  console.warn("Image load failed", k.error), S(k.error);
410
410
  }), y.src = a, setTimeout(() => {
411
- V || S(new Error("Image load timed out"));
411
+ R || S(new Error("Image load timed out"));
412
412
  }, o);
413
413
  });
414
414
  }
415
415
  function i(a) {
416
416
  return Math.round(a * 1e3) / 1e3;
417
417
  }
418
- const d = e.get("image"), m = e.get("aspectRatio");
419
- if (fetch(d).then((a) => a.blob()).then((a) => {
418
+ const s = e.get("image"), u = e.get("aspectRatio");
419
+ if (fetch(s).then((a) => a.blob()).then((a) => {
420
420
  a.type.includes("svg") && e.set("noWebp", !0);
421
- }), d && (!m || m === 0.7041))
422
- return n(d).then((a) => {
421
+ }), s && (!u || u === 0.7041))
422
+ return n(s).then((a) => {
423
423
  const o = e.get("aspectRatio");
424
- e.get("image") === d && (!o || o === 0.7041) && a.width && a.height && (e.set("aspectRatio", i(a.height / a.width)), e.set("height", a.height), e.set("width", a.width));
424
+ e.get("image") === s && (!o || o === 0.7041) && a.width && a.height && (e.set("aspectRatio", i(a.height / a.width)), e.set("height", a.height), e.set("width", a.width));
425
425
  });
426
426
  }
427
427
  }, {
@@ -487,7 +487,7 @@ const D = {
487
487
  shouldReceiveBuilderProps: {
488
488
  builderBlock: !0
489
489
  }
490
- }, We = {
490
+ }, De = {
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 D = {
526
526
  }
527
527
  }
528
528
  }]
529
- }, Ae = {
529
+ }, He = {
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 D = {
543
543
  builderContext: !0,
544
544
  builderComponents: !0
545
545
  }
546
- }, Be = v(() => import("./slot-6ad4152e.js")), He = {
546
+ }, Le = v(() => import("./slot-68f2b177.js")), Ue = {
547
547
  name: "Symbol",
548
548
  noWrap: !0,
549
549
  static: !0,
@@ -582,7 +582,7 @@ const D = {
582
582
  builderComponents: !0,
583
583
  builderLinkComponent: !0
584
584
  }
585
- }, L = {
585
+ }, U = {
586
586
  "@type": "@builder.io/sdk:Element",
587
587
  responsiveStyles: {
588
588
  large: {
@@ -620,7 +620,7 @@ const D = {
620
620
  text: "New tab content "
621
621
  }
622
622
  }
623
- }, De = {
623
+ }, Ne = {
624
624
  name: "Builder: Tabs",
625
625
  inputs: [{
626
626
  name: "tabs",
@@ -630,7 +630,7 @@ const D = {
630
630
  name: "label",
631
631
  type: "uiBlocks",
632
632
  hideFromUI: !0,
633
- defaultValue: [L]
633
+ defaultValue: [U]
634
634
  }, {
635
635
  name: "content",
636
636
  type: "uiBlocks",
@@ -639,7 +639,7 @@ const D = {
639
639
  }],
640
640
  defaultValue: [{
641
641
  label: [{
642
- ...L,
642
+ ...U,
643
643
  component: {
644
644
  name: "Text",
645
645
  options: {
@@ -658,7 +658,7 @@ const D = {
658
658
  }]
659
659
  }, {
660
660
  label: [{
661
- ...L,
661
+ ...U,
662
662
  component: {
663
663
  name: "Text",
664
664
  options: {
@@ -723,7 +723,7 @@ const D = {
723
723
  builderComponents: !0,
724
724
  builderLinkComponent: !0
725
725
  }
726
- }, Ue = v(() => import("./tabs-6d924c90.js")), Le = {
726
+ }, qe = v(() => import("./tabs-5156494d.js")), $e = {
727
727
  shouldReceiveBuilderProps: {
728
728
  builderBlock: !1,
729
729
  builderContext: !0
@@ -745,7 +745,7 @@ const D = {
745
745
  height: "auto",
746
746
  textAlign: "center"
747
747
  }
748
- }, Ne = {
748
+ }, je = {
749
749
  name: "Custom Code",
750
750
  static: !0,
751
751
  requiredPermissions: ["editCode"],
@@ -767,7 +767,7 @@ const D = {
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
- }, $e = v(() => import("./custom-code-7786788e.js")), qe = {
770
+ }, Ke = v(() => import("./custom-code-7786788e.js")), _e = {
771
771
  name: "Embed",
772
772
  static: !0,
773
773
  inputs: [{
@@ -782,7 +782,7 @@ const D = {
782
782
  defaultValue: '<div style="padding: 20px; text-align: center">(Choose an embed URL)<div>',
783
783
  hideFromUI: !0
784
784
  }]
785
- }, je = v(() => import("./embed-5c1bbe12.js")), Ke = {
785
+ }, Me = v(() => import("./embed-5c1bbe12.js")), Oe = {
786
786
  name: "Form:Form",
787
787
  // editableTags: ['builder-form-error']
788
788
  defaults: {
@@ -1019,7 +1019,7 @@ const D = {
1019
1019
  builderComponents: !0,
1020
1020
  builderLinkComponent: !0
1021
1021
  }
1022
- }, Me = v(() => import("./form-a5407307.js")), Oe = {
1022
+ }, ze = v(() => import("./form-27bcc23a.js")), Je = {
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 D = {
1070
1070
  borderStyle: "solid",
1071
1071
  borderColor: "#ccc"
1072
1072
  }
1073
- }, _e = v(() => import("./input-93e42e28.js")), ze = {
1073
+ }, Ye = v(() => import("./input-920922d5.js")), Ge = {
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 D = {
1112
1112
  }],
1113
1113
  static: !0,
1114
1114
  noWrap: !0
1115
- }, Je = v(() => import("./select-4cf4356a.js")), Ye = {
1115
+ }, Qe = v(() => import("./select-673864b7.js")), Xe = {
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 D = {
1137
1137
  // that only shows if advanced setting is flipped
1138
1138
  // TODO: defaultChildren
1139
1139
  // canHaveChildren: true,
1140
- }, Qe = v(() => import("./submit-button-b48361a7.js")), Ge = {
1140
+ }, Ze = v(() => import("./submit-button-b48361a7.js")), et = {
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 D = {
1173
1173
  },
1174
1174
  static: !0,
1175
1175
  noWrap: !0
1176
- }, Xe = v(() => import("./textarea-d29025e9.js")), Ze = {
1176
+ }, tt = v(() => import("./textarea-d29025e9.js")), nt = {
1177
1177
  // friendlyName?
1178
1178
  name: "Raw:Img",
1179
1179
  hideFromInsertMenu: !0,
@@ -1182,12 +1182,12 @@ const D = {
1182
1182
  name: "image",
1183
1183
  bubble: !0,
1184
1184
  type: "file",
1185
- allowedFileTypes: ["jpeg", "jpg", "png", "svg", "gif", "webp"],
1185
+ allowedFileTypes: M,
1186
1186
  required: !0
1187
1187
  }],
1188
1188
  noWrap: !0,
1189
1189
  static: !0
1190
- }, et = v(() => import("./img-fa36f926.js")), tt = {
1190
+ }, at = v(() => import("./img-80be6914.js")), it = {
1191
1191
  name: "Video",
1192
1192
  canHaveChildren: !0,
1193
1193
  defaultStyles: {
@@ -1198,14 +1198,14 @@ const D = {
1198
1198
  inputs: [{
1199
1199
  name: "video",
1200
1200
  type: "file",
1201
- allowedFileTypes: ["mp4"],
1201
+ allowedFileTypes: We,
1202
1202
  bubble: !0,
1203
1203
  defaultValue: "https://cdn.builder.io/o/assets%2FYJIGb4i01jvw0SRdL5Bt%2Fd27731a526464deba0016216f5f9e570%2Fcompressed?apiKey=YJIGb4i01jvw0SRdL5Bt&token=d27731a526464deba0016216f5f9e570&alt=media&optimized=true",
1204
1204
  required: !0
1205
1205
  }, {
1206
1206
  name: "posterImage",
1207
1207
  type: "file",
1208
- allowedFileTypes: ["jpeg", "png"],
1208
+ allowedFileTypes: M,
1209
1209
  helperText: "Image to show before the video plays"
1210
1210
  }, {
1211
1211
  name: "autoPlay",
@@ -1271,40 +1271,34 @@ const D = {
1271
1271
  shouldReceiveBuilderProps: {
1272
1272
  builderBlock: !0
1273
1273
  }
1274
- }, nt = () => [{
1275
- component: $e,
1276
- ...Ne
1277
- }, {
1278
- component: je,
1279
- ...qe
1274
+ }, ot = () => [{
1275
+ component: Ke,
1276
+ ...je
1280
1277
  }, {
1281
1278
  component: Me,
1282
- ...Ke
1279
+ ..._e
1283
1280
  }, {
1284
- component: _e,
1281
+ component: ze,
1285
1282
  ...Oe
1286
1283
  }, {
1287
- component: Qe,
1288
- ...Ye
1284
+ component: Ye,
1285
+ ...Je
1289
1286
  }, {
1290
- component: Je,
1291
- ...ze
1287
+ component: Ze,
1288
+ ...Xe
1292
1289
  }, {
1293
- component: Xe,
1290
+ component: Qe,
1294
1291
  ...Ge
1295
1292
  }, {
1296
- component: et,
1297
- ...Ze
1298
- }, {
1299
- component: pe,
1300
- ...tt
1301
- }], z = () => [{
1302
- component: ge,
1303
- ...Re
1293
+ component: tt,
1294
+ ...et
1304
1295
  }, {
1305
- component: fe,
1306
- ...Ee
1296
+ component: at,
1297
+ ...nt
1307
1298
  }, {
1299
+ component: ge,
1300
+ ...it
1301
+ }], Y = () => [{
1308
1302
  component: he,
1309
1303
  ...Fe
1310
1304
  }, {
@@ -1312,23 +1306,29 @@ const D = {
1312
1306
  ...Pe
1313
1307
  }, {
1314
1308
  component: ye,
1315
- ...We
1316
- }, {
1317
- component: Be,
1318
1309
  ...Ae
1319
1310
  }, {
1320
1311
  component: xe,
1321
- ...He
1312
+ ...Be
1322
1313
  }, {
1323
1314
  component: ve,
1324
- ...Le
1325
- }, {
1326
- component: Ue,
1327
1315
  ...De
1328
1316
  }, {
1329
- component: Ve,
1330
- ...we
1331
- }, ...nt()], at = `function updateCookiesAndStyles(contentId, variants, isHydrationTarget) {
1317
+ component: Le,
1318
+ ...He
1319
+ }, {
1320
+ component: Se,
1321
+ ...Ue
1322
+ }, {
1323
+ component: Te,
1324
+ ...$e
1325
+ }, {
1326
+ component: qe,
1327
+ ...Ne
1328
+ }, {
1329
+ component: Ee,
1330
+ ...Re
1331
+ }, ...ot()], rt = `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 D = {
1384
1384
  }).join('');
1385
1385
  styleEl.innerHTML = newStyleStr;
1386
1386
  }
1387
- }`, it = `function updateVariantVisibility(variantContentId, defaultContentId, isHydrationTarget) {
1387
+ }`, lt = `function updateVariantVisibility(variantContentId, defaultContentId, isHydrationTarget) {
1388
1388
  if (!navigator.cookieEnabled) {
1389
1389
  return;
1390
1390
  }
@@ -1418,27 +1418,27 @@ const D = {
1418
1418
  thisScriptEl?.remove();
1419
1419
  }
1420
1420
  return;
1421
- }`, ee = "builderIoAbTest", te = "builderIoRenderContent", B = (e) => Object.values((e == null ? void 0 : e.variations) || {}).map((t) => ({
1421
+ }`, ae = "builderIoAbTest", ie = "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
- })), ot = ({
1425
+ })), st = ({
1426
1426
  canTrack: e,
1427
1427
  content: t
1428
- }) => !(!(B(t).length > 0) || !e || j()), rt = (e) => e === "react" || e === "reactNative", ne = rt(G), lt = () => `
1429
- window.${ee} = ${at}
1430
- window.${te} = ${it}
1431
- `, st = (e, t) => `
1432
- window.${ee}(
1433
- "${t}",${JSON.stringify(e)}, ${ne}
1434
- )`, dt = ({
1428
+ }) => !(!(B(t).length > 0) || !e || j()), dt = (e) => e === "react" || e === "reactNative", oe = dt(_), ct = () => `
1429
+ window.${ae} = ${rt}
1430
+ window.${ie} = ${lt}
1431
+ `, ut = (e, t) => `
1432
+ window.${ae}(
1433
+ "${t}",${JSON.stringify(e)}, ${oe}
1434
+ )`, mt = ({
1435
1435
  contentId: e,
1436
1436
  variationId: t
1437
- }) => `window.${te}(
1438
- "${t}", "${e}", ${ne}
1437
+ }) => `window.${ie}(
1438
+ "${t}", "${e}", ${oe}
1439
1439
  )`;
1440
1440
  function K(e) {
1441
- return /* @__PURE__ */ b(
1441
+ return /* @__PURE__ */ h(
1442
1442
  "script",
1443
1443
  {
1444
1444
  dangerouslySetInnerHTML: { __html: e.scriptStr },
@@ -1447,10 +1447,10 @@ function K(e) {
1447
1447
  }
1448
1448
  );
1449
1449
  }
1450
- function J(e) {
1450
+ function G(e) {
1451
1451
  return Math.round(e * 1e3) / 1e3;
1452
1452
  }
1453
- const ut = (e, t, n = !0) => {
1453
+ const pt = (e, t, n = !0) => {
1454
1454
  if (!(e instanceof HTMLElement))
1455
1455
  return null;
1456
1456
  let i = n ? e : e.parentElement;
@@ -1461,39 +1461,39 @@ const ut = (e, t, n = !0) => {
1461
1461
  return i;
1462
1462
  } while (i = i.parentElement);
1463
1463
  return null;
1464
- }, ct = (e) => ut(e, (t) => {
1464
+ }, ft = (e) => pt(e, (t) => {
1465
1465
  const n = t.getAttribute("builder-id") || t.id;
1466
1466
  return (n == null ? void 0 : n.indexOf("builder-")) === 0;
1467
- }), Y = ({
1467
+ }), Q = ({
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 = J(i / n.width), a = J(d / n.height);
1471
+ const n = t.getBoundingClientRect(), i = e.clientX - n.left, s = e.clientY - n.top, u = G(i / n.width), a = G(s / n.height);
1472
1472
  return {
1473
- x: m,
1473
+ x: u,
1474
1474
  y: a
1475
1475
  };
1476
- }, mt = (e) => {
1477
- const t = e.target, n = t && ct(t), i = (n == null ? void 0 : n.getAttribute("builder-id")) || (n == null ? void 0 : n.id);
1476
+ }, gt = (e) => {
1477
+ const t = e.target, n = t && ft(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 ? Y({
1481
+ targetOffset: t ? Q({
1482
1482
  event: e,
1483
1483
  target: t
1484
1484
  }) : void 0,
1485
- builderTargetOffset: n ? Y({
1485
+ builderTargetOffset: n ? Q({
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
- }, pt = (e) => {
1493
- var m, a;
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
- let d = "";
1496
- if (i && t && n && (d += `
1492
+ }, ht = ["svelte", "qwik", "vue"], X = () => ht.includes(_) && (F() || ee()), bt = (e) => {
1493
+ var u, a;
1494
+ const t = e.family + (e.kind && !e.kind.includes("#") ? ", " + e.kind : ""), n = t.split(",")[0], i = (a = e.fileUrl) != null ? a : (u = e == null ? void 0 : e.files) == null ? void 0 : u.regular;
1495
+ let s = "";
1496
+ if (i && t && n && (s += `
1497
1497
  @font-face {
1498
1498
  font-family: "${t}";
1499
1499
  src: local("${n}"), url('${i}') format('woff2');
@@ -1505,7 +1505,7 @@ font-weight: 400;
1505
1505
  if (!(String(Number(o)) === o))
1506
1506
  continue;
1507
1507
  const S = e.files[o];
1508
- S && S !== i && (d += `
1508
+ S && S !== i && (s += `
1509
1509
  @font-face {
1510
1510
  font-family: "${t}";
1511
1511
  src: url('${S}') format('woff2');
@@ -1514,16 +1514,16 @@ font-weight: ${o};
1514
1514
  }
1515
1515
  `.trim());
1516
1516
  }
1517
- return d;
1518
- }, gt = ({
1517
+ return s;
1518
+ }, yt = ({
1519
1519
  customFonts: e
1520
1520
  }) => {
1521
1521
  var t;
1522
- return ((t = e == null ? void 0 : e.map((n) => pt(n))) == null ? void 0 : t.join(" ")) || "";
1523
- }, ft = ({
1522
+ return ((t = e == null ? void 0 : e.map((n) => bt(n))) == null ? void 0 : t.join(" ")) || "";
1523
+ }, xt = ({
1524
1524
  cssCode: e,
1525
1525
  contentId: t
1526
- }) => e ? t ? (e == null ? void 0 : e.replace(/&/g, `div[builder-content-id="${t}"]`)) || "" : e : "", ht = `
1526
+ }) => e ? t ? (e == null ? void 0 : e.replace(/&/g, `div[builder-content-id="${t}"]`)) || "" : e : "", vt = `
1527
1527
  .builder-button {
1528
1528
  all: unset;
1529
1529
  }
@@ -1540,34 +1540,34 @@ font-weight: ${o};
1540
1540
  text-align: inherit;
1541
1541
  font-family: inherit;
1542
1542
  }
1543
- `, bt = (e) => e ? "" : ht, yt = (e) => `variant-${e}`;
1544
- function xt(e) {
1545
- var g, u, E;
1546
- const t = q(null);
1547
- function n(r) {
1548
- var f, s;
1543
+ `, St = (e) => e ? "" : vt, Tt = (e) => `variant-${e}`;
1544
+ function It(e) {
1545
+ var f, b, C;
1546
+ const t = $(null);
1547
+ function n(d) {
1548
+ var p, r;
1549
1549
  const c = {
1550
1550
  ...e.builderContextSignal.rootState,
1551
- ...r
1551
+ ...d
1552
1552
  };
1553
- e.builderContextSignal.rootSetState ? (s = (f = e.builderContextSignal).rootSetState) == null || s.call(f, c) : e.setBuilderContextSignal((l) => ({
1553
+ e.builderContextSignal.rootSetState ? (r = (p = e.builderContextSignal).rootSetState) == null || r.call(p, c) : e.setBuilderContextSignal((l) => ({
1554
1554
  ...l,
1555
1555
  rootState: c
1556
1556
  }));
1557
1557
  }
1558
- function i(r) {
1559
- var f, s, l, h, C;
1558
+ function i(d) {
1559
+ var p, r, l, g, T;
1560
1560
  const c = {
1561
1561
  ...e.builderContextSignal.content,
1562
- ...r,
1562
+ ...d,
1563
1563
  data: {
1564
- ...(f = e.builderContextSignal.content) == null ? void 0 : f.data,
1565
- ...r == null ? void 0 : r.data
1564
+ ...(p = e.builderContextSignal.content) == null ? void 0 : p.data,
1565
+ ...d == null ? void 0 : d.data
1566
1566
  },
1567
1567
  meta: {
1568
- ...(s = e.builderContextSignal.content) == null ? void 0 : s.meta,
1569
- ...r == null ? void 0 : r.meta,
1570
- breakpoints: ((l = r == null ? void 0 : r.meta) == null ? void 0 : l.breakpoints) || ((C = (h = e.builderContextSignal.content) == null ? void 0 : h.meta) == null ? void 0 : C.breakpoints)
1568
+ ...(r = e.builderContextSignal.content) == null ? void 0 : r.meta,
1569
+ ...d == null ? void 0 : d.meta,
1570
+ breakpoints: ((l = d == null ? void 0 : d.meta) == null ? void 0 : l.breakpoints) || ((T = (g = e.builderContextSignal.content) == null ? void 0 : g.meta) == null ? void 0 : T.breakpoints)
1571
1571
  }
1572
1572
  };
1573
1573
  e.setBuilderContextSignal((x) => ({
@@ -1575,68 +1575,68 @@ function xt(e) {
1575
1575
  content: c
1576
1576
  }));
1577
1577
  }
1578
- function d() {
1578
+ function s() {
1579
1579
  return e.showContent ? {} : {
1580
1580
  hidden: !0,
1581
1581
  "aria-hidden": !0
1582
1582
  };
1583
1583
  }
1584
- const [m, a] = T(
1584
+ const [u, a] = I(
1585
1585
  () => e.contentWrapper || "div"
1586
1586
  );
1587
- function o(r) {
1588
- return de({
1587
+ function o(d) {
1588
+ return ue({
1589
1589
  model: e.model,
1590
1590
  trustedHosts: e.trustedHosts,
1591
1591
  callbacks: {
1592
1592
  configureSdk: (c) => {
1593
1593
  var l;
1594
- const { breakpoints: f, contentId: s } = c;
1595
- !s || s !== ((l = e.builderContextSignal.content) == null ? void 0 : l.id) || f && i({
1594
+ const { breakpoints: p, contentId: r } = c;
1595
+ !r || r !== ((l = e.builderContextSignal.content) == null ? void 0 : l.id) || p && i({
1596
1596
  meta: {
1597
- breakpoints: f
1597
+ breakpoints: p
1598
1598
  }
1599
1599
  });
1600
1600
  },
1601
1601
  animation: (c) => {
1602
- Te(c);
1602
+ ke(c);
1603
1603
  },
1604
1604
  contentUpdate: (c) => {
1605
1605
  i(c);
1606
1606
  }
1607
1607
  }
1608
- })(r);
1608
+ })(d);
1609
1609
  }
1610
- const [p, S] = T(() => ({})), [y, V] = T(() => ({})), [k, F] = T(() => !1);
1611
- function P(r) {
1612
- var c, f;
1610
+ const [m, S] = I(() => ({})), [y, R] = I(() => ({})), [k, P] = I(() => !1);
1611
+ function A(d) {
1612
+ var c, p;
1613
1613
  if (e.builderContextSignal.content) {
1614
- const s = (c = e.builderContextSignal.content) == null ? void 0 : c.testVariationId, l = (f = e.builderContextSignal.content) == null ? void 0 : f.id;
1615
- O({
1614
+ const r = (c = e.builderContextSignal.content) == null ? void 0 : c.testVariationId, l = (p = e.builderContextSignal.content) == null ? void 0 : p.id;
1615
+ z({
1616
1616
  apiHost: e.apiHost,
1617
1617
  type: "click",
1618
- canTrack: H(e.canTrack),
1618
+ canTrack: D(e.canTrack),
1619
1619
  contentId: l,
1620
1620
  apiKey: e.apiKey,
1621
- variationId: s !== l ? s : void 0,
1622
- ...mt(r),
1621
+ variationId: r !== l ? r : void 0,
1622
+ ...gt(d),
1623
1623
  unique: !k
1624
1624
  });
1625
1625
  }
1626
- k || F(!0);
1626
+ k || P(!0);
1627
1627
  }
1628
1628
  function W() {
1629
- var c, f, s;
1630
- const r = (s = (f = (c = e.builderContextSignal.content) == null ? void 0 : c.data) == null ? void 0 : f.httpRequests) != null ? s : {};
1631
- Object.entries(r).forEach(([l, h]) => {
1632
- if (!h || y[l] || p[l] && !A())
1629
+ var c, p, r;
1630
+ const d = (r = (p = (c = e.builderContextSignal.content) == null ? void 0 : c.data) == null ? void 0 : p.httpRequests) != null ? r : {};
1631
+ Object.entries(d).forEach(([l, g]) => {
1632
+ if (!g || y[l] || m[l] && !F())
1633
1633
  return;
1634
1634
  y[l] = !0;
1635
- const C = h.replace(
1635
+ const T = g.replace(
1636
1636
  /{{([^}]+)}}/g,
1637
- (x, ae) => String(
1638
- Z({
1639
- code: ae,
1637
+ (x, re) => String(
1638
+ ne({
1639
+ code: re,
1640
1640
  context: e.context || {},
1641
1641
  localState: void 0,
1642
1642
  rootState: e.builderContextSignal.rootState,
@@ -1644,24 +1644,24 @@ function xt(e) {
1644
1644
  })
1645
1645
  )
1646
1646
  );
1647
- ue(C), fetch(C).then((x) => x.json()).then((x) => {
1647
+ me(T), fetch(T).then((x) => x.json()).then((x) => {
1648
1648
  n({
1649
1649
  [l]: x
1650
- }), p[l] = !0;
1650
+ }), m[l] = !0;
1651
1651
  }).catch((x) => {
1652
- console.error("error fetching dynamic data", h, x);
1652
+ console.error("error fetching dynamic data", g, x);
1653
1653
  }).finally(() => {
1654
1654
  y[l] = !1;
1655
1655
  });
1656
1656
  });
1657
1657
  }
1658
- function I() {
1659
- A() && window.dispatchEvent(
1658
+ function w() {
1659
+ F() && window.dispatchEvent(
1660
1660
  new CustomEvent(
1661
1661
  "builder:component:stateChange",
1662
1662
  {
1663
1663
  detail: {
1664
- state: ke(e.builderContextSignal.rootState),
1664
+ state: Ce(e.builderContextSignal.rootState),
1665
1665
  ref: {
1666
1666
  name: e.model
1667
1667
  }
@@ -1670,11 +1670,11 @@ function xt(e) {
1670
1670
  )
1671
1671
  );
1672
1672
  }
1673
- const R = q(!1);
1674
- return R.current || (W(), I(), R.current = !0), w(() => {
1675
- var r, c;
1673
+ const E = $(!1);
1674
+ return E.current || (W(), w(), E.current = !0), V(() => {
1675
+ var d, c;
1676
1676
  if (j()) {
1677
- if (A() && !e.isNestedRender && (window.addEventListener("message", o), ie(), oe({
1677
+ if (F() && !e.isNestedRender && (window.addEventListener("message", o), le(), se({
1678
1678
  ...e.locale ? {
1679
1679
  locale: e.locale
1680
1680
  } : {},
@@ -1686,29 +1686,31 @@ function xt(e) {
1686
1686
  } : {}
1687
1687
  }), Object.values(
1688
1688
  e.builderContextSignal.componentInfos
1689
- ).forEach((s) => {
1690
- var h;
1691
- const l = re(s);
1692
- (h = window.parent) == null || h.postMessage(l, "*");
1689
+ ).forEach((r) => {
1690
+ var l, g;
1691
+ if (!e.model || !((l = r.models) != null && l.length) || r.models.includes(e.model)) {
1692
+ const T = de(r);
1693
+ (g = window.parent) == null || g.postMessage(T, "*");
1694
+ }
1693
1695
  }), window.addEventListener(
1694
1696
  "builder:component:stateChangeListenerActivated",
1695
- I
1696
- )), e.builderContextSignal.content && H(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({
1697
+ w
1698
+ )), e.builderContextSignal.content && D(e.canTrack)) {
1699
+ const r = (d = e.builderContextSignal.content) == null ? void 0 : d.testVariationId, l = (c = e.builderContextSignal.content) == null ? void 0 : c.id, g = e.apiKey;
1700
+ z({
1699
1701
  apiHost: e.apiHost,
1700
1702
  type: "impression",
1701
1703
  canTrack: !0,
1702
1704
  contentId: l,
1703
- apiKey: h,
1704
- variationId: s !== l ? s : void 0
1705
+ apiKey: g,
1706
+ variationId: r !== l ? r : void 0
1705
1707
  });
1706
1708
  }
1707
- if (le() && !A()) {
1708
- const s = new URL(location.href).searchParams, l = s.get("builder.preview"), h = s.get(
1709
+ if (ee() && !F()) {
1710
+ const r = new URL(location.href).searchParams, l = r.get("builder.preview"), g = r.get(
1709
1711
  `builder.overrides.${l}`
1710
- ), C = s.get("apiKey") || s.get("builder.space");
1711
- l === e.model && C === e.apiKey && (!e.content || h === e.content.id) && se({
1712
+ ), T = r.get("apiKey") || r.get("builder.space");
1713
+ l === e.model && T === e.apiKey && (!e.content || g === e.content.id) && ce({
1712
1714
  model: e.model,
1713
1715
  apiKey: e.apiKey,
1714
1716
  apiVersion: e.builderContextSignal.apiVersion
@@ -1717,52 +1719,55 @@ function xt(e) {
1717
1719
  });
1718
1720
  }
1719
1721
  }
1720
- }, []), w(() => {
1722
+ }, []), V(() => {
1721
1723
  e.content && i(e.content);
1722
- }, [e.content]), w(() => {
1723
- I();
1724
- }, [e.builderContextSignal.rootState]), w(() => {
1724
+ }, [e.content]), V(() => {
1725
+ w();
1726
+ }, [e.builderContextSignal.rootState]), V(() => {
1725
1727
  e.data && n(e.data);
1726
- }, [e.data]), w(() => {
1728
+ }, [e.data]), V(() => {
1727
1729
  e.locale && n({
1728
1730
  locale: e.locale
1729
1731
  });
1730
- }, [e.locale]), w(() => () => {
1732
+ }, [e.locale]), V(() => () => {
1731
1733
  j() && (window.removeEventListener("message", o), window.removeEventListener(
1732
1734
  "builder:component:stateChangeListenerActivated",
1733
- I
1735
+ w
1734
1736
  ));
1735
- }, []), /* @__PURE__ */ b(Se.Provider, { value: e.builderContextSignal, children: e.builderContextSignal.content ? /* @__PURE__ */ b(
1736
- m,
1737
+ }, []), /* @__PURE__ */ h(Ie.Provider, { value: e.builderContextSignal, children: e.builderContextSignal.content || X() ? /* @__PURE__ */ h(
1738
+ u,
1737
1739
  {
1738
1740
  ref: t,
1739
- onClick: (r) => P(r),
1740
- "builder-content-id": (g = e.builderContextSignal.content) == null ? void 0 : g.id,
1741
+ onClick: (d) => A(d),
1742
+ "builder-content-id": (f = e.builderContextSignal.content) == null ? void 0 : f.id,
1741
1743
  "builder-model": e.model,
1742
- className: yt(
1743
- ((u = e.content) == null ? void 0 : u.testVariationId) || ((E = e.content) == null ? void 0 : E.id)
1744
+ className: Tt(
1745
+ ((b = e.content) == null ? void 0 : b.testVariationId) || ((C = e.content) == null ? void 0 : C.id)
1744
1746
  ),
1745
- ...d(),
1747
+ style: {
1748
+ display: !e.builderContextSignal.content && X() ? "none" : void 0
1749
+ },
1750
+ ...s(),
1746
1751
  ...e.contentWrapperProps,
1747
1752
  children: e.children
1748
1753
  }
1749
1754
  ) : null });
1750
1755
  }
1751
- function vt(e) {
1752
- const [t, n] = T(
1756
+ function kt(e) {
1757
+ const [t, n] = I(
1753
1758
  () => `
1754
- ${ft({
1759
+ ${xt({
1755
1760
  cssCode: e.cssCode,
1756
1761
  contentId: e.contentId
1757
1762
  })}
1758
- ${gt({
1763
+ ${yt({
1759
1764
  customFonts: e.customFonts
1760
1765
  })}
1761
- ${bt(e.isNestedRender)}
1766
+ ${St(e.isNestedRender)}
1762
1767
  `.trim()
1763
1768
  );
1764
- return /* @__PURE__ */ b(
1765
- X,
1769
+ return /* @__PURE__ */ h(
1770
+ te,
1766
1771
  {
1767
1772
  id: "builderio-content",
1768
1773
  styles: t,
@@ -1770,24 +1775,24 @@ ${bt(e.isNestedRender)}
1770
1775
  }
1771
1776
  );
1772
1777
  }
1773
- const St = ({
1778
+ const Ct = ({
1774
1779
  content: e,
1775
1780
  data: t,
1776
1781
  locale: n
1777
1782
  }) => {
1778
- var m, a, o;
1779
- const i = {}, d = ((m = e == null ? void 0 : e.data) == null ? void 0 : m.state) || {};
1780
- return (o = (a = e == null ? void 0 : e.data) == null ? void 0 : a.inputs) == null || o.forEach((p) => {
1781
- p.name && p.defaultValue !== void 0 && (i[p.name] = p.defaultValue);
1783
+ var u, a, o;
1784
+ const i = {}, s = ((u = e == null ? void 0 : e.data) == null ? void 0 : u.state) || {};
1785
+ return (o = (a = e == null ? void 0 : e.data) == null ? void 0 : a.inputs) == null || o.forEach((m) => {
1786
+ m.name && m.defaultValue !== void 0 && (i[m.name] = m.defaultValue);
1782
1787
  }), {
1783
1788
  ...i,
1784
- ...d,
1789
+ ...s,
1785
1790
  ...t,
1786
1791
  ...n ? {
1787
1792
  locale: n
1788
1793
  } : {}
1789
1794
  };
1790
- }, Tt = ({
1795
+ }, wt = ({
1791
1796
  content: e,
1792
1797
  data: t
1793
1798
  }) => e ? {
@@ -1798,100 +1803,95 @@ const St = ({
1798
1803
  },
1799
1804
  meta: e == null ? void 0 : e.meta
1800
1805
  } : void 0;
1801
- function Q(e) {
1802
- var S, y, V, k, F, P, W, I, R;
1803
- const [t, n] = T(
1806
+ function Z(e) {
1807
+ var S, y, R, k, P, A, W, w, E;
1808
+ const [t, n] = I(
1804
1809
  () => {
1805
- var g, u;
1806
- return dt({
1810
+ var f, b;
1811
+ return mt({
1807
1812
  // eslint-disable-next-line @typescript-eslint/no-non-null-assertion, @typescript-eslint/no-non-null-asserted-optional-chain
1808
- variationId: (g = e.content) == null ? void 0 : g.testVariationId,
1813
+ variationId: (f = e.content) == null ? void 0 : f.testVariationId,
1809
1814
  // eslint-disable-next-line @typescript-eslint/no-non-null-assertion, @typescript-eslint/no-non-null-asserted-optional-chain
1810
- contentId: (u = e.content) == null ? void 0 : u.id
1815
+ contentId: (b = e.content) == null ? void 0 : b.id
1811
1816
  });
1812
1817
  }
1813
1818
  );
1814
- function i(g) {
1815
- o((u) => ({
1816
- ...u,
1817
- rootState: g
1819
+ function i(f) {
1820
+ o((b) => ({
1821
+ ...b,
1822
+ rootState: f
1818
1823
  }));
1819
1824
  }
1820
- const [d, m] = T(
1821
- () => {
1822
- var g;
1823
- return [
1824
- ...z(),
1825
- ...((g = e.customComponents) == null ? void 0 : g.filter(({ models: u }) => !(u != null && u.length) || !e.model ? !0 : u.includes(e.model))) || []
1826
- ].reduce(
1827
- (u, { component: E, ...r }) => ({
1828
- ...u,
1829
- [r.name]: {
1830
- component: E,
1831
- ..._(r)
1832
- }
1833
- }),
1834
- {}
1835
- );
1836
- }
1837
- ), [a, o] = T(() => {
1838
- var g;
1839
- return {
1840
- content: Tt({
1841
- content: e.content,
1842
- data: e.data
1825
+ const [s, u] = I(
1826
+ () => [
1827
+ ...Y(),
1828
+ ...e.customComponents || []
1829
+ ].reduce(
1830
+ (f, { component: b, ...C }) => ({
1831
+ ...f,
1832
+ [C.name]: {
1833
+ component: b,
1834
+ ...J(C)
1835
+ }
1843
1836
  }),
1844
- localState: void 0,
1845
- rootState: St({
1846
- content: e.content,
1847
- data: e.data,
1848
- locale: e.locale
1837
+ {}
1838
+ )
1839
+ ), [a, o] = I(() => ({
1840
+ content: wt({
1841
+ content: e.content,
1842
+ data: e.data
1843
+ }),
1844
+ localState: void 0,
1845
+ rootState: Ct({
1846
+ content: e.content,
1847
+ data: e.data,
1848
+ locale: e.locale
1849
+ }),
1850
+ rootSetState: i,
1851
+ context: e.context || {},
1852
+ canTrack: e.canTrack,
1853
+ apiKey: e.apiKey,
1854
+ apiVersion: e.apiVersion,
1855
+ componentInfos: [
1856
+ ...Y(),
1857
+ ...e.customComponents || []
1858
+ ].reduce(
1859
+ (f, { component: b, ...C }) => ({
1860
+ ...f,
1861
+ [C.name]: J(C)
1849
1862
  }),
1850
- rootSetState: i,
1851
- context: e.context || {},
1852
- canTrack: e.canTrack,
1853
- apiKey: e.apiKey,
1854
- apiVersion: e.apiVersion,
1855
- componentInfos: [
1856
- ...z(),
1857
- ...((g = e.customComponents) == null ? void 0 : g.filter(({ models: u }) => !(u != null && u.length) || !e.model ? !0 : u.includes(e.model))) || []
1858
- ].reduce(
1859
- (u, { component: E, ...r }) => ({
1860
- ...u,
1861
- [r.name]: _(r)
1862
- }),
1863
- {}
1864
- ),
1865
- inheritedStyles: {},
1866
- BlocksWrapper: e.blocksWrapper || "div",
1867
- BlocksWrapperProps: e.blocksWrapperProps || {},
1868
- nonce: e.nonce || ""
1869
- };
1870
- }), p = q(!1);
1871
- if (!p.current) {
1872
- e.apiKey || ce.error(
1863
+ {}
1864
+ ),
1865
+ inheritedStyles: {},
1866
+ BlocksWrapper: e.blocksWrapper || "div",
1867
+ BlocksWrapperProps: e.blocksWrapperProps || {},
1868
+ nonce: e.nonce || "",
1869
+ model: e.model || ""
1870
+ })), m = $(!1);
1871
+ if (!m.current) {
1872
+ e.apiKey || pe.error(
1873
1873
  "No API key provided to `Content` component. This can cause issues. Please provide an API key using the `apiKey` prop."
1874
1874
  );
1875
- const g = (y = (S = a.content) == null ? void 0 : S.data) == null ? void 0 : y.jsCode;
1876
- g && Z({
1877
- code: g,
1875
+ const f = (y = (S = a.content) == null ? void 0 : S.data) == null ? void 0 : y.jsCode;
1876
+ f && ne({
1877
+ code: f,
1878
1878
  context: e.context || {},
1879
1879
  localState: void 0,
1880
1880
  rootState: a.rootState,
1881
- rootSetState: (u) => {
1882
- Object.assign(a.rootState, u);
1881
+ rootSetState: (b) => {
1882
+ Object.assign(a.rootState, b);
1883
1883
  },
1884
1884
  isExpression: !1
1885
- }), p.current = !0;
1885
+ }), m.current = !0;
1886
1886
  }
1887
- return /* @__PURE__ */ b(
1888
- Ie.Provider,
1887
+ return /* @__PURE__ */ h(
1888
+ we.Provider,
1889
1889
  {
1890
1890
  value: {
1891
- registeredComponents: d
1891
+ registeredComponents: s
1892
1892
  },
1893
- children: /* @__PURE__ */ $(
1894
- xt,
1893
+ children: /* @__PURE__ */ q(
1894
+ It,
1895
1895
  {
1896
1896
  apiHost: e.apiHost,
1897
1897
  nonce: e.nonce,
@@ -1911,7 +1911,7 @@ function Q(e) {
1911
1911
  isNestedRender: e.isNestedRender,
1912
1912
  setBuilderContextSignal: o,
1913
1913
  children: [
1914
- e.isSsrAbTest ? /* @__PURE__ */ b(
1914
+ e.isSsrAbTest ? /* @__PURE__ */ h(
1915
1915
  K,
1916
1916
  {
1917
1917
  id: "builderio-variant-visibility",
@@ -1919,22 +1919,22 @@ function Q(e) {
1919
1919
  nonce: e.nonce || ""
1920
1920
  }
1921
1921
  ) : null,
1922
- /* @__PURE__ */ b(
1923
- vt,
1922
+ /* @__PURE__ */ h(
1923
+ kt,
1924
1924
  {
1925
1925
  nonce: e.nonce || "",
1926
1926
  isNestedRender: e.isNestedRender,
1927
- contentId: (V = a.content) == null ? void 0 : V.id,
1928
- cssCode: (F = (k = a.content) == null ? void 0 : k.data) == null ? void 0 : F.cssCode,
1929
- customFonts: (W = (P = a.content) == null ? void 0 : P.data) == null ? void 0 : W.customFonts
1927
+ contentId: (R = a.content) == null ? void 0 : R.id,
1928
+ cssCode: (P = (k = a.content) == null ? void 0 : k.data) == null ? void 0 : P.cssCode,
1929
+ customFonts: (W = (A = a.content) == null ? void 0 : A.data) == null ? void 0 : W.customFonts
1930
1930
  }
1931
1931
  ),
1932
- /* @__PURE__ */ b(
1933
- Ce,
1932
+ /* @__PURE__ */ h(
1933
+ Ve,
1934
1934
  {
1935
- blocks: (R = (I = a.content) == null ? void 0 : I.data) == null ? void 0 : R.blocks,
1935
+ blocks: (E = (w = a.content) == null ? void 0 : w.data) == null ? void 0 : E.blocks,
1936
1936
  context: a,
1937
- registeredComponents: d,
1937
+ registeredComponents: s,
1938
1938
  linkComponent: e.linkComponent
1939
1939
  }
1940
1940
  )
@@ -1944,57 +1944,57 @@ function Q(e) {
1944
1944
  }
1945
1945
  );
1946
1946
  }
1947
- function Pt(e) {
1947
+ function Dt(e) {
1948
1948
  var a;
1949
- const [t, n] = T(
1950
- () => ot({
1951
- canTrack: H(e.canTrack),
1949
+ const [t, n] = I(
1950
+ () => st({
1951
+ canTrack: D(e.canTrack),
1952
1952
  content: e.content
1953
1953
  })
1954
1954
  );
1955
1955
  function i() {
1956
1956
  var o;
1957
- return st(
1958
- B(e.content).map((p) => ({
1959
- id: p.testVariationId,
1960
- testRatio: p.testRatio
1957
+ return ut(
1958
+ B(e.content).map((m) => ({
1959
+ id: m.testVariationId,
1960
+ testRatio: m.testRatio
1961
1961
  })),
1962
1962
  ((o = e.content) == null ? void 0 : o.id) || ""
1963
1963
  );
1964
1964
  }
1965
- function d() {
1965
+ function s() {
1966
1966
  return B(e.content).map((o) => `.variant-${o.testVariationId} { display: none; } `).join("");
1967
1967
  }
1968
- function m() {
1968
+ function u() {
1969
1969
  var o;
1970
1970
  return t ? {
1971
1971
  ...e.content,
1972
1972
  testVariationId: (o = e.content) == null ? void 0 : o.id
1973
- } : me({
1973
+ } : fe({
1974
1974
  item: e.content,
1975
- canTrack: H(e.canTrack)
1975
+ canTrack: D(e.canTrack)
1976
1976
  });
1977
1977
  }
1978
- return w(() => {
1979
- }, []), /* @__PURE__ */ $(M, { children: [
1980
- !e.isNestedRender && G !== "reactNative" ? /* @__PURE__ */ b(
1978
+ return V(() => {
1979
+ }, []), /* @__PURE__ */ q(O, { children: [
1980
+ !e.isNestedRender && _ !== "reactNative" ? /* @__PURE__ */ h(
1981
1981
  K,
1982
1982
  {
1983
1983
  id: "builderio-init-variants-fns",
1984
- scriptStr: lt(),
1984
+ scriptStr: ct(),
1985
1985
  nonce: e.nonce || ""
1986
1986
  }
1987
1987
  ) : null,
1988
- t ? /* @__PURE__ */ $(M, { children: [
1989
- /* @__PURE__ */ b(
1990
- X,
1988
+ t ? /* @__PURE__ */ q(O, { children: [
1989
+ /* @__PURE__ */ h(
1990
+ te,
1991
1991
  {
1992
1992
  id: "builderio-variants",
1993
- styles: d(),
1993
+ styles: s(),
1994
1994
  nonce: e.nonce || ""
1995
1995
  }
1996
1996
  ),
1997
- /* @__PURE__ */ b(
1997
+ /* @__PURE__ */ h(
1998
1998
  K,
1999
1999
  {
2000
2000
  id: "builderio-variants-visibility",
@@ -2002,8 +2002,8 @@ function Pt(e) {
2002
2002
  nonce: e.nonce || ""
2003
2003
  }
2004
2004
  ),
2005
- (a = B(e.content)) == null ? void 0 : a.map((o) => /* @__PURE__ */ b(
2006
- Q,
2005
+ (a = B(e.content)) == null ? void 0 : a.map((o) => /* @__PURE__ */ h(
2006
+ Z,
2007
2007
  {
2008
2008
  apiHost: e.apiHost,
2009
2009
  isNestedRender: e.isNestedRender,
@@ -2030,13 +2030,13 @@ function Pt(e) {
2030
2030
  o.testVariationId
2031
2031
  ))
2032
2032
  ] }) : null,
2033
- /* @__PURE__ */ b(
2034
- Q,
2033
+ /* @__PURE__ */ h(
2034
+ Z,
2035
2035
  {
2036
2036
  apiHost: e.apiHost,
2037
2037
  nonce: e.nonce,
2038
2038
  isNestedRender: e.isNestedRender,
2039
- content: m(),
2039
+ content: u(),
2040
2040
  showContent: !0,
2041
2041
  model: e.model,
2042
2042
  data: e.data,
@@ -2059,5 +2059,5 @@ function Pt(e) {
2059
2059
  ] });
2060
2060
  }
2061
2061
  export {
2062
- Pt as default
2062
+ Dt as default
2063
2063
  };