@builder.io/sdk-react 0.12.7 → 0.12.8

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.
@@ -1,16 +1,16 @@
1
- "use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("react/jsx-runtime"),m=require("react"),u=require("./server-entry-fc715776.cjs"),We=new Set(["area","base","br","col","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"]),Ne=e=>typeof e=="string"&&We.has(e.toLowerCase());function q(e){return a.jsx(a.Fragment,{children:Ne(e.TagName)?a.jsx(a.Fragment,{children:a.jsx(e.TagName,{...e.attributes,...e.actionAttributes})}):a.jsx(a.Fragment,{children:typeof e.TagName=="string"?a.jsx(a.Fragment,{children:a.jsx(e.TagName,{...e.attributes,...e.actionAttributes,children:e.children})}):a.jsx(a.Fragment,{children:a.jsx(e.TagName,{...e.attributes,...e.actionAttributes,children:e.children})})})})}const W=()=>{switch(u.TARGET){case"react":case"reactNative":case"rsc":return"className";case"svelte":case"vue":case"solid":case"qwik":return"class"}};function fe(e){return a.jsx(q,{TagName:e.link?e.builderLinkComponent||"a":"button",attributes:{...e.attributes,[W()]:`${e.link?"":"builder-button"} ${e.attributes[W()]||""}`,...e.link?{href:e.link,target:e.openLinkInNewTab?"_blank":void 0,role:"link"}:{role:"button"}},actionAttributes:{},children:e.text})}const G=m.createContext({content:null,context:{},localState:void 0,rootSetState(){},rootState:{},apiKey:null,apiVersion:void 0,componentInfos:{},inheritedStyles:{},BlocksWrapper:"div",BlocksWrapperProps:{}}),ge=m.createContext({registeredComponents:{}});function $e(e){var t;return{...(t=e.component)==null?void 0:t.options,...e.options,builderBlock:e}}const Ve=({builder:e,context:t,event:n,state:i})=>Object.entries({state:i,Builder:e,builder:e,context:t,event:n}),De=()=>({isEditing:u.isEditing(),isBrowser:u.isBrowser(),isServer:!u.isBrowser(),getUserAttributes:()=>u.getUserAttributes()}),Le=(e,{isExpression:t=!0})=>t&&!(e.includes(";")||e.includes(" return ")||e.trim().startsWith("return "))?`return (${e});`:e,oe=({code:e,builder:t,context:n,event:i,localState:o,rootSetState:r,rootState:s})=>{const l=Ve({builder:t,context:n,event:i,state:he({rootState:s,localState:o,rootSetState:r})});return new Function(...l.map(([c])=>c),e)(...l.map(([,c])=>c))};function he({rootState:e,localState:t,rootSetState:n}){return new Proxy(e,{get:(i,o)=>{if(t&&o in t)return t[o];const r=i[o];return typeof r=="object"?he({rootState:r,localState:void 0,rootSetState:n?s=>{i[o]=s,n(i)}:void 0}):r},set:(i,o,r)=>{if(t&&o in t)throw new Error("Writing to local state is not allowed as it is read-only.");return i[o]=r,n==null||n(i),!0}})}function Oe(){var e;return typeof process!="undefined"&&u.checkIsDefined((e=process==null?void 0:process.versions)==null?void 0:e.node)}const _e=()=>{var i;if(!Oe())return!1;const e=process.arch==="arm64",t=process.version.startsWith("v20"),n=(i=process.env.NODE_OPTIONS)==null?void 0:i.includes("--no-node-snapshot");return e&&t&&!n?(u.logger.log("Skipping usage of `isolated-vm` to avoid crashes in Node v20 on an arm64 machine.\n If you would like to use the `isolated-vm` package on this machine, please provide the `NODE_OPTIONS=--no-node-snapshot` config to your Node process.\n See https://github.com/BuilderIO/builder/blob/main/packages/sdks/README.md#node-v20--m1-macs-apple-silicon-support for more information.\n "),!0):!1},Me=e=>(u.isBrowser()||_e(),oe(e));function N({code:e,context:t,localState:n,rootState:i,rootSetState:o,event:r,isExpression:s=!0}){if(e===""){u.logger.warn("Skipping evaluation of empty code block.");return}const l={code:Le(e,{isExpression:s}),builder:De(),context:t,event:r,rootSetState:o,rootState:i,localState:n};try{return Me(l)}catch(c){u.logger.error("Failed code evaluation: "+c.message,{code:e});return}}const Ue=(e,t,n)=>{if(Object(e)!==e)return e;const i=Array.isArray(t)?t:t.toString().match(/[^.[\]]+/g);return i.slice(0,-1).reduce((o,r,s)=>Object(o[r])===o[r]?o[r]:o[r]=Math.abs(Number(i[s+1]))>>0===+i[s+1]?[]:{},e)[i[i.length-1]]=n,e};const He=({block:e,context:t,localState:n,rootState:i,rootSetState:o})=>{if(!e.bindings)return e;const r=u.fastClone(e),s={...r,properties:{...r.properties},actions:{...r.actions}};for(const l in e.bindings){const c=e.bindings[l],d=N({code:c,localState:n,rootState:i,rootSetState:o,context:t});Ue(s,l,d)}return s};function L({block:e,context:t,shouldEvaluateBindings:n,localState:i,rootState:o,rootSetState:r}){const s=e;return n?He({block:s,localState:i,rootState:o,rootSetState:r,context:t}):s}function Ke(e,t,n={}){let i,o,r,s=null,l=0;const c=function(){l=n.leading===!1?0:Date.now(),s=null,r=e.apply(i,o),s||(i=o=null)};return function(){const d=Date.now();!l&&n.leading===!1&&(l=d);const f=t-(d-l);return i=this,o=arguments,f<=0||f>t?(s&&(clearTimeout(s),s=null),l=d,r=e.apply(i,o),s||(i=o=null)):!s&&n.trailing!==!1&&(s=setTimeout(c,f)),r}}function A(e,...t){const n=Object(e);for(let i=1;i<arguments.length;i++){const o=arguments[i];if(o!=null)for(const r in o)Object.prototype.hasOwnProperty.call(o,r)&&(n[r]=o[r])}return n}const Y=e=>e?e.replace(/([A-Z])/g,t=>`-${t[0].toLowerCase()}`):"";function ze(e){for(const t of e)switch(t.trigger){case"pageLoad":be(t);break;case"hover":Ge(t);break;case"scrollInView":Ye(t);break}}function Q(e){console.warn(`Cannot animate element: element with ID ${e} not found!`)}function J(e,t){const n=qe(e),i=getComputedStyle(t),o=e.steps[0].styles,r=e.steps[e.steps.length-1].styles,s=[o,r];for(const l of s)for(const c of n)c in l||(l[c]=i[c])}function qe(e){const t=[];for(const n of e.steps)for(const i in n.styles)t.indexOf(i)===-1&&t.push(i);return t}function be(e){const t=Array.prototype.slice.call(document.getElementsByClassName(e.elementId||e.id||""));if(!t.length){Q(e.elementId||e.id||"");return}Array.from(t).forEach(n=>{J(e,n),n.style.transition="none",n.style.transitionDelay="0",A(n.style,e.steps[0].styles),setTimeout(()=>{n.style.transition=`all ${e.duration}s ${Y(e.easing)}`,e.delay&&(n.style.transitionDelay=e.delay+"s"),A(n.style,e.steps[1].styles),setTimeout(()=>{n.style.transition="",n.style.transitionDelay=""},(e.delay||0)*1e3+e.duration*1e3+100)})})}function Ge(e){const t=Array.prototype.slice.call(document.getElementsByClassName(e.elementId||e.id||""));if(!t.length){Q(e.elementId||e.id||"");return}Array.from(t).forEach(n=>{J(e,n);const i=e.steps[0].styles,o=e.steps[1].styles;function r(){A(n.style,i)}function s(){A(n.style,o)}r(),n.addEventListener("mouseenter",s),n.addEventListener("mouseleave",r),setTimeout(()=>{n.style.transition=`all ${e.duration}s ${Y(e.easing)}`,e.delay&&(n.style.transitionDelay=e.delay+"s")})})}function Ye(e){const t=Array.prototype.slice.call(document.getElementsByClassName(e.elementId||e.id||""));if(!t.length){Q(e.elementId||e.id||"");return}Array.from(t).forEach(n=>{J(e,n);let i=!1,o=!1;function r(){!i&&l(n)?(i=!0,o=!0,setTimeout(()=>{A(n.style,e.steps[1].styles),e.repeat||document.removeEventListener("scroll",s),setTimeout(()=>{o=!1,e.repeat||(n.style.transition="",n.style.transitionDelay="")},(e.duration+(e.delay||0))*1e3+100)})):e.repeat&&i&&!o&&!l(n)&&(i=!1,A(n.style,e.steps[0].styles))}const s=Ke(r,200,{leading:!1});function l(f){const b=f.getBoundingClientRect(),v=window.innerHeight,y=(e.thresholdPercent||0)/100*v;return b.bottom>y&&b.top<v-y}const c=e.steps[0].styles;function d(){A(n.style,c)}d(),setTimeout(()=>{n.style.transition=`all ${e.duration}s ${Y(e.easing)}`,e.delay&&(n.style.transitionDelay=e.delay+"s")}),document.addEventListener("scroll",s,{capture:!0,passive:!0}),r()})}const Qe=({block:e,context:t,registeredComponents:n})=>{var r;const i=(r=L({block:e,localState:t.localState,rootState:t.rootState,rootSetState:t.rootSetState,context:t.context,shouldEvaluateBindings:!1}).component)==null?void 0:r.name;if(!i)return null;const o=n[i];if(o)return o;console.warn(`
1
+ "use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("react/jsx-runtime"),m=require("react"),u=require("./server-entry-564cbc17.cjs"),Be=new Set(["area","base","br","col","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"]),Fe=e=>typeof e=="string"&&Be.has(e.toLowerCase());function q(e){return a.jsx(a.Fragment,{children:Fe(e.TagName)?a.jsx(a.Fragment,{children:a.jsx(e.TagName,{...e.attributes,...e.actionAttributes})}):a.jsx(a.Fragment,{children:typeof e.TagName=="string"?a.jsx(a.Fragment,{children:a.jsx(e.TagName,{...e.attributes,...e.actionAttributes,children:e.children})}):a.jsx(a.Fragment,{children:a.jsx(e.TagName,{...e.attributes,...e.actionAttributes,children:e.children})})})})}const W=()=>{switch(u.TARGET){case"react":case"reactNative":case"rsc":return"className";case"svelte":case"vue":case"solid":case"qwik":return"class"}};function me(e){return a.jsx(q,{TagName:e.link?e.builderLinkComponent||"a":"button",attributes:{...e.attributes,[W()]:`${e.link?"":"builder-button"} ${e.attributes[W()]||""}`,...e.link?{href:e.link,target:e.openLinkInNewTab?"_blank":void 0,role:"link"}:{role:"button"}},actionAttributes:{},children:e.text})}const G=m.createContext({content:null,context:{},localState:void 0,rootSetState(){},rootState:{},apiKey:null,apiVersion:void 0,componentInfos:{},inheritedStyles:{},BlocksWrapper:"div",BlocksWrapperProps:{}}),fe=m.createContext({registeredComponents:{}});function We(e){var t;return{...(t=e.component)==null?void 0:t.options,...e.options,builderBlock:e}}const $e=({builder:e,context:t,event:n,state:i})=>Object.entries({state:i,Builder:e,builder:e,context:t,event:n}),Ne=()=>({isEditing:u.isEditing(),isBrowser:u.isBrowser(),isServer:!u.isBrowser(),getUserAttributes:()=>u.getUserAttributes()}),Ve=(e,{isExpression:t=!0})=>t&&!(e.includes(";")||e.includes(" return ")||e.trim().startsWith("return "))?`return (${e});`:e,oe=({code:e,builder:t,context:n,event:i,localState:o,rootSetState:r,rootState:l})=>{const s=$e({builder:t,context:n,event:i,state:ge({rootState:l,localState:o,rootSetState:r})});return new Function(...s.map(([c])=>c),e)(...s.map(([,c])=>c))};function ge({rootState:e,localState:t,rootSetState:n}){return new Proxy(e,{get:(i,o)=>{if(t&&o in t)return t[o];const r=i[o];return typeof r=="object"?ge({rootState:r,localState:void 0,rootSetState:n?l=>{i[o]=l,n(i)}:void 0}):r},set:(i,o,r)=>{if(t&&o in t)throw new Error("Writing to local state is not allowed as it is read-only.");return i[o]=r,n==null||n(i),!0}})}function Le(){var e;return typeof process!="undefined"&&u.checkIsDefined((e=process==null?void 0:process.versions)==null?void 0:e.node)}const De=()=>{var i;if(!Le())return!1;const e=process.arch==="arm64",t=process.version.startsWith("v20"),n=(i=process.env.NODE_OPTIONS)==null?void 0:i.includes("--no-node-snapshot");return e&&t&&!n?(u.logger.log("Skipping usage of `isolated-vm` to avoid crashes in Node v20 on an arm64 machine.\n If you would like to use the `isolated-vm` package on this machine, please provide the `NODE_OPTIONS=--no-node-snapshot` config to your Node process.\n See https://github.com/BuilderIO/builder/blob/main/packages/sdks/README.md#node-v20--m1-macs-apple-silicon-support for more information.\n "),!0):!1},Oe=e=>(u.isBrowser()||De(),oe(e));function $({code:e,context:t,localState:n,rootState:i,rootSetState:o,event:r,isExpression:l=!0}){if(e===""){u.logger.warn("Skipping evaluation of empty code block.");return}const s={code:Ve(e,{isExpression:l}),builder:Ne(),context:t,event:r,rootSetState:o,rootState:i,localState:n};try{return Oe(s)}catch(c){u.logger.error("Failed code evaluation: "+c.message,{code:e});return}}const _e=(e,t,n)=>{if(Object(e)!==e)return e;const i=Array.isArray(t)?t:t.toString().match(/[^.[\]]+/g);return i.slice(0,-1).reduce((o,r,l)=>Object(o[r])===o[r]?o[r]:o[r]=Math.abs(Number(i[l+1]))>>0===+i[l+1]?[]:{},e)[i[i.length-1]]=n,e};const He=({block:e,context:t,localState:n,rootState:i,rootSetState:o})=>{if(!e.bindings)return e;const r=u.fastClone(e),l={...r,properties:{...r.properties},actions:{...r.actions}};for(const s in e.bindings){const c=e.bindings[s],d=$({code:c,localState:n,rootState:i,rootSetState:o,context:t});_e(l,s,d)}return l};function D({block:e,context:t,shouldEvaluateBindings:n,localState:i,rootState:o,rootSetState:r}){const l=e;return n?He({block:l,localState:i,rootState:o,rootSetState:r,context:t}):l}function Ue(e,t,n={}){let i,o,r,l=null,s=0;const c=function(){s=n.leading===!1?0:Date.now(),l=null,r=e.apply(i,o),l||(i=o=null)};return function(){const d=Date.now();!s&&n.leading===!1&&(s=d);const f=t-(d-s);return i=this,o=arguments,f<=0||f>t?(l&&(clearTimeout(l),l=null),s=d,r=e.apply(i,o),l||(i=o=null)):!l&&n.trailing!==!1&&(l=setTimeout(c,f)),r}}function A(e,...t){const n=Object(e);for(let i=1;i<arguments.length;i++){const o=arguments[i];if(o!=null)for(const r in o)Object.prototype.hasOwnProperty.call(o,r)&&(n[r]=o[r])}return n}const Y=e=>e?e.replace(/([A-Z])/g,t=>`-${t[0].toLowerCase()}`):"";function Me(e){for(const t of e)switch(t.trigger){case"pageLoad":he(t);break;case"hover":ze(t);break;case"scrollInView":qe(t);break}}function Q(e){console.warn(`Cannot animate element: element with ID ${e} not found!`)}function J(e,t){const n=Ke(e),i=getComputedStyle(t),o=e.steps[0].styles,r=e.steps[e.steps.length-1].styles,l=[o,r];for(const s of l)for(const c of n)c in s||(s[c]=i[c])}function Ke(e){const t=[];for(const n of e.steps)for(const i in n.styles)t.indexOf(i)===-1&&t.push(i);return t}function he(e){const t=Array.prototype.slice.call(document.getElementsByClassName(e.elementId||e.id||""));if(!t.length){Q(e.elementId||e.id||"");return}Array.from(t).forEach(n=>{J(e,n),n.style.transition="none",n.style.transitionDelay="0",A(n.style,e.steps[0].styles),setTimeout(()=>{n.style.transition=`all ${e.duration}s ${Y(e.easing)}`,e.delay&&(n.style.transitionDelay=e.delay+"s"),A(n.style,e.steps[1].styles),setTimeout(()=>{n.style.transition="",n.style.transitionDelay=""},(e.delay||0)*1e3+e.duration*1e3+100)})})}function ze(e){const t=Array.prototype.slice.call(document.getElementsByClassName(e.elementId||e.id||""));if(!t.length){Q(e.elementId||e.id||"");return}Array.from(t).forEach(n=>{J(e,n);const i=e.steps[0].styles,o=e.steps[1].styles;function r(){A(n.style,i)}function l(){A(n.style,o)}r(),n.addEventListener("mouseenter",l),n.addEventListener("mouseleave",r),setTimeout(()=>{n.style.transition=`all ${e.duration}s ${Y(e.easing)}`,e.delay&&(n.style.transitionDelay=e.delay+"s")})})}function qe(e){const t=Array.prototype.slice.call(document.getElementsByClassName(e.elementId||e.id||""));if(!t.length){Q(e.elementId||e.id||"");return}Array.from(t).forEach(n=>{J(e,n);let i=!1,o=!1;function r(){!i&&s(n)?(i=!0,o=!0,setTimeout(()=>{A(n.style,e.steps[1].styles),e.repeat||document.removeEventListener("scroll",l),setTimeout(()=>{o=!1,e.repeat||(n.style.transition="",n.style.transitionDelay="")},(e.duration+(e.delay||0))*1e3+100)})):e.repeat&&i&&!o&&!s(n)&&(i=!1,A(n.style,e.steps[0].styles))}const l=Ue(r,200,{leading:!1});function s(f){const x=f.getBoundingClientRect(),p=window.innerHeight,y=(e.thresholdPercent||0)/100*p;return x.bottom>y&&x.top<p-y}const c=e.steps[0].styles;function d(){A(n.style,c)}d(),setTimeout(()=>{n.style.transition=`all ${e.duration}s ${Y(e.easing)}`,e.delay&&(n.style.transitionDelay=e.delay+"s")}),document.addEventListener("scroll",l,{capture:!0,passive:!0}),r()})}const Ge=({block:e,context:t,registeredComponents:n})=>{var r;const i=(r=D({block:e,localState:t.localState,rootState:t.rootState,rootSetState:t.rootSetState,context:t.context,shouldEvaluateBindings:!1}).component)==null?void 0:r.name;if(!i)return null;const o=n[i];if(o)return o;console.warn(`
2
2
  Could not find a registered component named "${i}".
3
- If you registered it, is the file that registered it imported by the file that needs to render it?`)},Je=({block:e,context:t})=>{const{repeat:n,...i}=e;if(!(n!=null&&n.collection))return;const o=N({code:n.collection,localState:t.localState,rootState:t.rootState,rootSetState:t.rootSetState,context:t.context});if(!Array.isArray(o))return;const r=n.collection.split(".").pop(),s=n.itemName||(r?r+"Item":"item");return o.map((c,d)=>({context:{...t,localState:{...t.localState,$index:d,$item:c,[s]:c,[`$${s}Index`]:d}},block:i}))},xe={small:{min:320,default:321,max:640},medium:{min:641,default:642,max:991},large:{min:990,default:991,max:1200}},ae=(e,t=xe)=>`@media (max-width: ${t[e].max}px)`,ye=({small:e,medium:t})=>{const n=u.fastClone(xe);if(!e||!t)return n;const i=Math.floor(e/2);n.small={max:e,min:i,default:i+1};const o=n.small.max+1;n.medium={max:t,min:o,default:o+1};const r=n.medium.max+1;return n.large={max:2e3,min:r,default:r+1},n},Xe=e=>e.replace(/([a-z0-9]|(?=[A-Z]))([A-Z])/g,"$1-$2").toLowerCase(),Se=e=>Object.entries(e).map(([n,i])=>{if(typeof i=="string")return`${Xe(n)}: ${i};`}).filter(u.checkIsDefined),Ze=e=>Se(e).join(`
4
- `),H=({mediaQuery:e,className:t,styles:n})=>{const i=`.${t} {
5
- ${Ze(n)}
3
+ If you registered it, is the file that registered it imported by the file that needs to render it?`)},Ye=({block:e,context:t})=>{const{repeat:n,...i}=e;if(!(n!=null&&n.collection))return;const o=$({code:n.collection,localState:t.localState,rootState:t.rootState,rootSetState:t.rootSetState,context:t.context});if(!Array.isArray(o))return;const r=n.collection.split(".").pop(),l=n.itemName||(r?r+"Item":"item");return o.map((c,d)=>({context:{...t,localState:{...t.localState,$index:d,$item:c,[l]:c,[`$${l}Index`]:d}},block:i}))},be={small:{min:320,default:321,max:640},medium:{min:641,default:642,max:991},large:{min:990,default:991,max:1200}},ae=(e,t=be)=>`@media (max-width: ${t[e].max}px)`,xe=({small:e,medium:t})=>{const n=u.fastClone(be);if(!e||!t)return n;const i=Math.floor(e/2);n.small={max:e,min:i,default:i+1};const o=n.small.max+1;n.medium={max:t,min:o,default:o+1};const r=n.medium.max+1;return n.large={max:2e3,min:r,default:r+1},n},Qe=e=>e.replace(/([a-z0-9]|(?=[A-Z]))([A-Z])/g,"$1-$2").toLowerCase(),ye=e=>Object.entries(e).map(([n,i])=>{if(typeof i=="string")return`${Qe(n)}: ${i};`}).filter(u.checkIsDefined),Je=e=>ye(e).join(`
4
+ `),M=({mediaQuery:e,className:t,styles:n})=>{const i=`.${t} {
5
+ ${Je(n)}
6
6
  }`;return e?`${e} {
7
7
  ${i}
8
- }`:i};function O(e){return a.jsx("style",{dangerouslySetInnerHTML:{__html:e.styles},id:e.id})}function et(e){function t(){const i=L({block:e.block,localState:e.context.localState,rootState:e.context.rootState,rootSetState:e.context.rootSetState,context:e.context.context,shouldEvaluateBindings:!0});return u.checkIsDefined(i.hide)?!i.hide:u.checkIsDefined(i.show)?i.show:!0}function n(){var y;const i=L({block:e.block,localState:e.context.localState,rootState:e.context.rootState,rootSetState:e.context.rootSetState,context:e.context.context,shouldEvaluateBindings:!0}),o=i.responsiveStyles,r=e.context.content,s=ye(((y=r==null?void 0:r.meta)==null?void 0:y.breakpoints)||{}),l=o==null?void 0:o.large,c=o==null?void 0:o.medium,d=o==null?void 0:o.small,f=i.id;if(!f)return"";const b=l?H({className:f,styles:l}):"",v=c?H({className:f,styles:c,mediaQuery:ae("medium",s)}):"",x=d?H({className:f,styles:d,mediaQuery:ae("small",s)}):"";return[b,v,x].join(" ")}return a.jsx(a.Fragment,{children:n()&&t()?a.jsx(a.Fragment,{children:a.jsx(O,{styles:n()})}):null})}function tt(e){return e.charAt(0).toUpperCase()+e.slice(1)}const nt=e=>`on${tt(e)}`,it=(e,t)=>n=>N({code:e,context:t.context,localState:t.localState,rootState:t.rootState,rootSetState:t.rootSetState,event:n,isExpression:!1});function pe(e){var i;const t={},n=(i=e.block.actions)!=null?i:{};for(const o in n){if(!n.hasOwnProperty(o))continue;const r=n[o];let s=nt(o);if(e.stripPrefix)switch(u.TARGET){case"vue":s=s.replace("v-on:","");break;case"svelte":s=s.replace("on:","");break}t[s]=it(r,e)}return t}function ot({style:e}){return e}const at=({block:e,context:t})=>ve(ot({style:e.style||{},context:t,block:e}));function ve(e){switch(u.TARGET){case"svelte":case"vue":case"solid":return Se(e).join(" ");case"qwik":case"reactNative":case"react":case"rsc":return e}}function rt({properties:e}){return e}const st=e=>({href:e.href});function X({block:e,context:t}){var i;const n={...st(e),...e.properties,"builder-id":e.id,style:at({block:e,context:t}),[W()]:[e.id,"builder-block",e.class,(i=e.properties)==null?void 0:i.class].filter(Boolean).join(" ")};return rt({properties:n,context:t,block:e})}function lt(e){return a.jsx(q,{TagName:e.Wrapper,attributes:X({block:e.block,context:e.context}),actionAttributes:pe({block:e.block,rootState:e.context.rootState,rootSetState:e.context.rootSetState,localState:e.context.localState,context:e.context.context,stripPrefix:!0}),children:e.children})}function ct(e){return a.jsx(e.Wrapper,{...e.wrapperProps,attributes:e.includeBlockProps?{...X({block:e.block,context:e.context}),...pe({block:e.block,rootState:e.context.rootState,rootSetState:e.context.rootSetState,localState:e.context.localState,context:e.context.context})}:{},children:e.children})}const dt=({componentOptions:e,builderBlock:t,context:n,componentRef:i,includeBlockProps:o,isInteractive:r,contextValue:s})=>{const l={...e,...o?{attributes:X({block:t,context:s})}:{}};return r?{Wrapper:i,block:t,context:n,wrapperProps:e,includeBlockProps:o}:l};function re(e){var i;const[t,n]=m.useState(()=>e.isInteractive?ct:e.componentRef);return a.jsx(a.Fragment,{children:e.componentRef?a.jsx(a.Fragment,{children:a.jsx(t,{...dt({componentOptions:e.componentOptions,builderBlock:e.builderBlock,context:e.context,componentRef:e.componentRef,linkComponent:e.linkComponent,includeBlockProps:e.includeBlockProps,isInteractive:e.isInteractive,contextValue:e.context}),children:(i=e.blockChildren)==null?void 0:i.map(o=>a.jsx(_,{block:o,context:e.context,registeredComponents:e.registeredComponents,linkComponent:e.linkComponent},o.id))})}):null})}function ut(e){const[t,n]=m.useState(()=>e.repeatContext);return a.jsx(G.Provider,{value:t,children:a.jsx(_,{block:e.block,context:t,registeredComponents:e.registeredComponents,linkComponent:e.linkComponent})})}function _(e){var f,b,v;function t(){return Qe({block:e.block,context:e.context,registeredComponents:e.registeredComponents})}function n(){return Je({block:e.block,context:e.context})}function i(){var x;return(x=e.block.repeat)!=null&&x.collection?e.block:L({block:e.block,localState:e.context.localState,rootState:e.context.rootState,rootSetState:e.context.rootSetState,context:e.context.context,shouldEvaluateBindings:!0})}function o(){var y;return e.block.tagName==="a"||((y=i().properties)==null?void 0:y.href)||i().href?e.linkComponent||"a":e.block.tagName||"div"}function r(){var k,E;if((k=e.block.repeat)!=null&&k.collection)return!!((E=n==null?void 0:n())!=null&&E.length);const x="hide"in i()?i().hide:!1;return("show"in i()?i().show:!0)&&!x}function s(){var y,k;return!((y=t==null?void 0:t())!=null&&y.component)&&!n()?(k=i().children)!=null?k:[]:[]}function l(){var x,y,k,E,j,w,I,R,P;return{blockChildren:(x=i().children)!=null?x:[],componentRef:(y=t==null?void 0:t())==null?void 0:y.component,componentOptions:{...$e(i()),builderContext:e.context,...((k=t==null?void 0:t())==null?void 0:k.name)==="Core:Button"||((E=t==null?void 0:t())==null?void 0:E.name)==="Symbol"||((j=t==null?void 0:t())==null?void 0:j.name)==="Columns"?{builderLinkComponent:e.linkComponent}:{},...((w=t==null?void 0:t())==null?void 0:w.name)==="Symbol"||((I=t==null?void 0:t())==null?void 0:I.name)==="Columns"?{builderComponents:e.registeredComponents}:{}},context:c,linkComponent:e.linkComponent,registeredComponents:e.registeredComponents,builderBlock:i(),includeBlockProps:((R=t==null?void 0:t())==null?void 0:R.noWrap)===!0,isInteractive:!((P=t==null?void 0:t())!=null&&P.isRSC)}}const[c,d]=m.useState(()=>e.context);return m.useEffect(()=>{const x=i().id,y=i().animations;y&&x&&ze(y.filter(k=>k.trigger!=="hover").map(k=>({...k,elementId:x})))},[]),a.jsx(a.Fragment,{children:r()?a.jsxs(a.Fragment,{children:[a.jsx(et,{block:e.block,context:e.context}),(f=t==null?void 0:t())!=null&&f.noWrap?a.jsx(a.Fragment,{children:a.jsx(re,{componentRef:l().componentRef,componentOptions:l().componentOptions,blockChildren:l().blockChildren,context:l().context,registeredComponents:l().registeredComponents,linkComponent:l().linkComponent,builderBlock:l().builderBlock,includeBlockProps:l().includeBlockProps,isInteractive:l().isInteractive})}):a.jsx(a.Fragment,{children:n()?a.jsx(a.Fragment,{children:(v=n())==null?void 0:v.map((x,y)=>a.jsx(ut,{repeatContext:x.context,block:x.block,registeredComponents:e.registeredComponents,linkComponent:e.linkComponent},y))}):a.jsx(a.Fragment,{children:a.jsxs(lt,{Wrapper:o(),block:i(),context:e.context,linkComponent:e.linkComponent,children:[a.jsx(re,{componentRef:l().componentRef,componentOptions:l().componentOptions,blockChildren:l().blockChildren,context:l().context,registeredComponents:l().registeredComponents,linkComponent:l().linkComponent,builderBlock:l().builderBlock,includeBlockProps:l().includeBlockProps,isInteractive:l().isInteractive}),(b=s())==null?void 0:b.map(x=>a.jsx(_,{block:x,context:c,registeredComponents:e.registeredComponents,linkComponent:e.linkComponent},x.id))]})})})]}):null})}function mt(e){function t(){var o;return"builder-blocks"+((o=e.blocks)!=null&&o.length?"":" no-blocks")}function n(){var o,r;u.isEditing()&&!((o=e.blocks)!=null&&o.length)&&((r=window.parent)==null||r.postMessage({type:"builder.clickEmptyBlocks",data:{parentElementId:e.parent,dataPath:e.path}},"*"))}function i(){var o,r;u.isEditing()&&!((o=e.blocks)!=null&&o.length)&&((r=window.parent)==null||r.postMessage({type:"builder.hoverEmptyBlocks",data:{parentElementId:e.parent,dataPath:e.path}},"*"))}return a.jsxs(a.Fragment,{children:[a.jsx(e.BlocksWrapper,{className:t()+" props-blocks-wrapper-4f2c12d8","builder-path":e.path,"builder-parent-id":e.parent,style:e.styleProp,onClick:o=>n(),onMouseEnter:o=>i(),onKeyPress:o=>n(),...e.BlocksWrapperProps,children:e.children}),a.jsx("style",{children:`.props-blocks-wrapper-4f2c12d8 {
8
+ }`:i};function O(e){return a.jsx("style",{dangerouslySetInnerHTML:{__html:e.styles},id:e.id})}function Xe(e){function t(){const i=D({block:e.block,localState:e.context.localState,rootState:e.context.rootState,rootSetState:e.context.rootSetState,context:e.context.context,shouldEvaluateBindings:!0});return u.checkIsDefined(i.hide)?!i.hide:u.checkIsDefined(i.show)?i.show:!0}function n(){var y;const i=D({block:e.block,localState:e.context.localState,rootState:e.context.rootState,rootSetState:e.context.rootSetState,context:e.context.context,shouldEvaluateBindings:!0}),o=i.responsiveStyles,r=e.context.content,l=xe(((y=r==null?void 0:r.meta)==null?void 0:y.breakpoints)||{}),s=o==null?void 0:o.large,c=o==null?void 0:o.medium,d=o==null?void 0:o.small,f=i.id;if(!f)return"";const x=s?M({className:f,styles:s}):"",p=c?M({className:f,styles:c,mediaQuery:ae("medium",l)}):"",S=d?M({className:f,styles:d,mediaQuery:ae("small",l)}):"";return[x,p,S].join(" ")}return a.jsx(a.Fragment,{children:n()&&t()?a.jsx(a.Fragment,{children:a.jsx(O,{styles:n()})}):null})}function Ze(e){return e.charAt(0).toUpperCase()+e.slice(1)}const et=e=>`on${Ze(e)}`,tt=(e,t)=>n=>$({code:e,context:t.context,localState:t.localState,rootState:t.rootState,rootSetState:t.rootSetState,event:n,isExpression:!1});function Se(e){var i;const t={},n=(i=e.block.actions)!=null?i:{};for(const o in n){if(!n.hasOwnProperty(o))continue;const r=n[o];let l=et(o);if(e.stripPrefix)switch(u.TARGET){case"vue":l=l.replace("v-on:","");break;case"svelte":l=l.replace("on:","");break}t[l]=tt(r,e)}return t}function nt({style:e}){return e}const it=({block:e,context:t})=>ve(nt({style:e.style||{},context:t,block:e}));function ve(e){switch(u.TARGET){case"svelte":case"vue":case"solid":return ye(e).join(" ");case"qwik":case"reactNative":case"react":case"rsc":return e}}function ot({properties:e}){return e}const at=e=>({href:e.href});function X({block:e,context:t}){var i;const n={...at(e),...e.properties,"builder-id":e.id,style:it({block:e,context:t}),[W()]:[e.id,"builder-block",e.class,(i=e.properties)==null?void 0:i.class].filter(Boolean).join(" ")};return ot({properties:n,context:t,block:e})}function rt(e){return a.jsx(q,{TagName:e.Wrapper,attributes:X({block:e.block,context:e.context}),actionAttributes:Se({block:e.block,rootState:e.context.rootState,rootSetState:e.context.rootSetState,localState:e.context.localState,context:e.context.context,stripPrefix:!0}),children:e.children})}function lt(e){return a.jsx(e.Wrapper,{...e.wrapperProps,attributes:e.includeBlockProps?{...X({block:e.block,context:e.context}),...Se({block:e.block,rootState:e.context.rootState,rootSetState:e.context.rootSetState,localState:e.context.localState,context:e.context.context})}:{},children:e.children})}const st=({componentOptions:e,builderBlock:t,context:n,componentRef:i,includeBlockProps:o,isInteractive:r,contextValue:l})=>{const s={...e,...o?{attributes:X({block:t,context:l})}:{}};return r?{Wrapper:i,block:t,context:n,wrapperProps:e,includeBlockProps:o}:s};function re(e){var i;const[t,n]=m.useState(()=>e.isInteractive?lt:e.componentRef);return a.jsx(a.Fragment,{children:e.componentRef?a.jsx(a.Fragment,{children:a.jsx(t,{...st({componentOptions:e.componentOptions,builderBlock:e.builderBlock,context:e.context,componentRef:e.componentRef,linkComponent:e.linkComponent,includeBlockProps:e.includeBlockProps,isInteractive:e.isInteractive,contextValue:e.context}),children:(i=e.blockChildren)==null?void 0:i.map(o=>a.jsx(_,{block:o,context:e.context,registeredComponents:e.registeredComponents,linkComponent:e.linkComponent},o.id))})}):null})}function ct(e){const[t,n]=m.useState(()=>e.repeatContext);return a.jsx(G.Provider,{value:t,children:a.jsx(_,{block:e.block,context:t,registeredComponents:e.registeredComponents,linkComponent:e.linkComponent})})}function _(e){var f,x,p;function t(){return Ge({block:e.block,context:e.context,registeredComponents:e.registeredComponents})}function n(){return Ye({block:e.block,context:e.context})}function i(){var S;return(S=e.block.repeat)!=null&&S.collection?e.block:D({block:e.block,localState:e.context.localState,rootState:e.context.rootState,rootSetState:e.context.rootSetState,context:e.context.context,shouldEvaluateBindings:!0})}function o(){var y;return e.block.tagName==="a"||((y=i().properties)==null?void 0:y.href)||i().href?e.linkComponent||"a":e.block.tagName||"div"}function r(){var v,E;if((v=e.block.repeat)!=null&&v.collection)return!!((E=n==null?void 0:n())!=null&&E.length);const S="hide"in i()?i().hide:!1;return("show"in i()?i().show:!0)&&!S}function l(){var y,v;return!((y=t==null?void 0:t())!=null&&y.component)&&!n()?(v=i().children)!=null?v:[]:[]}function s(){var S,y,v,E,R,C,w,T,P;return{blockChildren:(S=i().children)!=null?S:[],componentRef:(y=t==null?void 0:t())==null?void 0:y.component,componentOptions:{...We(i()),builderContext:e.context,...((v=t==null?void 0:t())==null?void 0:v.name)==="Core:Button"||((E=t==null?void 0:t())==null?void 0:E.name)==="Symbol"||((R=t==null?void 0:t())==null?void 0:R.name)==="Columns"?{builderLinkComponent:e.linkComponent}:{},...((C=t==null?void 0:t())==null?void 0:C.name)==="Symbol"||((w=t==null?void 0:t())==null?void 0:w.name)==="Columns"?{builderComponents:e.registeredComponents}:{}},context:c,linkComponent:e.linkComponent,registeredComponents:e.registeredComponents,builderBlock:i(),includeBlockProps:((T=t==null?void 0:t())==null?void 0:T.noWrap)===!0,isInteractive:!((P=t==null?void 0:t())!=null&&P.isRSC)}}const[c,d]=m.useState(()=>e.context);return m.useEffect(()=>{const S=i().id,y=i().animations;y&&S&&Me(y.filter(v=>v.trigger!=="hover").map(v=>({...v,elementId:S})))},[]),a.jsx(a.Fragment,{children:r()?a.jsxs(a.Fragment,{children:[a.jsx(Xe,{block:e.block,context:e.context}),(f=t==null?void 0:t())!=null&&f.noWrap?a.jsx(a.Fragment,{children:a.jsx(re,{componentRef:s().componentRef,componentOptions:s().componentOptions,blockChildren:s().blockChildren,context:s().context,registeredComponents:s().registeredComponents,linkComponent:s().linkComponent,builderBlock:s().builderBlock,includeBlockProps:s().includeBlockProps,isInteractive:s().isInteractive})}):a.jsx(a.Fragment,{children:n()?a.jsx(a.Fragment,{children:(p=n())==null?void 0:p.map((S,y)=>a.jsx(ct,{repeatContext:S.context,block:S.block,registeredComponents:e.registeredComponents,linkComponent:e.linkComponent},y))}):a.jsx(a.Fragment,{children:a.jsxs(rt,{Wrapper:o(),block:i(),context:e.context,linkComponent:e.linkComponent,children:[a.jsx(re,{componentRef:s().componentRef,componentOptions:s().componentOptions,blockChildren:s().blockChildren,context:s().context,registeredComponents:s().registeredComponents,linkComponent:s().linkComponent,builderBlock:s().builderBlock,includeBlockProps:s().includeBlockProps,isInteractive:s().isInteractive}),(x=l())==null?void 0:x.map(S=>a.jsx(_,{block:S,context:c,registeredComponents:e.registeredComponents,linkComponent:e.linkComponent},S.id))]})})})]}):null})}function dt(e){function t(){var o;return"builder-blocks"+((o=e.blocks)!=null&&o.length?"":" no-blocks")}function n(){var o,r;u.isEditing()&&!((o=e.blocks)!=null&&o.length)&&((r=window.parent)==null||r.postMessage({type:"builder.clickEmptyBlocks",data:{parentElementId:e.parent,dataPath:e.path}},"*"))}function i(){var o,r;u.isEditing()&&!((o=e.blocks)!=null&&o.length)&&((r=window.parent)==null||r.postMessage({type:"builder.hoverEmptyBlocks",data:{parentElementId:e.parent,dataPath:e.path}},"*"))}return a.jsxs(a.Fragment,{children:[a.jsx(e.BlocksWrapper,{className:t()+" props-blocks-wrapper-4f2c12d8","builder-path":e.path,"builder-parent-id":e.parent,style:e.styleProp,onClick:o=>n(),onMouseEnter:o=>i(),onKeyPress:o=>n(),...e.BlocksWrapperProps,children:e.children}),a.jsx("style",{children:`.props-blocks-wrapper-4f2c12d8 {
9
9
  display: flex;
10
10
  flex-direction: column;
11
11
  align-items: stretch;
12
- }`})]})}function $(e){var i,o,r;const t=m.useContext(G),n=m.useContext(ge);return a.jsx(mt,{blocks:e.blocks,parent:e.parent,path:e.path,styleProp:e.styleProp,BlocksWrapper:(i=e.context)==null?void 0:i.BlocksWrapper,BlocksWrapperProps:(o=e.context)==null?void 0:o.BlocksWrapperProps,children:e.blocks?a.jsx(a.Fragment,{children:(r=e.blocks)==null?void 0:r.map(s=>a.jsx(_,{block:s,linkComponent:e.linkComponent,context:e.context||t,registeredComponents:e.registeredComponents||n.registeredComponents},s.id))}):null})}function ke(e){var j;const[t,n]=m.useState(()=>typeof e.space=="number"?e.space||0:20),[i,o]=m.useState(()=>e.columns||[]),[r,s]=m.useState(()=>e.stackColumnsAt||"tablet");function l(w){var I;return((I=i[w])==null?void 0:I.width)||100/i.length}function c(w){const I=t*(i.length-1)/i.length;return`calc(${l(w)}% - ${I}px)`}function d({stackedStyle:w,desktopStyle:I}){return r==="tablet"?w:I}function f({stackedStyle:w,desktopStyle:I}){return r==="never"?I:w}const[b,v]=m.useState(()=>e.stackColumnsAt==="never"?"row":e.reverseColumnsWhenStacked?"column-reverse":"column");function x(){return{"--flex-dir":b,"--flex-dir-tablet":d({stackedStyle:b,desktopStyle:"row"})}}function y(w){const I=w===0?0:t,R=c(w),P=`${I}px`,B="100%",F=0;return{...{display:"flex",flexDirection:"column",alignItems:"stretch"},width:R,["marginLeft"]:P,"--column-width-mobile":f({stackedStyle:B,desktopStyle:R}),"--column-margin-left-mobile":f({stackedStyle:F,desktopStyle:P}),"--column-width-tablet":d({stackedStyle:B,desktopStyle:R}),"--column-margin-left-tablet":d({stackedStyle:F,desktopStyle:P})}}function k(w){var R,P;return ye(((P=(R=e.builderContext.content)==null?void 0:R.meta)==null?void 0:P.breakpoints)||{})[w].max}function E(){return`
13
- @media (max-width: ${k("medium")}px) {
12
+ }`})]})}function N(e){var i,o,r;const t=m.useContext(G),n=m.useContext(fe);return a.jsx(dt,{blocks:e.blocks,parent:e.parent,path:e.path,styleProp:e.styleProp,BlocksWrapper:(i=e.context)==null?void 0:i.BlocksWrapper,BlocksWrapperProps:(o=e.context)==null?void 0:o.BlocksWrapperProps,children:e.blocks?a.jsx(a.Fragment,{children:(r=e.blocks)==null?void 0:r.map(l=>a.jsx(_,{block:l,linkComponent:e.linkComponent,context:e.context||t,registeredComponents:e.registeredComponents||n.registeredComponents},l.id))}):null})}function ke(e){var R;const[t,n]=m.useState(()=>typeof e.space=="number"?e.space||0:20),[i,o]=m.useState(()=>e.columns||[]),[r,l]=m.useState(()=>e.stackColumnsAt||"tablet");function s(C){var w;return((w=i[C])==null?void 0:w.width)||100/i.length}function c(C){const w=t*(i.length-1)/i.length;return`calc(${s(C)}% - ${w}px)`}function d({stackedStyle:C,desktopStyle:w}){return r==="tablet"?C:w}function f({stackedStyle:C,desktopStyle:w}){return r==="never"?w:C}const[x,p]=m.useState(()=>e.stackColumnsAt==="never"?"row":e.reverseColumnsWhenStacked?"column-reverse":"column");function S(){return{"--flex-dir":x,"--flex-dir-tablet":d({stackedStyle:x,desktopStyle:"row"})}}function y(C){const w=C===0?0:t,T=c(C),P=`${w}px`,B="100%",F=0;return{...{display:"flex",flexDirection:"column",alignItems:"stretch"},width:T,["marginLeft"]:P,"--column-width-mobile":f({stackedStyle:B,desktopStyle:T}),"--column-margin-left-mobile":f({stackedStyle:F,desktopStyle:P}),"--column-width-tablet":d({stackedStyle:B,desktopStyle:T}),"--column-margin-left-tablet":d({stackedStyle:F,desktopStyle:P})}}function v(C){var T,P;return xe(((P=(T=e.builderContext.content)==null?void 0:T.meta)==null?void 0:P.breakpoints)||{})[C].max}function E(){return`
13
+ @media (max-width: ${v("medium")}px) {
14
14
  .${e.builderBlock.id}-breakpoints {
15
15
  flex-direction: var(--flex-dir-tablet);
16
16
  align-items: stretch;
@@ -22,7 +22,7 @@
22
22
  }
23
23
  }
24
24
 
25
- @media (max-width: ${k("small")}px) {
25
+ @media (max-width: ${v("small")}px) {
26
26
  .${e.builderBlock.id}-breakpoints {
27
27
  flex-direction: var(--flex-dir);
28
28
  align-items: stretch;
@@ -33,10 +33,10 @@
33
33
  margin-left: var(--column-margin-left-mobile) !important;
34
34
  }
35
35
  },
36
- `}return a.jsxs(a.Fragment,{children:[a.jsxs("div",{className:`builder-columns ${e.builderBlock.id}-breakpoints div-6f826264`,style:x(),children:[a.jsx(a.Fragment,{children:a.jsx(O,{styles:E()})}),(j=e.columns)==null?void 0:j.map((w,I)=>a.jsx(q,{TagName:w.link?e.builderLinkComponent||"a":"div",actionAttributes:{},attributes:{...w.link?{href:w.link}:{},[W()]:"builder-column",style:ve(y(I))},children:a.jsx($,{path:`component.options.columns.${I}.blocks`,parent:e.builderBlock.id,styleProp:{flexGrow:"1"},context:e.builderContext,registeredComponents:e.builderComponents,linkComponent:e.builderLinkComponent,blocks:w.blocks})},I))]}),a.jsx("style",{children:`.div-6f826264 {
36
+ `}return a.jsxs(a.Fragment,{children:[a.jsxs("div",{className:`builder-columns ${e.builderBlock.id}-breakpoints div-6f826264`,style:S(),children:[a.jsx(a.Fragment,{children:a.jsx(O,{styles:E()})}),(R=e.columns)==null?void 0:R.map((C,w)=>a.jsx(q,{TagName:C.link?e.builderLinkComponent||"a":"div",actionAttributes:{},attributes:{...C.link?{href:C.link}:{},[W()]:"builder-column",style:ve(y(w))},children:a.jsx(N,{path:`component.options.columns.${w}.blocks`,parent:e.builderBlock.id,styleProp:{flexGrow:"1"},context:e.builderContext,registeredComponents:e.builderComponents,linkComponent:e.builderLinkComponent,blocks:C.blocks})},w))]}),a.jsx("style",{children:`.div-6f826264 {
37
37
  display: flex;
38
38
  line-height: normal;
39
- }`})]})}function Ce(e){return a.jsx("span",{children:e.children})}function se(e){return e.replace(/http(s)?:/,"")}function ft(e="",t,n){const i=new RegExp("([?&])"+t+"=.*?(&|$)","i"),o=e.indexOf("?")!==-1?"&":"?";return e.match(i)?e.replace(i,"$1"+t+"="+encodeURIComponent(n)+"$2"):e+o+t+"="+encodeURIComponent(n)}function gt(e,t){if(!e||!(e!=null&&e.match(/cdn\.shopify\.com/))||!t)return e;if(t==="master")return se(e);const n=e.match(/(_\d+x(\d+)?)?(\.(jpg|jpeg|gif|png|bmp|bitmap|tiff|tif)(\?v=\d+)?)/i);if(n){const i=e.split(n[0]),o=n[3],r=t.match("x")?t:`${t}x`;return se(`${i[0]}_${r}${o}`)}return null}function K(e){if(!e)return e;const t=[100,200,400,800,1200,1600,2e3];if(e.match(/builder\.io/)){let n=e;const i=Number(e.split("?width=")[1]);return isNaN(i)||(n=`${n} ${i}w`),t.filter(o=>o!==i).map(o=>`${ft(e,"width",o)} ${o}w`).concat([n]).join(", ")}return e.match(/cdn\.shopify\.com/)?t.map(n=>[gt(e,`${n}x${n}`),n]).filter(([n])=>!!n).map(([n,i])=>`${n} ${i}w`).concat([e]).join(", "):e}function we(e){var o,r,s,l;function t(){var f;const d=e.image||e.src;if(!d||!(d.match(/builder\.io/)||d.match(/cdn\.shopify\.com/)))return e.srcset;if(e.srcset&&((f=e.image)!=null&&f.includes("builder.io/api/v1/image"))){if(!e.srcset.includes(e.image.split("?")[0]))return console.debug("Removed given srcset"),K(d)}else if(e.image&&!e.srcset)return K(d);return K(d)}function n(){var c;return(c=t==null?void 0:t())!=null&&c.match(/builder\.io/)&&!e.noWebp?t().replace(/\?/g,"?format=webp&"):""}function i(){const c={position:"absolute",height:"100%",width:"100%",left:"0px",top:"0px"};return e.aspectRatio?c:void 0}return a.jsxs(a.Fragment,{children:[a.jsxs(a.Fragment,{children:[a.jsxs("picture",{children:[n()?a.jsx(a.Fragment,{children:a.jsx("source",{type:"image/webp",srcSet:n()})}):null,a.jsx("img",{loading:"lazy",alt:e.altText,role:e.altText?"presentation":void 0,style:{objectPosition:e.backgroundPosition||"center",objectFit:e.backgroundSize||"cover",...i()},className:"builder-image"+(e.className?" "+e.className:"")+" img-40c70c9b",src:e.image,srcSet:t(),sizes:e.sizes})]}),e.aspectRatio&&!((r=(o=e.builderBlock)==null?void 0:o.children)!=null&&r.length&&e.fitContent)?a.jsx(a.Fragment,{children:a.jsx("div",{className:"builder-image-sizer div-40c70c9b",style:{paddingTop:e.aspectRatio*100+"%"}})}):null,(l=(s=e.builderBlock)==null?void 0:s.children)!=null&&l.length&&e.fitContent?a.jsx(a.Fragment,{children:e.children}):null,!e.fitContent&&e.children?a.jsx(a.Fragment,{children:a.jsx("div",{className:"div-40c70c9b-2",children:e.children})}):null]}),a.jsx("style",{children:`.img-40c70c9b {
39
+ }`})]})}function pe(e){return a.jsx("span",{children:e.children})}function le(e){return e.replace(/http(s)?:/,"")}function ut(e="",t,n){const i=new RegExp("([?&])"+t+"=.*?(&|$)","i"),o=e.indexOf("?")!==-1?"&":"?";return e.match(i)?e.replace(i,"$1"+t+"="+encodeURIComponent(n)+"$2"):e+o+t+"="+encodeURIComponent(n)}function mt(e,t){if(!e||!(e!=null&&e.match(/cdn\.shopify\.com/))||!t)return e;if(t==="master")return le(e);const n=e.match(/(_\d+x(\d+)?)?(\.(jpg|jpeg|gif|png|bmp|bitmap|tiff|tif)(\?v=\d+)?)/i);if(n){const i=e.split(n[0]),o=n[3],r=t.match("x")?t:`${t}x`;return le(`${i[0]}_${r}${o}`)}return null}function K(e){if(!e)return e;const t=[100,200,400,800,1200,1600,2e3];if(e.match(/builder\.io/)){let n=e;const i=Number(e.split("?width=")[1]);return isNaN(i)||(n=`${n} ${i}w`),t.filter(o=>o!==i).map(o=>`${ut(e,"width",o)} ${o}w`).concat([n]).join(", ")}return e.match(/cdn\.shopify\.com/)?t.map(n=>[mt(e,`${n}x${n}`),n]).filter(([n])=>!!n).map(([n,i])=>`${n} ${i}w`).concat([e]).join(", "):e}function Ce(e){var o,r,l,s;function t(){var f;const d=e.image||e.src;if(!d||!(d.match(/builder\.io/)||d.match(/cdn\.shopify\.com/)))return e.srcset;if(e.srcset&&((f=e.image)!=null&&f.includes("builder.io/api/v1/image"))){if(!e.srcset.includes(e.image.split("?")[0]))return console.debug("Removed given srcset"),K(d)}else if(e.image&&!e.srcset)return K(d);return K(d)}function n(){var c;return(c=t==null?void 0:t())!=null&&c.match(/builder\.io/)&&!e.noWebp?t().replace(/\?/g,"?format=webp&"):""}function i(){const c={position:"absolute",height:"100%",width:"100%",left:"0px",top:"0px"};return e.aspectRatio?c:void 0}return a.jsxs(a.Fragment,{children:[a.jsxs(a.Fragment,{children:[a.jsxs("picture",{children:[n()?a.jsx(a.Fragment,{children:a.jsx("source",{type:"image/webp",srcSet:n()})}):null,a.jsx("img",{loading:"lazy",alt:e.altText,role:e.altText?"presentation":void 0,style:{objectPosition:e.backgroundPosition||"center",objectFit:e.backgroundSize||"cover",...i()},className:"builder-image"+(e.className?" "+e.className:"")+" img-40c70c9b",src:e.image,srcSet:t(),sizes:e.sizes})]}),e.aspectRatio&&!((r=(o=e.builderBlock)==null?void 0:o.children)!=null&&r.length&&e.fitContent)?a.jsx(a.Fragment,{children:a.jsx("div",{className:"builder-image-sizer div-40c70c9b",style:{paddingTop:e.aspectRatio*100+"%"}})}):null,(s=(l=e.builderBlock)==null?void 0:l.children)!=null&&s.length&&e.fitContent?a.jsx(a.Fragment,{children:e.children}):null,!e.fitContent&&e.children?a.jsx(a.Fragment,{children:a.jsx("div",{className:"div-40c70c9b-2",children:e.children})}):null]}),a.jsx("style",{children:`.img-40c70c9b {
40
40
  opacity: 1;
41
41
  transition: opacity 0.2s ease-in-out;
42
42
  }.div-40c70c9b {
@@ -52,7 +52,7 @@
52
52
  left: 0;
53
53
  width: 100%;
54
54
  height: 100%;
55
- }`})]})}function Ie(e){return a.jsx("section",{...e.attributes,style:{width:"100%",alignSelf:"stretch",flexGrow:1,boxSizing:"border-box",maxWidth:e.maxWidth||1200,display:"flex",flexDirection:"column",alignItems:"stretch",marginLeft:"auto",marginRight:"auto"},children:e.children})}const ht={name:"Core:Button",image:"https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2F81a15681c3e74df09677dfc57a615b13",defaultStyles:{appearance:"none",paddingTop:"15px",paddingBottom:"15px",paddingLeft:"25px",paddingRight:"25px",backgroundColor:"#000000",color:"white",borderRadius:"4px",textAlign:"center",cursor:"pointer"},inputs:[{name:"text",type:"text",defaultValue:"Click me!",bubble:!0},{name:"link",type:"url",bubble:!0},{name:"openLinkInNewTab",type:"boolean",defaultValue:!1,friendlyName:"Open link in new tab"}],static:!0,noWrap:!0},bt={name:"Columns",isRSC:!0,inputs:[{name:"columns",type:"array",broadcast:!0,subFields:[{name:"blocks",type:"array",hideFromUI:!0,defaultValue:[{"@type":"@builder.io/sdk:Element",responsiveStyles:{large:{display:"flex",flexDirection:"column",alignItems:"stretch",flexShrink:"0",position:"relative",marginTop:"30px",textAlign:"center",lineHeight:"normal",height:"auto",minHeight:"20px",minWidth:"20px",overflow:"hidden"}},component:{name:"Image",options:{image:"https://builder.io/api/v1/image/assets%2Fpwgjf0RoYWbdnJSbpBAjXNRMe9F2%2Ffb27a7c790324294af8be1c35fe30f4d",backgroundPosition:"center",backgroundSize:"cover",aspectRatio:.7004048582995948}}},{"@type":"@builder.io/sdk:Element",responsiveStyles:{large:{display:"flex",flexDirection:"column",alignItems:"stretch",flexShrink:"0",position:"relative",marginTop:"30px",textAlign:"center",lineHeight:"normal",height:"auto"}},component:{name:"Text",options:{text:"<p>Enter some text...</p>"}}}]},{name:"width",type:"number",hideFromUI:!0,helperText:"Width %, e.g. set to 50 to fill half of the space"},{name:"link",type:"url",helperText:"Optionally set a url that clicking this column will link to"}],defaultValue:[{blocks:[{"@type":"@builder.io/sdk:Element",responsiveStyles:{large:{display:"flex",flexDirection:"column",alignItems:"stretch",flexShrink:"0",position:"relative",marginTop:"30px",textAlign:"center",lineHeight:"normal",height:"auto",minHeight:"20px",minWidth:"20px",overflow:"hidden"}},component:{name:"Image",options:{image:"https://builder.io/api/v1/image/assets%2Fpwgjf0RoYWbdnJSbpBAjXNRMe9F2%2Ffb27a7c790324294af8be1c35fe30f4d",backgroundPosition:"center",backgroundSize:"cover",aspectRatio:.7004048582995948}}},{"@type":"@builder.io/sdk:Element",responsiveStyles:{large:{display:"flex",flexDirection:"column",alignItems:"stretch",flexShrink:"0",position:"relative",marginTop:"30px",textAlign:"center",lineHeight:"normal",height:"auto"}},component:{name:"Text",options:{text:"<p>Enter some text...</p>"}}}]},{blocks:[{"@type":"@builder.io/sdk:Element",responsiveStyles:{large:{display:"flex",flexDirection:"column",alignItems:"stretch",flexShrink:"0",position:"relative",marginTop:"30px",textAlign:"center",lineHeight:"normal",height:"auto",minHeight:"20px",minWidth:"20px",overflow:"hidden"}},component:{name:"Image",options:{image:"https://builder.io/api/v1/image/assets%2Fpwgjf0RoYWbdnJSbpBAjXNRMe9F2%2Ffb27a7c790324294af8be1c35fe30f4d",backgroundPosition:"center",backgroundSize:"cover",aspectRatio:.7004048582995948}}},{"@type":"@builder.io/sdk:Element",responsiveStyles:{large:{display:"flex",flexDirection:"column",alignItems:"stretch",flexShrink:"0",position:"relative",marginTop:"30px",textAlign:"center",lineHeight:"normal",height:"auto"}},component:{name:"Text",options:{text:"<p>Enter some text...</p>"}}}]}],onChange:e=>{function t(){n.forEach(i=>{i.delete("width")})}const n=e.get("columns");Array.isArray(n)&&n.find(o=>o.get("width"))&&(n.find(r=>!r.get("width"))||n.reduce((l,c)=>l+c.get("width"),0)!==100)&&t()}},{name:"space",type:"number",defaultValue:20,helperText:"Size of gap between columns",advanced:!0},{name:"stackColumnsAt",type:"string",defaultValue:"tablet",helperText:"Convert horizontal columns to vertical at what device size",enum:["tablet","mobile","never"],advanced:!0},{name:"reverseColumnsWhenStacked",type:"boolean",defaultValue:!1,helperText:"When stacking columns for mobile devices, reverse the ordering",advanced:!0}]},xt={name:"Custom Code",static:!0,requiredPermissions:["editCode"],inputs:[{name:"code",type:"html",required:!0,defaultValue:"<p>Hello there, I am custom HTML code!</p>",code:!0},{name:"replaceNodes",type:"boolean",helperText:"Preserve server rendered dom nodes",advanced:!0},{name:"scriptsClientOnly",type:"boolean",defaultValue:!1,helperText:"Only print and run scripts on the client. Important when scripts influence DOM that could be replaced when client loads",advanced:!0}]};function yt(e){const t=m.useRef(null),[n,i]=m.useState(()=>[]),[o,r]=m.useState(()=>[]);return m.useEffect(()=>{var l;if(!((l=t.current)!=null&&l.getElementsByTagName)||typeof window=="undefined")return;const s=t.current.getElementsByTagName("script");for(let c=0;c<s.length;c++){const d=s[c];if(d.src){if(n.includes(d.src))continue;n.push(d.src);const f=document.createElement("script");f.async=!0,f.src=d.src,document.head.appendChild(f)}else if(!d.type||["text/javascript","application/javascript","application/ecmascript"].includes(d.type)){if(o.includes(d.innerText))continue;try{o.push(d.innerText),new Function(d.innerText)()}catch(f){console.warn("`CustomCode`: Error running script:",f)}}}},[]),a.jsx("div",{ref:t,className:"builder-custom-code"+(e.replaceNodes?" replace-nodes":""),dangerouslySetInnerHTML:{__html:e.code}})}const St={name:"Embed",static:!0,inputs:[{name:"url",type:"url",required:!0,defaultValue:"",helperText:"e.g. enter a youtube url, google map, etc",onChange:e=>{const t=e.get("url");if(t)return e.set("content","Loading..."),fetch(`https://iframe.ly/api/iframely?url=${t}&api_key=ae0e60e78201a3f2b0de4b`).then(i=>i.json()).then(i=>{e.get("url")===t&&(i.html?e.set("content",i.html):e.set("content","Invalid url, please try another"))}).catch(i=>{e.set("content","There was an error embedding this URL, please try again or another URL")});e.delete("content")}},{name:"content",type:"html",defaultValue:'<div style="padding: 20px; text-align: center">(Choose an embed URL)<div>',hideFromUI:!0}]},pt=["text/javascript","application/javascript","application/ecmascript"],vt=e=>pt.includes(e.type);function kt(e){const t=m.useRef(null),[n,i]=m.useState(()=>[]),[o,r]=m.useState(()=>[]),[s,l]=m.useState(()=>!1);function c(){if(!t.current||!t.current.getElementsByTagName)return;const d=t.current.getElementsByTagName("script");for(let f=0;f<d.length;f++){const b=d[f];if(b.src&&!n.includes(b.src)){n.push(b.src);const v=document.createElement("script");v.async=!0,v.src=b.src,document.head.appendChild(v)}else if(vt(b)&&!o.includes(b.innerText))try{o.push(b.innerText),new Function(b.innerText)()}catch(v){console.warn("`Embed`: Error running script:",v)}}}return m.useEffect(()=>{t.current&&!s&&(l(!0),c())},[t.current,s]),a.jsx("div",{className:"builder-embed",ref:t,dangerouslySetInnerHTML:{__html:e.content}})}const Ct={name:"Fragment",static:!0,hidden:!0,canHaveChildren:!0,noWrap:!0},wt={name:"Image",static:!0,image:"https://firebasestorage.googleapis.com/v0/b/builder-3b0a2.appspot.com/o/images%2Fbaseline-insert_photo-24px.svg?alt=media&token=4e5d0ef4-f5e8-4e57-b3a9-38d63a9b9dc4",defaultStyles:{position:"relative",minHeight:"20px",minWidth:"20px",overflow:"hidden"},canHaveChildren:!0,inputs:[{name:"image",type:"file",bubble:!0,allowedFileTypes:["jpeg","jpg","png","svg"],required:!0,defaultValue:"https://cdn.builder.io/api/v1/image/assets%2FYJIGb4i01jvw0SRdL5Bt%2F72c80f114dc149019051b6852a9e3b7a",onChange:e=>{e.delete("srcset"),e.delete("noWebp");function n(s,l=6e4){return new Promise((c,d)=>{const f=document.createElement("img");let b=!1;f.onload=()=>{b=!0,c(f)},f.addEventListener("error",v=>{console.warn("Image load failed",v.error),d(v.error)}),f.src=s,setTimeout(()=>{b||d(new Error("Image load timed out"))},l)})}function i(s){return Math.round(s*1e3)/1e3}const o=e.get("image"),r=e.get("aspectRatio");if(fetch(o).then(s=>s.blob()).then(s=>{s.type.includes("svg")&&e.set("noWebp",!0)}),o&&(!r||r===.7041))return n(o).then(s=>{const l=e.get("aspectRatio");e.get("image")===o&&(!l||l===.7041)&&s.width&&s.height&&(e.set("aspectRatio",i(s.height/s.width)),e.set("height",s.height),e.set("width",s.width))})}},{name:"backgroundSize",type:"text",defaultValue:"cover",enum:[{label:"contain",value:"contain",helperText:"The image should never get cropped"},{label:"cover",value:"cover",helperText:"The image should fill it's box, cropping when needed"}]},{name:"backgroundPosition",type:"text",defaultValue:"center",enum:["center","top","left","right","bottom","top left","top right","bottom left","bottom right"]},{name:"altText",type:"string",helperText:"Text to display when the user has images off"},{name:"height",type:"number",hideFromUI:!0},{name:"width",type:"number",hideFromUI:!0},{name:"sizes",type:"string",hideFromUI:!0},{name:"srcset",type:"string",hideFromUI:!0},{name:"lazy",type:"boolean",defaultValue:!0,hideFromUI:!0},{name:"fitContent",type:"boolean",helperText:"When child blocks are provided, fit to them instead of using the image's aspect ratio",defaultValue:!0},{name:"aspectRatio",type:"number",helperText:"This is the ratio of height/width, e.g. set to 1.5 for a 300px wide and 200px tall photo. Set to 0 to not force the image to maintain it's aspect ratio",advanced:!0,defaultValue:.7041}]},It={name:"Raw:Img",hideFromInsertMenu:!0,image:"https://firebasestorage.googleapis.com/v0/b/builder-3b0a2.appspot.com/o/images%2Fbaseline-insert_photo-24px.svg?alt=media&token=4e5d0ef4-f5e8-4e57-b3a9-38d63a9b9dc4",inputs:[{name:"image",bubble:!0,type:"file",allowedFileTypes:["jpeg","jpg","png","svg","gif","webp"],required:!0}],noWrap:!0,static:!0};function Tt(e){return a.jsx("img",{style:{objectFit:e.backgroundSize||"cover",objectPosition:e.backgroundPosition||"center"},alt:e.altText,src:e.imgSrc||e.image,...e.attributes},u.isEditing()&&e.imgSrc||"default-key")}const Et={name:"Core:Section",static:!0,image:"https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2F682efef23ace49afac61748dd305c70a",inputs:[{name:"maxWidth",type:"number",defaultValue:1200},{name:"lazyLoad",type:"boolean",defaultValue:!1,advanced:!0,description:"Only render this section when in view"}],defaultStyles:{paddingLeft:"20px",paddingRight:"20px",paddingTop:"50px",paddingBottom:"50px",marginTop:"0px",width:"100vw",marginLeft:"calc(50% - 50vw)"},canHaveChildren:!0,defaultChildren:[{"@type":"@builder.io/sdk:Element",responsiveStyles:{large:{textAlign:"center"}},component:{name:"Text",options:{text:"<p><b>I am a section! My content keeps from getting too wide, so that it's easy to read even on big screens.</b></p><p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur</p>"}}}]},Rt={name:"Slot",isRSC:!0,description:"Allow child blocks to be inserted into this content when used as a Symbol",docsLink:"https://www.builder.io/c/docs/symbols-with-blocks",image:"https://cdn.builder.io/api/v1/image/assets%2FYJIGb4i01jvw0SRdL5Bt%2F3aad6de36eae43b59b52c85190fdef56",inputs:[{name:"name",type:"string",required:!0,defaultValue:"children"}]};function jt(e){var t,n,i;return a.jsx("div",{style:{pointerEvents:"auto"},...!((t=e.builderContext.context)!=null&&t.symbolId)&&{"builder-slot":e.name},children:a.jsx($,{parent:(n=e.builderContext.context)==null?void 0:n.symbolId,path:`symbol.data.${e.name}`,context:e.builderContext,blocks:(i=e.builderContext.rootState)==null?void 0:i[e.name]})})}const Pt={name:"Symbol",noWrap:!0,static:!0,isRSC:!0,inputs:[{name:"symbol",type:"uiSymbol"},{name:"dataOnly",helperText:"Make this a data symbol that doesn't display any UI",type:"boolean",defaultValue:!1,advanced:!0,hideFromUI:!0},{name:"inheritState",helperText:"Inherit the parent component state and data",type:"boolean",defaultValue:!1,advanced:!0},{name:"renderToLiquid",helperText:"Render this symbols contents to liquid. Turn off to fetch with javascript and use custom targeting",type:"boolean",defaultValue:!1,advanced:!0,hideFromUI:!0},{name:"useChildren",hideFromUI:!0,type:"boolean"}]},At={name:"Text",static:!0,isRSC:!0,image:"https://firebasestorage.googleapis.com/v0/b/builder-3b0a2.appspot.com/o/images%2Fbaseline-text_fields-24px%20(1).svg?alt=media&token=12177b73-0ee3-42ca-98c6-0dd003de1929",inputs:[{name:"text",type:"html",required:!0,autoFocus:!0,bubble:!0,defaultValue:"Enter some text..."}],defaultStyles:{lineHeight:"normal",height:"auto",textAlign:"center"}};function Te(e){var t;return a.jsx("div",{className:"builder-text",dangerouslySetInnerHTML:{__html:((t=e.text)==null?void 0:t.toString())||""},style:{outline:"none"}})}const Bt={name:"Video",canHaveChildren:!0,defaultStyles:{minHeight:"20px",minWidth:"20px"},image:"https://firebasestorage.googleapis.com/v0/b/builder-3b0a2.appspot.com/o/images%2Fbaseline-videocam-24px%20(1).svg?alt=media&token=49a84e4a-b20e-4977-a650-047f986874bb",inputs:[{name:"video",type:"file",allowedFileTypes:["mp4"],bubble:!0,defaultValue:"https://firebasestorage.googleapis.com/v0/b/builder-3b0a2.appspot.com/o/assets%2FKQlEmWDxA0coC3PK6UvkrjwkIGI2%2F28cb070609f546cdbe5efa20e931aa4b?alt=media&token=912e9551-7a7c-4dfb-86b6-3da1537d1a7f",required:!0},{name:"posterImage",type:"file",allowedFileTypes:["jpeg","png"],helperText:"Image to show before the video plays"},{name:"autoPlay",type:"boolean",defaultValue:!0},{name:"controls",type:"boolean",defaultValue:!1},{name:"muted",type:"boolean",defaultValue:!0},{name:"loop",type:"boolean",defaultValue:!0},{name:"playsInline",type:"boolean",defaultValue:!0},{name:"fit",type:"text",defaultValue:"cover",enum:["contain","cover","fill","auto"]},{name:"preload",type:"text",defaultValue:"metadata",enum:["auto","metadata","none"]},{name:"fitContent",type:"boolean",helperText:"When child blocks are provided, fit to them instead of using the aspect ratio",defaultValue:!0,advanced:!0},{name:"position",type:"text",defaultValue:"center",enum:["center","top","left","right","bottom","top left","top right","bottom left","bottom right"]},{name:"height",type:"number",advanced:!0},{name:"width",type:"number",advanced:!0},{name:"aspectRatio",type:"number",advanced:!0,defaultValue:.7004048582995948},{name:"lazyLoad",type:"boolean",helperText:'Load this video "lazily" - as in only when a user scrolls near the video. Recommended for optmized performance and bandwidth consumption',defaultValue:!0,advanced:!0}]};function Ee(e){var i,o,r,s,l,c,d;function t(){return{...e.autoPlay===!0?{autoPlay:!0}:{},...e.muted===!0?{muted:!0}:{},...e.controls===!0?{controls:!0}:{},...e.loop===!0?{loop:!0}:{},...e.playsInline===!0?{playsInline:!0}:{}}}function n(){return{...t()}}return a.jsxs("div",{style:{position:"relative"},children:[a.jsx("video",{className:"builder-video",...n(),preload:e.preload||"metadata",style:{width:"100%",height:"100%",...(i=e.attributes)==null?void 0:i.style,objectFit:e.fit,objectPosition:e.position,zIndex:2,borderRadius:"1px",...e.aspectRatio?{position:"absolute"}:null},src:e.video||"no-src",poster:e.posterImage,children:e.lazyLoad?null:a.jsx("source",{type:"video/mp4",src:e.video})}),e.aspectRatio&&!(e.fitContent&&((r=(o=e.builderBlock)==null?void 0:o.children)!=null&&r.length))?a.jsx(a.Fragment,{children:a.jsx("div",{style:{width:"100%",paddingTop:e.aspectRatio*100+"%",pointerEvents:"none",fontSize:"0px"}})}):null,(l=(s=e.builderBlock)==null?void 0:s.children)!=null&&l.length&&e.fitContent?a.jsx(a.Fragment,{children:a.jsx("div",{style:{display:"flex",flexDirection:"column",alignItems:"stretch"},children:e.children})}):null,(d=(c=e.builderBlock)==null?void 0:c.children)!=null&&d.length&&!e.fitContent?a.jsx(a.Fragment,{children:a.jsx("div",{style:{pointerEvents:"none",display:"flex",flexDirection:"column",alignItems:"stretch",position:"absolute",top:"0",left:"0",width:"100%",height:"100%"},children:e.children})}):null]})}const le=()=>[{component:fe,...ht},{component:ke,...bt},{component:yt,...xt},{component:kt,...St},{component:Ce,...Ct},{component:we,...wt},{component:Tt,...It},{component:Ie,...Et},{component:Be,...Pt},{component:Te,...At},{component:Ee,...Bt},{component:jt,...Rt}],Ft=`function updateCookiesAndStyles(contentId, variants, isHydrationTarget) {
55
+ }`})]})}function we(e){return a.jsx("section",{...e.attributes,style:{width:"100%",alignSelf:"stretch",flexGrow:1,boxSizing:"border-box",maxWidth:e.maxWidth||1200,display:"flex",flexDirection:"column",alignItems:"stretch",marginLeft:"auto",marginRight:"auto"},children:e.children})}const ft={name:"Core:Button",image:"https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2F81a15681c3e74df09677dfc57a615b13",defaultStyles:{appearance:"none",paddingTop:"15px",paddingBottom:"15px",paddingLeft:"25px",paddingRight:"25px",backgroundColor:"#000000",color:"white",borderRadius:"4px",textAlign:"center",cursor:"pointer"},inputs:[{name:"text",type:"text",defaultValue:"Click me!",bubble:!0},{name:"link",type:"url",bubble:!0},{name:"openLinkInNewTab",type:"boolean",defaultValue:!1,friendlyName:"Open link in new tab"}],static:!0,noWrap:!0},gt={name:"Columns",isRSC:!0,inputs:[{name:"columns",type:"array",broadcast:!0,subFields:[{name:"blocks",type:"array",hideFromUI:!0,defaultValue:[{"@type":"@builder.io/sdk:Element",responsiveStyles:{large:{display:"flex",flexDirection:"column",alignItems:"stretch",flexShrink:"0",position:"relative",marginTop:"30px",textAlign:"center",lineHeight:"normal",height:"auto",minHeight:"20px",minWidth:"20px",overflow:"hidden"}},component:{name:"Image",options:{image:"https://builder.io/api/v1/image/assets%2Fpwgjf0RoYWbdnJSbpBAjXNRMe9F2%2Ffb27a7c790324294af8be1c35fe30f4d",backgroundPosition:"center",backgroundSize:"cover",aspectRatio:.7004048582995948}}},{"@type":"@builder.io/sdk:Element",responsiveStyles:{large:{display:"flex",flexDirection:"column",alignItems:"stretch",flexShrink:"0",position:"relative",marginTop:"30px",textAlign:"center",lineHeight:"normal",height:"auto"}},component:{name:"Text",options:{text:"<p>Enter some text...</p>"}}}]},{name:"width",type:"number",hideFromUI:!0,helperText:"Width %, e.g. set to 50 to fill half of the space"},{name:"link",type:"url",helperText:"Optionally set a url that clicking this column will link to"}],defaultValue:[{blocks:[{"@type":"@builder.io/sdk:Element",responsiveStyles:{large:{display:"flex",flexDirection:"column",alignItems:"stretch",flexShrink:"0",position:"relative",marginTop:"30px",textAlign:"center",lineHeight:"normal",height:"auto",minHeight:"20px",minWidth:"20px",overflow:"hidden"}},component:{name:"Image",options:{image:"https://builder.io/api/v1/image/assets%2Fpwgjf0RoYWbdnJSbpBAjXNRMe9F2%2Ffb27a7c790324294af8be1c35fe30f4d",backgroundPosition:"center",backgroundSize:"cover",aspectRatio:.7004048582995948}}},{"@type":"@builder.io/sdk:Element",responsiveStyles:{large:{display:"flex",flexDirection:"column",alignItems:"stretch",flexShrink:"0",position:"relative",marginTop:"30px",textAlign:"center",lineHeight:"normal",height:"auto"}},component:{name:"Text",options:{text:"<p>Enter some text...</p>"}}}]},{blocks:[{"@type":"@builder.io/sdk:Element",responsiveStyles:{large:{display:"flex",flexDirection:"column",alignItems:"stretch",flexShrink:"0",position:"relative",marginTop:"30px",textAlign:"center",lineHeight:"normal",height:"auto",minHeight:"20px",minWidth:"20px",overflow:"hidden"}},component:{name:"Image",options:{image:"https://builder.io/api/v1/image/assets%2Fpwgjf0RoYWbdnJSbpBAjXNRMe9F2%2Ffb27a7c790324294af8be1c35fe30f4d",backgroundPosition:"center",backgroundSize:"cover",aspectRatio:.7004048582995948}}},{"@type":"@builder.io/sdk:Element",responsiveStyles:{large:{display:"flex",flexDirection:"column",alignItems:"stretch",flexShrink:"0",position:"relative",marginTop:"30px",textAlign:"center",lineHeight:"normal",height:"auto"}},component:{name:"Text",options:{text:"<p>Enter some text...</p>"}}}]}],onChange:e=>{function t(){n.forEach(i=>{i.delete("width")})}const n=e.get("columns");Array.isArray(n)&&n.find(o=>o.get("width"))&&(n.find(r=>!r.get("width"))||n.reduce((s,c)=>s+c.get("width"),0)!==100)&&t()}},{name:"space",type:"number",defaultValue:20,helperText:"Size of gap between columns",advanced:!0},{name:"stackColumnsAt",type:"string",defaultValue:"tablet",helperText:"Convert horizontal columns to vertical at what device size",enum:["tablet","mobile","never"],advanced:!0},{name:"reverseColumnsWhenStacked",type:"boolean",defaultValue:!1,helperText:"When stacking columns for mobile devices, reverse the ordering",advanced:!0}]},ht={name:"Custom Code",static:!0,requiredPermissions:["editCode"],inputs:[{name:"code",type:"html",required:!0,defaultValue:"<p>Hello there, I am custom HTML code!</p>",code:!0},{name:"replaceNodes",type:"boolean",helperText:"Preserve server rendered dom nodes",advanced:!0},{name:"scriptsClientOnly",type:"boolean",defaultValue:!1,helperText:"Only print and run scripts on the client. Important when scripts influence DOM that could be replaced when client loads",advanced:!0}]};function bt(e){const t=m.useRef(null),[n,i]=m.useState(()=>[]),[o,r]=m.useState(()=>[]);return m.useEffect(()=>{var s;if(!((s=t.current)!=null&&s.getElementsByTagName)||typeof window=="undefined")return;const l=t.current.getElementsByTagName("script");for(let c=0;c<l.length;c++){const d=l[c];if(d.src){if(n.includes(d.src))continue;n.push(d.src);const f=document.createElement("script");f.async=!0,f.src=d.src,document.head.appendChild(f)}else if(!d.type||["text/javascript","application/javascript","application/ecmascript"].includes(d.type)){if(o.includes(d.innerText))continue;try{o.push(d.innerText),new Function(d.innerText)()}catch(f){console.warn("`CustomCode`: Error running script:",f)}}}},[]),a.jsx("div",{ref:t,className:"builder-custom-code"+(e.replaceNodes?" replace-nodes":""),dangerouslySetInnerHTML:{__html:e.code}})}const xt={name:"Embed",static:!0,inputs:[{name:"url",type:"url",required:!0,defaultValue:"",helperText:"e.g. enter a youtube url, google map, etc",onChange:e=>{const t=e.get("url");if(t)return e.set("content","Loading..."),fetch(`https://iframe.ly/api/iframely?url=${t}&api_key=ae0e60e78201a3f2b0de4b`).then(i=>i.json()).then(i=>{e.get("url")===t&&(i.html?e.set("content",i.html):e.set("content","Invalid url, please try another"))}).catch(i=>{e.set("content","There was an error embedding this URL, please try again or another URL")});e.delete("content")}},{name:"content",type:"html",defaultValue:'<div style="padding: 20px; text-align: center">(Choose an embed URL)<div>',hideFromUI:!0}]},yt=["text/javascript","application/javascript","application/ecmascript"],St=e=>yt.includes(e.type);function vt(e){const t=m.useRef(null),[n,i]=m.useState(()=>[]),[o,r]=m.useState(()=>[]),[l,s]=m.useState(()=>!1);function c(){if(!t.current||!t.current.getElementsByTagName)return;const d=t.current.getElementsByTagName("script");for(let f=0;f<d.length;f++){const x=d[f];if(x.src&&!n.includes(x.src)){n.push(x.src);const p=document.createElement("script");p.async=!0,p.src=x.src,document.head.appendChild(p)}else if(St(x)&&!o.includes(x.innerText))try{o.push(x.innerText),new Function(x.innerText)()}catch(p){console.warn("`Embed`: Error running script:",p)}}}return m.useEffect(()=>{t.current&&!l&&(s(!0),c())},[t.current,l]),a.jsx("div",{className:"builder-embed",ref:t,dangerouslySetInnerHTML:{__html:e.content}})}const kt={name:"Fragment",static:!0,hidden:!0,canHaveChildren:!0,noWrap:!0},pt={name:"Image",static:!0,image:"https://firebasestorage.googleapis.com/v0/b/builder-3b0a2.appspot.com/o/images%2Fbaseline-insert_photo-24px.svg?alt=media&token=4e5d0ef4-f5e8-4e57-b3a9-38d63a9b9dc4",defaultStyles:{position:"relative",minHeight:"20px",minWidth:"20px",overflow:"hidden"},canHaveChildren:!0,inputs:[{name:"image",type:"file",bubble:!0,allowedFileTypes:["jpeg","jpg","png","svg"],required:!0,defaultValue:"https://cdn.builder.io/api/v1/image/assets%2FYJIGb4i01jvw0SRdL5Bt%2F72c80f114dc149019051b6852a9e3b7a",onChange:e=>{e.delete("srcset"),e.delete("noWebp");function n(l,s=6e4){return new Promise((c,d)=>{const f=document.createElement("img");let x=!1;f.onload=()=>{x=!0,c(f)},f.addEventListener("error",p=>{console.warn("Image load failed",p.error),d(p.error)}),f.src=l,setTimeout(()=>{x||d(new Error("Image load timed out"))},s)})}function i(l){return Math.round(l*1e3)/1e3}const o=e.get("image"),r=e.get("aspectRatio");if(fetch(o).then(l=>l.blob()).then(l=>{l.type.includes("svg")&&e.set("noWebp",!0)}),o&&(!r||r===.7041))return n(o).then(l=>{const s=e.get("aspectRatio");e.get("image")===o&&(!s||s===.7041)&&l.width&&l.height&&(e.set("aspectRatio",i(l.height/l.width)),e.set("height",l.height),e.set("width",l.width))})}},{name:"backgroundSize",type:"text",defaultValue:"cover",enum:[{label:"contain",value:"contain",helperText:"The image should never get cropped"},{label:"cover",value:"cover",helperText:"The image should fill it's box, cropping when needed"}]},{name:"backgroundPosition",type:"text",defaultValue:"center",enum:["center","top","left","right","bottom","top left","top right","bottom left","bottom right"]},{name:"altText",type:"string",helperText:"Text to display when the user has images off"},{name:"height",type:"number",hideFromUI:!0},{name:"width",type:"number",hideFromUI:!0},{name:"sizes",type:"string",hideFromUI:!0},{name:"srcset",type:"string",hideFromUI:!0},{name:"lazy",type:"boolean",defaultValue:!0,hideFromUI:!0},{name:"fitContent",type:"boolean",helperText:"When child blocks are provided, fit to them instead of using the image's aspect ratio",defaultValue:!0},{name:"aspectRatio",type:"number",helperText:"This is the ratio of height/width, e.g. set to 1.5 for a 300px wide and 200px tall photo. Set to 0 to not force the image to maintain it's aspect ratio",advanced:!0,defaultValue:.7041}]},Ct={name:"Raw:Img",hideFromInsertMenu:!0,image:"https://firebasestorage.googleapis.com/v0/b/builder-3b0a2.appspot.com/o/images%2Fbaseline-insert_photo-24px.svg?alt=media&token=4e5d0ef4-f5e8-4e57-b3a9-38d63a9b9dc4",inputs:[{name:"image",bubble:!0,type:"file",allowedFileTypes:["jpeg","jpg","png","svg","gif","webp"],required:!0}],noWrap:!0,static:!0};function wt(e){return a.jsx("img",{style:{objectFit:e.backgroundSize||"cover",objectPosition:e.backgroundPosition||"center"},alt:e.altText,src:e.imgSrc||e.image,...e.attributes},u.isEditing()&&e.imgSrc||"default-key")}const It={name:"Core:Section",static:!0,image:"https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2F682efef23ace49afac61748dd305c70a",inputs:[{name:"maxWidth",type:"number",defaultValue:1200},{name:"lazyLoad",type:"boolean",defaultValue:!1,advanced:!0,description:"Only render this section when in view"}],defaultStyles:{paddingLeft:"20px",paddingRight:"20px",paddingTop:"50px",paddingBottom:"50px",marginTop:"0px",width:"100vw",marginLeft:"calc(50% - 50vw)"},canHaveChildren:!0,defaultChildren:[{"@type":"@builder.io/sdk:Element",responsiveStyles:{large:{textAlign:"center"}},component:{name:"Text",options:{text:"<p><b>I am a section! My content keeps from getting too wide, so that it's easy to read even on big screens.</b></p><p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur</p>"}}}]},Et={name:"Slot",isRSC:!0,description:"Allow child blocks to be inserted into this content when used as a Symbol",docsLink:"https://www.builder.io/c/docs/symbols-with-blocks",image:"https://cdn.builder.io/api/v1/image/assets%2FYJIGb4i01jvw0SRdL5Bt%2F3aad6de36eae43b59b52c85190fdef56",inputs:[{name:"name",type:"string",required:!0,defaultValue:"children"}]};function Tt(e){var t,n,i;return a.jsx("div",{style:{pointerEvents:"auto"},...!((t=e.builderContext.context)!=null&&t.symbolId)&&{"builder-slot":e.name},children:a.jsx(N,{parent:(n=e.builderContext.context)==null?void 0:n.symbolId,path:`symbol.data.${e.name}`,context:e.builderContext,blocks:(i=e.builderContext.rootState)==null?void 0:i[e.name]})})}const Rt={name:"Symbol",noWrap:!0,static:!0,isRSC:!0,inputs:[{name:"symbol",type:"uiSymbol"},{name:"dataOnly",helperText:"Make this a data symbol that doesn't display any UI",type:"boolean",defaultValue:!1,advanced:!0,hideFromUI:!0},{name:"inheritState",helperText:"Inherit the parent component state and data",type:"boolean",defaultValue:!1,advanced:!0},{name:"renderToLiquid",helperText:"Render this symbols contents to liquid. Turn off to fetch with javascript and use custom targeting",type:"boolean",defaultValue:!1,advanced:!0,hideFromUI:!0},{name:"useChildren",hideFromUI:!0,type:"boolean"}]},jt={name:"Text",static:!0,isRSC:!0,image:"https://firebasestorage.googleapis.com/v0/b/builder-3b0a2.appspot.com/o/images%2Fbaseline-text_fields-24px%20(1).svg?alt=media&token=12177b73-0ee3-42ca-98c6-0dd003de1929",inputs:[{name:"text",type:"html",required:!0,autoFocus:!0,bubble:!0,defaultValue:"Enter some text..."}],defaultStyles:{lineHeight:"normal",height:"auto",textAlign:"center"}};function Ie(e){var t;return a.jsx("div",{className:"builder-text",dangerouslySetInnerHTML:{__html:((t=e.text)==null?void 0:t.toString())||""},style:{outline:"none"}})}const Pt={name:"Video",canHaveChildren:!0,defaultStyles:{minHeight:"20px",minWidth:"20px"},image:"https://firebasestorage.googleapis.com/v0/b/builder-3b0a2.appspot.com/o/images%2Fbaseline-videocam-24px%20(1).svg?alt=media&token=49a84e4a-b20e-4977-a650-047f986874bb",inputs:[{name:"video",type:"file",allowedFileTypes:["mp4"],bubble:!0,defaultValue:"https://firebasestorage.googleapis.com/v0/b/builder-3b0a2.appspot.com/o/assets%2FKQlEmWDxA0coC3PK6UvkrjwkIGI2%2F28cb070609f546cdbe5efa20e931aa4b?alt=media&token=912e9551-7a7c-4dfb-86b6-3da1537d1a7f",required:!0},{name:"posterImage",type:"file",allowedFileTypes:["jpeg","png"],helperText:"Image to show before the video plays"},{name:"autoPlay",type:"boolean",defaultValue:!0},{name:"controls",type:"boolean",defaultValue:!1},{name:"muted",type:"boolean",defaultValue:!0},{name:"loop",type:"boolean",defaultValue:!0},{name:"playsInline",type:"boolean",defaultValue:!0},{name:"fit",type:"text",defaultValue:"cover",enum:["contain","cover","fill","auto"]},{name:"preload",type:"text",defaultValue:"metadata",enum:["auto","metadata","none"]},{name:"fitContent",type:"boolean",helperText:"When child blocks are provided, fit to them instead of using the aspect ratio",defaultValue:!0,advanced:!0},{name:"position",type:"text",defaultValue:"center",enum:["center","top","left","right","bottom","top left","top right","bottom left","bottom right"]},{name:"height",type:"number",advanced:!0},{name:"width",type:"number",advanced:!0},{name:"aspectRatio",type:"number",advanced:!0,defaultValue:.7004048582995948},{name:"lazyLoad",type:"boolean",helperText:'Load this video "lazily" - as in only when a user scrolls near the video. Recommended for optmized performance and bandwidth consumption',defaultValue:!0,advanced:!0}]};function Ee(e){var i,o,r,l,s,c,d;function t(){return{...e.autoPlay===!0?{autoPlay:!0}:{},...e.muted===!0?{muted:!0}:{},...e.controls===!0?{controls:!0}:{},...e.loop===!0?{loop:!0}:{},...e.playsInline===!0?{playsInline:!0}:{}}}function n(){return{...t()}}return a.jsxs("div",{style:{position:"relative"},children:[a.jsx("video",{className:"builder-video",...n(),preload:e.preload||"metadata",style:{width:"100%",height:"100%",...(i=e.attributes)==null?void 0:i.style,objectFit:e.fit,objectPosition:e.position,zIndex:2,borderRadius:"1px",...e.aspectRatio?{position:"absolute"}:null},src:e.video||"no-src",poster:e.posterImage,children:e.lazyLoad?null:a.jsx("source",{type:"video/mp4",src:e.video})}),e.aspectRatio&&!(e.fitContent&&((r=(o=e.builderBlock)==null?void 0:o.children)!=null&&r.length))?a.jsx(a.Fragment,{children:a.jsx("div",{style:{width:"100%",paddingTop:e.aspectRatio*100+"%",pointerEvents:"none",fontSize:"0px"}})}):null,(s=(l=e.builderBlock)==null?void 0:l.children)!=null&&s.length&&e.fitContent?a.jsx(a.Fragment,{children:a.jsx("div",{style:{display:"flex",flexDirection:"column",alignItems:"stretch"},children:e.children})}):null,(d=(c=e.builderBlock)==null?void 0:c.children)!=null&&d.length&&!e.fitContent?a.jsx(a.Fragment,{children:a.jsx("div",{style:{pointerEvents:"none",display:"flex",flexDirection:"column",alignItems:"stretch",position:"absolute",top:"0",left:"0",width:"100%",height:"100%"},children:e.children})}):null]})}const se=()=>[{component:me,...ft},{component:ke,...gt},{component:bt,...ht},{component:vt,...xt},{component:pe,...kt},{component:Ce,...pt},{component:wt,...Ct},{component:we,...It},{component:Pe,...Rt},{component:Ie,...jt},{component:Ee,...Pt},{component:Tt,...Et}],At=`function updateCookiesAndStyles(contentId, variants, isHydrationTarget) {
56
56
  function getAndSetVariantId() {
57
57
  function setCookie(name, value, days) {
58
58
  let expires = '';
@@ -108,7 +108,7 @@
108
108
  }).join('');
109
109
  styleEl.innerHTML = newStyleStr;
110
110
  }
111
- }`,Wt=`function updateVariantVisibility(variantContentId, defaultContentId, isHydrationTarget) {
111
+ }`,Bt=`function updateVariantVisibility(variantContentId, defaultContentId, isHydrationTarget) {
112
112
  if (!navigator.cookieEnabled) {
113
113
  return;
114
114
  }
@@ -142,31 +142,31 @@
142
142
  thisScriptEl?.remove();
143
143
  }
144
144
  return;
145
- }`,Re="builderIoAbTest",je="builderIoRenderContent",D=e=>Object.values((e==null?void 0:e.variations)||{}).map(t=>({...t,testVariationId:t.id,id:e==null?void 0:e.id})),Nt=({canTrack:e,content:t})=>!(!(D(t).length>0)||!e||u.isBrowser()),$t=e=>e==="react"||e==="reactNative",Pe=$t(u.TARGET),Vt=()=>`
146
- window.${Re} = ${Ft}
147
- window.${je} = ${Wt}
148
- `,Dt=(e,t)=>`
149
- window.${Re}(
150
- "${t}",${JSON.stringify(e)}, ${Pe}
151
- )`,Lt=({contentId:e,variationId:t})=>`window.${je}(
152
- "${t}", "${e}", ${Pe}
153
- )`;function z(e){return a.jsx("script",{dangerouslySetInnerHTML:{__html:e.scriptStr},id:e.id||""})}const Ot=["*.beta.builder.io","beta.builder.io","builder.io","localhost","qa.builder.io"];function Ae(e,t){const n=new URL(t.origin),i=n.hostname;return(e||Ot).findIndex(o=>o.startsWith("*.")?i.endsWith(o.slice(1)):o===i)>-1}function ce(e){return Math.round(e*1e3)/1e3}const _t=(e,t,n=!0)=>{if(!(e instanceof HTMLElement))return null;let i=n?e:e.parentElement;do{if(!i)return null;if(t(i))return i}while(i=i.parentElement);return null},Mt=e=>_t(e,t=>{const n=t.getAttribute("builder-id")||t.id;return(n==null?void 0:n.indexOf("builder-"))===0}),de=({event:e,target:t})=>{const n=t.getBoundingClientRect(),i=e.clientX-n.left,o=e.clientY-n.top,r=ce(i/n.width),s=ce(o/n.height);return{x:r,y:s}},Ut=e=>{const t=e.target,n=t&&Mt(t),i=(n==null?void 0:n.getAttribute("builder-id"))||(n==null?void 0:n.id);return{targetBuilderElement:i||void 0,metadata:{targetOffset:t?de({event:e,target:t}):void 0,builderTargetOffset:n?de({event:e,target:n}):void 0,builderElementIndex:n&&i?[].slice.call(document.getElementsByClassName(i)).indexOf(n):void 0}}},Ht="0.12.7",Kt=()=>{u.register("insertMenu",{name:"_default",default:!0,items:[{name:"Box"},{name:"Text"},{name:"Image"},{name:"Columns"},{name:"Core:Section"},{name:"Core:Button"},{name:"Embed"},{name:"Custom Code"}]})};let ue=!1;const zt=(e={})=>{var t,n;ue||(ue=!0,u.isBrowser()&&((t=window.parent)==null||t.postMessage({type:"builder.sdkInfo",data:{target:u.TARGET,version:Ht,supportsPatchUpdates:!1,supportsAddBlockScoping:!0,supportsCustomBreakpoints:!0}},"*"),(n=window.parent)==null||n.postMessage({type:"builder.updateContent",data:{options:e}},"*"),window.addEventListener("message",i=>{var r,s;if(!Ae(e.trustedHosts,i))return;const{data:o}=i;if(o!=null&&o.type)switch(o.type){case"builder.evaluate":{const l=o.data.text,c=o.data.arguments||[],d=o.data.id,f=new Function(l);let b,v=null;try{b=f.apply(null,c)}catch(x){v=x}v?(r=window.parent)==null||r.postMessage({type:"builder.evaluateError",data:{id:d,error:v.message}},"*"):b&&typeof b.then=="function"?b.then(x=>{var y;(y=window.parent)==null||y.postMessage({type:"builder.evaluateResult",data:{id:d,result:x}},"*")}).catch(console.error):(s=window.parent)==null||s.postMessage({type:"builder.evaluateResult",data:{result:b,id:d}},"*");break}}})))};function qt(e){var F,M,U,ee,te,ne,ie;const t=m.useRef(null),[n,i]=m.useState(()=>0);m.useState(()=>!0);function o(g){var S,p;const h={...e.builderContextSignal.rootState,...g};e.builderContextSignal.rootSetState?(p=(S=e.builderContextSignal).rootSetState)==null||p.call(S,h):e.setBuilderContextSignal(C=>({...C,rootState:h}))}function r(g){var S,p,C,T,V;const h={...e.builderContextSignal.content,...g,data:{...(S=e.builderContextSignal.content)==null?void 0:S.data,...g==null?void 0:g.data},meta:{...(p=e.builderContextSignal.content)==null?void 0:p.meta,...g==null?void 0:g.meta,breakpoints:((C=g==null?void 0:g.meta)==null?void 0:C.breakpoints)||((V=(T=e.builderContextSignal.content)==null?void 0:T.meta)==null?void 0:V.breakpoints)}};e.setBuilderContextSignal(Fe=>({...Fe,content:h}))}m.useState(()=>0);const[s,l]=m.useState(()=>!1),[c,d]=m.useState(()=>e.contentWrapper||"div");function f(g){var S;if(!Ae(e.trustedHosts,g))return;const{data:h}=g;if(h)switch(h.type){case"builder.configureSdk":{const p=h.data,{breakpoints:C,contentId:T}=p;if(!T||T!==((S=e.builderContextSignal.content)==null?void 0:S.id))return;C&&r({meta:{breakpoints:C}}),i(n+1);break}case"builder.triggerAnimation":{be(h.data);break}case"builder.contentUpdate":{const p=h.data,C=p.key||p.alias||p.entry||p.modelName,T=p.data;C===e.model&&(r(T),i(n+1));break}}}function b(){var h,S;const g=(S=(h=e.builderContextSignal.content)==null?void 0:h.data)==null?void 0:S.jsCode;g&&N({code:g,context:e.context||{},localState:void 0,rootState:e.builderContextSignal.rootState,rootSetState:e.builderContextSignal.rootSetState})}const[v,x]=m.useState(()=>({})),[y,k]=m.useState(()=>!1);function E(g){var h,S;if(e.builderContextSignal.content){const p=(h=e.builderContextSignal.content)==null?void 0:h.testVariationId,C=(S=e.builderContextSignal.content)==null?void 0:S.id;u._track({type:"click",canTrack:u.getDefaultCanTrack(e.canTrack),contentId:C,apiKey:e.apiKey,variationId:p!==C?p:void 0,...Ut(g),unique:!y})}y||k(!0)}function j(g){return g.replace(/{{([^}]+)}}/g,(h,S)=>N({code:S,context:e.context||{},localState:void 0,rootState:e.builderContextSignal.rootState,rootSetState:e.builderContextSignal.rootSetState}))}function w({url:g,key:h}){u.fetch(g).then(S=>S.json()).then(S=>{var C,T;const p={...e.builderContextSignal.rootState,[h]:S};(T=(C=e.builderContextSignal).rootSetState)==null||T.call(C,p),v[h]=!0}).catch(S=>{console.error("error fetching dynamic data",g,S)})}function I(){var h,S,p;const g=(p=(S=(h=e.builderContextSignal.content)==null?void 0:h.data)==null?void 0:S.httpRequests)!=null?p:{};Object.entries(g).forEach(([C,T])=>{if(T&&(!v[C]||u.isEditing())){const V=j(T);w({url:V,key:C})}})}function R(){u.isEditing()&&window.dispatchEvent(new CustomEvent("builder:component:stateChange",{detail:{state:u.fastClone(e.builderContextSignal.rootState),ref:{name:e.model}}}))}function P(g){i(n+1),window.addEventListener("message",f),Kt(),zt({...e.locale?{locale:e.locale}:{},...e.includeRefs?{includeRefs:e.includeRefs}:{},...e.enrich?{enrich:e.enrich}:{},...e.trustedHosts?{trustedHosts:e.trustedHosts}:{}}),Object.values(e.builderContextSignal.componentInfos).forEach(h=>{var p;const S=u.createRegisterComponentMessage(h);(p=window.parent)==null||p.postMessage(S,"*")}),window.addEventListener("builder:component:stateChangeListenerActivated",R)}function B(g){const h=new URL(location.href).searchParams,S=h.get("builder.preview"),p=h.get(`builder.preview.${S}`),C=h.get("apiKey")||h.get("builder.space");S===e.model&&C===e.apiKey&&(!e.content||p===e.content.id)&&u.fetchOneEntry({model:e.model,apiKey:e.apiKey,apiVersion:e.builderContextSignal.apiVersion}).then(T=>{T&&r(T)})}return m.useEffect(()=>{var g;return(g=t.current)==null||g.addEventListener("initeditingbldr",P),()=>{var h;return(h=t.current)==null?void 0:h.removeEventListener("initeditingbldr",P)}},[]),m.useEffect(()=>{var g;return(g=t.current)==null||g.addEventListener("initpreviewingbldr",B),()=>{var h;return(h=t.current)==null?void 0:h.removeEventListener("initpreviewingbldr",B)}},[]),m.useEffect(()=>{var g,h;if(u.isBrowser()){if(u.isEditing()&&t.current&&t.current.dispatchEvent(new CustomEvent("initeditingbldr")),e.builderContextSignal.content&&u.getDefaultCanTrack(e.canTrack)){const p=(g=e.builderContextSignal.content)==null?void 0:g.testVariationId,C=(h=e.builderContextSignal.content)==null?void 0:h.id,T=e.apiKey;u._track({type:"impression",canTrack:!0,contentId:C,apiKey:T,variationId:p!==C?p:void 0})}u.isPreviewing()&&t.current&&t.current.dispatchEvent(new CustomEvent("initpreviewingbldr"))}},[]),m.useEffect(()=>{e.apiKey||u.logger.error("No API key provided to `RenderContent` component. This can cause issues. Please provide an API key using the `apiKey` prop."),b(),I(),R()},[]),m.useEffect(()=>{e.content&&r(e.content)},[e.content]),m.useEffect(()=>{},[s]),m.useEffect(()=>{b()},[(M=(F=e.builderContextSignal.content)==null?void 0:F.data)==null?void 0:M.jsCode]),m.useEffect(()=>{I()},[(ee=(U=e.builderContextSignal.content)==null?void 0:U.data)==null?void 0:ee.httpRequests]),m.useEffect(()=>{R()},[e.builderContextSignal.rootState]),m.useEffect(()=>{e.data&&o(e.data)},[e.data]),m.useEffect(()=>{e.locale&&o({locale:e.locale})},[e.locale]),m.useEffect(()=>()=>{u.isBrowser()&&(window.removeEventListener("message",f),window.removeEventListener("builder:component:stateChangeListenerActivated",R))},[]),a.jsx(G.Provider,{value:e.builderContextSignal,children:e.builderContextSignal.content?a.jsx(a.Fragment,{children:m.createElement(c,{key:n,ref:t,onClick:g=>E(g),"builder-content-id":(te=e.builderContextSignal.content)==null?void 0:te.id,"builder-model":e.model,...e.showContent?{}:{hidden:!0,"aria-hidden":!0},...e.contentWrapperProps,className:`variant-${((ne=e.content)==null?void 0:ne.testVariationId)||((ie=e.content)==null?void 0:ie.id)}`},e.children)}):null})}const Gt=e=>{var r,s;const t=e.family+(e.kind&&!e.kind.includes("#")?", "+e.kind:""),n=t.split(",")[0],i=(s=e.fileUrl)!=null?s:(r=e==null?void 0:e.files)==null?void 0:r.regular;let o="";if(i&&t&&n&&(o+=`
145
+ }`,Te="builderIoAbTest",Re="builderIoRenderContent",L=e=>Object.values((e==null?void 0:e.variations)||{}).map(t=>({...t,testVariationId:t.id,id:e==null?void 0:e.id})),Ft=({canTrack:e,content:t})=>!(!(L(t).length>0)||!e||u.isBrowser()),Wt=e=>e==="react"||e==="reactNative",je=Wt(u.TARGET),$t=()=>`
146
+ window.${Te} = ${At}
147
+ window.${Re} = ${Bt}
148
+ `,Nt=(e,t)=>`
149
+ window.${Te}(
150
+ "${t}",${JSON.stringify(e)}, ${je}
151
+ )`,Vt=({contentId:e,variationId:t})=>`window.${Re}(
152
+ "${t}", "${e}", ${je}
153
+ )`;function z(e){return a.jsx("script",{dangerouslySetInnerHTML:{__html:e.scriptStr},id:e.id||""})}function ce(e){return Math.round(e*1e3)/1e3}const Lt=(e,t,n=!0)=>{if(!(e instanceof HTMLElement))return null;let i=n?e:e.parentElement;do{if(!i)return null;if(t(i))return i}while(i=i.parentElement);return null},Dt=e=>Lt(e,t=>{const n=t.getAttribute("builder-id")||t.id;return(n==null?void 0:n.indexOf("builder-"))===0}),de=({event:e,target:t})=>{const n=t.getBoundingClientRect(),i=e.clientX-n.left,o=e.clientY-n.top,r=ce(i/n.width),l=ce(o/n.height);return{x:r,y:l}},Ot=e=>{const t=e.target,n=t&&Dt(t),i=(n==null?void 0:n.getAttribute("builder-id"))||(n==null?void 0:n.id);return{targetBuilderElement:i||void 0,metadata:{targetOffset:t?de({event:e,target:t}):void 0,builderTargetOffset:n?de({event:e,target:n}):void 0,builderElementIndex:n&&i?[].slice.call(document.getElementsByClassName(i)).indexOf(n):void 0}}};function _t(e){var F,H,U,ee,te,ne,ie;const t=m.useRef(null),[n,i]=m.useState(()=>0);m.useState(()=>!0);function o(g){var b,k;const h={...e.builderContextSignal.rootState,...g};e.builderContextSignal.rootSetState?(k=(b=e.builderContextSignal).rootSetState)==null||k.call(b,h):e.setBuilderContextSignal(I=>({...I,rootState:h}))}function r(g){var b,k,I,j,V;const h={...e.builderContextSignal.content,...g,data:{...(b=e.builderContextSignal.content)==null?void 0:b.data,...g==null?void 0:g.data},meta:{...(k=e.builderContextSignal.content)==null?void 0:k.meta,...g==null?void 0:g.meta,breakpoints:((I=g==null?void 0:g.meta)==null?void 0:I.breakpoints)||((V=(j=e.builderContextSignal.content)==null?void 0:j.meta)==null?void 0:V.breakpoints)}};e.setBuilderContextSignal(Ae=>({...Ae,content:h}))}m.useState(()=>0);const[l,s]=m.useState(()=>!1),[c,d]=m.useState(()=>e.contentWrapper||"div");function f(g){return u.createEditorListener({model:e.model,trustedHosts:e.trustedHosts,callbacks:{configureSdk:h=>{var I;const{breakpoints:b,contentId:k}=h;!k||k!==((I=e.builderContextSignal.content)==null?void 0:I.id)||b&&(r({meta:{breakpoints:b}}),i(n+1))},animation:h=>{he(h)},contentUpdate:h=>{r(h),i(n+1)}}})(g)}function x(){var h,b;const g=(b=(h=e.builderContextSignal.content)==null?void 0:h.data)==null?void 0:b.jsCode;g&&$({code:g,context:e.context||{},localState:void 0,rootState:e.builderContextSignal.rootState,rootSetState:e.builderContextSignal.rootSetState})}const[p,S]=m.useState(()=>({})),[y,v]=m.useState(()=>!1);function E(g){var h,b;if(e.builderContextSignal.content){const k=(h=e.builderContextSignal.content)==null?void 0:h.testVariationId,I=(b=e.builderContextSignal.content)==null?void 0:b.id;u._track({type:"click",canTrack:u.getDefaultCanTrack(e.canTrack),contentId:I,apiKey:e.apiKey,variationId:k!==I?k:void 0,...Ot(g),unique:!y})}y||v(!0)}function R(g){return g.replace(/{{([^}]+)}}/g,(h,b)=>$({code:b,context:e.context||{},localState:void 0,rootState:e.builderContextSignal.rootState,rootSetState:e.builderContextSignal.rootSetState}))}function C({url:g,key:h}){u.fetch(g).then(b=>b.json()).then(b=>{var I,j;const k={...e.builderContextSignal.rootState,[h]:b};(j=(I=e.builderContextSignal).rootSetState)==null||j.call(I,k),p[h]=!0}).catch(b=>{console.error("error fetching dynamic data",g,b)})}function w(){var h,b,k;const g=(k=(b=(h=e.builderContextSignal.content)==null?void 0:h.data)==null?void 0:b.httpRequests)!=null?k:{};Object.entries(g).forEach(([I,j])=>{if(j&&(!p[I]||u.isEditing())){const V=R(j);C({url:V,key:I})}})}function T(){u.isEditing()&&window.dispatchEvent(new CustomEvent("builder:component:stateChange",{detail:{state:u.fastClone(e.builderContextSignal.rootState),ref:{name:e.model}}}))}function P(g){i(n+1),window.addEventListener("message",f),u.registerInsertMenu(),u.setupBrowserForEditing({...e.locale?{locale:e.locale}:{},...e.includeRefs?{includeRefs:e.includeRefs}:{},...e.enrich?{enrich:e.enrich}:{},...e.trustedHosts?{trustedHosts:e.trustedHosts}:{}}),Object.values(e.builderContextSignal.componentInfos).forEach(h=>{var k;const b=u.createRegisterComponentMessage(h);(k=window.parent)==null||k.postMessage(b,"*")}),window.addEventListener("builder:component:stateChangeListenerActivated",T)}function B(g){const h=new URL(location.href).searchParams,b=h.get("builder.preview"),k=h.get(`builder.preview.${b}`),I=h.get("apiKey")||h.get("builder.space");b===e.model&&I===e.apiKey&&(!e.content||k===e.content.id)&&u.fetchOneEntry({model:e.model,apiKey:e.apiKey,apiVersion:e.builderContextSignal.apiVersion}).then(j=>{j&&r(j)})}return m.useEffect(()=>{var g;return(g=t.current)==null||g.addEventListener("initeditingbldr",P),()=>{var h;return(h=t.current)==null?void 0:h.removeEventListener("initeditingbldr",P)}},[]),m.useEffect(()=>{var g;return(g=t.current)==null||g.addEventListener("initpreviewingbldr",B),()=>{var h;return(h=t.current)==null?void 0:h.removeEventListener("initpreviewingbldr",B)}},[]),m.useEffect(()=>{var g,h;if(u.isBrowser()){if(u.isEditing()&&t.current&&t.current.dispatchEvent(new CustomEvent("initeditingbldr")),e.builderContextSignal.content&&u.getDefaultCanTrack(e.canTrack)){const k=(g=e.builderContextSignal.content)==null?void 0:g.testVariationId,I=(h=e.builderContextSignal.content)==null?void 0:h.id,j=e.apiKey;u._track({type:"impression",canTrack:!0,contentId:I,apiKey:j,variationId:k!==I?k:void 0})}u.isPreviewing()&&t.current&&t.current.dispatchEvent(new CustomEvent("initpreviewingbldr"))}},[]),m.useEffect(()=>{e.apiKey||u.logger.error("No API key provided to `RenderContent` component. This can cause issues. Please provide an API key using the `apiKey` prop."),x(),w(),T()},[]),m.useEffect(()=>{e.content&&r(e.content)},[e.content]),m.useEffect(()=>{},[l]),m.useEffect(()=>{x()},[(H=(F=e.builderContextSignal.content)==null?void 0:F.data)==null?void 0:H.jsCode]),m.useEffect(()=>{w()},[(ee=(U=e.builderContextSignal.content)==null?void 0:U.data)==null?void 0:ee.httpRequests]),m.useEffect(()=>{T()},[e.builderContextSignal.rootState]),m.useEffect(()=>{e.data&&o(e.data)},[e.data]),m.useEffect(()=>{e.locale&&o({locale:e.locale})},[e.locale]),m.useEffect(()=>()=>{u.isBrowser()&&(window.removeEventListener("message",f),window.removeEventListener("builder:component:stateChangeListenerActivated",T))},[]),a.jsx(G.Provider,{value:e.builderContextSignal,children:e.builderContextSignal.content?a.jsx(a.Fragment,{children:m.createElement(c,{key:n,ref:t,onClick:g=>E(g),"builder-content-id":(te=e.builderContextSignal.content)==null?void 0:te.id,"builder-model":e.model,...e.showContent?{}:{hidden:!0,"aria-hidden":!0},...e.contentWrapperProps,className:`variant-${((ne=e.content)==null?void 0:ne.testVariationId)||((ie=e.content)==null?void 0:ie.id)}`},e.children)}):null})}const Ht=e=>{var r,l;const t=e.family+(e.kind&&!e.kind.includes("#")?", "+e.kind:""),n=t.split(",")[0],i=(l=e.fileUrl)!=null?l:(r=e==null?void 0:e.files)==null?void 0:r.regular;let o="";if(i&&t&&n&&(o+=`
154
154
  @font-face {
155
155
  font-family: "${t}";
156
156
  src: local("${n}"), url('${i}') format('woff2');
157
157
  font-display: fallback;
158
158
  font-weight: 400;
159
159
  }
160
- `.trim()),e.files)for(const l in e.files){if(!(String(Number(l))===l))continue;const d=e.files[l];d&&d!==i&&(o+=`
160
+ `.trim()),e.files)for(const s in e.files){if(!(String(Number(s))===s))continue;const d=e.files[s];d&&d!==i&&(o+=`
161
161
  @font-face {
162
162
  font-family: "${t}";
163
163
  src: url('${d}') format('woff2');
164
164
  font-display: fallback;
165
- font-weight: ${l};
165
+ font-weight: ${s};
166
166
  }
167
- `.trim())}return o},Yt=({customFonts:e})=>{var t;return((t=e==null?void 0:e.map(n=>Gt(n)))==null?void 0:t.join(" "))||""},Qt=({cssCode:e,contentId:t})=>e?t?(e==null?void 0:e.replace(/&/g,`div[builder-content-id="${t}"]`))||"":e:"";function Jt(e){const[t,n]=m.useState(()=>`
168
- ${Qt({cssCode:e.cssCode,contentId:e.contentId})}
169
- ${Yt({customFonts:e.customFonts})}
167
+ `.trim())}return o},Ut=({customFonts:e})=>{var t;return((t=e==null?void 0:e.map(n=>Ht(n)))==null?void 0:t.join(" "))||""},Mt=({cssCode:e,contentId:t})=>e?t?(e==null?void 0:e.replace(/&/g,`div[builder-content-id="${t}"]`))||"":e:"";function Kt(e){const[t,n]=m.useState(()=>`
168
+ ${Mt({cssCode:e.cssCode,contentId:e.contentId})}
169
+ ${Ut({customFonts:e.customFonts})}
170
170
 
171
171
  .builder-button {
172
172
  all: unset;
@@ -184,4 +184,4 @@ ${Yt({customFonts:e.customFonts})}
184
184
  text-align: inherit;
185
185
  font-family: inherit;
186
186
  }
187
- `.trim());return a.jsx(O,{styles:t})}const Xt=({content:e,data:t,locale:n})=>{var r,s,l;const i={},o=((r=e==null?void 0:e.data)==null?void 0:r.state)||{};return(l=(s=e==null?void 0:e.data)==null?void 0:s.inputs)==null||l.forEach(c=>{c.name&&c.defaultValue!==void 0&&(i[c.name]=c.defaultValue)}),{...i,...o,...t,...n?{locale:n}:{}}},Zt=({content:e,data:t})=>e?{...e,data:{...e==null?void 0:e.data,...t},meta:e==null?void 0:e.meta}:void 0;function me(e){var c,d,f,b,v,x,y;const[t,n]=m.useState(()=>{var k,E;return Lt({variationId:(k=e.content)==null?void 0:k.testVariationId,contentId:(E=e.content)==null?void 0:E.id})});function i(k){l(E=>({...E,rootState:k}))}const[o,r]=m.useState(()=>[...le(),...u.components,...e.customComponents||[]].reduce((k,{component:E,...j})=>({...k,[j.name]:{component:E,...u.serializeComponentInfo(j)}}),{})),[s,l]=m.useState(()=>({content:Zt({content:e.content,data:e.data}),localState:void 0,rootState:Xt({content:e.content,data:e.data,locale:e.locale}),rootSetState:i,context:e.context||{},apiKey:e.apiKey,apiVersion:e.apiVersion,componentInfos:[...le(),...u.components,...e.customComponents||[]].reduce((k,{component:E,...j})=>({...k,[j.name]:u.serializeComponentInfo(j)}),{}),inheritedStyles:{},BlocksWrapper:e.blocksWrapper||"div",BlocksWrapperProps:e.blocksWrapperProps||{}}));return a.jsx(ge.Provider,{value:{registeredComponents:o},children:a.jsxs(qt,{content:e.content,data:e.data,model:e.model,context:e.context,apiKey:e.apiKey,canTrack:e.canTrack,locale:e.locale,includeRefs:e.includeRefs,enrich:e.enrich,showContent:e.showContent,builderContextSignal:s,contentWrapper:e.contentWrapper,contentWrapperProps:e.contentWrapperProps,linkComponent:e.linkComponent,trustedHosts:e.trustedHosts,setBuilderContextSignal:l,children:[e.isSsrAbTest?a.jsx(a.Fragment,{children:a.jsx(z,{scriptStr:t})}):null,a.jsx(a.Fragment,{children:a.jsx(Jt,{contentId:(c=s.content)==null?void 0:c.id,cssCode:(f=(d=s.content)==null?void 0:d.data)==null?void 0:f.cssCode,customFonts:(v=(b=s.content)==null?void 0:b.data)==null?void 0:v.customFonts})}),a.jsx($,{blocks:(y=(x=s.content)==null?void 0:x.data)==null?void 0:y.blocks,context:s,registeredComponents:o,linkComponent:e.linkComponent})]})})}function Z(e){var s,l;const[t,n]=m.useState(()=>Nt({canTrack:u.getDefaultCanTrack(e.canTrack),content:e.content}));function i(){var c;return Dt(D(e.content).map(d=>({id:d.testVariationId,testRatio:d.testRatio})),((c=e.content)==null?void 0:c.id)||"")}function o(){return D(e.content).map(c=>`.variant-${c.testVariationId} { display: none; } `).join("")}function r(){var c;return t?{...e.content,testVariationId:(c=e.content)==null?void 0:c.id}:u.handleABTestingSync({item:e.content,canTrack:u.getDefaultCanTrack(e.canTrack)})}return m.useEffect(()=>{},[]),a.jsxs(a.Fragment,{children:[!e.__isNestedRender&&u.TARGET!=="reactNative"?a.jsx(a.Fragment,{children:a.jsx(z,{scriptStr:Vt()})}):null,t?a.jsxs(a.Fragment,{children:[a.jsx(O,{id:`variants-styles-${(s=e.content)==null?void 0:s.id}`,styles:o()}),a.jsx(z,{scriptStr:i()}),(l=D(e.content))==null?void 0:l.map(c=>a.jsx(me,{content:c,showContent:!1,model:e.model,data:e.data,context:e.context,apiKey:e.apiKey,apiVersion:e.apiVersion,customComponents:e.customComponents,linkComponent:e.linkComponent,canTrack:e.canTrack,locale:e.locale,includeRefs:e.includeRefs,enrich:e.enrich,isSsrAbTest:t,blocksWrapper:e.blocksWrapper,blocksWrapperProps:e.blocksWrapperProps,contentWrapper:e.contentWrapper,contentWrapperProps:e.contentWrapperProps,trustedHosts:e.trustedHosts},c.testVariationId))]}):null,a.jsx(me,{content:r(),showContent:!0,model:e.model,data:e.data,context:e.context,apiKey:e.apiKey,apiVersion:e.apiVersion,customComponents:e.customComponents,linkComponent:e.linkComponent,canTrack:e.canTrack,locale:e.locale,includeRefs:e.includeRefs,enrich:e.enrich,isSsrAbTest:t,blocksWrapper:e.blocksWrapper,blocksWrapperProps:e.blocksWrapperProps,contentWrapper:e.contentWrapper,contentWrapperProps:e.contentWrapperProps,trustedHosts:e.trustedHosts})]})}const en=async({builderContextValue:e,symbol:t})=>{if(t!=null&&t.model&&(e!=null&&e.apiKey))return u.fetchOneEntry({model:t.model,apiKey:e.apiKey,apiVersion:e.apiVersion,...(t==null?void 0:t.entry)&&{query:{id:t.entry}}}).catch(n=>{u.logger.error("Could not fetch symbol content: ",n)})};function Be(e){var r,s,l,c;function t(){var d,f;return[e.attributes[W()],"builder-symbol",(d=e.symbol)!=null&&d.inline?"builder-inline-symbol":void 0,(f=e.symbol)!=null&&f.dynamic||e.dynamic?"builder-dynamic-symbol":void 0].filter(Boolean).join(" ")}const[n,i]=m.useState(()=>{var d;return(d=e.symbol)==null?void 0:d.content});function o(){n||en({symbol:e.symbol,builderContextValue:e.builderContext}).then(d=>{d&&i(d)})}return m.useEffect(()=>{},[]),m.useEffect(()=>{o()},[e.symbol]),a.jsx("div",{...e.attributes,className:t(),children:a.jsx(Z,{__isNestedRender:!0,apiVersion:e.builderContext.apiVersion,apiKey:e.builderContext.apiKey,context:{...e.builderContext.context,symbolId:(r=e.builderBlock)==null?void 0:r.id},customComponents:Object.values(e.builderComponents),data:{...(s=e.symbol)==null?void 0:s.data,...e.builderContext.localState,...(l=n==null?void 0:n.data)==null?void 0:l.state},model:(c=e.symbol)==null?void 0:c.model,content:n,linkComponent:e.builderLinkComponent})})}const tn=$,nn=Z;exports._processContentResult=u._processContentResult;exports.createRegisterComponentMessage=u.createRegisterComponentMessage;exports.fetchBuilderProps=u.fetchBuilderProps;exports.fetchEntries=u.fetchEntries;exports.fetchOneEntry=u.fetchOneEntry;exports.getAllContent=u.getAllContent;exports.getBuilderSearchParams=u.getBuilderSearchParams;exports.getContent=u.getContent;exports.isEditing=u.isEditing;exports.isPreviewing=u.isPreviewing;exports.register=u.register;exports.setEditorSettings=u.setEditorSettings;exports.track=u.track;exports.Blocks=$;exports.Button=fe;exports.Columns=ke;exports.Content=Z;exports.Fragment=Ce;exports.Image=we;exports.RenderBlocks=tn;exports.RenderContent=nn;exports.Section=Ie;exports.Symbol=Be;exports.Text=Te;exports.Video=Ee;
187
+ `.trim());return a.jsx(O,{styles:t})}const zt=({content:e,data:t,locale:n})=>{var r,l,s;const i={},o=((r=e==null?void 0:e.data)==null?void 0:r.state)||{};return(s=(l=e==null?void 0:e.data)==null?void 0:l.inputs)==null||s.forEach(c=>{c.name&&c.defaultValue!==void 0&&(i[c.name]=c.defaultValue)}),{...i,...o,...t,...n?{locale:n}:{}}},qt=({content:e,data:t})=>e?{...e,data:{...e==null?void 0:e.data,...t},meta:e==null?void 0:e.meta}:void 0;function ue(e){var c,d,f,x,p,S,y;const[t,n]=m.useState(()=>{var v,E;return Vt({variationId:(v=e.content)==null?void 0:v.testVariationId,contentId:(E=e.content)==null?void 0:E.id})});function i(v){s(E=>({...E,rootState:v}))}const[o,r]=m.useState(()=>[...se(),...u.components,...e.customComponents||[]].reduce((v,{component:E,...R})=>({...v,[R.name]:{component:E,...u.serializeComponentInfo(R)}}),{})),[l,s]=m.useState(()=>({content:qt({content:e.content,data:e.data}),localState:void 0,rootState:zt({content:e.content,data:e.data,locale:e.locale}),rootSetState:i,context:e.context||{},apiKey:e.apiKey,apiVersion:e.apiVersion,componentInfos:[...se(),...u.components,...e.customComponents||[]].reduce((v,{component:E,...R})=>({...v,[R.name]:u.serializeComponentInfo(R)}),{}),inheritedStyles:{},BlocksWrapper:e.blocksWrapper||"div",BlocksWrapperProps:e.blocksWrapperProps||{}}));return a.jsx(fe.Provider,{value:{registeredComponents:o},children:a.jsxs(_t,{content:e.content,data:e.data,model:e.model,context:e.context,apiKey:e.apiKey,canTrack:e.canTrack,locale:e.locale,includeRefs:e.includeRefs,enrich:e.enrich,showContent:e.showContent,builderContextSignal:l,contentWrapper:e.contentWrapper,contentWrapperProps:e.contentWrapperProps,linkComponent:e.linkComponent,trustedHosts:e.trustedHosts,setBuilderContextSignal:s,children:[e.isSsrAbTest?a.jsx(a.Fragment,{children:a.jsx(z,{scriptStr:t})}):null,a.jsx(a.Fragment,{children:a.jsx(Kt,{contentId:(c=l.content)==null?void 0:c.id,cssCode:(f=(d=l.content)==null?void 0:d.data)==null?void 0:f.cssCode,customFonts:(p=(x=l.content)==null?void 0:x.data)==null?void 0:p.customFonts})}),a.jsx(N,{blocks:(y=(S=l.content)==null?void 0:S.data)==null?void 0:y.blocks,context:l,registeredComponents:o,linkComponent:e.linkComponent})]})})}function Z(e){var l,s;const[t,n]=m.useState(()=>Ft({canTrack:u.getDefaultCanTrack(e.canTrack),content:e.content}));function i(){var c;return Nt(L(e.content).map(d=>({id:d.testVariationId,testRatio:d.testRatio})),((c=e.content)==null?void 0:c.id)||"")}function o(){return L(e.content).map(c=>`.variant-${c.testVariationId} { display: none; } `).join("")}function r(){var c;return t?{...e.content,testVariationId:(c=e.content)==null?void 0:c.id}:u.handleABTestingSync({item:e.content,canTrack:u.getDefaultCanTrack(e.canTrack)})}return m.useEffect(()=>{},[]),a.jsxs(a.Fragment,{children:[!e.__isNestedRender&&u.TARGET!=="reactNative"?a.jsx(a.Fragment,{children:a.jsx(z,{scriptStr:$t()})}):null,t?a.jsxs(a.Fragment,{children:[a.jsx(O,{id:`variants-styles-${(l=e.content)==null?void 0:l.id}`,styles:o()}),a.jsx(z,{scriptStr:i()}),(s=L(e.content))==null?void 0:s.map(c=>a.jsx(ue,{content:c,showContent:!1,model:e.model,data:e.data,context:e.context,apiKey:e.apiKey,apiVersion:e.apiVersion,customComponents:e.customComponents,linkComponent:e.linkComponent,canTrack:e.canTrack,locale:e.locale,includeRefs:e.includeRefs,enrich:e.enrich,isSsrAbTest:t,blocksWrapper:e.blocksWrapper,blocksWrapperProps:e.blocksWrapperProps,contentWrapper:e.contentWrapper,contentWrapperProps:e.contentWrapperProps,trustedHosts:e.trustedHosts},c.testVariationId))]}):null,a.jsx(ue,{content:r(),showContent:!0,model:e.model,data:e.data,context:e.context,apiKey:e.apiKey,apiVersion:e.apiVersion,customComponents:e.customComponents,linkComponent:e.linkComponent,canTrack:e.canTrack,locale:e.locale,includeRefs:e.includeRefs,enrich:e.enrich,isSsrAbTest:t,blocksWrapper:e.blocksWrapper,blocksWrapperProps:e.blocksWrapperProps,contentWrapper:e.contentWrapper,contentWrapperProps:e.contentWrapperProps,trustedHosts:e.trustedHosts})]})}const Gt=async({builderContextValue:e,symbol:t})=>{if(t!=null&&t.model&&(e!=null&&e.apiKey))return u.fetchOneEntry({model:t.model,apiKey:e.apiKey,apiVersion:e.apiVersion,...(t==null?void 0:t.entry)&&{query:{id:t.entry}}}).catch(n=>{u.logger.error("Could not fetch symbol content: ",n)})};function Pe(e){var r,l,s,c;function t(){var d,f;return[e.attributes[W()],"builder-symbol",(d=e.symbol)!=null&&d.inline?"builder-inline-symbol":void 0,(f=e.symbol)!=null&&f.dynamic||e.dynamic?"builder-dynamic-symbol":void 0].filter(Boolean).join(" ")}const[n,i]=m.useState(()=>{var d;return(d=e.symbol)==null?void 0:d.content});function o(){n||Gt({symbol:e.symbol,builderContextValue:e.builderContext}).then(d=>{d&&i(d)})}return m.useEffect(()=>{},[]),m.useEffect(()=>{o()},[e.symbol]),a.jsx("div",{...e.attributes,className:t(),children:a.jsx(Z,{__isNestedRender:!0,apiVersion:e.builderContext.apiVersion,apiKey:e.builderContext.apiKey,context:{...e.builderContext.context,symbolId:(r=e.builderBlock)==null?void 0:r.id},customComponents:Object.values(e.builderComponents),data:{...(l=e.symbol)==null?void 0:l.data,...e.builderContext.localState,...(s=n==null?void 0:n.data)==null?void 0:s.state},model:(c=e.symbol)==null?void 0:c.model,content:n,linkComponent:e.builderLinkComponent})})}const Yt=N,Qt=Z;exports._processContentResult=u._processContentResult;exports.createRegisterComponentMessage=u.createRegisterComponentMessage;exports.fetchBuilderProps=u.fetchBuilderProps;exports.fetchEntries=u.fetchEntries;exports.fetchOneEntry=u.fetchOneEntry;exports.getAllContent=u.getAllContent;exports.getBuilderSearchParams=u.getBuilderSearchParams;exports.getContent=u.getContent;exports.isEditing=u.isEditing;exports.isPreviewing=u.isPreviewing;exports.register=u.register;exports.setEditorSettings=u.setEditorSettings;exports.subscribeToEditor=u.subscribeToEditor;exports.track=u.track;exports.Blocks=N;exports.Button=me;exports.Columns=ke;exports.Content=Z;exports.Fragment=pe;exports.Image=Ce;exports.RenderBlocks=Yt;exports.RenderContent=Qt;exports.Section=we;exports.Symbol=Pe;exports.Text=Ie;exports.Video=Ee;