@builder.io/sdk-react 3.0.2 → 3.0.3-0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/browser/blocks-exports.cjs +169 -32
- package/lib/browser/blocks-exports.mjs +1297 -887
- package/lib/browser/index.cjs +1 -1
- package/lib/browser/index.mjs +17 -16
- package/lib/browser/server-entry-c7bda8b5.cjs +2 -0
- package/lib/browser/{server-entry-a2495a20.js → server-entry-da1754bd.js} +279 -237
- package/lib/browser/server-entry.cjs +1 -1
- package/lib/browser/server-entry.mjs +1 -1
- package/lib/edge/accordion-388f5e60.cjs +1 -0
- package/lib/edge/{accordion-c020e15b.js → accordion-50de133c.js} +17 -16
- package/lib/edge/{blocks-27ac5b23.js → blocks-5e476ddc.js} +4 -4
- package/lib/edge/{blocks-cd946d16.cjs → blocks-a5193d52.cjs} +8 -8
- package/lib/edge/blocks-exports.cjs +1 -1
- package/lib/edge/blocks-exports.mjs +13 -12
- package/lib/edge/{button-5cdb4f26.js → button-4261ae64.js} +2 -2
- package/lib/edge/{button-8572fca5.cjs → button-c6ec3aea.cjs} +1 -1
- package/lib/edge/{columns-3ac1fa96.js → columns-28e9fb0a.js} +12 -12
- package/lib/edge/{columns-c8a9cb89.cjs → columns-8c831c02.cjs} +2 -2
- package/lib/edge/{content-variants-23c8eec6.js → content-variants-36ca4fe5.js} +165 -124
- package/lib/edge/content-variants-81713434.cjs +134 -0
- package/lib/edge/{custom-code-6d9730ff.cjs → custom-code-8119ea3f.cjs} +1 -1
- package/lib/edge/dynamic-blocks-exports.cjs +3 -1
- package/lib/edge/dynamic-blocks-exports.mjs +5 -2
- package/lib/edge/{form-7fc5691b.js → form-039fb5ff.js} +13 -13
- package/lib/edge/{form-3d9bf265.cjs → form-e7a1dec9.cjs} +1 -1
- package/lib/edge/{get-class-prop-name-a4845b04.js → get-class-prop-name-65d6824c.js} +1 -1
- package/lib/edge/{get-class-prop-name-29fd576a.cjs → get-class-prop-name-a86a3e60.cjs} +1 -1
- package/lib/edge/{image-5c9e156f.js → image-2a2b26d2.js} +6 -6
- package/lib/edge/{image-94922c87.cjs → image-4db81d72.cjs} +3 -3
- package/lib/edge/{img-388698cb.js → img-61d29fb3.js} +1 -1
- package/lib/edge/{img-102acaa2.cjs → img-7de3a3de.cjs} +1 -1
- package/lib/edge/index.cjs +1 -1
- package/lib/edge/index.mjs +18 -17
- package/lib/edge/{input-10e350a9.cjs → input-bd5387a6.cjs} +1 -1
- package/lib/edge/{input-5484e9e7.js → input-c8539054.js} +1 -1
- package/lib/edge/personalization-container-3fda6014.cjs +138 -0
- package/lib/edge/personalization-container-c76e4fef.js +379 -0
- package/lib/edge/{select-b8406bcf.js → select-6b5cda00.js} +1 -1
- package/lib/edge/{select-f11be7a7.cjs → select-73accaf4.cjs} +1 -1
- package/lib/edge/{server-entry-7ce03a4e.js → server-entry-838c1f06.js} +322 -280
- package/lib/edge/server-entry-ea2a8b0e.cjs +2 -0
- package/lib/edge/server-entry.cjs +1 -1
- package/lib/edge/server-entry.mjs +1 -1
- package/lib/edge/{slot-4ab390ec.cjs → slot-099112f1.cjs} +1 -1
- package/lib/edge/{slot-23f75377.js → slot-403c77da.js} +3 -3
- package/lib/edge/{symbol-2eafb4e0.js → symbol-97f456f4.js} +2 -2
- package/lib/edge/{symbol-fa343d77.cjs → symbol-ffa6e6cd.cjs} +1 -1
- package/lib/edge/{tabs-4c9c64f6.js → tabs-a7c94ead.js} +3 -3
- package/lib/edge/{tabs-7d258d82.cjs → tabs-ad55c6a7.cjs} +1 -1
- package/lib/node/blocks-exports.cjs +168 -31
- package/lib/node/blocks-exports.mjs +1403 -993
- package/lib/node/index.cjs +1 -1
- package/lib/node/index.mjs +17 -16
- package/lib/node/init.cjs +1 -1
- package/lib/node/init.mjs +3 -3
- package/lib/node/{server-entry-2b263dde.js → server-entry-51bc0b1d.js} +279 -237
- package/lib/node/server-entry-d7316893.cjs +2 -0
- package/lib/node/server-entry.cjs +1 -1
- package/lib/node/server-entry.mjs +1 -1
- package/lib/node/{setIvm-7eb67cd6.js → setIvm-575cf1f1.js} +1 -1
- package/lib/node/{setIvm-1e6f0b60.cjs → setIvm-d912cf4d.cjs} +1 -1
- package/lib/node/setIvm.cjs +1 -1
- package/lib/node/setIvm.mjs +2 -2
- package/lib/node/{should-force-browser-runtime-in-node-23218b19.cjs → should-force-browser-runtime-in-node-23225980.cjs} +1 -1
- package/lib/node/{should-force-browser-runtime-in-node-cdae9360.js → should-force-browser-runtime-in-node-66df4856.js} +1 -1
- package/package.json +1 -1
- package/types/blocks/index.d.ts +4 -0
- package/types/blocks/personalization-container/component-info.d.ts +2 -0
- package/types/blocks/personalization-container/helpers/index.d.ts +15 -0
- package/types/blocks/personalization-container/helpers/inlined-fns.d.ts +8 -0
- package/types/blocks/personalization-container/helpers.d.ts +27 -0
- package/types/blocks/personalization-container/index.d.ts +1 -0
- package/types/blocks/personalization-container/personalization-container.d.ts +4 -0
- package/types/blocks/personalization-container/personalization-container.types.d.ts +14 -0
- package/types/blocks/textarea/component-info.d.ts +2 -0
- package/types/blocks/textarea/index.d.ts +1 -0
- package/types/blocks/textarea/textarea.d.ts +14 -0
- package/types/constants/sdk-version.d.ts +1 -1
- package/types/functions/filter-with-custom-targeting.d.ts +15 -0
- package/types/helpers/user-attributes.d.ts +17 -0
- package/types/index-helpers/blocks-exports.d.ts +1 -0
- package/types/types/builder-content.d.ts +1 -0
- package/types/types/input.d.ts +11 -0
- package/lib/browser/server-entry-75ce8600.cjs +0 -2
- package/lib/edge/accordion-1c16f65e.cjs +0 -1
- package/lib/edge/content-variants-caa23bf7.cjs +0 -134
- package/lib/edge/server-entry-1879cbc4.cjs +0 -2
- package/lib/node/server-entry-ec330556.cjs +0 -2
|
@@ -1,49 +1,49 @@
|
|
|
1
|
-
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("react/jsx-runtime"),f=require("./server-entry-75ce8600.cjs"),h=require("react"),De=new Set(["area","base","br","col","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"]),Oe=e=>typeof e=="string"&&De.has(e.toLowerCase());function Q(e){return a.jsx(a.Fragment,{children:Oe(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 W=()=>{switch(f.TARGET){case"react":case"reactNative":case"rsc":return"className";case"svelte":case"vue":case"solid":case"qwik":case"angular":return"class"}};function me(e){function t(){return{...e.attributes,[W()]:`${e.link?"":"builder-button"} ${e.attributes[W()]||""}`,...e.link?{href:e.link,target:e.openLinkInNewTab?"_blank":void 0,role:"link"}:{role:"button"}}}return a.jsx(Q,{attributes:t(),TagName:e.link?e.builderLinkComponent||"a":"button",actionAttributes:{},children:e.text})}const U=h.createContext({content:null,context:{},localState:void 0,rootSetState(){},rootState:{},apiKey:null,apiVersion:void 0,componentInfos:{},inheritedStyles:{},BlocksWrapper:"div",BlocksWrapperProps:{},nonce:"",model:""}),fe=h.createContext({registeredComponents:{}}),ge=(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},Le=({builder:e,context:t,event:n,state:i})=>Object.entries({state:i,Builder:e,builder:e,context:t,event:n}),Ue=()=>({isEditing:f.isEditing(),isBrowser:f.isBrowser(),isServer:!f.isBrowser(),getUserAttributes:()=>f.getUserAttributes()}),_e=(e,{isExpression:t=!0})=>t&&!(e.includes(";")||e.includes(" return ")||e.trim().startsWith("return "))?`return (${e});`:e;function he({rootState:e,localState:t,rootSetState:n}){return new Proxy(e,{get:(i,o)=>{if(t&&o in t)return t[o];const r=i[o];return typeof r=="object"&&r!==null?he({rootState:r,localState:void 0,rootSetState:n?s=>{i[o]=s,n(i)}:void 0}):r},set:(i,o,r)=>{if(t&&o in t)throw new Error("Writing to local state is not allowed as it is read-only.");return i[o]=r,n==null||n(i),!0}})}const te=({code:e,builder:t,context:n,event:i,localState:o,rootSetState:r,rootState:s})=>{const l=Le({builder:t,context:n,event:i,state:he({rootState:s,localState:o,rootSetState:r})});return new Function(...l.map(([d])=>d),e)(...l.map(([,d])=>d))};function He(){var e;return typeof process!="undefined"&&f.checkIsDefined((e=process==null?void 0:process.versions)==null?void 0:e.node)}const Me=({shouldLogWarning:e})=>{var o;if(!He())return!1;const t=process.arch==="arm64",n=process.version.startsWith("v20"),i=(o=process.env.NODE_OPTIONS)==null?void 0:o.includes("--no-node-snapshot");return t&&n&&!i?(e&&f.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},qe=e=>(f.isBrowser()||Me({shouldLogWarning:!0}),te(e)),ze=/^(return )?(\s*)?state(?<getPath>(\.\w+)+)(\s*);?$/,Ke=/(\s)*var(\s)+_virtual_index(\s)*=(\s)*state(?<getPath>(\.\w+)+)(\s*);?(\s)*return(\s)*_virtual_index(\s)*/,Je=e=>{var t,n,i,o,r,s;return((i=(n=(t=ze.exec(e.trim()))==null?void 0:t.groups)==null?void 0:n.getPath)==null?void 0:i.slice(1))||((s=(r=(o=Ke.exec(e.trim()))==null?void 0:o.groups)==null?void 0:r.getPath)==null?void 0:s.slice(1))};function V({code:e,context:t,localState:n,rootState:i,rootSetState:o,event:r,isExpression:s=!0}){if(e.trim()==="")return;const l=Je(e.trim());if(l)return ge({...i,...n},l);const d={code:_e(e,{isExpression:s}),builder:Ue(),context:t,event:r,rootSetState:o,rootState:i,localState:n};try{return qe(d)}catch(c){f.logger.error("Failed code evaluation: "+c.message,{code:e});return}}function Ge(e,t){var n;return{...(n=e.component)==null?void 0:n.options,...e.options,...Ye(e,t)}}const Ye=(e,t)=>{var n,i;if(((n=e.component)==null?void 0:n.name)==="Text"&&((i=e.component.options)!=null&&i.text)&&typeof e.component.options.text=="string")return{...e.component.options,text:e.component.options.text.replace(/{{([^}]+)}}/g,(o,r)=>V({code:r,context:t,localState:t.localState,rootState:t.rootState,rootSetState:t.rootSetState}))}};function Qe(e,...t){const n=Object.assign({},e);for(const i of t)delete n[i];return n}function L(e,t,n=null,i=null,o=new WeakSet){if(e==null||typeof e!="object"){t(e,r=>{n!==null&&i!==null&&(n[i]=r)});return}o.has(e)||(o.add(e),Array.isArray(e)?e.forEach((r,s)=>{t(r,d=>{e[s]=d}),L(r,t,e,s,o)}):Object.entries(e).forEach(([r,s])=>{t(s,d=>{e[r]=d}),L(s,t,e,r,o)}))}function be(e){return e&&typeof e=="object"&&e["@type"]==="@builder.io/core:LocalizedValue"}function Xe(e){if(!e||!Object.getOwnPropertyNames(e).length)return!1;let t=!1;return L(e,n=>{if(be(n)){t=!0;return}}),t}function Ze(e,t){return!e||!Object.getOwnPropertyNames(e).length?{}:(L(e,(n,i)=>{var o;be(n)&&i((o=n[t])!=null?o:void 0)}),e)}function et(e,t){var n,i;return(n=e.component)!=null&&n.options&&Xe((i=e.component)==null?void 0:i.options)&&(t||console.warn("[Builder.io] In order to use localized fields in Builder, you must pass a locale prop to the BuilderComponent or to options object while fetching the content to resolve localized fields. Learn more: https://www.builder.io/c/docs/localization-inline#targeting-and-inline-localization"),e.component.options=Ze(e.component.options,t!=null?t:"Default")),e}const X=e=>JSON.parse(JSON.stringify(e)),pe=(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};function G(e){if(e===null||typeof e!="object")return e;if(Array.isArray(e))return e.map(n=>G(n));if(e["@type"]==="@builder.io/sdk:Element")return e;const t={};for(const n in e)n!=="meta"&&Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=G(e[n]));return t}const tt=["svelte","vue","angular","qwik","solid"].includes(f.TARGET),nt=e=>{if(tt){const t=X(e);return{...t,properties:{...t.properties},actions:{...t.actions}}}else{const t=G(Qe(e,"children","meta"));return{...t,properties:{...t.properties},actions:{...t.actions},children:e.children,meta:e.meta}}},it=({block:e,context:t,localState:n,rootState:i,rootSetState:o})=>{if(!e.bindings)return e;const r=nt(e);for(const s in e.bindings){const l=e.bindings[s],d=V({code:l,localState:n,rootState:i,rootSetState:o,context:t});pe(r,s,d)}return r};function ot({block:e,context:t,localState:n,rootState:i,rootSetState:o}){let r=et(e,i.locale);return r=r,it({block:r,localState:n,rootState:i,rootSetState:o,context:t})}const _=e=>e?e.replace(/([a-z0-9]|(?=[A-Z]))([A-Z])/g,"$1-$2").toLowerCase():"";function at(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 b=t-(c-l);return i=this,o=arguments,b<=0||b>t?(s&&(clearTimeout(s),s=null),l=c,r=e.apply(i,o),s||(i=o=null)):!s&&n.trailing!==!1&&(s=setTimeout(d,b)),r}}function N(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}function rt(e){for(const t of e)switch(t.trigger){case"pageLoad":ve(t);break;case"scrollInView":lt(t);break}}function xe(e){console.warn(`Cannot animate element: element with ID ${e} not found!`)}function ye(e,t){const n=st(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 st(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 ve(e){const t=Array.prototype.slice.call(document.getElementsByClassName(e.elementId||e.id||""));if(!t.length){xe(e.elementId||e.id||"");return}Array.from(t).forEach(n=>{ye(e,n),n.style.transition="none",n.style.transitionDelay="0",N(n.style,e.steps[0].styles),setTimeout(()=>{n.style.transition=`all ${e.duration}s ${_(e.easing)}`,e.delay&&(n.style.transitionDelay=e.delay+"s"),N(n.style,e.steps[1].styles),setTimeout(()=>{n.style.transition="",n.style.transitionDelay=""},(e.delay||0)*1e3+e.duration*1e3+100)})})}function lt(e){const t=Array.prototype.slice.call(document.getElementsByClassName(e.elementId||e.id||""));if(!t.length){xe(e.elementId||e.id||"");return}Array.from(t).forEach(n=>{ye(e,n);let i=!1,o=!1;function r(){!i&&l(n)?(i=!0,o=!0,setTimeout(()=>{N(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,N(n.style,e.steps[0].styles))}const s=at(r,200,{leading:!1});function l(b){const p=b.getBoundingClientRect(),m=window.innerHeight,g=(e.thresholdPercent||0)/100*m;return p.bottom>g&&p.top<m-g}const d=e.steps[0].styles;function c(){N(n.style,d)}c(),setTimeout(()=>{n.style.transition=`all ${e.duration}s ${_(e.easing)}`,e.delay&&(n.style.transitionDelay=e.delay+"s")}),document.addEventListener("scroll",s,{capture:!0,passive:!0}),r()})}const Se=e=>Object.entries(e).map(([n,i])=>{if(typeof i=="string")return`${_(n)}: ${i};`}).filter(f.checkIsDefined),ct=e=>Se(e).join(`
|
|
2
|
-
`),
|
|
3
|
-
${
|
|
1
|
+
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const h=require("./server-entry-c7bda8b5.cjs"),r=require("react/jsx-runtime"),p=require("react");function $e(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const i=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,i.get?i:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const Oe=$e(p),Le=new Set(["area","base","br","col","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"]),Ue=e=>typeof e=="string"&&Le.has(e.toLowerCase());function Y(e){return r.jsx(r.Fragment,{children:Ue(e.TagName)?r.jsx(r.Fragment,{children:r.jsx(e.TagName,{...e.attributes,...e.actionAttributes})}):r.jsx(r.Fragment,{children:typeof e.TagName=="string"?r.jsx(e.TagName,{...e.attributes,...e.actionAttributes,children:e.children}):r.jsx(e.TagName,{...e.attributes,...e.actionAttributes,children:e.children})})})}const W=()=>{switch(h.TARGET){case"react":case"reactNative":case"rsc":return"className";case"svelte":case"vue":case"solid":case"qwik":case"angular":return"class"}};function me(e){function t(){return{...e.attributes,[W()]:`${e.link?"":"builder-button"} ${e.attributes[W()]||""}`,...e.link?{href:e.link,target:e.openLinkInNewTab?"_blank":void 0,role:"link"}:{role:"button"}}}return r.jsx(Y,{attributes:t(),TagName:e.link?e.builderLinkComponent||"a":"button",actionAttributes:{},children:e.text})}const q=p.createContext({content:null,context:{},localState:void 0,rootSetState(){},rootState:{},apiKey:null,apiVersion:void 0,componentInfos:{},inheritedStyles:{},BlocksWrapper:"div",BlocksWrapperProps:{},nonce:"",model:""}),fe=p.createContext({registeredComponents:{}}),ge=(e,t,n)=>{const i=String.prototype.split.call(t,/[,[\].]+?/).filter(Boolean).reduce((a,o)=>a!=null?a[o]:a,e);return i===void 0||i===e?n:i},_e=({builder:e,context:t,event:n,state:i})=>Object.entries({state:i,Builder:e,builder:e,context:t,event:n}),qe=()=>({isEditing:h.isEditing(),isBrowser:h.isBrowser(),isServer:!h.isBrowser(),getUserAttributes:()=>h.getUserAttributes()}),Me=(e,{isExpression:t=!0})=>t&&!(e.includes(";")||e.includes(" return ")||e.trim().startsWith("return "))?`return (${e});`:e;function he({rootState:e,localState:t,rootSetState:n}){return new Proxy(e,{get:(i,a)=>{if(t&&a in t)return t[a];const o=i[a];return typeof o=="object"&&o!==null?he({rootState:o,localState:void 0,rootSetState:n?s=>{i[a]=s,n(i)}:void 0}):o},set:(i,a,o)=>{if(t&&a in t)throw new Error("Writing to local state is not allowed as it is read-only.");return i[a]=o,n==null||n(i),!0}})}const te=({code:e,builder:t,context:n,event:i,localState:a,rootSetState:o,rootState:s})=>{const l=_e({builder:t,context:n,event:i,state:he({rootState:s,localState:a,rootSetState:o})});return new Function(...l.map(([u])=>u),e)(...l.map(([,u])=>u))};function He(){var e;return typeof process!="undefined"&&h.checkIsDefined((e=process==null?void 0:process.versions)==null?void 0:e.node)}const ze=({shouldLogWarning:e})=>{var a;if(!He())return!1;const t=process.arch==="arm64",n=process.version.startsWith("v20"),i=(a=process.env.NODE_OPTIONS)==null?void 0:a.includes("--no-node-snapshot");return t&&n&&!i?(e&&h.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=>(h.isBrowser()||ze({shouldLogWarning:!0}),te(e)),Je=/^(return )?(\s*)?state(?<getPath>(\.\w+)+)(\s*);?$/,Ge=/(\s)*var(\s)+_virtual_index(\s)*=(\s)*state(?<getPath>(\.\w+)+)(\s*);?(\s)*return(\s)*_virtual_index(\s)*/,Qe=e=>{var t,n,i,a,o,s;return((i=(n=(t=Je.exec(e.trim()))==null?void 0:t.groups)==null?void 0:n.getPath)==null?void 0:i.slice(1))||((s=(o=(a=Ge.exec(e.trim()))==null?void 0:a.groups)==null?void 0:o.getPath)==null?void 0:s.slice(1))};function N({code:e,context:t,localState:n,rootState:i,rootSetState:a,event:o,isExpression:s=!0}){if(e.trim()==="")return;const l=Qe(e.trim());if(l)return ge({...i,...n},l);const u={code:Me(e,{isExpression:s}),builder:qe(),context:t,event:o,rootSetState:a,rootState:i,localState:n};try{return Ke(u)}catch(c){h.logger.error("Failed code evaluation: "+c.message,{code:e});return}}function Ye(e,t){var n;return{...(n=e.component)==null?void 0:n.options,...e.options,...Xe(e,t)}}const Xe=(e,t)=>{var n,i;if(((n=e.component)==null?void 0:n.name)==="Text"&&((i=e.component.options)!=null&&i.text)&&typeof e.component.options.text=="string")return{...e.component.options,text:e.component.options.text.replace(/{{([^}]+)}}/g,(a,o)=>N({code:o,context:t,localState:t.localState,rootState:t.rootState,rootSetState:t.rootSetState}))}};function Ze(e,...t){const n=Object.assign({},e);for(const i of t)delete n[i];return n}function U(e,t,n=null,i=null,a=new WeakSet){if(e==null||typeof e!="object"){t(e,o=>{n!==null&&i!==null&&(n[i]=o)});return}a.has(e)||(a.add(e),Array.isArray(e)?e.forEach((o,s)=>{t(o,u=>{e[s]=u}),U(o,t,e,s,a)}):Object.entries(e).forEach(([o,s])=>{t(s,u=>{e[o]=u}),U(s,t,e,o,a)}))}function be(e){return e&&typeof e=="object"&&e["@type"]==="@builder.io/core:LocalizedValue"}function et(e){if(!e||!Object.getOwnPropertyNames(e).length)return!1;let t=!1;return U(e,n=>{if(be(n)){t=!0;return}}),t}function tt(e,t){return!e||!Object.getOwnPropertyNames(e).length?{}:(U(e,(n,i)=>{var a;be(n)&&i((a=n[t])!=null?a:void 0)}),e)}function nt(e,t){var n,i;return(n=e.component)!=null&&n.options&&et((i=e.component)==null?void 0:i.options)&&(t||console.warn("[Builder.io] In order to use localized fields in Builder, you must pass a locale prop to the BuilderComponent or to options object while fetching the content to resolve localized fields. Learn more: https://www.builder.io/c/docs/localization-inline#targeting-and-inline-localization"),e.component.options=tt(e.component.options,t!=null?t:"Default")),e}const X=e=>JSON.parse(JSON.stringify(e)),pe=(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((a,o,s)=>Object(a[o])===a[o]?a[o]:a[o]=Math.abs(Number(i[s+1]))>>0===+i[s+1]?[]:{},e)[i[i.length-1]]=n,e};function Q(e){if(e===null||typeof e!="object")return e;if(Array.isArray(e))return e.map(n=>Q(n));if(e["@type"]==="@builder.io/sdk:Element")return e;const t={};for(const n in e)n!=="meta"&&Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=Q(e[n]));return t}const it=["svelte","vue","angular","qwik","solid"].includes(h.TARGET),at=e=>{if(it){const t=X(e);return{...t,properties:{...t.properties},actions:{...t.actions}}}else{const t=Q(Ze(e,"children","meta"));return{...t,properties:{...t.properties},actions:{...t.actions},children:e.children,meta:e.meta}}},ot=({block:e,context:t,localState:n,rootState:i,rootSetState:a})=>{if(!e.bindings)return e;const o=at(e);for(const s in e.bindings){const l=e.bindings[s],u=N({code:l,localState:n,rootState:i,rootSetState:a,context:t});pe(o,s,u)}return o};function rt({block:e,context:t,localState:n,rootState:i,rootSetState:a}){let o=nt(e,i.locale);return o=o,ot({block:o,localState:n,rootState:i,rootSetState:a,context:t})}const M=e=>e?e.replace(/([a-z0-9]|(?=[A-Z]))([A-Z])/g,"$1-$2").toLowerCase():"";function st(e,t,n={}){let i,a,o,s=null,l=0;const u=function(){l=n.leading===!1?0:Date.now(),s=null,o=e.apply(i,a),s||(i=a=null)};return function(){const c=Date.now();!l&&n.leading===!1&&(l=c);const g=t-(c-l);return i=this,a=arguments,g<=0||g>t?(s&&(clearTimeout(s),s=null),l=c,o=e.apply(i,a),s||(i=a=null)):!s&&n.trailing!==!1&&(s=setTimeout(u,g)),o}}function F(e,...t){const n=Object(e);for(let i=1;i<arguments.length;i++){const a=arguments[i];if(a!=null)for(const o in a)Object.prototype.hasOwnProperty.call(a,o)&&(n[o]=a[o])}return n}function lt(e){for(const t of e)switch(t.trigger){case"pageLoad":ve(t);break;case"scrollInView":ut(t);break}}function ye(e){console.warn(`Cannot animate element: element with ID ${e} not found!`)}function xe(e,t){const n=ct(e),i=getComputedStyle(t),a=e.steps[0].styles,o=e.steps[e.steps.length-1].styles,s=[a,o];for(const l of s)for(const u of n)u in l||(l[u]=i[u])}function ct(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 ve(e){const t=Array.prototype.slice.call(document.getElementsByClassName(e.elementId||e.id||""));if(!t.length){ye(e.elementId||e.id||"");return}Array.from(t).forEach(n=>{xe(e,n),n.style.transition="none",n.style.transitionDelay="0",F(n.style,e.steps[0].styles),setTimeout(()=>{n.style.transition=`all ${e.duration}s ${M(e.easing)}`,e.delay&&(n.style.transitionDelay=e.delay+"s"),F(n.style,e.steps[1].styles),setTimeout(()=>{n.style.transition="",n.style.transitionDelay=""},(e.delay||0)*1e3+e.duration*1e3+100)})})}function ut(e){const t=Array.prototype.slice.call(document.getElementsByClassName(e.elementId||e.id||""));if(!t.length){ye(e.elementId||e.id||"");return}Array.from(t).forEach(n=>{xe(e,n);let i=!1,a=!1;function o(){!i&&l(n)?(i=!0,a=!0,setTimeout(()=>{F(n.style,e.steps[1].styles),e.repeat||document.removeEventListener("scroll",s),setTimeout(()=>{a=!1,e.repeat||(n.style.transition="",n.style.transitionDelay="")},(e.duration+(e.delay||0))*1e3+100)})):e.repeat&&i&&!a&&!l(n)&&(i=!1,F(n.style,e.steps[0].styles))}const s=st(o,200,{leading:!1});function l(g){const y=g.getBoundingClientRect(),f=window.innerHeight,d=(e.thresholdPercent||0)/100*f;return y.bottom>d&&y.top<f-d}const u=e.steps[0].styles;function c(){F(n.style,u)}c(),setTimeout(()=>{n.style.transition=`all ${e.duration}s ${M(e.easing)}`,e.delay&&(n.style.transitionDelay=e.delay+"s")}),document.addEventListener("scroll",s,{capture:!0,passive:!0}),o()})}const Se=e=>Object.entries(e).map(([n,i])=>{if(typeof i=="string")return`${M(n)}: ${i};`}).filter(h.checkIsDefined),dt=e=>Se(e).join(`
|
|
2
|
+
`),O=({mediaQuery:e,className:t,styles:n})=>{const i=`.${t} {
|
|
3
|
+
${dt(n)}
|
|
4
4
|
}`;return e?`${e} {
|
|
5
5
|
${i}
|
|
6
|
-
}`:i};function
|
|
6
|
+
}`:i};function mt({style:e}){return e}const ft=({block:e,context:t})=>ke(mt({style:e.style||{},context:t,block:e}));function ke(e){switch(h.TARGET){case"svelte":case"vue":case"solid":case"angular":return Se(e).join(" ");case"qwik":case"reactNative":case"react":case"rsc":return e}}const Ce=(e,t)=>e?t?e.models&&e.models.length>0&&!e.models.includes(t):!1:!0,gt=({block:e,registeredComponents:t,model:n})=>{var o;const i=(o=e.component)==null?void 0:o.name;if(!i)return null;const a=t[i];if(!a||Ce(a,n)){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?`);return}else return
|
|
8
|
+
If you registered it, is the file that registered it imported by the file that needs to render it?`);return}else return a},ht=({block:e,context:t})=>{const{repeat:n,...i}=e;if(!(n!=null&&n.collection))return;const a=N({code:n.collection,localState:t.localState,rootState:t.rootState,rootSetState:t.rootSetState,context:t.context});if(!Array.isArray(a))return;const o=n.collection.split(".").pop(),s=n.itemName||(o?o+"Item":"item");return a.map((u,c)=>({context:{...t,localState:{...t.localState,$index:c,$item:u,[s]:u,[`$${s}Index`]:c}},block:i}))},bt=(e,t)=>{var n;return(n=e==null?void 0:e.shouldReceiveBuilderProps)!=null&&n.builderLinkComponent?{builderLinkComponent:t}:{}},pt=(e,t,n)=>{var i;return(i=e==null?void 0:e.shouldReceiveBuilderProps)!=null&&i.builderComponents?{builderComponents:Object.fromEntries(Object.entries(t).filter(([o,s])=>!Ce(s,n)))}:{}},yt=(e,t)=>{var n;return(n=e==null?void 0:e.shouldReceiveBuilderProps)!=null&&n.builderBlock?{builderBlock:t}:{}},xt=(e,t)=>{var n;return(n=e==null?void 0:e.shouldReceiveBuilderProps)!=null&&n.builderContext?{builderContext:t}:{}},Te={small:{min:320,default:321,max:640},medium:{min:641,default:642,max:991},large:{min:990,default:991,max:1200}},ne=(e,t=Te)=>`@media (max-width: ${t[e].max}px)`,we=({small:e,medium:t})=>{const n=X(Te);if(!e||!t)return n;const i=Math.floor(e/2);n.small={max:e,min:i,default:i+1};const a=n.small.max+1;n.medium={max:t,min:a,default:a+1};const o=n.medium.max+1;return n.large={max:2e3,min:o,default:o+1},n};function D(e){return r.jsx("style",{dangerouslySetInnerHTML:{__html:e.styles},"data-id":e.id,nonce:e.nonce})}function vt(e){function t(){const i=e.block;return h.checkIsDefined(i.hide)?!i.hide:h.checkIsDefined(i.show)?i.show:!0}function n(){var S,v,k;const i=e.block,a=i.responsiveStyles,o=e.context.content,s=we(((S=o==null?void 0:o.meta)==null?void 0:S.breakpoints)||{}),l=a==null?void 0:a.large,u=a==null?void 0:a.medium,c=a==null?void 0:a.small,g=i.id;if(!g)return"";const y=l?O({className:g,styles:l}):"",f=u?O({className:g,styles:u,mediaQuery:ne("medium",s)}):"",x=c?O({className:g,styles:c,mediaQuery:ne("small",s)}):"",d=i.animations&&i.animations.find(R=>R.trigger==="hover");let b="";if(d){const R=((k=(v=d.steps)==null?void 0:v[1])==null?void 0:k.styles)||{};b=O({className:`${g}:hover`,styles:{...R,transition:`all ${d.duration}s ${M(d.easing)}`,transitionDelay:d.delay?`${d.delay}s`:"0s"}})||""}return[y,f,x,b].join(" ")}return r.jsx(r.Fragment,{children:n()&&t()?r.jsx(r.Fragment,{children:r.jsx(D,{id:"builderio-block",styles:n(),nonce:e.context.nonce})}):null})}function St(e){return e.charAt(0).toUpperCase()+e.slice(1)}const kt=e=>`on${St(e)}`,Ct=(e,t)=>n=>N({code:e,context:t.context,localState:t.localState,rootState:t.rootState,rootSetState:t.rootSetState,event:n,isExpression:!1});function Ie(e){var i;const t={},n=(i=e.block.actions)!=null?i:{};for(const a in n){if(!n.hasOwnProperty(a))continue;const o=n[a];let s=kt(a);if(e.stripPrefix)switch(h.TARGET){case"vue":s=s.replace("v-on:","");break;case"svelte":s=s.replace("on:","");break}t[s]=Ct(o,e)}return t}function Tt({properties:e}){return e}const wt=e=>({href:e.href});function Z({block:e,context:t}){var i;const n={...wt(e),...e.properties,"builder-id":e.id,style:ft({block:e,context:t}),[W()]:[e.id,"builder-block",e.class,(i=e.properties)==null?void 0:i.class].filter(Boolean).join(" ")};return Tt({properties:n,context:t,block:e})}function It(e){return r.jsx(Y,{TagName:e.Wrapper,attributes:Z({block:e.block,context:e.context}),actionAttributes:Ie({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 Et(e){return p.useEffect(()=>{},[]),r.jsx(r.Fragment,{children:e.children})}function Rt(e){function t(){return e.includeBlockProps?{...Z({block:e.block,context:e.context}),...Ie({block:e.block,rootState:e.context.rootState,rootSetState:e.context.rootSetState,localState:e.context.localState,context:e.context.context})}:{}}return r.jsx(r.Fragment,{children:e.Wrapper.load?r.jsx(r.Fragment,{children:r.jsx(Et,{load:e.Wrapper.load,fallback:e.Wrapper.fallback,props:e.wrapperProps,attributes:t(),children:e.children})}):r.jsx(e.Wrapper,{...e.wrapperProps,attributes:t(),children:e.children})})}const Pt=({componentOptions:e,builderBlock:t,context:n,componentRef:i,includeBlockProps:a,isInteractive:o,contextValue:s})=>{const l={...e,...a?{attributes:Z({block:t,context:s})}:{}};return o?{Wrapper:i,block:t,context:n,wrapperProps:e,includeBlockProps:a}:l};function ie(e){var i;const[t,n]=p.useState(()=>e.isInteractive?Rt:e.componentRef);return r.jsx(r.Fragment,{children:e.componentRef?r.jsx(r.Fragment,{children:r.jsx(t,{...Pt({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(a=>r.jsx($,{block:a,context:e.context,registeredComponents:e.registeredComponents,linkComponent:e.linkComponent},a.id))})}):null})}function ae(e){const[t,n]=p.useState(()=>e.repeatContext);return r.jsx(q.Provider,{value:t,children:r.jsx($,{block:e.block,context:t,registeredComponents:e.registeredComponents,linkComponent:e.linkComponent})})}function $(e){var g,y,f,x;function t(){return ht({block:e.block,context:e.context})}const[n,i]=p.useState(()=>({value:null,update:!1}));function a(){var b;if(n.value&&!n.update&&!h.isPreviewing())return n.value;const d=(b=e.block.repeat)!=null&&b.collection?e.block:rt({block:e.block,localState:e.context.localState,rootState:e.context.rootState,rootSetState:e.context.rootSetState,context:e.context.context});return n.value=d,n.update=!1,d}function o(){return gt({block:a(),registeredComponents:e.registeredComponents,model:e.context.model})}function s(){var b;return e.block.tagName==="a"||((b=a().properties)==null?void 0:b.href)||a().href?e.linkComponent||"a":e.block.tagName||"div"}function l(){var S,v;if((S=e.block.repeat)!=null&&S.collection)return!!((v=t==null?void 0:t())!=null&&v.length);const d="hide"in a()?a().hide:!1;return("show"in a()?a().show:!0)&&!d}function u(){var b,S;return!((b=o==null?void 0:o())!=null&&b.component)&&!t()?(S=a().children)!=null?S:[]:[]}function c(){var d,b,S,v;return{blockChildren:(d=a().children)!=null?d:[],componentRef:(b=o==null?void 0:o())==null?void 0:b.component,componentOptions:{...Ye(a(),e.context),...yt(o(),a()),...xt(o(),e.context),...bt(o(),e.linkComponent),...pt(o(),e.registeredComponents,e.context.model)},context:e.context,linkComponent:e.linkComponent,registeredComponents:e.registeredComponents,builderBlock:a(),includeBlockProps:((S=o==null?void 0:o())==null?void 0:S.noWrap)===!0,isInteractive:!((v=o==null?void 0:o())!=null&&v.isRSC&&h.TARGET==="rsc")}}return p.useEffect(()=>{const d=a().id,b=a().animations;b&&d&<(b.map(S=>({...S,elementId:d})))},[]),p.useEffect(()=>{n.update=!0}),r.jsx(r.Fragment,{children:l()?r.jsxs(r.Fragment,{children:[r.jsx(vt,{block:a(),context:e.context}),(g=o==null?void 0:o())!=null&&g.noWrap?t()?r.jsx(r.Fragment,{children:(x=t())==null?void 0:x.map((d,b)=>r.jsx(ae,{repeatContext:d.context,block:d.block,registeredComponents:e.registeredComponents,linkComponent:e.linkComponent},b))}):r.jsx(ie,{componentRef:c().componentRef,componentOptions:c().componentOptions,blockChildren:c().blockChildren,context:c().context,registeredComponents:c().registeredComponents,linkComponent:c().linkComponent,builderBlock:c().builderBlock,includeBlockProps:c().includeBlockProps,isInteractive:c().isInteractive}):r.jsx(r.Fragment,{children:t()?r.jsx(r.Fragment,{children:(f=t())==null?void 0:f.map((d,b)=>r.jsx(ae,{repeatContext:d.context,block:d.block,registeredComponents:e.registeredComponents,linkComponent:e.linkComponent},b))}):r.jsxs(It,{Wrapper:s(),block:a(),context:e.context,children:[r.jsx(ie,{componentRef:c().componentRef,componentOptions:c().componentOptions,blockChildren:c().blockChildren,context:c().context,registeredComponents:c().registeredComponents,linkComponent:c().linkComponent,builderBlock:c().builderBlock,includeBlockProps:c().includeBlockProps,isInteractive:c().isInteractive}),(y=u())==null?void 0:y.map(d=>r.jsx($,{block:d,registeredComponents:e.registeredComponents,linkComponent:e.linkComponent,context:e.context},d.id))]})})]}):null})}function jt(e){const t=p.useRef(null);function n(){var s;return["builder-blocks",(s=e.blocks)!=null&&s.length?"":"no-blocks",e.classNameProp].filter(Boolean).join(" ")}function i(){if(!e.path)return;const s="component.options.";return e.path.startsWith(s)?e.path:`${s}${e.path||""}`}function a(){var s,l;h.isEditing()&&!((s=e.blocks)!=null&&s.length)&&((l=window.parent)==null||l.postMessage({type:"builder.clickEmptyBlocks",data:{parentElementId:e.parent,dataPath:i()}},"*"))}function o(){var s,l;h.isEditing()&&!((s=e.blocks)!=null&&s.length)&&((l=window.parent)==null||l.postMessage({type:"builder.hoverEmptyBlocks",data:{parentElementId:e.parent,dataPath:i()}},"*"))}return p.useEffect(()=>{},[]),r.jsxs(r.Fragment,{children:[r.jsx(e.BlocksWrapper,{ref:t,className:n()+" props-blocks-wrapper-2c6a6d88","builder-path":i(),"builder-parent-id":e.parent,style:e.styleProp,onClick:s=>a(),onMouseEnter:s=>o(),onKeyPress:s=>a(),...e.BlocksWrapperProps,children:e.children}),r.jsx("style",{children:`.props-blocks-wrapper-2c6a6d88 {
|
|
9
9
|
display: flex;
|
|
10
10
|
flex-direction: column;
|
|
11
11
|
align-items: stretch;
|
|
12
|
-
}`})]})}function
|
|
13
|
-
@media (max-width: ${
|
|
12
|
+
}`})]})}function B(e){var i,a,o;const t=p.useContext(q),n=p.useContext(fe);return r.jsx(jt,{blocks:e.blocks,parent:e.parent,path:e.path,styleProp:e.styleProp,classNameProp:e.className,BlocksWrapper:((i=e.context)==null?void 0:i.BlocksWrapper)||(t==null?void 0:t.BlocksWrapper),BlocksWrapperProps:((a=e.context)==null?void 0:a.BlocksWrapperProps)||(t==null?void 0:t.BlocksWrapperProps),children:e.blocks?r.jsx(r.Fragment,{children:(o=e.blocks)==null?void 0:o.map(s=>r.jsx($,{block:s,linkComponent:e.linkComponent,context:e.context||t,registeredComponents:e.registeredComponents||(n==null?void 0:n.registeredComponents)},s.id))}):null})}const Vt=e=>`builder-columns ${e}-breakpoints`;function Ee(e){var b,S;function t(){return typeof e.space=="number"?e.space||0:20}function n(){return e.columns||[]}function i(){return e.stackColumnsAt||"tablet"}function a(v){return v.link?e.builderLinkComponent||"a":"div"}function o(v){var k;return((k=n()[v])==null?void 0:k.width)||100/n().length}function s(v){const k=o(v),R=t()*(n().length-1)*(k/100);return`calc(${k}% - ${R}px)`}function l({stackedStyle:v,desktopStyle:k}){return i()==="tablet"?v:k}function u({stackedStyle:v,desktopStyle:k}){return i()==="never"?k:v}function c(){return e.stackColumnsAt==="never"?"row":e.reverseColumnsWhenStacked?"column-reverse":"column"}function g(){return{"--flex-dir":c(),"--flex-dir-tablet":l({stackedStyle:c(),desktopStyle:"row"})}}function y(v){const k=v===0?0:t(),R=s(v),V=`${k}px`,w="100%",C=0;return{...{display:"flex",flexDirection:"column",alignItems:"stretch"},width:R,["marginLeft"]:V,"--column-width-mobile":u({stackedStyle:w,desktopStyle:R}),"--column-margin-left-mobile":u({stackedStyle:C,desktopStyle:V}),"--column-width-tablet":l({stackedStyle:w,desktopStyle:R}),"--column-margin-left-tablet":l({stackedStyle:C,desktopStyle:V})}}function f(v){var R,V;return we(((V=(R=e.builderContext.content)==null?void 0:R.meta)==null?void 0:V.breakpoints)||{})[v].max}function x(){const v=`.${e.builderBlock.id}-breakpoints > .builder-column`;return`
|
|
13
|
+
@media (max-width: ${f("medium")}px) {
|
|
14
14
|
.${e.builderBlock.id}-breakpoints {
|
|
15
15
|
flex-direction: var(--flex-dir-tablet);
|
|
16
16
|
align-items: stretch;
|
|
17
17
|
}
|
|
18
18
|
|
|
19
|
-
${
|
|
19
|
+
${v} {
|
|
20
20
|
width: var(--column-width-tablet) !important;
|
|
21
21
|
margin-left: var(--column-margin-left-tablet) !important;
|
|
22
22
|
}
|
|
23
23
|
}
|
|
24
24
|
|
|
25
|
-
@media (max-width: ${
|
|
25
|
+
@media (max-width: ${f("small")}px) {
|
|
26
26
|
.${e.builderBlock.id}-breakpoints {
|
|
27
27
|
flex-direction: var(--flex-dir);
|
|
28
28
|
align-items: stretch;
|
|
29
29
|
}
|
|
30
30
|
|
|
31
|
-
${
|
|
31
|
+
${v} {
|
|
32
32
|
width: var(--column-width-mobile) !important;
|
|
33
33
|
margin-left: var(--column-margin-left-mobile) !important;
|
|
34
34
|
}
|
|
35
35
|
},
|
|
36
|
-
`}function
|
|
36
|
+
`}function d(v,k){return{...v.link?{href:v.link}:{},[W()]:"builder-column",style:ke(y(k))}}return r.jsxs(r.Fragment,{children:[r.jsxs("div",{className:Vt((b=e.builderBlock)==null?void 0:b.id)+" div-d55bdf5c",style:g(),children:[r.jsx(D,{id:"builderio-columns",styles:x(),nonce:e.builderContext.nonce}),(S=e.columns)==null?void 0:S.map((v,k)=>r.jsx(Y,{TagName:a(v),actionAttributes:{},attributes:d(v,k),children:r.jsx(B,{path:`columns.${k}.blocks`,parent:e.builderBlock.id,styleProp:{flexGrow:"1"},context:e.builderContext,registeredComponents:e.builderComponents,linkComponent:e.builderLinkComponent,blocks:v.blocks})},k))]}),r.jsx("style",{children:`.div-d55bdf5c {
|
|
37
37
|
display: flex;
|
|
38
38
|
line-height: normal;
|
|
39
|
-
}`})]})}function Re(e){return
|
|
39
|
+
}`})]})}function Re(e){return r.jsx("span",{children:e.children})}function oe(e){return e.replace(/http(s)?:/,"")}function Bt(e="",t,n){const i=new RegExp("([?&])"+t+"=.*?(&|$)","i"),a=e.indexOf("?")!==-1?"&":"?";return e.match(i)?e.replace(i,"$1"+t+"="+encodeURIComponent(n)+"$2"):e+a+t+"="+encodeURIComponent(n)}function At(e,t){if(!e||!(e!=null&&e.match(/cdn\.shopify\.com/))||!t)return e;if(t==="master")return oe(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]),a=n[3],o=t.match("x")?t:`${t}x`;return oe(`${i[0]}_${o}${a}`)}return null}function H(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(a=>a!==i).map(a=>`${Bt(e,"width",a)} ${a}w`).concat([n]).join(", ")}return e.match(/cdn\.shopify\.com/)?t.map(n=>[At(e,`${n}x${n}`),n]).filter(([n])=>!!n).map(([n,i])=>`${n} ${i}w`).concat([e]).join(", "):e}function Pe(e){var a,o,s,l,u,c;function t(){var f;const y=e.image||e.src;if(!y||!(typeof y=="string"&&(y.match(/builder\.io/)||y.match(/cdn\.shopify\.com/))))return e.srcset;if(!e.noWebp){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"),H(y)}else if(e.image&&!e.srcset)return H(y);return H(y)}}function n(){var g;return(g=t==null?void 0:t())!=null&&g.match(/builder\.io/)&&!e.noWebp?t().replace(/\?/g,"?format=webp&"):""}function i(){const g={position:"absolute",height:"100%",width:"100%",left:"0px",top:"0px"};return e.aspectRatio?g:void 0}return p.useEffect(()=>{},[]),r.jsxs(r.Fragment,{children:[r.jsxs(r.Fragment,{children:[r.jsxs("picture",{children:[n()?r.jsx("source",{type:"image/webp",srcSet:n()}):null,r.jsx("img",{loading:e.highPriority?"eager":"lazy",fetchPriority:e.highPriority?"high":"auto",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-11a47ef4",src:e.image,srcSet:t(),sizes:e.sizes})]}),e.aspectRatio&&!((o=(a=e.builderBlock)==null?void 0:a.children)!=null&&o.length&&e.fitContent)?r.jsx("div",{className:"builder-image-sizer div-11a47ef4",style:{paddingTop:e.aspectRatio*100+"%"}}):null,(l=(s=e.builderBlock)==null?void 0:s.children)!=null&&l.length&&e.fitContent?r.jsx(r.Fragment,{children:e.children}):null,!e.fitContent&&((c=(u=e.builderBlock)==null?void 0:u.children)!=null&&c.length)?r.jsx("div",{className:"div-11a47ef4-2",children:e.children}):null]}),r.jsx("style",{children:`.img-11a47ef4 {
|
|
40
40
|
opacity: 1;
|
|
41
41
|
transition: opacity 0.2s ease-in-out;
|
|
42
|
-
}.div-
|
|
42
|
+
}.div-11a47ef4 {
|
|
43
43
|
width: 100%;
|
|
44
44
|
pointer-events: none;
|
|
45
45
|
font-size: 0;
|
|
46
|
-
}.div-
|
|
46
|
+
}.div-11a47ef4-2 {
|
|
47
47
|
display: flex;
|
|
48
48
|
flex-direction: column;
|
|
49
49
|
align-items: stretch;
|
|
@@ -52,7 +52,144 @@
|
|
|
52
52
|
left: 0;
|
|
53
53
|
width: 100%;
|
|
54
54
|
height: 100%;
|
|
55
|
-
}`})]})}function Pe(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 q={"@type":"@builder.io/sdk:Element",layerName:"Accordion item title",responsiveStyles:{large:{marginTop:"10px",position:"relative",display:"flex",alignItems:"stretch",flexDirection:"column",paddingBottom:"10px"}},children:[{"@type":"@builder.io/sdk:Element",responsiveStyles:{large:{textAlign:"left",display:"flex",flexDirection:"column"}},component:{name:"Text",options:{text:"I am an accordion title. Click me!"}}}]},z={"@type":"@builder.io/sdk:Element",layerName:"Accordion item detail",responsiveStyles:{large:{position:"relative",display:"flex",alignItems:"stretch",flexDirection:"column",marginTop:"10px",paddingBottom:"10px"}},children:[{"@type":"@builder.io/sdk:Element",responsiveStyles:{large:{paddingTop:"50px",textAlign:"left",display:"flex",flexDirection:"column",paddingBottom:"50px"}},component:{name:"Text",options:{text:"I am an accordion detail, hello!"}}}]},At={name:"Builder:Accordion",canHaveChildren:!0,image:"https://cdn.builder.io/api/v1/image/assets%2FagZ9n5CUKRfbL9t6CaJOyVSK4Es2%2Ffab6c1fd3fe542408cbdec078bca7f35",defaultStyles:{display:"flex",flexDirection:"column",alignItems:"stretch"},inputs:[{name:"items",type:"list",broadcast:!0,subFields:[{name:"title",type:"uiBlocks",hideFromUI:!0,defaultValue:[q]},{name:"detail",type:"uiBlocks",hideFromUI:!0,defaultValue:[z]}],defaultValue:[{title:[q],detail:[z]},{title:[q],detail:[z]}],showIf:e=>!e.get("useChildrenForItems")},{name:"oneAtATime",helperText:"Only allow opening one at a time (collapse all others when new item openned)",type:"boolean",defaultValue:!1},{name:"grid",helperText:"Display as a grid",type:"boolean",defaultValue:!1},{name:"gridRowWidth",helperText:"Display as a grid",type:"string",showIf:e=>e.get("grid"),defaultValue:"25%"},{name:"useChildrenForItems",type:"boolean",helperText:"Use child elements for each slide, instead of the array. Useful for dynamically repeating items",advanced:!0,defaultValue:!1,onChange:e=>{e.get("useChildrenForItems")===!0&&e.set("items",[])}}],shouldReceiveBuilderProps:{builderBlock:!0,builderContext:!0,builderComponents:!0,builderLinkComponent:!0}},re=e=>e.toString();function Ft(e){var p;const[t,n]=h.useState(()=>[]);function i(){return!!(e.grid||e.oneAtATime)}function o(){return{display:"flex",alignItems:"stretch",flexDirection:"column",...e.grid&&{flexDirection:"row",alignItems:"flex-start",flexWrap:"wrap"}}}function r(){const v={...{display:"flex",flexDirection:"column"},alignItems:"stretch",cursor:"pointer"};return Object.fromEntries(Object.entries(v).filter(([g,k])=>k!==void 0))}function s(m){return`builder-accordion-title builder-accordion-title-${t.includes(m)?"open":"closed"}`}function l(m){return`builder-accordion-detail builder-accordion-detail-${t.includes(m)?"open":"closed"}`}function d(){let m=null;if(e.grid&&t.length&&document){const g=t[0];let S=document.querySelector(`.builder-accordion-title[data-index="${g}"]`);if(m=g,S){let x=S.getBoundingClientRect();for(;S=S&&S.nextElementSibling;)if(S){if(S.classList.contains("builder-accordion-detail"))continue;const y=S.getBoundingClientRect();if(y.left>x.left){const I=parseInt(S.getAttribute("data-index")||"",10);isNaN(I)||(x=y,m=I)}else break}}}return typeof m=="number"&&(m=m+1),m}function c(){const m={order:typeof d()=="number"?d():void 0,...e.grid&&{width:"100%"}};return Object.fromEntries(Object.entries(m).filter(([v,g])=>g!==void 0))}function b(m){t.includes(m)?n(i()?[]:t.filter(v=>v!==m)):n(i()?[m]:t.concat(m))}return a.jsx("div",{className:"builder-accordion",style:o(),children:(p=e.items)==null?void 0:p.map((m,v)=>a.jsxs(a.Fragment,{children:[a.jsx("div",{className:s(v),style:{...r(),...e.grid&&{width:e.gridRowWidth,order:d()!==null?re(v):re(v+1)}},"data-index":v,onClick:g=>b(v),children:a.jsx(A,{blocks:m.title,path:`items.${v}.title`,parent:e.builderBlock.id,context:e.builderContext,registeredComponents:e.builderComponents,linkComponent:e.builderLinkComponent})}),t.includes(v)?a.jsx("div",{className:l(v),style:c(),children:a.jsx(A,{blocks:m.detail,path:`items.${v}.detail`,parent:e.builderBlock.id,context:e.builderContext,registeredComponents:e.builderComponents,linkComponent:e.builderLinkComponent})}):null]}))})}const Vt={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,shouldReceiveBuilderProps:{builderLinkComponent:!0}},Nt={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}],shouldReceiveBuilderProps:{builderBlock:!0,builderContext:!0,builderComponents:!0,builderLinkComponent:!0}},Wt={name:"Fragment",static:!0,hidden:!0,canHaveChildren:!0,noWrap:!0},ee=["jpeg","jpg","png","svg","webp","gif","jfif","pjpeg","pjp","apng","avif","tif","tiff","heif","bmp","eps","raw","cr2","nef","orf","sr2","psd","heic","dib","ai"],$t=["mp4","webm","mkv","flv","vob","ogv","ogg","drc","gif","gifv","mng","avi","mov","qt","mts","m2ts","ts","wmv","yuv","rm","rmvb","viv","asf","amv","m4p","mpeg","mpe","m2v","m4v","svi","3gp","3g2","mxf","roq","nsv","f4v","f4p","f4a","f4b"],Dt={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:ee,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 b=document.createElement("img");let p=!1;b.onload=()=>{p=!0,d(b)},b.addEventListener("error",m=>{console.warn("Image load failed",m.error),c(m.error)}),b.src=s,setTimeout(()=>{p||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:"highPriority",type:"boolean",advanced:!0,helperText:"Mark this image as high priority compared to other images on the page. This prevents lazy loading of the image and tells the browser to load this image before others on the page."},{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}],shouldReceiveBuilderProps:{builderBlock:!0}},Ot={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>"}}}]},Lt={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"}],shouldReceiveBuilderProps:{builderContext:!0,builderComponents:!0}};function Ut(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(A,{parent:(n=e.builderContext.context)==null?void 0:n.symbolId,path:`symbol.data.${e.name}`,context:e.builderContext,registeredComponents:e.builderComponents,blocks:(i=e.builderContext.rootState)==null?void 0:i[e.name]})})}const _t={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"}],shouldReceiveBuilderProps:{builderBlock:!0,builderContext:!0,builderComponents:!0,builderLinkComponent:!0}},K={"@type":"@builder.io/sdk:Element",responsiveStyles:{large:{paddingLeft:"20px",paddingRight:"20px",paddingTop:"10px",paddingBottom:"10px",minWidth:"100px",textAlign:"center",display:"flex",flexDirection:"column",cursor:"pointer",userSelect:"none"}},component:{name:"Text",options:{text:"New tab"}}},J={"@type":"@builder.io/sdk:Element",responsiveStyles:{large:{height:"200px",display:"flex",marginTop:"20px",flexDirection:"column"}},component:{name:"Text",options:{text:"New tab content "}}},Ht={name:"Builder: Tabs",inputs:[{name:"tabs",type:"list",broadcast:!0,subFields:[{name:"label",type:"uiBlocks",hideFromUI:!0,defaultValue:[K]},{name:"content",type:"uiBlocks",hideFromUI:!0,defaultValue:[J]}],defaultValue:[{label:[{...K,component:{name:"Text",options:{text:"Tab 1"}}}],content:[{...J,component:{name:"Text",options:{text:"Tab 1 content"}}}]},{label:[{...K,component:{name:"Text",options:{text:"Tab 2"}}}],content:[{...J,component:{name:"Text",options:{text:"Tab 2 content"}}}]}]},{name:"activeTabStyle",type:"uiStyle",helperText:"CSS styles for the active tab",defaultValue:{backgroundColor:"rgba(0, 0, 0, 0.1)"}},{name:"defaultActiveTab",type:"number",helperText:'Default tab to open to. Set to "1" for the first tab, "2" for the second, or choose "0" for none',defaultValue:1,advanced:!0},{name:"collapsible",type:"boolean",helperText:"If on, clicking an open tab closes it so no tabs are active",defaultValue:!1,advanced:!0},{name:"tabHeaderLayout",type:"enum",helperText:"Change the layout of the tab headers (uses justify-content)",defaultValue:"flex-start",enum:[{label:"Center",value:"center"},{label:"Space between",value:"space-between"},{label:"Space around",value:"space-around"},{label:"Left",value:"flex-start"},{label:"Right",value:"flex-end"}]}],shouldReceiveBuilderProps:{builderBlock:!0,builderContext:!0,builderComponents:!0,builderLinkComponent:!0}};function Mt(e){var r;const[t,n]=h.useState(()=>e.defaultActiveTab?e.defaultActiveTab-1:0);function i(s){return e.tabs&&e.tabs[s].content}function o(s){s===t&&e.collapsible?n(-1):n(s)}return a.jsxs("div",{children:[a.jsx("div",{className:"builder-tabs-wrap",style:{display:"flex",flexDirection:"row",justifyContent:e.tabHeaderLayout||"flex-start",overflow:"auto"},children:(r=e.tabs)==null?void 0:r.map((s,l)=>a.jsx("span",{className:`builder-tab-wrap ${t===l?"builder-tab-active":""}`,style:{...t===l?e.activeTabStyle:{}},onClick:d=>o(l),children:a.jsx(A,{parent:e.builderBlock.id,path:`tabs.${l}.label`,blocks:s.label,context:e.builderContext,registeredComponents:e.builderComponents,linkComponent:e.builderLinkComponent})},l))}),i(t)?a.jsx("div",{children:a.jsx(A,{parent:e.builderBlock.id,path:`tabs.${t}.content`,blocks:i(t),context:e.builderContext,registeredComponents:e.builderComponents,linkComponent:e.builderLinkComponent})}):null]})}const qt={shouldReceiveBuilderProps:{builderBlock:!1,builderContext:!0},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 Be(e){var t;return a.jsx("div",{className:"builder-text",dangerouslySetInnerHTML:{__html:((t=e.text)==null?void 0:t.toString())||""},style:{outline:"none"}})}const zt={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 Kt(e){const t=h.useRef(null),[n,i]=h.useState(()=>[]),[o,r]=h.useState(()=>[]);return h.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 b=document.createElement("script");b.async=!0,b.src=c.src,document.head.appendChild(b)}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(b){console.warn("`CustomCode`: Error running script:",b)}}}},[]),a.jsx("div",{ref:t,className:"builder-custom-code"+(e.replaceNodes?" replace-nodes":""),dangerouslySetInnerHTML:{__html:e.code}})}const Jt={name:"Embed",static:!0,inputs:[{name:"url",type:"url",required:!0,defaultValue:"",helperText:"e.g. enter a youtube url, google map, etc"},{name:"content",type:"html",defaultValue:'<div style="padding: 20px; text-align: center">(Choose an embed URL)<div>',hideFromUI:!0}]},Gt=["text/javascript","application/javascript","application/ecmascript"],Yt=e=>Gt.includes(e.type);function Qt(e){const t=h.useRef(null),[n,i]=h.useState(()=>[]),[o,r]=h.useState(()=>[]),[s,l]=h.useState(()=>!1);function d(){if(!t.current||!t.current.getElementsByTagName)return;const c=t.current.getElementsByTagName("script");for(let b=0;b<c.length;b++){const p=c[b];if(p.src&&!n.includes(p.src)){n.push(p.src);const m=document.createElement("script");m.async=!0,m.src=p.src,document.head.appendChild(m)}else if(Yt(p)&&!o.includes(p.innerText))try{o.push(p.innerText),new Function(p.innerText)()}catch(m){console.warn("`Embed`: Error running script:",m)}}}return h.useEffect(()=>{t.current&&!s&&(l(!0),d())},[t.current,s]),a.jsx("div",{className:"builder-embed",ref:t,dangerouslySetInnerHTML:{__html:e.content}})}const Xt={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"}}}],shouldReceiveBuilderProps:{builderBlock:!0,builderContext:!0,builderComponents:!0,builderLinkComponent:!0}},Zt=["production","qa","test","development","dev","cdn-qa","cloud","fast","cdn2","cdn-prod"],en=()=>{const e=process.env.NODE_ENV||"production";return Zt.includes(e)?e:"production"};function tn(e){var p,m;const t=h.useRef(null),[n,i]=h.useState(()=>"unsubmitted"),[o,r]=h.useState(()=>null),[s,l]=h.useState(()=>"");function d(v){var k,S;const g={...e.builderContext.rootState,...v};e.builderContext.rootSetState?(S=(k=e.builderContext).rootSetState)==null||S.call(k,g):e.builderContext.rootState=g}function c(){return f.isEditing()&&e.previewState||n}function b(v){var k;const g=e.sendWithJs||e.sendSubmissionsTo==="email";if(e.sendSubmissionsTo==="zapier")v.preventDefault();else if(g){if(!(e.action||e.sendSubmissionsTo==="email")){v.preventDefault();return}v.preventDefault();const S=v.currentTarget||v.target,x=e.customHeaders||{};let y;const I=new FormData(S),B=Array.from(S.querySelectorAll("input,select,textarea")).filter(u=>!!u.name).map(u=>{let C;const j=u.name;if(u instanceof HTMLInputElement)if(u.type==="radio"){if(u.checked)return C=u.name,{key:j,value:C}}else if(u.type==="checkbox")C=u.checked;else if(u.type==="number"||u.type==="range"){const E=u.valueAsNumber;isNaN(E)||(C=E)}else u.type==="file"?C=u.files:C=u.value;else C=u.value;return{key:j,value:C}});let T=e.contentType;if(e.sendSubmissionsTo==="email"&&(T="multipart/form-data"),Array.from(B).forEach(({value:u})=>{(u instanceof File||Array.isArray(u)&&u[0]instanceof File||u instanceof FileList)&&(T="multipart/form-data")}),T!=="application/json")y=I;else{const u={};Array.from(B).forEach(({value:C,key:j})=>{pe(u,j,C)}),y=JSON.stringify(u)}T&&T!=="multipart/form-data"&&(g&&((k=e.action)!=null&&k.includes("zapier.com"))||(x["content-type"]=T));const w=new CustomEvent("presubmit",{detail:{body:y}});if(t.current&&(t.current.dispatchEvent(w),w.defaultPrevented))return;i("sending");const R=`${en()==="dev"?"http://localhost:5000":"https://builder.io"}/api/v1/form-submit?apiKey=${e.builderContext.apiKey}&to=${btoa(e.sendSubmissionsToEmail||"")}&name=${encodeURIComponent(e.name||"")}`,P=e.sendSubmissionsTo==="email"?R:e.action;f.logFetch(P),fetch(P,{body:y,headers:x,method:e.method||"post"}).then(async u=>{let C;const j=u.headers.get("content-type");if(j&&j.indexOf("application/json")!==-1?C=await u.json():C=await u.text(),!u.ok&&e.errorMessagePath){let E=ge(C,e.errorMessagePath);E&&(typeof E!="string"&&(E=JSON.stringify(E)),l(E),d({formErrorMessage:E}))}if(r(C),i(u.ok?"success":"error"),u.ok){const E=new CustomEvent("submit:success",{detail:{res:u,body:C}});if(t.current){if(t.current.dispatchEvent(E),E.defaultPrevented)return;e.resetFormOnSubmit!==!1&&t.current.reset()}if(e.successUrl)if(t.current){const F=new CustomEvent("route",{detail:{url:e.successUrl}});t.current.dispatchEvent(F),F.defaultPrevented||(location.href=e.successUrl)}else location.href=e.successUrl}},u=>{const C=new CustomEvent("submit:error",{detail:{error:u}});t.current&&(t.current.dispatchEvent(C),C.defaultPrevented)||(r(u),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:v=>b(v),...e.attributes,children:[e.builderBlock&&e.builderBlock.children?a.jsx(a.Fragment,{children:(m=(p=e.builderBlock)==null?void 0:p.children)==null?void 0:m.map((v,g)=>a.jsx($,{block:v,context:e.builderContext,registeredComponents:e.builderComponents,linkComponent:e.builderLinkComponent},`form-block-${g}`))}):null,c()==="error"?a.jsx(A,{path:"errorMessage",blocks:e.errorMessage,context:e.builderContext}):null,c()==="sending"?a.jsx(A,{path:"sendingMessage",blocks:e.sendingMessage,context:e.builderContext}):null,c()==="error"&&o?a.jsx("pre",{className:"builder-form-error-text pre-135d4696",children:JSON.stringify(o,null,2)}):null,c()==="success"?a.jsx(A,{path:"successMessage",blocks:e.successMessage,context:e.builderContext}):null]})," ",a.jsx("style",{children:".pre-135d4696 { padding: 10px; color: red; text-align: center; }"})," "]})}const nn={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 on(e){return h.createElement("input",{...e.attributes,key:f.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 an={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 rn(e){var t;return h.createElement("select",{...e.attributes,value:e.value,key:f.isEditing()&&e.defaultValue?e.defaultValue:"default-key",defaultValue:e.defaultValue,name:e.name,required:e.required},(t=e.options)==null?void 0:t.map((n,i)=>a.jsx("option",{value:n.value,children:n.name||n.value},`${n.name}-${i}`)))}const sn={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 ln(e){return a.jsx("button",{type:"submit",...e.attributes,children:e.text})}const cn={name:"Form:TextArea",image:"https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2Ff74a2f3de58c4c3e939204e5b6b8f6c3",inputs:[{advanced:!0,name:"value",type:"string"},{name:"name",type:"string",required:!0,helperText:'Every input in a form needs a unique name describing what it gets, e.g. "email"'},{name:"defaultValue",type:"string"},{name:"placeholder",type:"string",defaultValue:"Hello there"},{name:"required",type:"boolean",defaultValue:!1}],defaultStyles:{paddingTop:"10px",paddingBottom:"10px",paddingLeft:"10px",paddingRight:"10px",borderRadius:"3px",borderWidth:"1px",borderStyle:"solid",borderColor:"#ccc"},static:!0,noWrap:!0};function dn(e){return a.jsx("textarea",{...e.attributes,placeholder:e.placeholder,name:e.name,value:e.value,defaultValue:e.defaultValue,required:e.required})}const un={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:ee,required:!0}],noWrap:!0,static:!0};function mn(e){return a.jsx("img",{style:{objectFit:e.backgroundSize||"cover",objectPosition:e.backgroundPosition||"center"},alt:e.altText,src:e.imgSrc||e.image,...e.attributes},f.isEditing()&&e.imgSrc||"default-key")}const fn={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:$t,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:ee,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}],shouldReceiveBuilderProps:{builderBlock:!0}};function Ae(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 gn=()=>[{component:Kt,...zt},{component:Qt,...Jt},{component:tn,...Xt},{component:on,...nn},{component:ln,...sn},{component:rn,...an},{component:dn,...cn},{component:mn,...un},{component:Ae,...fn}],se=()=>[{component:me,...Vt},{component:Ee,...Nt},{component:Re,...Wt},{component:je,...Dt},{component:Pe,...Ot},{component:Ut,...Lt},{component:$e,..._t},{component:Be,...qt},{component:Mt,...Ht},{component:Ft,...At},...gn()],hn=`function updateCookiesAndStyles(contentId, variants, isHydrationTarget) {
|
|
55
|
+
}`})]})}function je(e){return r.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 z={"@type":"@builder.io/sdk:Element",layerName:"Accordion item title",responsiveStyles:{large:{marginTop:"10px",position:"relative",display:"flex",alignItems:"stretch",flexDirection:"column",paddingBottom:"10px"}},children:[{"@type":"@builder.io/sdk:Element",responsiveStyles:{large:{textAlign:"left",display:"flex",flexDirection:"column"}},component:{name:"Text",options:{text:"I am an accordion title. Click me!"}}}]},K={"@type":"@builder.io/sdk:Element",layerName:"Accordion item detail",responsiveStyles:{large:{position:"relative",display:"flex",alignItems:"stretch",flexDirection:"column",marginTop:"10px",paddingBottom:"10px"}},children:[{"@type":"@builder.io/sdk:Element",responsiveStyles:{large:{paddingTop:"50px",textAlign:"left",display:"flex",flexDirection:"column",paddingBottom:"50px"}},component:{name:"Text",options:{text:"I am an accordion detail, hello!"}}}]},Nt={name:"Builder:Accordion",canHaveChildren:!0,image:"https://cdn.builder.io/api/v1/image/assets%2FagZ9n5CUKRfbL9t6CaJOyVSK4Es2%2Ffab6c1fd3fe542408cbdec078bca7f35",defaultStyles:{display:"flex",flexDirection:"column",alignItems:"stretch"},inputs:[{name:"items",type:"list",broadcast:!0,subFields:[{name:"title",type:"uiBlocks",hideFromUI:!0,defaultValue:[z]},{name:"detail",type:"uiBlocks",hideFromUI:!0,defaultValue:[K]}],defaultValue:[{title:[z],detail:[K]},{title:[z],detail:[K]}],showIf:e=>!e.get("useChildrenForItems")},{name:"oneAtATime",helperText:"Only allow opening one at a time (collapse all others when new item openned)",type:"boolean",defaultValue:!1},{name:"grid",helperText:"Display as a grid",type:"boolean",defaultValue:!1},{name:"gridRowWidth",helperText:"Display as a grid",type:"string",showIf:e=>e.get("grid"),defaultValue:"25%"},{name:"useChildrenForItems",type:"boolean",helperText:"Use child elements for each slide, instead of the array. Useful for dynamically repeating items",advanced:!0,defaultValue:!1,onChange:e=>{e.get("useChildrenForItems")===!0&&e.set("items",[])}}],shouldReceiveBuilderProps:{builderBlock:!0,builderContext:!0,builderComponents:!0,builderLinkComponent:!0}},re=e=>e.toString();function Ft(e){var y;const[t,n]=p.useState(()=>[]);function i(){return!!(e.grid||e.oneAtATime)}function a(){return{display:"flex",alignItems:"stretch",flexDirection:"column",...e.grid&&{flexDirection:"row",alignItems:"flex-start",flexWrap:"wrap"}}}function o(){const x={...{display:"flex",flexDirection:"column"},alignItems:"stretch",cursor:"pointer"};return Object.fromEntries(Object.entries(x).filter(([d,b])=>b!==void 0))}function s(f){return`builder-accordion-title builder-accordion-title-${t.includes(f)?"open":"closed"}`}function l(f){return`builder-accordion-detail builder-accordion-detail-${t.includes(f)?"open":"closed"}`}function u(){let f=null;if(e.grid&&t.length&&document){const d=t[0];let S=document.querySelector(`.builder-accordion-title[data-index="${d}"]`);if(f=d,S){let v=S.getBoundingClientRect();for(;S=S&&S.nextElementSibling;)if(S){if(S.classList.contains("builder-accordion-detail"))continue;const k=S.getBoundingClientRect();if(k.left>v.left){const R=parseInt(S.getAttribute("data-index")||"",10);isNaN(R)||(v=k,f=R)}else break}}}return typeof f=="number"&&(f=f+1),f}function c(){const f={order:typeof u()=="number"?u():void 0,...e.grid&&{width:"100%"}};return Object.fromEntries(Object.entries(f).filter(([x,d])=>d!==void 0))}function g(f){t.includes(f)?n(i()?[]:t.filter(x=>x!==f)):n(i()?[f]:t.concat(f))}return r.jsx("div",{className:"builder-accordion",style:a(),children:(y=e.items)==null?void 0:y.map((f,x)=>r.jsxs(Oe.Fragment,{children:[r.jsx("div",{className:s(x),style:{...o(),...e.grid&&{width:e.gridRowWidth,order:u()!==null?re(x):re(x+1)}},"data-index":x,onClick:d=>g(x),children:r.jsx(B,{blocks:f.title,path:`items.${x}.title`,parent:e.builderBlock.id,context:e.builderContext,registeredComponents:e.builderComponents,linkComponent:e.builderLinkComponent})}),t.includes(x)?r.jsx("div",{className:l(x),style:c(),children:r.jsx(B,{blocks:f.detail,path:`items.${x}.detail`,parent:e.builderBlock.id,context:e.builderContext,registeredComponents:e.builderComponents,linkComponent:e.builderLinkComponent})}):null]},x))})}const Wt={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,shouldReceiveBuilderProps:{builderLinkComponent:!0}},Dt={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(a=>a.get("width"))&&(n.find(o=>!o.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}],shouldReceiveBuilderProps:{builderBlock:!0,builderContext:!0,builderComponents:!0,builderLinkComponent:!0}},$t={name:"Fragment",static:!0,hidden:!0,canHaveChildren:!0,noWrap:!0},ee=["jpeg","jpg","png","svg","webp","gif","jfif","pjpeg","pjp","apng","avif","tif","tiff","heif","bmp","eps","raw","cr2","nef","orf","sr2","psd","heic","dib","ai"],Ot=["mp4","webm","mkv","flv","vob","ogv","ogg","drc","gif","gifv","mng","avi","mov","qt","mts","m2ts","ts","wmv","yuv","rm","rmvb","viv","asf","amv","m4p","mpeg","mpe","m2v","m4v","svi","3gp","3g2","mxf","roq","nsv","f4v","f4p","f4a","f4b"],Lt={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:ee,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 g=document.createElement("img");let y=!1;g.onload=()=>{y=!0,u(g)},g.addEventListener("error",f=>{console.warn("Image load failed",f.error),c(f.error)}),g.src=s,setTimeout(()=>{y||c(new Error("Image load timed out"))},l)})}function i(s){return Math.round(s*1e3)/1e3}const a=e.get("image"),o=e.get("aspectRatio");if(fetch(a).then(s=>s.blob()).then(s=>{s.type.includes("svg")&&e.set("noWebp",!0)}),a&&(!o||o===.7041))return n(a).then(s=>{const l=e.get("aspectRatio");e.get("image")===a&&(!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:"highPriority",type:"boolean",advanced:!0,helperText:"Mark this image as high priority compared to other images on the page. This prevents lazy loading of the image and tells the browser to load this image before others on the page."},{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}],shouldReceiveBuilderProps:{builderBlock:!0}},Ut={name:"PersonalizationContainer",shouldReceiveBuilderProps:{builderBlock:!0,builderContext:!0},noWrap:!0,image:"https://cdn.builder.io/api/v1/image/assets%2FYJIGb4i01jvw0SRdL5Bt%2F37229ed30d8c41dfb10b8cca1992053a",canHaveChildren:!0,inputs:[{name:"variants",defaultValue:[],behavior:"personalizationVariantList",type:"list",subFields:[{name:"name",type:"text"},{name:"query",friendlyName:"Targeting rules",type:"BuilderQuery",defaultValue:[]},{name:"startDate",type:"date"},{name:"endDate",type:"date"},{name:"blocks",type:"uiBlocks",hideFromUI:!0,defaultValue:[]}]}]};function _(e){return r.jsx("script",{dangerouslySetInnerHTML:{__html:e.scriptStr},"data-id":e.id,nonce:e.nonce||""})}function _t(e,t,n,i){function a(c){return typeof c=="string"}function o(c){return typeof c=="number"}function s(c,g){return(()=>{const f=g.property,x=g.operator;let d=g.value;if(g&&g.property==="urlPath"&&g.value&&typeof g.value=="string"&&g.value!=="/"&&g.value.endsWith("/")&&(d=g.value.slice(0,-1)),!(f&&x))return!0;if(Array.isArray(d))return x==="isNot"?d.every(S=>s(c,{property:f,operator:x,value:S})):!!d.find(S=>s(c,{property:f,operator:x,value:S}));const b=c[f];if(Array.isArray(b))return b.includes(d);switch(x){case"is":return b===d;case"isNot":return b!==d;case"contains":return(a(b)||Array.isArray(b))&&b.includes(String(d));case"startsWith":return a(b)&&b.startsWith(String(d));case"endsWith":return a(b)&&b.endsWith(String(d));case"greaterThan":return o(b)&&o(d)&&b>d;case"lessThan":return o(b)&&o(d)&&b<d;case"greaterThanOrEqualTo":return o(b)&&o(d)&&b>=d;case"lessThanOrEqualTo":return o(b)&&o(d)&&b<=d;default:return!1}})()}const l={query:t,startDate:n,endDate:i},u=e.date&&new Date(e.date)||new Date;return l.startDate&&new Date(l.startDate)>u||l.endDate&&new Date(l.endDate)<u?!1:!l.query||!l.query.length?!0:l.query.every(c=>s(e,c))}const qt=`function getPersonalizedVariant(variants, blockId, locale) {
|
|
56
|
+
if (!navigator.cookieEnabled) {
|
|
57
|
+
return;
|
|
58
|
+
}
|
|
59
|
+
function getCookie(name) {
|
|
60
|
+
const nameEQ = name + '=';
|
|
61
|
+
const ca = document.cookie.split(';');
|
|
62
|
+
for (let i = 0; i < ca.length; i++) {
|
|
63
|
+
let c = ca[i];
|
|
64
|
+
while (c.charAt(0) == ' ') c = c.substring(1, c.length);
|
|
65
|
+
if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length, c.length);
|
|
66
|
+
}
|
|
67
|
+
return null;
|
|
68
|
+
}
|
|
69
|
+
function removeVariants() {
|
|
70
|
+
variants?.forEach(function (_, index) {
|
|
71
|
+
document.querySelector('template[data-variant-id="' + blockId + '-' + index + '"]')?.remove();
|
|
72
|
+
});
|
|
73
|
+
document.querySelector('script[data-id="variants-script-' + blockId + '"]')?.remove();
|
|
74
|
+
document.querySelector('style[data-id="variants-styles-' + blockId + '"]')?.remove();
|
|
75
|
+
}
|
|
76
|
+
const attributes = JSON.parse(getCookie('builder.userAttributes') || '{}');
|
|
77
|
+
if (locale) {
|
|
78
|
+
attributes.locale = locale;
|
|
79
|
+
}
|
|
80
|
+
const winningVariantIndex = variants?.findIndex(function (variant) {
|
|
81
|
+
return filterWithCustomTargeting(attributes, variant.query, variant.startDate, variant.endDate);
|
|
82
|
+
});
|
|
83
|
+
const isDebug = location.href.includes('builder.debug=true');
|
|
84
|
+
if (isDebug) {
|
|
85
|
+
console.debug('PersonalizationContainer', {
|
|
86
|
+
attributes,
|
|
87
|
+
variants,
|
|
88
|
+
winningVariantIndex
|
|
89
|
+
});
|
|
90
|
+
}
|
|
91
|
+
if (winningVariantIndex !== -1) {
|
|
92
|
+
const winningVariant = document.querySelector('template[data-variant-id="' + blockId + '-' + winningVariantIndex + '"]');
|
|
93
|
+
if (winningVariant) {
|
|
94
|
+
const parentNode = winningVariant.parentNode;
|
|
95
|
+
if (parentNode) {
|
|
96
|
+
const newParent = parentNode.cloneNode(false);
|
|
97
|
+
newParent.appendChild(winningVariant.content.firstChild);
|
|
98
|
+
newParent.appendChild(winningVariant.content.lastChild);
|
|
99
|
+
parentNode.parentNode?.replaceChild(newParent, parentNode);
|
|
100
|
+
}
|
|
101
|
+
if (isDebug) {
|
|
102
|
+
console.debug('PersonalizationContainer', 'Winning variant Replaced:', winningVariant);
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
} else if (variants && variants.length > 0) {
|
|
106
|
+
removeVariants();
|
|
107
|
+
}
|
|
108
|
+
}`,Mt=`function filterWithCustomTargeting(userAttributes, query, startDate, endDate) {
|
|
109
|
+
function isString(val) {
|
|
110
|
+
return typeof val === 'string';
|
|
111
|
+
}
|
|
112
|
+
function isNumber(val) {
|
|
113
|
+
return typeof val === 'number';
|
|
114
|
+
}
|
|
115
|
+
function objectMatchesQuery(userattr, query) {
|
|
116
|
+
const result = (() => {
|
|
117
|
+
const property = query.property;
|
|
118
|
+
const operator = query.operator;
|
|
119
|
+
let testValue = query.value;
|
|
120
|
+
if (query && query.property === 'urlPath' && query.value && typeof query.value === 'string' && query.value !== '/' && query.value.endsWith('/')) {
|
|
121
|
+
testValue = query.value.slice(0, -1);
|
|
122
|
+
}
|
|
123
|
+
if (!(property && operator)) {
|
|
124
|
+
return true;
|
|
125
|
+
}
|
|
126
|
+
if (Array.isArray(testValue)) {
|
|
127
|
+
if (operator === 'isNot') {
|
|
128
|
+
return testValue.every(val => objectMatchesQuery(userattr, {
|
|
129
|
+
property,
|
|
130
|
+
operator,
|
|
131
|
+
value: val
|
|
132
|
+
}));
|
|
133
|
+
}
|
|
134
|
+
return !!testValue.find(val => objectMatchesQuery(userattr, {
|
|
135
|
+
property,
|
|
136
|
+
operator,
|
|
137
|
+
value: val
|
|
138
|
+
}));
|
|
139
|
+
}
|
|
140
|
+
const value = userattr[property];
|
|
141
|
+
if (Array.isArray(value)) {
|
|
142
|
+
return value.includes(testValue);
|
|
143
|
+
}
|
|
144
|
+
switch (operator) {
|
|
145
|
+
case 'is':
|
|
146
|
+
return value === testValue;
|
|
147
|
+
case 'isNot':
|
|
148
|
+
return value !== testValue;
|
|
149
|
+
case 'contains':
|
|
150
|
+
return (isString(value) || Array.isArray(value)) && value.includes(String(testValue));
|
|
151
|
+
case 'startsWith':
|
|
152
|
+
return isString(value) && value.startsWith(String(testValue));
|
|
153
|
+
case 'endsWith':
|
|
154
|
+
return isString(value) && value.endsWith(String(testValue));
|
|
155
|
+
case 'greaterThan':
|
|
156
|
+
return isNumber(value) && isNumber(testValue) && value > testValue;
|
|
157
|
+
case 'lessThan':
|
|
158
|
+
return isNumber(value) && isNumber(testValue) && value < testValue;
|
|
159
|
+
case 'greaterThanOrEqualTo':
|
|
160
|
+
return isNumber(value) && isNumber(testValue) && value >= testValue;
|
|
161
|
+
case 'lessThanOrEqualTo':
|
|
162
|
+
return isNumber(value) && isNumber(testValue) && value <= testValue;
|
|
163
|
+
default:
|
|
164
|
+
return false;
|
|
165
|
+
}
|
|
166
|
+
})();
|
|
167
|
+
return result;
|
|
168
|
+
}
|
|
169
|
+
const item = {
|
|
170
|
+
query,
|
|
171
|
+
startDate,
|
|
172
|
+
endDate
|
|
173
|
+
};
|
|
174
|
+
const now = userAttributes.date && new Date(userAttributes.date) || new Date();
|
|
175
|
+
if (item.startDate && new Date(item.startDate) > now) {
|
|
176
|
+
return false;
|
|
177
|
+
} else if (item.endDate && new Date(item.endDate) < now) {
|
|
178
|
+
return false;
|
|
179
|
+
}
|
|
180
|
+
if (!item.query || !item.query.length) {
|
|
181
|
+
return true;
|
|
182
|
+
}
|
|
183
|
+
return item.query.every(filter => {
|
|
184
|
+
return objectMatchesQuery(userAttributes, filter);
|
|
185
|
+
});
|
|
186
|
+
}`;function Ht(e,t){return!(!(e&&e.length>0)||!t||h.isBrowser())}function zt(e){const{variants:t,previewingIndex:n,isHydrated:i,filteredVariants:a,fallbackBlocks:o}=e;if(i&&h.isEditing()&&typeof n=="number"&&n<((t==null?void 0:t.length)||0)&&!(a!=null&&a.length))return{blocks:t[n].blocks,path:`component.options.variants.${n}.blocks`};const l=a==null?void 0:a[0];return l?{blocks:l.blocks,path:`component.options.variants.${t==null?void 0:t.indexOf(l)}.blocks`}:{blocks:o||[],path:void 0}}const Kt=(e,t,n)=>`
|
|
187
|
+
(function() {
|
|
188
|
+
${Mt}
|
|
189
|
+
${qt}
|
|
190
|
+
getPersonalizedVariant(${JSON.stringify(e)}, "${t}"${n?`, "${n}"`:""})
|
|
191
|
+
})();
|
|
192
|
+
`;function Jt(e){var b,S,v,k,R,V,w;const t=p.useRef(null),[n,i]=p.useState(()=>h.userAttributesService.getUserAttributes()),[a,o]=p.useState(()=>{var C,E,I;return Kt(e.variants,((C=e.builderBlock)==null?void 0:C.id)||"none",(I=(E=e.builderContext)==null?void 0:E.rootState)==null?void 0:I.locale)}),[s,l]=p.useState(()=>[]),[u,c]=p.useState(()=>{var C;return Ht(e.variants,h.getDefaultCanTrack((C=e.builderContext)==null?void 0:C.canTrack))}),[g,y]=p.useState(()=>!1);function f(){return(e.variants||[]).filter(C=>{var E,I,m,T;return _t({...(I=(E=e.builderContext)==null?void 0:E.rootState)!=null&&I.locale?{locale:(T=(m=e.builderContext)==null?void 0:m.rootState)==null?void 0:T.locale}:{},...n},C.query,C.startDate,C.endDate)})}function x(){var C;return zt({variants:e.variants,fallbackBlocks:(C=e.builderBlock)==null?void 0:C.children,isHydrated:g,filteredVariants:f(),previewingIndex:e.previewingIndex})}function d(){return(e.variants||[]).map((C,E)=>{var I;return`[data-variant-id="${(I=e.builderBlock)==null?void 0:I.id}-${E}"] { display: none; } `}).join("")}return p.useEffect(()=>{var E;y(!0);const C=h.userAttributesService.subscribeOnUserAttributesChange(I=>{i(I)});if(!(h.isEditing()||h.isPreviewing())){const I=f()[0];t.current&&(t.current.dispatchEvent(new CustomEvent("builder.variantLoaded",{detail:{variant:I||"default",content:(E=e.builderContext)==null?void 0:E.content},bubbles:!0})),new IntersectionObserver(T=>{T.forEach(j=>{var P;j.isIntersecting&&t.current&&t.current.dispatchEvent(new CustomEvent("builder.variantDisplayed",{detail:{variant:I||"default",content:(P=e.builderContext)==null?void 0:P.content},bubbles:!0}))})}).observe(t.current))}s.push(C)},[]),p.useEffect(()=>()=>{s.forEach(C=>C())},[]),r.jsxs("div",{ref:t,...e.attributes,className:`builder-personalization-container ${((b=e.attributes)==null?void 0:b.class)||""}`,children:[u?r.jsxs(r.Fragment,{children:[(S=e.variants)==null?void 0:S.map((C,E)=>{var I,m;return r.jsx("template",{"data-variant-id":`${(I=e.builderBlock)==null?void 0:I.id}-${E}`,children:r.jsx(B,{blocks:C.blocks,parent:(m=e.builderBlock)==null?void 0:m.id,path:`component.options.variants.${E}.blocks`})},E)}),r.jsx(D,{nonce:((v=e.builderContext)==null?void 0:v.nonce)||"",styles:d(),id:`variants-styles-${(k=e.builderBlock)==null?void 0:k.id}`}),r.jsx(_,{nonce:((R=e.builderContext)==null?void 0:R.nonce)||"",scriptStr:a,id:`variants-script-${(V=e.builderBlock)==null?void 0:V.id}`})]}):null,r.jsx(B,{blocks:x().blocks,parent:(w=e.builderBlock)==null?void 0:w.id,path:x().path})]})}const Gt={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>"}}}]},Qt={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"}],shouldReceiveBuilderProps:{builderContext:!0,builderComponents:!0}};function Yt(e){var t,n,i;return r.jsx("div",{style:{pointerEvents:"auto"},...!((t=e.builderContext.context)!=null&&t.symbolId)&&{"builder-slot":e.name},children:r.jsx(B,{parent:(n=e.builderContext.context)==null?void 0:n.symbolId,path:`symbol.data.${e.name}`,context:e.builderContext,registeredComponents:e.builderComponents,blocks:(i=e.builderContext.rootState)==null?void 0:i[e.name]})})}const Xt={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"}],shouldReceiveBuilderProps:{builderBlock:!0,builderContext:!0,builderComponents:!0,builderLinkComponent:!0}},J={"@type":"@builder.io/sdk:Element",responsiveStyles:{large:{paddingLeft:"20px",paddingRight:"20px",paddingTop:"10px",paddingBottom:"10px",minWidth:"100px",textAlign:"center",display:"flex",flexDirection:"column",cursor:"pointer",userSelect:"none"}},component:{name:"Text",options:{text:"New tab"}}},G={"@type":"@builder.io/sdk:Element",responsiveStyles:{large:{height:"200px",display:"flex",marginTop:"20px",flexDirection:"column"}},component:{name:"Text",options:{text:"New tab content "}}},Zt={name:"Builder: Tabs",inputs:[{name:"tabs",type:"list",broadcast:!0,subFields:[{name:"label",type:"uiBlocks",hideFromUI:!0,defaultValue:[J]},{name:"content",type:"uiBlocks",hideFromUI:!0,defaultValue:[G]}],defaultValue:[{label:[{...J,component:{name:"Text",options:{text:"Tab 1"}}}],content:[{...G,component:{name:"Text",options:{text:"Tab 1 content"}}}]},{label:[{...J,component:{name:"Text",options:{text:"Tab 2"}}}],content:[{...G,component:{name:"Text",options:{text:"Tab 2 content"}}}]}]},{name:"activeTabStyle",type:"uiStyle",helperText:"CSS styles for the active tab",defaultValue:{backgroundColor:"rgba(0, 0, 0, 0.1)"}},{name:"defaultActiveTab",type:"number",helperText:'Default tab to open to. Set to "1" for the first tab, "2" for the second, or choose "0" for none',defaultValue:1,advanced:!0},{name:"collapsible",type:"boolean",helperText:"If on, clicking an open tab closes it so no tabs are active",defaultValue:!1,advanced:!0},{name:"tabHeaderLayout",type:"enum",helperText:"Change the layout of the tab headers (uses justify-content)",defaultValue:"flex-start",enum:[{label:"Center",value:"center"},{label:"Space between",value:"space-between"},{label:"Space around",value:"space-around"},{label:"Left",value:"flex-start"},{label:"Right",value:"flex-end"}]}],shouldReceiveBuilderProps:{builderBlock:!0,builderContext:!0,builderComponents:!0,builderLinkComponent:!0}};function en(e){var o;const[t,n]=p.useState(()=>e.defaultActiveTab?e.defaultActiveTab-1:0);function i(s){return e.tabs&&e.tabs[s].content}function a(s){s===t&&e.collapsible?n(-1):n(s)}return r.jsxs("div",{children:[r.jsx("div",{className:"builder-tabs-wrap",style:{display:"flex",flexDirection:"row",justifyContent:e.tabHeaderLayout||"flex-start",overflow:"auto"},children:(o=e.tabs)==null?void 0:o.map((s,l)=>r.jsx("span",{className:`builder-tab-wrap ${t===l?"builder-tab-active":""}`,style:{...t===l?e.activeTabStyle:{}},onClick:u=>a(l),children:r.jsx(B,{parent:e.builderBlock.id,path:`tabs.${l}.label`,blocks:s.label,context:e.builderContext,registeredComponents:e.builderComponents,linkComponent:e.builderLinkComponent})},l))}),i(t)?r.jsx("div",{children:r.jsx(B,{parent:e.builderBlock.id,path:`tabs.${t}.content`,blocks:i(t),context:e.builderContext,registeredComponents:e.builderComponents,linkComponent:e.builderLinkComponent})}):null]})}const tn={shouldReceiveBuilderProps:{builderBlock:!1,builderContext:!0},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 Ve(e){var t;return r.jsx("div",{className:"builder-text",dangerouslySetInnerHTML:{__html:((t=e.text)==null?void 0:t.toString())||""},style:{outline:"none"}})}const nn={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 an(e){const t=p.useRef(null),[n,i]=p.useState(()=>[]),[a,o]=p.useState(()=>[]);return p.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 g=document.createElement("script");g.async=!0,g.src=c.src,document.head.appendChild(g)}else if(!c.type||["text/javascript","application/javascript","application/ecmascript"].includes(c.type)){if(a.includes(c.innerText))continue;try{a.push(c.innerText),new Function(c.innerText)()}catch(g){console.warn("`CustomCode`: Error running script:",g)}}}},[]),r.jsx("div",{ref:t,className:"builder-custom-code"+(e.replaceNodes?" replace-nodes":""),dangerouslySetInnerHTML:{__html:e.code}})}const on={name:"Embed",static:!0,inputs:[{name:"url",type:"url",required:!0,defaultValue:"",helperText:"e.g. enter a youtube url, google map, etc"},{name:"content",type:"html",defaultValue:'<div style="padding: 20px; text-align: center">(Choose an embed URL)<div>',hideFromUI:!0}]},rn=["text/javascript","application/javascript","application/ecmascript"],sn=e=>rn.includes(e.type);function ln(e){const t=p.useRef(null),[n,i]=p.useState(()=>[]),[a,o]=p.useState(()=>[]),[s,l]=p.useState(()=>!1);function u(){if(!t.current||!t.current.getElementsByTagName)return;const c=t.current.getElementsByTagName("script");for(let g=0;g<c.length;g++){const y=c[g];if(y.src&&!n.includes(y.src)){n.push(y.src);const f=document.createElement("script");f.async=!0,f.src=y.src,document.head.appendChild(f)}else if(sn(y)&&!a.includes(y.innerText))try{a.push(y.innerText),new Function(y.innerText)()}catch(f){console.warn("`Embed`: Error running script:",f)}}}return p.useEffect(()=>{t.current&&!s&&(l(!0),u())},[t.current,s]),r.jsx("div",{className:"builder-embed",ref:t,dangerouslySetInnerHTML:{__html:e.content}})}const cn={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"}}}],shouldReceiveBuilderProps:{builderBlock:!0,builderContext:!0,builderComponents:!0,builderLinkComponent:!0}},un=["production","qa","test","development","dev","cdn-qa","cloud","fast","cdn2","cdn-prod"],dn=()=>{const e=process.env.NODE_ENV||"production";return un.includes(e)?e:"production"};function mn(e){var y,f;const t=p.useRef(null),[n,i]=p.useState(()=>"unsubmitted"),[a,o]=p.useState(()=>null),[s,l]=p.useState(()=>"");function u(x){var b,S;const d={...e.builderContext.rootState,...x};e.builderContext.rootSetState?(S=(b=e.builderContext).rootSetState)==null||S.call(b,d):e.builderContext.rootState=d}function c(){return h.isEditing()&&e.previewState||n}function g(x){var b;const d=e.sendWithJs||e.sendSubmissionsTo==="email";if(e.sendSubmissionsTo==="zapier")x.preventDefault();else if(d){if(!(e.action||e.sendSubmissionsTo==="email")){x.preventDefault();return}x.preventDefault();const S=x.currentTarget||x.target,v=e.customHeaders||{};let k;const R=new FormData(S),V=Array.from(S.querySelectorAll("input,select,textarea")).filter(m=>!!m.name).map(m=>{let T;const j=m.name;if(m instanceof HTMLInputElement)if(m.type==="radio"){if(m.checked)return T=m.name,{key:j,value:T}}else if(m.type==="checkbox")T=m.checked;else if(m.type==="number"||m.type==="range"){const P=m.valueAsNumber;isNaN(P)||(T=P)}else m.type==="file"?T=m.files:T=m.value;else T=m.value;return{key:j,value:T}});let w=e.contentType;if(e.sendSubmissionsTo==="email"&&(w="multipart/form-data"),Array.from(V).forEach(({value:m})=>{(m instanceof File||Array.isArray(m)&&m[0]instanceof File||m instanceof FileList)&&(w="multipart/form-data")}),w!=="application/json")k=R;else{const m={};Array.from(V).forEach(({value:T,key:j})=>{pe(m,j,T)}),k=JSON.stringify(m)}w&&w!=="multipart/form-data"&&(d&&((b=e.action)!=null&&b.includes("zapier.com"))||(v["content-type"]=w));const C=new CustomEvent("presubmit",{detail:{body:k}});if(t.current&&(t.current.dispatchEvent(C),C.defaultPrevented))return;i("sending");const E=`${dn()==="dev"?"http://localhost:5000":"https://builder.io"}/api/v1/form-submit?apiKey=${e.builderContext.apiKey}&to=${btoa(e.sendSubmissionsToEmail||"")}&name=${encodeURIComponent(e.name||"")}`,I=e.sendSubmissionsTo==="email"?E:e.action;h.logFetch(I),fetch(I,{body:k,headers:v,method:e.method||"post"}).then(async m=>{let T;const j=m.headers.get("content-type");if(j&&j.indexOf("application/json")!==-1?T=await m.json():T=await m.text(),!m.ok&&e.errorMessagePath){let P=ge(T,e.errorMessagePath);P&&(typeof P!="string"&&(P=JSON.stringify(P)),l(P),u({formErrorMessage:P}))}if(o(T),i(m.ok?"success":"error"),m.ok){const P=new CustomEvent("submit:success",{detail:{res:m,body:T}});if(t.current){if(t.current.dispatchEvent(P),P.defaultPrevented)return;e.resetFormOnSubmit!==!1&&t.current.reset()}if(e.successUrl)if(t.current){const A=new CustomEvent("route",{detail:{url:e.successUrl}});t.current.dispatchEvent(A),A.defaultPrevented||(location.href=e.successUrl)}else location.href=e.successUrl}},m=>{const T=new CustomEvent("submit:error",{detail:{error:m}});t.current&&(t.current.dispatchEvent(T),T.defaultPrevented)||(o(m),i("error"))})}}return r.jsxs(r.Fragment,{children:[" ",r.jsxs("form",{validate:e.validate,ref:t,action:!e.sendWithJs&&e.action,method:e.method,name:e.name,onSubmit:x=>g(x),...e.attributes,children:[e.builderBlock&&e.builderBlock.children?r.jsx(r.Fragment,{children:(f=(y=e.builderBlock)==null?void 0:y.children)==null?void 0:f.map((x,d)=>r.jsx($,{block:x,context:e.builderContext,registeredComponents:e.builderComponents,linkComponent:e.builderLinkComponent},`form-block-${d}`))}):null,c()==="error"?r.jsx(B,{path:"errorMessage",blocks:e.errorMessage,context:e.builderContext}):null,c()==="sending"?r.jsx(B,{path:"sendingMessage",blocks:e.sendingMessage,context:e.builderContext}):null,c()==="error"&&a?r.jsx("pre",{className:"builder-form-error-text pre-3f9754fe",children:JSON.stringify(a,null,2)}):null,c()==="success"?r.jsx(B,{path:"successMessage",blocks:e.successMessage,context:e.builderContext}):null]})," ",r.jsx("style",{children:".pre-3f9754fe { padding: 10px; color: red; text-align: center; }"})," "]})}const fn={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 gn(e){return p.createElement("input",{...e.attributes,key:h.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 hn={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 bn(e){var t;return p.createElement("select",{...e.attributes,value:e.value,key:h.isEditing()&&e.defaultValue?e.defaultValue:"default-key",defaultValue:e.defaultValue,name:e.name,required:e.required},(t=e.options)==null?void 0:t.map((n,i)=>r.jsx("option",{value:n.value,children:n.name||n.value},`${n.name}-${i}`)))}const pn={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 yn(e){return r.jsx("button",{type:"submit",...e.attributes,children:e.text})}const xn={name:"Form:TextArea",image:"https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2Ff74a2f3de58c4c3e939204e5b6b8f6c3",inputs:[{advanced:!0,name:"value",type:"string"},{name:"name",type:"string",required:!0,helperText:'Every input in a form needs a unique name describing what it gets, e.g. "email"'},{name:"defaultValue",type:"string"},{name:"placeholder",type:"string",defaultValue:"Hello there"},{name:"required",type:"boolean",defaultValue:!1}],defaultStyles:{paddingTop:"10px",paddingBottom:"10px",paddingLeft:"10px",paddingRight:"10px",borderRadius:"3px",borderWidth:"1px",borderStyle:"solid",borderColor:"#ccc"},static:!0,noWrap:!0};function vn(e){return r.jsx("textarea",{...e.attributes,placeholder:e.placeholder,name:e.name,value:e.value,defaultValue:e.defaultValue,required:e.required})}const Sn={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:ee,required:!0}],noWrap:!0,static:!0};function kn(e){return r.jsx("img",{style:{objectFit:e.backgroundSize||"cover",objectPosition:e.backgroundPosition||"center"},alt:e.altText,src:e.imgSrc||e.image,...e.attributes},h.isEditing()&&e.imgSrc||"default-key")}const Cn={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:Ot,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:ee,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}],shouldReceiveBuilderProps:{builderBlock:!0}};function Be(e){var i,a,o,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 r.jsxs("div",{style:{position:"relative"},children:[r.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:r.jsx("source",{type:"video/mp4",src:e.video})}),e.aspectRatio&&!(e.fitContent&&((o=(a=e.builderBlock)==null?void 0:a.children)!=null&&o.length))?r.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?r.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?r.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 Tn=()=>[{component:an,...nn},{component:ln,...on},{component:mn,...cn},{component:gn,...fn},{component:yn,...pn},{component:bn,...hn},{component:vn,...xn},{component:kn,...Sn},{component:Be,...Cn}],se=()=>[{component:me,...Wt},{component:Ee,...Dt},{component:Re,...$t},{component:Pe,...Lt},{component:je,...Gt},{component:Yt,...Qt},{component:De,...Xt},{component:Ve,...tn},{component:Jt,...Ut},{component:en,...Zt},{component:Ft,...Nt},...Tn()],wn=`function updateCookiesAndStyles(contentId, variants, isHydrationTarget) {
|
|
56
193
|
function getAndSetVariantId() {
|
|
57
194
|
function setCookie(name, value, days) {
|
|
58
195
|
let expires = '';
|
|
@@ -108,7 +245,7 @@
|
|
|
108
245
|
}).join('');
|
|
109
246
|
styleEl.innerHTML = newStyleStr;
|
|
110
247
|
}
|
|
111
|
-
}`,
|
|
248
|
+
}`,In=`function updateVariantVisibility(variantContentId, defaultContentId, isHydrationTarget) {
|
|
112
249
|
if (!navigator.cookieEnabled) {
|
|
113
250
|
return;
|
|
114
251
|
}
|
|
@@ -142,29 +279,29 @@
|
|
|
142
279
|
thisScriptEl?.remove();
|
|
143
280
|
}
|
|
144
281
|
return;
|
|
145
|
-
}`,
|
|
146
|
-
window.${
|
|
147
|
-
window.${
|
|
148
|
-
`,
|
|
149
|
-
window.${
|
|
150
|
-
"${t}",${JSON.stringify(e)}, ${
|
|
151
|
-
)`,
|
|
152
|
-
"${t}", "${e}", ${
|
|
153
|
-
)`;function
|
|
282
|
+
}`,Ae="builderIoAbTest",Ne="builderIoRenderContent",L=e=>Object.values((e==null?void 0:e.variations)||{}).map(t=>({...t,testVariationId:t.id,id:e==null?void 0:e.id})),En=({canTrack:e,content:t})=>!(!(L(t).length>0)||!e||h.isBrowser()),Rn=e=>e==="react"||e==="reactNative",Fe=Rn(h.TARGET),Pn=()=>`
|
|
283
|
+
window.${Ae} = ${wn}
|
|
284
|
+
window.${Ne} = ${In}
|
|
285
|
+
`,jn=(e,t)=>`
|
|
286
|
+
window.${Ae}(
|
|
287
|
+
"${t}",${JSON.stringify(e)}, ${Fe}
|
|
288
|
+
)`,Vn=({contentId:e,variationId:t})=>`window.${Ne}(
|
|
289
|
+
"${t}", "${e}", ${Fe}
|
|
290
|
+
)`;function le(e){return Math.round(e*1e3)/1e3}const Bn=(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},An=e=>Bn(e,t=>{const n=t.getAttribute("builder-id")||t.id;return(n==null?void 0:n.indexOf("builder-"))===0}),ce=({event:e,target:t})=>{const n=t.getBoundingClientRect(),i=e.clientX-n.left,a=e.clientY-n.top,o=le(i/n.width),s=le(a/n.height);return{x:o,y:s}},Nn=e=>{const t=e.target,n=t&&An(t),i=(n==null?void 0:n.getAttribute("builder-id"))||(n==null?void 0:n.id);return{targetBuilderElement:i||void 0,metadata:{targetOffset:t?ce({event:e,target:t}):void 0,builderTargetOffset:n?ce({event:e,target:n}):void 0,builderElementIndex:n&&i?[].slice.call(document.getElementsByClassName(i)).indexOf(n):void 0}}},Fn=["svelte","qwik","vue"],ue=()=>Fn.includes(h.TARGET)&&(h.isEditing()||h.isPreviewing()),Wn=e=>{var o,s;const t=e.family+(e.kind&&!e.kind.includes("#")?", "+e.kind:""),n=t.split(",")[0],i=(s=e.fileUrl)!=null?s:(o=e==null?void 0:e.files)==null?void 0:o.regular;let a="";if(i&&t&&n&&(a+=`
|
|
154
291
|
@font-face {
|
|
155
292
|
font-family: "${t}";
|
|
156
293
|
src: local("${n}"), url('${i}') format('woff2');
|
|
157
294
|
font-display: fallback;
|
|
158
295
|
font-weight: 400;
|
|
159
296
|
}
|
|
160
|
-
`.trim()),e.files)for(const l in e.files){if(!(String(Number(l))===l))continue;const c=e.files[l];c&&c!==i&&(
|
|
297
|
+
`.trim()),e.files)for(const l in e.files){if(!(String(Number(l))===l))continue;const c=e.files[l];c&&c!==i&&(a+=`
|
|
161
298
|
@font-face {
|
|
162
299
|
font-family: "${t}";
|
|
163
300
|
src: url('${c}') format('woff2');
|
|
164
301
|
font-display: fallback;
|
|
165
302
|
font-weight: ${l};
|
|
166
303
|
}
|
|
167
|
-
`.trim())}return
|
|
304
|
+
`.trim())}return a},Dn=({customFonts:e})=>{var t;return((t=e==null?void 0:e.map(n=>Wn(n)))==null?void 0:t.join(" "))||""},$n=({cssCode:e,contentId:t})=>e?t?(e==null?void 0:e.replace(/&/g,`div[builder-content-id="${t}"]`))||"":e:"",On=`
|
|
168
305
|
.builder-button {
|
|
169
306
|
all: unset;
|
|
170
307
|
}
|
|
@@ -181,8 +318,8 @@ font-weight: ${l};
|
|
|
181
318
|
text-align: inherit;
|
|
182
319
|
font-family: inherit;
|
|
183
320
|
}
|
|
184
|
-
`,
|
|
185
|
-
${
|
|
186
|
-
${
|
|
187
|
-
${
|
|
188
|
-
`.trim());return
|
|
321
|
+
`,Ln=e=>e?"":On,Un=e=>`variant-${e}`;function _n(e){var k,R,V;const t=p.useRef(null);function n(w){var E,I;const C={...e.builderContextSignal.rootState,...w};e.builderContextSignal.rootSetState?(I=(E=e.builderContextSignal).rootSetState)==null||I.call(E,C):e.setBuilderContextSignal(m=>({...m,rootState:C}))}function i(w){var E,I,m,T,j;const C={...e.builderContextSignal.content,...w,data:{...(E=e.builderContextSignal.content)==null?void 0:E.data,...w==null?void 0:w.data},meta:{...(I=e.builderContextSignal.content)==null?void 0:I.meta,...w==null?void 0:w.meta,breakpoints:((m=w==null?void 0:w.meta)==null?void 0:m.breakpoints)||((j=(T=e.builderContextSignal.content)==null?void 0:T.meta)==null?void 0:j.breakpoints)}};e.setBuilderContextSignal(P=>({...P,content:C}))}function a(){return e.showContent?{}:{hidden:!0,"aria-hidden":!0}}const[o,s]=p.useState(()=>e.contentWrapper||"div");function l(w){return h.createEditorListener({model:e.model,trustedHosts:e.trustedHosts,callbacks:{configureSdk:C=>{var m;const{breakpoints:E,contentId:I}=C;!I||I!==((m=e.builderContextSignal.content)==null?void 0:m.id)||E&&i({meta:{breakpoints:E}})},animation:C=>{ve(C)},contentUpdate:C=>{i(C)}}})(w)}const[u,c]=p.useState(()=>({})),[g,y]=p.useState(()=>({})),[f,x]=p.useState(()=>!1);function d(w){var C,E;if(e.builderContextSignal.content){const I=(C=e.builderContextSignal.content)==null?void 0:C.testVariationId,m=(E=e.builderContextSignal.content)==null?void 0:E.id;h._track({apiHost:e.apiHost,type:"click",canTrack:h.getDefaultCanTrack(e.canTrack),contentId:m,apiKey:e.apiKey,variationId:I!==m?I:void 0,...Nn(w),unique:!f})}f||x(!0)}function b(){var C,E,I;const w=(I=(E=(C=e.builderContextSignal.content)==null?void 0:C.data)==null?void 0:E.httpRequests)!=null?I:{};Object.entries(w).forEach(([m,T])=>{if(!T||g[m]||u[m]&&!h.isEditing())return;g[m]=!0;const j=T.replace(/{{([^}]+)}}/g,(P,A)=>String(N({code:A,context:e.context||{},localState:void 0,rootState:e.builderContextSignal.rootState,rootSetState:e.builderContextSignal.rootSetState})));h.logFetch(j),fetch(j).then(P=>P.json()).then(P=>{n({[m]:P}),u[m]=!0}).catch(P=>{console.error("error fetching dynamic data",T,P)}).finally(()=>{g[m]=!1})})}function S(){h.isEditing()&&window.dispatchEvent(new CustomEvent("builder:component:stateChange",{detail:{state:X(e.builderContextSignal.rootState),ref:{name:e.model}}}))}const v=p.useRef(!1);return v.current||(b(),S(),v.current=!0),p.useEffect(()=>{var w,C,E;if(h.isBrowser()){if(h.isEditing()&&!e.isNestedRender&&(window.addEventListener("message",l),h.registerInsertMenu(),h.setupBrowserForEditing({...e.locale?{locale:e.locale}:{},...e.enrich?{enrich:e.enrich}:{},...e.trustedHosts?{trustedHosts:e.trustedHosts}:{}}),Object.values(e.builderContextSignal.componentInfos).forEach(m=>{var T,j;if(!e.model||!((T=m.models)!=null&&T.length)||m.models.includes(e.model)){const P=h.createRegisterComponentMessage(m);(j=window.parent)==null||j.postMessage(P,"*")}}),window.addEventListener("builder:component:stateChangeListenerActivated",S)),e.builderContextSignal.content&&h.getDefaultCanTrack(e.canTrack)){const m=(w=e.builderContextSignal.content)==null?void 0:w.testVariationId,T=(C=e.builderContextSignal.content)==null?void 0:C.id,j=e.apiKey;h._track({apiHost:e.apiHost,type:"impression",canTrack:!0,contentId:T,apiKey:j,variationId:m!==T?m:void 0})}if(h.isPreviewing()&&!h.isEditing()){const m=new URL(location.href).searchParams,T=m.get("builder.preview"),j=m.get(`builder.overrides.${T}`),P=m.get("apiKey")||m.get("builder.space");(T==="BUILDER_STUDIO"||T===e.model&&P===e.apiKey&&(!e.content||j===e.content.id))&&h.fetchOneEntry({model:e.model||"",apiKey:e.apiKey,apiVersion:e.builderContextSignal.apiVersion,...T==="BUILDER_STUDIO"&&((E=e.context)!=null&&E.symbolId)?{query:{id:e.context.symbolId}}:{}}).then(A=>{A&&i(A)})}}},[]),p.useEffect(()=>{e.content&&i(e.content)},[e.content]),p.useEffect(()=>{S()},[e.builderContextSignal.rootState]),p.useEffect(()=>{e.data&&n(e.data)},[e.data]),p.useEffect(()=>{e.locale&&n({locale:e.locale})},[e.locale]),p.useEffect(()=>()=>{h.isBrowser()&&(window.removeEventListener("message",l),window.removeEventListener("builder:component:stateChangeListenerActivated",S))},[]),r.jsx(q.Provider,{value:e.builderContextSignal,children:e.builderContextSignal.content||ue()?r.jsx(o,{ref:t,onClick:w=>d(w),"builder-content-id":(k=e.builderContextSignal.content)==null?void 0:k.id,"builder-model":e.model,className:Un(((R=e.content)==null?void 0:R.testVariationId)||((V=e.content)==null?void 0:V.id)),style:{display:!e.builderContextSignal.content&&ue()?"none":void 0},...a(),...e.contentWrapperProps,children:e.children}):null})}function qn(e){const[t,n]=p.useState(()=>`
|
|
322
|
+
${$n({cssCode:e.cssCode,contentId:e.contentId})}
|
|
323
|
+
${Dn({customFonts:e.customFonts})}
|
|
324
|
+
${Ln(e.isNestedRender)}
|
|
325
|
+
`.trim());return r.jsx(D,{id:"builderio-content",styles:t,nonce:e.nonce})}const Mn=({content:e,data:t,locale:n})=>{var o,s,l;const i={},a=((o=e==null?void 0:e.data)==null?void 0:o.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,...a,...t,...n?{locale:n}:{}}},Hn=({content:e,data:t})=>e?{...e,data:{...e==null?void 0:e.data,...t},meta:e==null?void 0:e.meta}:void 0;function de(e){var c,g,y,f,x,d,b,S,v;const[t,n]=p.useState(()=>{var k,R;return Vn({variationId:(k=e.content)==null?void 0:k.testVariationId,contentId:(R=e.content)==null?void 0:R.id})});function i(k){l(R=>({...R,rootState:k}))}const[a,o]=p.useState(()=>[...se(),...e.customComponents||[]].reduce((k,{component:R,...V})=>({...k,[V.name]:{component:R,...h.serializeIncludingFunctions(V)}}),{})),[s,l]=p.useState(()=>({content:Hn({content:e.content,data:e.data}),localState:void 0,rootState:Mn({content:e.content,data:e.data,locale:e.locale}),rootSetState:i,context:e.context||{},canTrack:e.canTrack,apiKey:e.apiKey,apiVersion:e.apiVersion,componentInfos:[...se(),...e.customComponents||[]].reduce((k,{component:R,...V})=>({...k,[V.name]:h.serializeIncludingFunctions(V)}),{}),inheritedStyles:{},BlocksWrapper:e.blocksWrapper||"div",BlocksWrapperProps:e.blocksWrapperProps||{},nonce:e.nonce||"",model:e.model||""})),u=p.useRef(!1);if(!u.current){e.apiKey||h.logger.error("No API key provided to `Content` component. This can cause issues. Please provide an API key using the `apiKey` prop.");const k=(g=(c=s.content)==null?void 0:c.data)==null?void 0:g.jsCode;k&&N({code:k,context:e.context||{},localState:void 0,rootState:s.rootState,rootSetState:R=>{Object.assign(s.rootState,R)},isExpression:!1}),u.current=!0}return r.jsx(fe.Provider,{value:{registeredComponents:a},children:r.jsxs(_n,{apiHost:e.apiHost,nonce:e.nonce,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,trustedHosts:e.trustedHosts,isNestedRender:e.isNestedRender,setBuilderContextSignal:l,children:[e.isSsrAbTest?r.jsx(_,{id:"builderio-variant-visibility",scriptStr:t,nonce:e.nonce||""}):null,r.jsx(qn,{nonce:e.nonce||"",isNestedRender:e.isNestedRender,contentId:(y=s.content)==null?void 0:y.id,cssCode:(x=(f=s.content)==null?void 0:f.data)==null?void 0:x.cssCode,customFonts:(b=(d=s.content)==null?void 0:d.data)==null?void 0:b.customFonts}),r.jsx(B,{blocks:(v=(S=s.content)==null?void 0:S.data)==null?void 0:v.blocks,context:s,registeredComponents:a,linkComponent:e.linkComponent})]})})}function We(e){var s;const[t,n]=p.useState(()=>En({canTrack:h.getDefaultCanTrack(e.canTrack),content:e.content}));function i(){var l;return jn(L(e.content).map(u=>({id:u.testVariationId,testRatio:u.testRatio})),((l=e.content)==null?void 0:l.id)||"")}function a(){return L(e.content).map(l=>`.variant-${l.testVariationId} { display: none; } `).join("")}function o(){var l;return t?{...e.content,testVariationId:(l=e.content)==null?void 0:l.id}:h.handleABTestingSync({item:e.content,canTrack:h.getDefaultCanTrack(e.canTrack)})}return p.useEffect(()=>{},[]),r.jsxs(r.Fragment,{children:[!e.isNestedRender&&h.TARGET!=="reactNative"?r.jsx(_,{id:"builderio-init-variants-fns",scriptStr:Pn(),nonce:e.nonce||""}):null,t?r.jsxs(r.Fragment,{children:[r.jsx(D,{id:"builderio-variants",styles:a(),nonce:e.nonce||""}),r.jsx(_,{id:"builderio-variants-visibility",scriptStr:i(),nonce:e.nonce||""}),(s=L(e.content))==null?void 0:s.map(l=>r.jsx(de,{apiHost:e.apiHost,isNestedRender:e.isNestedRender,nonce:e.nonce,content:l,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},l.testVariationId))]}):null,r.jsx(de,{apiHost:e.apiHost,nonce:e.nonce,isNestedRender:e.isNestedRender,content:o(),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 zn=async({builderContextValue:e,symbol:t})=>{if(t!=null&&t.model&&(e!=null&&e.apiKey))return h.fetchOneEntry({model:t.model,apiKey:e.apiKey,apiVersion:e.apiVersion,...(t==null?void 0:t.entry)&&{query:{id:t.entry}}}).catch(n=>{h.logger.error("Could not fetch symbol content: ",n)})};function De(e){var l,u,c,g;function t(){return"div"}function n(){return"div"}function i(){var y,f;return[e.attributes[W()],"builder-symbol",(y=e.symbol)!=null&&y.inline?"builder-inline-symbol":void 0,(f=e.symbol)!=null&&f.dynamic||e.dynamic?"builder-dynamic-symbol":void 0].filter(Boolean).join(" ")}const[a,o]=p.useState(()=>{var y;return(y=e.symbol)==null?void 0:y.content});function s(){a||zn({symbol:e.symbol,builderContextValue:e.builderContext}).then(y=>{y&&o(y)})}return p.useEffect(()=>{},[]),p.useEffect(()=>{s()},[e.symbol]),r.jsx("div",{...e.attributes,className:i(),children:r.jsx(We,{nonce:e.builderContext.nonce,isNestedRender:!0,apiVersion:e.builderContext.apiVersion,apiKey:e.builderContext.apiKey,context:{...e.builderContext.context,symbolId:(l=e.builderBlock)==null?void 0:l.id},customComponents:Object.values(e.builderComponents),data:{...(u=e.symbol)==null?void 0:u.data,...e.builderContext.localState,...(c=a==null?void 0:a.data)==null?void 0:c.state},canTrack:e.builderContext.canTrack,model:(g=e.symbol)==null?void 0:g.model,content:a,linkComponent:e.builderLinkComponent,blocksWrapper:t(),contentWrapper:n()})})}exports.setClientUserAttributes=h.setClientUserAttributes;exports.Blocks=B;exports.BuilderContext=q;exports.Button=me;exports.Columns=Ee;exports.Content=We;exports.Fragment=Re;exports.Image=Pe;exports.Section=je;exports.Symbol=De;exports.Text=Ve;exports.Video=Be;
|