@builder.io/sdk-vue 0.5.7 → 0.5.9

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 (87) hide show
  1. package/package.json +1 -1
  2. package/packages/_vue2/dist/{block-styles.4aca252e.js → block-styles.2f2d681c.js} +5 -5
  3. package/packages/_vue2/dist/{block-styles.d4e625bc.cjs → block-styles.e0c362f1.cjs} +1 -1
  4. package/packages/_vue2/dist/{block-wrapper.df62a070.cjs → block-wrapper.60491ece.cjs} +1 -1
  5. package/packages/_vue2/dist/{block-wrapper.266a0ef3.js → block-wrapper.675417b1.js} +5 -5
  6. package/packages/_vue2/dist/{block.1c14e1e8.cjs → block.2b1ac86c.cjs} +2 -2
  7. package/packages/_vue2/dist/{block.33475f0d.js → block.b10ffc8d.js} +7 -7
  8. package/packages/_vue2/dist/{blocks-wrapper.030b1bc5.js → blocks-wrapper.1f4e53ec.js} +1 -1
  9. package/packages/_vue2/dist/{blocks-wrapper.42eb4446.cjs → blocks-wrapper.87c356a1.cjs} +1 -1
  10. package/packages/_vue2/dist/{component-ref.2a5e1ada.js → component-ref.d1a3e1db.js} +16 -16
  11. package/packages/_vue2/dist/component-ref.e0e18275.cjs +1 -0
  12. package/packages/_vue2/dist/{content.ea0a72d4.js → content.4dd9bed9.js} +5 -5
  13. package/packages/_vue2/dist/{content.e5d197c3.cjs → content.e0c272e6.cjs} +1 -1
  14. package/packages/_vue2/dist/{css.dd09e65b.js → css.3b52add0.js} +1 -1
  15. package/packages/_vue2/dist/{css.21080882.cjs → css.5b6afc6e.cjs} +1 -1
  16. package/packages/_vue2/dist/{enable-editor.472fc3ec.cjs → enable-editor.29678a79.cjs} +1 -1
  17. package/packages/_vue2/dist/{enable-editor.6c4a1aca.js → enable-editor.c8c377d7.js} +22 -22
  18. package/packages/_vue2/dist/evaluate.585803ce.cjs +1 -0
  19. package/packages/_vue2/dist/evaluate.b622b309.js +97 -0
  20. package/packages/_vue2/dist/{get-block-actions.982724b1.js → get-block-actions.17f0418a.js} +2 -2
  21. package/packages/_vue2/dist/{get-block-actions.2fa72e92.cjs → get-block-actions.cc26a1a3.cjs} +1 -1
  22. package/packages/_vue2/dist/{get-block-properties.008d318f.js → get-block-properties.3a4c9314.js} +2 -2
  23. package/packages/_vue2/dist/{get-block-properties.094bfc1a.cjs → get-block-properties.fbe48fae.cjs} +1 -1
  24. package/packages/_vue2/dist/{get-processed-block.06b725b4.cjs → get-processed-block.5937bfa6.cjs} +1 -1
  25. package/packages/_vue2/dist/{get-processed-block.cabbf7c1.js → get-processed-block.92e6395c.js} +2 -2
  26. package/packages/_vue2/dist/{index.d24a9f20.cjs → index.04a22940.cjs} +7 -7
  27. package/packages/_vue2/dist/{index.da59485b.js → index.835b8ee0.js} +102 -101
  28. package/packages/_vue2/dist/{inlined-script.7d9f29c5.cjs → inlined-script.0c7f9ce3.cjs} +1 -1
  29. package/packages/_vue2/dist/{inlined-script.d5b1456d.js → inlined-script.3ec95873.js} +1 -1
  30. package/packages/_vue2/dist/{inlined-styles.ef691e26.cjs → inlined-styles.89ce41e1.cjs} +1 -1
  31. package/packages/_vue2/dist/{inlined-styles.4fd4586c.js → inlined-styles.ccff7c47.js} +1 -1
  32. package/packages/_vue2/dist/{interactive-element.7172524e.js → interactive-element.fa779554.js} +5 -5
  33. package/packages/_vue2/dist/interactive-element.fdd261bc.cjs +1 -0
  34. package/packages/_vue2/dist/{non-node-runtime.fac94d56.cjs → non-node-runtime.ddfeed94.cjs} +9 -9
  35. package/packages/{_vue3/dist/non-node-runtime.cac77d48.js → _vue2/dist/non-node-runtime.eb7f6595.js} +66 -65
  36. package/packages/_vue2/dist/{repeated-block.2b3065cd.js → repeated-block.3c989659.js} +2 -2
  37. package/packages/_vue2/dist/{repeated-block.27283bd9.cjs → repeated-block.48fbaaab.cjs} +1 -1
  38. package/packages/_vue2/dist/sdk.cjs +1 -1
  39. package/packages/_vue2/dist/sdk.js +6 -6
  40. package/packages/_vue2/dist/src/components/content/content.types.d.ts +2 -2
  41. package/packages/_vue2/dist/src/components/content-variants/content-variants.types.d.ts +1 -1
  42. package/packages/_vue2/dist/src/constants/sdk-version.d.ts +1 -1
  43. package/packages/_vue2/dist/src/functions/evaluate/browser-runtime/browser.d.ts +4 -0
  44. package/packages/_vue2/dist/src/functions/evaluate/evaluate.d.ts +4 -8
  45. package/packages/_vue2/dist/src/functions/evaluate/helpers.d.ts +18 -0
  46. package/packages/_vue2/dist/src/functions/evaluate/index.d.ts +1 -1
  47. package/packages/_vue2/dist/src/functions/evaluate/non-node-runtime/non-node-runtime.d.ts +2 -2
  48. package/packages/_vue2/dist/src/functions/fetch-builder-props.d.ts +2 -2
  49. package/packages/_vue2/dist/src/index.d.ts +5 -14
  50. package/packages/_vue2/dist/src/server-index.d.ts +15 -0
  51. package/packages/_vue2/dist/{styles.d53197f4.js → styles.22b87564.js} +2 -2
  52. package/packages/_vue2/dist/{styles.39410f45.cjs → styles.a3209286.cjs} +2 -2
  53. package/packages/_vue3/dist/{block-wrapper.f6009433.cjs → block-wrapper.4abbfa5d.cjs} +1 -1
  54. package/packages/_vue3/dist/{block-wrapper.c5fdd37d.js → block-wrapper.e6a959ca.js} +2 -2
  55. package/packages/_vue3/dist/component-ref.16c18e90.cjs +1 -0
  56. package/packages/_vue3/dist/{component-ref.513230d1.js → component-ref.b3232d22.js} +19 -19
  57. package/packages/_vue3/dist/{get-block-actions.98c78ed5.js → get-block-actions.48118020.js} +1 -1
  58. package/packages/_vue3/dist/{get-block-actions.63f93beb.cjs → get-block-actions.83a66ea4.cjs} +1 -1
  59. package/packages/_vue3/dist/{index.b87be7b3.js → index.ee80c2d7.js} +430 -411
  60. package/packages/_vue3/dist/index.f36face2.cjs +69 -0
  61. package/packages/{_vue2/dist/non-node-runtime.2372bfdf.js → _vue3/dist/non-node-runtime.15581a63.js} +62 -64
  62. package/packages/_vue3/dist/{non-node-runtime.73787d0f.cjs → non-node-runtime.fb2b33d0.cjs} +8 -8
  63. package/packages/_vue3/dist/{repeated-block.8758f41a.cjs → repeated-block.33f567b4.cjs} +1 -1
  64. package/packages/_vue3/dist/{repeated-block.3a92872a.js → repeated-block.53ae8c41.js} +2 -2
  65. package/packages/_vue3/dist/sdk.cjs +1 -1
  66. package/packages/_vue3/dist/sdk.js +2 -2
  67. package/packages/_vue3/dist/src/components/content/content.types.d.ts +2 -2
  68. package/packages/_vue3/dist/src/components/content-variants/content-variants.types.d.ts +1 -1
  69. package/packages/_vue3/dist/src/constants/sdk-version.d.ts +1 -1
  70. package/packages/_vue3/dist/src/functions/evaluate/browser-runtime/browser.d.ts +4 -0
  71. package/packages/_vue3/dist/src/functions/evaluate/evaluate.d.ts +4 -8
  72. package/packages/_vue3/dist/src/functions/evaluate/helpers.d.ts +18 -0
  73. package/packages/_vue3/dist/src/functions/evaluate/index.d.ts +1 -1
  74. package/packages/_vue3/dist/src/functions/evaluate/non-node-runtime/non-node-runtime.d.ts +2 -2
  75. package/packages/_vue3/dist/src/functions/fetch-builder-props.d.ts +2 -2
  76. package/packages/_vue3/dist/src/index.d.ts +5 -14
  77. package/packages/_vue3/dist/src/server-index.d.ts +15 -0
  78. package/packages/_vue2/dist/component-ref.c0ab9fe2.cjs +0 -1
  79. package/packages/_vue2/dist/evaluate.79598493.cjs +0 -4
  80. package/packages/_vue2/dist/evaluate.9bc5efc5.js +0 -79
  81. package/packages/_vue2/dist/interactive-element.0a1def03.cjs +0 -1
  82. package/packages/_vue2/dist/src/functions/evaluate/types.d.ts +0 -11
  83. package/packages/_vue3/dist/component-ref.5807e495.cjs +0 -1
  84. package/packages/_vue3/dist/index.9693ab51.cjs +0 -72
  85. package/packages/_vue3/dist/src/functions/evaluate/types.d.ts +0 -11
  86. /package/packages/_vue2/dist/src/functions/evaluate/{acorn-interpreter.d.ts → non-node-runtime/acorn-interpreter.d.ts} +0 -0
  87. /package/packages/_vue3/dist/src/functions/evaluate/{acorn-interpreter.d.ts → non-node-runtime/acorn-interpreter.d.ts} +0 -0
@@ -0,0 +1,97 @@
1
+ import { i as d, l as a, b as h, d as p } from "./index.835b8ee0.js";
2
+ const E = ({
3
+ builder: r,
4
+ context: e,
5
+ event: n,
6
+ state: i
7
+ }) => Object.entries({
8
+ state: i,
9
+ Builder: r,
10
+ builder: r,
11
+ context: e,
12
+ event: n
13
+ }), m = ({
14
+ code: r,
15
+ builder: e,
16
+ context: n,
17
+ event: i,
18
+ localState: s,
19
+ rootSetState: t,
20
+ rootState: c
21
+ }) => {
22
+ const u = E({
23
+ builder: e,
24
+ context: n,
25
+ event: i,
26
+ state: v(c, s, t)
27
+ });
28
+ return new Function(...u.map(([o]) => o), r)(...u.map(([, o]) => o));
29
+ };
30
+ function v(r, e, n) {
31
+ if (r === e)
32
+ throw new Error("rootState === localState");
33
+ return new Proxy(r, {
34
+ get: (i, s) => e && s in e ? e[s] : r[s],
35
+ set: (i, s, t) => {
36
+ if (e && s in e)
37
+ throw new Error("Writing to local state is not allowed as it is read-only.");
38
+ return r[s] = t, n == null || n(r), !0;
39
+ }
40
+ });
41
+ }
42
+ function l() {
43
+ const r = () => {
44
+ var e;
45
+ return typeof process < "u" && ((e = process == null ? void 0 : process.versions) == null ? void 0 : e.node);
46
+ };
47
+ return !d() && !r();
48
+ }
49
+ let f;
50
+ l() && import("./non-node-runtime.eb7f6595.js").then((r) => {
51
+ f = r.runInNonNode;
52
+ }).catch((r) => {
53
+ const e = "Error importing JS interpreter for non-Node.js runtimes. Make sure `js-interpreter` is installed.\n Read more here: https://github.com/BuilderIO/builder/tree/main/packages/sdks/README.md#non-nodejs-runtimes-edge-serverless\n ";
54
+ a.error(e, r), f = (...n) => {
55
+ a.error(e);
56
+ };
57
+ });
58
+ function R({
59
+ code: r,
60
+ context: e,
61
+ localState: n,
62
+ rootState: i,
63
+ rootSetState: s,
64
+ event: t,
65
+ isExpression: c = !0
66
+ }) {
67
+ if (r === "") {
68
+ a.warn("Skipping evaluation of empty code block.");
69
+ return;
70
+ }
71
+ const u = {
72
+ isEditing: h(),
73
+ isBrowser: d(),
74
+ isServer: !d(),
75
+ getUserAttributes: () => p()
76
+ }, g = {
77
+ code: c && !(r.includes(";") || r.includes(" return ") || r.trim().startsWith("return ")) ? `return (${r});` : r,
78
+ builder: u,
79
+ context: e,
80
+ event: t,
81
+ rootSetState: s,
82
+ rootState: i,
83
+ localState: n
84
+ };
85
+ try {
86
+ return d() ? m(g) : l() ? f(g) : m(g);
87
+ } catch (w) {
88
+ a.error("Failed code evaluation: " + w.message, {
89
+ code: r
90
+ });
91
+ return;
92
+ }
93
+ }
94
+ export {
95
+ R as e,
96
+ E as g
97
+ };
@@ -1,5 +1,5 @@
1
- import { T as s } from "./index.da59485b.js";
2
- import { e as l } from "./evaluate.9bc5efc5.js";
1
+ import { T as s } from "./index.835b8ee0.js";
2
+ import { e as l } from "./evaluate.b622b309.js";
3
3
  const i = (e) => `v-on:${e.toLowerCase()}`, v = (e, t) => (o) => l({
4
4
  code: e,
5
5
  context: t.context,
@@ -1 +1 @@
1
- "use strict";const s=require("./index.d24a9f20.cjs"),l=require("./evaluate.79598493.cjs"),i=e=>`v-on:${e.toLowerCase()}`,u=(e,t)=>a=>l.evaluate({code:e,context:t.context,localState:t.localState,rootState:t.rootState,rootSetState:t.rootSetState,event:a,isExpression:!1});function v(e){var n;const t={},a=(n=e.block.actions)!=null?n:{};for(const o in a){if(!a.hasOwnProperty(o))continue;const r=a[o];let c=i(o);if(e.stripPrefix)switch(s.TARGET){case"vue2":case"vue3":c=c.replace("v-on:","");break;case"svelte":c=c.replace("on:","");break}t[c]=u(r,e)}return t}exports.getBlockActions=v;
1
+ "use strict";const s=require("./index.04a22940.cjs"),l=require("./evaluate.585803ce.cjs"),i=e=>`v-on:${e.toLowerCase()}`,u=(e,t)=>a=>l.evaluate({code:e,context:t.context,localState:t.localState,rootState:t.rootState,rootSetState:t.rootSetState,event:a,isExpression:!1});function v(e){var n;const t={},a=(n=e.block.actions)!=null?n:{};for(const o in a){if(!a.hasOwnProperty(o))continue;const r=a[o];let c=i(o);if(e.stripPrefix)switch(s.TARGET){case"vue2":case"vue3":c=c.replace("v-on:","");break;case"svelte":c=c.replace("on:","");break}t[c]=u(r,e)}return t}exports.getBlockActions=v;
@@ -1,5 +1,5 @@
1
- import { T as o } from "./index.da59485b.js";
2
- import { a } from "./css.dd09e65b.js";
1
+ import { T as o } from "./index.835b8ee0.js";
2
+ import { a } from "./css.3b52add0.js";
3
3
  function n(e) {
4
4
  const t = {};
5
5
  if (typeof e != "string")
@@ -1 +1 @@
1
- "use strict";const c=require("./index.d24a9f20.cjs"),n=require("./css.21080882.cjs");function i(e){const t={};if(typeof e!="string")return t;const r=e.trim().split(/\\s+/);for(const s of r)t[s]=!0;return t}function o(e){return e.class=i(e.class),e}const a=e=>({href:e.href});function u({block:e,context:t}){var s;const r={...a(e),...e.properties,"builder-id":e.id,style:e.style?l(e.style):void 0,class:[e.id,"builder-block",e.class,(s=e.properties)==null?void 0:s.class].filter(Boolean).join(" ")};return o(r)}function l(e){switch(c.TARGET){case"svelte":case"vue2":case"vue3":case"solid":return n.convertStyleMapToCSSArray(e).join(" ");case"qwik":case"reactNative":case"react":case"rsc":return e}}exports.getBlockProperties=u;
1
+ "use strict";const c=require("./index.04a22940.cjs"),n=require("./css.5b6afc6e.cjs");function i(e){const t={};if(typeof e!="string")return t;const r=e.trim().split(/\\s+/);for(const s of r)t[s]=!0;return t}function o(e){return e.class=i(e.class),e}const a=e=>({href:e.href});function u({block:e,context:t}){var s;const r={...a(e),...e.properties,"builder-id":e.id,style:e.style?l(e.style):void 0,class:[e.id,"builder-block",e.class,(s=e.properties)==null?void 0:s.class].filter(Boolean).join(" ")};return o(r)}function l(e){switch(c.TARGET){case"svelte":case"vue2":case"vue3":case"solid":return n.convertStyleMapToCSSArray(e).join(" ");case"qwik":case"reactNative":case"react":case"rsc":return e}}exports.getBlockProperties=u;
@@ -1 +1 @@
1
- "use strict";const d=require("./evaluate.79598493.cjs"),f=require("./index.d24a9f20.cjs"),l=require("./set.87eb0329.cjs");const g=({block:e,context:t,localState:r,rootState:i,rootSetState:o})=>{if(!e.bindings)return e;const n=f.fastClone(e),s={...n,properties:{...n.properties},actions:{...n.actions}};for(const c in e.bindings){const u=e.bindings[c],a=d.evaluate({code:u,localState:r,rootState:i,rootSetState:o,context:t});l.set(s,c,a)}return s};function p({block:e,context:t,shouldEvaluateBindings:r,localState:i,rootState:o,rootSetState:n}){const s=e;return r?g({block:s,localState:i,rootState:o,rootSetState:n,context:t}):s}exports.getProcessedBlock=p;
1
+ "use strict";const d=require("./evaluate.585803ce.cjs"),f=require("./index.04a22940.cjs"),l=require("./set.87eb0329.cjs");const g=({block:e,context:t,localState:r,rootState:i,rootSetState:o})=>{if(!e.bindings)return e;const n=f.fastClone(e),s={...n,properties:{...n.properties},actions:{...n.actions}};for(const c in e.bindings){const u=e.bindings[c],a=d.evaluate({code:u,localState:r,rootState:i,rootSetState:o,context:t});l.set(s,c,a)}return s};function p({block:e,context:t,shouldEvaluateBindings:r,localState:i,rootState:o,rootSetState:n}){const s=e;return r?g({block:s,localState:i,rootState:o,rootSetState:n,context:t}):s}exports.getProcessedBlock=p;
@@ -1,5 +1,5 @@
1
- import { e as p } from "./evaluate.9bc5efc5.js";
2
- import { f as u } from "./index.da59485b.js";
1
+ import { e as p } from "./evaluate.b622b309.js";
2
+ import { f as u } from "./index.835b8ee0.js";
3
3
  import { s as d } from "./set.b219ab0e.js";
4
4
  const m = ({
5
5
  block: n,
@@ -1,4 +1,4 @@
1
- "use strict";const y=require("vue");function T(e={},t,n){const o={};for(const r in e){if(!e[r]||n&&!r.startsWith(t))continue;const s=n?r.replace(t,""):r;o[s]=e[r]}return o}const mt=y.defineComponent({name:"builder-button",props:["attributes","text","link","openLinkInNewTab"],data(){return{filterAttrs:T}},methods:{_classStringToObject(e){const t={};if(typeof e!="string")return t;const n=e.trim().split(/\s+/);for(const o of n)t[o]=!0;return t}}});function _(e,t,n,o,r,s,i,u){var a=typeof e=="function"?e.options:e;t&&(a.render=t,a.staticRenderFns=n,a._compiled=!0),o&&(a.functional=!0),s&&(a._scopeId="data-v-"+s);var d;if(i?(d=function(c){c=c||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext,!c&&typeof __VUE_SSR_CONTEXT__<"u"&&(c=__VUE_SSR_CONTEXT__),r&&r.call(this,c),c&&c._registeredComponents&&c._registeredComponents.add(i)},a._ssrRegister=d):r&&(d=u?function(){r.call(this,(a.functional?this.parent:this).$root.$options.shadowRoot)}:r),d)if(a.functional){a._injectStyles=d;var f=a.render;a.render=function(m,l){return d.call(l),f(m,l)}}else{var p=a.beforeCreate;a.beforeCreate=p?[].concat(p,d):[d]}return{exports:e,options:a}}var ft=function(){var t=this,n=t._self._c;return t._self._setupProxy,t.link?n("a",t._g(t._b({attrs:{role:"button",href:t.link,target:t.openLinkInNewTab?"_blank":void 0}},"a",t.filterAttrs(t.attributes,"v-on:",!1),!1),t.filterAttrs(t.attributes,"v-on:",!0)),[t._v(" "+t._s(t.text)+" ")]):n("button",t._g(t._b({class:t._classStringToObject(t.attributes.class+" button-2fnk003dqad"),style:t.attributes.style},"button",t.filterAttrs(t.attributes,"v-on:",!1),!1),t.filterAttrs(t.attributes,"v-on:",!0)),[t._v(" "+t._s(t.text)+" ")])},pt=[],ht=_(mt,ft,pt,!1,null,"d03c6eb1",null,null);const gt=ht.exports,R=e=>JSON.parse(JSON.stringify(e)),z={small:{min:320,default:321,max:640},medium:{min:641,default:642,max:991},large:{min:990,default:991,max:1200}},_t=(e,t=z)=>`@media (max-width: ${t[e].max}px)`,G=({small:e,medium:t})=>{const n=R(z);if(!e||!t)return n;const o=Math.floor(e/2);n.small={max:e,min:o,default:o+1};const r=n.small.max+1;n.medium={max:t,min:r,default:r+1};const s=n.medium.max+1;return n.large={max:2e3,min:s,default:s+1},n},C="vue2",bt=()=>Promise.resolve().then(()=>H).then(e=>e.default).catch(e=>{throw console.error("Error while attempting to dynamically import component Blocks at ../../components/blocks/blocks.vue",e),e}),yt=()=>Promise.resolve().then(()=>require("./inlined-styles.ef691e26.cjs")).then(e=>e.default).catch(e=>{throw console.error("Error while attempting to dynamically import component InlinedStyles at ../../components/inlined-styles.vue",e),e}),vt=y.defineComponent({name:"builder-columns",components:{"inlined-styles":yt,blocks:bt},props:["js","space","columns","stackColumnsAt","reverseColumnsWhenStacked","builderContext","builderBlock","builderComponents"],data(){return{gutterSize:typeof this.space=="number"?this.space||0:20,cols:this.columns||[],stackAt:this.stackColumnsAt||"tablet",flexDir:this.stackColumnsAt==="never"?"row":this.reverseColumnsWhenStacked?"column-reverse":"column",TARGET:C}},computed:{columnsCssVars(){return{"--flex-dir":this.flexDir,"--flex-dir-tablet":this.getTabletStyle({stackedStyle:this.flexDir,desktopStyle:"row"})}},columnsStyles(){return`
1
+ "use strict";const y=require("vue");function T(e={},t,n){const o={};for(const r in e){if(!e[r]||n&&!r.startsWith(t))continue;const s=n?r.replace(t,""):r;o[s]=e[r]}return o}const pt=y.defineComponent({name:"builder-button",props:["attributes","text","link","openLinkInNewTab"],data(){return{filterAttrs:T}},methods:{_classStringToObject(e){const t={};if(typeof e!="string")return t;const n=e.trim().split(/\s+/);for(const o of n)t[o]=!0;return t}}});function _(e,t,n,o,r,s,i,u){var a=typeof e=="function"?e.options:e;t&&(a.render=t,a.staticRenderFns=n,a._compiled=!0),o&&(a.functional=!0),s&&(a._scopeId="data-v-"+s);var d;if(i?(d=function(c){c=c||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext,!c&&typeof __VUE_SSR_CONTEXT__<"u"&&(c=__VUE_SSR_CONTEXT__),r&&r.call(this,c),c&&c._registeredComponents&&c._registeredComponents.add(i)},a._ssrRegister=d):r&&(d=u?function(){r.call(this,(a.functional?this.parent:this).$root.$options.shadowRoot)}:r),d)if(a.functional){a._injectStyles=d;var f=a.render;a.render=function(m,l){return d.call(l),f(m,l)}}else{var p=a.beforeCreate;a.beforeCreate=p?[].concat(p,d):[d]}return{exports:e,options:a}}var ht=function(){var t=this,n=t._self._c;return t._self._setupProxy,t.link?n("a",t._g(t._b({attrs:{role:"button",href:t.link,target:t.openLinkInNewTab?"_blank":void 0}},"a",t.filterAttrs(t.attributes,"v-on:",!1),!1),t.filterAttrs(t.attributes,"v-on:",!0)),[t._v(" "+t._s(t.text)+" ")]):n("button",t._g(t._b({class:t._classStringToObject(t.attributes.class+" button-2fnk003dqad"),style:t.attributes.style},"button",t.filterAttrs(t.attributes,"v-on:",!1),!1),t.filterAttrs(t.attributes,"v-on:",!0)),[t._v(" "+t._s(t.text)+" ")])},gt=[],_t=_(pt,ht,gt,!1,null,"d03c6eb1",null,null);const bt=_t.exports,R=e=>JSON.parse(JSON.stringify(e)),z={small:{min:320,default:321,max:640},medium:{min:641,default:642,max:991},large:{min:990,default:991,max:1200}},yt=(e,t=z)=>`@media (max-width: ${t[e].max}px)`,G=({small:e,medium:t})=>{const n=R(z);if(!e||!t)return n;const o=Math.floor(e/2);n.small={max:e,min:o,default:o+1};const r=n.small.max+1;n.medium={max:t,min:r,default:r+1};const s=n.medium.max+1;return n.large={max:2e3,min:s,default:s+1},n},C="vue2",vt=()=>Promise.resolve().then(()=>H).then(e=>e.default).catch(e=>{throw console.error("Error while attempting to dynamically import component Blocks at ../../components/blocks/blocks.vue",e),e}),St=()=>Promise.resolve().then(()=>require("./inlined-styles.89ce41e1.cjs")).then(e=>e.default).catch(e=>{throw console.error("Error while attempting to dynamically import component InlinedStyles at ../../components/inlined-styles.vue",e),e}),kt=y.defineComponent({name:"builder-columns",components:{"inlined-styles":St,blocks:vt},props:["js","space","columns","stackColumnsAt","reverseColumnsWhenStacked","builderContext","builderBlock","builderComponents"],data(){return{gutterSize:typeof this.space=="number"?this.space||0:20,cols:this.columns||[],stackAt:this.stackColumnsAt||"tablet",flexDir:this.stackColumnsAt==="never"?"row":this.reverseColumnsWhenStacked?"column-reverse":"column",TARGET:C}},computed:{columnsCssVars(){return{"--flex-dir":this.flexDir,"--flex-dir-tablet":this.getTabletStyle({stackedStyle:this.flexDir,desktopStyle:"row"})}},columnsStyles(){return`
2
2
  @media (max-width: ${this.getWidthForBreakpointSize("medium")}px) {
3
3
  .${this.builderBlock.id}-breakpoints {
4
4
  flex-direction: var(--flex-dir-tablet);
@@ -22,11 +22,11 @@
22
22
  margin-left: var(--column-margin-left-mobile) !important;
23
23
  }
24
24
  },
25
- `}},methods:{getWidth(e){var t;return((t=this.cols[e])==null?void 0:t.width)||100/this.cols.length},getColumnCssWidth(e){const t=this.gutterSize*(this.cols.length-1)/this.cols.length;return`calc(${this.getWidth(e)}% - ${t}px)`},getTabletStyle({stackedStyle:e,desktopStyle:t}){return this.stackAt==="tablet"?e:t},getMobileStyle({stackedStyle:e,desktopStyle:t}){return this.stackAt==="never"?t:e},columnCssVars(e){const t=e===0?0:this.gutterSize,n=this.getColumnCssWidth(e),o=`${t}px`,r="100%",s=0;return{width:n,["margin-left"]:o,"--column-width-mobile":this.getMobileStyle({stackedStyle:r,desktopStyle:n}),"--column-margin-left-mobile":this.getMobileStyle({stackedStyle:s,desktopStyle:o}),"--column-width-tablet":this.getTabletStyle({stackedStyle:r,desktopStyle:n}),"--column-margin-left-tablet":this.getTabletStyle({stackedStyle:s,desktopStyle:o})}},getWidthForBreakpointSize(e){var n,o;return G(((o=(n=this.builderContext.content)==null?void 0:n.meta)==null?void 0:o.breakpoints)||{})[e].max},_classStringToObject(e){const t={};if(typeof e!="string")return t;const n=e.trim().split(/\s+/);for(const o of n)t[o]=!0;return t}}});var St=function(){var t=this,n=t._self._c;return t._self._setupProxy,n("div",t._b({class:t._classStringToObject(`builder-columns ${t.builderBlock.id}-breakpoints div-t9spj7joih`),style:t.columnsCssVars},"div",{},!1),[t.TARGET!=="reactNative"?[n("inlined-styles",{attrs:{styles:t.columnsStyles}})]:t._e(),t._l(t.columns,function(o,r){return n("div",t._b({key:r,staticClass:"builder-column div-t9spj7joih-2",style:t.columnCssVars(r)},"div",{},!1),[n("blocks",{attrs:{blocks:o.blocks,path:`component.options.columns.${r}.blocks`,parent:t.builderBlock.id,styleProp:{flexGrow:"1"},context:t.builderContext,registeredComponents:t.builderComponents}})],1)})],2)},kt=[],Ct=_(vt,St,kt,!1,null,"b1c2e5e0",null,null);const xt=Ct.exports,wt=y.defineComponent({name:"builder-fragment-component",props:[]});var $t=function(){var t=this,n=t._self._c;return t._self._setupProxy,n("span",[t._t("default")],2)},Tt=[],Rt=_(wt,$t,Tt,!1,null,null,null,null);const It=Rt.exports;function M(e){return e.replace(/http(s)?:/,"")}function Pt(e="",t,n){const o=new RegExp("([?&])"+t+"=.*?(&|$)","i"),r=e.indexOf("?")!==-1?"&":"?";return e.match(o)?e.replace(o,"$1"+t+"="+encodeURIComponent(n)+"$2"):e+r+t+"="+encodeURIComponent(n)}function At(e,t){if(!e||!(e!=null&&e.match(/cdn\.shopify\.com/))||!t)return e;if(t==="master")return M(e);const n=e.match(/(_\d+x(\d+)?)?(\.(jpg|jpeg|gif|png|bmp|bitmap|tiff|tif)(\?v=\d+)?)/i);if(n){const o=e.split(n[0]),r=n[3],s=t.match("x")?t:`${t}x`;return M(`${o[0]}_${s}${r}`)}return null}function P(e){if(!e)return e;const t=[100,200,400,800,1200,1600,2e3];if(e.match(/builder\.io/)){let n=e;const o=Number(e.split("?width=")[1]);return isNaN(o)||(n=`${n} ${o}w`),t.filter(r=>r!==o).map(r=>`${Pt(e,"width",r)} ${r}w`).concat([n]).join(", ")}return e.match(/cdn\.shopify\.com/)?t.map(n=>[At(e,`${n}x${n}`),n]).filter(([n])=>!!n).map(([n,o])=>`${n} ${o}w`).concat([e]).join(", "):e}const Et=y.defineComponent({name:"builder-image",props:["image","src","srcset","noWebp","aspectRatio","altText","backgroundPosition","backgroundSize","className","sizes","builderBlock","fitContent"],computed:{srcSetToUse(){var n;const t=this.image||this.src;if(!t||!(t.match(/builder\.io/)||t.match(/cdn\.shopify\.com/)))return this.srcset;if(this.srcset&&((n=this.image)==null?void 0:n.includes("builder.io/api/v1/image"))){if(!this.srcset.includes(this.image.split("?")[0]))return console.debug("Removed given srcset"),P(t)}else if(this.image&&!this.srcset)return P(t);return P(t)},webpSrcSet(){var e;return((e=this.srcSetToUse)==null?void 0:e.match(/builder\.io/))&&!this.noWebp?this.srcSetToUse.replace(/\?/g,"?format=webp&"):""},aspectRatioCss(){const e={position:"absolute",height:"100%",width:"100%",left:"0px",top:"0px"};return this.aspectRatio?e:void 0}},methods:{_classStringToObject(e){const t={};if(typeof e!="string")return t;const n=e.trim().split(/\s+/);for(const o of n)t[o]=!0;return t}}});var Ot=function(){var o,r,s,i;var t=this,n=t._self._c;return t._self._setupProxy,n("div",[n("picture",[t.webpSrcSet?[n("source",{attrs:{type:"image/webp",srcset:t.webpSrcSet}})]:t._e(),n("img",{class:t._classStringToObject("builder-image"+(t.className?" "+t.className:"")+" img-1pl23ac79ld"),style:{objectPosition:t.backgroundPosition||"center",objectFit:t.backgroundSize||"cover",...t.aspectRatioCss},attrs:{loading:"lazy",alt:t.altText,role:t.altText?"presentation":void 0,src:t.image,srcset:t.srcSetToUse,sizes:t.sizes}})],2),t.aspectRatio&&!(((r=(o=t.builderBlock)==null?void 0:o.children)==null?void 0:r.length)&&t.fitContent)?[n("div",{staticClass:"builder-image-sizer div-1pl23ac79ld",style:{paddingTop:t.aspectRatio*100+"%"}})]:t._e(),((i=(s=t.builderBlock)==null?void 0:s.children)==null?void 0:i.length)&&t.fitContent?[t._t("default")]:t._e(),!t.fitContent&&t.$slots.default?[n("div",{staticClass:"div-1pl23ac79ld-2"},[t._t("default")],2)]:t._e()],2)},Vt=[],Bt=_(Et,Ot,Vt,!1,null,"29cdebee",null,null);const jt=Bt.exports,Nt=y.defineComponent({name:"builder-section-component",props:["attributes","maxWidth"],data(){return{filterAttrs:T}}});var Ft=function(){var t=this,n=t._self._c;return t._self._setupProxy,n("section",t._g(t._b({style:{width:"100%",alignSelf:"stretch",flexGrow:1,boxSizing:"border-box",maxWidth:t.maxWidth||1200,display:"flex",flexDirection:"column",alignItems:"stretch",marginLeft:"auto",marginRight:"auto"}},"section",t.filterAttrs(t.attributes,"v-on:",!1),!1),t.filterAttrs(t.attributes,"v-on:",!0)),[t._t("default")],2)},Ut=[],Mt=_(Nt,Ft,Ut,!1,null,null,null,null);const Wt=Mt.exports,w="[Builder.io]: ",v={log:(...e)=>console.log(w,...e),error:(...e)=>console.error(w,...e),warn:(...e)=>console.warn(w,...e),debug:(...e)=>console.debug(w,...e)},Lt=async({builderContextValue:e,symbol:t})=>{if((t==null?void 0:t.model)&&(e==null?void 0:e.apiKey))return I({model:t.model,apiKey:e.apiKey,apiVersion:e.apiVersion,...(t==null?void 0:t.entry)&&{query:{id:t.entry}}}).catch(n=>{v.error("Could not fetch symbol content: ",n)})},Kt=()=>Promise.resolve().then(()=>Ue).then(e=>e.default).catch(e=>{throw console.error("Error while attempting to dynamically import component ContentVariants at ../../components/content-variants/content-variants.vue",e),e}),zt=y.defineComponent({name:"builder-symbol",components:{"content-variants":Kt},props:["js","attributes","symbol","dynamic","builderContext","builderComponents"],data(){var e;return{contentToUse:(e=this.symbol)==null?void 0:e.content,filterAttrs:T}},mounted(){this.setContent()},watch:{onUpdateHook0:{handler(){this.setContent()},immediate:!0}},computed:{className(){var e,t;return[...Object.keys(this.attributes.class),"builder-symbol",(e=this.symbol)!=null&&e.inline?"builder-inline-symbol":void 0,((t=this.symbol)==null?void 0:t.dynamic)||this.dynamic?"builder-dynamic-symbol":void 0].filter(Boolean).join(" ")},onUpdateHook0(){return{0:this.symbol}}},methods:{setContent(){this.contentToUse||Lt({symbol:this.symbol,builderContextValue:this.builderContext}).then(e=>{e&&(this.contentToUse=e)})},_classStringToObject(e){const t={};if(typeof e!="string")return t;const n=e.trim().split(/\s+/);for(const o of n)t[o]=!0;return t}}});var Gt=function(){var o,r,s,i;var t=this,n=t._self._c;return t._self._setupProxy,n("div",t._g(t._b({class:t._classStringToObject(t.className)},"div",{...t.filterAttrs(t.attributes,"v-on:",!1)},!1),t.filterAttrs(t.attributes,"v-on:",!0)),[n("content-variants",{attrs:{__isNestedRender:!0,apiVersion:t.builderContext.apiVersion,apiKey:t.builderContext.apiKey,context:t.builderContext.context,customComponents:Object.values(t.builderComponents),data:{...(o=t.symbol)==null?void 0:o.data,...t.builderContext.localState,...(s=(r=t.contentToUse)==null?void 0:r.data)==null?void 0:s.state},model:(i=t.symbol)==null?void 0:i.model,content:t.contentToUse}})],1)},qt=[],Dt=_(zt,Gt,qt,!1,null,null,null,null);const Ht=Dt.exports,Jt=y.defineComponent({name:"builder-text",props:["text"]});var Qt=function(){var o;var t=this,n=t._self._c;return t._self._setupProxy,n("span",t._b({staticClass:"builder-text",style:{outline:"none"},domProps:{innerHTML:t._s(((o=t.text)==null?void 0:o.toString())||"")}},"span",{},!1))},Xt=[],Yt=_(Jt,Qt,Xt,!1,null,null,null,null);const Zt=Yt.exports,te=y.defineComponent({name:"builder-video",props:["autoPlay","muted","controls","loop","playsInline","attributes","preload","fit","position","video","posterImage"],computed:{videoProps(){return{...this.autoPlay===!0?{autoPlay:!0}:{},...this.muted===!0?{muted:!0}:{},...this.controls===!0?{controls:!0}:{},...this.loop===!0?{loop:!0}:{},...this.playsInline===!0?{playsInline:!0}:{}}},spreadProps(){return{...this.attributes,...this.videoProps}}}});var ee=function(){var o;var t=this,n=t._self._c;return t._self._setupProxy,n("video",t._b({style:{width:"100%",height:"100%",...(o=t.attributes)==null?void 0:o.style,objectFit:t.fit,objectPosition:t.position,borderRadius:1},attrs:{preload:t.preload||"metadata",src:t.video||"no-src",poster:t.posterImage}},"video",t.spreadProps,!1))},ne=[],oe=_(te,ee,ne,!1,null,null,null,null);const re=oe.exports,se=Symbol(),q={Builder:{content:null,context:{},localState:void 0,rootSetState(){},rootState:{},apiKey:null,apiVersion:void 0,componentInfos:{},inheritedStyles:{}},key:se},ie=Symbol(),D={Components:{registeredComponents:{}},key:ie},ae=()=>Promise.resolve().then(()=>require("./block-styles.d4e625bc.cjs")).then(e=>e.default).catch(e=>{throw console.error("Error while attempting to dynamically import component BlockStyles at ../block/components/block-styles.vue",e),e}),ce=()=>Promise.resolve().then(()=>require("./block.1c14e1e8.cjs")).then(e=>e.default).catch(e=>{throw console.error("Error while attempting to dynamically import component Block at ../block/block.vue",e),e}),le=()=>Promise.resolve().then(()=>require("./blocks-wrapper.42eb4446.cjs")).then(e=>e.default).catch(e=>{throw console.error("Error while attempting to dynamically import component BlocksWrapper at ./blocks-wrapper.vue",e),e}),ue=y.defineComponent({name:"builder-blocks",components:{"blocks-wrapper":le,block:ce,"block-styles":ae},props:["blocks","parent","path","styleProp","context","registeredComponents"],inject:{builderContext:q.key,componentsContext:D.key}});var de=function(){var t=this,n=t._self._c;return t._self._setupProxy,n("blocks-wrapper",{attrs:{blocks:t.blocks,parent:t.parent,path:t.path,styleProp:t.styleProp}},[t.blocks?t._l(t.blocks,function(o,r){return n("block",{key:"render-block-"+o.id,attrs:{block:o,context:t.context||t.builderContext,registeredComponents:t.registeredComponents||t.componentsContext.registeredComponents}})}):t._e(),t.blocks?t._l(t.blocks,function(o,r){return n("block-styles",{key:"block-style-"+o.id,attrs:{block:o,context:t.context||t.builderContext}})}):t._e()],2)},me=[],fe=_(ue,de,me,!1,null,null,null,null);const O=fe.exports,H=Object.freeze(Object.defineProperty({__proto__:null,default:O},Symbol.toStringTag,{value:"Module"}));function b(){return typeof window<"u"&&typeof document<"u"}const $=e=>Object.values((e==null?void 0:e.variations)||{}).map(t=>({...t,testVariationId:t.id,id:e==null?void 0:e.id})),pe=({canTrack:e,content:t})=>!(!($(t).length>0)||!e);function he(e,t,n){var i;function o(){function u(l,h,S){let x="";if(S){const g=new Date;g.setTime(g.getTime()+S*24*60*60*1e3),x="; expires="+g.toUTCString()}document.cookie=l+"="+(h||"")+x+"; path=/; Secure; SameSite=None"}function a(l){const h=l+"=",S=document.cookie.split(";");for(let x=0;x<S.length;x++){let g=S[x];for(;g.charAt(0)===" ";)g=g.substring(1,g.length);if(g.indexOf(h)===0)return g.substring(h.length,g.length)}return null}const d=`builder.tests.${e}`,f=a(d),p=t.map(l=>l.id).concat(e);if(f&&p.includes(f))return f;let c=0;const m=Math.random();for(let l=0;l<t.length;l++){const h=t[l],S=h.testRatio;if(c+=S,m<c)return u(d,h.id),h.id}return u(d,e),e}const r=o(),s=(i=document.currentScript)==null?void 0:i.previousElementSibling;if(n){s.remove();const u=document.currentScript;u==null||u.remove()}else{const u=t.concat({id:e}).filter(a=>a.id!==r).map(a=>`.variant-${a.id} { display: none; }
26
- `).join("");s.innerHTML=u}}function ge(e,t,n){var a;if(!navigator.cookieEnabled)return;function o(d){const f=d+"=",p=document.cookie.split(";");for(let c=0;c<p.length;c++){let m=p[c];for(;m.charAt(0)===" ";)m=m.substring(1,m.length);if(m.indexOf(f)===0)return m.substring(f.length,m.length)}return null}const r=`builder.tests.${t}`,s=o(r),i=(a=document.currentScript)==null?void 0:a.parentElement,u=e===t;if(s===e){if(u)return;i==null||i.removeAttribute("hidden"),i==null||i.removeAttribute("aria-hidden")}else{u&&(n?i==null||i.remove():(i==null||i.setAttribute("hidden","true"),i==null||i.setAttribute("aria-hidden","true")));return}}const _e=e=>e==="react"||e==="reactNative",J=_e(C),Q="builderIoAbTest",X="builderIoRenderContent",be=()=>{const e=he.toString().replace(/\s+/g," "),t=ge.toString().replace(/\s+/g," ");return`
25
+ `}},methods:{getWidth(e){var t;return((t=this.cols[e])==null?void 0:t.width)||100/this.cols.length},getColumnCssWidth(e){const t=this.gutterSize*(this.cols.length-1)/this.cols.length;return`calc(${this.getWidth(e)}% - ${t}px)`},getTabletStyle({stackedStyle:e,desktopStyle:t}){return this.stackAt==="tablet"?e:t},getMobileStyle({stackedStyle:e,desktopStyle:t}){return this.stackAt==="never"?t:e},columnCssVars(e){const t=e===0?0:this.gutterSize,n=this.getColumnCssWidth(e),o=`${t}px`,r="100%",s=0;return{width:n,["margin-left"]:o,"--column-width-mobile":this.getMobileStyle({stackedStyle:r,desktopStyle:n}),"--column-margin-left-mobile":this.getMobileStyle({stackedStyle:s,desktopStyle:o}),"--column-width-tablet":this.getTabletStyle({stackedStyle:r,desktopStyle:n}),"--column-margin-left-tablet":this.getTabletStyle({stackedStyle:s,desktopStyle:o})}},getWidthForBreakpointSize(e){var n,o;return G(((o=(n=this.builderContext.content)==null?void 0:n.meta)==null?void 0:o.breakpoints)||{})[e].max},_classStringToObject(e){const t={};if(typeof e!="string")return t;const n=e.trim().split(/\s+/);for(const o of n)t[o]=!0;return t}}});var Ct=function(){var t=this,n=t._self._c;return t._self._setupProxy,n("div",t._b({class:t._classStringToObject(`builder-columns ${t.builderBlock.id}-breakpoints div-t9spj7joih`),style:t.columnsCssVars},"div",{},!1),[t.TARGET!=="reactNative"?[n("inlined-styles",{attrs:{styles:t.columnsStyles}})]:t._e(),t._l(t.columns,function(o,r){return n("div",t._b({key:r,staticClass:"builder-column div-t9spj7joih-2",style:t.columnCssVars(r)},"div",{},!1),[n("blocks",{attrs:{blocks:o.blocks,path:`component.options.columns.${r}.blocks`,parent:t.builderBlock.id,styleProp:{flexGrow:"1"},context:t.builderContext,registeredComponents:t.builderComponents}})],1)})],2)},xt=[],wt=_(kt,Ct,xt,!1,null,"b1c2e5e0",null,null);const $t=wt.exports,Tt=y.defineComponent({name:"builder-fragment-component",props:[]});var Rt=function(){var t=this,n=t._self._c;return t._self._setupProxy,n("span",[t._t("default")],2)},It=[],Pt=_(Tt,Rt,It,!1,null,null,null,null);const At=Pt.exports;function M(e){return e.replace(/http(s)?:/,"")}function Et(e="",t,n){const o=new RegExp("([?&])"+t+"=.*?(&|$)","i"),r=e.indexOf("?")!==-1?"&":"?";return e.match(o)?e.replace(o,"$1"+t+"="+encodeURIComponent(n)+"$2"):e+r+t+"="+encodeURIComponent(n)}function Ot(e,t){if(!e||!(e!=null&&e.match(/cdn\.shopify\.com/))||!t)return e;if(t==="master")return M(e);const n=e.match(/(_\d+x(\d+)?)?(\.(jpg|jpeg|gif|png|bmp|bitmap|tiff|tif)(\?v=\d+)?)/i);if(n){const o=e.split(n[0]),r=n[3],s=t.match("x")?t:`${t}x`;return M(`${o[0]}_${s}${r}`)}return null}function P(e){if(!e)return e;const t=[100,200,400,800,1200,1600,2e3];if(e.match(/builder\.io/)){let n=e;const o=Number(e.split("?width=")[1]);return isNaN(o)||(n=`${n} ${o}w`),t.filter(r=>r!==o).map(r=>`${Et(e,"width",r)} ${r}w`).concat([n]).join(", ")}return e.match(/cdn\.shopify\.com/)?t.map(n=>[Ot(e,`${n}x${n}`),n]).filter(([n])=>!!n).map(([n,o])=>`${n} ${o}w`).concat([e]).join(", "):e}const Vt=y.defineComponent({name:"builder-image",props:["image","src","srcset","noWebp","aspectRatio","altText","backgroundPosition","backgroundSize","className","sizes","builderBlock","fitContent"],computed:{srcSetToUse(){var n;const t=this.image||this.src;if(!t||!(t.match(/builder\.io/)||t.match(/cdn\.shopify\.com/)))return this.srcset;if(this.srcset&&((n=this.image)==null?void 0:n.includes("builder.io/api/v1/image"))){if(!this.srcset.includes(this.image.split("?")[0]))return console.debug("Removed given srcset"),P(t)}else if(this.image&&!this.srcset)return P(t);return P(t)},webpSrcSet(){var e;return((e=this.srcSetToUse)==null?void 0:e.match(/builder\.io/))&&!this.noWebp?this.srcSetToUse.replace(/\?/g,"?format=webp&"):""},aspectRatioCss(){const e={position:"absolute",height:"100%",width:"100%",left:"0px",top:"0px"};return this.aspectRatio?e:void 0}},methods:{_classStringToObject(e){const t={};if(typeof e!="string")return t;const n=e.trim().split(/\s+/);for(const o of n)t[o]=!0;return t}}});var Bt=function(){var o,r,s,i;var t=this,n=t._self._c;return t._self._setupProxy,n("div",[n("picture",[t.webpSrcSet?[n("source",{attrs:{type:"image/webp",srcset:t.webpSrcSet}})]:t._e(),n("img",{class:t._classStringToObject("builder-image"+(t.className?" "+t.className:"")+" img-1pl23ac79ld"),style:{objectPosition:t.backgroundPosition||"center",objectFit:t.backgroundSize||"cover",...t.aspectRatioCss},attrs:{loading:"lazy",alt:t.altText,role:t.altText?"presentation":void 0,src:t.image,srcset:t.srcSetToUse,sizes:t.sizes}})],2),t.aspectRatio&&!(((r=(o=t.builderBlock)==null?void 0:o.children)==null?void 0:r.length)&&t.fitContent)?[n("div",{staticClass:"builder-image-sizer div-1pl23ac79ld",style:{paddingTop:t.aspectRatio*100+"%"}})]:t._e(),((i=(s=t.builderBlock)==null?void 0:s.children)==null?void 0:i.length)&&t.fitContent?[t._t("default")]:t._e(),!t.fitContent&&t.$slots.default?[n("div",{staticClass:"div-1pl23ac79ld-2"},[t._t("default")],2)]:t._e()],2)},jt=[],Nt=_(Vt,Bt,jt,!1,null,"29cdebee",null,null);const Ft=Nt.exports,Ut=y.defineComponent({name:"builder-section-component",props:["attributes","maxWidth"],data(){return{filterAttrs:T}}});var Mt=function(){var t=this,n=t._self._c;return t._self._setupProxy,n("section",t._g(t._b({style:{width:"100%",alignSelf:"stretch",flexGrow:1,boxSizing:"border-box",maxWidth:t.maxWidth||1200,display:"flex",flexDirection:"column",alignItems:"stretch",marginLeft:"auto",marginRight:"auto"}},"section",t.filterAttrs(t.attributes,"v-on:",!1),!1),t.filterAttrs(t.attributes,"v-on:",!0)),[t._t("default")],2)},Wt=[],Lt=_(Ut,Mt,Wt,!1,null,null,null,null);const Kt=Lt.exports,w="[Builder.io]: ",v={log:(...e)=>console.log(w,...e),error:(...e)=>console.error(w,...e),warn:(...e)=>console.warn(w,...e),debug:(...e)=>console.debug(w,...e)},zt=async({builderContextValue:e,symbol:t})=>{if((t==null?void 0:t.model)&&(e==null?void 0:e.apiKey))return I({model:t.model,apiKey:e.apiKey,apiVersion:e.apiVersion,...(t==null?void 0:t.entry)&&{query:{id:t.entry}}}).catch(n=>{v.error("Could not fetch symbol content: ",n)})},Gt=()=>Promise.resolve().then(()=>We).then(e=>e.default).catch(e=>{throw console.error("Error while attempting to dynamically import component ContentVariants at ../../components/content-variants/content-variants.vue",e),e}),qt=y.defineComponent({name:"builder-symbol",components:{"content-variants":Gt},props:["js","attributes","symbol","dynamic","builderContext","builderComponents"],data(){var e;return{contentToUse:(e=this.symbol)==null?void 0:e.content,filterAttrs:T}},mounted(){this.setContent()},watch:{onUpdateHook0:{handler(){this.setContent()},immediate:!0}},computed:{className(){var e,t;return[...Object.keys(this.attributes.class),"builder-symbol",(e=this.symbol)!=null&&e.inline?"builder-inline-symbol":void 0,((t=this.symbol)==null?void 0:t.dynamic)||this.dynamic?"builder-dynamic-symbol":void 0].filter(Boolean).join(" ")},onUpdateHook0(){return{0:this.symbol}}},methods:{setContent(){this.contentToUse||zt({symbol:this.symbol,builderContextValue:this.builderContext}).then(e=>{e&&(this.contentToUse=e)})},_classStringToObject(e){const t={};if(typeof e!="string")return t;const n=e.trim().split(/\s+/);for(const o of n)t[o]=!0;return t}}});var Dt=function(){var o,r,s,i;var t=this,n=t._self._c;return t._self._setupProxy,n("div",t._g(t._b({class:t._classStringToObject(t.className)},"div",{...t.filterAttrs(t.attributes,"v-on:",!1)},!1),t.filterAttrs(t.attributes,"v-on:",!0)),[n("content-variants",{attrs:{__isNestedRender:!0,apiVersion:t.builderContext.apiVersion,apiKey:t.builderContext.apiKey,context:t.builderContext.context,customComponents:Object.values(t.builderComponents),data:{...(o=t.symbol)==null?void 0:o.data,...t.builderContext.localState,...(s=(r=t.contentToUse)==null?void 0:r.data)==null?void 0:s.state},model:(i=t.symbol)==null?void 0:i.model,content:t.contentToUse}})],1)},Ht=[],Jt=_(qt,Dt,Ht,!1,null,null,null,null);const Qt=Jt.exports,Xt=y.defineComponent({name:"builder-text",props:["text"]});var Yt=function(){var o;var t=this,n=t._self._c;return t._self._setupProxy,n("span",t._b({staticClass:"builder-text",style:{outline:"none"},domProps:{innerHTML:t._s(((o=t.text)==null?void 0:o.toString())||"")}},"span",{},!1))},Zt=[],te=_(Xt,Yt,Zt,!1,null,null,null,null);const ee=te.exports,ne=y.defineComponent({name:"builder-video",props:["autoPlay","muted","controls","loop","playsInline","attributes","preload","fit","position","video","posterImage"],computed:{videoProps(){return{...this.autoPlay===!0?{autoPlay:!0}:{},...this.muted===!0?{muted:!0}:{},...this.controls===!0?{controls:!0}:{},...this.loop===!0?{loop:!0}:{},...this.playsInline===!0?{playsInline:!0}:{}}},spreadProps(){return{...this.attributes,...this.videoProps}}}});var oe=function(){var o;var t=this,n=t._self._c;return t._self._setupProxy,n("video",t._b({style:{width:"100%",height:"100%",...(o=t.attributes)==null?void 0:o.style,objectFit:t.fit,objectPosition:t.position,borderRadius:1},attrs:{preload:t.preload||"metadata",src:t.video||"no-src",poster:t.posterImage}},"video",t.spreadProps,!1))},re=[],se=_(ne,oe,re,!1,null,null,null,null);const ie=se.exports,ae=Symbol(),q={Builder:{content:null,context:{},localState:void 0,rootSetState(){},rootState:{},apiKey:null,apiVersion:void 0,componentInfos:{},inheritedStyles:{}},key:ae},ce=Symbol(),D={Components:{registeredComponents:{}},key:ce},le=()=>Promise.resolve().then(()=>require("./block-styles.e0c362f1.cjs")).then(e=>e.default).catch(e=>{throw console.error("Error while attempting to dynamically import component BlockStyles at ../block/components/block-styles.vue",e),e}),ue=()=>Promise.resolve().then(()=>require("./block.2b1ac86c.cjs")).then(e=>e.default).catch(e=>{throw console.error("Error while attempting to dynamically import component Block at ../block/block.vue",e),e}),de=()=>Promise.resolve().then(()=>require("./blocks-wrapper.87c356a1.cjs")).then(e=>e.default).catch(e=>{throw console.error("Error while attempting to dynamically import component BlocksWrapper at ./blocks-wrapper.vue",e),e}),me=y.defineComponent({name:"builder-blocks",components:{"blocks-wrapper":de,block:ue,"block-styles":le},props:["blocks","parent","path","styleProp","context","registeredComponents"],inject:{builderContext:q.key,componentsContext:D.key}});var fe=function(){var t=this,n=t._self._c;return t._self._setupProxy,n("blocks-wrapper",{attrs:{blocks:t.blocks,parent:t.parent,path:t.path,styleProp:t.styleProp}},[t.blocks?t._l(t.blocks,function(o,r){return n("block",{key:"render-block-"+o.id,attrs:{block:o,context:t.context||t.builderContext,registeredComponents:t.registeredComponents||t.componentsContext.registeredComponents}})}):t._e(),t.blocks?t._l(t.blocks,function(o,r){return n("block-styles",{key:"block-style-"+o.id,attrs:{block:o,context:t.context||t.builderContext}})}):t._e()],2)},pe=[],he=_(me,fe,pe,!1,null,null,null,null);const O=he.exports,H=Object.freeze(Object.defineProperty({__proto__:null,default:O},Symbol.toStringTag,{value:"Module"}));function b(){return typeof window<"u"&&typeof document<"u"}const $=e=>Object.values((e==null?void 0:e.variations)||{}).map(t=>({...t,testVariationId:t.id,id:e==null?void 0:e.id})),ge=({canTrack:e,content:t})=>!(!($(t).length>0)||!e);function _e(e,t,n){var i;function o(){function u(l,h,S){let x="";if(S){const g=new Date;g.setTime(g.getTime()+S*24*60*60*1e3),x="; expires="+g.toUTCString()}document.cookie=l+"="+(h||"")+x+"; path=/; Secure; SameSite=None"}function a(l){const h=l+"=",S=document.cookie.split(";");for(let x=0;x<S.length;x++){let g=S[x];for(;g.charAt(0)===" ";)g=g.substring(1,g.length);if(g.indexOf(h)===0)return g.substring(h.length,g.length)}return null}const d=`builder.tests.${e}`,f=a(d),p=t.map(l=>l.id).concat(e);if(f&&p.includes(f))return f;let c=0;const m=Math.random();for(let l=0;l<t.length;l++){const h=t[l],S=h.testRatio;if(c+=S,m<c)return u(d,h.id),h.id}return u(d,e),e}const r=o(),s=(i=document.currentScript)==null?void 0:i.previousElementSibling;if(n){s.remove();const u=document.currentScript;u==null||u.remove()}else{const u=t.concat({id:e}).filter(a=>a.id!==r).map(a=>`.variant-${a.id} { display: none; }
26
+ `).join("");s.innerHTML=u}}function be(e,t,n){var a;if(!navigator.cookieEnabled)return;function o(d){const f=d+"=",p=document.cookie.split(";");for(let c=0;c<p.length;c++){let m=p[c];for(;m.charAt(0)===" ";)m=m.substring(1,m.length);if(m.indexOf(f)===0)return m.substring(f.length,m.length)}return null}const r=`builder.tests.${t}`,s=o(r),i=(a=document.currentScript)==null?void 0:a.parentElement,u=e===t;if(s===e){if(u)return;i==null||i.removeAttribute("hidden"),i==null||i.removeAttribute("aria-hidden")}else{u&&(n?i==null||i.remove():(i==null||i.setAttribute("hidden","true"),i==null||i.setAttribute("aria-hidden","true")));return}}const ye=e=>e==="react"||e==="reactNative",J=ye(C),Q="builderIoAbTest",X="builderIoRenderContent",ve=()=>{const e=_e.toString().replace(/\s+/g," "),t=be.toString().replace(/\s+/g," ");return`
27
27
  window.${Q} = ${e}
28
28
  window.${X} = ${t}
29
- `},ye=(e,t)=>`
30
- window.${Q}("${t}",${JSON.stringify(e)}, ${J})`,ve=({contentId:e,variationId:t})=>`
31
- window.${X}("${t}", "${e}", ${J})`,k=e=>e!=null,A=e=>k(e)?e:!0,Se=e=>{if(e==="localhost"||e==="127.0.0.1")return e;const t=e.split(".");return t.length>2?t.slice(1).join("."):e},Y=({name:e,canTrack:t})=>{var n;try{return t?(n=document.cookie.split("; ").find(o=>o.startsWith(`${e}=`)))==null?void 0:n.split("=")[1]:void 0}catch(o){v.warn("[COOKIE] GET error: ",(o==null?void 0:o.message)||o);return}},Z=async e=>Y(e),ke=e=>e.map(([t,n])=>n?`${t}=${n}`:t).filter(k).join("; "),Ce=[["secure",""],["SameSite","None"]],xe=({name:e,value:t,expires:n})=>{const r=(b()?location.protocol==="https:":!0)?Ce:[[]],s=n?[["expires",n.toUTCString()]]:[[]],i=[[e,t],...s,["path","/"],["domain",Se(window.location.hostname)],...r];return ke(i)},tt=async({name:e,value:t,expires:n,canTrack:o})=>{try{if(!o)return;const r=xe({name:e,value:t,expires:n});document.cookie=r}catch(r){v.warn("[COOKIE] SET error: ",(r==null?void 0:r.message)||r)}},we="builder.tests",V=e=>`${we}.${e}`,$e=({contentId:e})=>Z({name:V(e),canTrack:!0}),Te=({contentId:e})=>Y({name:V(e),canTrack:!0}),Re=({contentId:e,value:t})=>tt({name:V(e),value:t,canTrack:!0}),et=e=>k(e.id)&&k(e.variations)&&Object.keys(e.variations).length>0,Ie=({id:e,variations:t})=>{var r;let n=0;const o=Math.random();for(const s in t){const i=(r=t[s])==null?void 0:r.testRatio;if(n+=i,o<n)return s}return e},nt=e=>{const t=Ie(e);return Re({contentId:e.id,value:t}).catch(n=>{v.error("could not store A/B test variation: ",n)}),t},ot=({item:e,testGroupId:t})=>{const n=e.variations[t];return t===e.id||!n?{testVariationId:e.id,testVariationName:"Default"}:{data:n.data,testVariationId:n.id,testVariationName:n.name||(n.id===e.id?"Default":"")}},Pe=({item:e,canTrack:t})=>{if(!t)return e;if(!e)return;if(!et(e))return e;const n=Te({contentId:e.id})||nt({variations:e.variations,id:e.id}),o=ot({item:e,testGroupId:n});return{...e,...o}},Ae=async({item:e,canTrack:t})=>{if(!t||!et(e))return e;const o=await $e({contentId:e.id})||nt({variations:e.variations,id:e.id}),r=ot({item:e,testGroupId:o});return{...e,...r}},Ee=()=>Promise.resolve().then(()=>require("./content.e5d197c3.cjs")).then(e=>e.default).catch(e=>{throw console.error("Error while attempting to dynamically import component ContentComponent at ../content/content.vue",e),e}),Oe=()=>Promise.resolve().then(()=>require("./inlined-styles.ef691e26.cjs")).then(e=>e.default).catch(e=>{throw console.error("Error while attempting to dynamically import component InlinedStyles at ../inlined-styles.vue",e),e}),Ve=()=>Promise.resolve().then(()=>require("./inlined-script.7d9f29c5.cjs")).then(e=>e.default).catch(e=>{throw console.error("Error while attempting to dynamically import component InlinedScript at ../inlined-script.vue",e),e}),Be=y.defineComponent({name:"content-variants",components:{"inlined-script":Ve,"inlined-styles":Oe,"content-component":Ee},props:["canTrack","content","__isNestedRender","model","data","context","apiKey","apiVersion","customComponents","locale","includeRefs","enrich"],data(){return{shouldRenderVariants:pe({canTrack:A(this.canTrack),content:this.content}),getScriptString:be,getVariants:$,TARGET:C}},mounted(){this.shouldRenderVariants=!1},computed:{variantScriptStr(){var e;return ye($(this.content).map(t=>({id:t.testVariationId,testRatio:t.testRatio})),((e=this.content)==null?void 0:e.id)||"")},hideVariantsStyleString(){return $(this.content).map(e=>`.variant-${e.testVariationId} { display: none; } `).join("")},defaultContent(){var e;return this.shouldRenderVariants?{...this.content,testVariationId:(e=this.content)==null?void 0:e.id}:Pe({item:this.content,canTrack:A(this.canTrack)})}}});var je=function(){var o,r;var t=this,n=t._self._c;return t._self._setupProxy,n("div",[!t.__isNestedRender&&t.TARGET!=="reactNative"?[n("inlined-script",{attrs:{scriptStr:t.getScriptString()}})]:t._e(),t.shouldRenderVariants?[n("inlined-styles",{attrs:{id:`variants-styles-${(o=t.content)==null?void 0:o.id}`,styles:t.hideVariantsStyleString}}),n("inlined-script",{attrs:{scriptStr:t.variantScriptStr}}),t._l(t.getVariants(t.content),function(s,i){return n("content-component",{key:s.testVariationId,attrs:{content:s,showContent:!1,classNameProp:void 0,model:t.model,data:t.data,context:t.context,apiKey:t.apiKey,apiVersion:t.apiVersion,customComponents:t.customComponents,canTrack:t.canTrack,locale:t.locale,includeRefs:t.includeRefs,enrich:t.enrich,isSsrAbTest:t.shouldRenderVariants}})})]:t._e(),n("content-component",t._b({attrs:{content:t.defaultContent,classNameProp:`variant-${(r=t.content)==null?void 0:r.id}`,showContent:!0,model:t.model,data:t.data,context:t.context,apiKey:t.apiKey,apiVersion:t.apiVersion,customComponents:t.customComponents,canTrack:t.canTrack,locale:t.locale,includeRefs:t.includeRefs,enrich:t.enrich,isSsrAbTest:t.shouldRenderVariants}},"content-component",{key:t.shouldRenderVariants.toString()},!1))],2)},Ne=[],Fe=_(Be,je,Ne,!1,null,null,null,null);const B=Fe.exports,Ue=Object.freeze(Object.defineProperty({__proto__:null,default:B},Symbol.toStringTag,{value:"Module"})),Me=O,We=B;function Le(){return b()&&window.self!==window.top}function j(){return Le()&&window.location.search.indexOf("builder.frameEditing=")!==-1}function Ke(){return!b()||j()?!1:Boolean(location.search.indexOf("builder.preview=")!==-1)}const ze=[],Ge=e=>({type:"builder.registerComponent",data:e}),qe=e=>{const t=e.toString().trim();return`return (${!t.startsWith("function")&&!t.startsWith("(")?"function ":""}${t}).apply(this, arguments)`},De=e=>typeof e=="function"?qe(e):R(e),He=({inputs:e,...t})=>({...R(t),inputs:e==null?void 0:e.map(n=>Object.entries(n).reduce((o,[r,s])=>({...o,[r]:De(s)}),{}))}),W={};function Je(e,t){let n=W[e];if(n||(n=W[e]=[]),n.push(t),b()){const o={type:"builder.register",data:{type:e,info:t}};try{parent.postMessage(o,"*"),parent!==window&&window.postMessage(o,"*")}catch(r){console.debug("Could not postmessage",r)}}}const L={};function Qe(e){if(b()){Object.assign(L,e);const t={type:"builder.settingsChange",data:L};parent.postMessage(t,"*")}}function Xe(){return typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:globalThis}function Ye(){const e=Xe().fetch;if(typeof e>"u")throw console.warn(`Builder SDK could not find a global fetch function. Make sure you have a polyfill for fetch in your project.
32
- For more information, read https://github.com/BuilderIO/this-package-uses-fetch`),new Error("Builder SDK could not find a global `fetch` function");return e}const rt=Ye();function E(e,t=null,n="."){return Object.keys(e).reduce((o,r)=>{const s=e[r],i=[t,r].filter(Boolean).join(n);return[typeof s=="object",s!==null,!(Array.isArray(s)&&s.length===0)].every(Boolean)?{...o,...E(s,i,n)}:{...o,[i]:s}},{})}const K="builder.",Ze="options.",tn=e=>{const t={};return e.forEach((n,o)=>{t[o]=n}),t},N=e=>{if(!e)return{};const t=st(e),n={};return Object.keys(t).forEach(o=>{if(o.startsWith(K)){const r=o.replace(K,"").replace(Ze,"");n[r]=t[o]}}),n},en=()=>{if(!b())return{};const e=new URLSearchParams(window.location.search);return N(e)},st=e=>e instanceof URLSearchParams?tn(e):e,nn="v3",F=e=>{const{limit:t=30,userAttributes:n,query:o,noTraverse:r=!1,model:s,apiKey:i,includeRefs:u=!0,enrich:a,locale:d,apiVersion:f=nn}=e;if(!i)throw new Error("Missing API key");if(!["v2","v3"].includes(f))throw new Error(`Invalid apiVersion: expected 'v2' or 'v3', received '${f}'`);const p=new URL(`https://cdn.builder.io/api/${f}/content/${s}?apiKey=${i}&limit=${t}&noTraverse=${r}&includeRefs=${u}${d?`&locale=${d}`:""}${a?`&enrich=${a}`:""}`),c={...en(),...st(e.options||{})},m=E(c);for(const l in m)p.searchParams.set(l,String(m[l]));if(n&&p.searchParams.set("userAttributes",JSON.stringify(n)),o){const l=E({query:o});for(const h in l)p.searchParams.set(h,JSON.stringify(l[h]))}return p},on=e=>"results"in e;async function I(e){const t=await U({...e,limit:1});return t&&t.results[0]||null}const rn=I,sn=async e=>{const t=F(e);return await(await rt(t.href)).json()},it=async(e,t,n=F(e))=>{const o=A(e.canTrack);if(n.search.includes("preview="),!o||!(b()||C==="reactNative"))return t;try{const r=[];for(const s of t.results)r.push(await Ae({item:s,canTrack:o}));t.results=r}catch(r){v.error("Could not process A/B tests. ",r)}return t};async function U(e){try{const t=F(e),n=await sn(e);return on(n)?it(e,n):(v.error("Error fetching data. ",{url:t,content:n,options:e}),null)}catch(t){return v.error("Error fetching data. ",t),null}}const an=U;function cn(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(e){const t=Math.random()*16|0;return(e=="x"?t:t&3|8).toString(16)})}function at(){return cn().replace(/-/g,"")}const ct="builderSessionId",ln=async({canTrack:e})=>{if(!e)return;const t=await Z({name:ct,canTrack:e});if(k(t))return t;{const n=un();return dn({id:n,canTrack:e}),n}},un=()=>at(),dn=({id:e,canTrack:t})=>tt({name:ct,value:e,canTrack:t}),lt=()=>b()&&typeof localStorage<"u"?localStorage:void 0,mn=({key:e,canTrack:t})=>{var n;try{return t?(n=lt())==null?void 0:n.getItem(e):void 0}catch(o){console.debug("[LocalStorage] GET error: ",o);return}},fn=({key:e,canTrack:t,value:n})=>{var o;try{t&&((o=lt())==null||o.setItem(e,n))}catch(r){console.debug("[LocalStorage] SET error: ",r)}},ut="builderVisitorId",pn=({canTrack:e})=>{if(!e)return;const t=mn({key:ut,canTrack:e});if(k(t))return t;{const n=hn();return gn({id:n,canTrack:e}),n}},hn=()=>at(),gn=({id:e,canTrack:t})=>fn({key:ut,value:e,canTrack:t}),_n=()=>{if(b()){const e=new URL(location.href);return e.pathname===""&&(e.pathname="/"),e}else return console.warn("Cannot get location for tracking in non-browser environment"),null},bn=()=>typeof navigator=="object"&&navigator.userAgent||"",yn=()=>{const e=bn(),t={Android(){return e.match(/Android/i)},BlackBerry(){return e.match(/BlackBerry/i)},iOS(){return e.match(/iPhone|iPod/i)},Opera(){return e.match(/Opera Mini/i)},Windows(){return e.match(/IEMobile/i)||e.match(/WPDesktop/i)},any(){return t.Android()||t.BlackBerry()||t.iOS()||t.Opera()||t.Windows()||C==="reactNative"}},n=e.match(/Tablet|iPad/i),o=_n();return{urlPath:o==null?void 0:o.pathname,host:(o==null?void 0:o.host)||(o==null?void 0:o.hostname),device:n?"tablet":t.any()?"mobile":"desktop"}},vn=async({canTrack:e})=>{if(!e)return{visitorId:void 0,sessionId:void 0};const t=await ln({canTrack:e}),n=pn({canTrack:e});return{sessionId:t,visitorId:n}},Sn=async({type:e,canTrack:t,apiKey:n,metadata:o,...r})=>({type:e,data:{...r,metadata:{url:location.href,...o},...await vn({canTrack:t}),userAttributes:yn(),ownerId:n}});async function dt(e){if(!e.apiKey){v.error("Missing API key for track call. Please provide your API key.");return}if(!!e.canTrack&&!j()&&!!(b()||C==="reactNative"))return fetch("https://cdn.builder.io/api/v1/track",{method:"POST",body:JSON.stringify({events:[await Sn(e)]}),headers:{"content-type":"application/json"},mode:"cors"}).catch(t=>{console.error("Failed to track: ",t)})}const kn=e=>dt({...e,canTrack:!0}),Cn=async e=>{var o,r,s;const t=e.path||((o=e.url)==null?void 0:o.pathname)||((r=e.userAttributes)==null?void 0:r.urlPath),n={...e,apiKey:e.apiKey,model:e.model||"page",userAttributes:{...e.userAttributes,...t?{urlPath:t}:{}},options:N(e.searchParams||((s=e.url)==null?void 0:s.searchParams)||e.options)};return{apiKey:n.apiKey,model:n.model,content:await I(n)}};exports.Blocks=O;exports.Button=gt;exports.Columns=xt;exports.ComponentsContext=D;exports.Content=B;exports.Fragment=It;exports.Image=jt;exports.RenderBlocks=Me;exports.RenderContent=We;exports.Section=Wt;exports.Symbol=Ht;exports.TARGET=C;exports.Text=Zt;exports.Video=re;exports._processContentResult=it;exports._track=dt;exports.blocks=H;exports.builderContext=q;exports.checkIsDefined=k;exports.components=ze;exports.createRegisterComponentMessage=Ge;exports.fastClone=R;exports.fetch=rt;exports.fetchBuilderProps=Cn;exports.fetchEntries=U;exports.fetchOneEntry=I;exports.filterAttrs=T;exports.getAllContent=an;exports.getBuilderSearchParams=N;exports.getContent=rn;exports.getMaxWidthQueryForSize=_t;exports.getRenderContentScriptString=ve;exports.getSizesForBreakpoints=G;exports.isBrowser=b;exports.isEditing=j;exports.isPreviewing=Ke;exports.logger=v;exports.normalizeComponent=_;exports.register=Je;exports.serializeComponentInfo=He;exports.setEditorSettings=Qe;exports.track=kn;
29
+ `},Se=(e,t)=>`
30
+ window.${Q}("${t}",${JSON.stringify(e)}, ${J})`,ke=({contentId:e,variationId:t})=>`
31
+ window.${X}("${t}", "${e}", ${J})`,k=e=>e!=null,A=e=>k(e)?e:!0,Ce=e=>{if(e==="localhost"||e==="127.0.0.1")return e;const t=e.split(".");return t.length>2?t.slice(1).join("."):e},Y=({name:e,canTrack:t})=>{var n;try{return t?(n=document.cookie.split("; ").find(o=>o.startsWith(`${e}=`)))==null?void 0:n.split("=")[1]:void 0}catch(o){v.warn("[COOKIE] GET error: ",(o==null?void 0:o.message)||o);return}},Z=async e=>Y(e),xe=e=>e.map(([t,n])=>n?`${t}=${n}`:t).filter(k).join("; "),we=[["secure",""],["SameSite","None"]],$e=({name:e,value:t,expires:n})=>{const r=(b()?location.protocol==="https:":!0)?we:[[]],s=n?[["expires",n.toUTCString()]]:[[]],i=[[e,t],...s,["path","/"],["domain",Ce(window.location.hostname)],...r];return xe(i)},tt=async({name:e,value:t,expires:n,canTrack:o})=>{try{if(!o)return;const r=$e({name:e,value:t,expires:n});document.cookie=r}catch(r){v.warn("[COOKIE] SET error: ",(r==null?void 0:r.message)||r)}},Te="builder.tests",V=e=>`${Te}.${e}`,Re=({contentId:e})=>Z({name:V(e),canTrack:!0}),Ie=({contentId:e})=>Y({name:V(e),canTrack:!0}),Pe=({contentId:e,value:t})=>tt({name:V(e),value:t,canTrack:!0}),et=e=>k(e.id)&&k(e.variations)&&Object.keys(e.variations).length>0,Ae=({id:e,variations:t})=>{var r;let n=0;const o=Math.random();for(const s in t){const i=(r=t[s])==null?void 0:r.testRatio;if(n+=i,o<n)return s}return e},nt=e=>{const t=Ae(e);return Pe({contentId:e.id,value:t}).catch(n=>{v.error("could not store A/B test variation: ",n)}),t},ot=({item:e,testGroupId:t})=>{const n=e.variations[t];return t===e.id||!n?{testVariationId:e.id,testVariationName:"Default"}:{data:n.data,testVariationId:n.id,testVariationName:n.name||(n.id===e.id?"Default":"")}},Ee=({item:e,canTrack:t})=>{if(!t)return e;if(!e)return;if(!et(e))return e;const n=Ie({contentId:e.id})||nt({variations:e.variations,id:e.id}),o=ot({item:e,testGroupId:n});return{...e,...o}},Oe=async({item:e,canTrack:t})=>{if(!t||!et(e))return e;const o=await Re({contentId:e.id})||nt({variations:e.variations,id:e.id}),r=ot({item:e,testGroupId:o});return{...e,...r}},Ve=()=>Promise.resolve().then(()=>require("./content.e0c272e6.cjs")).then(e=>e.default).catch(e=>{throw console.error("Error while attempting to dynamically import component ContentComponent at ../content/content.vue",e),e}),Be=()=>Promise.resolve().then(()=>require("./inlined-styles.89ce41e1.cjs")).then(e=>e.default).catch(e=>{throw console.error("Error while attempting to dynamically import component InlinedStyles at ../inlined-styles.vue",e),e}),je=()=>Promise.resolve().then(()=>require("./inlined-script.0c7f9ce3.cjs")).then(e=>e.default).catch(e=>{throw console.error("Error while attempting to dynamically import component InlinedScript at ../inlined-script.vue",e),e}),Ne=y.defineComponent({name:"content-variants",components:{"inlined-script":je,"inlined-styles":Be,"content-component":Ve},props:["canTrack","content","__isNestedRender","model","data","context","apiKey","apiVersion","customComponents","locale","includeRefs","enrich"],data(){return{shouldRenderVariants:ge({canTrack:A(this.canTrack),content:this.content}),getScriptString:ve,getVariants:$,TARGET:C}},mounted(){this.shouldRenderVariants=!1},computed:{variantScriptStr(){var e;return Se($(this.content).map(t=>({id:t.testVariationId,testRatio:t.testRatio})),((e=this.content)==null?void 0:e.id)||"")},hideVariantsStyleString(){return $(this.content).map(e=>`.variant-${e.testVariationId} { display: none; } `).join("")},defaultContent(){var e;return this.shouldRenderVariants?{...this.content,testVariationId:(e=this.content)==null?void 0:e.id}:Ee({item:this.content,canTrack:A(this.canTrack)})}}});var Fe=function(){var o,r;var t=this,n=t._self._c;return t._self._setupProxy,n("div",[!t.__isNestedRender&&t.TARGET!=="reactNative"?[n("inlined-script",{attrs:{scriptStr:t.getScriptString()}})]:t._e(),t.shouldRenderVariants?[n("inlined-styles",{attrs:{id:`variants-styles-${(o=t.content)==null?void 0:o.id}`,styles:t.hideVariantsStyleString}}),n("inlined-script",{attrs:{scriptStr:t.variantScriptStr}}),t._l(t.getVariants(t.content),function(s,i){return n("content-component",{key:s.testVariationId,attrs:{content:s,showContent:!1,classNameProp:void 0,model:t.model,data:t.data,context:t.context,apiKey:t.apiKey,apiVersion:t.apiVersion,customComponents:t.customComponents,canTrack:t.canTrack,locale:t.locale,includeRefs:t.includeRefs,enrich:t.enrich,isSsrAbTest:t.shouldRenderVariants}})})]:t._e(),n("content-component",t._b({attrs:{content:t.defaultContent,classNameProp:`variant-${(r=t.content)==null?void 0:r.id}`,showContent:!0,model:t.model,data:t.data,context:t.context,apiKey:t.apiKey,apiVersion:t.apiVersion,customComponents:t.customComponents,canTrack:t.canTrack,locale:t.locale,includeRefs:t.includeRefs,enrich:t.enrich,isSsrAbTest:t.shouldRenderVariants}},"content-component",{key:t.shouldRenderVariants.toString()},!1))],2)},Ue=[],Me=_(Ne,Fe,Ue,!1,null,null,null,null);const B=Me.exports,We=Object.freeze(Object.defineProperty({__proto__:null,default:B},Symbol.toStringTag,{value:"Module"})),Le=O,Ke=B;function ze(){return b()&&window.self!==window.top}function j(){return ze()&&window.location.search.indexOf("builder.frameEditing=")!==-1}function Ge(){return!b()||j()?!1:Boolean(location.search.indexOf("builder.preview=")!==-1)}const qe=[],De=e=>({type:"builder.registerComponent",data:rt(e)}),He=e=>{const t=e.toString().trim();return`return (${!t.startsWith("function")&&!t.startsWith("(")?"function ":""}${t}).apply(this, arguments)`},Je=e=>typeof e=="function"?He(e):R(e),rt=({inputs:e,...t})=>({...R(t),inputs:e==null?void 0:e.map(n=>Object.entries(n).reduce((o,[r,s])=>({...o,[r]:Je(s)}),{}))}),W={};function Qe(e,t){let n=W[e];if(n||(n=W[e]=[]),n.push(t),b()){const o={type:"builder.register",data:{type:e,info:t}};try{parent.postMessage(o,"*"),parent!==window&&window.postMessage(o,"*")}catch(r){console.debug("Could not postmessage",r)}}}const L={};function Xe(e){if(b()){Object.assign(L,e);const t={type:"builder.settingsChange",data:L};parent.postMessage(t,"*")}}function Ye(){return typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:globalThis}function Ze(){const e=Ye().fetch;if(typeof e>"u")throw console.warn(`Builder SDK could not find a global fetch function. Make sure you have a polyfill for fetch in your project.
32
+ For more information, read https://github.com/BuilderIO/this-package-uses-fetch`),new Error("Builder SDK could not find a global `fetch` function");return e}const st=Ze();function E(e,t=null,n="."){return Object.keys(e).reduce((o,r)=>{const s=e[r],i=[t,r].filter(Boolean).join(n);return[typeof s=="object",s!==null,!(Array.isArray(s)&&s.length===0)].every(Boolean)?{...o,...E(s,i,n)}:{...o,[i]:s}},{})}const K="builder.",tn="options.",en=e=>{const t={};return e.forEach((n,o)=>{t[o]=n}),t},N=e=>{if(!e)return{};const t=it(e),n={};return Object.keys(t).forEach(o=>{if(o.startsWith(K)){const r=o.replace(K,"").replace(tn,"");n[r]=t[o]}}),n},nn=()=>{if(!b())return{};const e=new URLSearchParams(window.location.search);return N(e)},it=e=>e instanceof URLSearchParams?en(e):e,on="v3",F=e=>{const{limit:t=30,userAttributes:n,query:o,noTraverse:r=!1,model:s,apiKey:i,includeRefs:u=!0,enrich:a,locale:d,apiVersion:f=on}=e;if(!i)throw new Error("Missing API key");if(!["v2","v3"].includes(f))throw new Error(`Invalid apiVersion: expected 'v2' or 'v3', received '${f}'`);const p=new URL(`https://cdn.builder.io/api/${f}/content/${s}?apiKey=${i}&limit=${t}&noTraverse=${r}&includeRefs=${u}${d?`&locale=${d}`:""}${a?`&enrich=${a}`:""}`),c={...nn(),...it(e.options||{})},m=E(c);for(const l in m)p.searchParams.set(l,String(m[l]));if(n&&p.searchParams.set("userAttributes",JSON.stringify(n)),o){const l=E({query:o});for(const h in l)p.searchParams.set(h,JSON.stringify(l[h]))}return p},rn=e=>"results"in e;async function I(e){const t=await U({...e,limit:1});return t&&t.results[0]||null}const sn=I,an=async e=>{const t=F(e);return await(await st(t.href)).json()},at=async(e,t,n=F(e))=>{const o=A(e.canTrack);if(n.search.includes("preview="),!o||!(b()||C==="reactNative"))return t;try{const r=[];for(const s of t.results)r.push(await Oe({item:s,canTrack:o}));t.results=r}catch(r){v.error("Could not process A/B tests. ",r)}return t};async function U(e){try{const t=F(e),n=await an(e);return rn(n)?at(e,n):(v.error("Error fetching data. ",{url:t,content:n,options:e}),null)}catch(t){return v.error("Error fetching data. ",t),null}}const cn=U;function ln(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(e){const t=Math.random()*16|0;return(e=="x"?t:t&3|8).toString(16)})}function ct(){return ln().replace(/-/g,"")}const lt="builderSessionId",un=async({canTrack:e})=>{if(!e)return;const t=await Z({name:lt,canTrack:e});if(k(t))return t;{const n=dn();return mn({id:n,canTrack:e}),n}},dn=()=>ct(),mn=({id:e,canTrack:t})=>tt({name:lt,value:e,canTrack:t}),ut=()=>b()&&typeof localStorage<"u"?localStorage:void 0,fn=({key:e,canTrack:t})=>{var n;try{return t?(n=ut())==null?void 0:n.getItem(e):void 0}catch(o){console.debug("[LocalStorage] GET error: ",o);return}},pn=({key:e,canTrack:t,value:n})=>{var o;try{t&&((o=ut())==null||o.setItem(e,n))}catch(r){console.debug("[LocalStorage] SET error: ",r)}},dt="builderVisitorId",hn=({canTrack:e})=>{if(!e)return;const t=fn({key:dt,canTrack:e});if(k(t))return t;{const n=gn();return _n({id:n,canTrack:e}),n}},gn=()=>ct(),_n=({id:e,canTrack:t})=>pn({key:dt,value:e,canTrack:t}),bn=()=>{if(b()){const e=new URL(location.href);return e.pathname===""&&(e.pathname="/"),e}else return console.warn("Cannot get location for tracking in non-browser environment"),null},yn=()=>typeof navigator=="object"&&navigator.userAgent||"",mt=()=>{const e=yn(),t={Android(){return e.match(/Android/i)},BlackBerry(){return e.match(/BlackBerry/i)},iOS(){return e.match(/iPhone|iPod/i)},Opera(){return e.match(/Opera Mini/i)},Windows(){return e.match(/IEMobile/i)||e.match(/WPDesktop/i)},any(){return t.Android()||t.BlackBerry()||t.iOS()||t.Opera()||t.Windows()||C==="reactNative"}},n=e.match(/Tablet|iPad/i),o=bn();return{urlPath:o==null?void 0:o.pathname,host:(o==null?void 0:o.host)||(o==null?void 0:o.hostname),device:n?"tablet":t.any()?"mobile":"desktop"}},vn=async({canTrack:e})=>{if(!e)return{visitorId:void 0,sessionId:void 0};const t=await un({canTrack:e}),n=hn({canTrack:e});return{sessionId:t,visitorId:n}},Sn=async({type:e,canTrack:t,apiKey:n,metadata:o,...r})=>({type:e,data:{...r,metadata:{url:location.href,...o},...await vn({canTrack:t}),userAttributes:mt(),ownerId:n}});async function ft(e){if(!e.apiKey){v.error("Missing API key for track call. Please provide your API key.");return}if(!!e.canTrack&&!j()&&!!(b()||C==="reactNative"))return fetch("https://cdn.builder.io/api/v1/track",{method:"POST",body:JSON.stringify({events:[await Sn(e)]}),headers:{"content-type":"application/json"},mode:"cors"}).catch(t=>{console.error("Failed to track: ",t)})}const kn=e=>ft({...e,canTrack:!0}),Cn=async e=>{var o,r,s;const t=e.path||((o=e.url)==null?void 0:o.pathname)||((r=e.userAttributes)==null?void 0:r.urlPath),n={...e,apiKey:e.apiKey,model:e.model||"page",userAttributes:{...e.userAttributes,...t?{urlPath:t}:{}},options:N(e.searchParams||((s=e.url)==null?void 0:s.searchParams)||e.options)};return{apiKey:n.apiKey,model:n.model,content:await I(n)}};exports.Blocks=O;exports.Button=bt;exports.Columns=$t;exports.ComponentsContext=D;exports.Content=B;exports.Fragment=At;exports.Image=Ft;exports.RenderBlocks=Le;exports.RenderContent=Ke;exports.Section=Kt;exports.Symbol=Qt;exports.TARGET=C;exports.Text=ee;exports.Video=ie;exports._processContentResult=at;exports._track=ft;exports.blocks=H;exports.builderContext=q;exports.checkIsDefined=k;exports.components=qe;exports.createRegisterComponentMessage=De;exports.fastClone=R;exports.fetch=st;exports.fetchBuilderProps=Cn;exports.fetchEntries=U;exports.fetchOneEntry=I;exports.filterAttrs=T;exports.getAllContent=cn;exports.getBuilderSearchParams=N;exports.getContent=sn;exports.getMaxWidthQueryForSize=yt;exports.getRenderContentScriptString=ke;exports.getSizesForBreakpoints=G;exports.getUserAttributes=mt;exports.isBrowser=b;exports.isEditing=j;exports.isPreviewing=Ge;exports.logger=v;exports.normalizeComponent=_;exports.register=Qe;exports.serializeComponentInfo=rt;exports.setEditorSettings=Xe;exports.track=kn;