@builder.io/sdk-solid 3.0.5 → 3.0.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/edge/dev.js CHANGED
@@ -4120,8 +4120,13 @@ var provideBuilderContext = (block, context) => {
4120
4120
 
4121
4121
  // src/constants/device-sizes.ts
4122
4122
  var SIZES = {
4123
+ xsmall: {
4124
+ min: 0,
4125
+ default: 160,
4126
+ max: 320
4127
+ },
4123
4128
  small: {
4124
- min: 320,
4129
+ min: 321,
4125
4130
  default: 321,
4126
4131
  max: 640
4127
4132
  },
@@ -4137,15 +4142,28 @@ var SIZES = {
4137
4142
  }
4138
4143
  };
4139
4144
  var getMaxWidthQueryForSize = (size, sizeValues = SIZES) => `@media (max-width: ${sizeValues[size].max}px)`;
4140
- var getSizesForBreakpoints = ({
4141
- small,
4142
- medium
4143
- }) => {
4145
+ var getSizesForBreakpoints = (breakpoints) => {
4144
4146
  const newSizes = fastClone(SIZES);
4147
+ if (!breakpoints) {
4148
+ return newSizes;
4149
+ }
4150
+ const {
4151
+ xsmall,
4152
+ small,
4153
+ medium
4154
+ } = breakpoints;
4155
+ if (xsmall) {
4156
+ const xsmallMin = Math.floor(xsmall / 2);
4157
+ newSizes.xsmall = {
4158
+ max: xsmall,
4159
+ min: xsmallMin,
4160
+ default: xsmallMin + 1
4161
+ };
4162
+ }
4145
4163
  if (!small || !medium) {
4146
4164
  return newSizes;
4147
4165
  }
4148
- const smallMin = Math.floor(small / 2);
4166
+ const smallMin = xsmall ? newSizes.xsmall.max + 1 : Math.floor(small / 2);
4149
4167
  newSizes.small = {
4150
4168
  max: small,
4151
4169
  min: smallMin,
@@ -4203,9 +4221,11 @@ function BlockStyles(props) {
4203
4221
  const styles = processedBlock.responsiveStyles;
4204
4222
  const content = props.context.content;
4205
4223
  const sizesWithUpdatedBreakpoints = getSizesForBreakpoints(content?.meta?.breakpoints || {});
4224
+ const contentHasXSmallBreakpoint = Boolean(content?.meta?.breakpoints?.xsmall);
4206
4225
  const largeStyles = styles?.large;
4207
4226
  const mediumStyles = styles?.medium;
4208
4227
  const smallStyles = styles?.small;
4228
+ const xsmallStyles = styles?.xsmall;
4209
4229
  const className = processedBlock.id;
4210
4230
  if (!className) {
4211
4231
  return "";
@@ -4224,6 +4244,11 @@ function BlockStyles(props) {
4224
4244
  styles: smallStyles,
4225
4245
  mediaQuery: getMaxWidthQueryForSize("small", sizesWithUpdatedBreakpoints)
4226
4246
  }) : "";
4247
+ const xsmallStylesClass = xsmallStyles && contentHasXSmallBreakpoint ? createCssClass({
4248
+ className,
4249
+ styles: xsmallStyles,
4250
+ mediaQuery: getMaxWidthQueryForSize("xsmall", sizesWithUpdatedBreakpoints)
4251
+ }) : "";
4227
4252
  const hoverAnimation = processedBlock.animations && processedBlock.animations.find((item) => item.trigger === "hover");
4228
4253
  let hoverStylesClass = "";
4229
4254
  if (hoverAnimation) {
@@ -4237,7 +4262,7 @@ function BlockStyles(props) {
4237
4262
  }
4238
4263
  }) || "";
4239
4264
  }
4240
- return [largeStylesClass, mediumStylesClass, smallStylesClass, hoverStylesClass].join(" ");
4265
+ return [largeStylesClass, mediumStylesClass, smallStylesClass, xsmallStylesClass, hoverStylesClass].join(" ");
4241
4266
  });
4242
4267
  return createComponent(Show, {
4243
4268
  get when() {
@@ -4797,7 +4822,7 @@ function Block(props) {
4797
4822
  });
4798
4823
  }
4799
4824
  var block_default = Block;
4800
- var _tmpl$2 = /* @__PURE__ */ template(`<style>.dynamic-3c4beb0c {
4825
+ var _tmpl$2 = /* @__PURE__ */ template(`<style>.dynamic-3d7ff108 {
4801
4826
  display: flex;
4802
4827
  flex-direction: column;
4803
4828
  align-items: stretch;
@@ -4810,8 +4835,9 @@ function BlocksWrapper(props) {
4810
4835
  if (!props.path) {
4811
4836
  return void 0;
4812
4837
  }
4838
+ const thisPrefix = "this.";
4813
4839
  const pathPrefix = "component.options.";
4814
- return props.path.startsWith(pathPrefix) ? props.path : `${pathPrefix}${props.path || ""}`;
4840
+ return props.path.startsWith(thisPrefix) ? props.path.replace(thisPrefix, "") : props.path.startsWith(pathPrefix) ? props.path : `${pathPrefix}${props.path || ""}`;
4815
4841
  });
4816
4842
  function onClick() {
4817
4843
  if (isEditing() && !props.blocks?.length) {
@@ -4840,7 +4866,7 @@ function BlocksWrapper(props) {
4840
4866
  });
4841
4867
  return [createComponent(Dynamic, mergeProps({
4842
4868
  get ["class"]() {
4843
- return className() + " dynamic-3c4beb0c";
4869
+ return className() + " dynamic-3d7ff108";
4844
4870
  },
4845
4871
  ref(r$) {
4846
4872
  const _ref$ = blocksWrapperRef;
@@ -5534,8 +5560,58 @@ var handleABTesting = async ({
5534
5560
  };
5535
5561
  };
5536
5562
 
5563
+ // src/helpers/user-attributes.ts
5564
+ var USER_ATTRIBUTES_COOKIE_NAME = "builder.userAttributes";
5565
+ function createUserAttributesService() {
5566
+ let canTrack = true;
5567
+ const subscribers = /* @__PURE__ */ new Set();
5568
+ return {
5569
+ setUserAttributes(newAttrs) {
5570
+ if (!isBrowser()) {
5571
+ return;
5572
+ }
5573
+ const userAttributes = {
5574
+ ...this.getUserAttributes(),
5575
+ ...newAttrs
5576
+ };
5577
+ setCookie({
5578
+ name: USER_ATTRIBUTES_COOKIE_NAME,
5579
+ value: JSON.stringify(userAttributes),
5580
+ canTrack
5581
+ });
5582
+ subscribers.forEach((callback) => callback(userAttributes));
5583
+ },
5584
+ getUserAttributes() {
5585
+ if (!isBrowser()) {
5586
+ return {};
5587
+ }
5588
+ return JSON.parse(getCookieSync({
5589
+ name: USER_ATTRIBUTES_COOKIE_NAME,
5590
+ canTrack
5591
+ }) || "{}");
5592
+ },
5593
+ subscribeOnUserAttributesChange(callback) {
5594
+ subscribers.add(callback);
5595
+ return () => {
5596
+ subscribers.delete(callback);
5597
+ };
5598
+ },
5599
+ setCanTrack(value) {
5600
+ canTrack = value;
5601
+ }
5602
+ };
5603
+ }
5604
+ var userAttributesService = createUserAttributesService();
5605
+ var setClientUserAttributes = (attributes) => {
5606
+ userAttributesService.setUserAttributes(attributes);
5607
+ };
5608
+
5537
5609
  // src/helpers/canTrack.ts
5538
- var getDefaultCanTrack = (canTrack) => checkIsDefined(canTrack) ? canTrack : true;
5610
+ var getDefaultCanTrack = (canTrack) => {
5611
+ const result = checkIsDefined(canTrack) ? canTrack : true;
5612
+ userAttributesService.setCanTrack(result);
5613
+ return result;
5614
+ };
5539
5615
 
5540
5616
  // src/blocks/accordion/component-info.ts
5541
5617
  var defaultTitle = {
@@ -6266,8 +6342,408 @@ var componentInfo5 = {
6266
6342
  }
6267
6343
  };
6268
6344
 
6269
- // src/blocks/section/component-info.ts
6345
+ // src/blocks/personalization-container/component-info.ts
6270
6346
  var componentInfo6 = {
6347
+ name: "PersonalizationContainer",
6348
+ shouldReceiveBuilderProps: {
6349
+ builderBlock: true,
6350
+ builderContext: true
6351
+ },
6352
+ noWrap: true,
6353
+ image: "https://cdn.builder.io/api/v1/image/assets%2FYJIGb4i01jvw0SRdL5Bt%2F37229ed30d8c41dfb10b8cca1992053a",
6354
+ canHaveChildren: true,
6355
+ inputs: [{
6356
+ name: "variants",
6357
+ defaultValue: [],
6358
+ behavior: "personalizationVariantList",
6359
+ type: "list",
6360
+ subFields: [{
6361
+ name: "name",
6362
+ type: "text"
6363
+ }, {
6364
+ name: "query",
6365
+ friendlyName: "Targeting rules",
6366
+ type: "BuilderQuery",
6367
+ defaultValue: []
6368
+ }, {
6369
+ name: "startDate",
6370
+ type: "date"
6371
+ }, {
6372
+ name: "endDate",
6373
+ type: "date"
6374
+ }, {
6375
+ name: "blocks",
6376
+ type: "uiBlocks",
6377
+ hideFromUI: true,
6378
+ defaultValue: []
6379
+ }]
6380
+ }]
6381
+ };
6382
+ var _tmpl$8 = /* @__PURE__ */ template(`<script>`);
6383
+ function InlinedScript(props) {
6384
+ return (() => {
6385
+ const _el$ = _tmpl$8();
6386
+ effect((_p$) => {
6387
+ const _v$ = props.scriptStr, _v$2 = props.id, _v$3 = props.nonce || "";
6388
+ _v$ !== _p$._v$ && (_el$.innerHTML = _p$._v$ = _v$);
6389
+ _v$2 !== _p$._v$2 && setAttribute(_el$, "data-id", _p$._v$2 = _v$2);
6390
+ _v$3 !== _p$._v$3 && setAttribute(_el$, "nonce", _p$._v$3 = _v$3);
6391
+ return _p$;
6392
+ }, {
6393
+ _v$: void 0,
6394
+ _v$2: void 0,
6395
+ _v$3: void 0
6396
+ });
6397
+ return _el$;
6398
+ })();
6399
+ }
6400
+ var inlined_script_default = InlinedScript;
6401
+
6402
+ // src/functions/is-previewing.ts
6403
+ function isPreviewing(_search) {
6404
+ const search = _search || (isBrowser() ? window.location.search : void 0);
6405
+ if (!search) {
6406
+ return false;
6407
+ }
6408
+ const normalizedSearch = getSearchString(search);
6409
+ return Boolean(normalizedSearch.indexOf("builder.preview=") !== -1);
6410
+ }
6411
+
6412
+ // src/blocks/personalization-container/helpers/inlined-fns.ts
6413
+ function filterWithCustomTargeting(userAttributes, query, startDate, endDate) {
6414
+ function isString(val) {
6415
+ return typeof val === "string";
6416
+ }
6417
+ function isNumber(val) {
6418
+ return typeof val === "number";
6419
+ }
6420
+ function objectMatchesQuery(userattr, query2) {
6421
+ const result = (() => {
6422
+ const property = query2.property;
6423
+ const operator = query2.operator;
6424
+ let testValue = query2.value;
6425
+ if (query2 && query2.property === "urlPath" && query2.value && typeof query2.value === "string" && query2.value !== "/" && query2.value.endsWith("/")) {
6426
+ testValue = query2.value.slice(0, -1);
6427
+ }
6428
+ if (!(property && operator)) {
6429
+ return true;
6430
+ }
6431
+ if (Array.isArray(testValue)) {
6432
+ if (operator === "isNot") {
6433
+ return testValue.every((val) => objectMatchesQuery(userattr, {
6434
+ property,
6435
+ operator,
6436
+ value: val
6437
+ }));
6438
+ }
6439
+ return !!testValue.find((val) => objectMatchesQuery(userattr, {
6440
+ property,
6441
+ operator,
6442
+ value: val
6443
+ }));
6444
+ }
6445
+ const value = userattr[property];
6446
+ if (Array.isArray(value)) {
6447
+ return value.includes(testValue);
6448
+ }
6449
+ switch (operator) {
6450
+ case "is":
6451
+ return value === testValue;
6452
+ case "isNot":
6453
+ return value !== testValue;
6454
+ case "contains":
6455
+ return (isString(value) || Array.isArray(value)) && value.includes(String(testValue));
6456
+ case "startsWith":
6457
+ return isString(value) && value.startsWith(String(testValue));
6458
+ case "endsWith":
6459
+ return isString(value) && value.endsWith(String(testValue));
6460
+ case "greaterThan":
6461
+ return isNumber(value) && isNumber(testValue) && value > testValue;
6462
+ case "lessThan":
6463
+ return isNumber(value) && isNumber(testValue) && value < testValue;
6464
+ case "greaterThanOrEqualTo":
6465
+ return isNumber(value) && isNumber(testValue) && value >= testValue;
6466
+ case "lessThanOrEqualTo":
6467
+ return isNumber(value) && isNumber(testValue) && value <= testValue;
6468
+ default:
6469
+ return false;
6470
+ }
6471
+ })();
6472
+ return result;
6473
+ }
6474
+ const item = {
6475
+ query,
6476
+ startDate,
6477
+ endDate
6478
+ };
6479
+ const now = userAttributes.date && new Date(userAttributes.date) || /* @__PURE__ */ new Date();
6480
+ if (item.startDate && new Date(item.startDate) > now) {
6481
+ return false;
6482
+ } else if (item.endDate && new Date(item.endDate) < now) {
6483
+ return false;
6484
+ }
6485
+ if (!item.query || !item.query.length) {
6486
+ return true;
6487
+ }
6488
+ return item.query.every((filter) => {
6489
+ return objectMatchesQuery(userAttributes, filter);
6490
+ });
6491
+ }
6492
+ var PERSONALIZATION_SCRIPT = `function getPersonalizedVariant(variants, blockId, locale) {
6493
+ if (!navigator.cookieEnabled) {
6494
+ return;
6495
+ }
6496
+ function getCookie(name) {
6497
+ const nameEQ = name + '=';
6498
+ const ca = document.cookie.split(';');
6499
+ for (let i = 0; i < ca.length; i++) {
6500
+ let c = ca[i];
6501
+ while (c.charAt(0) == ' ') c = c.substring(1, c.length);
6502
+ if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length, c.length);
6503
+ }
6504
+ return null;
6505
+ }
6506
+ function removeVariants() {
6507
+ variants?.forEach(function (_, index) {
6508
+ document.querySelector('template[data-variant-id="' + blockId + '-' + index + '"]')?.remove();
6509
+ });
6510
+ document.querySelector('script[data-id="variants-script-' + blockId + '"]')?.remove();
6511
+ document.querySelector('style[data-id="variants-styles-' + blockId + '"]')?.remove();
6512
+ }
6513
+ const attributes = JSON.parse(getCookie('builder.userAttributes') || '{}');
6514
+ if (locale) {
6515
+ attributes.locale = locale;
6516
+ }
6517
+ const winningVariantIndex = variants?.findIndex(function (variant) {
6518
+ return filterWithCustomTargeting(attributes, variant.query, variant.startDate, variant.endDate);
6519
+ });
6520
+ const isDebug = location.href.includes('builder.debug=true');
6521
+ if (isDebug) {
6522
+ console.debug('PersonalizationContainer', {
6523
+ attributes,
6524
+ variants,
6525
+ winningVariantIndex
6526
+ });
6527
+ }
6528
+ if (winningVariantIndex !== -1) {
6529
+ const winningVariant = document.querySelector('template[data-variant-id="' + blockId + '-' + winningVariantIndex + '"]');
6530
+ if (winningVariant) {
6531
+ const parentNode = winningVariant.parentNode;
6532
+ if (parentNode) {
6533
+ const newParent = parentNode.cloneNode(false);
6534
+ newParent.appendChild(winningVariant.content.firstChild);
6535
+ newParent.appendChild(winningVariant.content.lastChild);
6536
+ parentNode.parentNode?.replaceChild(newParent, parentNode);
6537
+ }
6538
+ if (isDebug) {
6539
+ console.debug('PersonalizationContainer', 'Winning variant Replaced:', winningVariant);
6540
+ }
6541
+ }
6542
+ } else if (variants && variants.length > 0) {
6543
+ removeVariants();
6544
+ }
6545
+ }`;
6546
+ var FILTER_WITH_CUSTOM_TARGETING_SCRIPT = "function filterWithCustomTargeting(userAttributes, query, startDate, endDate) {\n function isString(val) {\n return typeof val === 'string';\n }\n function isNumber(val) {\n return typeof val === 'number';\n }\n function objectMatchesQuery(userattr, query) {\n const result = (() => {\n const property = query.property;\n const operator = query.operator;\n let testValue = query.value;\n if (query && query.property === 'urlPath' && query.value && typeof query.value === 'string' && query.value !== '/' && query.value.endsWith('/')) {\n testValue = query.value.slice(0, -1);\n }\n if (!(property && operator)) {\n return true;\n }\n if (Array.isArray(testValue)) {\n if (operator === 'isNot') {\n return testValue.every(val => objectMatchesQuery(userattr, {\n property,\n operator,\n value: val\n }));\n }\n return !!testValue.find(val => objectMatchesQuery(userattr, {\n property,\n operator,\n value: val\n }));\n }\n const value = userattr[property];\n if (Array.isArray(value)) {\n return value.includes(testValue);\n }\n switch (operator) {\n case 'is':\n return value === testValue;\n case 'isNot':\n return value !== testValue;\n case 'contains':\n return (isString(value) || Array.isArray(value)) && value.includes(String(testValue));\n case 'startsWith':\n return isString(value) && value.startsWith(String(testValue));\n case 'endsWith':\n return isString(value) && value.endsWith(String(testValue));\n case 'greaterThan':\n return isNumber(value) && isNumber(testValue) && value > testValue;\n case 'lessThan':\n return isNumber(value) && isNumber(testValue) && value < testValue;\n case 'greaterThanOrEqualTo':\n return isNumber(value) && isNumber(testValue) && value >= testValue;\n case 'lessThanOrEqualTo':\n return isNumber(value) && isNumber(testValue) && value <= testValue;\n default:\n return false;\n }\n })();\n return result;\n }\n const item = {\n query,\n startDate,\n endDate\n };\n const now = userAttributes.date && new Date(userAttributes.date) || new Date();\n if (item.startDate && new Date(item.startDate) > now) {\n return false;\n } else if (item.endDate && new Date(item.endDate) < now) {\n return false;\n }\n if (!item.query || !item.query.length) {\n return true;\n }\n return item.query.every(filter => {\n return objectMatchesQuery(userAttributes, filter);\n });\n}";
6547
+
6548
+ // src/blocks/personalization-container/helpers.ts
6549
+ function checkShouldRenderVariants(variants, canTrack) {
6550
+ const hasVariants = variants && variants.length > 0;
6551
+ if (TARGET === "reactNative")
6552
+ return false;
6553
+ if (!hasVariants)
6554
+ return false;
6555
+ if (!canTrack)
6556
+ return false;
6557
+ if (TARGET === "vue" || TARGET === "svelte")
6558
+ return true;
6559
+ if (isBrowser())
6560
+ return false;
6561
+ return true;
6562
+ }
6563
+ function getBlocksToRender({
6564
+ variants,
6565
+ previewingIndex,
6566
+ isHydrated,
6567
+ filteredVariants,
6568
+ fallbackBlocks
6569
+ }) {
6570
+ const fallback = {
6571
+ blocks: fallbackBlocks ?? [],
6572
+ path: "this.children"
6573
+ };
6574
+ if (isHydrated && isEditing()) {
6575
+ if (typeof previewingIndex === "number" && previewingIndex < (variants?.length ?? 0)) {
6576
+ const variant = variants[previewingIndex];
6577
+ return {
6578
+ blocks: variant.blocks,
6579
+ path: `component.options.variants.${previewingIndex}.blocks`
6580
+ };
6581
+ }
6582
+ return fallback;
6583
+ }
6584
+ if (isBrowser()) {
6585
+ const winningVariant = filteredVariants?.[0];
6586
+ if (winningVariant) {
6587
+ return {
6588
+ blocks: winningVariant.blocks,
6589
+ path: `component.options.variants.${variants?.indexOf(winningVariant)}.blocks`
6590
+ };
6591
+ }
6592
+ }
6593
+ return fallback;
6594
+ }
6595
+ var getPersonalizationScript = (variants, blockId, locale) => {
6596
+ return `
6597
+ (function() {
6598
+ ${FILTER_WITH_CUSTOM_TARGETING_SCRIPT}
6599
+ ${PERSONALIZATION_SCRIPT}
6600
+ getPersonalizedVariant(${JSON.stringify(variants)}, "${blockId}"${locale ? `, "${locale}"` : ""})
6601
+ })();
6602
+ `;
6603
+ };
6604
+
6605
+ // src/blocks/personalization-container/personalization-container.tsx
6606
+ var _tmpl$9 = /* @__PURE__ */ template(`<div>`);
6607
+ var _tmpl$25 = /* @__PURE__ */ template(`<template>`);
6608
+ function PersonalizationContainer(props) {
6609
+ const [userAttributes, setUserAttributes] = createSignal(userAttributesService.getUserAttributes());
6610
+ const [scriptStr, setScriptStr] = createSignal(getPersonalizationScript(props.variants, props.builderBlock?.id || "none", props.builderContext?.rootState?.locale));
6611
+ const [unsubscribers, setUnsubscribers] = createSignal([]);
6612
+ const [shouldRenderVariants, setShouldRenderVariants] = createSignal(checkShouldRenderVariants(props.variants, getDefaultCanTrack(props.builderContext?.canTrack)));
6613
+ const [isHydrated, setIsHydrated] = createSignal(false);
6614
+ const filteredVariants = createMemo(() => {
6615
+ return (props.variants || []).filter((variant) => {
6616
+ return filterWithCustomTargeting({
6617
+ ...props.builderContext?.rootState?.locale ? {
6618
+ locale: props.builderContext?.rootState?.locale
6619
+ } : {},
6620
+ ...userAttributes()
6621
+ }, variant.query, variant.startDate, variant.endDate);
6622
+ });
6623
+ });
6624
+ const blocksToRender = createMemo(() => {
6625
+ return getBlocksToRender({
6626
+ variants: props.variants,
6627
+ fallbackBlocks: props.builderBlock?.children,
6628
+ isHydrated: isHydrated(),
6629
+ filteredVariants: filteredVariants(),
6630
+ previewingIndex: props.previewingIndex
6631
+ });
6632
+ });
6633
+ const hideVariantsStyleString = createMemo(() => {
6634
+ return (props.variants || []).map((_, index) => `[data-variant-id="${props.builderBlock?.id}-${index}"] { display: none; } `).join("");
6635
+ });
6636
+ let rootRef;
6637
+ onMount(() => {
6638
+ setIsHydrated(true);
6639
+ const unsub = userAttributesService.subscribeOnUserAttributesChange((attrs) => {
6640
+ setUserAttributes(attrs);
6641
+ });
6642
+ if (!(isEditing() || isPreviewing())) {
6643
+ const variant = filteredVariants()[0];
6644
+ if (rootRef) {
6645
+ rootRef.dispatchEvent(new CustomEvent("builder.variantLoaded", {
6646
+ detail: {
6647
+ variant: variant || "default",
6648
+ content: props.builderContext?.content
6649
+ },
6650
+ bubbles: true
6651
+ }));
6652
+ const observer = new IntersectionObserver((entries) => {
6653
+ entries.forEach((entry) => {
6654
+ if (entry.isIntersecting && rootRef) {
6655
+ rootRef.dispatchEvent(new CustomEvent("builder.variantDisplayed", {
6656
+ detail: {
6657
+ variant: variant || "default",
6658
+ content: props.builderContext?.content
6659
+ },
6660
+ bubbles: true
6661
+ }));
6662
+ }
6663
+ });
6664
+ });
6665
+ observer.observe(rootRef);
6666
+ }
6667
+ }
6668
+ unsubscribers().push(unsub);
6669
+ });
6670
+ return (() => {
6671
+ const _el$ = _tmpl$9();
6672
+ const _ref$ = rootRef;
6673
+ typeof _ref$ === "function" ? use(_ref$, _el$) : rootRef = _el$;
6674
+ spread(_el$, mergeProps({
6675
+ get ["class"]() {
6676
+ return `builder-personalization-container ${props.attributes?.className || ""}`;
6677
+ }
6678
+ }, () => props.attributes), false, true);
6679
+ insert(_el$, createComponent(Show, {
6680
+ get when() {
6681
+ return shouldRenderVariants();
6682
+ },
6683
+ get children() {
6684
+ return [createComponent(For, {
6685
+ get each() {
6686
+ return props.variants;
6687
+ },
6688
+ children: (variant, _index) => {
6689
+ const index = _index();
6690
+ return (() => {
6691
+ const _el$2 = _tmpl$25();
6692
+ setAttribute(_el$2, "key", index);
6693
+ insert(_el$2, createComponent(blocks_default, {
6694
+ get blocks() {
6695
+ return variant.blocks;
6696
+ },
6697
+ get parent() {
6698
+ return props.builderBlock?.id;
6699
+ },
6700
+ path: `component.options.variants.${index}.blocks`
6701
+ }));
6702
+ effect(() => setAttribute(_el$2, "data-variant-id", `${props.builderBlock?.id}-${index}`));
6703
+ return _el$2;
6704
+ })();
6705
+ }
6706
+ }), createComponent(inlined_styles_default, {
6707
+ get nonce() {
6708
+ return props.builderContext?.nonce || "";
6709
+ },
6710
+ get styles() {
6711
+ return hideVariantsStyleString();
6712
+ },
6713
+ get id() {
6714
+ return `variants-styles-${props.builderBlock?.id}`;
6715
+ }
6716
+ }), createComponent(inlined_script_default, {
6717
+ get nonce() {
6718
+ return props.builderContext?.nonce || "";
6719
+ },
6720
+ get scriptStr() {
6721
+ return scriptStr();
6722
+ },
6723
+ get id() {
6724
+ return `variants-script-${props.builderBlock?.id}`;
6725
+ }
6726
+ })];
6727
+ }
6728
+ }), null);
6729
+ insert(_el$, createComponent(blocks_default, {
6730
+ get blocks() {
6731
+ return blocksToRender().blocks;
6732
+ },
6733
+ get parent() {
6734
+ return props.builderBlock?.id;
6735
+ },
6736
+ get path() {
6737
+ return blocksToRender().path;
6738
+ }
6739
+ }), null);
6740
+ return _el$;
6741
+ })();
6742
+ }
6743
+ var personalization_container_default = PersonalizationContainer;
6744
+
6745
+ // src/blocks/section/component-info.ts
6746
+ var componentInfo7 = {
6271
6747
  name: "Core:Section",
6272
6748
  static: true,
6273
6749
  image: "https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2F682efef23ace49afac61748dd305c70a",
@@ -6309,7 +6785,7 @@ var componentInfo6 = {
6309
6785
  };
6310
6786
 
6311
6787
  // src/blocks/slot/component-info.ts
6312
- var componentInfo7 = {
6788
+ var componentInfo8 = {
6313
6789
  name: "Slot",
6314
6790
  isRSC: true,
6315
6791
  description: "Allow child blocks to be inserted into this content when used as a Symbol",
@@ -6327,10 +6803,10 @@ var componentInfo7 = {
6327
6803
  builderComponents: true
6328
6804
  }
6329
6805
  };
6330
- var _tmpl$8 = /* @__PURE__ */ template(`<div>`);
6806
+ var _tmpl$10 = /* @__PURE__ */ template(`<div>`);
6331
6807
  function Slot(props) {
6332
6808
  return (() => {
6333
- const _el$ = _tmpl$8();
6809
+ const _el$ = _tmpl$10();
6334
6810
  _el$.style.setProperty("pointer-events", "auto");
6335
6811
  spread(_el$, mergeProps(() => !props.builderContext.context?.symbolId && {
6336
6812
  "builder-slot": props.name
@@ -6358,7 +6834,7 @@ function Slot(props) {
6358
6834
  var slot_default = Slot;
6359
6835
 
6360
6836
  // src/blocks/symbol/component-info.ts
6361
- var componentInfo8 = {
6837
+ var componentInfo9 = {
6362
6838
  name: "Symbol",
6363
6839
  noWrap: true,
6364
6840
  static: true,
@@ -6440,7 +6916,7 @@ var defaultElement = {
6440
6916
  }
6441
6917
  }
6442
6918
  };
6443
- var componentInfo9 = {
6919
+ var componentInfo10 = {
6444
6920
  name: "Builder: Tabs",
6445
6921
  inputs: [{
6446
6922
  name: "tabs",
@@ -6544,8 +7020,8 @@ var componentInfo9 = {
6544
7020
  builderLinkComponent: true
6545
7021
  }
6546
7022
  };
6547
- var _tmpl$9 = /* @__PURE__ */ template(`<div>`);
6548
- var _tmpl$25 = /* @__PURE__ */ template(`<div><div class=builder-tabs-wrap>`);
7023
+ var _tmpl$11 = /* @__PURE__ */ template(`<div>`);
7024
+ var _tmpl$26 = /* @__PURE__ */ template(`<div><div class=builder-tabs-wrap>`);
6549
7025
  var _tmpl$33 = /* @__PURE__ */ template(`<span>`);
6550
7026
  function Tabs(props) {
6551
7027
  const [activeTab, setActiveTab] = createSignal(props.defaultActiveTab ? props.defaultActiveTab - 1 : 0);
@@ -6560,7 +7036,7 @@ function Tabs(props) {
6560
7036
  }
6561
7037
  }
6562
7038
  return (() => {
6563
- const _el$ = _tmpl$25(), _el$2 = _el$.firstChild;
7039
+ const _el$ = _tmpl$26(), _el$2 = _el$.firstChild;
6564
7040
  _el$2.style.setProperty("display", "flex");
6565
7041
  _el$2.style.setProperty("flex-direction", "row");
6566
7042
  _el$2.style.setProperty("overflow", "auto");
@@ -6612,7 +7088,7 @@ function Tabs(props) {
6612
7088
  return activeTabContent(activeTab());
6613
7089
  },
6614
7090
  get children() {
6615
- const _el$3 = _tmpl$9();
7091
+ const _el$3 = _tmpl$11();
6616
7092
  insert(_el$3, createComponent(blocks_default, {
6617
7093
  get parent() {
6618
7094
  return props.builderBlock.id;
@@ -6644,7 +7120,7 @@ var tabs_default = Tabs;
6644
7120
  delegateEvents(["click"]);
6645
7121
 
6646
7122
  // src/blocks/text/component-info.ts
6647
- var componentInfo10 = {
7123
+ var componentInfo11 = {
6648
7124
  shouldReceiveBuilderProps: {
6649
7125
  builderBlock: TARGET === "reactNative" ? true : false,
6650
7126
  builderContext: true
@@ -6667,10 +7143,10 @@ var componentInfo10 = {
6667
7143
  textAlign: "center"
6668
7144
  }
6669
7145
  };
6670
- var _tmpl$10 = /* @__PURE__ */ template(`<div class=builder-text>`);
7146
+ var _tmpl$12 = /* @__PURE__ */ template(`<div class=builder-text>`);
6671
7147
  function Text(props) {
6672
7148
  return (() => {
6673
- const _el$ = _tmpl$10();
7149
+ const _el$ = _tmpl$12();
6674
7150
  _el$.style.setProperty("outline", "none");
6675
7151
  effect(() => _el$.innerHTML = props.text?.toString() || "");
6676
7152
  return _el$;
@@ -6679,7 +7155,7 @@ function Text(props) {
6679
7155
  var text_default = Text;
6680
7156
 
6681
7157
  // src/blocks/custom-code/component-info.ts
6682
- var componentInfo11 = {
7158
+ var componentInfo12 = {
6683
7159
  name: "Custom Code",
6684
7160
  static: true,
6685
7161
  requiredPermissions: ["editCode"],
@@ -6702,7 +7178,7 @@ var componentInfo11 = {
6702
7178
  advanced: true
6703
7179
  }]
6704
7180
  };
6705
- var _tmpl$11 = /* @__PURE__ */ template(`<div>`);
7181
+ var _tmpl$13 = /* @__PURE__ */ template(`<div>`);
6706
7182
  function CustomCode(props) {
6707
7183
  const [scriptsInserted, setScriptsInserted] = createSignal([]);
6708
7184
  const [scriptsRun, setScriptsRun] = createSignal([]);
@@ -6737,7 +7213,7 @@ function CustomCode(props) {
6737
7213
  }
6738
7214
  });
6739
7215
  return (() => {
6740
- const _el$ = _tmpl$11();
7216
+ const _el$ = _tmpl$13();
6741
7217
  const _ref$ = elementRef;
6742
7218
  typeof _ref$ === "function" ? use(_ref$, _el$) : elementRef = _el$;
6743
7219
  effect((_p$) => {
@@ -6755,7 +7231,7 @@ function CustomCode(props) {
6755
7231
  var custom_code_default = CustomCode;
6756
7232
 
6757
7233
  // src/blocks/embed/component-info.ts
6758
- var componentInfo12 = {
7234
+ var componentInfo13 = {
6759
7235
  name: "Embed",
6760
7236
  static: true,
6761
7237
  inputs: [{
@@ -6777,7 +7253,7 @@ var SCRIPT_MIME_TYPES = ["text/javascript", "application/javascript", "applicati
6777
7253
  var isJsScript = (script) => SCRIPT_MIME_TYPES.includes(script.type);
6778
7254
 
6779
7255
  // src/blocks/embed/embed.tsx
6780
- var _tmpl$12 = /* @__PURE__ */ template(`<div class=builder-embed>`);
7256
+ var _tmpl$14 = /* @__PURE__ */ template(`<div class=builder-embed>`);
6781
7257
  function Embed(props) {
6782
7258
  const [scriptsInserted, setScriptsInserted] = createSignal([]);
6783
7259
  const [scriptsRun, setScriptsRun] = createSignal([]);
@@ -6815,7 +7291,7 @@ function Embed(props) {
6815
7291
  }
6816
7292
  createEffect(on(() => [onUpdateFn_0_elem(), onUpdateFn_0_ranInitFn__()], onUpdateFn_0));
6817
7293
  return (() => {
6818
- const _el$ = _tmpl$12();
7294
+ const _el$ = _tmpl$14();
6819
7295
  const _ref$ = elem;
6820
7296
  typeof _ref$ === "function" ? use(_ref$, _el$) : elem = _el$;
6821
7297
  effect(() => _el$.innerHTML = props.content);
@@ -6825,7 +7301,7 @@ function Embed(props) {
6825
7301
  var embed_default = Embed;
6826
7302
 
6827
7303
  // src/blocks/form/form/component-info.ts
6828
- var componentInfo13 = {
7304
+ var componentInfo14 = {
6829
7305
  name: "Form:Form",
6830
7306
  // editableTags: ['builder-form-error']
6831
7307
  defaults: {
@@ -7081,8 +7557,8 @@ function logFetch(url) {
7081
7557
  }
7082
7558
 
7083
7559
  // src/blocks/form/form/form.tsx
7084
- var _tmpl$13 = /* @__PURE__ */ template(`<pre class="builder-form-error-text pre-04a43b72">`);
7085
- var _tmpl$26 = /* @__PURE__ */ template(`<form>`);
7560
+ var _tmpl$15 = /* @__PURE__ */ template(`<pre class="builder-form-error-text pre-04a43b72">`);
7561
+ var _tmpl$27 = /* @__PURE__ */ template(`<form>`);
7086
7562
  var _tmpl$34 = /* @__PURE__ */ template(`<style>.pre-04a43b72 {
7087
7563
  padding: 10px;
7088
7564
  color: red;
@@ -7275,7 +7751,7 @@ function FormComponent(props) {
7275
7751
  }
7276
7752
  let formRef;
7277
7753
  return [(() => {
7278
- const _el$ = _tmpl$26();
7754
+ const _el$ = _tmpl$27();
7279
7755
  _el$.addEventListener("submit", (event) => onSubmit(event));
7280
7756
  const _ref$ = formRef;
7281
7757
  typeof _ref$ === "function" ? use(_ref$, _el$) : formRef = _el$;
@@ -7331,7 +7807,7 @@ function FormComponent(props) {
7331
7807
  return memo(() => submissionState() === "error")() && responseData();
7332
7808
  },
7333
7809
  get children() {
7334
- const _el$2 = _tmpl$13();
7810
+ const _el$2 = _tmpl$15();
7335
7811
  insert(_el$2, () => JSON.stringify(responseData(), null, 2));
7336
7812
  return _el$2;
7337
7813
  }
@@ -7358,7 +7834,7 @@ function FormComponent(props) {
7358
7834
  var form_default = FormComponent;
7359
7835
 
7360
7836
  // src/blocks/form/input/component-info.ts
7361
- var componentInfo14 = {
7837
+ var componentInfo15 = {
7362
7838
  name: "Form:Input",
7363
7839
  image: "https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2Fad6f37889d9e40bbbbc72cdb5875d6ca",
7364
7840
  inputs: [
@@ -7410,10 +7886,10 @@ var componentInfo14 = {
7410
7886
  borderColor: "#ccc"
7411
7887
  }
7412
7888
  };
7413
- var _tmpl$14 = /* @__PURE__ */ template(`<input>`);
7889
+ var _tmpl$16 = /* @__PURE__ */ template(`<input>`);
7414
7890
  function FormInputComponent(props) {
7415
7891
  return (() => {
7416
- const _el$ = _tmpl$14();
7892
+ const _el$ = _tmpl$16();
7417
7893
  spread(_el$, mergeProps({}, () => props.attributes, {
7418
7894
  get key() {
7419
7895
  return isEditing() && props.defaultValue ? props.defaultValue : "default-key";
@@ -7443,7 +7919,7 @@ function FormInputComponent(props) {
7443
7919
  var input_default = FormInputComponent;
7444
7920
 
7445
7921
  // src/blocks/form/select/component-info.ts
7446
- var componentInfo15 = {
7922
+ var componentInfo16 = {
7447
7923
  name: "Form:Select",
7448
7924
  image: "https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2F83acca093fb24aaf94dee136e9a4b045",
7449
7925
  defaultStyles: {
@@ -7486,11 +7962,11 @@ var componentInfo15 = {
7486
7962
  static: true,
7487
7963
  noWrap: true
7488
7964
  };
7489
- var _tmpl$15 = /* @__PURE__ */ template(`<select>`);
7490
- var _tmpl$27 = /* @__PURE__ */ template(`<option>`);
7965
+ var _tmpl$17 = /* @__PURE__ */ template(`<select>`);
7966
+ var _tmpl$28 = /* @__PURE__ */ template(`<option>`);
7491
7967
  function SelectComponent(props) {
7492
7968
  return (() => {
7493
- const _el$ = _tmpl$15();
7969
+ const _el$ = _tmpl$17();
7494
7970
  spread(_el$, mergeProps({}, () => props.attributes, {
7495
7971
  get value() {
7496
7972
  return props.value;
@@ -7515,7 +7991,7 @@ function SelectComponent(props) {
7515
7991
  children: (option, _index) => {
7516
7992
  const index = _index();
7517
7993
  return (() => {
7518
- const _el$2 = _tmpl$27();
7994
+ const _el$2 = _tmpl$28();
7519
7995
  insert(_el$2, () => option.name || option.value);
7520
7996
  effect(() => setAttribute(_el$2, "key", `${option.name}-${index}`));
7521
7997
  effect(() => _el$2.value = option.value);
@@ -7529,7 +8005,7 @@ function SelectComponent(props) {
7529
8005
  var select_default = SelectComponent;
7530
8006
 
7531
8007
  // src/blocks/form/submit-button/component-info.ts
7532
- var componentInfo16 = {
8008
+ var componentInfo17 = {
7533
8009
  name: "Form:SubmitButton",
7534
8010
  image: "https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2Fdf2820ffed1f4349a94c40b3221f5b98",
7535
8011
  defaultStyles: {
@@ -7555,10 +8031,10 @@ var componentInfo16 = {
7555
8031
  // TODO: defaultChildren
7556
8032
  // canHaveChildren: true,
7557
8033
  };
7558
- var _tmpl$16 = /* @__PURE__ */ template(`<button type=submit>`);
8034
+ var _tmpl$18 = /* @__PURE__ */ template(`<button type=submit>`);
7559
8035
  function SubmitButton(props) {
7560
8036
  return (() => {
7561
- const _el$ = _tmpl$16();
8037
+ const _el$ = _tmpl$18();
7562
8038
  spread(_el$, mergeProps({}, () => props.attributes), false, true);
7563
8039
  insert(_el$, () => props.text);
7564
8040
  return _el$;
@@ -7567,7 +8043,7 @@ function SubmitButton(props) {
7567
8043
  var submit_button_default = SubmitButton;
7568
8044
 
7569
8045
  // src/blocks/form/textarea/component-info.ts
7570
- var componentInfo17 = {
8046
+ var componentInfo18 = {
7571
8047
  name: "Form:TextArea",
7572
8048
  image: "https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2Ff74a2f3de58c4c3e939204e5b6b8f6c3",
7573
8049
  inputs: [{
@@ -7604,10 +8080,10 @@ var componentInfo17 = {
7604
8080
  static: true,
7605
8081
  noWrap: true
7606
8082
  };
7607
- var _tmpl$17 = /* @__PURE__ */ template(`<textarea>`);
8083
+ var _tmpl$19 = /* @__PURE__ */ template(`<textarea>`);
7608
8084
  function Textarea(props) {
7609
8085
  return (() => {
7610
- const _el$ = _tmpl$17();
8086
+ const _el$ = _tmpl$19();
7611
8087
  spread(_el$, mergeProps({}, () => props.attributes, {
7612
8088
  get placeholder() {
7613
8089
  return props.placeholder;
@@ -7631,7 +8107,7 @@ function Textarea(props) {
7631
8107
  var textarea_default = Textarea;
7632
8108
 
7633
8109
  // src/blocks/img/component-info.ts
7634
- var componentInfo18 = {
8110
+ var componentInfo19 = {
7635
8111
  // friendlyName?
7636
8112
  name: "Raw:Img",
7637
8113
  hideFromInsertMenu: true,
@@ -7646,10 +8122,10 @@ var componentInfo18 = {
7646
8122
  noWrap: true,
7647
8123
  static: true
7648
8124
  };
7649
- var _tmpl$18 = /* @__PURE__ */ template(`<img>`);
8125
+ var _tmpl$20 = /* @__PURE__ */ template(`<img>`);
7650
8126
  function ImgComponent(props) {
7651
8127
  return (() => {
7652
- const _el$ = _tmpl$18();
8128
+ const _el$ = _tmpl$20();
7653
8129
  spread(_el$, mergeProps({
7654
8130
  get style() {
7655
8131
  return {
@@ -7673,7 +8149,7 @@ function ImgComponent(props) {
7673
8149
  var img_default = ImgComponent;
7674
8150
 
7675
8151
  // src/blocks/video/component-info.ts
7676
- var componentInfo19 = {
8152
+ var componentInfo20 = {
7677
8153
  name: "Video",
7678
8154
  canHaveChildren: true,
7679
8155
  defaultStyles: {
@@ -7758,8 +8234,8 @@ var componentInfo19 = {
7758
8234
  builderBlock: true
7759
8235
  }
7760
8236
  };
7761
- var _tmpl$19 = /* @__PURE__ */ template(`<source type=video/mp4>`);
7762
- var _tmpl$28 = /* @__PURE__ */ template(`<div>`);
8237
+ var _tmpl$21 = /* @__PURE__ */ template(`<source type=video/mp4>`);
8238
+ var _tmpl$29 = /* @__PURE__ */ template(`<div>`);
7763
8239
  var _tmpl$35 = /* @__PURE__ */ template(`<div><video class=builder-video>`);
7764
8240
  function Video(props) {
7765
8241
  const videoProps = createMemo(() => {
@@ -7820,7 +8296,7 @@ function Video(props) {
7820
8296
  return !props.lazyLoad;
7821
8297
  },
7822
8298
  get children() {
7823
- const _el$3 = _tmpl$19();
8299
+ const _el$3 = _tmpl$21();
7824
8300
  effect(() => setAttribute(_el$3, "src", props.video));
7825
8301
  return _el$3;
7826
8302
  }
@@ -7830,7 +8306,7 @@ function Video(props) {
7830
8306
  return props.aspectRatio && !(props.fitContent && props.builderBlock?.children?.length);
7831
8307
  },
7832
8308
  get children() {
7833
- const _el$4 = _tmpl$28();
8309
+ const _el$4 = _tmpl$29();
7834
8310
  _el$4.style.setProperty("width", "100%");
7835
8311
  _el$4.style.setProperty("pointer-events", "none");
7836
8312
  _el$4.style.setProperty("font-size", "0px");
@@ -7843,7 +8319,7 @@ function Video(props) {
7843
8319
  return props.builderBlock?.children?.length && props.fitContent;
7844
8320
  },
7845
8321
  get children() {
7846
- const _el$5 = _tmpl$28();
8322
+ const _el$5 = _tmpl$29();
7847
8323
  _el$5.style.setProperty("display", "flex");
7848
8324
  _el$5.style.setProperty("flex-direction", "column");
7849
8325
  _el$5.style.setProperty("align-items", "stretch");
@@ -7856,7 +8332,7 @@ function Video(props) {
7856
8332
  return props.builderBlock?.children?.length && !props.fitContent;
7857
8333
  },
7858
8334
  get children() {
7859
- const _el$6 = _tmpl$28();
8335
+ const _el$6 = _tmpl$29();
7860
8336
  _el$6.style.setProperty("pointer-events", "none");
7861
8337
  _el$6.style.setProperty("display", "flex");
7862
8338
  _el$6.style.setProperty("flex-direction", "column");
@@ -7878,31 +8354,31 @@ var video_default = Video;
7878
8354
  // src/constants/extra-components.ts
7879
8355
  var getExtraComponents = () => [{
7880
8356
  component: custom_code_default,
7881
- ...componentInfo11
8357
+ ...componentInfo12
7882
8358
  }, {
7883
8359
  component: embed_default,
7884
- ...componentInfo12
8360
+ ...componentInfo13
7885
8361
  }, ...TARGET === "rsc" ? [] : [{
7886
8362
  component: form_default,
7887
- ...componentInfo13
8363
+ ...componentInfo14
7888
8364
  }, {
7889
8365
  component: input_default,
7890
- ...componentInfo14
8366
+ ...componentInfo15
7891
8367
  }, {
7892
8368
  component: submit_button_default,
7893
- ...componentInfo16
8369
+ ...componentInfo17
7894
8370
  }, {
7895
8371
  component: select_default,
7896
- ...componentInfo15
8372
+ ...componentInfo16
7897
8373
  }, {
7898
8374
  component: textarea_default,
7899
- ...componentInfo17
8375
+ ...componentInfo18
7900
8376
  }], {
7901
8377
  component: img_default,
7902
- ...componentInfo18
8378
+ ...componentInfo19
7903
8379
  }, {
7904
8380
  component: video_default,
7905
- ...componentInfo19
8381
+ ...componentInfo20
7906
8382
  }];
7907
8383
 
7908
8384
  // src/constants/builder-registered-components.ts
@@ -7920,19 +8396,22 @@ var getDefaultRegisteredComponents = () => [{
7920
8396
  ...componentInfo5
7921
8397
  }, {
7922
8398
  component: section_default,
7923
- ...componentInfo6
8399
+ ...componentInfo7
7924
8400
  }, {
7925
8401
  component: slot_default,
7926
- ...componentInfo7
8402
+ ...componentInfo8
7927
8403
  }, {
7928
8404
  component: symbol_default,
7929
- ...componentInfo8
8405
+ ...componentInfo9
7930
8406
  }, {
7931
8407
  component: text_default,
7932
- ...componentInfo10
7933
- }, ...TARGET === "rsc" ? [] : [{
8408
+ ...componentInfo11
8409
+ }, ...TARGET === "react" ? [{
8410
+ component: personalization_container_default,
8411
+ ...componentInfo6
8412
+ }] : [], ...TARGET === "rsc" ? [] : [{
7934
8413
  component: tabs_default,
7935
- ...componentInfo9
8414
+ ...componentInfo10
7936
8415
  }, {
7937
8416
  component: accordion_default,
7938
8417
  ...componentInfo
@@ -7970,7 +8449,7 @@ var getVariants = (content) => Object.values(content?.variations || {}).map((var
7970
8449
  testVariationId: variant.id,
7971
8450
  id: content?.id
7972
8451
  }));
7973
- var checkShouldRenderVariants = ({
8452
+ var checkShouldRenderVariants2 = ({
7974
8453
  canTrack,
7975
8454
  content
7976
8455
  }) => {
@@ -8003,25 +8482,6 @@ var getUpdateVariantVisibilityScript = ({
8003
8482
  }) => `window.${UPDATE_VARIANT_VISIBILITY_SCRIPT_FN_NAME}(
8004
8483
  "${variationId}", "${contentId}", ${isHydrationTarget}
8005
8484
  )`;
8006
- var _tmpl$20 = /* @__PURE__ */ template(`<script>`);
8007
- function InlinedScript(props) {
8008
- return (() => {
8009
- const _el$ = _tmpl$20();
8010
- effect((_p$) => {
8011
- const _v$ = props.scriptStr, _v$2 = props.id, _v$3 = props.nonce || "";
8012
- _v$ !== _p$._v$ && (_el$.innerHTML = _p$._v$ = _v$);
8013
- _v$2 !== _p$._v$2 && setAttribute(_el$, "data-id", _p$._v$2 = _v$2);
8014
- _v$3 !== _p$._v$3 && setAttribute(_el$, "nonce", _p$._v$3 = _v$3);
8015
- return _p$;
8016
- }, {
8017
- _v$: void 0,
8018
- _v$2: void 0,
8019
- _v$3: void 0
8020
- });
8021
- return _el$;
8022
- })();
8023
- }
8024
- var inlined_script_default = InlinedScript;
8025
8485
 
8026
8486
  // src/helpers/preview-lru-cache/get.ts
8027
8487
  function getPreviewContent(_searchParams) {
@@ -8029,7 +8489,7 @@ function getPreviewContent(_searchParams) {
8029
8489
  }
8030
8490
 
8031
8491
  // src/constants/sdk-version.ts
8032
- var SDK_VERSION = "3.0.5";
8492
+ var SDK_VERSION = "3.0.7";
8033
8493
 
8034
8494
  // src/helpers/sdk-headers.ts
8035
8495
  var getSdkHeaders = () => ({
@@ -8326,16 +8786,6 @@ async function fetchEntries(options) {
8326
8786
  return _processContentResult(options, content);
8327
8787
  }
8328
8788
 
8329
- // src/functions/is-previewing.ts
8330
- function isPreviewing(_search) {
8331
- const search = _search || (isBrowser() ? window.location.search : void 0);
8332
- if (!search) {
8333
- return false;
8334
- }
8335
- const normalizedSearch = getSearchString(search);
8336
- return Boolean(normalizedSearch.indexOf("builder.preview=") !== -1);
8337
- }
8338
-
8339
8789
  // src/helpers/uuid.ts
8340
8790
  function uuidv4() {
8341
8791
  return "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, function(c) {
@@ -8662,7 +9112,9 @@ var setupBrowserForEditing = (options = {}) => {
8662
9112
  // Supports builder-model="..." attribute which is needed to
8663
9113
  // scope our '+ add block' button styling
8664
9114
  supportsAddBlockScoping: true,
8665
- supportsCustomBreakpoints: true
9115
+ supportsCustomBreakpoints: true,
9116
+ supportsXSmallBreakpoint: TARGET === "reactNative" ? false : true,
9117
+ blockLevelPersonalization: true
8666
9118
  }
8667
9119
  }, "*");
8668
9120
  window.parent?.postMessage({
@@ -9399,7 +9851,7 @@ var content_default = ContentComponent;
9399
9851
 
9400
9852
  // src/components/content-variants/content-variants.tsx
9401
9853
  function ContentVariants(props) {
9402
- const [shouldRenderVariants, setShouldRenderVariants] = createSignal(checkShouldRenderVariants({
9854
+ const [shouldRenderVariants, setShouldRenderVariants] = createSignal(checkShouldRenderVariants2({
9403
9855
  canTrack: getDefaultCanTrack(props.canTrack),
9404
9856
  content: props.content
9405
9857
  }));
@@ -9625,7 +10077,7 @@ var fetchSymbolContent = async ({
9625
10077
  };
9626
10078
 
9627
10079
  // src/blocks/symbol/symbol.tsx
9628
- var _tmpl$21 = /* @__PURE__ */ template(`<div>`);
10080
+ var _tmpl$30 = /* @__PURE__ */ template(`<div>`);
9629
10081
  function Symbol2(props) {
9630
10082
  const [contentToUse, setContentToUse] = createSignal(props.symbol?.content);
9631
10083
  const blocksWrapper = createMemo(() => {
@@ -9657,7 +10109,7 @@ function Symbol2(props) {
9657
10109
  }
9658
10110
  createEffect(on(() => [onUpdateFn_0_props_symbol()], onUpdateFn_0));
9659
10111
  return (() => {
9660
- const _el$ = _tmpl$21();
10112
+ const _el$ = _tmpl$30();
9661
10113
  spread(_el$, mergeProps({
9662
10114
  get ["class"]() {
9663
10115
  return className();
@@ -9749,4 +10201,4 @@ var fetchBuilderProps = async (_args) => {
9749
10201
  };
9750
10202
  };
9751
10203
 
9752
- export { blocks_default as Blocks, builder_context_default as BuilderContext, button_default as Button, columns_default as Columns, content_variants_default as Content, fragment_default as Fragment, image_default as Image, section_default as Section, symbol_default as Symbol, text_default as Text, video_default as Video, _processContentResult, createRegisterComponentMessage, fetchBuilderProps, fetchEntries, fetchOneEntry, getBuilderSearchParams, isEditing, isPreviewing, register, setEditorSettings, subscribeToEditor, track };
10204
+ export { blocks_default as Blocks, builder_context_default as BuilderContext, button_default as Button, columns_default as Columns, content_variants_default as Content, fragment_default as Fragment, image_default as Image, section_default as Section, symbol_default as Symbol, text_default as Text, video_default as Video, _processContentResult, createRegisterComponentMessage, fetchBuilderProps, fetchEntries, fetchOneEntry, getBuilderSearchParams, isEditing, isPreviewing, register, setClientUserAttributes, setEditorSettings, subscribeToEditor, track };