@builder.io/sdk-react 4.0.3 → 4.0.4-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/CHANGELOG.md +944 -0
- package/lib/browser/blocks-exports.cjs +6 -6
- package/lib/browser/blocks-exports.mjs +17 -9
- package/lib/edge/{blocks-513223a7.js → blocks-890ac50f.js} +242 -240
- package/lib/edge/{blocks-a6ffbf92.cjs → blocks-efa04c3b.cjs} +10 -10
- package/lib/edge/blocks-exports.cjs +1 -1
- package/lib/edge/blocks-exports.mjs +1 -1
- package/lib/edge/{columns-ea0b3b30.js → columns-70b88fce.js} +1 -1
- package/lib/edge/{columns-092b6fac.cjs → columns-eb192117.cjs} +1 -1
- package/lib/edge/{content-variants-6c1e3b13.js → content-variants-6a73b6e9.js} +40 -36
- package/lib/edge/{content-variants-75ff40ca.cjs → content-variants-893bba4d.cjs} +1 -1
- package/lib/edge/{form-46e4d997.cjs → form-89839d91.cjs} +1 -1
- package/lib/edge/{form-0c0d5bf5.js → form-e6ea2320.js} +1 -1
- package/lib/edge/{image-38917f45.js → image-1729f079.js} +20 -19
- package/lib/edge/{image-590e36ae.cjs → image-a6fbd15b.cjs} +3 -3
- package/lib/edge/img-337990c2.cjs +1 -0
- package/lib/edge/{img-8bdeb666.js → img-3efcbcca.js} +3 -2
- package/lib/edge/{personalization-container-965bec51.cjs → personalization-container-576b7363.cjs} +1 -1
- package/lib/edge/{personalization-container-1307218b.js → personalization-container-c8d741e6.js} +2 -2
- package/lib/edge/{slot-516f176d.js → slot-26162c51.js} +1 -1
- package/lib/edge/{slot-3b6aa7ec.cjs → slot-ed4d2827.cjs} +1 -1
- package/lib/edge/{tabs-cec51291.cjs → tabs-7273a1e3.cjs} +1 -1
- package/lib/edge/{tabs-f0945019.js → tabs-c576cd8f.js} +1 -1
- package/lib/node/blocks-exports.cjs +6 -6
- package/lib/node/blocks-exports.mjs +17 -9
- package/package.json +4 -4
- package/types/blocks/image/image.types.d.ts +1 -0
- package/types/blocks/img/img.d.ts +1 -0
- package/lib/edge/img-e49acb58.cjs +0 -1
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
${i}
|
|
6
6
|
}`:i};function bt({style:e}){return e}const pt=({block:e,context:t})=>Ie(bt({style:e.style||{},context:t,block:e}));function Ie(e){switch(g.TARGET){case"svelte":case"vue":case"solid":case"angular":return we(e).join(" ");case"qwik":case"reactNative":case"react":case"rsc":return e}}const Ee=(e,t)=>e?t?e.models&&e.models.length>0&&!e.models.includes(t):!1:!0,yt=({block:e,registeredComponents:t,model:n})=>{var r;const i=(r=e.component)==null?void 0:r.name;if(!i)return null;const a=t[i];if(!a||Ee(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 a},xt=({block:e,context:t})=>{const{repeat:n,...i}=e;if(!(n!=null&&n.collection))return;const a=F({code:n.collection,localState:t.localState,rootState:t.rootState,rootSetState:t.rootSetState,context:t.context});if(!Array.isArray(a))return;const r=n.collection.split(".").pop(),o=n.itemName||(r?r+"Item":"item");return a.map((d,u)=>({context:{...t,localState:{...t.localState,$index:u,$item:d,[o]:d,[`$${o}Index`]:u}},block:i}))},vt=(e,t)=>{var n;return(n=e==null?void 0:e.shouldReceiveBuilderProps)!=null&&n.builderLinkComponent?{builderLinkComponent:t}:{}},St=(e,t,n)=>{var i;return(i=e==null?void 0:e.shouldReceiveBuilderProps)!=null&&i.builderComponents?{builderComponents:Object.fromEntries(Object.entries(t).filter(([r,o])=>!Ee(o,n)))}:{}},kt=(e,t)=>{var n;return(n=e==null?void 0:e.shouldReceiveBuilderProps)!=null&&n.builderBlock?{builderBlock:t}:{}},Ct=(e,t)=>{var n;return(n=e==null?void 0:e.shouldReceiveBuilderProps)!=null&&n.builderContext?{builderContext:t}:{}},Re={xsmall:{min:0,default:160,max:320},small:{min:321,default:321,max:640},medium:{min:641,default:642,max:991},large:{min:990,default:991,max:1200}},J=(e,t=Re)=>`@media (max-width: ${t[e].max}px)`,Pe=e=>{const t=ne(Re);if(!e)return t;const{xsmall:n,small:i,medium:a}=e;if(n){const d=Math.floor(n/2);t.xsmall={max:n,min:d,default:d+1}}if(!i||!a)return t;const r=n?t.xsmall.max+1:Math.floor(i/2);t.small={max:i,min:r,default:r+1};const o=t.small.max+1;t.medium={max:a,min:o,default:o+1};const l=t.medium.max+1;return t.large={max:2e3,min:l,default:l+1},t};function O(e){return s.jsx("style",{dangerouslySetInnerHTML:{__html:e.styles},"data-id":e.id,nonce:e.nonce})}function Tt(e){function t(){const i=e.block;return g.checkIsDefined(i.hide)?!i.hide:g.checkIsDefined(i.show)?i.show:!0}function n(){var w,P,E,k,m;const i=e.block,a=i.responsiveStyles,r=e.context.content,o=Pe(((w=r==null?void 0:r.meta)==null?void 0:w.breakpoints)||{}),l=!!((E=(P=r==null?void 0:r.meta)==null?void 0:P.breakpoints)!=null&&E.xsmall),d=a==null?void 0:a.large,u=a==null?void 0:a.medium,h=a==null?void 0:a.small,p=a==null?void 0:a.xsmall,c=i.id;if(!c)return"";const S=d?W({className:c,styles:d}):"",f=u?W({className:c,styles:u,mediaQuery:J("medium",o)}):"",y=h?W({className:c,styles:h,mediaQuery:J("small",o)}):"",C=p&&l?W({className:c,styles:p,mediaQuery:J("xsmall",o)}):"",x=i.animations&&i.animations.find(v=>v.trigger==="hover");let T="";if(x){const v=((m=(k=x.steps)==null?void 0:k[1])==null?void 0:m.styles)||{};T=W({className:`${c}:hover`,styles:{...v,transition:`all ${x.duration}s ${H(x.easing)}`,transitionDelay:x.delay?`${x.delay}s`:"0s"}})||""}return[S,f,y,C,T].join(" ")}return s.jsx(s.Fragment,{children:n()&&t()?s.jsx(s.Fragment,{children:s.jsx(O,{id:"builderio-block",styles:n(),nonce:e.context.nonce})}):null})}function wt(e){return e.charAt(0).toUpperCase()+e.slice(1)}const It=e=>`on${wt(e)}`,Et=(e,t)=>n=>F({code:e,context:t.context,localState:t.localState,rootState:t.rootState,rootSetState:t.rootSetState,event:n,isExpression:!1});function je(e){var i;const t={},n=(i=e.block.actions)!=null?i:{};for(const a in n){if(!n.hasOwnProperty(a))continue;const r=n[a];let o=It(a);if(e.stripPrefix)switch(g.TARGET){case"vue":o=o.replace("v-on:","");break;case"svelte":o=o.replace("on:","");break}t[o]=Et(r,e)}return t}function Rt({properties:e}){return e}const Pt=e=>({href:e.href});function ie({block:e,context:t}){var i;const n={...Pt(e),...e.properties,"builder-id":e.id,style:pt({block:e,context:t}),[$()]:[e.id,"builder-block",e.class,(i=e.properties)==null?void 0:i.class].filter(Boolean).join(" ")};return Rt({properties:n,context:t,block:e})}function jt(e){return s.jsx(te,{TagName:e.Wrapper,attributes:ie({block:e.block,context:e.context}),actionAttributes:je({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 Vt(e){return b.useEffect(()=>{},[]),s.jsx(s.Fragment,{children:e.children})}function Bt(e){function t(){return e.includeBlockProps?{...ie({block:e.block,context:e.context}),...je({block:e.block,rootState:e.context.rootState,rootSetState:e.context.rootSetState,localState:e.context.localState,context:e.context.context})}:{}}return s.jsx(s.Fragment,{children:e.Wrapper.load?s.jsx(s.Fragment,{children:s.jsx(Vt,{load:e.Wrapper.load,fallback:e.Wrapper.fallback,props:e.wrapperProps,attributes:t(),children:e.children})}):s.jsx(e.Wrapper,{...e.wrapperProps,attributes:t(),children:e.children})})}const At=({componentOptions:e,builderBlock:t,context:n,componentRef:i,includeBlockProps:a,isInteractive:r,contextValue:o})=>{const l={...e,...a?{attributes:ie({block:t,context:o})}:{}};return r?{Wrapper:i,block:t,context:n,wrapperProps:e,includeBlockProps:a}:l};function se(e){var i;const[t,n]=b.useState(()=>e.isInteractive?Bt:e.componentRef);return s.jsx(s.Fragment,{children:e.componentRef?s.jsx(s.Fragment,{children:s.jsx(t,{...At({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=>s.jsx(z,{block:a,context:e.context,registeredComponents:e.registeredComponents,linkComponent:e.linkComponent},a.id))})}):null})}function le(e){const[t,n]=b.useState(()=>e.repeatContext);return s.jsx(M.Provider,{value:t,children:s.jsx(z,{block:e.block,context:t,registeredComponents:e.registeredComponents,linkComponent:e.linkComponent})})}function z(e){var h,p,c,S;function t(){return xt({block:e.block,context:e.context})}const[n,i]=b.useState(()=>({value:null,update:!1}));function a(){var y;if(n.value&&!n.update&&!g.isPreviewing())return n.value;const f=(y=e.block.repeat)!=null&&y.collection?e.block:ut({block:e.block,localState:e.context.localState,rootState:e.context.rootState,rootSetState:e.context.rootSetState,context:e.context.context});return n.value=f,n.update=!1,f}function r(){return yt({block:a(),registeredComponents:e.registeredComponents,model:e.context.model})}function o(){var y;return e.block.tagName==="a"||((y=a().properties)==null?void 0:y.href)||a().href?e.linkComponent||"a":e.block.tagName||"div"}function l(){var C,x;if((C=e.block.repeat)!=null&&C.collection)return!!((x=t==null?void 0:t())!=null&&x.length);const f="hide"in a()?a().hide:!1;return("show"in a()?a().show:!0)&&!f}function d(){var y,C;return!((y=r==null?void 0:r())!=null&&y.component)&&!t()?(C=a().children)!=null?C:[]:[]}function u(){var f,y,C,x;return{blockChildren:(f=a().children)!=null?f:[],componentRef:(y=r==null?void 0:r())==null?void 0:y.component,componentOptions:{...tt(a(),e.context),...kt(r(),a()),...Ct(r(),e.context),...vt(r(),e.linkComponent),...St(r(),e.registeredComponents,e.context.model)},context:e.context,linkComponent:e.linkComponent,registeredComponents:e.registeredComponents,builderBlock:a(),includeBlockProps:((C=r==null?void 0:r())==null?void 0:C.noWrap)===!0,isInteractive:!((x=r==null?void 0:r())!=null&&x.isRSC&&g.TARGET==="rsc")}}return b.useEffect(()=>{const f=a().id,y=a().animations;y&&f&&mt(y.map(C=>({...C,elementId:f})))},[]),b.useEffect(()=>{n.update=!0}),s.jsx(s.Fragment,{children:l()?s.jsxs(s.Fragment,{children:[s.jsx(Tt,{block:a(),context:e.context}),(h=r==null?void 0:r())!=null&&h.noWrap?t()?s.jsx(s.Fragment,{children:(S=t())==null?void 0:S.map((f,y)=>s.jsx(le,{repeatContext:f.context,block:f.block,registeredComponents:e.registeredComponents,linkComponent:e.linkComponent},y))}):s.jsx(se,{componentRef:u().componentRef,componentOptions:u().componentOptions,blockChildren:u().blockChildren,context:u().context,registeredComponents:u().registeredComponents,linkComponent:u().linkComponent,builderBlock:u().builderBlock,includeBlockProps:u().includeBlockProps,isInteractive:u().isInteractive}):s.jsx(s.Fragment,{children:t()?s.jsx(s.Fragment,{children:(c=t())==null?void 0:c.map((f,y)=>s.jsx(le,{repeatContext:f.context,block:f.block,registeredComponents:e.registeredComponents,linkComponent:e.linkComponent},y))}):s.jsxs(jt,{Wrapper:o(),block:a(),context:e.context,children:[s.jsx(se,{componentRef:u().componentRef,componentOptions:u().componentOptions,blockChildren:u().blockChildren,context:u().context,registeredComponents:u().registeredComponents,linkComponent:u().linkComponent,builderBlock:u().builderBlock,includeBlockProps:u().includeBlockProps,isInteractive:u().isInteractive}),(p=d())==null?void 0:p.map(f=>s.jsx(z,{block:f,registeredComponents:e.registeredComponents,linkComponent:e.linkComponent,context:e.context},f.id))]})})]}):null})}function Nt(e){const t=b.useRef(null);function n(){var o;return["builder-blocks",(o=e.blocks)!=null&&o.length?"":"no-blocks",e.classNameProp].filter(Boolean).join(" ")}function i(){if(!e.path)return;const o="this.",l="component.options.";return e.path.startsWith(o)?e.path.replace(o,""):e.path.startsWith(l)?e.path:`${l}${e.path||""}`}function a(){var o,l;g.isEditing()&&!((o=e.blocks)!=null&&o.length)&&((l=window.parent)==null||l.postMessage({type:"builder.clickEmptyBlocks",data:{parentElementId:e.parent,dataPath:i()}},"*"))}function r(){var o,l;g.isEditing()&&!((o=e.blocks)!=null&&o.length)&&((l=window.parent)==null||l.postMessage({type:"builder.hoverEmptyBlocks",data:{parentElementId:e.parent,dataPath:i()}},"*"))}return b.useEffect(()=>{},[]),s.jsxs(s.Fragment,{children:[s.jsx(e.BlocksWrapper,{ref:t,className:n()+" props-blocks-wrapper-
|
|
8
|
+
If you registered it, is the file that registered it imported by the file that needs to render it?`);return}else return a},xt=({block:e,context:t})=>{const{repeat:n,...i}=e;if(!(n!=null&&n.collection))return;const a=F({code:n.collection,localState:t.localState,rootState:t.rootState,rootSetState:t.rootSetState,context:t.context});if(!Array.isArray(a))return;const r=n.collection.split(".").pop(),o=n.itemName||(r?r+"Item":"item");return a.map((d,u)=>({context:{...t,localState:{...t.localState,$index:u,$item:d,[o]:d,[`$${o}Index`]:u}},block:i}))},vt=(e,t)=>{var n;return(n=e==null?void 0:e.shouldReceiveBuilderProps)!=null&&n.builderLinkComponent?{builderLinkComponent:t}:{}},St=(e,t,n)=>{var i;return(i=e==null?void 0:e.shouldReceiveBuilderProps)!=null&&i.builderComponents?{builderComponents:Object.fromEntries(Object.entries(t).filter(([r,o])=>!Ee(o,n)))}:{}},kt=(e,t)=>{var n;return(n=e==null?void 0:e.shouldReceiveBuilderProps)!=null&&n.builderBlock?{builderBlock:t}:{}},Ct=(e,t)=>{var n;return(n=e==null?void 0:e.shouldReceiveBuilderProps)!=null&&n.builderContext?{builderContext:t}:{}},Re={xsmall:{min:0,default:160,max:320},small:{min:321,default:321,max:640},medium:{min:641,default:642,max:991},large:{min:990,default:991,max:1200}},J=(e,t=Re)=>`@media (max-width: ${t[e].max}px)`,Pe=e=>{const t=ne(Re);if(!e)return t;const{xsmall:n,small:i,medium:a}=e;if(n){const d=Math.floor(n/2);t.xsmall={max:n,min:d,default:d+1}}if(!i||!a)return t;const r=n?t.xsmall.max+1:Math.floor(i/2);t.small={max:i,min:r,default:r+1};const o=t.small.max+1;t.medium={max:a,min:o,default:o+1};const l=t.medium.max+1;return t.large={max:2e3,min:l,default:l+1},t};function O(e){return s.jsx("style",{dangerouslySetInnerHTML:{__html:e.styles},"data-id":e.id,nonce:e.nonce})}function Tt(e){function t(){const i=e.block;return g.checkIsDefined(i.hide)?!i.hide:g.checkIsDefined(i.show)?i.show:!0}function n(){var w,P,E,k,m;const i=e.block,a=i.responsiveStyles,r=e.context.content,o=Pe(((w=r==null?void 0:r.meta)==null?void 0:w.breakpoints)||{}),l=!!((E=(P=r==null?void 0:r.meta)==null?void 0:P.breakpoints)!=null&&E.xsmall),d=a==null?void 0:a.large,u=a==null?void 0:a.medium,h=a==null?void 0:a.small,p=a==null?void 0:a.xsmall,c=i.id;if(!c)return"";const S=d?W({className:c,styles:d}):"",f=u?W({className:c,styles:u,mediaQuery:J("medium",o)}):"",y=h?W({className:c,styles:h,mediaQuery:J("small",o)}):"",C=p&&l?W({className:c,styles:p,mediaQuery:J("xsmall",o)}):"",x=i.animations&&i.animations.find(v=>v.trigger==="hover");let T="";if(x){const v=((m=(k=x.steps)==null?void 0:k[1])==null?void 0:m.styles)||{};T=W({className:`${c}:hover`,styles:{...v,transition:`all ${x.duration}s ${H(x.easing)}`,transitionDelay:x.delay?`${x.delay}s`:"0s"}})||""}return[S,f,y,C,T].join(" ")}return s.jsx(s.Fragment,{children:n()&&t()?s.jsx(s.Fragment,{children:s.jsx(O,{id:"builderio-block",styles:n(),nonce:e.context.nonce})}):null})}function wt(e){return e.charAt(0).toUpperCase()+e.slice(1)}const It=e=>`on${wt(e)}`,Et=(e,t)=>n=>F({code:e,context:t.context,localState:t.localState,rootState:t.rootState,rootSetState:t.rootSetState,event:n,isExpression:!1});function je(e){var i;const t={},n=(i=e.block.actions)!=null?i:{};for(const a in n){if(!n.hasOwnProperty(a))continue;const r=n[a];let o=It(a);if(e.stripPrefix)switch(g.TARGET){case"vue":o=o.replace("v-on:","");break;case"svelte":o=o.replace("on:","");break}t[o]=Et(r,e)}return t}function Rt({properties:e}){return e}const Pt=e=>({href:e.href});function ie({block:e,context:t}){var i;const n={...Pt(e),...e.properties,"builder-id":e.id,style:pt({block:e,context:t}),[$()]:[e.id,"builder-block",e.class,(i=e.properties)==null?void 0:i.class].filter(Boolean).join(" ")};return Rt({properties:n,context:t,block:e})}function jt(e){return s.jsx(te,{TagName:e.Wrapper,attributes:ie({block:e.block,context:e.context}),actionAttributes:je({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 Vt(e){return b.useEffect(()=>{},[]),s.jsx(s.Fragment,{children:e.children})}function Bt(e){function t(){return e.includeBlockProps?{...ie({block:e.block,context:e.context}),...je({block:e.block,rootState:e.context.rootState,rootSetState:e.context.rootSetState,localState:e.context.localState,context:e.context.context})}:{}}return s.jsx(s.Fragment,{children:e.Wrapper.load?s.jsx(s.Fragment,{children:s.jsx(Vt,{load:e.Wrapper.load,fallback:e.Wrapper.fallback,props:e.wrapperProps,attributes:t(),children:e.children})}):s.jsx(e.Wrapper,{...e.wrapperProps,attributes:t(),children:e.children})})}const At=({componentOptions:e,builderBlock:t,context:n,componentRef:i,includeBlockProps:a,isInteractive:r,contextValue:o})=>{const l={...e,...a?{attributes:ie({block:t,context:o})}:{}};return r?{Wrapper:i,block:t,context:n,wrapperProps:e,includeBlockProps:a}:l};function se(e){var i;const[t,n]=b.useState(()=>e.isInteractive?Bt:e.componentRef);return s.jsx(s.Fragment,{children:e.componentRef?s.jsx(s.Fragment,{children:s.jsx(t,{...At({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=>s.jsx(z,{block:a,context:e.context,registeredComponents:e.registeredComponents,linkComponent:e.linkComponent},a.id))})}):null})}function le(e){const[t,n]=b.useState(()=>e.repeatContext);return s.jsx(M.Provider,{value:t,children:s.jsx(z,{block:e.block,context:t,registeredComponents:e.registeredComponents,linkComponent:e.linkComponent})})}function z(e){var h,p,c,S;function t(){return xt({block:e.block,context:e.context})}const[n,i]=b.useState(()=>({value:null,update:!1}));function a(){var y;if(n.value&&!n.update&&!g.isPreviewing())return n.value;const f=(y=e.block.repeat)!=null&&y.collection?e.block:ut({block:e.block,localState:e.context.localState,rootState:e.context.rootState,rootSetState:e.context.rootSetState,context:e.context.context});return n.value=f,n.update=!1,f}function r(){return yt({block:a(),registeredComponents:e.registeredComponents,model:e.context.model})}function o(){var y;return e.block.tagName==="a"||((y=a().properties)==null?void 0:y.href)||a().href?e.linkComponent||"a":e.block.tagName||"div"}function l(){var C,x;if((C=e.block.repeat)!=null&&C.collection)return!!((x=t==null?void 0:t())!=null&&x.length);const f="hide"in a()?a().hide:!1;return("show"in a()?a().show:!0)&&!f}function d(){var y,C;return!((y=r==null?void 0:r())!=null&&y.component)&&!t()?(C=a().children)!=null?C:[]:[]}function u(){var f,y,C,x;return{blockChildren:(f=a().children)!=null?f:[],componentRef:(y=r==null?void 0:r())==null?void 0:y.component,componentOptions:{...tt(a(),e.context),...kt(r(),a()),...Ct(r(),e.context),...vt(r(),e.linkComponent),...St(r(),e.registeredComponents,e.context.model)},context:e.context,linkComponent:e.linkComponent,registeredComponents:e.registeredComponents,builderBlock:a(),includeBlockProps:((C=r==null?void 0:r())==null?void 0:C.noWrap)===!0,isInteractive:!((x=r==null?void 0:r())!=null&&x.isRSC&&g.TARGET==="rsc")}}return b.useEffect(()=>{const f=a().id,y=a().animations;y&&f&&mt(y.map(C=>({...C,elementId:f})))},[]),b.useEffect(()=>{n.update=!0}),s.jsx(s.Fragment,{children:l()?s.jsxs(s.Fragment,{children:[s.jsx(Tt,{block:a(),context:e.context}),(h=r==null?void 0:r())!=null&&h.noWrap?t()?s.jsx(s.Fragment,{children:(S=t())==null?void 0:S.map((f,y)=>s.jsx(le,{repeatContext:f.context,block:f.block,registeredComponents:e.registeredComponents,linkComponent:e.linkComponent},y))}):s.jsx(se,{componentRef:u().componentRef,componentOptions:u().componentOptions,blockChildren:u().blockChildren,context:u().context,registeredComponents:u().registeredComponents,linkComponent:u().linkComponent,builderBlock:u().builderBlock,includeBlockProps:u().includeBlockProps,isInteractive:u().isInteractive}):s.jsx(s.Fragment,{children:t()?s.jsx(s.Fragment,{children:(c=t())==null?void 0:c.map((f,y)=>s.jsx(le,{repeatContext:f.context,block:f.block,registeredComponents:e.registeredComponents,linkComponent:e.linkComponent},y))}):s.jsxs(jt,{Wrapper:o(),block:a(),context:e.context,children:[s.jsx(se,{componentRef:u().componentRef,componentOptions:u().componentOptions,blockChildren:u().blockChildren,context:u().context,registeredComponents:u().registeredComponents,linkComponent:u().linkComponent,builderBlock:u().builderBlock,includeBlockProps:u().includeBlockProps,isInteractive:u().isInteractive}),(p=d())==null?void 0:p.map(f=>s.jsx(z,{block:f,registeredComponents:e.registeredComponents,linkComponent:e.linkComponent,context:e.context},f.id))]})})]}):null})}function Nt(e){const t=b.useRef(null);b.useState(()=>!1);function n(){var o;return["builder-blocks",(o=e.blocks)!=null&&o.length?"":"no-blocks",e.classNameProp].filter(Boolean).join(" ")}function i(){if(!e.path)return;const o="this.",l="component.options.";return e.path.startsWith(o)?e.path.replace(o,""):e.path.startsWith(l)?e.path:`${l}${e.path||""}`}function a(){var o,l;g.isEditing()&&!((o=e.blocks)!=null&&o.length)&&((l=window.parent)==null||l.postMessage({type:"builder.clickEmptyBlocks",data:{parentElementId:e.parent,dataPath:i()}},"*"))}function r(){var o,l;g.isEditing()&&!((o=e.blocks)!=null&&o.length)&&((l=window.parent)==null||l.postMessage({type:"builder.hoverEmptyBlocks",data:{parentElementId:e.parent,dataPath:i()}},"*"))}return b.useEffect(()=>{},[]),b.useEffect(()=>{},[e.blocks]),s.jsxs(s.Fragment,{children:[s.jsx(e.BlocksWrapper,{ref:t,className:n()+" props-blocks-wrapper-14802cff","builder-path":i(),"builder-parent-id":e.parent,style:e.styleProp,onClick:o=>a(),onMouseEnter:o=>r(),onKeyPress:o=>a(),...e.BlocksWrapperProps,children:e.children}),s.jsx("style",{children:`.props-blocks-wrapper-14802cff {
|
|
9
9
|
display: flex;
|
|
10
10
|
flex-direction: column;
|
|
11
11
|
align-items: stretch;
|
|
@@ -36,14 +36,14 @@
|
|
|
36
36
|
`}function f(x,T){return{...x.link?{href:x.link}:{},[$()]:"builder-column",style:Ie(p(T))}}return s.jsxs(s.Fragment,{children:[s.jsxs("div",{className:Ft((y=e.builderBlock)==null?void 0:y.id)+" div-a6f3faac",style:h(),children:[s.jsx(O,{id:"builderio-columns",styles:S(),nonce:e.builderContext.nonce}),(C=e.columns)==null?void 0:C.map((x,T)=>s.jsx(te,{TagName:a(x),actionAttributes:{},attributes:f(x,T),children:s.jsx(A,{path:`columns.${T}.blocks`,parent:e.builderBlock.id,context:e.builderContext,registeredComponents:e.builderComponents,linkComponent:e.builderLinkComponent,blocks:x.blocks,styleProp:{flexGrow:"1"}})},T))]}),s.jsx("style",{children:`.div-a6f3faac {
|
|
37
37
|
display: flex;
|
|
38
38
|
line-height: normal;
|
|
39
|
-
}`})]})}function Be(e){return s.jsx("span",{children:e.children})}function ce(e){return e.replace(/http(s)?:/,"")}function Wt(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 Dt(e,t){if(!e||!(e!=null&&e.match(/cdn\.shopify\.com/))||!t)return e;if(t==="master")return ce(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],r=t.match("x")?t:`${t}x`;return ce(`${i[0]}_${r}${a}`)}return null}function G(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=>`${Wt(e,"width",a)} ${a}w`).concat([n]).join(", ")}return e.match(/cdn\.shopify\.com/)?t.map(n=>[Dt(e,`${n}x${n}`),n]).filter(([n])=>!!n).map(([n,i])=>`${n} ${i}w`).concat([e]).join(", "):e}function Ae(e){var a,r,o,l,d,u;function t(){var c;const p=e.image||e.src;if(!p||!(typeof p=="string"&&(p.match(/builder\.io/)||p.match(/cdn\.shopify\.com/))))return e.srcset;if(!e.noWebp){if(e.srcset&&((c=e.image)!=null&&c.includes("builder.io/api/v1/image"))){if(!e.srcset.includes(e.image.split("?")[0]))return console.debug("Removed given srcset"),G(p)}else if(e.image&&!e.srcset)return G(p);return G(p)}}function n(){var h;return(h=t==null?void 0:t())!=null&&h.match(/builder\.io/)&&!e.noWebp?t().replace(/\?/g,"?format=webp&"):""}function i(){const h={position:"absolute",height:"100%",width:"100%",left:"0px",top:"0px"};return e.aspectRatio?h:void 0}return s.jsxs(s.Fragment,{children:[s.jsxs(s.Fragment,{children:[s.jsxs("picture",{children:[n()?s.jsx("source",{type:"image/webp",srcSet:n()}):null,s.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-
|
|
39
|
+
}`})]})}function Be(e){return s.jsx("span",{children:e.children})}function ce(e){return e.replace(/http(s)?:/,"")}function Wt(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 Dt(e,t){if(!e||!(e!=null&&e.match(/cdn\.shopify\.com/))||!t)return e;if(t==="master")return ce(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],r=t.match("x")?t:`${t}x`;return ce(`${i[0]}_${r}${a}`)}return null}function G(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=>`${Wt(e,"width",a)} ${a}w`).concat([n]).join(", ")}return e.match(/cdn\.shopify\.com/)?t.map(n=>[Dt(e,`${n}x${n}`),n]).filter(([n])=>!!n).map(([n,i])=>`${n} ${i}w`).concat([e]).join(", "):e}function Ae(e){var a,r,o,l,d,u;function t(){var c;const p=e.image||e.src;if(!p||!(typeof p=="string"&&(p.match(/builder\.io/)||p.match(/cdn\.shopify\.com/))))return e.srcset;if(!e.noWebp){if(e.srcset&&((c=e.image)!=null&&c.includes("builder.io/api/v1/image"))){if(!e.srcset.includes(e.image.split("?")[0]))return console.debug("Removed given srcset"),G(p)}else if(e.image&&!e.srcset)return G(p);return G(p)}}function n(){var h;return(h=t==null?void 0:t())!=null&&h.match(/builder\.io/)&&!e.noWebp?t().replace(/\?/g,"?format=webp&"):""}function i(){const h={position:"absolute",height:"100%",width:"100%",left:"0px",top:"0px"};return e.aspectRatio?h:void 0}return s.jsxs(s.Fragment,{children:[s.jsxs(s.Fragment,{children:[s.jsxs("picture",{children:[n()?s.jsx("source",{type:"image/webp",srcSet:n()}):null,s.jsx("img",{loading:e.highPriority?"eager":"lazy",fetchPriority:e.highPriority?"high":"auto",alt:e.altText,title:e.title,role:e.altText?void 0:"presentation",style:{objectPosition:e.backgroundPosition||"center",objectFit:e.backgroundSize||"cover",...i()},className:"builder-image"+(e.className?" "+e.className:"")+" img-1aa8aba3",src:e.image,srcSet:t(),sizes:e.sizes})]}),e.aspectRatio&&!((r=(a=e.builderBlock)==null?void 0:a.children)!=null&&r.length&&e.fitContent)?s.jsx("div",{className:"builder-image-sizer div-1aa8aba3",style:{paddingTop:e.aspectRatio*100+"%"}}):null,(l=(o=e.builderBlock)==null?void 0:o.children)!=null&&l.length&&e.fitContent?s.jsx(s.Fragment,{children:e.children}):null,!e.fitContent&&((u=(d=e.builderBlock)==null?void 0:d.children)!=null&&u.length)?s.jsx("div",{className:"div-1aa8aba3-2",children:e.children}):null]}),s.jsx("style",{children:`.img-1aa8aba3 {
|
|
40
40
|
opacity: 1;
|
|
41
41
|
transition: opacity 0.2s ease-in-out;
|
|
42
|
-
}.div-
|
|
42
|
+
}.div-1aa8aba3 {
|
|
43
43
|
width: 100%;
|
|
44
44
|
pointer-events: none;
|
|
45
45
|
font-size: 0;
|
|
46
|
-
}.div-
|
|
46
|
+
}.div-1aa8aba3-2 {
|
|
47
47
|
display: flex;
|
|
48
48
|
flex-direction: column;
|
|
49
49
|
align-items: stretch;
|
|
@@ -52,7 +52,7 @@
|
|
|
52
52
|
left: 0;
|
|
53
53
|
width: 100%;
|
|
54
54
|
height: 100%;
|
|
55
|
-
}`})]})}function Ne(e){return s.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!"}}}]},Y={"@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!"}}}]},$t={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:[Y]}],defaultValue:[{title:[Q],detail:[Y]},{title:[Q],detail:[Y]}],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}},ue=e=>e.toString();function Ot(e){var p;const[t,n]=b.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 r(){const S={...{display:"flex",flexDirection:"column"},alignItems:"stretch",cursor:"pointer"};return Object.fromEntries(Object.entries(S).filter(([f,y])=>y!==void 0))}function o(c){return`builder-accordion-title builder-accordion-title-${t.includes(c)?"open":"closed"}`}function l(c){return`builder-accordion-detail builder-accordion-detail-${t.includes(c)?"open":"closed"}`}function d(){let c=null;if(e.grid&&t.length&&document){const f=t[0];let C=document.querySelector(`.builder-accordion-title[data-index="${f}"]`);if(c=f,C){let x=C.getBoundingClientRect();for(;C=C&&C.nextElementSibling;)if(C){if(C.classList.contains("builder-accordion-detail"))continue;const T=C.getBoundingClientRect();if(T.left>x.left){const w=parseInt(C.getAttribute("data-index")||"",10);isNaN(w)||(x=T,c=w)}else break}}}return typeof c=="number"&&(c=c+1),c}function u(){const c={order:typeof d()=="number"?d():void 0,...e.grid&&{width:"100%"}};return Object.fromEntries(Object.entries(c).filter(([S,f])=>f!==void 0))}function h(c){t.includes(c)?n(i()?[]:t.filter(S=>S!==c)):n(i()?[c]:t.concat(c))}return s.jsx("div",{className:"builder-accordion",style:a(),children:(p=e.items)==null?void 0:p.map((c,S)=>s.jsxs(qe.Fragment,{children:[s.jsx("div",{className:o(S),style:{...r(),...e.grid&&{width:e.gridRowWidth,order:d()!==null?ue(S):ue(S+1)}},"data-index":S,onClick:f=>h(S),children:s.jsx(A,{blocks:c.title,path:`items.${S}.title`,parent:e.builderBlock.id,context:e.builderContext,registeredComponents:e.builderComponents,linkComponent:e.builderLinkComponent})}),t.includes(S)?s.jsx("div",{className:l(S),style:u(),children:s.jsx(A,{blocks:c.detail,path:`items.${S}.detail`,parent:e.builderBlock.id,context:e.builderContext,registeredComponents:e.builderComponents,linkComponent:e.builderLinkComponent})}):null]},S))})}const Lt={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}},Ut={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(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}},_t={name:"Fragment",static:!0,hidden:!0,canHaveChildren:!0,noWrap:!0},ae=["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"],qt=["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"],Mt={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:ae,required:!0,defaultValue:"https://cdn.builder.io/api/v1/image/assets%2FYJIGb4i01jvw0SRdL5Bt%2F72c80f114dc149019051b6852a9e3b7a",onChange:e=>{e.delete("srcset"),e.delete("noWebp");function n(o,l=6e4){return new Promise((d,u)=>{const h=document.createElement("img");let p=!1;h.onload=()=>{p=!0,d(h)},h.addEventListener("error",c=>{console.warn("Image load failed",c.error),u(c.error)}),h.src=o,setTimeout(()=>{p||u(new Error("Image load timed out"))},l)})}function i(o){return Math.round(o*1e3)/1e3}const a=e.get("image"),r=e.get("aspectRatio");if(fetch(a).then(o=>o.blob()).then(o=>{o.type.includes("svg")&&e.set("noWebp",!0)}),a&&(!r||r===.7041))return n(a).then(o=>{const l=e.get("aspectRatio");e.get("image")===a&&(!l||l===.7041)&&o.width&&o.height&&(e.set("aspectRatio",i(o.height/o.width)),e.set("height",o.height),e.set("width",o.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}},Ht={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 q(e){return s.jsx("script",{dangerouslySetInnerHTML:{__html:e.scriptStr},"data-id":e.id,nonce:e.nonce||""})}function zt(e,t,n,i){function a(u){return typeof u=="string"}function r(u){return typeof u=="number"}function o(u,h){return(()=>{const c=h.property,S=h.operator;let f=h.value;if(h&&h.property==="urlPath"&&h.value&&typeof h.value=="string"&&h.value!=="/"&&h.value.endsWith("/")&&(f=h.value.slice(0,-1)),!(c&&S))return!0;if(Array.isArray(f))return S==="isNot"?f.every(C=>o(u,{property:c,operator:S,value:C})):!!f.find(C=>o(u,{property:c,operator:S,value:C}));const y=u[c];if(Array.isArray(y))return y.includes(f);switch(S){case"is":return y===f;case"isNot":return y!==f;case"contains":return(a(y)||Array.isArray(y))&&y.includes(String(f));case"startsWith":return a(y)&&y.startsWith(String(f));case"endsWith":return a(y)&&y.endsWith(String(f));case"greaterThan":return r(y)&&r(f)&&y>f;case"lessThan":return r(y)&&r(f)&&y<f;case"greaterThanOrEqualTo":return r(y)&&r(f)&&y>=f;case"lessThanOrEqualTo":return r(y)&&r(f)&&y<=f;default:return!1}})()}const l={query:t,startDate:n,endDate:i},d=e.date&&new Date(e.date)||new Date;return l.startDate&&new Date(l.startDate)>d||l.endDate&&new Date(l.endDate)<d?!1:!l.query||!l.query.length?!0:l.query.every(u=>o(e,u))}const Kt=`function getPersonalizedVariant(variants, blockId, locale) {
|
|
55
|
+
}`})]})}function Ne(e){return s.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!"}}}]},Y={"@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!"}}}]},$t={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:[Y]}],defaultValue:[{title:[Q],detail:[Y]},{title:[Q],detail:[Y]}],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}},ue=e=>e.toString();function Ot(e){var p;const[t,n]=b.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 r(){const S={...{display:"flex",flexDirection:"column"},alignItems:"stretch",cursor:"pointer"};return Object.fromEntries(Object.entries(S).filter(([f,y])=>y!==void 0))}function o(c){return`builder-accordion-title builder-accordion-title-${t.includes(c)?"open":"closed"}`}function l(c){return`builder-accordion-detail builder-accordion-detail-${t.includes(c)?"open":"closed"}`}function d(){let c=null;if(e.grid&&t.length&&document){const f=t[0];let C=document.querySelector(`.builder-accordion-title[data-index="${f}"]`);if(c=f,C){let x=C.getBoundingClientRect();for(;C=C&&C.nextElementSibling;)if(C){if(C.classList.contains("builder-accordion-detail"))continue;const T=C.getBoundingClientRect();if(T.left>x.left){const w=parseInt(C.getAttribute("data-index")||"",10);isNaN(w)||(x=T,c=w)}else break}}}return typeof c=="number"&&(c=c+1),c}function u(){const c={order:typeof d()=="number"?d():void 0,...e.grid&&{width:"100%"}};return Object.fromEntries(Object.entries(c).filter(([S,f])=>f!==void 0))}function h(c){t.includes(c)?n(i()?[]:t.filter(S=>S!==c)):n(i()?[c]:t.concat(c))}return s.jsx("div",{className:"builder-accordion",style:a(),children:(p=e.items)==null?void 0:p.map((c,S)=>s.jsxs(qe.Fragment,{children:[s.jsx("div",{className:o(S),style:{...r(),...e.grid&&{width:e.gridRowWidth,order:d()!==null?ue(S):ue(S+1)}},"data-index":S,onClick:f=>h(S),children:s.jsx(A,{blocks:c.title,path:`items.${S}.title`,parent:e.builderBlock.id,context:e.builderContext,registeredComponents:e.builderComponents,linkComponent:e.builderLinkComponent})}),t.includes(S)?s.jsx("div",{className:l(S),style:u(),children:s.jsx(A,{blocks:c.detail,path:`items.${S}.detail`,parent:e.builderBlock.id,context:e.builderContext,registeredComponents:e.builderComponents,linkComponent:e.builderLinkComponent})}):null]},S))})}const Lt={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}},Ut={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(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}},_t={name:"Fragment",static:!0,hidden:!0,canHaveChildren:!0,noWrap:!0},ae=["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"],qt=["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"],Mt={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:ae,required:!0,defaultValue:"https://cdn.builder.io/api/v1/image/assets%2FYJIGb4i01jvw0SRdL5Bt%2F72c80f114dc149019051b6852a9e3b7a",onChange:e=>{e.delete("srcset"),e.delete("noWebp");function n(o,l=6e4){return new Promise((d,u)=>{const h=document.createElement("img");let p=!1;h.onload=()=>{p=!0,d(h)},h.addEventListener("error",c=>{console.warn("Image load failed",c.error),u(c.error)}),h.src=o,setTimeout(()=>{p||u(new Error("Image load timed out"))},l)})}function i(o){return Math.round(o*1e3)/1e3}const a=e.get("image"),r=e.get("aspectRatio");if(fetch(a).then(o=>o.blob()).then(o=>{o.type.includes("svg")&&e.set("noWebp",!0)}),a&&(!r||r===.7041))return n(a).then(o=>{const l=e.get("aspectRatio");e.get("image")===a&&(!l||l===.7041)&&o.width&&o.height&&(e.set("aspectRatio",i(o.height/o.width)),e.set("height",o.height),e.set("width",o.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:"title",type:"string",helperText:"Text to display when hovering over the asset"},{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}},Ht={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 q(e){return s.jsx("script",{dangerouslySetInnerHTML:{__html:e.scriptStr},"data-id":e.id,nonce:e.nonce||""})}function zt(e,t,n,i){function a(u){return typeof u=="string"}function r(u){return typeof u=="number"}function o(u,h){return(()=>{const c=h.property,S=h.operator;let f=h.value;if(h&&h.property==="urlPath"&&h.value&&typeof h.value=="string"&&h.value!=="/"&&h.value.endsWith("/")&&(f=h.value.slice(0,-1)),!(c&&S))return!0;if(Array.isArray(f))return S==="isNot"?f.every(C=>o(u,{property:c,operator:S,value:C})):!!f.find(C=>o(u,{property:c,operator:S,value:C}));const y=u[c];if(Array.isArray(y))return y.includes(f);switch(S){case"is":return y===f;case"isNot":return y!==f;case"contains":return(a(y)||Array.isArray(y))&&y.includes(String(f));case"startsWith":return a(y)&&y.startsWith(String(f));case"endsWith":return a(y)&&y.endsWith(String(f));case"greaterThan":return r(y)&&r(f)&&y>f;case"lessThan":return r(y)&&r(f)&&y<f;case"greaterThanOrEqualTo":return r(y)&&r(f)&&y>=f;case"lessThanOrEqualTo":return r(y)&&r(f)&&y<=f;default:return!1}})()}const l={query:t,startDate:n,endDate:i},d=e.date&&new Date(e.date)||new Date;return l.startDate&&new Date(l.startDate)>d||l.endDate&&new Date(l.endDate)<d?!1:!l.query||!l.query.length?!0:l.query.every(u=>o(e,u))}const Kt=`function getPersonalizedVariant(variants, blockId, locale) {
|
|
56
56
|
if (!navigator.cookieEnabled) {
|
|
57
57
|
return;
|
|
58
58
|
}
|
|
@@ -189,7 +189,7 @@
|
|
|
189
189
|
${Kt}
|
|
190
190
|
getPersonalizedVariant(${JSON.stringify(e)}, "${t}"${n?`, "${n}"`:""})
|
|
191
191
|
})();
|
|
192
|
-
`;function Xt(e){var y,C,x,T,w,P,E;const t=b.useRef(null),[n,i]=b.useState(()=>g.userAttributesService.getUserAttributes()),[a,r]=b.useState(()=>{var k,m,v;return Yt(e.variants,((k=e.builderBlock)==null?void 0:k.id)||"none",(v=(m=e.builderContext)==null?void 0:m.rootState)==null?void 0:v.locale)}),[o,l]=b.useState(()=>[]),[d,u]=b.useState(()=>{var k;return Gt(e.variants,g.getDefaultCanTrack((k=e.builderContext)==null?void 0:k.canTrack))}),[h,p]=b.useState(()=>!1);function c(){return(e.variants||[]).filter(k=>{var m,v,I,R;return zt({...(v=(m=e.builderContext)==null?void 0:m.rootState)!=null&&v.locale?{locale:(R=(I=e.builderContext)==null?void 0:I.rootState)==null?void 0:R.locale}:{},...n},k.query,k.startDate,k.endDate)})}function S(){var k;return Qt({variants:e.variants,fallbackBlocks:(k=e.builderBlock)==null?void 0:k.children,isHydrated:h,filteredVariants:c(),previewingIndex:e.previewingIndex})}function f(){return(e.variants||[]).map((k,m)=>{var v;return`[data-variant-id="${(v=e.builderBlock)==null?void 0:v.id}-${m}"] { display: none; } `}).join("")}return b.useEffect(()=>{var m;p(!0);const k=g.userAttributesService.subscribeOnUserAttributesChange(v=>{i(v)});if(!(g.isEditing()||g.isPreviewing())){const v=c()[0];t.current&&(t.current.dispatchEvent(new CustomEvent("builder.variantLoaded",{detail:{variant:v||"default",content:(m=e.builderContext)==null?void 0:m.content},bubbles:!0})),new IntersectionObserver(R=>{R.forEach(j=>{var V;j.isIntersecting&&t.current&&t.current.dispatchEvent(new CustomEvent("builder.variantDisplayed",{detail:{variant:v||"default",content:(V=e.builderContext)==null?void 0:V.content},bubbles:!0}))})}).observe(t.current))}o.push(k)},[]),b.useEffect(()=>()=>{o.forEach(k=>k())},[]),s.jsxs("div",{ref:t,...e.attributes,className:`builder-personalization-container ${((y=e.attributes)==null?void 0:y.className)||""}`,children:[d?s.jsxs(s.Fragment,{children:[(C=e.variants)==null?void 0:C.map((k,m)=>{var v,I;return s.jsx("template",{"data-variant-id":`${(v=e.builderBlock)==null?void 0:v.id}-${m}`,children:s.jsx(A,{blocks:k.blocks,parent:(I=e.builderBlock)==null?void 0:I.id,path:`component.options.variants.${m}.blocks`})},m)}),s.jsx(O,{nonce:((x=e.builderContext)==null?void 0:x.nonce)||"",styles:f(),id:`variants-styles-${(T=e.builderBlock)==null?void 0:T.id}`}),s.jsx(q,{nonce:((w=e.builderContext)==null?void 0:w.nonce)||"",scriptStr:a,id:`variants-script-${(P=e.builderBlock)==null?void 0:P.id}`})]}):null,s.jsx(A,{blocks:S().blocks,parent:(E=e.builderBlock)==null?void 0:E.id,path:S().path})]})}const Zt={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>"}}}]},en={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 tn(e){var t,n,i;return s.jsx("div",{style:{pointerEvents:"auto"},...!((t=e.builderContext.context)!=null&&t.symbolId)&&{"builder-slot":e.name},children:s.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 nn={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}},X={"@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"}}},Z={"@type":"@builder.io/sdk:Element",responsiveStyles:{large:{height:"200px",display:"flex",marginTop:"20px",flexDirection:"column"}},component:{name:"Text",options:{text:"New tab content "}}},an={name:"Builder: Tabs",inputs:[{name:"tabs",type:"list",broadcast:!0,subFields:[{name:"label",type:"uiBlocks",hideFromUI:!0,defaultValue:[X]},{name:"content",type:"uiBlocks",hideFromUI:!0,defaultValue:[Z]}],defaultValue:[{label:[{...X,component:{name:"Text",options:{text:"Tab 1"}}}],content:[{...Z,component:{name:"Text",options:{text:"Tab 1 content"}}}]},{label:[{...X,component:{name:"Text",options:{text:"Tab 2"}}}],content:[{...Z,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 rn(e){var r;const[t,n]=b.useState(()=>e.defaultActiveTab?e.defaultActiveTab-1:0);function i(o){return e.tabs&&e.tabs[o].content}function a(o){o===t&&e.collapsible?n(-1):n(o)}return s.jsxs("div",{children:[s.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((o,l)=>s.jsx("span",{className:`builder-tab-wrap ${t===l?"builder-tab-active":""}`,style:{...t===l?e.activeTabStyle:{}},onClick:d=>a(l),children:s.jsx(A,{parent:e.builderBlock.id,path:`tabs.${l}.label`,blocks:o.label,context:e.builderContext,registeredComponents:e.builderComponents,linkComponent:e.builderLinkComponent})},l))}),i(t)?s.jsx("div",{children:s.jsx(A,{parent:e.builderBlock.id,path:`tabs.${t}.content`,blocks:i(t),context:e.builderContext,registeredComponents:e.builderComponents,linkComponent:e.builderLinkComponent})}):null]})}const on={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 Fe(e){var t;return s.jsx("div",{className:"builder-text",dangerouslySetInnerHTML:{__html:((t=e.text)==null?void 0:t.toString())||""},style:{outline:"none"}})}const sn={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 ln(e){const t=b.useRef(null),[n,i]=b.useState(()=>[]),[a,r]=b.useState(()=>[]);function o(){var d;if(!t.current||!((d=t.current)!=null&&d.getElementsByTagName)||typeof window=="undefined")return;const l=t.current.getElementsByTagName("script");for(let u=0;u<l.length;u++){const h=l[u];if(h.src){if(n.includes(h.src))continue;n.push(h.src);const p=document.createElement("script");p.async=!0,p.src=h.src,document.head.appendChild(p)}else if(!h.type||["text/javascript","application/javascript","application/ecmascript"].includes(h.type)){if(a.includes(h.innerText))continue;try{a.push(h.innerText),new Function(h.innerText)()}catch(p){g.logger.warn("[BUILDER.IO] `CustomCode`: Error running script:",p)}}}}return b.useEffect(()=>{o()},[]),b.useEffect(()=>{g.isEditing()&&o()},[e.code]),s.jsx("div",{ref:t,className:"builder-custom-code"+(e.replaceNodes?" replace-nodes":""),dangerouslySetInnerHTML:{__html:e.code}})}const cn={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}]},un=["text/javascript","application/javascript","application/ecmascript"],dn=e=>un.includes(e.type);function mn(e){const t=b.useRef(null),[n,i]=b.useState(()=>[]),[a,r]=b.useState(()=>[]),[o,l]=b.useState(()=>!1);function d(){if(!t.current||!t.current.getElementsByTagName)return;const u=t.current.getElementsByTagName("script");for(let h=0;h<u.length;h++){const p=u[h];if(p.src&&!n.includes(p.src)){n.push(p.src);const c=document.createElement("script");c.async=!0,c.src=p.src,document.head.appendChild(c)}else if(dn(p)&&!a.includes(p.innerText))try{a.push(p.innerText),new Function(p.innerText)()}catch(c){g.logger.warn("[BUILDER.IO] `Embed`: Error running script:",c)}}}return b.useEffect(()=>{t.current&&!o&&(l(!0),d())},[t.current,o]),s.jsx("div",{className:"builder-embed",ref:t,dangerouslySetInnerHTML:{__html:e.content}})}const fn={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}},gn=["production","qa","test","development","dev","cdn-qa","cloud","fast","cdn2","cdn-prod"],hn=()=>{const e=process.env.NODE_ENV||"production";return gn.includes(e)?e:"production"};function bn(e){const t=b.useRef(null),[n,i]=b.useState(()=>"unsubmitted"),[a,r]=b.useState(()=>null),[o,l]=b.useState(()=>"");function d(p){var S,f;const c={...e.builderContext.rootState,...p};e.builderContext.rootSetState?(f=(S=e.builderContext).rootSetState)==null||f.call(S,c):e.builderContext.rootState=c}function u(){return g.isEditing()&&e.previewState||n}function h(p){var S;const c=e.sendWithJs||e.sendSubmissionsTo==="email";if(e.sendSubmissionsTo==="zapier")p.preventDefault();else if(c){if(!(e.action||e.sendSubmissionsTo==="email")){p.preventDefault();return}p.preventDefault();const f=p.currentTarget||p.target,y=e.customHeaders||{};let C;const x=new FormData(f),T=Array.from(f.querySelectorAll("input,select,textarea")).filter(m=>!!m.name).map(m=>{let v;const I=m.name;if(m instanceof HTMLInputElement)if(m.type==="radio"){if(m.checked)return v=m.name,{key:I,value:v}}else if(m.type==="checkbox")v=m.checked;else if(m.type==="number"||m.type==="range"){const R=m.valueAsNumber;isNaN(R)||(v=R)}else m.type==="file"?v=m.files:v=m.value;else v=m.value;return{key:I,value:v}});let w=e.contentType;if(e.sendSubmissionsTo==="email"&&(w="multipart/form-data"),Array.from(T).forEach(({value:m})=>{(m instanceof File||Array.isArray(m)&&m[0]instanceof File||m instanceof FileList)&&(w="multipart/form-data")}),w!=="application/json")C=x;else{const m={};Array.from(T).forEach(({value:v,key:I})=>{Se(m,I,v)}),C=JSON.stringify(m)}w&&w!=="multipart/form-data"&&(c&&((S=e.action)!=null&&S.includes("zapier.com"))||(y["content-type"]=w));const P=new CustomEvent("presubmit",{detail:{body:C}});if(t.current&&(t.current.dispatchEvent(P),P.defaultPrevented))return;i("sending");const E=`${hn()==="dev"?"http://localhost:5000":"https://builder.io"}/api/v1/form-submit?apiKey=${e.builderContext.apiKey}&to=${btoa(e.sendSubmissionsToEmail||"")}&name=${encodeURIComponent(e.name||"")}`,k=e.sendSubmissionsTo==="email"?E:e.action;g.logFetch(k),fetch(k,{body:C,headers:y,method:e.method||"post"}).then(async m=>{let v;const I=m.headers.get("content-type");if(I&&I.indexOf("application/json")!==-1?v=await m.json():v=await m.text(),!m.ok&&e.errorMessagePath){let R=ye(v,e.errorMessagePath);R&&(typeof R!="string"&&(R=JSON.stringify(R)),l(R),d({formErrorMessage:R}))}if(r(v),i(m.ok?"success":"error"),m.ok){const R=new CustomEvent("submit:success",{detail:{res:m,body:v}});if(t.current){if(t.current.dispatchEvent(R),R.defaultPrevented)return;e.resetFormOnSubmit!==!1&&t.current.reset()}if(e.successUrl)if(t.current){const j=new CustomEvent("route",{detail:{url:e.successUrl}});t.current.dispatchEvent(j),j.defaultPrevented||(location.href=e.successUrl)}else location.href=e.successUrl}},m=>{const v=new CustomEvent("submit:error",{detail:{error:m}});t.current&&(t.current.dispatchEvent(v),v.defaultPrevented)||(r(m),i("error"))})}}return s.jsxs(s.Fragment,{children:[" ",s.jsxs("form",{validate:e.validate,ref:t,action:!e.sendWithJs&&e.action,method:e.method,name:e.name,onSubmit:p=>h(p),...e.attributes,children:[e.children,u()==="error"?s.jsx(A,{path:"errorMessage",blocks:e.errorMessage,context:e.builderContext}):null,u()==="sending"?s.jsx(A,{path:"sendingMessage",blocks:e.sendingMessage,context:e.builderContext}):null,u()==="error"&&a?s.jsx("pre",{className:"builder-form-error-text pre-7acc3b46",children:JSON.stringify(a,null,2)}):null,u()==="success"?s.jsx(A,{path:"successMessage",blocks:e.successMessage,context:e.builderContext}):null]})," ",s.jsx("style",{children:".pre-7acc3b46 { padding: 10px; color: red; text-align: center; }"})," "]})}const pn={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 yn(e){return b.createElement("input",{...e.attributes,key:g.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 xn={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 vn(e){var t;return b.createElement("select",{...e.attributes,value:e.value,key:g.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)=>s.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 kn(e){return s.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 Tn(e){return s.jsx("textarea",{...e.attributes,placeholder:e.placeholder,name:e.name,value:e.value,defaultValue:e.defaultValue,required:e.required})}const wn={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:ae,required:!0}],noWrap:!0,static:!0};function In(e){return s.jsx("img",{style:{objectFit:e.backgroundSize||"cover",objectPosition:e.backgroundPosition||"center"},alt:e.altText,src:e.imgSrc||e.image,...e.attributes},g.isEditing()&&e.imgSrc||"default-key")}const En={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:qt,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:ae,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 We(e){var o,l,d,u,h,p,c;const t=b.useRef(null);function n(){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 i(){return{...n()}}const[a,r]=b.useState(()=>{});return b.useEffect(()=>{if(e.lazyLoad){const S=new IntersectionObserver(function(f){f.forEach(function(y){if(!y.isIntersecting)return;const C=y.target;try{Array.from(C.children).filter(x=>x instanceof HTMLElement&&x.tagName==="SOURCE").forEach(x=>{const T=x.dataset.src;T&&(x.src=T)}),C.load(),S.unobserve(C)}catch(x){console.error("Error loading lazy video:",x)}})});t.current&&S.observe(t.current),r(S)}},[]),b.useEffect(()=>()=>{a&&a.disconnect()},[]),s.jsxs("div",{style:{position:"relative"},children:[s.jsx("video",{className:"builder-video",...i(),ref:t,preload:e.lazyLoad?"none":e.preload||"metadata",style:{width:"100%",height:"100%",...(o=e.attributes)==null?void 0:o.style,objectFit:e.fit,objectPosition:e.position,borderRadius:"1px",...e.aspectRatio?{position:"absolute"}:null},poster:e.posterImage,children:s.jsx("source",{type:"video/mp4",...e.lazyLoad?{"data-src":e.video}:{src:e.video}})}),e.aspectRatio&&!(e.fitContent&&((d=(l=e.builderBlock)==null?void 0:l.children)!=null&&d.length))?s.jsx("div",{style:{width:"100%",paddingTop:e.aspectRatio*100+"%",pointerEvents:"none",fontSize:"0px"}}):null,(h=(u=e.builderBlock)==null?void 0:u.children)!=null&&h.length&&e.fitContent?s.jsx("div",{style:{display:"flex",flexDirection:"column",alignItems:"stretch"},children:e.children}):null,(c=(p=e.builderBlock)==null?void 0:p.children)!=null&&c.length&&!e.fitContent?s.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 Rn=()=>[{component:ln,...sn},{component:mn,...cn},{component:bn,...fn},{component:yn,...pn},{component:kn,...Sn},{component:vn,...xn},{component:Tn,...Cn},{component:In,...wn},{component:We,...En}],de=()=>[{component:be,...Lt},{component:Ve,...Ut},{component:Be,..._t},{component:Ae,...Mt},{component:Ne,...Zt},{component:tn,...en},{component:Ue,...nn},{component:Fe,...on},{component:Xt,...Ht},{component:rn,...an},{component:Ot,...$t},...Rn()],Pn=`function updateCookiesAndStyles(contentId, variants, isHydrationTarget, isAngularSDK) {
|
|
192
|
+
`;function Xt(e){var y,C,x,T,w,P,E;const t=b.useRef(null),[n,i]=b.useState(()=>g.userAttributesService.getUserAttributes()),[a,r]=b.useState(()=>{var k,m,v;return Yt(e.variants,((k=e.builderBlock)==null?void 0:k.id)||"none",(v=(m=e.builderContext)==null?void 0:m.rootState)==null?void 0:v.locale)}),[o,l]=b.useState(()=>[]),[d,u]=b.useState(()=>{var k;return Gt(e.variants,g.getDefaultCanTrack((k=e.builderContext)==null?void 0:k.canTrack))}),[h,p]=b.useState(()=>!1);function c(){return(e.variants||[]).filter(k=>{var m,v,I,R;return zt({...(v=(m=e.builderContext)==null?void 0:m.rootState)!=null&&v.locale?{locale:(R=(I=e.builderContext)==null?void 0:I.rootState)==null?void 0:R.locale}:{},...n},k.query,k.startDate,k.endDate)})}function S(){var k;return Qt({variants:e.variants,fallbackBlocks:(k=e.builderBlock)==null?void 0:k.children,isHydrated:h,filteredVariants:c(),previewingIndex:e.previewingIndex})}function f(){return(e.variants||[]).map((k,m)=>{var v;return`[data-variant-id="${(v=e.builderBlock)==null?void 0:v.id}-${m}"] { display: none; } `}).join("")}return b.useEffect(()=>{var m;p(!0);const k=g.userAttributesService.subscribeOnUserAttributesChange(v=>{i(v)});if(!(g.isEditing()||g.isPreviewing())){const v=c()[0];t.current&&(t.current.dispatchEvent(new CustomEvent("builder.variantLoaded",{detail:{variant:v||"default",content:(m=e.builderContext)==null?void 0:m.content},bubbles:!0})),new IntersectionObserver(R=>{R.forEach(j=>{var V;j.isIntersecting&&t.current&&t.current.dispatchEvent(new CustomEvent("builder.variantDisplayed",{detail:{variant:v||"default",content:(V=e.builderContext)==null?void 0:V.content},bubbles:!0}))})}).observe(t.current))}o.push(k)},[]),b.useEffect(()=>()=>{o.forEach(k=>k())},[]),s.jsxs("div",{ref:t,...e.attributes,className:`builder-personalization-container ${((y=e.attributes)==null?void 0:y.className)||""}`,children:[d?s.jsxs(s.Fragment,{children:[(C=e.variants)==null?void 0:C.map((k,m)=>{var v,I;return s.jsx("template",{"data-variant-id":`${(v=e.builderBlock)==null?void 0:v.id}-${m}`,children:s.jsx(A,{blocks:k.blocks,parent:(I=e.builderBlock)==null?void 0:I.id,path:`component.options.variants.${m}.blocks`})},m)}),s.jsx(O,{nonce:((x=e.builderContext)==null?void 0:x.nonce)||"",styles:f(),id:`variants-styles-${(T=e.builderBlock)==null?void 0:T.id}`}),s.jsx(q,{nonce:((w=e.builderContext)==null?void 0:w.nonce)||"",scriptStr:a,id:`variants-script-${(P=e.builderBlock)==null?void 0:P.id}`})]}):null,s.jsx(A,{blocks:S().blocks,parent:(E=e.builderBlock)==null?void 0:E.id,path:S().path})]})}const Zt={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>"}}}]},en={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 tn(e){var t,n,i;return s.jsx("div",{style:{pointerEvents:"auto"},...!((t=e.builderContext.context)!=null&&t.symbolId)&&{"builder-slot":e.name},children:s.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 nn={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}},X={"@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"}}},Z={"@type":"@builder.io/sdk:Element",responsiveStyles:{large:{height:"200px",display:"flex",marginTop:"20px",flexDirection:"column"}},component:{name:"Text",options:{text:"New tab content "}}},an={name:"Builder: Tabs",inputs:[{name:"tabs",type:"list",broadcast:!0,subFields:[{name:"label",type:"uiBlocks",hideFromUI:!0,defaultValue:[X]},{name:"content",type:"uiBlocks",hideFromUI:!0,defaultValue:[Z]}],defaultValue:[{label:[{...X,component:{name:"Text",options:{text:"Tab 1"}}}],content:[{...Z,component:{name:"Text",options:{text:"Tab 1 content"}}}]},{label:[{...X,component:{name:"Text",options:{text:"Tab 2"}}}],content:[{...Z,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 rn(e){var r;const[t,n]=b.useState(()=>e.defaultActiveTab?e.defaultActiveTab-1:0);function i(o){return e.tabs&&e.tabs[o].content}function a(o){o===t&&e.collapsible?n(-1):n(o)}return s.jsxs("div",{children:[s.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((o,l)=>s.jsx("span",{className:`builder-tab-wrap ${t===l?"builder-tab-active":""}`,style:{...t===l?e.activeTabStyle:{}},onClick:d=>a(l),children:s.jsx(A,{parent:e.builderBlock.id,path:`tabs.${l}.label`,blocks:o.label,context:e.builderContext,registeredComponents:e.builderComponents,linkComponent:e.builderLinkComponent})},l))}),i(t)?s.jsx("div",{children:s.jsx(A,{parent:e.builderBlock.id,path:`tabs.${t}.content`,blocks:i(t),context:e.builderContext,registeredComponents:e.builderComponents,linkComponent:e.builderLinkComponent})}):null]})}const on={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 Fe(e){var t;return s.jsx("div",{className:"builder-text",dangerouslySetInnerHTML:{__html:((t=e.text)==null?void 0:t.toString())||""},style:{outline:"none"}})}const sn={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 ln(e){const t=b.useRef(null),[n,i]=b.useState(()=>[]),[a,r]=b.useState(()=>[]);function o(){var d;if(!t.current||!((d=t.current)!=null&&d.getElementsByTagName)||typeof window=="undefined")return;const l=t.current.getElementsByTagName("script");for(let u=0;u<l.length;u++){const h=l[u];if(h.src){if(n.includes(h.src))continue;n.push(h.src);const p=document.createElement("script");p.async=!0,p.src=h.src,document.head.appendChild(p)}else if(!h.type||["text/javascript","application/javascript","application/ecmascript"].includes(h.type)){if(a.includes(h.innerText))continue;try{a.push(h.innerText),new Function(h.innerText)()}catch(p){g.logger.warn("[BUILDER.IO] `CustomCode`: Error running script:",p)}}}}return b.useEffect(()=>{o()},[]),b.useEffect(()=>{g.isEditing()&&o()},[e.code]),s.jsx("div",{ref:t,className:"builder-custom-code"+(e.replaceNodes?" replace-nodes":""),dangerouslySetInnerHTML:{__html:e.code}})}const cn={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}]},un=["text/javascript","application/javascript","application/ecmascript"],dn=e=>un.includes(e.type);function mn(e){const t=b.useRef(null),[n,i]=b.useState(()=>[]),[a,r]=b.useState(()=>[]),[o,l]=b.useState(()=>!1);function d(){if(!t.current||!t.current.getElementsByTagName)return;const u=t.current.getElementsByTagName("script");for(let h=0;h<u.length;h++){const p=u[h];if(p.src&&!n.includes(p.src)){n.push(p.src);const c=document.createElement("script");c.async=!0,c.src=p.src,document.head.appendChild(c)}else if(dn(p)&&!a.includes(p.innerText))try{a.push(p.innerText),new Function(p.innerText)()}catch(c){g.logger.warn("[BUILDER.IO] `Embed`: Error running script:",c)}}}return b.useEffect(()=>{t.current&&!o&&(l(!0),d())},[t.current,o]),s.jsx("div",{className:"builder-embed",ref:t,dangerouslySetInnerHTML:{__html:e.content}})}const fn={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}},gn=["production","qa","test","development","dev","cdn-qa","cloud","fast","cdn2","cdn-prod"],hn=()=>{const e=process.env.NODE_ENV||"production";return gn.includes(e)?e:"production"};function bn(e){const t=b.useRef(null),[n,i]=b.useState(()=>"unsubmitted"),[a,r]=b.useState(()=>null),[o,l]=b.useState(()=>"");function d(p){var S,f;const c={...e.builderContext.rootState,...p};e.builderContext.rootSetState?(f=(S=e.builderContext).rootSetState)==null||f.call(S,c):e.builderContext.rootState=c}function u(){return g.isEditing()&&e.previewState||n}function h(p){var S;const c=e.sendWithJs||e.sendSubmissionsTo==="email";if(e.sendSubmissionsTo==="zapier")p.preventDefault();else if(c){if(!(e.action||e.sendSubmissionsTo==="email")){p.preventDefault();return}p.preventDefault();const f=p.currentTarget||p.target,y=e.customHeaders||{};let C;const x=new FormData(f),T=Array.from(f.querySelectorAll("input,select,textarea")).filter(m=>!!m.name).map(m=>{let v;const I=m.name;if(m instanceof HTMLInputElement)if(m.type==="radio"){if(m.checked)return v=m.name,{key:I,value:v}}else if(m.type==="checkbox")v=m.checked;else if(m.type==="number"||m.type==="range"){const R=m.valueAsNumber;isNaN(R)||(v=R)}else m.type==="file"?v=m.files:v=m.value;else v=m.value;return{key:I,value:v}});let w=e.contentType;if(e.sendSubmissionsTo==="email"&&(w="multipart/form-data"),Array.from(T).forEach(({value:m})=>{(m instanceof File||Array.isArray(m)&&m[0]instanceof File||m instanceof FileList)&&(w="multipart/form-data")}),w!=="application/json")C=x;else{const m={};Array.from(T).forEach(({value:v,key:I})=>{Se(m,I,v)}),C=JSON.stringify(m)}w&&w!=="multipart/form-data"&&(c&&((S=e.action)!=null&&S.includes("zapier.com"))||(y["content-type"]=w));const P=new CustomEvent("presubmit",{detail:{body:C}});if(t.current&&(t.current.dispatchEvent(P),P.defaultPrevented))return;i("sending");const E=`${hn()==="dev"?"http://localhost:5000":"https://builder.io"}/api/v1/form-submit?apiKey=${e.builderContext.apiKey}&to=${btoa(e.sendSubmissionsToEmail||"")}&name=${encodeURIComponent(e.name||"")}`,k=e.sendSubmissionsTo==="email"?E:e.action;g.logFetch(k),fetch(k,{body:C,headers:y,method:e.method||"post"}).then(async m=>{let v;const I=m.headers.get("content-type");if(I&&I.indexOf("application/json")!==-1?v=await m.json():v=await m.text(),!m.ok&&e.errorMessagePath){let R=ye(v,e.errorMessagePath);R&&(typeof R!="string"&&(R=JSON.stringify(R)),l(R),d({formErrorMessage:R}))}if(r(v),i(m.ok?"success":"error"),m.ok){const R=new CustomEvent("submit:success",{detail:{res:m,body:v}});if(t.current){if(t.current.dispatchEvent(R),R.defaultPrevented)return;e.resetFormOnSubmit!==!1&&t.current.reset()}if(e.successUrl)if(t.current){const j=new CustomEvent("route",{detail:{url:e.successUrl}});t.current.dispatchEvent(j),j.defaultPrevented||(location.href=e.successUrl)}else location.href=e.successUrl}},m=>{const v=new CustomEvent("submit:error",{detail:{error:m}});t.current&&(t.current.dispatchEvent(v),v.defaultPrevented)||(r(m),i("error"))})}}return s.jsxs(s.Fragment,{children:[" ",s.jsxs("form",{validate:e.validate,ref:t,action:!e.sendWithJs&&e.action,method:e.method,name:e.name,onSubmit:p=>h(p),...e.attributes,children:[e.children,u()==="error"?s.jsx(A,{path:"errorMessage",blocks:e.errorMessage,context:e.builderContext}):null,u()==="sending"?s.jsx(A,{path:"sendingMessage",blocks:e.sendingMessage,context:e.builderContext}):null,u()==="error"&&a?s.jsx("pre",{className:"builder-form-error-text pre-7acc3b46",children:JSON.stringify(a,null,2)}):null,u()==="success"?s.jsx(A,{path:"successMessage",blocks:e.successMessage,context:e.builderContext}):null]})," ",s.jsx("style",{children:".pre-7acc3b46 { padding: 10px; color: red; text-align: center; }"})," "]})}const pn={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 yn(e){return b.createElement("input",{...e.attributes,key:g.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 xn={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 vn(e){var t;return b.createElement("select",{...e.attributes,value:e.value,key:g.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)=>s.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 kn(e){return s.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 Tn(e){return s.jsx("textarea",{...e.attributes,placeholder:e.placeholder,name:e.name,value:e.value,defaultValue:e.defaultValue,required:e.required})}const wn={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:ae,required:!0}],noWrap:!0,static:!0};function In(e){return s.jsx("img",{style:{objectFit:e.backgroundSize||"cover",objectPosition:e.backgroundPosition||"center"},alt:e.altText,title:e.title,src:e.imgSrc||e.image,...e.attributes},g.isEditing()&&e.imgSrc||"default-key")}const En={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:qt,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:ae,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 We(e){var o,l,d,u,h,p,c;const t=b.useRef(null);function n(){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 i(){return{...n()}}const[a,r]=b.useState(()=>{});return b.useEffect(()=>{if(e.lazyLoad){const S=new IntersectionObserver(function(f){f.forEach(function(y){if(!y.isIntersecting)return;const C=y.target;try{Array.from(C.children).filter(x=>x instanceof HTMLElement&&x.tagName==="SOURCE").forEach(x=>{const T=x.dataset.src;T&&(x.src=T)}),C.load(),S.unobserve(C)}catch(x){console.error("Error loading lazy video:",x)}})});t.current&&S.observe(t.current),r(S)}},[]),b.useEffect(()=>()=>{a&&a.disconnect()},[]),s.jsxs("div",{style:{position:"relative"},children:[s.jsx("video",{className:"builder-video",...i(),ref:t,preload:e.lazyLoad?"none":e.preload||"metadata",style:{width:"100%",height:"100%",...(o=e.attributes)==null?void 0:o.style,objectFit:e.fit,objectPosition:e.position,borderRadius:"1px",...e.aspectRatio?{position:"absolute"}:null},poster:e.posterImage,children:s.jsx("source",{type:"video/mp4",...e.lazyLoad?{"data-src":e.video}:{src:e.video}})}),e.aspectRatio&&!(e.fitContent&&((d=(l=e.builderBlock)==null?void 0:l.children)!=null&&d.length))?s.jsx("div",{style:{width:"100%",paddingTop:e.aspectRatio*100+"%",pointerEvents:"none",fontSize:"0px"}}):null,(h=(u=e.builderBlock)==null?void 0:u.children)!=null&&h.length&&e.fitContent?s.jsx("div",{style:{display:"flex",flexDirection:"column",alignItems:"stretch"},children:e.children}):null,(c=(p=e.builderBlock)==null?void 0:p.children)!=null&&c.length&&!e.fitContent?s.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 Rn=()=>[{component:ln,...sn},{component:mn,...cn},{component:bn,...fn},{component:yn,...pn},{component:kn,...Sn},{component:vn,...xn},{component:Tn,...Cn},{component:In,...wn},{component:We,...En}],de=()=>[{component:be,...Lt},{component:Ve,...Ut},{component:Be,..._t},{component:Ae,...Mt},{component:Ne,...Zt},{component:tn,...en},{component:Ue,...nn},{component:Fe,...on},{component:Xt,...Ht},{component:rn,...an},{component:Ot,...$t},...Rn()],Pn=`function updateCookiesAndStyles(contentId, variants, isHydrationTarget, isAngularSDK) {
|
|
193
193
|
function getAndSetVariantId() {
|
|
194
194
|
function setCookie(name, value, days) {
|
|
195
195
|
let expires = '';
|
|
@@ -1025,6 +1025,7 @@ function te(e) {
|
|
|
1025
1025
|
}
|
|
1026
1026
|
function Qt(e) {
|
|
1027
1027
|
const t = O(null);
|
|
1028
|
+
I(() => !1);
|
|
1028
1029
|
function n() {
|
|
1029
1030
|
var r;
|
|
1030
1031
|
return [
|
|
@@ -1066,12 +1067,13 @@ function Qt(e) {
|
|
|
1066
1067
|
));
|
|
1067
1068
|
}
|
|
1068
1069
|
return V(() => {
|
|
1069
|
-
}, []),
|
|
1070
|
+
}, []), V(() => {
|
|
1071
|
+
}, [e.blocks]), /* @__PURE__ */ B(R, { children: [
|
|
1070
1072
|
/* @__PURE__ */ s(
|
|
1071
1073
|
e.BlocksWrapper,
|
|
1072
1074
|
{
|
|
1073
1075
|
ref: t,
|
|
1074
|
-
className: n() + " props-blocks-wrapper-
|
|
1076
|
+
className: n() + " props-blocks-wrapper-14802cff",
|
|
1075
1077
|
"builder-path": i(),
|
|
1076
1078
|
"builder-parent-id": e.parent,
|
|
1077
1079
|
style: e.styleProp,
|
|
@@ -1082,7 +1084,7 @@ function Qt(e) {
|
|
|
1082
1084
|
children: e.children
|
|
1083
1085
|
}
|
|
1084
1086
|
),
|
|
1085
|
-
/* @__PURE__ */ s("style", { children: `.props-blocks-wrapper-
|
|
1087
|
+
/* @__PURE__ */ s("style", { children: `.props-blocks-wrapper-14802cff {
|
|
1086
1088
|
display: flex;
|
|
1087
1089
|
flex-direction: column;
|
|
1088
1090
|
align-items: stretch;
|
|
@@ -1355,13 +1357,14 @@ function nn(e) {
|
|
|
1355
1357
|
loading: e.highPriority ? "eager" : "lazy",
|
|
1356
1358
|
fetchPriority: e.highPriority ? "high" : "auto",
|
|
1357
1359
|
alt: e.altText,
|
|
1360
|
+
title: e.title,
|
|
1358
1361
|
role: e.altText ? void 0 : "presentation",
|
|
1359
1362
|
style: {
|
|
1360
1363
|
objectPosition: e.backgroundPosition || "center",
|
|
1361
1364
|
objectFit: e.backgroundSize || "cover",
|
|
1362
1365
|
...i()
|
|
1363
1366
|
},
|
|
1364
|
-
className: "builder-image" + (e.className ? " " + e.className : "") + " img-
|
|
1367
|
+
className: "builder-image" + (e.className ? " " + e.className : "") + " img-1aa8aba3",
|
|
1365
1368
|
src: e.image,
|
|
1366
1369
|
srcSet: t(),
|
|
1367
1370
|
sizes: e.sizes
|
|
@@ -1371,23 +1374,23 @@ function nn(e) {
|
|
|
1371
1374
|
e.aspectRatio && !((o = (a = e.builderBlock) == null ? void 0 : a.children) != null && o.length && e.fitContent) ? /* @__PURE__ */ s(
|
|
1372
1375
|
"div",
|
|
1373
1376
|
{
|
|
1374
|
-
className: "builder-image-sizer div-
|
|
1377
|
+
className: "builder-image-sizer div-1aa8aba3",
|
|
1375
1378
|
style: {
|
|
1376
1379
|
paddingTop: e.aspectRatio * 100 + "%"
|
|
1377
1380
|
}
|
|
1378
1381
|
}
|
|
1379
1382
|
) : null,
|
|
1380
1383
|
(l = (r = e.builderBlock) == null ? void 0 : r.children) != null && l.length && e.fitContent ? /* @__PURE__ */ s(R, { children: e.children }) : null,
|
|
1381
|
-
!e.fitContent && ((u = (d = e.builderBlock) == null ? void 0 : d.children) != null && u.length) ? /* @__PURE__ */ s("div", { className: "div-
|
|
1384
|
+
!e.fitContent && ((u = (d = e.builderBlock) == null ? void 0 : d.children) != null && u.length) ? /* @__PURE__ */ s("div", { className: "div-1aa8aba3-2", children: e.children }) : null
|
|
1382
1385
|
] }),
|
|
1383
|
-
/* @__PURE__ */ s("style", { children: `.img-
|
|
1386
|
+
/* @__PURE__ */ s("style", { children: `.img-1aa8aba3 {
|
|
1384
1387
|
opacity: 1;
|
|
1385
1388
|
transition: opacity 0.2s ease-in-out;
|
|
1386
|
-
}.div-
|
|
1389
|
+
}.div-1aa8aba3 {
|
|
1387
1390
|
width: 100%;
|
|
1388
1391
|
pointer-events: none;
|
|
1389
1392
|
font-size: 0;
|
|
1390
|
-
}.div-
|
|
1393
|
+
}.div-1aa8aba3-2 {
|
|
1391
1394
|
display: flex;
|
|
1392
1395
|
flex-direction: column;
|
|
1393
1396
|
align-items: stretch;
|
|
@@ -1986,6 +1989,10 @@ const ln = {
|
|
|
1986
1989
|
name: "altText",
|
|
1987
1990
|
type: "string",
|
|
1988
1991
|
helperText: "Text to display when the user has images off"
|
|
1992
|
+
}, {
|
|
1993
|
+
name: "title",
|
|
1994
|
+
type: "string",
|
|
1995
|
+
helperText: "Text to display when hovering over the asset"
|
|
1989
1996
|
}, {
|
|
1990
1997
|
name: "height",
|
|
1991
1998
|
type: "number",
|
|
@@ -3540,6 +3547,7 @@ function Kn(e) {
|
|
|
3540
3547
|
objectPosition: e.backgroundPosition || "center"
|
|
3541
3548
|
},
|
|
3542
3549
|
alt: e.altText,
|
|
3550
|
+
title: e.title,
|
|
3543
3551
|
src: e.imgSrc || e.image,
|
|
3544
3552
|
...e.attributes
|
|
3545
3553
|
},
|