PageSourceSearch

https://earthly-org.netlify.app/_next/static/chunks/4497-cfb513b8cca3dc36.js

js earthly-org.netlify.app collected 2026-10-03 10:40:53 UTC 54,558 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4497],{3332:(e,t,r)=>{"use strict";r.d(t,{default:()=>_});var o=r(95155);r(12115);var a=r(34332),n=r.n(a),i=r(30509),s=r(26227);let l=["h1","h2","h3","h4","h5","h6","p"],c=["center","inherit","justify","left","right"],_=e=>{let{element:t,variant:r,color:a,children:_,align:d,fontWeight:u,className:p,style:m,gutterBottom:h,noWrap:g,pre:y,uppercase:f,css:x,width:w="auto",optionalMobile:j,optionalDesktop:b,optionalTick:v,spacing:k={},maxWidth:C,renderAsHtml:N,editable:B,id:S}=e,P=(0,s.l)(),L=(0,o.jsx)(i.A,{name:"verified",viewBox:"0 0 40 40",width:0,height:0}),F=v?L:!L,T=l.includes(t)?t:"p",A=(e=>{let{align:t,fontWeight:r,uppercase:o,color:a,pre:n,width:i,maxWidth:s,spacing:l,gutterBottom:_,screenSize:d}=e,u="0";switch(l["".concat(d,"Spacing")]){case"small":u="0.15em";break;case"medium":u="0.25em";break;case"large":u="0.35em";break;case"none":u="0em"}return{marginBottom:u,...c.includes(t)&&{textAlign:t},...r&&{fontWeight:"".concat(r)},...o&&{textTransform:"uppercase"},...a&&{color:"var(--".concat(a,")")},..."white"===a&&{color:"var(--white)"},..."primary"===a&&{color:"var(--primary)"},..."secondary"===a&&{color:"var(--secondary)"},..."altGrey"===a&&{color:"var(--alternative-grey)"},...n&&{whiteSpace:"pre"},...i&&{width:i},...s&&{maxWidth:"".concat(s,"px")},..._&&{paddingBottom:"".concat(_,"em")}}})({align:d,fontWeight:u,uppercase:f,color:a,pre:y,width:w,maxWidth:C,spacing:k,gutterBottom:h,screenSize:P}),G=(e=>{let{noWrap:t,optionalDesktop:r,optionalMobile:o,optionalTick:a}=e,i=[];return t&&i.push(n().no_wrap),r&&i.push(n()["optional-desktop"]),o&&i.push(n()["optional-mobile"]),a&&i.push(n()["optional-tick"]),i.join(" ")})({noWrap:g,optionalDesktop:b,optionalMobile:j,optionalTick:v});return(0,o.jsxs)(T,{...B,...x&&x,id:S,style:{...A,...m},className:"".concat(n()[r]," ").concat(p," ").concat(G),children:[!v&&(0,o.jsx)(o.Fragment,{children:N?(0,o.jsx)("span",{dangerouslySetInnerHTML:{__html:_}}):_}),v&&(0,o.jsxs)("span",{children:[_," "]}),F]})}},3439:e=>{e.exports={inputWrapper:"Forms_inputWrapper__We4vc",input:"Forms_input__49j48","input--error":"Forms_input--error__Rmqu8",contactForm:"Forms_contactForm__rd2ua",submit:"Forms_submit__t9eLR","select--error":"Forms_select--error__RrMdK",requestApiForm:"Forms_requestApiForm__wNXe4",formResponse:"Forms_formResponse__oZE1p",footerSubscribe:"Forms_footerSubscribe__wqiPU",inputContainer:"Forms_inputContainer__qmdHn",subscribeMessage:"Forms_subscribeMessage__TGbag",gdpr:"Forms_gdpr__bIKyx",gdprcheckbox:"Forms_gdprcheckbox__1Knsl",gdprlabel:"Forms_gdprlabel__2ahol",captchapolicy:"Forms_captchapolicy__nWve1",formRow:"Forms_formRow__TfCiO",compact:"Forms_compact__tkCHf"}},6796:(e,t,r)=>{"use strict";r.d(t,{_:()=>i,e:()=>l});var o=r(95155),a=r(12115);let n=(0,a.createContext)(void 0),i=()=>{let e=(0,a.useContext)(n);if(!e)throw Error("useCart must be used inside CartProvider");return e},s="cart-v1",l=e=>{let{children:t}=e,[r,i]=(0,a.useState)("en-US");(0,a.useEffect)(()=>{var e;(null==(e=navigator.languages)?void 0:e.includes("en-GB"))&&i("en")},[]);let[l,c]=(0,a.useState)([]),[_,d]=(0,a.useState)(!1);(0,a.useEffect)(()=>{try{var e;let t=JSON.parse(null!=(e=localStorage.getItem(s))?e:"[]");Array.isArray(t)&&c(t.filter(e=>null==e?void 0:e.id).map(e=>{var t;return{...e,quantity:null!=(t=e.quantity)?t:1}}))}catch(e){}d(!0)},[]);let[u,p]=(0,a.useState)(!1);(0,a.useEffect)(()=>{_&&localStorage.setItem(s,JSON.stringify(l))},[l,_]),(0,a.useEffect)(()=>{let e=e=>{if(e.key===s&&e.newValue)try{c(JSON.parse(e.newValue))}catch(e){}};return window.addEventListener("storage",e),()=>window.removeEventListener("storage",e)},[]);let m=(0,a.useCallback)(function(e,t){let r=arguments.length>2&&void 0!==arguments[2]&&arguments[2];c(r=>{let o=r.findIndex(t=>t.id===e.id);if(-1===o)return[...r,{...e,quantity:t}];let a=[...r];return a[o]={...a[o],quantity:a[o].quantity+t},a}),r&&setTimeout(()=>p(!0),250)},[]),h=(0,a.useCallback)(e=>c(t=>t.filter(t=>t.id!==e.id)),[]),g=(0,a.useCallback)(()=>c([]),[]),y=(0,a.useCallback)(e=>{c(e.filter(e=>!!e.id).map(e=>({...e,quantity:"number"==typeof e.quantity?e.quantity:1})))},[]),f=(0,a.useMemo)(()=>({selectedProjects:l,setSelectedProjects:c,currentCurrency:r,setCurrentCurrency:i,isCartVisible:u,setIsCartVisible:p,addToCart:m,removeFromCart:h,resetCart:g,initCart:y}),[l,r,u]);return(0,o.jsx)(n.Provider,{value:f,children:t})}},18228:(e,t,r)=>{"use strict";r.d(t,{A:()=>c});var o=r(95155),a=r(6874),n=r.n(a),i=r(92314),s=r.n(i),l=r(30509);let c=e=>{let{align:t,block:r=!1,color:a="",content:i="",className:c="",href:_={},ghost:d=!1,pill:u=!1,large:p=!1,muted:m=!1,loading:h=!1,success:g=!1,type:y,variant:f,callBack:x,children:w,hideText:j=!1,width:b="auto",editable:v}=e,k=(e=>{let{variant:t,color:r,muted:o,ghost:a,pill:n,large:i,block:l,align:c,loading:_,success:d}=e,u=[];return a&&u.push(s().ghost),n&&u.push(s().pill),i&&u.push(s().large),"primary"===t&&u.push(s().isPrimary),"secondary"===t&&u.push(s().isSecondary),"black"===t&&u.push(s().isBlack),"blank"===t&&u.push(s().isBlank),"link"===t&&u.push(s().isLink),"primary"===r&&u.push(s().primaryColor),"secondary"===r&&u.push(s().secondaryColor),"white"===r&&u.push(s().white),o&&u.push(s().isMuted),l&&u.push(s().isBlock),"left"===c&&u.push(s().isAlignedLeft),"center"===c&&u.push(s().isAlignedCenter),"right"===c&&u.push(s().isAlignedRight),_&&u.push(s().isLoading),d&&u.push(s().isSuccess),u.join(" ")})({variant:f,color:a,muted:m,ghost:d,pill:u,large:p,block:r,align:t,loading:h,success:g}
1),{cached_url:C,anchor:N,query:B,linktype:S}=_,P="",L="";if(C&&C.includes("%3F")){let[e,t]=C.split("%3F");P=e,L=t}else if(C&&C.includes("?")){let[e,t]=C.split("?");P=e,L=t}else P=C||"";let F="#"===P,T="story"==S?"/"+P:P;return C&&!F?(0,o.jsxs)(n(),{...v,href:{pathname:T,hash:N||"",query:B||L||""},title:i,className:[s().buttonText,k,c].join(" "),style:{width:b},children:[!j&&(0,o.jsx)("span",{children:i}),w]}):(0,o.jsxs)("button",{...v,title:i,type:y,className:[s().buttonText,c,k].join(" "),onClick:x,children:[!j&&(0,o.jsx)("span",{children:i}),w,g&&(0,o.jsx)(l.A,{name:"verified",viewBox:"0 0 40 40",width:40,height:40})]})}},20034:(e,t,r)=>{"use strict";r.d(t,{A:()=>_});var o=r(95155),a=r(12115),n=r(26227),i=r(47298),s=r(33999),l=r(50782),c=r.n(l);let _=e=>{let{image:t="",alt:r="",styles:l={}}=e,_=(0,n.l)(),[d,u]=(0,a.useState)(!1);(0,a.useEffect)(()=>{u(!0)},[]);let p=l[_]||"",m=d?(0,s._)(p):{width:0},h=(0,i.A)(t,"filters:quality(70)");return(0,o.jsx)("div",{className:c().background,style:m,children:(0,o.jsx)("img",{src:h,alt:r})})}},22370:(e,t,r)=>{"use strict";r.d(t,{default:()=>y});var o=r(95155),a=r(49694),n=r(37129),i=r(12115),s=r(73866),l=r.n(s),c=r(35695),_=r(44174),d=r(73413),u=r(18228),p=r(30509),m=r(3439),h=r.n(m);let g="I agree to allow Earthly to store and process my personal data.",y=e=>{let{hubspotFormId:t="d6e21a16-9ad7-40b3-91f7-bb9746400216"}=e,[r,s]=(0,i.useState)(""),{submitForm:m}=(0,d.T)(),y=(0,c.useRouter)();t=""==t.trim()?"d6e21a16-9ad7-40b3-91f7-bb9746400216":t;let f=async(e,r)=>{let{resetForm:o}=r;(0,_.A)("ContactFormSubmit",async r=>{if(!r)return s(" reCAPTCHA ERROR ");let a={consent:e.GDPR,policy:g},{error:n}=await m(e,t,a);n?s(n.message):(s("Success!"),l().dataLayer({dataLayer:{event:"contact-form",page:y.asPath}}),window.location="/thank-you/form-footer"),o()})},x=n.object().shape({email:n.string().email().required("Required"),firstname:n.string().required("Required"),lastname:n.string().required("Required"),company:n.string(),reported_employees:n.number().positive().integer(),message:n.string().required("Required"),GDPR:n.bool().oneOf([!0])});return(0,o.jsx)(a.l1,{initialValues:{firstname:"",lastname:"",email:"",company:"",message:"",GDPR:!1},onSubmit:f,validationSchema:x,children:e=>{let{errors:t,touched:n,dirty:i,isValid:s}=e;return(0,o.jsxs)(a.lV,{className:h().contactForm,children:[(0,o.jsx)(a.D0,{id:"ContactFormFirstName",name:"firstname",type:"text",placeholder:"Firstname",className:[h().input,t.firstname&&n.firstname&&h()["input--error"]].join(" ")}),(0,o.jsx)(a.D0,{id:"ContactFormLastName",name:"lastname",type:"text",placeholder:"Lastname",className:[h().input,t.lastname&&n.lastname&&h()["input--error"]].join(" ")}),(0,o.jsx)(a.D0,{required:!0,id:"ContactFormEmail",name:"email",type:"email",placeholder:"Email",className:[h().input,t.email&&n.email&&h()["input--error"]].join(" ")}),(0,o.jsx)(a.D0,{id:"ContactFormCompany",name:"company",type:"text",placeholder:"Company",className:[h().input,t.company&&n.company&&h()["input--error"]].join(" ")}),(0,o.jsx)(a.D0,{id:"ContactFormEmployees",name:"reported_employees",type:"number",placeholder:"Number of Employees",className:[h().input,t.reported_employees&&n.reported_employees&&h()["input--error"]].join(" ")}),(0,o.jsx)(a.D0,{id:"ContactFormMessage",name:"message",as:"textarea",rows:6,placeholder:"Your Message",className:[h().input,t.message&&n.message&&h()["input--error"]].join(" ")}),(0,o.jsx)("div",{children:(0,o.jsxs)("label",{className:h().gdpr,children:[(0,o.jsx)(a.D0,{className:h().gdprcheckbox,id:"gdprcheckbox",name:"GDPR",type:"checkbox"}),(0,o.jsx)("span",{className:h().gdprlabel,children:g})]})}),(0,o.jsxs)("p",{className:h().captchapolicy,children:["This site is protected by reCAPTCHA and the Google\xa0",(0,o.jsx)("a",{href:"https://policies.google.com/privacy",target:"_blank",rel:"noopener noreferrer",children:"Privacy Policy"})," ","and\xa0",(0,o.jsx)("a",{href:"https://policies.google.com/terms",target:"_blank",rel:"noopener noreferrer",children:"Terms of Service"})," ","apply."]}),(0,o.jsx)(u.A,{type:"submit",className:h().submit,content:"Submit",variant:"primary",align:"right",muted:!(i&&s),children:(0,o.jsx)(p.A,{name:"arrow",width:18,height:14,viewBox:"0 0 18 14",stroke:"#000"})}),r&&(0,o.jsx)("p",{className:h().formResponse,children:r})]})}})}},26227:(e,t,r)=>{"use strict";r.d(t,{l:()=>a});var o=r(71122);function a(){let e=(0,o.A)("(max-width: 767px)"),t=(0,o.A)("(min-width: 768px) and (max-width: 1023px)"),r=(0,o.A)("(min-width: 1024px) and (max-width: 1239px)"),a=(0,o.A)("(min-width: 1240px)");return e?"Mobile":t?"Tablet":r?"Desktop":a?"LargeDesktop":"Desktop"}},30509:(e,t,r)=>{"use strict";r.d(t,{A:()=>a});var o=r(95155);let a=e=>{let{width:t,height:r,viewBox:a,name:n,stroke:i,fill:s,transform:l,editable:c}=e;return(0,o.jsx)("span",{...c,className:"icon icon-".concat(n),style:{transform:l||""},children:(0,o.jsx)("svg",{width:t,height:r,viewBox:a,xmlns:"http://www.w3.org/2000/svg",stroke:i,fill:s,children:(0,o.jsx)("use",{href:"#icon-".concat(n)})})})}},32132:e=>{e.exports={container:"Footer_container__pP_Gj",subscriptionWrapper:"Footer_subscriptionWrapper__wJH7d",subscriptionContainer:"Footer_subscriptionContainer___ynwQ",subscriptionSubtitle:"Footer_subscriptionSubtitle__7Ju5L",subscriptionImage:"Footer_subscriptionImage__u7eIG",subscriptionBg:"Footer_subscriptionBg__8mUUS",subscriptionRow:"Footer_subscriptionRow__qrgxh",colLeft:"Footer_colLeft__SofD3",mainRow:"Footer_mainRow__XZHup",footerLinksTablet:"Footer_footerLinksTablet__LtMPn",footerLinksDesktop:"Footer_footerLinksDesktop__Vwxx_",footerNav:"Footer_footerNav__WceOL",bcorp:"Footer_bcorp__o385W",earthly:"Footer_earthly__Tc2aW",mobileLogos:"Footer_mobileLogos__Vf01B",desktopLogos:"Footer_desktopLogos__MbkZg",colRight:"Footer_colRight__XGos_",copyrightCol:"Footer_copyrightCol__SOGT8",social:"Footer_social__8eyG7"}},32542:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>w});var o=r(95155),a=r(18228),n=r(95280),i=r.n(n),s=r(65127),l=r(51434),c=r(91758),_=r.n(c),d=r(12115),u=r(30509),p=r(71122),m=r(65585),h=r(6874),g=r.n(h),y=r(35695);function f(){var e,t,r,n,i,l;let{authClient:c}=(0,s.NQ)(),{user:h,client:f,isLoading:x}=c,[w,j]=(0,d.useState)(!1),b=(0,d.useRef)(null),v=(0,d.useRef)(null),k=(0,d.useRef)(null),C=(0,d.useCallback)(()=>{k.current&&(clearTimeout(k.current),k.current=null)},[]),N=(0,p.A)("(max-width: 1023px)"),B=(0,y.usePathname)(),S=(0,y.useSearchParams)(),P=(null!=(t=null==f||null==(e=f.projects)?void 0:e.length)?t:0)>0,L=(null==h?void 0:h.clientId)?"https://dashboard.earthly.org/".concat(h.clientId):"#",F="/products/buy-now",T="You need to invest at least in one project to access",A=(0,d.useCallback)(()=>j(!1),[]),G=(0,d.useCallback)(()=>j(e=>!e),[]);(0,d.useEffect)(()=>
1{if(h&&"1"===sessionStorage.getItem("auth_menu_open"))return sessionStorage.removeItem("auth_menu_open"),j(!0),k.current=setTimeout(()=>{j(!1),k.current=null},4e3),()=>C()},[h,C]),(0,d.useEffect)(()=>{if(!w)return;let e=e=>{var t,r;let o=e.target;(null==(t=b.current)?void 0:t.contains(o))||(null==(r=v.current)?void 0:r.contains(o))||j(!1)};return document.addEventListener("mousedown",e),()=>document.removeEventListener("mousedown",e)},[w]),(0,d.useEffect)(()=>{if(!w)return;let e=e=>{"Escape"===e.key&&j(!1)};return window.addEventListener("keydown",e),()=>window.removeEventListener("keydown",e)},[w]);let I=async e=>{let t=S.toString(),r="".concat(window.location.origin).concat(B).concat(t?"?".concat(t):"");try{let t=await fetch("/api/stripe/customer_sessions",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({customerId:e,returnUrl:r})}),o=await t.json();(null==o?void 0:o.url)&&window.open(o.url,"_blank","noopener,noreferrer")}catch(e){console.error("Stripe portal error:",e)}};return x?(0,o.jsx)("div",{className:_().profile__isLoading,"aria-busy":"true","aria-live":"polite"}):h?(0,o.jsxs)("div",{className:_().profile,children:[(0,o.jsx)("div",{ref:v,className:_().avatar,"aria-haspopup":"menu","aria-expanded":w,"aria-controls":"profile-menu",onMouseEnter:()=>{C(),N||j(!0)},onClick:()=>{C(),G()},children:(0,o.jsx)("div",{className:_().avatar__image,"aria-hidden":"true",children:(0,o.jsx)("img",{src:"/img/avatar.png",alt:"".concat(null!=(n=null!=(r=h.firstName)?r:h.name)?n:"User"," avatar"),loading:"lazy",decoding:"async"})})}),(w||N)&&(0,o.jsxs)("div",{ref:b,id:"profile-menu",role:"menu","aria-label":"User menu",className:_().profile__dropdown,onMouseEnter:C,onClick:C,onMouseLeave:()=>!N&&A(),children:[(0,o.jsx)("div",{className:_().profile__content,children:(0,o.jsxs)(m.A,{variant:"p",children:["\uD83D\uDC4B Hi, ",null!=(l=null!=(i=h.firstName)?i:h.name)?l:"there","!"]})}),(0,o.jsxs)("div",{className:_().profile__links,children:[P?(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(g(),{prefetch:!1,role:"menuitem",href:"/customerhub/".concat(h.id,"/hub-home"),className:_().profile__link,onClick:A,children:"Your Customer Hub"}),(0,o.jsx)("a",{role:"menuitem",href:L,target:"_blank",rel:"noopener noreferrer",className:_().profile__link,onClick:A,children:"Your Impact Dashboard"}),!!h.stripeId&&(0,o.jsx)("span",{role:"menuitem",className:_().profile__link,onClick:()=>I(h.stripeId),children:"Your Billing"})]}):(0,o.jsxs)(o.Fragment,{children:[(0,o.jsxs)(g(),{role:"menuitem",href:F,className:[_().profile__link,_().profile__link__disabled].join(" "),onClick:A,"aria-disabled":"true",children:["Your Customer Hub",(0,o.jsx)("span",{className:_().profile__link__icon,"aria-hidden":"true",children:(0,o.jsx)(u.A,{name:"arrow",transform:"rotate(-90deg)",width:8,height:8,viewBox:"0 0 18 14",stroke:"black"})}),(0,o.jsx)("span",{className:_().profile__link__tooltip,children:T})]}),(0,o.jsxs)(g(),{role:"menuitem",href:F,className:[_().profile__link,_().profile__link__disabled].join(" "),onClick:A,"aria-disabled":"true",children:["Your Impact Dashboard",(0,o.jsx)("span",{className:_().profile__link__icon,"aria-hidden":"true",children:(0,o.jsx)(u.A,{name:"arrow",transform:"rotate(-90deg)",width:8,height:8,viewBox:"0 0 18 14",stroke:"black"})}),(0,o.jsx)("span",{className:_().profile__link__tooltip,children:T})]})]}),(0,o.jsx)("a",{role:"menuitem",href:"mailto:[email protected]",className:_().profile__link,onClick:A,children:"Contact Us"})]}),(0,o.jsx)("div",{className:_().profile__content,children:(0,o.jsx)(a.A,{type:"button",content:"Log out",variant:"black",callBack:()=>{try{localStorage.removeItem("auth_session"),localStorage.removeItem("auth_menu_open")}catch(e){}let e=window.location.pathname;window.location.assign("/auth/logout?post_logout_redirect_uri=".concat(encodeURIComponent(e)))},children:(0,o.jsx)(u.A,{name:"arrow",width:18,height:14,stroke:"white",viewBox:"0 0 18 14"})})})]})]}):null}let x=function(){return(0,o.jsx)(d.Suspense,{fallback:(0,o.jsx)("div",{children:"Loading profile..."}),children:(0,o.jsx)(f,{})})},w=function(e){var t,r;let{variant:n=""}=e,{authenticated:c,user:_,loading:u}=(0,l.w)(),p=()=>{let e=window.location.pathname+window.location.search;try{sessionStorage.setItem("auth_menu_open","1")}catch(e){}window.location.assign("/auth/login?returnTo=".concat(encodeURIComponent(e)))};return(0,d.useEffect)(()=>{try{c?localStorage.setItem("auth_session","1"):localStorage.removeItem("auth_session")}catch(e){}}
1,[c]),(0,o.jsx)(s.PL,{children:u?(0,o.jsx)("div",{className:i().login__isLoading}):c&&_?(0,o.jsx)(o.Fragment,{children:"header"!==n?(0,o.jsx)("div",{style:{display:"flex",gap:8,alignItems:"center"},children:(0,o.jsxs)("span",{children:["Logged In as ",null!=(r=null!=(t=_.name)?t:_.email)?r:"User"]})}):(0,o.jsx)(x,{})}):(0,o.jsx)(o.Fragment,{children:"header"===n?(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(g(),{href:"/get-started",role:"menuitem",className:i().links__PrimaryAction,children:"Get Started"}),(0,o.jsxs)("span",{className:i().loginInfo,children:[(0,o.jsx)(a.A,{type:"button",callBack:p,content:"Log In",variant:"link"}),(0,o.jsxs)("span",{className:i().loginInfo__icon,children:[(0,o.jsxs)("svg",{viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,o.jsx)("circle",{cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"2"}),(0,o.jsx)("path",{d:"M12 16v-4m0-4h.01",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round"})]}),(0,o.jsx)("span",{className:i().loginInfo__tooltip,children:"Earthly customers, log in to access your Impact Dashboard, Customer Hub and Billing"})]})]})]}):(0,o.jsx)(a.A,{type:"button",callBack:p,content:"Log In",variant:"black",pill:!0,block:!0})})})}},33999:(e,t,r)=>{"use strict";r.d(t,{_:()=>o});let o=e=>e&&"string"==typeof e?e.split(";").map(e=>e.trim()).filter(e=>e.includes(":")).reduce((e,t)=>{let[r,o]=t.split(":").map(e=>e.trim());if(!r||!o)return e;let a=r.replace(/-([a-z])/g,(e,t)=>t.toUpperCase());return o.includes("NaN")||"undefined"===o||(e[a]=o),e},{}):{}},34332:e=>{e.exports={h1:"Typography_h1__TPgUP",h2:"Typography_h2__mfnTQ",h3:"Typography_h3__d_2LJ",h4:"Typography_h4__C5YkM",h5:"Typography_h5__giwVr",h6:"Typography_h6__wrXNj",h4a:"Typography_h4a__D2pTb",h4b:"Typography_h4b__FEYg_",subheading1:"Typography_subheading1__XKmZV",subheading2:"Typography_subheading2__zM__q",subheading3:"Typography_subheading3__nYJU6",body1:"Typography_body1__lTw3i",body2:"Typography_body2__fdPy0",body3:"Typography_body3__xd1Gj",p:"Typography_p__QPpHQ",body4:"Typography_body4__Ha15C",subtitle:"Typography_subtitle__SDJ67",caption:"Typography_caption__rljJO",gutter_bottom:"Typography_gutter_bottom__JdtOu",no_wrap:"Typography_no_wrap__mRWxR","optional-mobile":"Typography_optional-mobile__BD5Dv","optional-desktop":"Typography_optional-desktop__xGiC7","optional-tick":"Typography_optional-tick__QofsW","font-size-l":"Typography_font-size-l__5CkTq","font-size-m":"Typography_font-size-m__vvZvy","font-size-s":"Typography_font-size-s__CDZWC","font-size-xs":"Typography_font-size-xs__eo87V","font-size-xxs":"Typography_font-size-xxs__LedMx"}},43989:(e,t,r)=>{"use strict";r.d(t,{BI:()=>d,Vh:()=>c,W6:()=>a,c6:()=>l,ko:()=>_,nG:()=>s,tK:()=>i,yy:()=>n});var o=r(49509);let a=o.env.SITE_URL||"https://earthly.org",n=o.env.SITE_NAME||"Earthly";o.env.STORYBOOK_PREVIEW_KEY;let i="https://www.facebook.com/projectearthly/",s="https://www.instagram.com/projectearthly/",l="https://twitter.com/projectearthly",c="https://www.linkedin.com/company/projectearthly/",_="6LeMyjUfAAAAAG3eCuenLM-8DEUm32fwqVdtExuV",d="/climate-solutions/earthly-plans"},44131:(e,t,r)=>{"use strict";r.d(t,{default:()=>l});var o=r(95155);r(12115);var a=r(62086),n=r.n(a),i=r(26227);let s=["section","div","nav","header","footer","article","aside"],l=e=>{let{children:t,className:r,style:a,as:l,backgroundColor:c="white",backgroundGradient:_,backgroundGradientPreset:d,overflow:u="visible",spacing:p,elementId:m,cover:h,pageHero:g,editable:y}=e,f=l&&s.includes(l)?l:"div",x=(0,i.l)(),w=p?p["".concat(x,"Spacing")]:null,j={...a,overflow:"".concat(u),backgroundColor:"".concat(c),...w?{padding:"".concat(parseInt(w,10),"px 0")}:{},..._?{backgroundImage:"".concat(_)}:{},...d?{backgroundImage:"".concat(d)}:{}},b="".concat(n().container," ").concat(h?n().containerCover:""," ").concat(g?n().containerHero:""," ").concat(r);return(0,o.jsx)(o.Fragment,{children:(0,o.jsx)(f,{...y,id:m,style:j,className:b,children:t})})}},44174:(e,t,r)=>{"use strict";r.d(t,{A:()=>a});var o=r(43989);let a=(e,t)=>grecaptcha.ready(async()=>{let r=await grecaptcha.execute(o.ko,{action:e});(await fetch("/api/verify/captcha?token="+r).then(e=>e.json())).verified?t(!0):t(!1)})},47298:(e,t,r)=>{"use strict";r.d(t,{A:()=>
1o});let o=(e,t)=>void 0===e?"":"".concat(e,"/m/").concat(t)},50582:(e,t,r)=>{"use strict";r.d(t,{default:()=>n});var o=r(95155);r(12115);var a=r(26227);let n=e=>{let{mobileSize:t,tabletSize:r,desktopSize:n,largeDesktopSize:i,fullWidth:s,editable:l}=e,c=(0,a.l)();return(0,o.jsx)("span",{...l,style:(e=>{let{mobileSize:t,tabletSize:r,desktopSize:o,largeDesktopSize:a,fullWidth:n}=e;return{display:"block",..."Mobile"===c&&{width:"".concat(t,"px"),height:"".concat(t,"px"),minWidth:"".concat(n?"100%":"".concat(t,"px")),minHeight:"".concat(t,"px")},..."Tablet"===c&&{width:"".concat(r,"px"),height:"".concat(r,"px"),minWidth:"".concat(n?"100%":"".concat(r,"px")),minHeight:"".concat(r,"px")},..."Desktop"===c&&{width:"".concat(o,"px"),height:"".concat(o,"px"),minWidth:"".concat(n?"100%":"".concat(o,"px")),minHeight:"".concat(o,"px")},..."LargeDesktop"===c&&{width:"".concat(a,"px"),height:"".concat(a,"px"),minWidth:"".concat(n?"100%":"".concat(a,"px")),minHeight:"".concat(a,"px")}}})({mobileSize:t,tabletSize:r,desktopSize:n,largeDesktopSize:i,fullWidth:s})})}},50782:e=>
1{e.exports={background:"Background_background__MO9LE"}},51434:(e,t,r)=>{"use strict";r.d(t,{w:()=>a});var o=r(12115);function a(){let[e,t]=(0,o.useState)({authenticated:!1,user:null}),[r,a]=(0,o.useState)(!0);return(0,o.useEffect)(()=>{let e=!0;return(async()=>{try{var r,o,n;let a=await fetch("/api/session",{cache:"no-store"}),i=await a.json(),s=null!=(o=null!=(r=i.authenticated)?r:i.isAuthed)&&o,l=null!=(n=i.user)?n:null;e&&t({authenticated:s,user:l})}catch(r){e&&t({authenticated:!1,user:null})}finally{e&&a(!1)}})(),()=>{e=!1}},[]),{authenticated:e.authenticated,user:e.user,loading:r}}},53433:(e,t,r)=>{"use strict";r.d(t,{ClientProvider:()=>s,t:()=>l});var o=r(95155),a=r(12115);let n={role:"starter",userId:null,id:"",projects:[]},i=(0,a.createContext)({client:n,updateClient:()=>{}}),s=e=>{let{children:t,initialClient:r}=e,[s,l]=(0,a.useState)(()=>r?{...n,...r}:n);return(0,o.jsx)(i.Provider,{value:{client:s,updateClient:e=>{l(t=>({...t,...e}))}},children:t})},l=()=>(0,a.useContext)(i)},56047:(e,t,r)=>{"use strict";r.d(t,{C:()=>n});var o=r(62086),a=r.n(o);let n=e=>{let{column:t,sm:r,md:o,lg:n,xl:i}=e,s=[];return t&&s.push(a().is_column),(r||0==r)&&s.push(a()["sm_".concat(r)]),(o||0==o)&&s.push(a()["md_".concat(o)]),(n||0==n)&&s.push(a()["lg_".concat(n)]),(i||0==i)&&s.push(a()["xl_".concat(i)]),s.join(" ")}},62086:e=>{e.exports={container:"Grid_container__NLnTb",containerCover:"Grid_containerCover__kCMwP",containerHero:"Grid_containerHero__aaR0p",row:"Grid_row__GfJ_f",rowBkg:"Grid_rowBkg__KCRoO",is_column:"Grid_is_column__tHVSQ",col:"Grid_col__v9_gE",cardRow:"Grid_cardRow__qCl8W",col__inner:"Grid_col__inner__q3HIM",col__backgroundGradient:"Grid_col__backgroundGradient__UdCxG",col__backgroundGradientLeft:"Grid_col__backgroundGradientLeft__EBBLf",col__backgroundGradientRight:"Grid_col__backgroundGradientRight__Dsnp9",sm_0:"Grid_sm_0__8avw8",sm_1:"Grid_sm_1__yNqAg",sm_2:"Grid_sm_2__2HbIR",sm_3:"Grid_sm_3__lh3ac",sm_4:"Grid_sm_4___QkRD",md_0:"Grid_md_0__lf4dN",md_1:"Grid_md_1__e3AYm",md_2:"Grid_md_2__9qhF_",md_3:"Grid_md_3__x7htD",md_4:"Grid_md_4__7wmva",md_5:"Grid_md_5__ox8oc",md_6:"Grid_md_6__o91dq",md_7:"Grid_md_7__R7_Cz",md_8:"Grid_md_8__qKNC_",md_9:"Grid_md_9__ZCgtJ",md_10:"Grid_md_10__ZrFhQ",md_11:"Grid_md_11__rfMGo",md_12:"Grid_md_12__mtO_I",lg_0:"Grid_lg_0__I0802",lg_1:"Grid_lg_1__BtiRh",lg_2:"Grid_lg_2___riyy",lg_3:"Grid_lg_3__u5vF1",lg_4:"Grid_lg_4__6U9Js",lg_5:"Grid_lg_5__hk482",lg_6:"Grid_lg_6__sg_FP",lg_7:"Grid_lg_7__d7Irm",lg_8:"Grid_lg_8__j_5CP",lg_9:"Grid_lg_9__IzyfD",lg_10:"Grid_lg_10__3bEYY",lg_11:"Grid_lg_11__Y5jFM",lg_12:"Grid_lg_12__UBIsS",xl_0:"Grid_xl_0__hE8EZ",xl_1:"Grid_xl_1__L3pbu",xl_2:"Grid_xl_2__uGKr_",xl_3:"Grid_xl_3__YHoNO",xl_4:"Grid_xl_4__UJ4vn",xl_5:"Grid_xl_5__F_uk9",xl_6:"Grid_xl_6__rYp7q",xl_7:"Grid_xl_7__oV77x",xl_8:"Grid_xl_8__5IuUj",xl_9:"Grid_xl_9__INkaA",xl_10:"Grid_xl_10__CRWd_",xl_11:"Grid_xl_11__K4uq3",xl_12:"Grid_xl_12__exUXZ",heroRow:"Grid_heroRow__DwQMa"}},65127:(e,t,r)=>{"use strict";r.d(t,{NQ:()=>u,PL:()=>d});var o=r(95155),a=r(12115),n=r(84069),i=r(51434);let s={user:null,client:null,isLoading:!0},l=(0,a.createContext)({authClient:s,refreshAuthClient:async()=>{}});function c(e){return e?"string"==typeof e.sub?e.sub.replace(/^auth0\|/,""):"string"==typeof e.id?e.id:"string"==typeof e.user_id?e.user_id.replace(/^auth0\|/,""):null:null}async function _(){try{let e=await fetch("/api/access-token",{cache:"no-store",credentials:"include"}),{accessToken:t}=await e.json();return null!=t?t:null}catch(e){return null}}let d=e=>{let{children:t}=e,{authenticated:r,user:d,loading:u}=(0,i.w)(),[p,m]=(0,a.useState)(s),h=async()=>{m(e=>({...e,isLoading:!0}));try{let e=c(d);if(!r||!e)return void m({user:null,client:null,isLoading:!1});let t=await _(),o=null,a=null;t&&(o=await (0,n.wz)(e,t));let i=await fetch("/api/backend/client-by-user/".concat(e),{cache:"no-store"}),s=await i.json();if(!i.ok||(null==s?void 0:s.error)||!(null==s?void 0:s.id)){console.warn("[AuthClient] fallback client-by-user failed:",s),m({user:d?{...d,id:e}:null,client:null,isLoading:!1});return}a=s;let l=await fetch("/api/backend/clients-projects/".concat(a.id),{cache:"no-store"}),u=await l.json();if(!l.ok||!Array.isArray(u)){console.warn("[AuthClient] fallback clients-projects failed:",u),m({user:d?{...d,id:e}:null,client:a,isLoading:!1});return}a.projects=u.filter(e=>null==e?void 0:e.id).map(e=>e.id);let p={...null!=d?d:{},...null!=o?o:{},id:e};m({user:p,client:null!=a?a:null,isLoading:!1})}catch(t){console.error("[AuthClient] fetchAuthClient error:",t);let e=c(d);
1m({user:d?{...d,id:e}:null,client:null,isLoading:!1})}};return(0,a.useEffect)(()=>{u||h()},[u,r]),(0,o.jsx)(l.Provider,{value:{authClient:p,refreshAuthClient:h},children:t})},u=()=>(0,a.useContext)(l)},65585:(e,t,r)=>{"use strict";r.d(t,{A:()=>o});let o=r(3332).default},71122:(e,t,r)=>{"use strict";r.d(t,{A:()=>a});var o=r(12115);function a(e){let t=(0,o.useCallback)(t=>{let r=window.matchMedia(e);return r.addEventListener("change",t),()=>r.removeEventListener("change",t)},[e]);return(0,o.useSyncExternalStore)(t,()=>window.matchMedia(e).matches,()=>!1)}},73413:(e,t,r)=>{"use strict";r.d(t,{n:()=>c,T:()=>_});var o=r(95155),a=r(38637),n=r(12115);let i=(0,n.createContext)(null),s={Accept:"application/json","Content-Type":"application/json"},l=e=>{let{children:t}=e,r=async(e,t,r)=>{let o="".concat("https://api.hsforms.com/submissions/v3/integration/submit","/").concat("20298501","/").concat(t);"GDPR"in e&&delete e.GDPR;let a={fields:(e=>{let t=[];for(let r in e)t.push({name:r,value:e[r]});return t})(e),context:(()=>{var e;
1let t=null==(e=document.cookie.match(/(?:^|;\s*)hubspotutk=([0-9a-f]{32})(?:;|$)/i))?void 0:e[1];return{...t?{hutk:t}:{},pageUri:window.location.href,pageName:document.title}})()};r&&(a.legalConsentOptions={consent:{consentToProcess:r.consent,text:r.policy}});let n={method:"POST",headers:s,body:JSON.stringify(a)};try{let e=await fetch(o,n),t=await e.json(),{errors:r=[]}=t;if(e.ok&&t&&r.length<1)return{error:null};if(console.error({status:e.status,body:t}),r.find(e=>"INVALID_EMAIL"===e.errorType||"BLOCKED_EMAIL"===e.errorType))return{error:{message:"Invalid email, please provide your business email."}}}catch(e){console.error(e.message)}return{error:{message:"Sorry that did not work. Try again."}}};return(0,o.jsx)(i.Provider,{value:{submitForm:r},children:t})};l.propTypes={children:a.PropTypes.node.isRequired};let c=l,_=()=>{let e=(0,n.useContext)(i);if(!e)throw Error("useHubspot must be used within a HubspotProvider");return e}},73540:(e,t,r)=>{"use strict";r.d(t,{g:()=>n}),r(95155);var o=r(12115);let a=(0,o.createContext)(!1),n=()=>(0,o.useContext)(a)},78212:(e,t,r)=>{"use strict";r.d(t,{fI:()=>a.default,fv:()=>n.default,mc:()=>o.default});var o=r(44131),a=r(89246),n=r(87480);o.default,a.default,n.default},79374:(e,t,r)=>{"use strict";r.d(t,{D:()=>v});var o=r(95155),a=r(12115),n=r(65585),i=r(81082),s=r.n(i),l=r(85444),c=r.n(l),_=r(30509),d=r(18228),u=r(71122),p=r(65127),m=r(87940),h=r(32542),g=r(47298),y=r(6874),f=r.n(y),x=r(6796),w=r(87663),j=r(73413);let b="cart-v1";function v(){let{authClient:e}=(0,p.NQ)(),{user:t,client:r}=e,{submitForm:i}=(0,j.T)(),{addToCart:l,selectedProjects:y,initCart:v,removeFromCart:k,resetCart:C,currentCurrency:N="en-US"}=(0,x._)(),[B,S]=(0,a.useState)(!1),[P,L]=(0,a.useState)(!1),[F,T]=(0,a.useState)(""),[A,G]=(0,a.useState)(!0),[I,R]=(0,a.useState)(!1),D=(0,u.A)("(max-width: 1238px)"),E="en-US"===N?"$":"\xa3",q=(0,a.useRef)(!1);(0,a.useEffect)(()=>{if(!q.current){try{let t=localStorage.getItem(b);if(t){var e;let r=null!=(e=JSON.parse(t))?e:[];v(r.filter(e=>!!e.id).map(e=>({...e,quantity:"number"==typeof e.quantity?e.quantity:1})))}}catch(e){}q.current=!0}},[v]);let[M,H]=(0,a.useState)("");(0,a.useEffect)(()=>{let e=new URLSearchParams(window.location.search),t="true"===e.get("success"),r="true"===e.get("canceled")||"false"===e.get("success");t?(localStorage.setItem(b,"[]"),C(),H("Thank you for your purchase! You will receive an email confirmation.")):r&&H("Checkout was cancelled.")},[]);let U=(0,a.useRef)(!1);(0,a.useEffect)(()=>{if(U.current)return;let e=new URLSearchParams(window.location.search),r="true"===e.get("success"),o="true"===e.get("canceled")||"false"===e.get("success");if(r)return void sessionStorage.removeItem("checkout_pending");if(!o||!(null==t?void 0:t.email))return;let a=sessionStorage.getItem("checkout_pending");if(a){sessionStorage.removeItem("checkout_pending"),U.current=!0;try{var n;let e=JSON.parse(a),r=(null!=(n=e.items)?n:[]).map(e=>"".concat(e.name," x").concat(e.qty)).join(", "),o="USD"===e.currency?"$":"\xa3",s=["Stripe checkout abandoned","Mode: ".concat(e.mode),"Total: ".concat(o).concat(e.totalCost," ").concat(e.currency),"Items: ".concat(r)].join("\n");i({email:t.email,message:s},"82acffbd-25ed-4796-b925-aec4b2eae5e9")}catch(e){}}},[t,i]);let O=e=>{var t,r,o;return null!=(o="en-US"===N?null==(t=e.price)?void 0:t.usd:null==(r=e.price)?void 0:r.gbp)?o:0},W=(0,a.useMemo)(()=>y.reduce((e,t)=>e+O(t)*t.quantity,0).toFixed(2),[y,N]),Y=(0,a.useCallback)(async e=>{if(!t)return void window.location.assign("/auth/login?returnTo=".concat(encodeURIComponent(window.location.pathname)));try{var o,a,n;let i=[];"subscription"===e&&(null==r||null==(a=r.pricingPlan)?void 0:a.level)!=="complete"&&(null==r||null==(n=r.pricingPlan)?void 0:n.level)!=="standard"&&(i=[{price:"price_1RBYsCEHc6GHdEB1KIHaHp9n",quantity:1}]);let s=y.map(t=>({price:"subscription"===e?t.price_id_subscription:t.price_id,quantity:t.quantity,adjustable_quantity:{enabled:!0,minimum:t.min_value,maximum:999999}})),l=null;if(t.stripeId)console.log("[OrderSummary] Using existing user.stripeId:",t.stripeId),l=t.stripeId;else{console.log("[OrderSummary] No user.stripeId found, fetching from API. user.id:",t.id,"user object:",t);let e=await fetch("/api/backend/customer-stripe-id/".concat(t.id)),r=await e.json();console.log("[OrderSummary] API response:",{status:e.status,data:r}),l=r.customerId}if(!l||l.error)return void T("Unable to link customer. Please contact support.");let c=window.location.origin,_={line_items:s,optional_items:i,mode:e,currency:"en-US"===N?"USD":"GBP",customer_email:t.email,customer:l,userId:t.id,success_url:I?"".concat(c,"/success-christmas-gift-nature-certificate"):"".concat(c,"/success"),cancel_url:"".concat(c,"/products/buy-now/?success=false#cart")};try{let t={mode:e,currency:"en-US"===N?"USD":"GBP",totalCost:W,items:y.map(e=>({name:e.displayName,qty:e.quantity}))};sessionStorage.setItem("checkout_pending",JSON.stringify(t))}catch(e){}let d=await (0,w.JG)(_);console.log(await d),(null==(o=d.error)?void 0:o.message)&&T(d.error.message)}catch(e){console.log(e),T(e.message)}},[t,y,N,I]);return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsxs)("div",{className:"".concat(s()["order-info"]," ").concat(A?"":s().orderHeader__closed),children:[(0,o.jsxs)("div",{className:s()["order-header"],children:[(0,o.jsxs)("div",{className:s().orderHeader__wrapper,children:[D&&(0,o.jsxs)("div",{className:"".concat(s().cart," ").concat(s().cart__mobile),children:[(0,o.jsx)(_.A,{name:"cart",width:26,height:26,viewBox:"0 0 26 26"}),y.length>0&&(0,o.jsx)("div",{className:s().cart__counter,children:y.length})]}),(0,o.jsx)(n.A,{element:"h3",variant:"subheading2",gutterBottom:.8,children:"Your Projects"})]}),D&&(0,o.jsx)("div",{className:"".concat(s().cart__detail," ").concat(A?"":s().cart__detail_closed),onClick:()=>G(!A),children:(0,o.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",height:"1em",viewBox:"0 0 512 512",children:(0,o.jsx)("path",{d:"M233.4 105.4c12.5-12.5 32.8-12.5 45.3 0l192 192c12.5 12.5 12.5 32.8 0 45.3s-32.8 12.5-45.3 0L256 173.3 86.6 342.6c-12.5 12.5-32.8 12.5-45.3 0s-12.5-32.8 0-45.3l192-192z"})})})]}),A&&(0,o.jsx)(o.Fragment,{children:0===y.length?M?(0,o.jsx)("p",{children:M}):(0,o.jsxs)("div",{className:s()["order-empty-cart"],children:[(0,o.jsx)("img",{src:"/img/cart_empty.svg",alt:"Your cart is empty",loading:"lazy"}),(0,o.jsx)(n.A,{element:"h5",variant:"subheading3",gutterBottom:1.2,className:s()["project-name"],children:"The cart is empty"})]}):y.map(e=>{var t,r;let a,i;return(0,o.jsx)("div",{children:(0,o.jsxs)("div",{className:s()["project-wrapper"],children:[(0,o.jsxs)("div",{className:s()["project-with-image-wrapper"],children:[(0,o.jsx)("div",{children:(0,o.jsx)("img",{src:(0,g.A)(e.image,"60x80/filters:quality(60)"),alt:e.displayName,loading:"lazy"})}),(0,o.jsxs)("div",{className:s()["project-name-wrapper"],children:[(0,o.jsxs)("div",{className:s()["project-name-inner"],children:[(0,o.jsx)(n.A,{element:"h5",variant:"subheading3",gutterBottom:1.45,className:s()["project-name"],children:e.displayName}),(0,o.jsx)(n.A,{element:"h6",variant:"subtitle",gutterBottom:.6,children:(a=O(e),i=null!=(t=e.pricePerTree)&&t,null!=(r=e.isBiodiversityProject)&&r?"".concat(E).concat(a," /credit"):i?"".concat(E).concat(a," /tree"):"".concat(E).concat(a," /tonne"))})]}),(0,o.jsx)(d.A,{content:"Remove from cart",variant:"primary",ghost:!0,className:s()["close-button"],callBack:()=>k(e),children:(0,o.jsx)(_.A,{name:"plus",width:14,height:14,viewBox:"0 0 14 14",stroke:"#000"})})]})]}),(0,o.jsxs)("div",{className:s()["project-item-footer"],children:[(0,o.jsx)("div",{className:c().quantityControl
1s,children:(0,o.jsxs)("div",{children:[(0,o.jsx)("button",{className:c().quantityControls__plusMinus,type:"button",disabled:e.quantity<=(e.min_value||0),onClick:()=>l(e,-1),"data-cy":"input-minus",children:(0,o.jsx)(_.A,{name:"quantity-minus",width:18,height:14,viewBox:"0 0 20 20"})}),(0,o.jsx)("input",{type:"text",pattern:"[0-9]*",value:e.quantity,className:c()["order-input"],onChange:t=>(0,m.KI)(t,l,e.min_value,e),onBlur:t=>(0,m.FJ)(t,l,e.min_value,e),"data-cy":"input-text"}),(0,o.jsx)("button",{className:c().quantityControls__plusMinus,type:"button",disabled:e.quantity===(0,m.ub)(),onClick:()=>l(e,1),"data-cy":"input-plus",children:(0,o.jsx)(_.A,{name:"quantity-plus",fill:"black",width:18,height:14,viewBox:"0 0 20 20"})})]})}),(0,o.jsxs)("div",{className:s()["project-item-footer-price"],children:[E,(O(e)*e.quantity).toFixed(2)]})]})]})},e.id)})})]}),A&&(0,o.jsxs)(o.Fragment,{children:[y.length>0&&(0,o.jsxs)("div",{className:s()["payment-proceeding"],children:[(0,o.jsxs)("div",{className:s()["totalcost-wrapper"],"data-cy":"order-total",children:[(0,o.jsx)(n.A,{variant:"body3",className:s()["title-cost"],children:"Total"}),(0,o.jsx)(n.A,{variant:"h4b",className:s().cost,children:"".concat(E).concat(W)})]}),(0,o.jsx)("div",{className:s()["totalcost-taxes"],children:"Additional taxes, if applicable, will be calculated during checkout based on your location."}),(0,o.jsxs)("div",{className:"".concat(s().consent," ").concat(P?s().consent__error:""),children:[B?(0,o.jsx)(d.A,{callBack:()=>S(!1),content:"Uncheck",variant:"primary",ghost:!0,children:(0,o.jsx)(_.A,{name:"checkbox-selected",width:14,height:14,viewBox:"0 0 14 14"})}):(0,o.jsx)(d.A,{callBack:()=>{S(!0),L(!1)},content:"Check",variant:"primary",ghost:!0,children:(0,o.jsx)(_.A,{name:"checkbox",width:14,height:14,viewBox:"0 0 14 14"})}),(0,o.jsxs)("p",{children:["I comply with the "," ",(0,o.jsx)(f(),{href:"/earthly-terms",target:"_blank",children:"terms and conditions"})," ","*"]})]}),(0,o.jsx)(d.A,{content:"Invest monthly",variant:"secondary",callBack:()=>B?Y("subscription"):L(!0),block:!0,pill:!0}),(0,o.jsx)("br",{}),(0,o.jsx)(d.A,{content:"Invest one time",variant:"blank",color:"primary",callBack:()=>B?Y("payment"):L(!0),block:!0,pill:!0}),(0,o.jsx)("br",{})]}),(0,o.jsxs)("div",{className:s().login,children:[(0,o.jsx)(h.default,{variant:"minimal"}),F&&(0,o.jsx)("p",{className:s().checkout_error,children:F})]})]})]})}},81082:e=>{e.exports={projectsHeader:"BuyNow_projectsHeader__COcXW",orderSummary:"BuyNow_orderSummary__6mqzx",orderSummaryCol:"BuyNow_orderSummaryCol__SPMFK","order-info":"BuyNow_order-info__9M6zG","order-header":"BuyNow_order-header__WVa5e","order-empty-cart":"BuyNow_order-empty-cart__YHMNs","order-empty-info":"BuyNow_order-empty-info__OJdT1","project-wrapper":"BuyNow_project-wrapper__89PHZ","project-item-footer":"BuyNow_project-item-footer__oY6Vr","project-item-footer-price":"BuyNow_project-item-footer-price__6xbcC","project-with-image-wrapper":"BuyNow_project-with-image-wrapper__dIBD3","project-name-wrapper":"BuyNow_project-name-wrapper__ErYxU","project-type":"BuyNow_project-type__bTKEa","project-name":"BuyNow_project-name__Ne4YR","close-button":"BuyNow_close-button__DEshF","button-details":"BuyNow_button-details__j7krb","button-details--hide":"BuyNow_button-details--hide__jK_Nm","subscription-info":"BuyNow_subscription-info__hnbuq","payment-proceeding":"BuyNow_payment-proceeding__3UWfT","totalcost-wrapper":"BuyNow_totalcost-wrapper___Vo2u","totalcost-taxes":"BuyNow_totalcost-taxes__IYAKF","title-cost":"BuyNow_title-cost__RYmVp",consent:"BuyNow_consent__gEw3J",consent__error:"BuyNow_consent__error__W_pi6",cost:"BuyNow_cost__aVALg","orderSummary--detailed":"BuyNow_orderSummary--detailed__03L1E",orderSummaryMobile:"BuyNow_orderSummaryMobile__RCcB0",orderSummaryDesktop:"BuyNow_orderSummaryDesktop__YR9ml",orderSummaryPopup:"BuyNow_orderSummaryPopup__KyMfc",login:"BuyNow_login__MYwtG",orderHeader__closed:"BuyNow_orderHeader__closed__cS_Uj",orderHeader__wrapper:"BuyNow_orderHeader__wrapper__ihwz4",cart:"BuyNow_cart__bd842",cart__mobile:"BuyNow_cart__mobile__4qfZ1",cart__detail:"BuyNow_cart__detail__MmljC",cart__detail_closed:"BuyNow_cart__detail_closed___e3rp",cart__counter:"BuyNow_cart__counter__e3ZnU",projectCard:"BuyNow_projectCard__MFmvQ",contactSales:"BuyNow_contactSales__JvDVP",popupWrapper:"BuyNow_popupWrapper__cGdvs",popup:"BuyNow_popup__83jlm",closeButton:"BuyNow_closeButton__nBqXj",checkout_error:"BuyNow_checkout_error__6FGkL"}},84069:(e,t,r)=>{"use strict";r.d(t,{$I:()=>i,wz:()=>n});let o="https://production.backend.admin.earthly.org/v3",a=async()=>{try{let e=await fetch("/api/access-token",{cache:"no-store"}),t=await e.json();if(null==t?void 0:t.accessToken)return t.accessToken}catch(e){}return null},n=async(e,t)=>{let r=null!=t?t:await a();return(await fetch("".concat(o,"/user/").concat(e),{headers:{Authorization:"Bearer ".concat(r)}})).json()},i=async(e,t)=>{let r=null!=t?t:await a();return(await fetch("".concat(o,"/projects/client/").concat(e),{headers:{Authorization:"Bearer ".concat(r)}})).json()}},85444:e=>{e.exports={card:"ProjectCard_card__spNSj",card__isNew:"ProjectCard_card__isNew__xC8Sq",card__metaDataWrapper:"ProjectCard_card__metaDataWrapper__lSkOp",card__metaData:"ProjectCard_card__metaData__wH4yY",card__metaDataIcon:"ProjectCard_card__metaDataIcon__aLddg",card__metaDataIcon_pin:"ProjectCard_card__metaDataIcon_pin__9dCQ_",card__imageLink:"ProjectCard_card__imageLink__ZUECm",card__inner:"ProjectCard_card__inner__492tq",card__innerBuyNow:"ProjectCard_card__innerBuyNow__oDTb6",card__titleIcon:"ProjectCard_card__titleIcon__Zvj0R",rating:"ProjectCard_rating__ySVCC",rating__inner:"ProjectCard_rating__inner__vGaY1",biodiversityRating:"ProjectCard_biodiversityRating__1psad",biodiversityBadge:"ProjectCard_biodiversityBadge__PKY2R",price:"ProjectCard_price__90xAs",title:"ProjectCard_title__T4jsW",card__meta:"ProjectCard_card__meta__huB_U",caption:"ProjectCard_caption__DmQoI",descriptionSummary:"ProjectCard_descriptionSummary__8ZlPO",descriptionSummaryLink:"ProjectCard_descriptionSummaryLink__PITog",card__meta__top:"ProjectCard_card__meta__top__0gnpG",card__meta__bottom:"ProjectCard_card__meta__bottom__6TKjz",split:"ProjectCard_split__avn9S",card__metaBuyNow:"ProjectCard_card__metaBuyNow__SNfIR",cardBuynow:"ProjectCard_cardBuynow__T_hBY",buyNowOnly__toolbar:"ProjectCard_buyNowOnly__toolbar__F6Wue",buyNowOnly__contactSales:"ProjectCard_buyNowOnly__contactSales__ESZn3",card__metaStacked:"ProjectCard_card__metaStacked__sxjE2",card__assessedBadge:"ProjectCard_card__assessedBadge__LxD2H",card__categoryBar:"ProjectCard_card__categoryBar__HYqSn",catCarbon:"ProjectCard_catCarbon__BXoWB",toolbar:"ProjectCard_toolbar__3_lWp",quantityControl
1s:"ProjectCard_quantityControls__woGJt",catBiodiversity:"ProjectCard_catBiodiversity__9Dlmf",catTrees:"ProjectCard_catTrees__mOPg0",catMarine:"ProjectCard_catMarine__7hrbc",catInnovation:"ProjectCard_catInnovation__SOk34",selected:"ProjectCard_selected__wo9ZT",divider:"ProjectCard_divider__wCkQG",toolbar_sub:"ProjectCard_toolbar_sub__tpkI1",quantityControls__plusMinus:"ProjectCard_quantityControls__plusMinus__SaK7k","order-input":"ProjectCard_order-input__ohqf0",addToCart:"ProjectCard_addToCart__Rgi8r",addToCartSecondary:"ProjectCard_addToCartSecondary__vrPaK",contactSales:"ProjectCard_contactSales__UF7dY",currencies:"ProjectCard_currencies___lT0M"}},87480:(e,t,r)=>{"use strict";r.d(t,{default:()=>c});var o=r(95155),a=r(62086),n=r.n(a),i=r(56047),s=r(26227),l=r(12115);let c=e=>{let{children:t,className:r="",style:a,sm:c,md:_,lg:d,xl:u,colInner:p=!1,colInnerAlign:m="baseline",backgroundGradient:h,pinBackgroundGradient:g="contained",order:y={orderMobile:void 0,orderTablet:void 0,orderDesktop:void 0,orderLargeDesktop:void 0},noSidePadding:f=!1,backgroundGradientOffsetDesktop:x=0,backgroundGradientOffsetMobile:w=0}=e;(0,l.useEffect)(()=>{document.documentElement.style.setProperty("--scrollbar-width",window.innerWidth-document.documentElement.clientWidth+"px")},[]);let j=(0,i.C)({column:!1,sm:c,md:_,lg:d,xl:u}),b=(0,s.l)(),v=y?y["order".concat(b)]:null,k={...a},C={};return h&&(k={...k,position:"relative"},C={...x&&"Mobile"!==b&&"right"===g&&{left:"".concat(x,"px")},...x&&"Mobile"!==b&&"left"===g&&{right:"".concat(x,"px")},...x&&"Mobile"===b&&{top:"".concat(w,"px")},backgroundImage:"".concat(h)}),f&&(k={...k,padding:0}),v&&(k={...k,order:"".concat(v)}),(0,o.jsxs)("div",{style:k,className:"".concat(n().col," ").concat(r,"  ").concat(j),children:[h&&(0,o.jsx)("div",{style:C,className:(()=>{let e=[n().col__backgroundGradient];return"left"===g&&e.push(n().col__backgroundGradientLeft),"right"===g&&e.push(n().col__backgroundGradientRight),e.join(" ")})()}),p&&(0,o.jsx)("div",{className:n().col__inner,style:{alignItems:"".concat(m)},children:t}),!p&&t]})}},87663:(e,t,r)=>{"use strict";r.d(t,{JG:()=>n});var o=r(7368),a=r(23464);let n=async e=>{let t=(0,o.c)("pk_live_51HjOrgEHc6GHdEB1HYUM3quWinjc3u1fazxJZU759F0yCPd0JIQbrzQ3tJkkdhDzXnyRW8iYFZP1MPhS4Kx8jtSg00lALTH546"),r=await t,n=await a.A.post("/api/stripe/checkout",{body:e});return await r.redirectToCheckout({sessionId:n.data.sessionId})}},87940:(e,t,r)=>{"use strict";r.d(t,{D_:()=>i,FJ:()=>n,KI:()=>a,ub:()=>o});let o=()=>5e4,a=(e,t,r,a)=>{let{validity:n,value:i}=e.target;if(n.valid){let e=o();t(+i<=e?+i:e)}},n=(e,t,r,o)=>{let{validity:a,value:n}=e.target;if(a.valid&&"undefined"!==n&&n<=r)return void t(r)},i=e=>{switch(e){case"Tree planting":case"Forest protection":case"Tropical Forest Protection":case"Forest Management":default:return"forests";case"Mangrove Regeneration":return"mangroves";case"Afforestation/Reforestation; Improved Land Management":case"Dryland restoration":return"nature";case"Peatland Protection":case"Peatland Protection & Restoration":return"peatlands";case"Seaweed Farming":return"peatlands-circle";case"Agroforestry":return"agroforestry-circle"}}},89246:(e,t,r)=>{"use strict";r.d(t,{default:()=>_});var o=r(95155),a=r(62086),n=r.n(a),i=r(56047),s=r(33999),l=r(71122),c=r(20034);r(12115);let _=e=>{let{children:t,className:r="",flexWrap:a=!1,alignItems:_="",style:d,column:u=!1,mobileStyles:p="",justifyItems:m="",cardRow:h=!1,backgroundColor:g,roundedCorners:y=!1,backgrounds:f=[],backgroundGradient:x,isHero:w=!1}=e,j=(0,i.C)({column:u,sm:!1,md:!1,lg:!1,xl:!1}),b=(0,l.A)("(max-width: 767px)");return(0,o.jsxs)("div",{style:(e=>{let{flexWrap:t,alignItems:r}=e;return{...t&&{flexWrap:"wrap"},...r&&{alignItems:"".concat(r)},...m&&{justifyContent:"".concat(m)},...b&&(0,s._)(p),...x?{backgroundImage:"".concat(x)}:{},...g&&{background:"".concat(g)},...y&&{borderRadius:"1rem"},...f.length>0&&{position:"relative"}}})({flexWrap:a,alignItems:_}),className:"".concat(n().row," ").concat(f.length>0?n().rowBkg:""," ").concat(j," ").concat(h?n().cardRow:""," ").concat(r," ").concat(w&&n().heroRow),children:[f.length>0&&f.map(e=>(0,o.jsx)(c.A,{image:e.image.filename,alt:e.image.filename,styles:{Mobile:e.mobileStyle,Tablet:e.tabletStyle,Desktop:e.desktopStyle,LargeDesktop:e.largeDesktopStyle}},e._uid)),t]})}},91758:e=>{e.exports={avatar:"Profile_avatar__cB8V6",avatar__image:"Profile_avatar__image__6UqKh",profile__isLoading:"Profile_profile__isLoading__nbBUr",spin:"Profile_spin__2TeZ2",profile__dropdown:"Profile_profile__dropdown__55z6A",profile__content:"Profile_profile__content__hRTdL",profile__links:"Profile_profile__links__oUx90",profile__link:"Profile_profile__link__mCemz",profile__link__disabled:"Profile_profile__link__disabled__QDS_v",profile__link__icon:"Profile_profile__link__icon__ajIHn",profile__link__tooltip:"Profile_profile__link__tooltip__L6BTp",profile__image:"Profile_profile__image__F92vv"}},92314:e=>{e.exports={buttonText:"Button_buttonText__7JsE9",large:"Button_large__zOQwP",isPrimary:"Button_isPrimary__q_ojL",ghost:"Button_ghost__hhEqO",pill:"Button_pill__D4lWh",isSecondary:"Button_isSecondary__LF3SR",isBlack:"Button_isBlack__JO46_",isBlank:"Button_isBlank__ZCMRe",isMuted:"Button_isMuted__ZWq80",isBlock:"Button_isBlock__dal2H",isLink:"Button_isLink__QfEUE",isAlignedLeft:"Button_isAlignedLeft__N7MoE",isAlignedCenter:"Button_isAlignedCenter__hnOkI",isAlignedRight:"Button_isAlignedRight__Axo4c",isLoading:"Button_isLoading__8xt_l",spin:"Button_spin__I_FAO",isSuccess:"Button_isSuccess__pNvf8"}}
1,93335:(e,t,r)=>{"use strict";r.d(t,{default:()=>h});var o=r(95155),a=r(49694),n=r(37129),i=r(12115),s=r(73413),l=r(3439),c=r.n(l),_=r(18228),d=r(30509),u=r(44174);r(35695);let p="I agree to allow Earthly to store and process my personal data.",m={text:["string"],textarea:["string"],number:["number"],tel:["number"],url:["string","url"],email:["string","email"],select:["string"]},h=e=>{let{form:t,formId:r,useCaptcha:l=!1,GDPRcheckbox:h=!1,successPage:g=!1,variant:y="default"}=e,{fields:f}=t,[x,w]=(0,i.useState)(""),{submitForm:j}=(0,s.T)(),b=((e,t)=>{let r={};return e.forEach(e=>r[e.name]=""),t&&(r.GDPR=!1),r})(f,h),v=((e,t)=>{let r={};return e.forEach(e=>r[e.name]=((e,t)=>{let r=m[e],o=n;return r.forEach(e=>o=o[e]()),t&&(o=o.required("Required")),o})(e.type,e.required)),t&&(r.GDPR=n.bool().oneOf([!0])),n.object().shape(r)})(f,h),k=async(e,t)=>{let{resetForm:o}=t,a=h?{consent:e.GDPR,policy:p}:null,{error:n}=await j(e,r,a);n?w(n.message):(w("Success!"),(null==g?void 0:g.cached_url)&&(window.location="/"+g.cached_url)),o()};return(0,o.jsx)(a.l1,{initialValues:b,onSubmit:l?(e,t)=>{(0,u.A)("DynamicFormSubmit",r=>{r?k(e,t):w(" reCAPTCHA ERROR ")})}:k,validationSchema:v,children:e=>{let{errors:t,touched:r,dirty:n,isValid:i}=e;return(0,o.jsxs)(a.lV,{className:"".concat(c().contactForm," ").concat("compact"===y?c().compact:""),children:[f.map(e=>(0,o.jsxs)("div",{className:c().formRow,children:[e.showLabel&&e.label&&(0,o.jsx)("label",{htmlFor:"DynamicForm"+e.name,children:e.label}),((e,t,r)=>{let n=[c().input,c().select,t[e.name]&&r[e.name]&&c()["input--error"]].join(" ");switch(e.type){case"select":return(0,o.jsxs)(a.D0,{id:"DynamicForm"+e.name,name:e.name,as:"select",className:[n,c().select],children:[(0,o.jsx)("option",{value:"none",children:e.placeholder}),e.options.map((e,t)=>(0,o.jsx)("option",{value:e.value,children:e.text},e.value+t))]},e.name);case"textarea":return(0,o.jsx)(a.D0,{id:"DynamicForm"+e.name,name:e.name,placeholder:e.placeholder||"",type:e.type,as:"textarea",rows:"6",className:n},e.name);default:return(0,o.jsx)(a.D0,{id:"DynamicForm"+e.name,name:e.name,placeholder:e.placeholder||"",type:e.type,className:n,label:e.label},e.name)}})(e,t,r)]},e.name)),h&&(0,o.jsx)("div",{children:(0,o.jsxs)("label",{className:c().gdpr,children:[(0,o.jsx)(a.D0,{className:c().gdprcheckbox,id:"gdprcheckbox",name:"GDPR",type:"checkbox"}),(0,o.jsx)("span",{className:c().gdprlabel,children:p})]})}),l&&(0,o.jsx)("div",{children:(0,o.jsxs)("p",{className:c().captchapolicy,children:["This site is protected by reCAPTCHA and the Google\xa0",(0,o.jsx)("a",{href:"https://policies.google.com/privacy",children:"Privacy Policy"})," ","and\xa0",(0,o.jsx)("a",{href:"https://policies.google.com/terms",children:"Terms of Service"})," ","apply."]})}),(0,o.jsx)(_.A,{type:"submit",className:c().submit,content:"Submit",variant:"primary",align:"right",muted:!(n&&i),children:(0,o.jsx)(d.A,{name:"arrow",width:18,height:14,viewBox:"0 0 18 14",stroke:"#000"})}),x&&(0,o.jsx)("p",{className:c().formResponse,children:x})]})}})}},95280:e=>{e.exports={login:"Login_login__lkZV6",login__isLoading:"Login_login__isLoading__TdVpw",spin:"Login_spin__3oryH",login__input:"Login_login__input__UbJ25","login__input--error":"Login_login__input--error__sVn9y",login__headline:"Login_login__headline__qSrbC",login__header:"Login_login__header__Tg4t6",login__content:"Login_login__content__NmQGY",login__footer:"Login_login__footer__iiGLs",login__footerLink:"Login_login__footerLink__2PcVM",login__sub_footer:"Login_login__sub_footer__uu8XO",login__group:"Login_login__group__XWC0S",login__hint:"Login_login__hint__g9n_2",login__profileForm_field:"Login_login__profileForm_field__rHslu",login__profileForm_button:"Login_login__profileForm_button__lLRFp",login__profileForm_isPublic:"Login_login__profileForm_isPublic__zsVaD",login__profileForm_isPublic_text:"Login_login__profileForm_isPublic_text__k77Vd",login__profileForm_avatarInput:"Login_login__profileForm_avatarInput__PkoWP",login__profileForm:"Login_login__profileForm__MxFQB",login__profileForm_avatar:"Login_login__profileForm_avatar__BU4lp",login__profileForm_avatarButton:"Login_login__profileForm_avatarButton__ez0A6",login__profileForm_avatarButton_icon:"Login_login__profileForm_avatarButton_icon__GK2PJ",login__registerForm:"Login_login__registerForm__2t7_c",login__closeButton:"Login_login__closeButton__FlZLs",login__checkbox:"Login_login__checkbox__UhWGu",login__checkboxError:"Login_login__checkboxError__DjrlF",login__message:"Login_login__message__Pjhud",login__popupWrapper:"Login_login__popupWrapper__zA0DC",login__popup:"Login_login__popup__4rX0y",login__switch:"Login_login__switch__jsslU",switch:"Login_switch__dR6fI",slider:"Login_slider__Slyjn",passwordRecovery_wrapper:"Login_passwordRecovery_wrapper__L8_88",passwordRecovery:"Login_passwordRecovery__Rorku",errorText:"Login_errorText__Lmm35",links__PrimaryAction:"Login_links__PrimaryAction__mlGQk",links__SecondaryAction:"Login_links__SecondaryAction__TDQ92",loginInfo:"Login_loginInfo__NCP4T",loginInfo__icon:"Login_loginInfo__icon__7QojY",loginInfo__tooltip:"Login_loginInfo__tooltip__TsaE_"}},96047:(e,t,r)=>{"use strict";r.d(t,{default:()=>u});var o=r(95155),a=r(49694),n=r(12115),i=r(37129),s=r(73413),l=r(3439),c=r.n(l),_=r(30509),d=r
1(18228);let u=()=>{let{submitForm:e}=(0,s.T)(),[t,r]=(0,n.useState)(""),l=async(t,o)=>{let{resetForm:a}=o,{error:n}=await e(t,"f56370c1-61d4-4b87-9ce4-17a605a14406");n?r(n.message):r("Success!"),a()},u=i.object().shape({email:i.string().email().required("Required")});return(0,o.jsx)(a.l1,{initialValues:{email:""},onSubmit:l,validationSchema:u,children:e=>{let{errors:r,touched:n,dirty:i,isValid:s}=e;return(0,o.jsxs)(a.lV,{className:c().footerSubscribe,children:[(0,o.jsxs)("h4",{children:["For updates on our projects and progress,",(0,o.jsx)("br",{})," sign up here:"]}),(0,o.jsxs)("div",{className:c().inputContainer,children:[(0,o.jsx)(a.D0,{id:"SubscriptionFormEmail",name:"email",type:"email",placeholder:"Email",className:[c().input,r.email&&n.email&&c()["input--error"]].join(" ")}),(0,o.jsx)(d.A,{type:"submit",content:"Submit",variant:"primary",ghost:!0,muted:!(i&&s),children:(0,o.jsx)(_.A,{name:"arrow",width:18,height:14,viewBox:"0 0 18 14",stroke:"white"})}),t&&(0,o.jsx)("p",{className:c().subscribeMessage,children:t})]})]})}})}},96615:(e,t,r)=>{"use strict";r.d(t,{QH:()=>i,bQ:()=>c,d4:()=>a,iB:()=>o,lq:()=>l});let o=["starter","standard","complete"],a={starter:"Free",standard:"Standard",complete:"Complete"},n={legacy:"starter",free:"starter",welcome:"starter",starter:"starter",standard:"standard",complete:"complete",enterprise:"complete"},i=e=>{var t;return null!=(t=n[String(null!=e?e:"").toLowerCase()])?t:"starter"},s=e=>{let t=new Set((null!=e?e:[]).map(i));return o.filter(e=>t.has(e))},l=(e,t)=>s(t).includes(i(e)),c=e=>{let t=(e=>{var t;return null!=(t=s(e).find(e=>"starter"!==e))?t:null})(e);return t?a[t]:null}}}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.