@builder.io/sdk-react 3.0.7 → 4.0.0

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 (73) hide show
  1. package/lib/browser/blocks-exports.cjs +32 -32
  2. package/lib/browser/blocks-exports.mjs +946 -908
  3. package/lib/browser/index.cjs +1 -1
  4. package/lib/browser/index.mjs +1 -1
  5. package/lib/browser/{server-entry-20c79b90.js → server-entry-422fad84.js} +26 -16
  6. package/lib/browser/server-entry-916191b4.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-071aa4f9.cjs → accordion-2f83fc75.cjs} +1 -1
  10. package/lib/edge/{accordion-22c2c037.js → accordion-e1b77652.js} +1 -1
  11. package/lib/edge/{blocks-2989e629.js → blocks-0885e182.js} +2 -2
  12. package/lib/edge/{blocks-d3f37507.cjs → blocks-5165c164.cjs} +1 -1
  13. package/lib/edge/blocks-exports.cjs +1 -1
  14. package/lib/edge/blocks-exports.mjs +2 -2
  15. package/lib/edge/{button-a2cc6565.cjs → button-d7197e96.cjs} +1 -1
  16. package/lib/edge/{button-2b5270c4.js → button-d878f35c.js} +2 -2
  17. package/lib/edge/{columns-b7240242.cjs → columns-46729516.cjs} +1 -1
  18. package/lib/edge/{columns-21b9be25.js → columns-b365c86a.js} +3 -3
  19. package/lib/edge/{content-variants-88f4dc64.js → content-variants-1594c868.js} +281 -279
  20. package/lib/edge/content-variants-c6cab1c3.cjs +134 -0
  21. package/lib/edge/{form-77687883.cjs → form-9844766c.cjs} +1 -1
  22. package/lib/edge/{form-d29f3cc0.js → form-b66c20a3.js} +3 -3
  23. package/lib/edge/{get-class-prop-name-f597545d.cjs → get-class-prop-name-0b992cfb.cjs} +1 -1
  24. package/lib/edge/{get-class-prop-name-dbc5d99c.js → get-class-prop-name-dac81472.js} +1 -1
  25. package/lib/edge/{img-fed70928.js → img-c4a772a8.js} +1 -1
  26. package/lib/edge/{img-03f9002b.cjs → img-fb35350a.cjs} +1 -1
  27. package/lib/edge/index.cjs +1 -1
  28. package/lib/edge/index.mjs +1 -1
  29. package/lib/edge/{input-1e548fd0.cjs → input-122768ac.cjs} +1 -1
  30. package/lib/edge/{input-083c3c35.js → input-57c5b097.js} +1 -1
  31. package/lib/edge/{personalization-container-bcff3433.js → personalization-container-7e63edce.js} +4 -4
  32. package/lib/edge/{personalization-container-dde10a09.cjs → personalization-container-a17ae615.cjs} +1 -1
  33. package/lib/edge/{select-9f22c2ba.js → select-3d4324ef.js} +1 -1
  34. package/lib/edge/{select-21e33225.cjs → select-7f750b70.cjs} +1 -1
  35. package/lib/edge/server-entry-77166102.cjs +2 -0
  36. package/lib/edge/{server-entry-43a6f5be.js → server-entry-c1673af2.js} +28 -18
  37. package/lib/edge/server-entry.cjs +1 -1
  38. package/lib/edge/server-entry.mjs +1 -1
  39. package/lib/edge/{slot-ca171e8c.js → slot-05ef18a0.js} +3 -3
  40. package/lib/edge/{slot-a9f5d6c0.cjs → slot-123c0993.cjs} +1 -1
  41. package/lib/edge/symbol-ee314d5a.cjs +1 -0
  42. package/lib/edge/{symbol-8f6ff028.js → symbol-f488bea0.js} +25 -25
  43. package/lib/edge/{tabs-6b67fca2.js → tabs-244d53fa.js} +3 -3
  44. package/lib/edge/{tabs-880c9088.cjs → tabs-edb82022.cjs} +1 -1
  45. package/lib/edge/{video-a3f10439.js → video-52df64e2.js} +54 -17
  46. package/lib/edge/video-cc58dd83.cjs +1 -0
  47. package/lib/node/blocks-exports.cjs +32 -32
  48. package/lib/node/blocks-exports.mjs +781 -743
  49. package/lib/node/index.cjs +1 -1
  50. package/lib/node/index.mjs +3 -3
  51. package/lib/node/init.cjs +1 -1
  52. package/lib/node/init.mjs +3 -3
  53. package/lib/node/{server-entry-6626257d.js → server-entry-4df60fc5.js} +26 -16
  54. package/lib/node/server-entry-8ab8c78b.cjs +2 -0
  55. package/lib/node/server-entry.cjs +1 -1
  56. package/lib/node/server-entry.mjs +1 -1
  57. package/lib/node/{setIvm-5cb298bf.js → setIvm-0edfc727.js} +1 -1
  58. package/lib/node/{setIvm-49abbae6.cjs → setIvm-6405aa63.cjs} +1 -1
  59. package/lib/node/setIvm.cjs +1 -1
  60. package/lib/node/setIvm.mjs +2 -2
  61. package/lib/node/{should-force-browser-runtime-in-node-11e8399e.cjs → should-force-browser-runtime-in-node-6d4dbff9.cjs} +1 -1
  62. package/lib/node/{should-force-browser-runtime-in-node-94f1a5b3.js → should-force-browser-runtime-in-node-7a39b073.js} +1 -1
  63. package/package.json +1 -1
  64. package/types/components/content-variants/content-variants.types.d.ts +2 -2
  65. package/types/constants/sdk-version.d.ts +1 -1
  66. package/types/helpers/subscribe-to-editor.d.ts +13 -13
  67. package/types/scripts/init-editing.d.ts +3 -1
  68. package/lib/browser/server-entry-762e29e0.cjs +0 -2
  69. package/lib/edge/content-variants-fdd5ee50.cjs +0 -134
  70. package/lib/edge/server-entry-ac35a5c8.cjs +0 -2
  71. package/lib/edge/symbol-a2015c7e.cjs +0 -1
  72. package/lib/edge/video-4ecfd08b.cjs +0 -1
  73. package/lib/node/server-entry-0b433783.cjs +0 -2
@@ -1,8 +1,8 @@
1
- import { jsx as h, jsxs as $, Fragment as z } from "react/jsx-runtime";
1
+ import { jsx as y, jsxs as $, Fragment as J } from "react/jsx-runtime";
2
2
  import { lazy as v, useRef as _, useState as I, useEffect as V } from "react";
3
- import { isBrowser as j, TARGET as K, isEditing as F, isPreviewing as te, registerInsertMenu as le, setupBrowserForEditing as se, createRegisterComponentMessage as de, getDefaultCanTrack as H, _track as J, fetchOneEntry as ue, createEditorListener as ce, logFetch as me, serializeIncludingFunctions as Y, logger as pe, handleABTestingSync as fe } from "./server-entry-43a6f5be.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, evaluate as ne, fastClone as Ce, InlinedStyles as ae, ComponentsContext as we, Blocks as Ve } from "./blocks-2989e629.js";
3
+ import { isBrowser as j, TARGET as O, isEditing as P, isPreviewing as ne, registerInsertMenu as se, setupBrowserForEditing as de, createRegisterComponentMessage as ue, getDefaultCanTrack as H, _track as Y, fetchOneEntry as ce, createEditorListener as me, logFetch as pe, serializeIncludingFunctions as G, logger as fe, handleABTestingSync as ge } from "./server-entry-c1673af2.js";
4
+ import { Video as he, Button as be, Columns as ye, Fragment as xe, Image as ve, Section as Se, Symbol as Te, Text as Ie, BuilderContext as ke } from "./blocks-exports.mjs";
5
+ import { triggerAnimation as Ce, evaluate as ae, fastClone as we, InlinedStyles as ie, ComponentsContext as Ve, Blocks as Re } from "./blocks-0885e182.js";
6
6
  const U = {
7
7
  "@type": "@builder.io/sdk:Element",
8
8
  layerName: "Accordion item title",
@@ -63,7 +63,7 @@ const U = {
63
63
  }
64
64
  }
65
65
  }]
66
- }, Re = {
66
+ }, Ee = {
67
67
  name: "Builder:Accordion",
68
68
  canHaveChildren: !0,
69
69
  image: "https://cdn.builder.io/api/v1/image/assets%2FagZ9n5CUKRfbL9t6CaJOyVSK4Es2%2Ffab6c1fd3fe542408cbdec078bca7f35",
@@ -127,7 +127,7 @@ const U = {
127
127
  builderComponents: !0,
128
128
  builderLinkComponent: !0
129
129
  }
130
- }, Ee = v(() => import("./accordion-22c2c037.js")), Fe = {
130
+ }, Fe = v(() => import("./accordion-e1b77652.js")), Pe = {
131
131
  name: "Core:Button",
132
132
  image: "https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2F81a15681c3e74df09677dfc57a615b13",
133
133
  defaultStyles: {
@@ -163,7 +163,7 @@ const U = {
163
163
  shouldReceiveBuilderProps: {
164
164
  builderLinkComponent: !0
165
165
  }
166
- }, Pe = {
166
+ }, We = {
167
167
  // TODO: ways to statically preprocess JSON for references, functions, etc
168
168
  name: "Columns",
169
169
  isRSC: !0,
@@ -342,7 +342,7 @@ const U = {
342
342
  });
343
343
  }
344
344
  const n = e.get("columns");
345
- Array.isArray(n) && n.find((l) => l.get("width")) && (n.find((u) => !u.get("width")) || n.reduce((o, c) => o + c.get("width"), 0) !== 100) && t();
345
+ Array.isArray(n) && n.find((r) => r.get("width")) && (n.find((d) => !d.get("width")) || n.reduce((o, u) => o + u.get("width"), 0) !== 100) && t();
346
346
  }
347
347
  }, {
348
348
  name: "space",
@@ -370,13 +370,13 @@ const U = {
370
370
  builderComponents: !0,
371
371
  builderLinkComponent: !0
372
372
  }
373
- }, We = {
373
+ }, Ae = {
374
374
  name: "Fragment",
375
375
  static: !0,
376
376
  hidden: !0,
377
377
  canHaveChildren: !0,
378
378
  noWrap: !0
379
- }, 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"], Ae = ["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 = {
379
+ }, 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"], Be = ["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"], De = {
380
380
  name: "Image",
381
381
  static: !0,
382
382
  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",
@@ -397,11 +397,11 @@ const U = {
397
397
  onChange: (e) => {
398
398
  e.delete("srcset"), e.delete("noWebp");
399
399
  function n(a, o = 6e4) {
400
- return new Promise((c, T) => {
400
+ return new Promise((u, T) => {
401
401
  const S = document.createElement("img");
402
402
  let R = !1;
403
403
  S.onload = () => {
404
- R = !0, c(S);
404
+ R = !0, u(S);
405
405
  }, S.addEventListener("error", (k) => {
406
406
  console.warn("Image load failed", k.error), T(k.error);
407
407
  }), S.src = a, setTimeout(() => {
@@ -412,13 +412,13 @@ const U = {
412
412
  function i(a) {
413
413
  return Math.round(a * 1e3) / 1e3;
414
414
  }
415
- const l = e.get("image"), u = e.get("aspectRatio");
416
- if (fetch(l).then((a) => a.blob()).then((a) => {
415
+ const r = e.get("image"), d = e.get("aspectRatio");
416
+ if (fetch(r).then((a) => a.blob()).then((a) => {
417
417
  a.type.includes("svg") && e.set("noWebp", !0);
418
- }), l && (!u || u === 0.7041))
419
- return n(l).then((a) => {
418
+ }), r && (!d || d === 0.7041))
419
+ return n(r).then((a) => {
420
420
  const o = e.get("aspectRatio");
421
- e.get("image") === l && (!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));
421
+ e.get("image") === r && (!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));
422
422
  });
423
423
  }
424
424
  }, {
@@ -484,7 +484,7 @@ const U = {
484
484
  shouldReceiveBuilderProps: {
485
485
  builderBlock: !0
486
486
  }
487
- }, De = {
487
+ }, He = {
488
488
  name: "PersonalizationContainer",
489
489
  shouldReceiveBuilderProps: {
490
490
  builderBlock: !0,
@@ -519,7 +519,7 @@ const U = {
519
519
  defaultValue: []
520
520
  }]
521
521
  }]
522
- }, He = v(() => import("./personalization-container-bcff3433.js")), Ue = {
522
+ }, Ue = v(() => import("./personalization-container-7e63edce.js")), Le = {
523
523
  name: "Core:Section",
524
524
  static: !0,
525
525
  image: "https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2F682efef23ace49afac61748dd305c70a",
@@ -558,7 +558,7 @@ const U = {
558
558
  }
559
559
  }
560
560
  }]
561
- }, Le = {
561
+ }, Ne = {
562
562
  name: "Slot",
563
563
  isRSC: !0,
564
564
  description: "Allow child blocks to be inserted into this content when used as a Symbol",
@@ -575,7 +575,7 @@ const U = {
575
575
  builderContext: !0,
576
576
  builderComponents: !0
577
577
  }
578
- }, Ne = v(() => import("./slot-ca171e8c.js")), qe = {
578
+ }, qe = v(() => import("./slot-05ef18a0.js")), $e = {
579
579
  name: "Symbol",
580
580
  noWrap: !0,
581
581
  static: !0,
@@ -652,7 +652,7 @@ const U = {
652
652
  text: "New tab content "
653
653
  }
654
654
  }
655
- }, $e = {
655
+ }, _e = {
656
656
  name: "Builder: Tabs",
657
657
  inputs: [{
658
658
  name: "tabs",
@@ -755,7 +755,7 @@ const U = {
755
755
  builderComponents: !0,
756
756
  builderLinkComponent: !0
757
757
  }
758
- }, _e = v(() => import("./tabs-6b67fca2.js")), je = {
758
+ }, je = v(() => import("./tabs-244d53fa.js")), Ke = {
759
759
  shouldReceiveBuilderProps: {
760
760
  builderBlock: !1,
761
761
  builderContext: !0
@@ -799,7 +799,7 @@ const U = {
799
799
  helperText: "Only print and run scripts on the client. Important when scripts influence DOM that could be replaced when client loads",
800
800
  advanced: !0
801
801
  }]
802
- }, Ke = v(() => import("./custom-code-7786788e.js")), Me = {
802
+ }, Me = v(() => import("./custom-code-7786788e.js")), ze = {
803
803
  name: "Embed",
804
804
  static: !0,
805
805
  inputs: [{
@@ -814,7 +814,7 @@ const U = {
814
814
  defaultValue: '<div style="padding: 20px; text-align: center">(Choose an embed URL)<div>',
815
815
  hideFromUI: !0
816
816
  }]
817
- }, ze = v(() => import("./embed-5c1bbe12.js")), Je = {
817
+ }, Je = v(() => import("./embed-5c1bbe12.js")), Ye = {
818
818
  name: "Form:Form",
819
819
  // editableTags: ['builder-form-error']
820
820
  defaults: {
@@ -1051,7 +1051,7 @@ const U = {
1051
1051
  builderComponents: !0,
1052
1052
  builderLinkComponent: !0
1053
1053
  }
1054
- }, Ye = v(() => import("./form-d29f3cc0.js")), Ge = {
1054
+ }, Ge = v(() => import("./form-b66c20a3.js")), Qe = {
1055
1055
  name: "Form:Input",
1056
1056
  image: "https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2Fad6f37889d9e40bbbbc72cdb5875d6ca",
1057
1057
  inputs: [
@@ -1102,7 +1102,7 @@ const U = {
1102
1102
  borderStyle: "solid",
1103
1103
  borderColor: "#ccc"
1104
1104
  }
1105
- }, Qe = v(() => import("./input-083c3c35.js")), Xe = {
1105
+ }, Xe = v(() => import("./input-57c5b097.js")), Ze = {
1106
1106
  name: "Form:Select",
1107
1107
  image: "https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2F83acca093fb24aaf94dee136e9a4b045",
1108
1108
  defaultStyles: {
@@ -1144,7 +1144,7 @@ const U = {
1144
1144
  }],
1145
1145
  static: !0,
1146
1146
  noWrap: !0
1147
- }, Ze = v(() => import("./select-9f22c2ba.js")), et = {
1147
+ }, et = v(() => import("./select-3d4324ef.js")), tt = {
1148
1148
  name: "Form:SubmitButton",
1149
1149
  image: "https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2Fdf2820ffed1f4349a94c40b3221f5b98",
1150
1150
  defaultStyles: {
@@ -1169,7 +1169,7 @@ const U = {
1169
1169
  // that only shows if advanced setting is flipped
1170
1170
  // TODO: defaultChildren
1171
1171
  // canHaveChildren: true,
1172
- }, tt = v(() => import("./submit-button-b48361a7.js")), nt = {
1172
+ }, nt = v(() => import("./submit-button-b48361a7.js")), at = {
1173
1173
  name: "Form:TextArea",
1174
1174
  image: "https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2Ff74a2f3de58c4c3e939204e5b6b8f6c3",
1175
1175
  inputs: [{
@@ -1205,7 +1205,7 @@ const U = {
1205
1205
  },
1206
1206
  static: !0,
1207
1207
  noWrap: !0
1208
- }, at = v(() => import("./textarea-d29025e9.js")), it = {
1208
+ }, it = v(() => import("./textarea-d29025e9.js")), ot = {
1209
1209
  // friendlyName?
1210
1210
  name: "Raw:Img",
1211
1211
  hideFromInsertMenu: !0,
@@ -1219,7 +1219,7 @@ const U = {
1219
1219
  }],
1220
1220
  noWrap: !0,
1221
1221
  static: !0
1222
- }, ot = v(() => import("./img-fed70928.js")), rt = {
1222
+ }, rt = v(() => import("./img-c4a772a8.js")), lt = {
1223
1223
  name: "Video",
1224
1224
  canHaveChildren: !0,
1225
1225
  defaultStyles: {
@@ -1230,7 +1230,7 @@ const U = {
1230
1230
  inputs: [{
1231
1231
  name: "video",
1232
1232
  type: "file",
1233
- allowedFileTypes: Ae,
1233
+ allowedFileTypes: Be,
1234
1234
  bubble: !0,
1235
1235
  defaultValue: "https://cdn.builder.io/o/assets%2FYJIGb4i01jvw0SRdL5Bt%2Fd27731a526464deba0016216f5f9e570%2Fcompressed?apiKey=YJIGb4i01jvw0SRdL5Bt&token=d27731a526464deba0016216f5f9e570&alt=media&optimized=true",
1236
1236
  required: !0
@@ -1303,37 +1303,34 @@ const U = {
1303
1303
  shouldReceiveBuilderProps: {
1304
1304
  builderBlock: !0
1305
1305
  }
1306
- }, lt = () => [{
1307
- component: Ke,
1306
+ }, st = () => [{
1307
+ component: Me,
1308
1308
  ...Oe
1309
1309
  }, {
1310
- component: ze,
1311
- ...Me
1310
+ component: Je,
1311
+ ...ze
1312
1312
  }, {
1313
- component: Ye,
1314
- ...Je
1313
+ component: Ge,
1314
+ ...Ye
1315
1315
  }, {
1316
- component: Qe,
1317
- ...Ge
1316
+ component: Xe,
1317
+ ...Qe
1318
1318
  }, {
1319
- component: tt,
1320
- ...et
1319
+ component: nt,
1320
+ ...tt
1321
1321
  }, {
1322
- component: Ze,
1323
- ...Xe
1322
+ component: et,
1323
+ ...Ze
1324
1324
  }, {
1325
- component: at,
1326
- ...nt
1325
+ component: it,
1326
+ ...at
1327
1327
  }, {
1328
- component: ot,
1329
- ...it
1328
+ component: rt,
1329
+ ...ot
1330
1330
  }, {
1331
- component: ge,
1332
- ...rt
1333
- }], G = () => [{
1334
1331
  component: he,
1335
- ...Fe
1336
- }, {
1332
+ ...lt
1333
+ }], Q = () => [{
1337
1334
  component: be,
1338
1335
  ...Pe
1339
1336
  }, {
@@ -1341,29 +1338,32 @@ const U = {
1341
1338
  ...We
1342
1339
  }, {
1343
1340
  component: xe,
1344
- ...Be
1341
+ ...Ae
1345
1342
  }, {
1346
1343
  component: ve,
1347
- ...Ue
1344
+ ...De
1348
1345
  }, {
1349
- component: Ne,
1346
+ component: Se,
1350
1347
  ...Le
1351
1348
  }, {
1352
- component: Se,
1353
- ...qe
1349
+ component: qe,
1350
+ ...Ne
1354
1351
  }, {
1355
1352
  component: Te,
1356
- ...je
1353
+ ...$e
1357
1354
  }, {
1358
- component: He,
1359
- ...De
1355
+ component: Ie,
1356
+ ...Ke
1360
1357
  }, {
1361
- component: _e,
1362
- ...$e
1358
+ component: Ue,
1359
+ ...He
1360
+ }, {
1361
+ component: je,
1362
+ ..._e
1363
1363
  }, {
1364
- component: Ee,
1365
- ...Re
1366
- }, ...lt()], st = `function updateCookiesAndStyles(contentId, variants, isHydrationTarget) {
1364
+ component: Fe,
1365
+ ...Ee
1366
+ }, ...st()], dt = `function updateCookiesAndStyles(contentId, variants, isHydrationTarget) {
1367
1367
  function getAndSetVariantId() {
1368
1368
  function setCookie(name, value, days) {
1369
1369
  let expires = '';
@@ -1419,7 +1419,7 @@ const U = {
1419
1419
  }).join('');
1420
1420
  styleEl.innerHTML = newStyleStr;
1421
1421
  }
1422
- }`, dt = `function updateVariantVisibility(variantContentId, defaultContentId, isHydrationTarget) {
1422
+ }`, ut = `function updateVariantVisibility(variantContentId, defaultContentId, isHydrationTarget) {
1423
1423
  if (!navigator.cookieEnabled) {
1424
1424
  return;
1425
1425
  }
@@ -1453,27 +1453,27 @@ const U = {
1453
1453
  thisScriptEl?.remove();
1454
1454
  }
1455
1455
  return;
1456
- }`, ie = "builderIoAbTest", oe = "builderIoRenderContent", D = (e) => Object.values((e == null ? void 0 : e.variations) || {}).map((t) => ({
1456
+ }`, oe = "builderIoAbTest", re = "builderIoRenderContent", D = (e) => Object.values((e == null ? void 0 : e.variations) || {}).map((t) => ({
1457
1457
  ...t,
1458
1458
  testVariationId: t.id,
1459
1459
  id: e == null ? void 0 : e.id
1460
- })), ut = ({
1460
+ })), ct = ({
1461
1461
  canTrack: e,
1462
1462
  content: t
1463
- }) => !(!(D(t).length > 0) || !e || j()), ct = (e) => e === "react" || e === "reactNative", re = ct(K), mt = () => `
1464
- window.${ie} = ${st}
1463
+ }) => !(!(D(t).length > 0) || !e || j()), mt = (e) => e === "react" || e === "reactNative", le = mt(O), pt = () => `
1465
1464
  window.${oe} = ${dt}
1466
- `, pt = (e, t) => `
1467
- window.${ie}(
1468
- "${t}",${JSON.stringify(e)}, ${re}
1469
- )`, ft = ({
1465
+ window.${re} = ${ut}
1466
+ `, ft = (e, t) => `
1467
+ window.${oe}(
1468
+ "${t}",${JSON.stringify(e)}, ${le}
1469
+ )`, gt = ({
1470
1470
  contentId: e,
1471
1471
  variationId: t
1472
- }) => `window.${oe}(
1473
- "${t}", "${e}", ${re}
1472
+ }) => `window.${re}(
1473
+ "${t}", "${e}", ${le}
1474
1474
  )`;
1475
- function O(e) {
1476
- return /* @__PURE__ */ h(
1475
+ function K(e) {
1476
+ return /* @__PURE__ */ y(
1477
1477
  "script",
1478
1478
  {
1479
1479
  dangerouslySetInnerHTML: { __html: e.scriptStr },
@@ -1482,10 +1482,10 @@ function O(e) {
1482
1482
  }
1483
1483
  );
1484
1484
  }
1485
- function Q(e) {
1485
+ function X(e) {
1486
1486
  return Math.round(e * 1e3) / 1e3;
1487
1487
  }
1488
- const gt = (e, t, n = !0) => {
1488
+ const ht = (e, t, n = !0) => {
1489
1489
  if (!(e instanceof HTMLElement))
1490
1490
  return null;
1491
1491
  let i = n ? e : e.parentElement;
@@ -1496,39 +1496,39 @@ const gt = (e, t, n = !0) => {
1496
1496
  return i;
1497
1497
  } while (i = i.parentElement);
1498
1498
  return null;
1499
- }, ht = (e) => gt(e, (t) => {
1499
+ }, bt = (e) => ht(e, (t) => {
1500
1500
  const n = t.getAttribute("builder-id") || t.id;
1501
1501
  return (n == null ? void 0 : n.indexOf("builder-")) === 0;
1502
- }), X = ({
1502
+ }), Z = ({
1503
1503
  event: e,
1504
1504
  target: t
1505
1505
  }) => {
1506
- const n = t.getBoundingClientRect(), i = e.clientX - n.left, l = e.clientY - n.top, u = Q(i / n.width), a = Q(l / n.height);
1506
+ const n = t.getBoundingClientRect(), i = e.clientX - n.left, r = e.clientY - n.top, d = X(i / n.width), a = X(r / n.height);
1507
1507
  return {
1508
- x: u,
1508
+ x: d,
1509
1509
  y: a
1510
1510
  };
1511
- }, bt = (e) => {
1512
- const t = e.target, n = t && ht(t), i = (n == null ? void 0 : n.getAttribute("builder-id")) || (n == null ? void 0 : n.id);
1511
+ }, yt = (e) => {
1512
+ const t = e.target, n = t && bt(t), i = (n == null ? void 0 : n.getAttribute("builder-id")) || (n == null ? void 0 : n.id);
1513
1513
  return {
1514
1514
  targetBuilderElement: i || void 0,
1515
1515
  metadata: {
1516
- targetOffset: t ? X({
1516
+ targetOffset: t ? Z({
1517
1517
  event: e,
1518
1518
  target: t
1519
1519
  }) : void 0,
1520
- builderTargetOffset: n ? X({
1520
+ builderTargetOffset: n ? Z({
1521
1521
  event: e,
1522
1522
  target: n
1523
1523
  }) : void 0,
1524
1524
  builderElementIndex: n && i ? [].slice.call(document.getElementsByClassName(i)).indexOf(n) : void 0
1525
1525
  }
1526
1526
  };
1527
- }, yt = ["svelte", "qwik", "vue"], Z = () => yt.includes(K) && (F() || te()), xt = (e) => {
1528
- var u, a;
1529
- 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;
1530
- let l = "";
1531
- if (i && t && n && (l += `
1527
+ }, xt = ["svelte", "qwik", "vue"], ee = () => xt.includes(O) && (P() || ne()), vt = (e) => {
1528
+ var d, a;
1529
+ const t = e.family + (e.kind && !e.kind.includes("#") ? ", " + e.kind : ""), n = t.split(",")[0], i = (a = e.fileUrl) != null ? a : (d = e == null ? void 0 : e.files) == null ? void 0 : d.regular;
1530
+ let r = "";
1531
+ if (i && t && n && (r += `
1532
1532
  @font-face {
1533
1533
  font-family: "${t}";
1534
1534
  src: local("${n}"), url('${i}') format('woff2');
@@ -1540,7 +1540,7 @@ font-weight: 400;
1540
1540
  if (!(String(Number(o)) === o))
1541
1541
  continue;
1542
1542
  const T = e.files[o];
1543
- T && T !== i && (l += `
1543
+ T && T !== i && (r += `
1544
1544
  @font-face {
1545
1545
  font-family: "${t}";
1546
1546
  src: url('${T}') format('woff2');
@@ -1549,16 +1549,16 @@ font-weight: ${o};
1549
1549
  }
1550
1550
  `.trim());
1551
1551
  }
1552
- return l;
1553
- }, vt = ({
1552
+ return r;
1553
+ }, St = ({
1554
1554
  customFonts: e
1555
1555
  }) => {
1556
1556
  var t;
1557
- return ((t = e == null ? void 0 : e.map((n) => xt(n))) == null ? void 0 : t.join(" ")) || "";
1558
- }, St = ({
1557
+ return ((t = e == null ? void 0 : e.map((n) => vt(n))) == null ? void 0 : t.join(" ")) || "";
1558
+ }, Tt = ({
1559
1559
  cssCode: e,
1560
1560
  contentId: t
1561
- }) => e ? t ? (e == null ? void 0 : e.replace(/&/g, `div[builder-content-id="${t}"]`)) || "" : e : "", Tt = `
1561
+ }) => e ? t ? (e == null ? void 0 : e.replace(/&/g, `div[builder-content-id="${t}"]`)) || "" : e : "", It = `
1562
1562
  .builder-button {
1563
1563
  all: unset;
1564
1564
  }
@@ -1575,103 +1575,103 @@ font-weight: ${o};
1575
1575
  text-align: inherit;
1576
1576
  font-family: inherit;
1577
1577
  }
1578
- `, It = (e) => e ? "" : Tt, kt = (e) => `variant-${e}`;
1579
- function Ct(e) {
1580
- var g, b, C;
1578
+ `, kt = (e) => e ? "" : It, Ct = (e) => `variant-${e}`;
1579
+ function wt(e) {
1580
+ var b, x, C;
1581
1581
  const t = _(null);
1582
- function n(s) {
1583
- var m, f;
1584
- const d = {
1582
+ function n(l) {
1583
+ var p, f;
1584
+ const s = {
1585
1585
  ...e.builderContextSignal.rootState,
1586
- ...s
1586
+ ...l
1587
1587
  };
1588
- e.builderContextSignal.rootSetState ? (f = (m = e.builderContextSignal).rootSetState) == null || f.call(m, d) : e.setBuilderContextSignal((r) => ({
1589
- ...r,
1590
- rootState: d
1588
+ e.builderContextSignal.rootSetState ? (f = (p = e.builderContextSignal).rootSetState) == null || f.call(p, s) : e.setBuilderContextSignal((c) => ({
1589
+ ...c,
1590
+ rootState: s
1591
1591
  }));
1592
1592
  }
1593
- function i(s) {
1594
- var m, f, r, p, y;
1595
- const d = {
1593
+ function i(l) {
1594
+ var p, f, c, m, g;
1595
+ const s = {
1596
1596
  ...e.builderContextSignal.content,
1597
- ...s,
1597
+ ...l,
1598
1598
  data: {
1599
- ...(m = e.builderContextSignal.content) == null ? void 0 : m.data,
1600
- ...s == null ? void 0 : s.data
1599
+ ...(p = e.builderContextSignal.content) == null ? void 0 : p.data,
1600
+ ...l == null ? void 0 : l.data
1601
1601
  },
1602
1602
  meta: {
1603
1603
  ...(f = e.builderContextSignal.content) == null ? void 0 : f.meta,
1604
- ...s == null ? void 0 : s.meta,
1605
- breakpoints: ((r = s == null ? void 0 : s.meta) == null ? void 0 : r.breakpoints) || ((y = (p = e.builderContextSignal.content) == null ? void 0 : p.meta) == null ? void 0 : y.breakpoints)
1604
+ ...l == null ? void 0 : l.meta,
1605
+ breakpoints: ((c = l == null ? void 0 : l.meta) == null ? void 0 : c.breakpoints) || ((g = (m = e.builderContextSignal.content) == null ? void 0 : m.meta) == null ? void 0 : g.breakpoints)
1606
1606
  }
1607
1607
  };
1608
- e.setBuilderContextSignal((x) => ({
1609
- ...x,
1610
- content: d
1608
+ e.setBuilderContextSignal((h) => ({
1609
+ ...h,
1610
+ content: s
1611
1611
  }));
1612
1612
  }
1613
- function l() {
1613
+ function r() {
1614
1614
  return e.showContent ? {} : {
1615
1615
  hidden: !0,
1616
1616
  "aria-hidden": !0
1617
1617
  };
1618
1618
  }
1619
- const [u, a] = I(
1619
+ const [d, a] = I(
1620
1620
  () => e.contentWrapper || "div"
1621
1621
  );
1622
- function o(s) {
1623
- return ce({
1622
+ function o(l) {
1623
+ return me({
1624
1624
  model: e.model,
1625
1625
  trustedHosts: e.trustedHosts,
1626
1626
  callbacks: {
1627
- configureSdk: (d) => {
1628
- var r;
1629
- const { breakpoints: m, contentId: f } = d;
1630
- !f || f !== ((r = e.builderContextSignal.content) == null ? void 0 : r.id) || m && i({
1627
+ configureSdk: (s) => {
1628
+ var c;
1629
+ const { breakpoints: p, contentId: f } = s;
1630
+ !f || f !== ((c = e.builderContextSignal.content) == null ? void 0 : c.id) || p && i({
1631
1631
  meta: {
1632
- breakpoints: m
1632
+ breakpoints: p
1633
1633
  }
1634
1634
  });
1635
1635
  },
1636
- animation: (d) => {
1637
- ke(d);
1636
+ animation: (s) => {
1637
+ Ce(s);
1638
1638
  },
1639
- contentUpdate: (d) => {
1640
- i(d);
1639
+ contentUpdate: (s) => {
1640
+ i(s);
1641
1641
  }
1642
1642
  }
1643
- })(s);
1643
+ })(l);
1644
1644
  }
1645
- const [c, T] = I(() => ({})), [S, R] = I(() => ({})), [k, P] = I(() => !1);
1646
- function W(s) {
1647
- var d, m;
1645
+ const [u, T] = I(() => ({})), [S, R] = I(() => ({})), [k, W] = I(() => !1);
1646
+ function A(l) {
1647
+ var s, p;
1648
1648
  if (e.builderContextSignal.content) {
1649
- const f = (d = e.builderContextSignal.content) == null ? void 0 : d.testVariationId, r = (m = e.builderContextSignal.content) == null ? void 0 : m.id;
1650
- J({
1649
+ const f = (s = e.builderContextSignal.content) == null ? void 0 : s.testVariationId, c = (p = e.builderContextSignal.content) == null ? void 0 : p.id;
1650
+ Y({
1651
1651
  apiHost: e.apiHost,
1652
1652
  type: "click",
1653
1653
  canTrack: H(e.canTrack),
1654
- contentId: r,
1654
+ contentId: c,
1655
1655
  apiKey: e.apiKey,
1656
- variationId: f !== r ? f : void 0,
1657
- ...bt(s),
1656
+ variationId: f !== c ? f : void 0,
1657
+ ...yt(l),
1658
1658
  unique: !k
1659
1659
  });
1660
1660
  }
1661
- k || P(!0);
1661
+ k || W(!0);
1662
1662
  }
1663
- function A() {
1664
- var d, m, f;
1665
- const s = (f = (m = (d = e.builderContextSignal.content) == null ? void 0 : d.data) == null ? void 0 : m.httpRequests) != null ? f : {};
1666
- Object.entries(s).forEach(([r, p]) => {
1667
- if (!p || S[r] || c[r] && !F())
1663
+ function B() {
1664
+ var s, p, f;
1665
+ const l = (f = (p = (s = e.builderContextSignal.content) == null ? void 0 : s.data) == null ? void 0 : p.httpRequests) != null ? f : {};
1666
+ Object.entries(l).forEach(([c, m]) => {
1667
+ if (!m || S[c] || u[c] && !P())
1668
1668
  return;
1669
- S[r] = !0;
1670
- const y = p.replace(
1669
+ S[c] = !0;
1670
+ const g = m.replace(
1671
1671
  /{{([^}]+)}}/g,
1672
- (x, B) => String(
1673
- ne({
1674
- code: B,
1672
+ (h, F) => String(
1673
+ ae({
1674
+ code: F,
1675
1675
  context: e.context || {},
1676
1676
  localState: void 0,
1677
1677
  rootState: e.builderContextSignal.rootState,
@@ -1679,24 +1679,24 @@ function Ct(e) {
1679
1679
  })
1680
1680
  )
1681
1681
  );
1682
- me(y), fetch(y).then((x) => x.json()).then((x) => {
1682
+ pe(g), fetch(g).then((h) => h.json()).then((h) => {
1683
1683
  n({
1684
- [r]: x
1685
- }), c[r] = !0;
1686
- }).catch((x) => {
1687
- console.error("error fetching dynamic data", p, x);
1684
+ [c]: h
1685
+ }), u[c] = !0;
1686
+ }).catch((h) => {
1687
+ console.error("error fetching dynamic data", m, h);
1688
1688
  }).finally(() => {
1689
- S[r] = !1;
1689
+ S[c] = !1;
1690
1690
  });
1691
1691
  });
1692
1692
  }
1693
1693
  function w() {
1694
- F() && window.dispatchEvent(
1694
+ P() && window.dispatchEvent(
1695
1695
  new CustomEvent(
1696
1696
  "builder:component:stateChange",
1697
1697
  {
1698
1698
  detail: {
1699
- state: Ce(e.builderContextSignal.rootState),
1699
+ state: we(e.builderContextSignal.rootState),
1700
1700
  ref: {
1701
1701
  name: e.model
1702
1702
  }
@@ -1706,10 +1706,10 @@ function Ct(e) {
1706
1706
  );
1707
1707
  }
1708
1708
  const E = _(!1);
1709
- return E.current || (A(), w(), E.current = !0), V(() => {
1710
- var s, d, m;
1709
+ return E.current || (B(), w(), E.current = !0), V(() => {
1710
+ var l, s, p, f;
1711
1711
  if (j()) {
1712
- if (F() && !e.isNestedRender && (window.addEventListener("message", o), le(), se({
1712
+ if (P() && !e.isNestedRender && (window.addEventListener("message", o), se(), de({
1713
1713
  ...e.locale ? {
1714
1714
  locale: e.locale
1715
1715
  } : {},
@@ -1718,44 +1718,46 @@ function Ct(e) {
1718
1718
  } : {},
1719
1719
  ...e.trustedHosts ? {
1720
1720
  trustedHosts: e.trustedHosts
1721
- } : {}
1721
+ } : {},
1722
+ modelName: (l = e.model) != null ? l : "",
1723
+ apiKey: e.apiKey
1722
1724
  }), Object.values(
1723
1725
  e.builderContextSignal.componentInfos
1724
- ).forEach((r) => {
1725
- var p, y;
1726
- if (!e.model || !((p = r.models) != null && p.length) || r.models.includes(e.model)) {
1727
- const x = de(r);
1728
- (y = window.parent) == null || y.postMessage(x, "*");
1726
+ ).forEach((m) => {
1727
+ var g, h;
1728
+ if (!((g = m.models) != null && g.length) || m.models.includes(e.model)) {
1729
+ const F = ue(m);
1730
+ (h = window.parent) == null || h.postMessage(F, "*");
1729
1731
  }
1730
1732
  }), window.addEventListener(
1731
1733
  "builder:component:stateChangeListenerActivated",
1732
1734
  w
1733
1735
  )), e.builderContextSignal.content && H(e.canTrack)) {
1734
- const r = (s = e.builderContextSignal.content) == null ? void 0 : s.testVariationId, p = (d = e.builderContextSignal.content) == null ? void 0 : d.id, y = e.apiKey;
1735
- J({
1736
+ const m = (s = e.builderContextSignal.content) == null ? void 0 : s.testVariationId, g = (p = e.builderContextSignal.content) == null ? void 0 : p.id, h = e.apiKey;
1737
+ Y({
1736
1738
  apiHost: e.apiHost,
1737
1739
  type: "impression",
1738
1740
  canTrack: !0,
1739
- contentId: p,
1740
- apiKey: y,
1741
- variationId: r !== p ? r : void 0
1741
+ contentId: g,
1742
+ apiKey: h,
1743
+ variationId: m !== g ? m : void 0
1742
1744
  });
1743
1745
  }
1744
- if (te() && !F()) {
1745
- const r = new URL(location.href).searchParams, p = r.get("builder.preview"), y = r.get(
1746
- `builder.overrides.${p}`
1747
- ), x = r.get("apiKey") || r.get("builder.space");
1748
- (p === "BUILDER_STUDIO" || p === e.model && x === e.apiKey && (!e.content || y === e.content.id)) && ue({
1749
- model: e.model || "",
1746
+ if (ne() && !P()) {
1747
+ const m = new URL(location.href).searchParams, g = m.get("builder.preview"), h = m.get(
1748
+ `builder.overrides.${g}`
1749
+ ), F = m.get("apiKey") || m.get("builder.space");
1750
+ (g === "BUILDER_STUDIO" || g === e.model && F === e.apiKey && (!e.content || h === e.content.id)) && ce({
1751
+ model: e.model,
1750
1752
  apiKey: e.apiKey,
1751
1753
  apiVersion: e.builderContextSignal.apiVersion,
1752
- ...p === "BUILDER_STUDIO" && ((m = e.context) != null && m.symbolId) ? {
1754
+ ...g === "BUILDER_STUDIO" && ((f = e.context) != null && f.symbolId) ? {
1753
1755
  query: {
1754
1756
  id: e.context.symbolId
1755
1757
  }
1756
1758
  } : {}
1757
- }).then((B) => {
1758
- B && i(B);
1759
+ }).then((z) => {
1760
+ z && i(z);
1759
1761
  });
1760
1762
  }
1761
1763
  }
@@ -1774,40 +1776,40 @@ function Ct(e) {
1774
1776
  "builder:component:stateChangeListenerActivated",
1775
1777
  w
1776
1778
  ));
1777
- }, []), /* @__PURE__ */ h(Ie.Provider, { value: e.builderContextSignal, children: e.builderContextSignal.content || Z() ? /* @__PURE__ */ h(
1778
- u,
1779
+ }, []), /* @__PURE__ */ y(ke.Provider, { value: e.builderContextSignal, children: e.builderContextSignal.content || ee() ? /* @__PURE__ */ y(
1780
+ d,
1779
1781
  {
1780
1782
  ref: t,
1781
- onClick: (s) => W(s),
1782
- "builder-content-id": (g = e.builderContextSignal.content) == null ? void 0 : g.id,
1783
+ onClick: (l) => A(l),
1784
+ "builder-content-id": (b = e.builderContextSignal.content) == null ? void 0 : b.id,
1783
1785
  "builder-model": e.model,
1784
- className: kt(
1785
- ((b = e.content) == null ? void 0 : b.testVariationId) || ((C = e.content) == null ? void 0 : C.id)
1786
+ className: Ct(
1787
+ ((x = e.content) == null ? void 0 : x.testVariationId) || ((C = e.content) == null ? void 0 : C.id)
1786
1788
  ),
1787
1789
  style: {
1788
- display: !e.builderContextSignal.content && Z() ? "none" : void 0
1790
+ display: !e.builderContextSignal.content && ee() ? "none" : void 0
1789
1791
  },
1790
- ...l(),
1792
+ ...r(),
1791
1793
  ...e.contentWrapperProps,
1792
1794
  children: e.children
1793
1795
  }
1794
1796
  ) : null });
1795
1797
  }
1796
- function wt(e) {
1798
+ function Vt(e) {
1797
1799
  const [t, n] = I(
1798
1800
  () => `
1799
- ${St({
1801
+ ${Tt({
1800
1802
  cssCode: e.cssCode,
1801
1803
  contentId: e.contentId
1802
1804
  })}
1803
- ${vt({
1805
+ ${St({
1804
1806
  customFonts: e.customFonts
1805
1807
  })}
1806
- ${It(e.isNestedRender)}
1808
+ ${kt(e.isNestedRender)}
1807
1809
  `.trim()
1808
1810
  );
1809
- return /* @__PURE__ */ h(
1810
- ae,
1811
+ return /* @__PURE__ */ y(
1812
+ ie,
1811
1813
  {
1812
1814
  id: "builderio-content",
1813
1815
  styles: t,
@@ -1815,24 +1817,24 @@ ${It(e.isNestedRender)}
1815
1817
  }
1816
1818
  );
1817
1819
  }
1818
- const Vt = ({
1820
+ const Rt = ({
1819
1821
  content: e,
1820
1822
  data: t,
1821
1823
  locale: n
1822
1824
  }) => {
1823
- var u, a, o;
1824
- const i = {}, l = ((u = e == null ? void 0 : e.data) == null ? void 0 : u.state) || {};
1825
- return (o = (a = e == null ? void 0 : e.data) == null ? void 0 : a.inputs) == null || o.forEach((c) => {
1826
- c.name && c.defaultValue !== void 0 && (i[c.name] = c.defaultValue);
1825
+ var d, a, o;
1826
+ const i = {}, r = ((d = e == null ? void 0 : e.data) == null ? void 0 : d.state) || {};
1827
+ return (o = (a = e == null ? void 0 : e.data) == null ? void 0 : a.inputs) == null || o.forEach((u) => {
1828
+ u.name && u.defaultValue !== void 0 && (i[u.name] = u.defaultValue);
1827
1829
  }), {
1828
1830
  ...i,
1829
- ...l,
1831
+ ...r,
1830
1832
  ...t,
1831
1833
  ...n ? {
1832
1834
  locale: n
1833
1835
  } : {}
1834
1836
  };
1835
- }, Rt = ({
1837
+ }, Et = ({
1836
1838
  content: e,
1837
1839
  data: t
1838
1840
  }) => e ? {
@@ -1843,46 +1845,46 @@ const Vt = ({
1843
1845
  },
1844
1846
  meta: e == null ? void 0 : e.meta
1845
1847
  } : void 0;
1846
- function ee(e) {
1847
- var T, S, R, k, P, W, A, w, E;
1848
+ function te(e) {
1849
+ var T, S, R, k, W, A, B, w, E;
1848
1850
  const [t, n] = I(
1849
1851
  () => {
1850
- var g, b;
1851
- return ft({
1852
+ var b, x;
1853
+ return gt({
1852
1854
  // eslint-disable-next-line @typescript-eslint/no-non-null-assertion, @typescript-eslint/no-non-null-asserted-optional-chain
1853
- variationId: (g = e.content) == null ? void 0 : g.testVariationId,
1855
+ variationId: (b = e.content) == null ? void 0 : b.testVariationId,
1854
1856
  // eslint-disable-next-line @typescript-eslint/no-non-null-assertion, @typescript-eslint/no-non-null-asserted-optional-chain
1855
- contentId: (b = e.content) == null ? void 0 : b.id
1857
+ contentId: (x = e.content) == null ? void 0 : x.id
1856
1858
  });
1857
1859
  }
1858
1860
  );
1859
- function i(g) {
1860
- o((b) => ({
1861
- ...b,
1862
- rootState: g
1861
+ function i(b) {
1862
+ o((x) => ({
1863
+ ...x,
1864
+ rootState: b
1863
1865
  }));
1864
1866
  }
1865
- const [l, u] = I(
1867
+ const [r, d] = I(
1866
1868
  () => [
1867
- ...G(),
1869
+ ...Q(),
1868
1870
  ...e.customComponents || []
1869
1871
  ].reduce(
1870
- (g, { component: b, ...C }) => ({
1871
- ...g,
1872
+ (b, { component: x, ...C }) => ({
1873
+ ...b,
1872
1874
  [C.name]: {
1873
- component: b,
1874
- ...Y(C)
1875
+ component: x,
1876
+ ...G(C)
1875
1877
  }
1876
1878
  }),
1877
1879
  {}
1878
1880
  )
1879
1881
  ), [a, o] = I(() => ({
1880
- content: Rt({
1882
+ content: Et({
1881
1883
  content: e.content,
1882
1884
  data: e.data
1883
1885
  }),
1884
1886
  localState: void 0,
1885
- rootState: Vt({
1887
+ rootState: Rt({
1886
1888
  content: e.content,
1887
1889
  data: e.data,
1888
1890
  locale: e.locale
@@ -1893,12 +1895,12 @@ function ee(e) {
1893
1895
  apiKey: e.apiKey,
1894
1896
  apiVersion: e.apiVersion,
1895
1897
  componentInfos: [
1896
- ...G(),
1898
+ ...Q(),
1897
1899
  ...e.customComponents || []
1898
1900
  ].reduce(
1899
- (g, { component: b, ...C }) => ({
1900
- ...g,
1901
- [C.name]: Y(C)
1901
+ (b, { component: x, ...C }) => ({
1902
+ ...b,
1903
+ [C.name]: G(C)
1902
1904
  }),
1903
1905
  {}
1904
1906
  ),
@@ -1906,32 +1908,32 @@ function ee(e) {
1906
1908
  BlocksWrapper: e.blocksWrapper || "div",
1907
1909
  BlocksWrapperProps: e.blocksWrapperProps || {},
1908
1910
  nonce: e.nonce || "",
1909
- model: e.model || ""
1910
- })), c = _(!1);
1911
- if (!c.current) {
1912
- e.apiKey || pe.error(
1911
+ model: e.model
1912
+ })), u = _(!1);
1913
+ if (!u.current) {
1914
+ e.apiKey || fe.error(
1913
1915
  "No API key provided to `Content` component. This can cause issues. Please provide an API key using the `apiKey` prop."
1914
1916
  );
1915
- const g = (S = (T = a.content) == null ? void 0 : T.data) == null ? void 0 : S.jsCode;
1916
- g && ne({
1917
- code: g,
1917
+ const b = (S = (T = a.content) == null ? void 0 : T.data) == null ? void 0 : S.jsCode;
1918
+ b && ae({
1919
+ code: b,
1918
1920
  context: e.context || {},
1919
1921
  localState: void 0,
1920
1922
  rootState: a.rootState,
1921
- rootSetState: (b) => {
1922
- Object.assign(a.rootState, b);
1923
+ rootSetState: (x) => {
1924
+ Object.assign(a.rootState, x);
1923
1925
  },
1924
1926
  isExpression: !1
1925
- }), c.current = !0;
1927
+ }), u.current = !0;
1926
1928
  }
1927
- return /* @__PURE__ */ h(
1928
- we.Provider,
1929
+ return /* @__PURE__ */ y(
1930
+ Ve.Provider,
1929
1931
  {
1930
1932
  value: {
1931
- registeredComponents: l
1933
+ registeredComponents: r
1932
1934
  },
1933
1935
  children: /* @__PURE__ */ $(
1934
- Ct,
1936
+ wt,
1935
1937
  {
1936
1938
  apiHost: e.apiHost,
1937
1939
  nonce: e.nonce,
@@ -1951,30 +1953,30 @@ function ee(e) {
1951
1953
  isNestedRender: e.isNestedRender,
1952
1954
  setBuilderContextSignal: o,
1953
1955
  children: [
1954
- e.isSsrAbTest ? /* @__PURE__ */ h(
1955
- O,
1956
+ e.isSsrAbTest ? /* @__PURE__ */ y(
1957
+ K,
1956
1958
  {
1957
1959
  id: "builderio-variant-visibility",
1958
1960
  scriptStr: t,
1959
1961
  nonce: e.nonce || ""
1960
1962
  }
1961
1963
  ) : null,
1962
- /* @__PURE__ */ h(
1963
- wt,
1964
+ /* @__PURE__ */ y(
1965
+ Vt,
1964
1966
  {
1965
1967
  nonce: e.nonce || "",
1966
1968
  isNestedRender: e.isNestedRender,
1967
1969
  contentId: (R = a.content) == null ? void 0 : R.id,
1968
- cssCode: (P = (k = a.content) == null ? void 0 : k.data) == null ? void 0 : P.cssCode,
1969
- customFonts: (A = (W = a.content) == null ? void 0 : W.data) == null ? void 0 : A.customFonts
1970
+ cssCode: (W = (k = a.content) == null ? void 0 : k.data) == null ? void 0 : W.cssCode,
1971
+ customFonts: (B = (A = a.content) == null ? void 0 : A.data) == null ? void 0 : B.customFonts
1970
1972
  }
1971
1973
  ),
1972
- /* @__PURE__ */ h(
1973
- Ve,
1974
+ /* @__PURE__ */ y(
1975
+ Re,
1974
1976
  {
1975
1977
  blocks: (E = (w = a.content) == null ? void 0 : w.data) == null ? void 0 : E.blocks,
1976
1978
  context: a,
1977
- registeredComponents: l,
1979
+ registeredComponents: r,
1978
1980
  linkComponent: e.linkComponent
1979
1981
  }
1980
1982
  )
@@ -1984,66 +1986,66 @@ function ee(e) {
1984
1986
  }
1985
1987
  );
1986
1988
  }
1987
- function Et(e) {
1989
+ function Ft(e) {
1988
1990
  var a;
1989
1991
  const [t, n] = I(
1990
- () => ut({
1992
+ () => ct({
1991
1993
  canTrack: H(e.canTrack),
1992
1994
  content: e.content
1993
1995
  })
1994
1996
  );
1995
1997
  function i() {
1996
1998
  var o;
1997
- return pt(
1998
- D(e.content).map((c) => ({
1999
- id: c.testVariationId,
2000
- testRatio: c.testRatio
1999
+ return ft(
2000
+ D(e.content).map((u) => ({
2001
+ id: u.testVariationId,
2002
+ testRatio: u.testRatio
2001
2003
  })),
2002
2004
  ((o = e.content) == null ? void 0 : o.id) || ""
2003
2005
  );
2004
2006
  }
2005
- function l() {
2007
+ function r() {
2006
2008
  return D(e.content).map((o) => `.variant-${o.testVariationId} { display: none; } `).join("");
2007
2009
  }
2008
- function u() {
2010
+ function d() {
2009
2011
  var o;
2010
2012
  return t ? {
2011
2013
  ...e.content,
2012
2014
  testVariationId: (o = e.content) == null ? void 0 : o.id
2013
- } : fe({
2015
+ } : ge({
2014
2016
  item: e.content,
2015
2017
  canTrack: H(e.canTrack)
2016
2018
  });
2017
2019
  }
2018
2020
  return V(() => {
2019
- }, []), /* @__PURE__ */ $(z, { children: [
2020
- !e.isNestedRender && K !== "reactNative" ? /* @__PURE__ */ h(
2021
- O,
2021
+ }, []), /* @__PURE__ */ $(J, { children: [
2022
+ !e.isNestedRender && O !== "reactNative" ? /* @__PURE__ */ y(
2023
+ K,
2022
2024
  {
2023
2025
  id: "builderio-init-variants-fns",
2024
- scriptStr: mt(),
2026
+ scriptStr: pt(),
2025
2027
  nonce: e.nonce || ""
2026
2028
  }
2027
2029
  ) : null,
2028
- t ? /* @__PURE__ */ $(z, { children: [
2029
- /* @__PURE__ */ h(
2030
- ae,
2030
+ t ? /* @__PURE__ */ $(J, { children: [
2031
+ /* @__PURE__ */ y(
2032
+ ie,
2031
2033
  {
2032
2034
  id: "builderio-variants",
2033
- styles: l(),
2035
+ styles: r(),
2034
2036
  nonce: e.nonce || ""
2035
2037
  }
2036
2038
  ),
2037
- /* @__PURE__ */ h(
2038
- O,
2039
+ /* @__PURE__ */ y(
2040
+ K,
2039
2041
  {
2040
2042
  id: "builderio-variants-visibility",
2041
2043
  scriptStr: i(),
2042
2044
  nonce: e.nonce || ""
2043
2045
  }
2044
2046
  ),
2045
- (a = D(e.content)) == null ? void 0 : a.map((o) => /* @__PURE__ */ h(
2046
- ee,
2047
+ (a = D(e.content)) == null ? void 0 : a.map((o) => /* @__PURE__ */ y(
2048
+ te,
2047
2049
  {
2048
2050
  apiHost: e.apiHost,
2049
2051
  isNestedRender: e.isNestedRender,
@@ -2070,13 +2072,13 @@ function Et(e) {
2070
2072
  o.testVariationId
2071
2073
  ))
2072
2074
  ] }) : null,
2073
- /* @__PURE__ */ h(
2074
- ee,
2075
+ /* @__PURE__ */ y(
2076
+ te,
2075
2077
  {
2076
2078
  apiHost: e.apiHost,
2077
2079
  nonce: e.nonce,
2078
2080
  isNestedRender: e.isNestedRender,
2079
- content: u(),
2081
+ content: d(),
2080
2082
  showContent: !0,
2081
2083
  model: e.model,
2082
2084
  data: e.data,
@@ -2098,11 +2100,11 @@ function Et(e) {
2098
2100
  )
2099
2101
  ] });
2100
2102
  }
2101
- const Dt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
2103
+ const Ht = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
2102
2104
  __proto__: null,
2103
- default: Et
2105
+ default: Ft
2104
2106
  }, Symbol.toStringTag, { value: "Module" }));
2105
2107
  export {
2106
- O as InlinedScript,
2107
- Dt as contentVariants
2108
+ K as InlinedScript,
2109
+ Ht as contentVariants
2108
2110
  };