@builder.io/sdk-react 1.0.12 → 1.0.13

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (53) hide show
  1. package/lib/browser/blocks-exports.cjs +21 -20
  2. package/lib/browser/blocks-exports.mjs +140 -136
  3. package/lib/browser/index.cjs +1 -1
  4. package/lib/browser/index.mjs +1 -1
  5. package/lib/browser/{server-entry-34e4efb1.js → server-entry-1a840bf8.js} +1 -1
  6. package/lib/browser/{server-entry-60df1736.cjs → server-entry-20402a85.cjs} +1 -1
  7. package/lib/browser/server-entry.cjs +1 -1
  8. package/lib/browser/server-entry.mjs +1 -1
  9. package/lib/edge/{blocks-03ffaaf9.cjs → blocks-ca61b343.cjs} +1 -1
  10. package/lib/edge/blocks-exports.cjs +1 -1
  11. package/lib/edge/blocks-exports.mjs +2 -2
  12. package/lib/edge/{blocks-f8d5d3a0.js → blocks-fd4ab30c.js} +2 -2
  13. package/lib/edge/{button-5543875e.js → button-45681a80.js} +2 -2
  14. package/lib/edge/{button-5137d1bc.cjs → button-6d8b002c.cjs} +1 -1
  15. package/lib/edge/{columns-a05f9fd8.js → columns-61e1043d.js} +3 -3
  16. package/lib/edge/{columns-ad62a5ce.cjs → columns-77e4f17d.cjs} +1 -1
  17. package/lib/edge/{content-variants-74109911.js → content-variants-c085fa7f.js} +58 -54
  18. package/lib/edge/{content-variants-e6ba9024.cjs → content-variants-c86fdb5a.cjs} +11 -10
  19. package/lib/edge/{form-67a4ec0b.js → form-4fae6192.js} +3 -3
  20. package/lib/edge/{form-ee52f842.cjs → form-b996f9f9.cjs} +1 -1
  21. package/lib/edge/{get-class-prop-name-25116ae3.js → get-class-prop-name-0e4b7b88.js} +1 -1
  22. package/lib/edge/{get-class-prop-name-7ab1534a.cjs → get-class-prop-name-14e14eea.cjs} +1 -1
  23. package/lib/edge/{img-43af4666.js → img-1259941e.js} +1 -1
  24. package/lib/edge/{img-147fc69c.cjs → img-c623011b.cjs} +1 -1
  25. package/lib/edge/index.cjs +1 -1
  26. package/lib/edge/index.mjs +1 -1
  27. package/lib/edge/{input-35088f50.js → input-02a1cd9f.js} +1 -1
  28. package/lib/edge/{input-90830684.cjs → input-2c618b06.cjs} +1 -1
  29. package/lib/edge/{select-1e63f097.cjs → select-3acbf5f6.cjs} +1 -1
  30. package/lib/edge/{select-ee16e4ee.js → select-b1b6d0bf.js} +1 -1
  31. package/lib/edge/{server-entry-f2d127da.js → server-entry-3f0061ea.js} +1 -1
  32. package/lib/edge/{server-entry-39e6b4a6.cjs → server-entry-d8f950e0.cjs} +1 -1
  33. package/lib/edge/server-entry.cjs +1 -1
  34. package/lib/edge/server-entry.mjs +1 -1
  35. package/lib/edge/{slot-45a2e0bf.js → slot-3cefe326.js} +3 -3
  36. package/lib/edge/{slot-3db582db.cjs → slot-92eac261.cjs} +1 -1
  37. package/lib/edge/{symbol-c533a54f.cjs → symbol-741f0aee.cjs} +1 -1
  38. package/lib/edge/{symbol-75231166.js → symbol-e2a47b92.js} +3 -3
  39. package/lib/node/blocks-exports.cjs +13 -12
  40. package/lib/node/blocks-exports.mjs +37 -33
  41. package/lib/node/index.cjs +1 -1
  42. package/lib/node/index.mjs +1 -1
  43. package/lib/node/{server-entry-a0cd9606.js → server-entry-383e8da6.js} +1 -1
  44. package/lib/node/{server-entry-81eab45c.cjs → server-entry-6d61d1cf.cjs} +1 -1
  45. package/lib/node/server-entry.cjs +1 -1
  46. package/lib/node/server-entry.mjs +1 -1
  47. package/package.json +1 -1
  48. package/types/components/content/components/enable-editor.d.ts +1 -1
  49. package/types/components/content/components/styles.d.ts +1 -0
  50. package/types/components/content/components/styles.helpers.d.ts +1 -0
  51. package/types/components/content/contentProps.types.d.ts +6 -1
  52. package/types/components/content-variants/content-variants.d.ts +1 -1
  53. package/types/constants/sdk-version.d.ts +1 -1
@@ -1,15 +1,15 @@
1
- "use client";"use strict";var Ae=Object.defineProperty;var We=(e,t,n)=>t in e?Ae(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var Y=(e,t,n)=>(We(e,typeof t!="symbol"?t+"":t,n),n);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("react/jsx-runtime"),m=require("./server-entry-60df1736.cjs"),d=require("react"),Ne=new Set(["area","base","br","col","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"]),$e=e=>typeof e=="string"&&Ne.has(e.toLowerCase());function Z(e){return a.jsx(a.Fragment,{children:$e(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(e.TagName,{...e.attributes,...e.actionAttributes,children:e.children}):a.jsx(e.TagName,{...e.attributes,...e.actionAttributes,children:e.children})})})}const U=()=>{switch(m.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(Z,{attributes:{...e.attributes,[U()]:`${e.link?"":"builder-button"} ${e.attributes[U()]||""}`,...e.link?{href:e.link,target:e.openLinkInNewTab?"_blank":void 0,role:"link"}:{role:"button"}},TagName:e.link?e.builderLinkComponent||"a":"button",actionAttributes:{},children:e.text})}const ee=d.createContext({content:null,context:{},localState:void 0,rootSetState(){},rootState:{},apiKey:null,apiVersion:void 0,componentInfos:{},inheritedStyles:{},BlocksWrapper:"div",BlocksWrapperProps:{}}),he=d.createContext({registeredComponents:{}});function De(e){var t;return{...(t=e.component)==null?void 0:t.options,...e.options,builderBlock:e}}const Le=({builder:e,context:t,event:n,state:i})=>Object.entries({state:i,Builder:e,builder:e,context:t,event:n}),Me=()=>({isEditing:m.isEditing(),isBrowser:m.isBrowser(),isServer:!m.isBrowser(),getUserAttributes:()=>m.getUserAttributes()}),Oe=(e,{isExpression:t=!0})=>t&&!(e.includes(";")||e.includes(" return ")||e.trim().startsWith("return "))?`return (${e});`:e,ae=({code:e,builder:t,context:n,event:i,localState:o,rootSetState:r,rootState:s})=>{const l=Le({builder:t,context:n,event:i,state:ge({rootState:s,localState:o,rootSetState:r})});return new Function(...l.map(([u])=>u),e)(...l.map(([,u])=>u))};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"&&r!==null?ge({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 Ue(){var e;return typeof process!="undefined"&&m.checkIsDefined((e=process==null?void 0:process.versions)==null?void 0:e.node)}const He=()=>{var i;if(!Ue())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?(m.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},Ke=e=>(m.isBrowser()||He(),ae(e)),W=class W{static getCacheKey(t){return JSON.stringify({...t,event:t.event?Math.random():void 0})}static getCachedValue(t){return W.cache.get(t)}static setCachedValue(t,n){W.cache.size>20&&W.cache.delete(W.cache.keys().next().value),W.cache.set(t,{value:n})}};Y(W,"cacheLimit",20),Y(W,"cache",new Map);let O=W;function H({code:e,context:t,localState:n,rootState:i,rootSetState:o,event:r,isExpression:s=!0,enableCache:l}){if(e===""){m.logger.warn("Skipping evaluation of empty code block.");return}const u={code:Oe(e,{isExpression:s}),builder:Me(),context:t,event:r,rootSetState:o,rootState:i,localState:n};if(l){const c=O.getCacheKey(u),f=O.getCachedValue(c);if(f)return f.value}try{const c=Ke(u);if(l){const f=O.getCacheKey(u);O.setCachedValue(f,c)}return c}catch(c){m.logger.error("Failed code evaluation: "+c.message,{code:e});return}}const be=(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 qe=({block:e,context:t,localState:n,rootState:i,rootSetState:o})=>{if(!e.bindings)return e;const r=m.fastClone(e),s={...r,properties:{...r.properties},actions:{...r.actions}};for(const l in e.bindings){const u=e.bindings[l],c=H({code:u,localState:n,rootState:i,rootSetState:o,context:t,enableCache:!0});be(s,l,c)}return s};function z({block:e,context:t,shouldEvaluateBindings:n,localState:i,rootState:o,rootSetState:r}){const s=e;return n?qe({block:s,localState:i,rootState:o,rootSetState:r,context:t}):s}function _e(e,t,n={}){let i,o,r,s=null,l=0;const u=function(){l=n.leading===!1?0:Date.now(),s=null,r=e.apply(i,o),s||(i=o=null)};return function(){const c=Date.now();!l&&n.leading===!1&&(l=c);const f=t-(c-l);return i=this,o=arguments,f<=0||f>t?(s&&(clearTimeout(s),s=null),l=c,r=e.apply(i,o),s||(i=o=null)):!s&&n.trailing!==!1&&(s=setTimeout(u,f)),r}}function D(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 te=e=>e?e.replace(/([A-Z])/g,t=>`-${t[0].toLowerCase()}`):"";function ze(e){for(const t of e)switch(t.trigger){case"pageLoad":ye(t);break;case"hover":Ye(t);break;case"scrollInView":Ge(t);break}}function ne(e){console.warn(`Cannot animate element: element with ID ${e} not found!`)}function ie(e,t){const n=Je(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 u of n)u in l||(l[u]=i[u])}function Je(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 ye(e){const t=Array.prototype.slice.call(document.getElementsByClassName(e.elementId||e.id||""));if(!t.length){ne(e.elementId||e.id||"");return}Array.from(t).forEach(n=>{ie(e,n),n.style.transition="none",n.style.transitionDelay="0",D(n.style,e.steps[0].styles),setTimeout(()=>{n.style.transition=`all ${e.duration}s ${te(e.easing)}`,e.delay&&(n.style.transitionDelay=e.delay+"s"),D(n.style,e.steps[1].styles),setTimeout(()=>{n.style.transition="",n.style.transitionDelay=""},(e.delay||0)*1e3+e.duration*1e3+100)})})}function Ye(e){const t=Array.prototype.slice.call(document.getElementsByClassName(e.elementId||e.id||""));if(!t.length){ne(e.elementId||e.id||"");return}Array.from(t).forEach(n=>{ie(e,n);const i=e.steps[0].styles,o=e.steps[1].styles;function r(){D(n.style,i)}function s(){D(n.style,o)}r(),n.addEventListener("mouseenter",s),n.addEventListener("mouseleave",r),setTimeout(()=>{n.style.transition=`all ${e.duration}s ${te(e.easing)}`,e.delay&&(n.style.transitionDelay=e.delay+"s")})})}function Ge(e){const t=Array.prototype.slice.call(document.getElementsByClassName(e.elementId||e.id||""));if(!t.length){ne(e.elementId||e.id||"");return}Array.from(t).forEach(n=>{ie(e,n);let i=!1,o=!1;function r(){!i&&l(n)?(i=!0,o=!0,setTimeout(()=>{D(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,D(n.style,e.steps[0].styles))}const s=_e(r,200,{leading:!1});function l(f){const h=f.getBoundingClientRect(),b=window.innerHeight,p=(e.thresholdPercent||0)/100*b;return h.bottom>p&&h.top<b-p}const u=e.steps[0].styles;function c(){D(n.style,u)}c(),setTimeout(()=>{n.style.transition=`all ${e.duration}s ${te(e.easing)}`,e.delay&&(n.style.transitionDelay=e.delay+"s")}),document.addEventListener("scroll",s,{capture:!0,passive:!0}),r()})}const Qe=e=>e.replace(/([a-z0-9]|(?=[A-Z]))([A-Z])/g,"$1-$2").toLowerCase(),xe=e=>Object.entries(e).map(([n,i])=>{if(typeof i=="string")return`${Qe(n)}: ${i};`}).filter(m.checkIsDefined),Xe=e=>xe(e).join(`
1
+ "use client";"use strict";var Ae=Object.defineProperty;var We=(e,t,n)=>t in e?Ae(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var Y=(e,t,n)=>(We(e,typeof t!="symbol"?t+"":t,n),n);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("react/jsx-runtime"),m=require("./server-entry-20402a85.cjs"),u=require("react"),Ne=new Set(["area","base","br","col","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"]),$e=e=>typeof e=="string"&&Ne.has(e.toLowerCase());function Z(e){return a.jsx(a.Fragment,{children:$e(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(e.TagName,{...e.attributes,...e.actionAttributes,children:e.children}):a.jsx(e.TagName,{...e.attributes,...e.actionAttributes,children:e.children})})})}const U=()=>{switch(m.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(Z,{attributes:{...e.attributes,[U()]:`${e.link?"":"builder-button"} ${e.attributes[U()]||""}`,...e.link?{href:e.link,target:e.openLinkInNewTab?"_blank":void 0,role:"link"}:{role:"button"}},TagName:e.link?e.builderLinkComponent||"a":"button",actionAttributes:{},children:e.text})}const ee=u.createContext({content:null,context:{},localState:void 0,rootSetState(){},rootState:{},apiKey:null,apiVersion:void 0,componentInfos:{},inheritedStyles:{},BlocksWrapper:"div",BlocksWrapperProps:{}}),he=u.createContext({registeredComponents:{}});function De(e){var t;return{...(t=e.component)==null?void 0:t.options,...e.options,builderBlock:e}}const Le=({builder:e,context:t,event:n,state:i})=>Object.entries({state:i,Builder:e,builder:e,context:t,event:n}),Me=()=>({isEditing:m.isEditing(),isBrowser:m.isBrowser(),isServer:!m.isBrowser(),getUserAttributes:()=>m.getUserAttributes()}),Oe=(e,{isExpression:t=!0})=>t&&!(e.includes(";")||e.includes(" return ")||e.trim().startsWith("return "))?`return (${e});`:e,ae=({code:e,builder:t,context:n,event:i,localState:o,rootSetState:r,rootState:s})=>{const l=Le({builder:t,context:n,event:i,state:ge({rootState:s,localState:o,rootSetState:r})});return new Function(...l.map(([d])=>d),e)(...l.map(([,d])=>d))};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"&&r!==null?ge({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 Ue(){var e;return typeof process!="undefined"&&m.checkIsDefined((e=process==null?void 0:process.versions)==null?void 0:e.node)}const He=()=>{var i;if(!Ue())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?(m.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},Ke=e=>(m.isBrowser()||He(),ae(e)),W=class W{static getCacheKey(t){return JSON.stringify({...t,event:t.event?Math.random():void 0})}static getCachedValue(t){return W.cache.get(t)}static setCachedValue(t,n){W.cache.size>20&&W.cache.delete(W.cache.keys().next().value),W.cache.set(t,{value:n})}};Y(W,"cacheLimit",20),Y(W,"cache",new Map);let O=W;function H({code:e,context:t,localState:n,rootState:i,rootSetState:o,event:r,isExpression:s=!0,enableCache:l}){if(e===""){m.logger.warn("Skipping evaluation of empty code block.");return}const d={code:Oe(e,{isExpression:s}),builder:Me(),context:t,event:r,rootSetState:o,rootState:i,localState:n};if(l){const c=O.getCacheKey(d),f=O.getCachedValue(c);if(f)return f.value}try{const c=Ke(d);if(l){const f=O.getCacheKey(d);O.setCachedValue(f,c)}return c}catch(c){m.logger.error("Failed code evaluation: "+c.message,{code:e});return}}const be=(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 qe=({block:e,context:t,localState:n,rootState:i,rootSetState:o})=>{if(!e.bindings)return e;const r=m.fastClone(e),s={...r,properties:{...r.properties},actions:{...r.actions}};for(const l in e.bindings){const d=e.bindings[l],c=H({code:d,localState:n,rootState:i,rootSetState:o,context:t,enableCache:!0});be(s,l,c)}return s};function _({block:e,context:t,shouldEvaluateBindings:n,localState:i,rootState:o,rootSetState:r}){const s=e;return n?qe({block:s,localState:i,rootState:o,rootSetState:r,context:t}):s}function ze(e,t,n={}){let i,o,r,s=null,l=0;const d=function(){l=n.leading===!1?0:Date.now(),s=null,r=e.apply(i,o),s||(i=o=null)};return function(){const c=Date.now();!l&&n.leading===!1&&(l=c);const f=t-(c-l);return i=this,o=arguments,f<=0||f>t?(s&&(clearTimeout(s),s=null),l=c,r=e.apply(i,o),s||(i=o=null)):!s&&n.trailing!==!1&&(s=setTimeout(d,f)),r}}function D(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 te=e=>e?e.replace(/([A-Z])/g,t=>`-${t[0].toLowerCase()}`):"";function _e(e){for(const t of e)switch(t.trigger){case"pageLoad":ye(t);break;case"hover":Ye(t);break;case"scrollInView":Ge(t);break}}function ne(e){console.warn(`Cannot animate element: element with ID ${e} not found!`)}function ie(e,t){const n=Je(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 d of n)d in l||(l[d]=i[d])}function Je(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 ye(e){const t=Array.prototype.slice.call(document.getElementsByClassName(e.elementId||e.id||""));if(!t.length){ne(e.elementId||e.id||"");return}Array.from(t).forEach(n=>{ie(e,n),n.style.transition="none",n.style.transitionDelay="0",D(n.style,e.steps[0].styles),setTimeout(()=>{n.style.transition=`all ${e.duration}s ${te(e.easing)}`,e.delay&&(n.style.transitionDelay=e.delay+"s"),D(n.style,e.steps[1].styles),setTimeout(()=>{n.style.transition="",n.style.transitionDelay=""},(e.delay||0)*1e3+e.duration*1e3+100)})})}function Ye(e){const t=Array.prototype.slice.call(document.getElementsByClassName(e.elementId||e.id||""));if(!t.length){ne(e.elementId||e.id||"");return}Array.from(t).forEach(n=>{ie(e,n);const i=e.steps[0].styles,o=e.steps[1].styles;function r(){D(n.style,i)}function s(){D(n.style,o)}r(),n.addEventListener("mouseenter",s),n.addEventListener("mouseleave",r),setTimeout(()=>{n.style.transition=`all ${e.duration}s ${te(e.easing)}`,e.delay&&(n.style.transitionDelay=e.delay+"s")})})}function Ge(e){const t=Array.prototype.slice.call(document.getElementsByClassName(e.elementId||e.id||""));if(!t.length){ne(e.elementId||e.id||"");return}Array.from(t).forEach(n=>{ie(e,n);let i=!1,o=!1;function r(){!i&&l(n)?(i=!0,o=!0,setTimeout(()=>{D(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,D(n.style,e.steps[0].styles))}const s=ze(r,200,{leading:!1});function l(f){const h=f.getBoundingClientRect(),b=window.innerHeight,p=(e.thresholdPercent||0)/100*b;return h.bottom>p&&h.top<b-p}const d=e.steps[0].styles;function c(){D(n.style,d)}c(),setTimeout(()=>{n.style.transition=`all ${e.duration}s ${te(e.easing)}`,e.delay&&(n.style.transitionDelay=e.delay+"s")}),document.addEventListener("scroll",s,{capture:!0,passive:!0}),r()})}const Qe=e=>e.replace(/([a-z0-9]|(?=[A-Z]))([A-Z])/g,"$1-$2").toLowerCase(),xe=e=>Object.entries(e).map(([n,i])=>{if(typeof i=="string")return`${Qe(n)}: ${i};`}).filter(m.checkIsDefined),Xe=e=>xe(e).join(`
2
2
  `),G=({mediaQuery:e,className:t,styles:n})=>{const i=`.${t} {
3
3
  ${Xe(n)}
4
4
  }`;return e?`${e} {
5
5
  ${i}
6
- }`:i};function Ze({style:e}){return e}const et=({block:e,context:t})=>pe(Ze({style:e.style||{},context:t,block:e}));function pe(e){switch(m.TARGET){case"svelte":case"vue":case"solid":return xe(e).join(" ");case"qwik":case"reactNative":case"react":case"rsc":return e}}const tt=({block:e,context:t,registeredComponents:n})=>{var r;const i=(r=z({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(`
6
+ }`:i};function Ze({style:e}){return e}const et=({block:e,context:t})=>pe(Ze({style:e.style||{},context:t,block:e}));function pe(e){switch(m.TARGET){case"svelte":case"vue":case"solid":return xe(e).join(" ");case"qwik":case"reactNative":case"react":case"rsc":return e}}const tt=({block:e,context:t,registeredComponents:n})=>{var r;const i=(r=_({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(`
7
7
  Could not find a registered component named "${i}".
8
- If you registered it, is the file that registered it imported by the file that needs to render it?`)},nt=({block:e,context:t})=>{const{repeat:n,...i}=e;if(!(n!=null&&n.collection))return;const o=H({code:n.collection,localState:t.localState,rootState:t.rootState,rootSetState:t.rootSetState,context:t.context,enableCache:!0});if(!Array.isArray(o))return;const r=n.collection.split(".").pop(),s=n.itemName||(r?r+"Item":"item");return o.map((u,c)=>({context:{...t,localState:{...t.localState,$index:c,$item:u,[s]:u,[`$${s}Index`]:c}},block:i}))},Se={small:{min:320,default:321,max:640},medium:{min:641,default:642,max:991},large:{min:990,default:991,max:1200}},re=(e,t=Se)=>`@media (max-width: ${t[e].max}px)`,ve=({small:e,medium:t})=>{const n=m.fastClone(Se);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};function J(e){return a.jsx("style",{dangerouslySetInnerHTML:{__html:e.styles},id:e.id})}function it(e){function t(){const i=z({block:e.block,localState:e.context.localState,rootState:e.context.rootState,rootSetState:e.context.rootSetState,context:e.context.context,shouldEvaluateBindings:!0});return m.checkIsDefined(i.hide)?!i.hide:m.checkIsDefined(i.show)?i.show:!0}function n(){var p;const i=z({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=ve(((p=r==null?void 0:r.meta)==null?void 0:p.breakpoints)||{}),l=o==null?void 0:o.large,u=o==null?void 0:o.medium,c=o==null?void 0:o.small,f=i.id;if(!f)return"";const h=l?G({className:f,styles:l}):"",b=u?G({className:f,styles:u,mediaQuery:re("medium",s)}):"",x=c?G({className:f,styles:c,mediaQuery:re("small",s)}):"";return[h,b,x].join(" ")}return a.jsx(a.Fragment,{children:n()&&t()?a.jsx(a.Fragment,{children:a.jsx(J,{styles:n()})}):null})}function ot(e){return e.charAt(0).toUpperCase()+e.slice(1)}const at=e=>`on${ot(e)}`,rt=(e,t)=>n=>H({code:e,context:t.context,localState:t.localState,rootState:t.rootState,rootSetState:t.rootSetState,event:n,isExpression:!1,enableCache:!0});function ke(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=at(o);if(e.stripPrefix)switch(m.TARGET){case"vue":s=s.replace("v-on:","");break;case"svelte":s=s.replace("on:","");break}t[s]=rt(r,e)}return t}function st({properties:e}){return e}const lt=e=>({href:e.href});function oe({block:e,context:t}){var i;const n={...lt(e),...e.properties,"builder-id":e.id,style:et({block:e,context:t}),[U()]:[e.id,"builder-block",e.class,(i=e.properties)==null?void 0:i.class].filter(Boolean).join(" ")};return st({properties:n,context:t,block:e})}function ct(e){return a.jsx(Z,{TagName:e.Wrapper,attributes:oe({block:e.block,context:e.context}),actionAttributes:ke({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 ut(e){return a.jsx(e.Wrapper,{...e.wrapperProps,attributes:e.includeBlockProps?{...oe({block:e.block,context:e.context}),...ke({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:oe({block:t,context:s})}:{}};return r?{Wrapper:i,block:t,context:n,wrapperProps:e,includeBlockProps:o}:l};function se(e){var i;const[t,n]=d.useState(()=>e.isInteractive?ut: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(K,{block:o,context:e.context,registeredComponents:e.registeredComponents,linkComponent:e.linkComponent},o.id))})}):null})}function mt(e){const[t,n]=d.useState(()=>e.repeatContext);return a.jsx(ee.Provider,{value:t,children:a.jsx(K,{block:e.block,context:t,registeredComponents:e.registeredComponents,linkComponent:e.linkComponent})})}function K(e){var u,c,f;function t(){return tt({block:e.block,context:e.context,registeredComponents:e.registeredComponents})}function n(){return nt({block:e.block,context:e.context})}function i(){var h;return(h=e.block.repeat)!=null&&h.collection?e.block:z({block:e.block,localState:e.context.localState,rootState:e.context.rootState,rootSetState:e.context.rootSetState,context:e.context.context,shouldEvaluateBindings:!0})}function o(){var b;return e.block.tagName==="a"||((b=i().properties)==null?void 0:b.href)||i().href?e.linkComponent||"a":e.block.tagName||"div"}function r(){var x,p;if((x=e.block.repeat)!=null&&x.collection)return!!((p=n==null?void 0:n())!=null&&p.length);const h="hide"in i()?i().hide:!1;return("show"in i()?i().show:!0)&&!h}function s(){var b,x;return!((b=t==null?void 0:t())!=null&&b.component)&&!n()?(x=i().children)!=null?x:[]:[]}function l(){var h,b,x,p,E,j,V,S,I,P,R;return{blockChildren:(h=i().children)!=null?h:[],componentRef:(b=t==null?void 0:t())==null?void 0:b.component,componentOptions:{...De(i()),builderContext:e.context,...((x=t==null?void 0:t())==null?void 0:x.name)==="Core:Button"||((p=t==null?void 0:t())==null?void 0:p.name)==="Symbol"||((E=t==null?void 0:t())==null?void 0:E.name)==="Columns"||((j=t==null?void 0:t())==null?void 0:j.name)==="Form:Form"?{builderLinkComponent:e.linkComponent}:{},...((V=t==null?void 0:t())==null?void 0:V.name)==="Symbol"||((S=t==null?void 0:t())==null?void 0:S.name)==="Columns"||((I=t==null?void 0:t())==null?void 0:I.name)==="Form:Form"?{builderComponents:e.registeredComponents}:{}},context:e.context,linkComponent:e.linkComponent,registeredComponents:e.registeredComponents,builderBlock:i(),includeBlockProps:((P=t==null?void 0:t())==null?void 0:P.noWrap)===!0,isInteractive:!((R=t==null?void 0:t())!=null&&R.isRSC)}}return d.useEffect(()=>{const h=i().id,b=i().animations;b&&h&&ze(b.filter(x=>x.trigger!=="hover").map(x=>({...x,elementId:h})))},[]),a.jsx(a.Fragment,{children:r()?a.jsxs(a.Fragment,{children:[a.jsx(it,{block:e.block,context:e.context}),(u=t==null?void 0:t())!=null&&u.noWrap?a.jsx(a.Fragment,{children:a.jsx(se,{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:(f=n())==null?void 0:f.map((h,b)=>a.jsx(mt,{repeatContext:h.context,block:h.block,registeredComponents:e.registeredComponents,linkComponent:e.linkComponent},b))}):a.jsxs(ct,{Wrapper:o(),block:i(),context:e.context,linkComponent:e.linkComponent,children:[a.jsx(se,{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}),(c=s())==null?void 0:c.map(h=>a.jsx(K,{block:h,registeredComponents:e.registeredComponents,linkComponent:e.linkComponent,context:e.context},h.id))]})})]}):null})}function ft(e){function t(){var o;return"builder-blocks"+((o=e.blocks)!=null&&o.length?"":" no-blocks")}function n(){var o,r;m.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;m.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-7cd1560e","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-7cd1560e {
8
+ If you registered it, is the file that registered it imported by the file that needs to render it?`)},nt=({block:e,context:t})=>{const{repeat:n,...i}=e;if(!(n!=null&&n.collection))return;const o=H({code:n.collection,localState:t.localState,rootState:t.rootState,rootSetState:t.rootSetState,context:t.context,enableCache:!0});if(!Array.isArray(o))return;const r=n.collection.split(".").pop(),s=n.itemName||(r?r+"Item":"item");return o.map((d,c)=>({context:{...t,localState:{...t.localState,$index:c,$item:d,[s]:d,[`$${s}Index`]:c}},block:i}))},Se={small:{min:320,default:321,max:640},medium:{min:641,default:642,max:991},large:{min:990,default:991,max:1200}},re=(e,t=Se)=>`@media (max-width: ${t[e].max}px)`,ve=({small:e,medium:t})=>{const n=m.fastClone(Se);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};function J(e){return a.jsx("style",{dangerouslySetInnerHTML:{__html:e.styles},id:e.id})}function it(e){function t(){const i=_({block:e.block,localState:e.context.localState,rootState:e.context.rootState,rootSetState:e.context.rootSetState,context:e.context.context,shouldEvaluateBindings:!0});return m.checkIsDefined(i.hide)?!i.hide:m.checkIsDefined(i.show)?i.show:!0}function n(){var p;const i=_({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=ve(((p=r==null?void 0:r.meta)==null?void 0:p.breakpoints)||{}),l=o==null?void 0:o.large,d=o==null?void 0:o.medium,c=o==null?void 0:o.small,f=i.id;if(!f)return"";const h=l?G({className:f,styles:l}):"",b=d?G({className:f,styles:d,mediaQuery:re("medium",s)}):"",x=c?G({className:f,styles:c,mediaQuery:re("small",s)}):"";return[h,b,x].join(" ")}return a.jsx(a.Fragment,{children:n()&&t()?a.jsx(a.Fragment,{children:a.jsx(J,{styles:n()})}):null})}function ot(e){return e.charAt(0).toUpperCase()+e.slice(1)}const at=e=>`on${ot(e)}`,rt=(e,t)=>n=>H({code:e,context:t.context,localState:t.localState,rootState:t.rootState,rootSetState:t.rootSetState,event:n,isExpression:!1,enableCache:!0});function ke(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=at(o);if(e.stripPrefix)switch(m.TARGET){case"vue":s=s.replace("v-on:","");break;case"svelte":s=s.replace("on:","");break}t[s]=rt(r,e)}return t}function st({properties:e}){return e}const lt=e=>({href:e.href});function oe({block:e,context:t}){var i;const n={...lt(e),...e.properties,"builder-id":e.id,style:et({block:e,context:t}),[U()]:[e.id,"builder-block",e.class,(i=e.properties)==null?void 0:i.class].filter(Boolean).join(" ")};return st({properties:n,context:t,block:e})}function ct(e){return a.jsx(Z,{TagName:e.Wrapper,attributes:oe({block:e.block,context:e.context}),actionAttributes:ke({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 dt(e){return a.jsx(e.Wrapper,{...e.wrapperProps,attributes:e.includeBlockProps?{...oe({block:e.block,context:e.context}),...ke({block:e.block,rootState:e.context.rootState,rootSetState:e.context.rootSetState,localState:e.context.localState,context:e.context.context})}:{},children:e.children})}const ut=({componentOptions:e,builderBlock:t,context:n,componentRef:i,includeBlockProps:o,isInteractive:r,contextValue:s})=>{const l={...e,...o?{attributes:oe({block:t,context:s})}:{}};return r?{Wrapper:i,block:t,context:n,wrapperProps:e,includeBlockProps:o}:l};function se(e){var i;const[t,n]=u.useState(()=>e.isInteractive?dt:e.componentRef);return a.jsx(a.Fragment,{children:e.componentRef?a.jsx(a.Fragment,{children:a.jsx(t,{...ut({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(K,{block:o,context:e.context,registeredComponents:e.registeredComponents,linkComponent:e.linkComponent},o.id))})}):null})}function mt(e){const[t,n]=u.useState(()=>e.repeatContext);return a.jsx(ee.Provider,{value:t,children:a.jsx(K,{block:e.block,context:t,registeredComponents:e.registeredComponents,linkComponent:e.linkComponent})})}function K(e){var d,c,f;function t(){return tt({block:e.block,context:e.context,registeredComponents:e.registeredComponents})}function n(){return nt({block:e.block,context:e.context})}function i(){var h;return(h=e.block.repeat)!=null&&h.collection?e.block:_({block:e.block,localState:e.context.localState,rootState:e.context.rootState,rootSetState:e.context.rootSetState,context:e.context.context,shouldEvaluateBindings:!0})}function o(){var b;return e.block.tagName==="a"||((b=i().properties)==null?void 0:b.href)||i().href?e.linkComponent||"a":e.block.tagName||"div"}function r(){var x,p;if((x=e.block.repeat)!=null&&x.collection)return!!((p=n==null?void 0:n())!=null&&p.length);const h="hide"in i()?i().hide:!1;return("show"in i()?i().show:!0)&&!h}function s(){var b,x;return!((b=t==null?void 0:t())!=null&&b.component)&&!n()?(x=i().children)!=null?x:[]:[]}function l(){var h,b,x,p,E,R,F,S,I,P,j;return{blockChildren:(h=i().children)!=null?h:[],componentRef:(b=t==null?void 0:t())==null?void 0:b.component,componentOptions:{...De(i()),builderContext:e.context,...((x=t==null?void 0:t())==null?void 0:x.name)==="Core:Button"||((p=t==null?void 0:t())==null?void 0:p.name)==="Symbol"||((E=t==null?void 0:t())==null?void 0:E.name)==="Columns"||((R=t==null?void 0:t())==null?void 0:R.name)==="Form:Form"?{builderLinkComponent:e.linkComponent}:{},...((F=t==null?void 0:t())==null?void 0:F.name)==="Symbol"||((S=t==null?void 0:t())==null?void 0:S.name)==="Columns"||((I=t==null?void 0:t())==null?void 0:I.name)==="Form:Form"?{builderComponents:e.registeredComponents}:{}},context:e.context,linkComponent:e.linkComponent,registeredComponents:e.registeredComponents,builderBlock:i(),includeBlockProps:((P=t==null?void 0:t())==null?void 0:P.noWrap)===!0,isInteractive:!((j=t==null?void 0:t())!=null&&j.isRSC)}}return u.useEffect(()=>{const h=i().id,b=i().animations;b&&h&&_e(b.filter(x=>x.trigger!=="hover").map(x=>({...x,elementId:h})))},[]),a.jsx(a.Fragment,{children:r()?a.jsxs(a.Fragment,{children:[a.jsx(it,{block:e.block,context:e.context}),(d=t==null?void 0:t())!=null&&d.noWrap?a.jsx(a.Fragment,{children:a.jsx(se,{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:(f=n())==null?void 0:f.map((h,b)=>a.jsx(mt,{repeatContext:h.context,block:h.block,registeredComponents:e.registeredComponents,linkComponent:e.linkComponent},b))}):a.jsxs(ct,{Wrapper:o(),block:i(),context:e.context,linkComponent:e.linkComponent,children:[a.jsx(se,{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}),(c=s())==null?void 0:c.map(h=>a.jsx(K,{block:h,registeredComponents:e.registeredComponents,linkComponent:e.linkComponent,context:e.context},h.id))]})})]}):null})}function ft(e){function t(){var o;return"builder-blocks"+((o=e.blocks)!=null&&o.length?"":" no-blocks")}function n(){var o,r;m.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;m.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-7cd1560e","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-7cd1560e {
9
9
  display: flex;
10
10
  flex-direction: column;
11
11
  align-items: stretch;
12
- }`})]})}function L(e){var i,o,r;const t=d.useContext(ee),n=d.useContext(he);return a.jsx(ft,{blocks:e.blocks,parent:e.parent,path:e.path,styleProp:e.styleProp,BlocksWrapper:((i=e.context)==null?void 0:i.BlocksWrapper)||t.BlocksWrapper,BlocksWrapperProps:((o=e.context)==null?void 0:o.BlocksWrapperProps)||t.BlocksWrapperProps,children:e.blocks?a.jsx(a.Fragment,{children:(r=e.blocks)==null?void 0:r.map(s=>a.jsx(K,{block:s,linkComponent:e.linkComponent,context:e.context||t,registeredComponents:e.registeredComponents||n.registeredComponents},s.id))}):null})}function Ce(e){var V;const[t,n]=d.useState(()=>typeof e.space=="number"?e.space||0:20),[i,o]=d.useState(()=>e.columns||[]),[r,s]=d.useState(()=>e.stackColumnsAt||"tablet");function l(S){var I;return((I=i[S])==null?void 0:I.width)||100/i.length}function u(S){const I=t*(i.length-1)/i.length;return`calc(${l(S)}% - ${I}px)`}function c({stackedStyle:S,desktopStyle:I}){return r==="tablet"?S:I}function f({stackedStyle:S,desktopStyle:I}){return r==="never"?I:S}const[h,b]=d.useState(()=>e.stackColumnsAt==="never"?"row":e.reverseColumnsWhenStacked?"column-reverse":"column");function x(){return{"--flex-dir":h,"--flex-dir-tablet":c({stackedStyle:h,desktopStyle:"row"})}}function p(S){const I=S===0?0:t,P=u(S),R=`${I}px`,N="100%",$=0;return{...{display:"flex",flexDirection:"column",alignItems:"stretch"},width:P,["marginLeft"]:R,"--column-width-mobile":f({stackedStyle:N,desktopStyle:P}),"--column-margin-left-mobile":f({stackedStyle:$,desktopStyle:R}),"--column-width-tablet":c({stackedStyle:N,desktopStyle:P}),"--column-margin-left-tablet":c({stackedStyle:$,desktopStyle:R})}}function E(S){var P,R;return ve(((R=(P=e.builderContext.content)==null?void 0:P.meta)==null?void 0:R.breakpoints)||{})[S].max}function j(){return`
12
+ }`})]})}function L(e){var i,o,r;const t=u.useContext(ee),n=u.useContext(he);return a.jsx(ft,{blocks:e.blocks,parent:e.parent,path:e.path,styleProp:e.styleProp,BlocksWrapper:((i=e.context)==null?void 0:i.BlocksWrapper)||t.BlocksWrapper,BlocksWrapperProps:((o=e.context)==null?void 0:o.BlocksWrapperProps)||t.BlocksWrapperProps,children:e.blocks?a.jsx(a.Fragment,{children:(r=e.blocks)==null?void 0:r.map(s=>a.jsx(K,{block:s,linkComponent:e.linkComponent,context:e.context||t,registeredComponents:e.registeredComponents||n.registeredComponents},s.id))}):null})}function Ce(e){var F;const[t,n]=u.useState(()=>typeof e.space=="number"?e.space||0:20),[i,o]=u.useState(()=>e.columns||[]),[r,s]=u.useState(()=>e.stackColumnsAt||"tablet");function l(S){var I;return((I=i[S])==null?void 0:I.width)||100/i.length}function d(S){const I=t*(i.length-1)/i.length;return`calc(${l(S)}% - ${I}px)`}function c({stackedStyle:S,desktopStyle:I}){return r==="tablet"?S:I}function f({stackedStyle:S,desktopStyle:I}){return r==="never"?I:S}const[h,b]=u.useState(()=>e.stackColumnsAt==="never"?"row":e.reverseColumnsWhenStacked?"column-reverse":"column");function x(){return{"--flex-dir":h,"--flex-dir-tablet":c({stackedStyle:h,desktopStyle:"row"})}}function p(S){const I=S===0?0:t,P=d(S),j=`${I}px`,N="100%",$=0;return{...{display:"flex",flexDirection:"column",alignItems:"stretch"},width:P,["marginLeft"]:j,"--column-width-mobile":f({stackedStyle:N,desktopStyle:P}),"--column-margin-left-mobile":f({stackedStyle:$,desktopStyle:j}),"--column-width-tablet":c({stackedStyle:N,desktopStyle:P}),"--column-margin-left-tablet":c({stackedStyle:$,desktopStyle:j})}}function E(S){var P,j;return ve(((j=(P=e.builderContext.content)==null?void 0:P.meta)==null?void 0:j.breakpoints)||{})[S].max}function R(){return`
13
13
  @media (max-width: ${E("medium")}px) {
14
14
  .${e.builderBlock.id}-breakpoints {
15
15
  flex-direction: var(--flex-dir-tablet);
@@ -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-5e636bea`,style:x(),children:[a.jsx(J,{styles:j()}),(V=e.columns)==null?void 0:V.map((S,I)=>a.jsx(Z,{TagName:S.link?e.builderLinkComponent||"a":"div",actionAttributes:{},attributes:{...S.link?{href:S.link}:{},[U()]:"builder-column",style:pe(p(I))},children:a.jsx(L,{path:`component.options.columns.${I}.blocks`,parent:e.builderBlock.id,styleProp:{flexGrow:"1"},context:e.builderContext,registeredComponents:e.builderComponents,linkComponent:e.builderLinkComponent,blocks:S.blocks})},I))]}),a.jsx("style",{children:`.div-5e636bea {
36
+ `}return a.jsxs(a.Fragment,{children:[a.jsxs("div",{className:`builder-columns ${e.builderBlock.id}-breakpoints div-5e636bea`,style:x(),children:[a.jsx(J,{styles:R()}),(F=e.columns)==null?void 0:F.map((S,I)=>a.jsx(Z,{TagName:S.link?e.builderLinkComponent||"a":"div",actionAttributes:{},attributes:{...S.link?{href:S.link}:{},[U()]:"builder-column",style:pe(p(I))},children:a.jsx(L,{path:`component.options.columns.${I}.blocks`,parent:e.builderBlock.id,styleProp:{flexGrow:"1"},context:e.builderContext,registeredComponents:e.builderComponents,linkComponent:e.builderLinkComponent,blocks:S.blocks})},I))]}),a.jsx("style",{children:`.div-5e636bea {
37
37
  display: flex;
38
38
  line-height: normal;
39
- }`})]})}function we(e){return a.jsx("span",{children:e.children})}function le(e){return e.replace(/http(s)?:/,"")}function ht(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 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 Q(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=>`${ht(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 Ie(e){var o,r,s,l;function t(){var f;const c=e.image||e.src;if(!c||!(c.match(/builder\.io/)||c.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"),Q(c)}else if(e.image&&!e.srcset)return Q(c);return Q(c)}function n(){var u;return(u=t==null?void 0:t())!=null&&u.match(/builder\.io/)&&!e.noWebp?t().replace(/\?/g,"?format=webp&"):""}function i(){const u={position:"absolute",height:"100%",width:"100%",left:"0px",top:"0px"};return e.aspectRatio?u:void 0}return a.jsxs(a.Fragment,{children:[a.jsxs(a.Fragment,{children:[a.jsxs("picture",{children:[n()?a.jsx("source",{type:"image/webp",srcSet:n()}):null,a.jsx("img",{loading:"lazy",alt:e.altText,role:e.altText?void 0:"presentation",style:{objectPosition:e.backgroundPosition||"center",objectFit:e.backgroundSize||"cover",...i()},className:"builder-image"+(e.className?" "+e.className:"")+" img-a0c95e8c",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("div",{className:"builder-image-sizer div-a0c95e8c",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("div",{className:"div-a0c95e8c-2",children:e.children}):null]}),a.jsx("style",{children:`.img-a0c95e8c {
39
+ }`})]})}function we(e){return a.jsx("span",{children:e.children})}function le(e){return e.replace(/http(s)?:/,"")}function ht(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 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 Q(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=>`${ht(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 Ie(e){var o,r,s,l;function t(){var f;const c=e.image||e.src;if(!c||!(c.match(/builder\.io/)||c.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"),Q(c)}else if(e.image&&!e.srcset)return Q(c);return Q(c)}function n(){var d;return(d=t==null?void 0:t())!=null&&d.match(/builder\.io/)&&!e.noWebp?t().replace(/\?/g,"?format=webp&"):""}function i(){const d={position:"absolute",height:"100%",width:"100%",left:"0px",top:"0px"};return e.aspectRatio?d:void 0}return a.jsxs(a.Fragment,{children:[a.jsxs(a.Fragment,{children:[a.jsxs("picture",{children:[n()?a.jsx("source",{type:"image/webp",srcSet:n()}):null,a.jsx("img",{loading:"lazy",alt:e.altText,role:e.altText?void 0:"presentation",style:{objectPosition:e.backgroundPosition||"center",objectFit:e.backgroundSize||"cover",...i()},className:"builder-image"+(e.className?" "+e.className:"")+" img-a0c95e8c",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("div",{className:"builder-image-sizer div-a0c95e8c",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("div",{className:"div-a0c95e8c-2",children:e.children}):null]}),a.jsx("style",{children:`.img-a0c95e8c {
40
40
  opacity: 1;
41
41
  transition: opacity 0.2s ease-in-out;
42
42
  }.div-a0c95e8c {
@@ -52,7 +52,7 @@
52
52
  left: 0;
53
53
  width: 100%;
54
54
  height: 100%;
55
- }`})]})}function Te(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 bt={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},yt={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,u)=>l+u.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:"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(s,l=6e4){return new Promise((u,c)=>{const f=document.createElement("img");let h=!1;f.onload=()=>{h=!0,u(f)},f.addEventListener("error",b=>{console.warn("Image load failed",b.error),c(b.error)}),f.src=s,setTimeout(()=>{h||c(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}]},St={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>"}}}]},vt={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 kt(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(L,{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 Ct={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"}]},wt={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 Ee(e){var t;return a.jsx("div",{className:"builder-text",dangerouslySetInnerHTML:{__html:((t=e.text)==null?void 0:t.toString())||""},style:{outline:"none"}})}const It={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 Tt(e){const t=d.useRef(null),[n,i]=d.useState(()=>[]),[o,r]=d.useState(()=>[]);return d.useEffect(()=>{var l;if(!((l=t.current)!=null&&l.getElementsByTagName)||typeof window=="undefined")return;const s=t.current.getElementsByTagName("script");for(let u=0;u<s.length;u++){const c=s[u];if(c.src){if(n.includes(c.src))continue;n.push(c.src);const f=document.createElement("script");f.async=!0,f.src=c.src,document.head.appendChild(f)}else if(!c.type||["text/javascript","application/javascript","application/ecmascript"].includes(c.type)){if(o.includes(c.innerText))continue;try{o.push(c.innerText),new Function(c.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 Et={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}]},jt=["text/javascript","application/javascript","application/ecmascript"],Rt=e=>jt.includes(e.type);function Pt(e){const t=d.useRef(null),[n,i]=d.useState(()=>[]),[o,r]=d.useState(()=>[]),[s,l]=d.useState(()=>!1);function u(){if(!t.current||!t.current.getElementsByTagName)return;const c=t.current.getElementsByTagName("script");for(let f=0;f<c.length;f++){const h=c[f];if(h.src&&!n.includes(h.src)){n.push(h.src);const b=document.createElement("script");b.async=!0,b.src=h.src,document.head.appendChild(b)}else if(Rt(h)&&!o.includes(h.innerText))try{o.push(h.innerText),new Function(h.innerText)()}catch(b){console.warn("`Embed`: Error running script:",b)}}}return d.useEffect(()=>{t.current&&!s&&(l(!0),u())},[t.current,s]),a.jsx("div",{className:"builder-embed",ref:t,dangerouslySetInnerHTML:{__html:e.content}})}const Vt={name:"Form:Form",defaults:{responsiveStyles:{large:{marginTop:"15px",paddingBottom:"15px"}}},image:"https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2Fef36d2a846134910b64b88e6d18c5ca5",inputs:[{name:"sendSubmissionsTo",type:"string",enum:[{label:"Send to email",value:"email",helperText:"Send form submissions to the email address of your choosing"},{label:"Custom",value:"custom",helperText:"Handle where the form requests go manually with a little code, e.g. to your own custom backend"}],defaultValue:"email"},{name:"sendSubmissionsToEmail",type:"string",required:!0,defaultValue:"your@email.com",showIf:'options.get("sendSubmissionsTo") === "email"'},{name:"sendWithJs",type:"boolean",helperText:"Set to false to use basic html form action",defaultValue:!0,showIf:'options.get("sendSubmissionsTo") === "custom"'},{name:"name",type:"string",defaultValue:"My form"},{name:"action",type:"string",helperText:"URL to send the form data to",showIf:'options.get("sendSubmissionsTo") === "custom"'},{name:"contentType",type:"string",defaultValue:"application/json",advanced:!0,enum:["application/json","multipart/form-data","application/x-www-form-urlencoded"],showIf:'options.get("sendSubmissionsTo") === "custom" && options.get("sendWithJs") === true'},{name:"method",type:"string",showIf:'options.get("sendSubmissionsTo") === "custom"',defaultValue:"POST",advanced:!0},{name:"previewState",type:"string",enum:["unsubmitted","sending","success","error"],defaultValue:"unsubmitted",helperText:'Choose a state to edit, e.g. choose "success" to show what users see on success and edit the message',showIf:'options.get("sendSubmissionsTo") !== "zapier" && options.get("sendWithJs") === true'},{name:"successUrl",type:"url",helperText:"Optional URL to redirect the user to on form submission success",showIf:'options.get("sendSubmissionsTo") !== "zapier" && options.get("sendWithJs") === true'},{name:"resetFormOnSubmit",type:"boolean",showIf:"options.get('sendSubmissionsTo') === 'custom' && options.get('sendWithJs') === true",advanced:!0},{name:"successMessage",type:"uiBlocks",hideFromUI:!0,defaultValue:[{"@type":"@builder.io/sdk:Element",responsiveStyles:{large:{marginTop:"10px"}},component:{name:"Text",options:{text:"<span>Thanks!</span>"}}}]},{name:"validate",type:"boolean",defaultValue:!0,advanced:!0},{name:"errorMessagePath",type:"text",advanced:!0,helperText:'Path to where to get the error message from in a JSON response to display to the user, e.g. "error.message" for a response like { "error": { "message": "this username is taken" }}'},{name:"errorMessage",type:"uiBlocks",hideFromUI:!0,defaultValue:[{"@type":"@builder.io/sdk:Element",responsiveStyles:{large:{marginTop:"10px"}},bindings:{"component.options.text":"state.formErrorMessage || block.component.options.text"},component:{name:"Text",options:{text:"<span>Form submission error :( Please check your answers and try again</span>"}}}]},{name:"sendingMessage",type:"uiBlocks",hideFromUI:!0,defaultValue:[{"@type":"@builder.io/sdk:Element",responsiveStyles:{large:{marginTop:"10px"}},component:{name:"Text",options:{text:"<span>Sending...</span>"}}}]},{name:"customHeaders",type:"map",valueType:{type:"string"},advanced:!0,showIf:'options.get("sendSubmissionsTo") === "custom" && options.get("sendWithJs") === true'}],noWrap:!0,canHaveChildren:!0,defaultChildren:[{"@type":"@builder.io/sdk:Element",responsiveStyles:{large:{marginTop:"10px"}},component:{name:"Text",options:{text:"<span>Enter your name</span>"}}},{"@type":"@builder.io/sdk:Element",responsiveStyles:{large:{marginTop:"10px"}},component:{name:"Form:Input",options:{name:"name",placeholder:"Jane Doe"}}},{"@type":"@builder.io/sdk:Element",responsiveStyles:{large:{marginTop:"10px"}},component:{name:"Text",options:{text:"<span>Enter your email</span>"}}},{"@type":"@builder.io/sdk:Element",responsiveStyles:{large:{marginTop:"10px"}},component:{name:"Form:Input",options:{name:"email",placeholder:"jane@doe.com"}}},{"@type":"@builder.io/sdk:Element",responsiveStyles:{large:{marginTop:"10px"}},component:{name:"Form:SubmitButton",options:{text:"Submit"}}}]},Ft=["production","qa","test","development","dev","cdn-qa","cloud","fast","cdn2","cdn-prod"],Bt=()=>{const e=process.env.NODE_ENV||"production";return Ft.includes(e)?e:"production"},At=(e,t,n)=>{const i=String.prototype.split.call(t,/[,[\].]+?/).filter(Boolean).reduce((o,r)=>o!=null?o[r]:o,e);return i===void 0||i===e?n:i};function Wt(e){var h,b;const t=d.useRef(null),[n,i]=d.useState(()=>"unsubmitted"),[o,r]=d.useState(()=>null),[s,l]=d.useState(()=>"");function u(x){var E,j;const p={...e.builderContext.rootState,...x};e.builderContext.rootSetState?(j=(E=e.builderContext).rootSetState)==null||j.call(E,p):e.builderContext.rootState=p}function c(){return m.isEditing()&&e.previewState||n}function f(x){var E;const p=e.sendWithJs||e.sendSubmissionsTo==="email";if(e.sendSubmissionsTo==="zapier")x.preventDefault();else if(p){if(!(e.action||e.sendSubmissionsTo==="email")){x.preventDefault();return}x.preventDefault();const j=x.currentTarget,V=e.customHeaders||{};let S;const I=new FormData(j),P=Array.from(x.currentTarget.querySelectorAll("input,select,textarea")).filter(g=>!!g.name).map(g=>{let T;const A=g.name;if(g instanceof HTMLInputElement)if(g.type==="radio"){if(g.checked)return T=g.name,{key:A,value:T}}else if(g.type==="checkbox")T=g.checked;else if(g.type==="number"||g.type==="range"){const F=g.valueAsNumber;isNaN(F)||(T=F)}else g.type==="file"?T=g.files:T=g.value;else T=g.value;return{key:A,value:T}});let R=e.contentType;if(e.sendSubmissionsTo==="email"&&(R="multipart/form-data"),Array.from(P).forEach(({value:g})=>{(g instanceof File||Array.isArray(g)&&g[0]instanceof File||g instanceof FileList)&&(R="multipart/form-data")}),R!=="application/json")S=I;else{const g={};Array.from(P).forEach(({value:T,key:A})=>{be(g,A,T)}),S=JSON.stringify(g)}R&&R!=="multipart/form-data"&&(p&&((E=e.action)!=null&&E.includes("zapier.com"))||(V["content-type"]=R));const N=new CustomEvent("presubmit",{detail:{body:S}});if(t.current&&(t.current.dispatchEvent(N),N.defaultPrevented))return;i("sending");const $=`${Bt()==="dev"?"http://localhost:5000":"https://builder.io"}/api/v1/form-submit?apiKey=${e.builderContext.apiKey}&to=${btoa(e.sendSubmissionsToEmail||"")}&name=${encodeURIComponent(e.name||"")}`;fetch(e.sendSubmissionsTo==="email"?$:e.action,{body:S,headers:V,method:e.method||"post"}).then(async g=>{let T;const A=g.headers.get("content-type");if(A&&A.indexOf("application/json")!==-1?T=await g.json():T=await g.text(),!g.ok&&e.errorMessagePath){let F=At(T,e.errorMessagePath);F&&(typeof F!="string"&&(F=JSON.stringify(F)),l(F),u({formErrorMessage:F}))}if(r(T),i(g.ok?"success":"error"),g.ok){const F=new CustomEvent("submit:success",{detail:{res:g,body:T}});if(t.current){if(t.current.dispatchEvent(F),F.defaultPrevented)return;e.resetFormOnSubmit!==!1&&t.current.reset()}if(e.successUrl)if(t.current){const y=new CustomEvent("route",{detail:{url:e.successUrl}});t.current.dispatchEvent(y),y.defaultPrevented||(location.href=e.successUrl)}else location.href=e.successUrl}},g=>{const T=new CustomEvent("submit:error",{detail:{error:g}});t.current&&(t.current.dispatchEvent(T),T.defaultPrevented)||(r(g),i("error"))})}}return a.jsxs(a.Fragment,{children:[" ",a.jsxs("form",{validate:e.validate,ref:t,action:!e.sendWithJs&&e.action,method:e.method,name:e.name,onSubmit:x=>f(x),...e.attributes,children:[e.builderBlock&&e.builderBlock.children?a.jsx(a.Fragment,{children:(b=(h=e.builderBlock)==null?void 0:h.children)==null?void 0:b.map((x,p)=>a.jsx(K,{block:x,context:e.builderContext,registeredComponents:e.builderComponents,linkComponent:e.builderLinkComponent},`form-block-${p}`))}):null,c()==="error"?a.jsx(L,{path:"errorMessage",blocks:e.errorMessage,context:e.builderContext}):null,c()==="sending"?a.jsx(L,{path:"sendingMessage",blocks:e.sendingMessage,context:e.builderContext}):null,c()==="error"&&o?a.jsx("pre",{className:"builder-form-error-text pre-31bf8a14",children:JSON.stringify(o,null,2)}):null,c()==="success"?a.jsx(L,{path:"successMessage",blocks:e.successMessage,context:e.builderContext}):null]})," ",a.jsx("style",{children:".pre-31bf8a14 { padding: 10px; color: red; text-align: center; }"})," "]})}const Nt={name:"Form:Input",image:"https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2Fad6f37889d9e40bbbbc72cdb5875d6ca",inputs:[{name:"type",type:"text",enum:["text","number","email","url","checkbox","radio","range","date","datetime-local","search","tel","time","file","month","week","password","color","hidden"],defaultValue:"text"},{name:"name",type:"string",required:!0,helperText:'Every input in a form needs a unique name describing what it takes, e.g. "email"'},{name:"placeholder",type:"string",defaultValue:"Hello there",helperText:"Text to display when there is no value"},{name:"defaultValue",type:"string"},{name:"value",type:"string",advanced:!0},{name:"required",type:"boolean",helperText:"Is this input required to be filled out to submit a form",defaultValue:!1}],noWrap:!0,static:!0,defaultStyles:{paddingTop:"10px",paddingBottom:"10px",paddingLeft:"10px",paddingRight:"10px",borderRadius:"3px",borderWidth:"1px",borderStyle:"solid",borderColor:"#ccc"}};function $t(e){return d.createElement("input",{...e.attributes,key:m.isEditing()&&e.defaultValue?e.defaultValue:"default-key",placeholder:e.placeholder,type:e.type,name:e.name,value:e.value,defaultValue:e.defaultValue,required:e.required})}const Dt={name:"Form:Select",image:"https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2F83acca093fb24aaf94dee136e9a4b045",defaultStyles:{alignSelf:"flex-start"},inputs:[{name:"options",type:"list",required:!0,subFields:[{name:"value",type:"text",required:!0},{name:"name",type:"text"}],defaultValue:[{value:"option 1"},{value:"option 2"}]},{name:"name",type:"string",required:!0,helperText:'Every select in a form needs a unique name describing what it gets, e.g. "email"'},{name:"defaultValue",type:"string"},{name:"value",type:"string",advanced:!0},{name:"required",type:"boolean",defaultValue:!1}],static:!0,noWrap:!0};function Lt(e){var t;return d.createElement("select",{...e.attributes,value:e.value,key:m.isEditing()&&e.defaultValue?e.defaultValue:"default-key",defaultValue:e.defaultValue,name:e.name},(t=e.options)==null?void 0:t.map(n=>a.jsx("option",{value:n.value,children:n.name||n.value})))}const Mt={name:"Form:SubmitButton",image:"https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2Fdf2820ffed1f4349a94c40b3221f5b98",defaultStyles:{appearance:"none",paddingTop:"15px",paddingBottom:"15px",paddingLeft:"25px",paddingRight:"25px",backgroundColor:"#3898EC",color:"white",borderRadius:"4px",cursor:"pointer"},inputs:[{name:"text",type:"text",defaultValue:"Click me"}],static:!0,noWrap:!0};function Ot(e){return a.jsx("button",{type:"submit",...e.attributes,children:e.text})}const Ut={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 Ht(e){return a.jsx("img",{style:{objectFit:e.backgroundSize||"cover",objectPosition:e.backgroundPosition||"center"},alt:e.altText,src:e.imgSrc||e.image,...e.attributes},m.isEditing()&&e.imgSrc||"default-key")}const Kt={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://cdn.builder.io/o/assets%2FYJIGb4i01jvw0SRdL5Bt%2Fd27731a526464deba0016216f5f9e570%2Fcompressed?apiKey=YJIGb4i01jvw0SRdL5Bt&token=d27731a526464deba0016216f5f9e570&alt=media&optimized=true",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 je(e){var i,o,r,s,l,u,c;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("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("div",{style:{display:"flex",flexDirection:"column",alignItems:"stretch"},children:e.children}):null,(c=(u=e.builderBlock)==null?void 0:u.children)!=null&&c.length&&!e.fitContent?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 qt=()=>[{component:Tt,...It},{component:Pt,...Et},{component:Wt,...Vt},{component:$t,...Nt},{component:Ot,...Mt},{component:Lt,...Dt},{component:Ht,...Ut},{component:je,...Kt}],ce=()=>[{component:fe,...bt},{component:Ce,...yt},{component:we,...xt},{component:Ie,...pt},{component:Te,...St},{component:kt,...vt},{component:Be,...Ct},{component:Ee,...wt},...qt()],_t=`function updateCookiesAndStyles(contentId, variants, isHydrationTarget) {
55
+ }`})]})}function Te(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 bt={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},yt={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,d)=>l+d.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:"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(s,l=6e4){return new Promise((d,c)=>{const f=document.createElement("img");let h=!1;f.onload=()=>{h=!0,d(f)},f.addEventListener("error",b=>{console.warn("Image load failed",b.error),c(b.error)}),f.src=s,setTimeout(()=>{h||c(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}]},St={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>"}}}]},vt={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 kt(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(L,{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 Ct={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"}]},wt={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 Ee(e){var t;return a.jsx("div",{className:"builder-text",dangerouslySetInnerHTML:{__html:((t=e.text)==null?void 0:t.toString())||""},style:{outline:"none"}})}const It={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 Tt(e){const t=u.useRef(null),[n,i]=u.useState(()=>[]),[o,r]=u.useState(()=>[]);return u.useEffect(()=>{var l;if(!((l=t.current)!=null&&l.getElementsByTagName)||typeof window=="undefined")return;const s=t.current.getElementsByTagName("script");for(let d=0;d<s.length;d++){const c=s[d];if(c.src){if(n.includes(c.src))continue;n.push(c.src);const f=document.createElement("script");f.async=!0,f.src=c.src,document.head.appendChild(f)}else if(!c.type||["text/javascript","application/javascript","application/ecmascript"].includes(c.type)){if(o.includes(c.innerText))continue;try{o.push(c.innerText),new Function(c.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 Et={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}]},Rt=["text/javascript","application/javascript","application/ecmascript"],jt=e=>Rt.includes(e.type);function Pt(e){const t=u.useRef(null),[n,i]=u.useState(()=>[]),[o,r]=u.useState(()=>[]),[s,l]=u.useState(()=>!1);function d(){if(!t.current||!t.current.getElementsByTagName)return;const c=t.current.getElementsByTagName("script");for(let f=0;f<c.length;f++){const h=c[f];if(h.src&&!n.includes(h.src)){n.push(h.src);const b=document.createElement("script");b.async=!0,b.src=h.src,document.head.appendChild(b)}else if(jt(h)&&!o.includes(h.innerText))try{o.push(h.innerText),new Function(h.innerText)()}catch(b){console.warn("`Embed`: Error running script:",b)}}}return u.useEffect(()=>{t.current&&!s&&(l(!0),d())},[t.current,s]),a.jsx("div",{className:"builder-embed",ref:t,dangerouslySetInnerHTML:{__html:e.content}})}const Ft={name:"Form:Form",defaults:{responsiveStyles:{large:{marginTop:"15px",paddingBottom:"15px"}}},image:"https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2Fef36d2a846134910b64b88e6d18c5ca5",inputs:[{name:"sendSubmissionsTo",type:"string",enum:[{label:"Send to email",value:"email",helperText:"Send form submissions to the email address of your choosing"},{label:"Custom",value:"custom",helperText:"Handle where the form requests go manually with a little code, e.g. to your own custom backend"}],defaultValue:"email"},{name:"sendSubmissionsToEmail",type:"string",required:!0,defaultValue:"your@email.com",showIf:'options.get("sendSubmissionsTo") === "email"'},{name:"sendWithJs",type:"boolean",helperText:"Set to false to use basic html form action",defaultValue:!0,showIf:'options.get("sendSubmissionsTo") === "custom"'},{name:"name",type:"string",defaultValue:"My form"},{name:"action",type:"string",helperText:"URL to send the form data to",showIf:'options.get("sendSubmissionsTo") === "custom"'},{name:"contentType",type:"string",defaultValue:"application/json",advanced:!0,enum:["application/json","multipart/form-data","application/x-www-form-urlencoded"],showIf:'options.get("sendSubmissionsTo") === "custom" && options.get("sendWithJs") === true'},{name:"method",type:"string",showIf:'options.get("sendSubmissionsTo") === "custom"',defaultValue:"POST",advanced:!0},{name:"previewState",type:"string",enum:["unsubmitted","sending","success","error"],defaultValue:"unsubmitted",helperText:'Choose a state to edit, e.g. choose "success" to show what users see on success and edit the message',showIf:'options.get("sendSubmissionsTo") !== "zapier" && options.get("sendWithJs") === true'},{name:"successUrl",type:"url",helperText:"Optional URL to redirect the user to on form submission success",showIf:'options.get("sendSubmissionsTo") !== "zapier" && options.get("sendWithJs") === true'},{name:"resetFormOnSubmit",type:"boolean",showIf:"options.get('sendSubmissionsTo') === 'custom' && options.get('sendWithJs') === true",advanced:!0},{name:"successMessage",type:"uiBlocks",hideFromUI:!0,defaultValue:[{"@type":"@builder.io/sdk:Element",responsiveStyles:{large:{marginTop:"10px"}},component:{name:"Text",options:{text:"<span>Thanks!</span>"}}}]},{name:"validate",type:"boolean",defaultValue:!0,advanced:!0},{name:"errorMessagePath",type:"text",advanced:!0,helperText:'Path to where to get the error message from in a JSON response to display to the user, e.g. "error.message" for a response like { "error": { "message": "this username is taken" }}'},{name:"errorMessage",type:"uiBlocks",hideFromUI:!0,defaultValue:[{"@type":"@builder.io/sdk:Element",responsiveStyles:{large:{marginTop:"10px"}},bindings:{"component.options.text":"state.formErrorMessage || block.component.options.text"},component:{name:"Text",options:{text:"<span>Form submission error :( Please check your answers and try again</span>"}}}]},{name:"sendingMessage",type:"uiBlocks",hideFromUI:!0,defaultValue:[{"@type":"@builder.io/sdk:Element",responsiveStyles:{large:{marginTop:"10px"}},component:{name:"Text",options:{text:"<span>Sending...</span>"}}}]},{name:"customHeaders",type:"map",valueType:{type:"string"},advanced:!0,showIf:'options.get("sendSubmissionsTo") === "custom" && options.get("sendWithJs") === true'}],noWrap:!0,canHaveChildren:!0,defaultChildren:[{"@type":"@builder.io/sdk:Element",responsiveStyles:{large:{marginTop:"10px"}},component:{name:"Text",options:{text:"<span>Enter your name</span>"}}},{"@type":"@builder.io/sdk:Element",responsiveStyles:{large:{marginTop:"10px"}},component:{name:"Form:Input",options:{name:"name",placeholder:"Jane Doe"}}},{"@type":"@builder.io/sdk:Element",responsiveStyles:{large:{marginTop:"10px"}},component:{name:"Text",options:{text:"<span>Enter your email</span>"}}},{"@type":"@builder.io/sdk:Element",responsiveStyles:{large:{marginTop:"10px"}},component:{name:"Form:Input",options:{name:"email",placeholder:"jane@doe.com"}}},{"@type":"@builder.io/sdk:Element",responsiveStyles:{large:{marginTop:"10px"}},component:{name:"Form:SubmitButton",options:{text:"Submit"}}}]},Vt=["production","qa","test","development","dev","cdn-qa","cloud","fast","cdn2","cdn-prod"],Bt=()=>{const e=process.env.NODE_ENV||"production";return Vt.includes(e)?e:"production"},At=(e,t,n)=>{const i=String.prototype.split.call(t,/[,[\].]+?/).filter(Boolean).reduce((o,r)=>o!=null?o[r]:o,e);return i===void 0||i===e?n:i};function Wt(e){var h,b;const t=u.useRef(null),[n,i]=u.useState(()=>"unsubmitted"),[o,r]=u.useState(()=>null),[s,l]=u.useState(()=>"");function d(x){var E,R;const p={...e.builderContext.rootState,...x};e.builderContext.rootSetState?(R=(E=e.builderContext).rootSetState)==null||R.call(E,p):e.builderContext.rootState=p}function c(){return m.isEditing()&&e.previewState||n}function f(x){var E;const p=e.sendWithJs||e.sendSubmissionsTo==="email";if(e.sendSubmissionsTo==="zapier")x.preventDefault();else if(p){if(!(e.action||e.sendSubmissionsTo==="email")){x.preventDefault();return}x.preventDefault();const R=x.currentTarget,F=e.customHeaders||{};let S;const I=new FormData(R),P=Array.from(x.currentTarget.querySelectorAll("input,select,textarea")).filter(g=>!!g.name).map(g=>{let T;const A=g.name;if(g instanceof HTMLInputElement)if(g.type==="radio"){if(g.checked)return T=g.name,{key:A,value:T}}else if(g.type==="checkbox")T=g.checked;else if(g.type==="number"||g.type==="range"){const V=g.valueAsNumber;isNaN(V)||(T=V)}else g.type==="file"?T=g.files:T=g.value;else T=g.value;return{key:A,value:T}});let j=e.contentType;if(e.sendSubmissionsTo==="email"&&(j="multipart/form-data"),Array.from(P).forEach(({value:g})=>{(g instanceof File||Array.isArray(g)&&g[0]instanceof File||g instanceof FileList)&&(j="multipart/form-data")}),j!=="application/json")S=I;else{const g={};Array.from(P).forEach(({value:T,key:A})=>{be(g,A,T)}),S=JSON.stringify(g)}j&&j!=="multipart/form-data"&&(p&&((E=e.action)!=null&&E.includes("zapier.com"))||(F["content-type"]=j));const N=new CustomEvent("presubmit",{detail:{body:S}});if(t.current&&(t.current.dispatchEvent(N),N.defaultPrevented))return;i("sending");const $=`${Bt()==="dev"?"http://localhost:5000":"https://builder.io"}/api/v1/form-submit?apiKey=${e.builderContext.apiKey}&to=${btoa(e.sendSubmissionsToEmail||"")}&name=${encodeURIComponent(e.name||"")}`;fetch(e.sendSubmissionsTo==="email"?$:e.action,{body:S,headers:F,method:e.method||"post"}).then(async g=>{let T;const A=g.headers.get("content-type");if(A&&A.indexOf("application/json")!==-1?T=await g.json():T=await g.text(),!g.ok&&e.errorMessagePath){let V=At(T,e.errorMessagePath);V&&(typeof V!="string"&&(V=JSON.stringify(V)),l(V),d({formErrorMessage:V}))}if(r(T),i(g.ok?"success":"error"),g.ok){const V=new CustomEvent("submit:success",{detail:{res:g,body:T}});if(t.current){if(t.current.dispatchEvent(V),V.defaultPrevented)return;e.resetFormOnSubmit!==!1&&t.current.reset()}if(e.successUrl)if(t.current){const y=new CustomEvent("route",{detail:{url:e.successUrl}});t.current.dispatchEvent(y),y.defaultPrevented||(location.href=e.successUrl)}else location.href=e.successUrl}},g=>{const T=new CustomEvent("submit:error",{detail:{error:g}});t.current&&(t.current.dispatchEvent(T),T.defaultPrevented)||(r(g),i("error"))})}}return a.jsxs(a.Fragment,{children:[" ",a.jsxs("form",{validate:e.validate,ref:t,action:!e.sendWithJs&&e.action,method:e.method,name:e.name,onSubmit:x=>f(x),...e.attributes,children:[e.builderBlock&&e.builderBlock.children?a.jsx(a.Fragment,{children:(b=(h=e.builderBlock)==null?void 0:h.children)==null?void 0:b.map((x,p)=>a.jsx(K,{block:x,context:e.builderContext,registeredComponents:e.builderComponents,linkComponent:e.builderLinkComponent},`form-block-${p}`))}):null,c()==="error"?a.jsx(L,{path:"errorMessage",blocks:e.errorMessage,context:e.builderContext}):null,c()==="sending"?a.jsx(L,{path:"sendingMessage",blocks:e.sendingMessage,context:e.builderContext}):null,c()==="error"&&o?a.jsx("pre",{className:"builder-form-error-text pre-31bf8a14",children:JSON.stringify(o,null,2)}):null,c()==="success"?a.jsx(L,{path:"successMessage",blocks:e.successMessage,context:e.builderContext}):null]})," ",a.jsx("style",{children:".pre-31bf8a14 { padding: 10px; color: red; text-align: center; }"})," "]})}const Nt={name:"Form:Input",image:"https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2Fad6f37889d9e40bbbbc72cdb5875d6ca",inputs:[{name:"type",type:"text",enum:["text","number","email","url","checkbox","radio","range","date","datetime-local","search","tel","time","file","month","week","password","color","hidden"],defaultValue:"text"},{name:"name",type:"string",required:!0,helperText:'Every input in a form needs a unique name describing what it takes, e.g. "email"'},{name:"placeholder",type:"string",defaultValue:"Hello there",helperText:"Text to display when there is no value"},{name:"defaultValue",type:"string"},{name:"value",type:"string",advanced:!0},{name:"required",type:"boolean",helperText:"Is this input required to be filled out to submit a form",defaultValue:!1}],noWrap:!0,static:!0,defaultStyles:{paddingTop:"10px",paddingBottom:"10px",paddingLeft:"10px",paddingRight:"10px",borderRadius:"3px",borderWidth:"1px",borderStyle:"solid",borderColor:"#ccc"}};function $t(e){return u.createElement("input",{...e.attributes,key:m.isEditing()&&e.defaultValue?e.defaultValue:"default-key",placeholder:e.placeholder,type:e.type,name:e.name,value:e.value,defaultValue:e.defaultValue,required:e.required})}const Dt={name:"Form:Select",image:"https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2F83acca093fb24aaf94dee136e9a4b045",defaultStyles:{alignSelf:"flex-start"},inputs:[{name:"options",type:"list",required:!0,subFields:[{name:"value",type:"text",required:!0},{name:"name",type:"text"}],defaultValue:[{value:"option 1"},{value:"option 2"}]},{name:"name",type:"string",required:!0,helperText:'Every select in a form needs a unique name describing what it gets, e.g. "email"'},{name:"defaultValue",type:"string"},{name:"value",type:"string",advanced:!0},{name:"required",type:"boolean",defaultValue:!1}],static:!0,noWrap:!0};function Lt(e){var t;return u.createElement("select",{...e.attributes,value:e.value,key:m.isEditing()&&e.defaultValue?e.defaultValue:"default-key",defaultValue:e.defaultValue,name:e.name},(t=e.options)==null?void 0:t.map(n=>a.jsx("option",{value:n.value,children:n.name||n.value})))}const Mt={name:"Form:SubmitButton",image:"https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2Fdf2820ffed1f4349a94c40b3221f5b98",defaultStyles:{appearance:"none",paddingTop:"15px",paddingBottom:"15px",paddingLeft:"25px",paddingRight:"25px",backgroundColor:"#3898EC",color:"white",borderRadius:"4px",cursor:"pointer"},inputs:[{name:"text",type:"text",defaultValue:"Click me"}],static:!0,noWrap:!0};function Ot(e){return a.jsx("button",{type:"submit",...e.attributes,children:e.text})}const Ut={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 Ht(e){return a.jsx("img",{style:{objectFit:e.backgroundSize||"cover",objectPosition:e.backgroundPosition||"center"},alt:e.altText,src:e.imgSrc||e.image,...e.attributes},m.isEditing()&&e.imgSrc||"default-key")}const Kt={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://cdn.builder.io/o/assets%2FYJIGb4i01jvw0SRdL5Bt%2Fd27731a526464deba0016216f5f9e570%2Fcompressed?apiKey=YJIGb4i01jvw0SRdL5Bt&token=d27731a526464deba0016216f5f9e570&alt=media&optimized=true",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 Re(e){var i,o,r,s,l,d,c;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("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("div",{style:{display:"flex",flexDirection:"column",alignItems:"stretch"},children:e.children}):null,(c=(d=e.builderBlock)==null?void 0:d.children)!=null&&c.length&&!e.fitContent?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 qt=()=>[{component:Tt,...It},{component:Pt,...Et},{component:Wt,...Ft},{component:$t,...Nt},{component:Ot,...Mt},{component:Lt,...Dt},{component:Ht,...Ut},{component:Re,...Kt}],ce=()=>[{component:fe,...bt},{component:Ce,...yt},{component:we,...xt},{component:Ie,...pt},{component:Te,...St},{component:kt,...vt},{component:Be,...Ct},{component:Ee,...wt},...qt()],zt=`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
- }`,zt=`function updateVariantVisibility(variantContentId, defaultContentId, isHydrationTarget) {
111
+ }`,_t=`function updateVariantVisibility(variantContentId, defaultContentId, isHydrationTarget) {
112
112
  if (!navigator.cookieEnabled) {
113
113
  return;
114
114
  }
@@ -142,15 +142,15 @@
142
142
  thisScriptEl?.remove();
143
143
  }
144
144
  return;
145
- }`,Re="builderIoAbTest",Pe="builderIoRenderContent",_=e=>Object.values((e==null?void 0:e.variations)||{}).map(t=>({...t,testVariationId:t.id,id:e==null?void 0:e.id})),Jt=({canTrack:e,content:t})=>!(!(_(t).length>0)||!e||m.isBrowser()),Yt=e=>e==="react"||e==="reactNative",Ve=Yt(m.TARGET),Gt=()=>`
146
- window.${Re} = ${_t}
147
- window.${Pe} = ${zt}
145
+ }`,je="builderIoAbTest",Pe="builderIoRenderContent",z=e=>Object.values((e==null?void 0:e.variations)||{}).map(t=>({...t,testVariationId:t.id,id:e==null?void 0:e.id})),Jt=({canTrack:e,content:t})=>!(!(z(t).length>0)||!e||m.isBrowser()),Yt=e=>e==="react"||e==="reactNative",Fe=Yt(m.TARGET),Gt=()=>`
146
+ window.${je} = ${zt}
147
+ window.${Pe} = ${_t}
148
148
  `,Qt=(e,t)=>`
149
- window.${Re}(
150
- "${t}",${JSON.stringify(e)}, ${Ve}
149
+ window.${je}(
150
+ "${t}",${JSON.stringify(e)}, ${Fe}
151
151
  )`,Xt=({contentId:e,variationId:t})=>`window.${Pe}(
152
- "${t}", "${e}", ${Ve}
153
- )`;function X(e){return a.jsx("script",{dangerouslySetInnerHTML:{__html:e.scriptStr},id:e.id||""})}function ue(e){return Math.round(e*1e3)/1e3}const Zt=(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},en=e=>Zt(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=ue(i/n.width),s=ue(o/n.height);return{x:r,y:s}},tn=e=>{const t=e.target,n=t&&en(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 nn(e){var R,N,$,g,T,A,F;const t=d.useRef(null),[n,i]=d.useState(()=>0);d.useState(()=>!0);function o(y){var k,C;const v={...e.builderContextSignal.rootState,...y};e.builderContextSignal.rootSetState?(C=(k=e.builderContextSignal).rootSetState)==null||C.call(k,v):e.setBuilderContextSignal(w=>({...w,rootState:v}))}function r(y){var k,C,w,B,M;const v={...e.builderContextSignal.content,...y,data:{...(k=e.builderContextSignal.content)==null?void 0:k.data,...y==null?void 0:y.data},meta:{...(C=e.builderContextSignal.content)==null?void 0:C.meta,...y==null?void 0:y.meta,breakpoints:((w=y==null?void 0:y.meta)==null?void 0:w.breakpoints)||((M=(B=e.builderContextSignal.content)==null?void 0:B.meta)==null?void 0:M.breakpoints)}};e.setBuilderContextSignal(q=>({...q,content:v}))}d.useState(()=>0);const[s,l]=d.useState(()=>!1),[u,c]=d.useState(()=>e.contentWrapper||"div");function f(y){return m.createEditorListener({model:e.model,trustedHosts:e.trustedHosts,callbacks:{configureSdk:v=>{var w;const{breakpoints:k,contentId:C}=v;!C||C!==((w=e.builderContextSignal.content)==null?void 0:w.id)||k&&(r({meta:{breakpoints:k}}),i(n+1))},animation:v=>{ye(v)},contentUpdate:v=>{r(v),i(n+1)}}})(y)}function h(){var v,k;const y=(k=(v=e.builderContextSignal.content)==null?void 0:v.data)==null?void 0:k.jsCode;y&&H({code:y,context:e.context||{},localState:void 0,rootState:e.builderContextSignal.rootState,rootSetState:e.builderContextSignal.rootSetState,enableCache:!1})}const[b,x]=d.useState(()=>({})),[p,E]=d.useState(()=>!1);function j(y){var v,k;if(e.builderContextSignal.content){const C=(v=e.builderContextSignal.content)==null?void 0:v.testVariationId,w=(k=e.builderContextSignal.content)==null?void 0:k.id;m._track({type:"click",canTrack:m.getDefaultCanTrack(e.canTrack),contentId:w,apiKey:e.apiKey,variationId:C!==w?C:void 0,...tn(y),unique:!p})}p||E(!0)}function V(y){return y.replace(/{{([^}]+)}}/g,(v,k)=>String(H({code:k,context:e.context||{},localState:void 0,rootState:e.builderContextSignal.rootState,rootSetState:e.builderContextSignal.rootSetState,enableCache:!0})))}function S({url:y,key:v}){m.fetch(y).then(k=>k.json()).then(k=>{var w,B;const C={...e.builderContextSignal.rootState,[v]:k};(B=(w=e.builderContextSignal).rootSetState)==null||B.call(w,C),b[v]=!0}).catch(k=>{console.error("error fetching dynamic data",y,k)})}function I(){var v,k,C;const y=(C=(k=(v=e.builderContextSignal.content)==null?void 0:v.data)==null?void 0:k.httpRequests)!=null?C:{};Object.entries(y).forEach(([w,B])=>{if(B&&(!b[w]||m.isEditing())){const M=V(B);S({url:M,key:w})}})}function P(){m.isEditing()&&window.dispatchEvent(new CustomEvent("builder:component:stateChange",{detail:{state:m.fastClone(e.builderContextSignal.rootState),ref:{name:e.model}}}))}return d.useEffect(()=>{var y,v;if(m.isBrowser()){if(m.isEditing()&&(i(n+1),window.addEventListener("message",f),m.registerInsertMenu(),m.setupBrowserForEditing({...e.locale?{locale:e.locale}:{},...e.enrich?{enrich:e.enrich}:{},...e.trustedHosts?{trustedHosts:e.trustedHosts}:{}}),Object.values(e.builderContextSignal.componentInfos).forEach(C=>{var B;const w=m.createRegisterComponentMessage(C);(B=window.parent)==null||B.postMessage(w,"*")}),window.addEventListener("builder:component:stateChangeListenerActivated",P)),e.builderContextSignal.content&&m.getDefaultCanTrack(e.canTrack)){const C=(y=e.builderContextSignal.content)==null?void 0:y.testVariationId,w=(v=e.builderContextSignal.content)==null?void 0:v.id,B=e.apiKey;m._track({type:"impression",canTrack:!0,contentId:w,apiKey:B,variationId:C!==w?C:void 0})}if(m.isPreviewing()){const C=new URL(location.href).searchParams,w=C.get("builder.preview"),B=C.get(`builder.preview.${w}`),M=C.get("apiKey")||C.get("builder.space");w===e.model&&M===e.apiKey&&(!e.content||B===e.content.id)&&m.fetchOneEntry({model:e.model,apiKey:e.apiKey,apiVersion:e.builderContextSignal.apiVersion}).then(q=>{q&&r(q)})}}},[]),d.useEffect(()=>{e.apiKey||m.logger.error("No API key provided to `RenderContent` component. This can cause issues. Please provide an API key using the `apiKey` prop."),h(),I(),P()},[]),d.useEffect(()=>{e.content&&r(e.content)},[e.content]),d.useEffect(()=>{},[s]),d.useEffect(()=>{h()},[(N=(R=e.builderContextSignal.content)==null?void 0:R.data)==null?void 0:N.jsCode]),d.useEffect(()=>{I()},[(g=($=e.builderContextSignal.content)==null?void 0:$.data)==null?void 0:g.httpRequests]),d.useEffect(()=>{P()},[e.builderContextSignal.rootState]),d.useEffect(()=>{e.data&&o(e.data)},[e.data]),d.useEffect(()=>{e.locale&&o({locale:e.locale})},[e.locale]),d.useEffect(()=>()=>{m.isBrowser()&&(window.removeEventListener("message",f),window.removeEventListener("builder:component:stateChangeListenerActivated",P))},[]),a.jsx(ee.Provider,{value:e.builderContextSignal,children:e.builderContextSignal.content?d.createElement(u,{key:n,ref:t,onClick:y=>j(y),"builder-content-id":(T=e.builderContextSignal.content)==null?void 0:T.id,"builder-model":e.model,...e.showContent?{}:{hidden:!0,"aria-hidden":!0},...e.contentWrapperProps,className:`variant-${((A=e.content)==null?void 0:A.testVariationId)||((F=e.content)==null?void 0:F.id)}`},e.children):null})}const on=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+=`
152
+ "${t}", "${e}", ${Fe}
153
+ )`;function X(e){return a.jsx("script",{dangerouslySetInnerHTML:{__html:e.scriptStr},id:e.id||""})}function de(e){return Math.round(e*1e3)/1e3}const Zt=(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},en=e=>Zt(e,t=>{const n=t.getAttribute("builder-id")||t.id;return(n==null?void 0:n.indexOf("builder-"))===0}),ue=({event:e,target:t})=>{const n=t.getBoundingClientRect(),i=e.clientX-n.left,o=e.clientY-n.top,r=de(i/n.width),s=de(o/n.height);return{x:r,y:s}},tn=e=>{const t=e.target,n=t&&en(t),i=(n==null?void 0:n.getAttribute("builder-id"))||(n==null?void 0:n.id);return{targetBuilderElement:i||void 0,metadata:{targetOffset:t?ue({event:e,target:t}):void 0,builderTargetOffset:n?ue({event:e,target:n}):void 0,builderElementIndex:n&&i?[].slice.call(document.getElementsByClassName(i)).indexOf(n):void 0}}};function nn(e){var j,N,$,g,T,A,V;const t=u.useRef(null),[n,i]=u.useState(()=>0);u.useState(()=>!0);function o(y){var k,C;const v={...e.builderContextSignal.rootState,...y};e.builderContextSignal.rootSetState?(C=(k=e.builderContextSignal).rootSetState)==null||C.call(k,v):e.setBuilderContextSignal(w=>({...w,rootState:v}))}function r(y){var k,C,w,B,M;const v={...e.builderContextSignal.content,...y,data:{...(k=e.builderContextSignal.content)==null?void 0:k.data,...y==null?void 0:y.data},meta:{...(C=e.builderContextSignal.content)==null?void 0:C.meta,...y==null?void 0:y.meta,breakpoints:((w=y==null?void 0:y.meta)==null?void 0:w.breakpoints)||((M=(B=e.builderContextSignal.content)==null?void 0:B.meta)==null?void 0:M.breakpoints)}};e.setBuilderContextSignal(q=>({...q,content:v}))}u.useState(()=>0);const[s,l]=u.useState(()=>!1),[d,c]=u.useState(()=>e.contentWrapper||"div");function f(y){return m.createEditorListener({model:e.model,trustedHosts:e.trustedHosts,callbacks:{configureSdk:v=>{var w;const{breakpoints:k,contentId:C}=v;!C||C!==((w=e.builderContextSignal.content)==null?void 0:w.id)||k&&(r({meta:{breakpoints:k}}),i(n+1))},animation:v=>{ye(v)},contentUpdate:v=>{r(v),i(n+1)}}})(y)}function h(){var v,k;const y=(k=(v=e.builderContextSignal.content)==null?void 0:v.data)==null?void 0:k.jsCode;y&&H({code:y,context:e.context||{},localState:void 0,rootState:e.builderContextSignal.rootState,rootSetState:e.builderContextSignal.rootSetState,enableCache:!1})}const[b,x]=u.useState(()=>({})),[p,E]=u.useState(()=>!1);function R(y){var v,k;if(e.builderContextSignal.content){const C=(v=e.builderContextSignal.content)==null?void 0:v.testVariationId,w=(k=e.builderContextSignal.content)==null?void 0:k.id;m._track({type:"click",canTrack:m.getDefaultCanTrack(e.canTrack),contentId:w,apiKey:e.apiKey,variationId:C!==w?C:void 0,...tn(y),unique:!p})}p||E(!0)}function F(y){return y.replace(/{{([^}]+)}}/g,(v,k)=>String(H({code:k,context:e.context||{},localState:void 0,rootState:e.builderContextSignal.rootState,rootSetState:e.builderContextSignal.rootSetState,enableCache:!0})))}function S({url:y,key:v}){m.fetch(y).then(k=>k.json()).then(k=>{var w,B;const C={...e.builderContextSignal.rootState,[v]:k};(B=(w=e.builderContextSignal).rootSetState)==null||B.call(w,C),b[v]=!0}).catch(k=>{console.error("error fetching dynamic data",y,k)})}function I(){var v,k,C;const y=(C=(k=(v=e.builderContextSignal.content)==null?void 0:v.data)==null?void 0:k.httpRequests)!=null?C:{};Object.entries(y).forEach(([w,B])=>{if(B&&(!b[w]||m.isEditing())){const M=F(B);S({url:M,key:w})}})}function P(){m.isEditing()&&window.dispatchEvent(new CustomEvent("builder:component:stateChange",{detail:{state:m.fastClone(e.builderContextSignal.rootState),ref:{name:e.model}}}))}return u.useEffect(()=>{var y,v;if(m.isBrowser()){if(m.isEditing()&&(i(n+1),window.addEventListener("message",f),m.registerInsertMenu(),m.setupBrowserForEditing({...e.locale?{locale:e.locale}:{},...e.enrich?{enrich:e.enrich}:{},...e.trustedHosts?{trustedHosts:e.trustedHosts}:{}}),Object.values(e.builderContextSignal.componentInfos).forEach(C=>{var B;const w=m.createRegisterComponentMessage(C);(B=window.parent)==null||B.postMessage(w,"*")}),window.addEventListener("builder:component:stateChangeListenerActivated",P)),e.builderContextSignal.content&&m.getDefaultCanTrack(e.canTrack)){const C=(y=e.builderContextSignal.content)==null?void 0:y.testVariationId,w=(v=e.builderContextSignal.content)==null?void 0:v.id,B=e.apiKey;m._track({type:"impression",canTrack:!0,contentId:w,apiKey:B,variationId:C!==w?C:void 0})}if(m.isPreviewing()){const C=new URL(location.href).searchParams,w=C.get("builder.preview"),B=C.get(`builder.preview.${w}`),M=C.get("apiKey")||C.get("builder.space");w===e.model&&M===e.apiKey&&(!e.content||B===e.content.id)&&m.fetchOneEntry({model:e.model,apiKey:e.apiKey,apiVersion:e.builderContextSignal.apiVersion}).then(q=>{q&&r(q)})}}},[]),u.useEffect(()=>{e.apiKey||m.logger.error("No API key provided to `RenderContent` component. This can cause issues. Please provide an API key using the `apiKey` prop."),h(),I(),P()},[]),u.useEffect(()=>{e.content&&r(e.content)},[e.content]),u.useEffect(()=>{},[s]),u.useEffect(()=>{h()},[(N=(j=e.builderContextSignal.content)==null?void 0:j.data)==null?void 0:N.jsCode]),u.useEffect(()=>{I()},[(g=($=e.builderContextSignal.content)==null?void 0:$.data)==null?void 0:g.httpRequests]),u.useEffect(()=>{P()},[e.builderContextSignal.rootState]),u.useEffect(()=>{e.data&&o(e.data)},[e.data]),u.useEffect(()=>{e.locale&&o({locale:e.locale})},[e.locale]),u.useEffect(()=>()=>{m.isBrowser()&&(window.removeEventListener("message",f),window.removeEventListener("builder:component:stateChangeListenerActivated",P))},[]),a.jsx(ee.Provider,{value:e.builderContextSignal,children:e.builderContextSignal.content?u.createElement(d,{key:n,ref:t,onClick:y=>R(y),"builder-content-id":(T=e.builderContextSignal.content)==null?void 0:T.id,"builder-model":e.model,...e.showContent?{}:{hidden:!0,"aria-hidden":!0},...e.contentWrapperProps,className:`variant-${((A=e.content)==null?void 0:A.testVariationId)||((V=e.content)==null?void 0:V.id)}`},e.children):null})}const on=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+=`
154
154
  @font-face {
155
155
  font-family: "${t}";
156
156
  src: local("${n}"), url('${i}') format('woff2');
@@ -164,10 +164,7 @@ src: url('${c}') format('woff2');
164
164
  font-display: fallback;
165
165
  font-weight: ${l};
166
166
  }
167
- `.trim())}return o},an=({customFonts:e})=>{var t;return((t=e==null?void 0:e.map(n=>on(n)))==null?void 0:t.join(" "))||""},rn=({cssCode:e,contentId:t})=>e?t?(e==null?void 0:e.replace(/&/g,`div[builder-content-id="${t}"]`))||"":e:"";function sn(e){const[t,n]=d.useState(()=>`
168
- ${rn({cssCode:e.cssCode,contentId:e.contentId})}
169
- ${an({customFonts:e.customFonts})}
170
-
167
+ `.trim())}return o},an=({customFonts:e})=>{var t;return((t=e==null?void 0:e.map(n=>on(n)))==null?void 0:t.join(" "))||""},rn=({cssCode:e,contentId:t})=>e?t?(e==null?void 0:e.replace(/&/g,`div[builder-content-id="${t}"]`))||"":e:"",sn=`
171
168
  .builder-button {
172
169
  all: unset;
173
170
  }
@@ -184,4 +181,8 @@ ${an({customFonts:e.customFonts})}
184
181
  text-align: inherit;
185
182
  font-family: inherit;
186
183
  }
187
- `.trim());return a.jsx(J,{styles:t})}const ln=({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(u=>{u.name&&u.defaultValue!==void 0&&(i[u.name]=u.defaultValue)}),{...i,...o,...t,...n?{locale:n}:{}}},cn=({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 u,c,f,h,b,x,p;const[t,n]=d.useState(()=>{var E,j;return Xt({variationId:(E=e.content)==null?void 0:E.testVariationId,contentId:(j=e.content)==null?void 0:j.id})});function i(E){l(j=>({...j,rootState:E}))}const[o,r]=d.useState(()=>[...ce(),...e.customComponents||[]].reduce((E,{component:j,...V})=>({...E,[V.name]:{component:j,...m.serializeComponentInfo(V)}}),{})),[s,l]=d.useState(()=>({content:cn({content:e.content,data:e.data}),localState:void 0,rootState:ln({content:e.content,data:e.data,locale:e.locale}),rootSetState:i,context:e.context||{},apiKey:e.apiKey,apiVersion:e.apiVersion,componentInfos:[...ce(),...e.customComponents||[]].reduce((E,{component:j,...V})=>({...E,[V.name]:m.serializeComponentInfo(V)}),{}),inheritedStyles:{},BlocksWrapper:e.blocksWrapper||"div",BlocksWrapperProps:e.blocksWrapperProps||{}}));return a.jsx(he.Provider,{value:{registeredComponents:o},children:a.jsxs(nn,{content:e.content,data:e.data,model:e.model,context:e.context,apiKey:e.apiKey,canTrack:e.canTrack,locale:e.locale,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(X,{scriptStr:t}):null,a.jsx(sn,{contentId:(u=s.content)==null?void 0:u.id,cssCode:(f=(c=s.content)==null?void 0:c.data)==null?void 0:f.cssCode,customFonts:(b=(h=s.content)==null?void 0:h.data)==null?void 0:b.customFonts}),a.jsx(L,{blocks:(p=(x=s.content)==null?void 0:x.data)==null?void 0:p.blocks,context:s,registeredComponents:o,linkComponent:e.linkComponent})]})})}function Fe(e){var s,l;const[t,n]=d.useState(()=>Jt({canTrack:m.getDefaultCanTrack(e.canTrack),content:e.content}));function i(){var u;return Qt(_(e.content).map(c=>({id:c.testVariationId,testRatio:c.testRatio})),((u=e.content)==null?void 0:u.id)||"")}function o(){return _(e.content).map(u=>`.variant-${u.testVariationId} { display: none; } `).join("")}function r(){var u;return t?{...e.content,testVariationId:(u=e.content)==null?void 0:u.id}:m.handleABTestingSync({item:e.content,canTrack:m.getDefaultCanTrack(e.canTrack)})}return d.useEffect(()=>{},[]),a.jsxs(a.Fragment,{children:[!e.__isNestedRender&&m.TARGET!=="reactNative"?a.jsx(X,{scriptStr:Gt()}):null,t?a.jsxs(a.Fragment,{children:[a.jsx(J,{id:`variants-styles-${(s=e.content)==null?void 0:s.id}`,styles:o()}),a.jsx(X,{scriptStr:i()}),(l=_(e.content))==null?void 0:l.map(u=>a.jsx(me,{content:u,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,enrich:e.enrich,isSsrAbTest:t,blocksWrapper:e.blocksWrapper,blocksWrapperProps:e.blocksWrapperProps,contentWrapper:e.contentWrapper,contentWrapperProps:e.contentWrapperProps,trustedHosts:e.trustedHosts},u.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,enrich:e.enrich,isSsrAbTest:t,blocksWrapper:e.blocksWrapper,blocksWrapperProps:e.blocksWrapperProps,contentWrapper:e.contentWrapper,contentWrapperProps:e.contentWrapperProps,trustedHosts:e.trustedHosts})]})}const un=async({builderContextValue:e,symbol:t})=>{if(t!=null&&t.model&&(e!=null&&e.apiKey))return m.fetchOneEntry({model:t.model,apiKey:e.apiKey,apiVersion:e.apiVersion,...(t==null?void 0:t.entry)&&{query:{id:t.entry}}}).catch(n=>{m.logger.error("Could not fetch symbol content: ",n)})};function Be(e){var r,s,l,u;function t(){var c,f;return[e.attributes[U()],"builder-symbol",(c=e.symbol)!=null&&c.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]=d.useState(()=>{var c;return(c=e.symbol)==null?void 0:c.content});function o(){n||un({symbol:e.symbol,builderContextValue:e.builderContext}).then(c=>{c&&i(c)})}return d.useEffect(()=>{},[]),d.useEffect(()=>{o()},[e.symbol]),a.jsx("div",{...e.attributes,className:t(),children:a.jsx(Fe,{__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:(u=e.symbol)==null?void 0:u.model,content:n,linkComponent:e.builderLinkComponent,blocksWrapper:"div",contentWrapper:"div"})})}exports.Blocks=L;exports.Button=fe;exports.Columns=Ce;exports.Content=Fe;exports.Fragment=we;exports.Image=Ie;exports.Section=Te;exports.Symbol=Be;exports.Text=Ee;exports.Video=je;
184
+ `,ln=e=>e?"":sn;function cn(e){const[t,n]=u.useState(()=>`
185
+ ${rn({cssCode:e.cssCode,contentId:e.contentId})}
186
+ ${an({customFonts:e.customFonts})}
187
+ ${ln(e.isNestedRender)}
188
+ `.trim());return a.jsx(J,{styles:t})}const dn=({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(d=>{d.name&&d.defaultValue!==void 0&&(i[d.name]=d.defaultValue)}),{...i,...o,...t,...n?{locale:n}:{}}},un=({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 d,c,f,h,b,x,p;const[t,n]=u.useState(()=>{var E,R;return Xt({variationId:(E=e.content)==null?void 0:E.testVariationId,contentId:(R=e.content)==null?void 0:R.id})});function i(E){l(R=>({...R,rootState:E}))}const[o,r]=u.useState(()=>[...ce(),...e.customComponents||[]].reduce((E,{component:R,...F})=>({...E,[F.name]:{component:R,...m.serializeComponentInfo(F)}}),{})),[s,l]=u.useState(()=>({content:un({content:e.content,data:e.data}),localState:void 0,rootState:dn({content:e.content,data:e.data,locale:e.locale}),rootSetState:i,context:e.context||{},apiKey:e.apiKey,apiVersion:e.apiVersion,componentInfos:[...ce(),...e.customComponents||[]].reduce((E,{component:R,...F})=>({...E,[F.name]:m.serializeComponentInfo(F)}),{}),inheritedStyles:{},BlocksWrapper:e.blocksWrapper||"div",BlocksWrapperProps:e.blocksWrapperProps||{}}));return a.jsx(he.Provider,{value:{registeredComponents:o},children:a.jsxs(nn,{content:e.content,data:e.data,model:e.model,context:e.context,apiKey:e.apiKey,canTrack:e.canTrack,locale:e.locale,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(X,{scriptStr:t}):null,a.jsx(cn,{isNestedRender:e.isNestedRender,contentId:(d=s.content)==null?void 0:d.id,cssCode:(f=(c=s.content)==null?void 0:c.data)==null?void 0:f.cssCode,customFonts:(b=(h=s.content)==null?void 0:h.data)==null?void 0:b.customFonts}),a.jsx(L,{blocks:(p=(x=s.content)==null?void 0:x.data)==null?void 0:p.blocks,context:s,registeredComponents:o,linkComponent:e.linkComponent})]})})}function Ve(e){var s,l;const[t,n]=u.useState(()=>Jt({canTrack:m.getDefaultCanTrack(e.canTrack),content:e.content}));function i(){var d;return Qt(z(e.content).map(c=>({id:c.testVariationId,testRatio:c.testRatio})),((d=e.content)==null?void 0:d.id)||"")}function o(){return z(e.content).map(d=>`.variant-${d.testVariationId} { display: none; } `).join("")}function r(){var d;return t?{...e.content,testVariationId:(d=e.content)==null?void 0:d.id}:m.handleABTestingSync({item:e.content,canTrack:m.getDefaultCanTrack(e.canTrack)})}return u.useEffect(()=>{},[]),a.jsxs(a.Fragment,{children:[!e.isNestedRender&&m.TARGET!=="reactNative"?a.jsx(X,{scriptStr:Gt()}):null,t?a.jsxs(a.Fragment,{children:[a.jsx(J,{id:`variants-styles-${(s=e.content)==null?void 0:s.id}`,styles:o()}),a.jsx(X,{scriptStr:i()}),(l=z(e.content))==null?void 0:l.map(d=>a.jsx(me,{isNestedRender:e.isNestedRender,content:d,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,enrich:e.enrich,isSsrAbTest:t,blocksWrapper:e.blocksWrapper,blocksWrapperProps:e.blocksWrapperProps,contentWrapper:e.contentWrapper,contentWrapperProps:e.contentWrapperProps,trustedHosts:e.trustedHosts},d.testVariationId))]}):null,a.jsx(me,{isNestedRender:e.isNestedRender,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,enrich:e.enrich,isSsrAbTest:t,blocksWrapper:e.blocksWrapper,blocksWrapperProps:e.blocksWrapperProps,contentWrapper:e.contentWrapper,contentWrapperProps:e.contentWrapperProps,trustedHosts:e.trustedHosts})]})}const mn=async({builderContextValue:e,symbol:t})=>{if(t!=null&&t.model&&(e!=null&&e.apiKey))return m.fetchOneEntry({model:t.model,apiKey:e.apiKey,apiVersion:e.apiVersion,...(t==null?void 0:t.entry)&&{query:{id:t.entry}}}).catch(n=>{m.logger.error("Could not fetch symbol content: ",n)})};function Be(e){var r,s,l,d;function t(){var c,f;return[e.attributes[U()],"builder-symbol",(c=e.symbol)!=null&&c.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]=u.useState(()=>{var c;return(c=e.symbol)==null?void 0:c.content});function o(){n||mn({symbol:e.symbol,builderContextValue:e.builderContext}).then(c=>{c&&i(c)})}return u.useEffect(()=>{},[]),u.useEffect(()=>{o()},[e.symbol]),a.jsx("div",{...e.attributes,className:t(),children:a.jsx(Ve,{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:(d=e.symbol)==null?void 0:d.model,content:n,linkComponent:e.builderLinkComponent,blocksWrapper:"div",contentWrapper:"div"})})}exports.Blocks=L;exports.Button=fe;exports.Columns=Ce;exports.Content=Ve;exports.Fragment=we;exports.Image=Ie;exports.Section=Te;exports.Symbol=Be;exports.Text=Ee;exports.Video=Re;