Get Crikey’s independent election coverage now for $110 off.

Create a free account, or log in

* Valid email addresses that are supported: *

    *
  • niceandsimple@example.com *
  • very.common@example.com *
  • a.little.lengthy.but.fine@dept.example.com *
  • disposable.style.email.with+symbol@example.com *
  • other.email-with-dash@example.com *
  • "much.more unusual"@example.com *
  • "very.unusual.@.unusual.com"@example.com *
  • #!$%&\'*+-/=?^_\`{}|~@example.org *
  • " "@example.org *
  • üñîçøðé@üñîçøðé.com *
  • admin@mailserver1 *
  • user@tt *
  • "hi"@example.com *
  • jsmith@[192.168.2.1] *
  • jsmith@[IPv6:2001:db8::1] *
  • email@123.123.123.123 *
  • "()<>[]:,;@\\\"!#$%&\'*+-/=?^_\`{}| ~.a"@example.org *
  • abc."defghi".xyz@example.com *
  • _______@example.com *
  • very.unusual."@".unusual.com@example.com *
  • john.smith(comment)@example.com *
  • (comment)john.smith@example.com *
  • "()<>[]:,;@\\\"!#$%&\'*+-/=?^_\`{}| ~.a"(comment)@example.org * * * Valid (but rare) email addresses that are not supported: *
      *
    • "very.(),:;<>[]\".VERY.\"very@\\ \"very\".unusual"@strange.example.com *
    • "()<>[]:,;@\"!#$%&\'*+-/=?^_\`{}| ~.a"@example.org *
    • abc."d\"efghi".xyz@example.com *
    • much."more\ unusual"@example.com * * */ var n=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}return r(e,[{key:"isValidAddress",value:function(e){return this._whitelist(e)&&!this._blacklist(e)&&!this._tooLong(e)}},{key:"getParts",value:function(e){var t=e.match(/[^@]*$/);return{local:e.substr(0,t.index-1)||"",domain:t[0]||""}}},{key:"_whitelist",value:function(e){return/^(?=\s)|^(?:(?!.+\.{2,})(?!\.)(?:[\w.!#$%&'*+\-\/=?\^`{|} ~]|[^\x00-\x7F])+[^\."]@|^"(?:[\w.!#$%&'*+\-\/=?\^`{|} ~(),:;<>@\[\]]|[^\x00-\x7F])+"@|(?:[\w.!#$%&'*+\-\/=?\^`{|} ~]|[^\x00-\x7F])+\."(?:[\w.!#$%&'*+\-\/=?\^`{|} ~"(),:;<>\\@\[\]]|[^\x00-\x7F])+"\.(?:[\w.!#$%&'*+\-\/=?\^`{|} ~]|[^\x00-\x7F])+@)(?!-)(?!.*-\.)(?:[a-zA-Z0-9-.]|[^\x00-\x7F])+$|^".+"@.+|.+@\[(?:\w+\.|\w+:){3}.+\]|^\(.+\)|\(.+\)@/.test(e)}},{key:"_blacklist",value:function(e){return/^@|^\s|@\[?(?=\d).*\d{4,}|"(?!.+\\").+".+"|.\(.+\)@(?=.+@)/.test(e)}},{key:"_tooLong",value:function(e){var t=this.getParts(e);return t.domain.length>=253||t.local.length>=64||e.length>=254}}]),e}();"object"===t(e)&&e.exports&&(e.exports=n)}(Ur);const Vr=new(Br(Ur.exports)),Gr=e=>!!e&&Vr.isValidAddress(e);function jr(e){let t,r,n,o,a;return t=new er({props:{forInput:e[11],label:e[2],isPaymentForm:e[6]}}),o=new Jt({props:{id:e[11],autocomplete:"email",type:"email",name:"email",disabled:e[1],value:e[0],placeholder:e[3],errorMessage:e[5],innerTextOnClick:e[7],innerText:e[7]&&(e[4]||"Edit"),isPaymentForm:e[6],onFocus:e[9],onBlur:e[10]}}),o.$on("change",e[13]),{c(){ie(t.$$.fragment),r=E(),n=P("div"),ie(o.$$.fragment),_(n,"class","zephr-form-relative-container"),N(n,"zephr-payment-form-relative-container",e[6])},m(e,i){se(t,e,i),y(e,r,i),y(e,n,i),se(o,n,null),a=!0},p(e,[r]){const i={};4&r&&(i.label=e[2]),64&r&&(i.isPaymentForm=e[6]),t.$set(i);const s={};2&r&&(s.disabled=e[1]),1&r&&(s.value=e[0]),8&r&&(s.placeholder=e[3]),32&r&&(s.errorMessage=e[5]),128&r&&(s.innerTextOnClick=e[7]),144&r&&(s.innerText=e[7]&&(e[4]||"Edit")),64&r&&(s.isPaymentForm=e[6]),512&r&&(s.onFocus=e[9]),1024&r&&(s.onBlur=e[10]),o.$set(s),(!a||64&r)&&N(n,"zephr-payment-form-relative-container",e[6])},i(e){a||(te(t.$$.fragment,e),te(o.$$.fragment,e),a=!0)},o(e){re(t.$$.fragment,e),re(o.$$.fragment,e),a=!1},d(e){e&&(g(r),g(n)),ce(t,e),ce(o)}}}function qr(e,t,r){let{formKey:n}=t,{emailAddress:o}=t,{disabled:a}=t,{label:i}=t,{placeholder:s}=t,{editText:c}=t,{error:l=null}=t,{isPaymentForm:u=!1}=t,{onEdit:p}=t,{onChange:d}=t,{onFocus:m}=t,{onBlur:f}=t;const h=`zephr-form-identifier-${n}`;return e.$$set=e=>{"formKey"in e&&r(12,n=e.formKey),"emailAddress"in e&&r(0,o=e.emailAddress),"disabled"in e&&r(1,a=e.disabled),"label"in e&&r(2,i=e.label),"placeholder"in e&&r(3,s=e.placeholder),"editText"in e&&r(4,c=e.editText),"error"in e&&r(5,l=e.error),"isPaymentForm"in e&&r(6,u=e.isPaymentForm),"onEdit"in e&&r(7,p=e.onEdit),"onChange"in e&&r(8,d=e.onChange),"onFocus"in e&&r(9,m=e.onFocus),"onBlur"in e&&r(10,f=e.onBlur)},[o,a,i,s,c,l,u,p,d,m,f,h,n,({detail:e})=>d(e)]}class Hr extends pe{constructor(e){super(),ue(this,e,qr,jr,i,{formKey:12,emailAddress:0,disabled:1,label:2,placeholder:3,editText:4,error:5,isPaymentForm:6,onEdit:7,onChange:8,onFocus:9,onBlur:10})}}const Kr={matches:e=>e.type===ve,create:(e,t,r,n)=>{const o=n.disabled||t.isBusy;return{component:Hr,props:{formKey:e.uniqueKey,disabled:o,emailAddress:t.emailAddress,label:n.label,placeholder:n.placeholder,editText:n.editText,onChange:n=>{!o&&r.updateFormState({userExists:void 0,emailIsContact:void 0,emailAddress:n,verificationCode:"",verificationCodeValid:void 0,serverErrors:[]}),it(e,"zephr_form_input_change",{inputName:`zephr-form-identifier-${e.uniqueKey}`,sectionId:t.currentSection.type,field:"email"})},onFocus:()=>it(e,"zephr_form_input_focus",{inputName:`zephr-form-identifier-${e.uniqueKey}`,sectionId:t.currentSection.type,field:"email"}),onBlur:()=>it(e,"zephr_form_input_blur",{inputName:`zephr-form-identifier-${e.uniqueKey}`,sectionId:t.currentSection.type,field:"email"}),onEdit:n.disabled&&(()=>{r.jumpToPartStart(Xe.ACCOUNT_VERIFICATION.type)}),isPaymentForm:e.formType===vt.PAYMENT},isValid:Gr(t.emailAddress)}}};function Yr(t){let r,n,o,a,i,s,l,u,p,d,m,f;return{c(){r=P("script"),r.innerHTML="",o=P("script"),o.innerHTML="",i=P("script"),i.innerHTML="",l=P("script"),l.innerHTML="",p=E(),d=P("div"),m=E(),f=P("div"),f.innerHTML="",c(r.src,n="https://js.braintreegateway.com/web/3.85.3/js/google-payment.min.js")||_(r,"src","https://js.braintreegateway.com/web/3.85.3/js/google-payment.min.js"),c(o.src,a="https://pay.google.com/gp/p/js/pay.js")||_(o,"src","https://pay.google.com/gp/p/js/pay.js"),_(o,"onload","window.googlePayLoadBraintreeCallback()"),c(i.src,s="https://js.braintreegateway.com/web/3.85.3/js/client.min.js")||_(i,"src","https://js.braintreegateway.com/web/3.85.3/js/client.min.js"),_(i,"onload","window.braintreeLoadCallback()"),c(l.src,u="https://js.braintreegateway.com/web/3.85.3/js/apple-pay.min.js")||_(l,"src","https://js.braintreegateway.com/web/3.85.3/js/apple-pay.min.js"),_(l,"onload","window.applePayLoadBraintreeCallback()"),_(d,"id","google-pay-button"),_(d,"class","svelte-1acsmhs"),N(d,"zephr-form-disabled-div",t[0]),N(d,"zephr-payment-form-disabled-div",t[0]),_(f,"id","apple_pay_button")},m(e,t){h(document.head,r),h(document.head,o),h(document.head,i),h(document.head,l),y(e,p,t),y(e,d,t),y(e,m,t),y(e,f,t)},p(e,[t]){1&t&&N(d,"zephr-form-disabled-div",e[0]),1&t&&N(d,"zephr-payment-form-disabled-div",e[0])},i:e,o:e,d(e){e&&(g(p),g(d),g(m),g(f)),g(r),g(o),g(i),g(l)}}}function Wr(e,t,r){let{onMountCallback:n}=t,{isDisabled:o}=t,{disableCoreDependencyHeader:a}=t;return k(n),e.$$set=e=>{"onMountCallback"in e&&r(1,n=e.onMountCallback),"isDisabled"in e&&r(0,o=e.isDisabled),"disableCoreDependencyHeader"in e&&r(2,a=e.disableCoreDependencyHeader)},[o,n,a]}function Jr(e){let t,r,n,o,a,i,s;return i=new qt({props:{error:e[0]?.message??e[2]??"",isPaymentForm:!0}}),{c(){t=P("script"),t.innerHTML="",n=E(),o=P("div"),a=E(),ie(i.$$.fragment),c(t.src,r="https://js.braintreegateway.com/web/dropin/1.33.2/js/dropin.min.js")||_(t,"src","https://js.braintreegateway.com/web/dropin/1.33.2/js/dropin.min.js"),_(t,"onload","window.braintreeLoadCallback()"),_(o,"id","braintree-dropin-container"),_(o,"class","svelte-z7jd27"),N(o,"zephr-form-disabled-div",e[1]),N(o,"zephr-payment-form-disabled-div",e[1])},m(e,r){h(document.head,t),y(e,n,r),y(e,o,r),y(e,a,r),se(i,e,r),s=!0},p(e,[t]){(!s||2&t)&&N(o,"zephr-form-disabled-div",e[1]),(!s||2&t)&&N(o,"zephr-payment-form-disabled-div",e[1]);const r={};5&t&&(r.error=e[0]?.message??e[2]??""),i.$set(r)},i(e){s||(te(i.$$.fragment,e),s=!0)},o(e){re(i.$$.fragment,e),s=!1},d(e){e&&(g(n),g(o),g(a)),g(t),ce(i,e)}}}function Qr(e,t,r){let{onMountCallback:n}=t,{providerError:o}=t,{isDisabled:a}=t,{isLoaded:i}=t,{error:s=null}=t;return k(n),e.$$set=e=>{"onMountCallback"in e&&r(3,n=e.onMountCallback),"providerError"in e&&r(0,o=e.providerError),"isDisabled"in e&&r(1,a=e.isDisabled),"isLoaded"in e&&r(4,i=e.isLoaded),"error"in e&&r(2,s=e.error)},[o,a,s,n,i]}function Zr(e){let t,r,n,o,a,i,s;return i=new qt({props:{error:e[0]?.message??(e[2]?e[3]:"")??"",isPaymentForm:!0}}),{c(){t=P("script"),t.innerHTML="",n=E(),o=P("div"),a=E(),ie(i.$$.fragment),c(t.src,r="https://js.stripe.com/v3/")||_(t,"src","https://js.stripe.com/v3/"),_(t,"onload","window.stripeLoadCallback()"),_(o,"id","stripe-element"),_(o,"class","svelte-1lhuc6b"),N(o,"zephr-form-disabled-div",e[1]),N(o,"zephr-payment-form-disabled-div",e[1])},m(e,r){h(document.head,t),y(e,n,r),y(e,o,r),y(e,a,r),se(i,e,r),s=!0},p(e,[t]){(!s||2&t)&&N(o,"zephr-form-disabled-div",e[1]),(!s||2&t)&&N(o,"zephr-payment-form-disabled-div",e[1]);const r={};13&t&&(r.error=e[0]?.message??(e[2]?e[3]:"")??""),i.$set(r)},i(e){s||(te(i.$$.fragment,e),s=!0)},o(e){re(i.$$.fragment,e),s=!1},d(e){e&&(g(n),g(o),g(a)),g(t),ce(i,e)}}}function Xr(e,t,r){let{onMountCallback:n}=t,{providerError:o}=t,{isDisabled:a}=t,{isComplete:i}=t,{isLoaded:s}=t,{error:c=null}=t;return k(n),e.$$set=e=>{"onMountCallback"in e&&r(4,n=e.onMountCallback),"providerError"in e&&r(0,o=e.providerError),"isDisabled"in e&&r(1,a=e.isDisabled),"isComplete"in e&&r(2,i=e.isComplete),"isLoaded"in e&&r(5,s=e.isLoaded),"error"in e&&r(3,c=e.error)},[o,a,i,c,n,s]}function en(e){let t,r;return{c(){t=P("script"),t.innerHTML="",c(t.src,r="https://js.stripe.com/v3/")||_(t,"src","https://js.stripe.com/v3/"),_(t,"onload","window.stripeLoadCallback()")},m(e,r){y(e,t,r)},d(e){e&&g(t)}}}function tn(t){let r,n,o,a,i,s=!t[1]&&en();return{c(){r=P("script"),r.innerHTML="",s&&s.c(),o=C(),a=E(),i=P("div"),c(r.src,n="https://pay.google.com/gp/p/js/pay.js")||_(r,"src","https://pay.google.com/gp/p/js/pay.js"),_(r,"onload","window.googlePayLoadStripeCallback()"),_(i,"id","stripe-mobile-pay-button"),_(i,"class","svelte-1t95nqv"),N(i,"zephr-form-disabled-div",t[0]),N(i,"zephr-payment-form-disabled-div",t[0])},m(e,t){h(document.head,r),s&&s.m(document.head,null),h(document.head,o),y(e,a,t),y(e,i,t)},p(e,[t]){e[1]?s&&(s.d(1),s=null):s||(s=en(),s.c(),s.m(o.parentNode,o)),1&t&&N(i,"zephr-form-disabled-div",e[0]),1&t&&N(i,"zephr-payment-form-disabled-div",e[0])},i:e,o:e,d(e){e&&(g(a),g(i)),g(r),s&&s.d(e),g(o)}}}function rn(e,t,r){let{onMountCallback:n}=t,{isDisabled:o}=t,{disableCoreDependencyHeader:a}=t;return k(n),e.$$set=e=>{"onMountCallback"in e&&r(2,n=e.onMountCallback),"isDisabled"in e&&r(0,o=e.isDisabled),"disableCoreDependencyHeader"in e&&r(1,a=e.disableCoreDependencyHeader)},[o,a,n]}function nn(t){let r,n,o;return n=new lr({props:{size:"2x",icon:pr,spin:!0}}),{c(){r=P("div"),ie(n.$$.fragment),_(r,"class","spinner-container svelte-1isq5k3")},m(e,t){y(e,r,t),se(n,r,null),o=!0},p:e,i(e){o||(te(n.$$.fragment,e),o=!0)},o(e){re(n.$$.fragment,e),o=!1},d(e){e&&g(r),ce(n)}}}class on extends pe{constructor(e){super(),ue(this,e,null,nn,i,{})}}function an(e){let t,r;return t=new on({}),{c(){ie(t.$$.fragment)},m(e,n){se(t,e,n),r=!0},i(e){r||(te(t.$$.fragment,e),r=!0)},o(e){re(t.$$.fragment,e),r=!1},d(e){ce(t,e)}}}function sn(e){let t,r,n;return r=new on({}),{c(){t=P("div"),ie(r.$$.fragment),_(t,"class","spinner-overlay svelte-1a5rslt")},m(e,o){y(e,t,o),se(r,t,null),n=!0},i(e){n||(te(r.$$.fragment,e),n=!0)},o(e){re(r.$$.fragment,e),n=!1},d(e){e&&g(t),ce(r)}}}function cn(e){let t,r,n,o,a,i,s,c,l,u,p,d=!e[2]&&an(),m=e[3]&&sn();return u=new qt({props:{error:e[1]?.message??e[4]??"",isPaymentForm:!0}}),{c(){d&&d.c(),t=E(),r=P("div"),m&&m.c(),n=E(),o=P("div"),s=E(),c=P("div"),l=E(),ie(u.$$.fragment),_(o,"id","zuora_payment"),_(o,"class",a=f(e[0]?"zuora-disabled-iframe-container zuora-dynamic-form-disabled":"")+" svelte-1a5rslt"),_(r,"class",i=f(e[3]?"zuora-dynamic-form-disabled form-wrapper":"form-wrapper")+" svelte-1a5rslt"),_(c,"id","core-style")},m(e,a){d&&d.m(e,a),y(e,t,a),y(e,r,a),m&&m.m(r,null),h(r,n),h(r,o),y(e,s,a),y(e,c,a),y(e,l,a),se(u,e,a),p=!0},p(e,[s]){e[2]?d&&(X(),re(d,1,1,(()=>{d=null})),ee()):d?4&s&&te(d,1):(d=an(),d.c(),te(d,1),d.m(t.parentNode,t)),e[3]?m?8&s&&te(m,1):(m=sn(),m.c(),te(m,1),m.m(r,n)):m&&(X(),re(m,1,1,(()=>{m=null})),ee()),(!p||1&s&&a!==(a=f(e[0]?"zuora-disabled-iframe-container zuora-dynamic-form-disabled":"")+" svelte-1a5rslt"))&&_(o,"class",a),(!p||8&s&&i!==(i=f(e[3]?"zuora-dynamic-form-disabled form-wrapper":"form-wrapper")+" svelte-1a5rslt"))&&_(r,"class",i);const c={};18&s&&(c.error=e[1]?.message??e[4]??""),u.$set(c)},i(e){p||(te(d),te(m),te(u.$$.fragment,e),p=!0)},o(e){re(d),re(m),re(u.$$.fragment,e),p=!1},d(e){e&&(g(t),g(r),g(s),g(c),g(l)),d&&d.d(e),m&&m.d(),ce(u,e)}}}function ln(e,t,r){let{onMountCallback:n}=t,{isDisabled:o}=t,{providerError:a}=t,{isLoaded:i}=t,{isBusy:s}=t,{error:c=null}=t;return k(n),e.$$set=e=>{"onMountCallback"in e&&r(5,n=e.onMountCallback),"isDisabled"in e&&r(0,o=e.isDisabled),"providerError"in e&&r(1,a=e.providerError),"isLoaded"in e&&r(2,i=e.isLoaded),"isBusy"in e&&r(3,s=e.isBusy),"error"in e&&r(4,c=e.error)},[o,a,i,s,c,n]}function un(t){let r,n;return{c(){r=P("script"),r.innerHTML="",_(r,"type","text/javascript"),c(r.src,n="https://static.zuora.com/Resources/libs/hosted/1.3.1/zuora-min.js")||_(r,"src","https://static.zuora.com/Resources/libs/hosted/1.3.1/zuora-min.js"),_(r,"onload","window.zuoraLoadCallback()")},m(e,t){h(document.head,r)},p:e,i:e,o:e,d(e){g(r)}}}function pn(e,t,r){let{onMountCallback:n}=t;return k(n),e.$$set=e=>{"onMountCallback"in e&&r(0,n=e.onMountCallback)},[n]}class dn extends pe{constructor(e){super(),ue(this,e,pn,un,i,{onMountCallback:0})}}const mn="braintree",fn="stripe",hn="zuora-billing",yn=new Headers;yn.append("Content-Type","application/json"),yn.append("Accept","application/json");const gn=async(e,t,r,n=null,o=!1)=>{o||r.updateFormState({serverErrors:[]}),r.incrementRequestCount(n);try{return await fetch(`${r.apiUrlBase}/${e}`,{method:t.method,body:null==t.bodyObject?void 0:JSON.stringify(t.bodyObject),headers:yn,credentials:"include"})}finally{r.decrementRequestCount(n)}},bn=e=>"ONE_OFF"===e.type,Pn=(e,t,r,n)=>{if(t.paymentOption.pricePointId)return{url:`blaize/payment/${r}/buy`,body:{product_id:t.paymentOption.productId,price_point_id:t.paymentOption.slug,discount_code:t.promoCodeValid?t.promoCode:void 0,...n}};let o,a,i={};if(Ot(e).changeSubscriptionMode){o=`subscriptions/${t.validChangeFromPlans.find((e=>t.paymentOption.slug===e.planSlug&&t.paymentOption.productId===e.productId)).changesFromSubscription.externalId}`,a="PATCH",i={navigated_from:`ChangeForm ${window.location.href}`}}else bn(t.paymentOption)?(o="payment/buy",a="POST"):(o="subscribe",a="POST");return{url:`zephr/${o}`,method:a,body:{product_id:t.paymentOption.productId,plan_id:t.paymentOption.slug,discount_code:t.promoCodeValid?t.promoCode:void 0,...i,vendor_fields:n??{}}}};let An;const Sn=new Promise((function(e){window.braintreeLoadCallback=e})),En=e=>({flow:"ONE_OFF"===e.paymentOption.type?"checkout":"vault",singleUse:!0,buttonStyle:{shape:"rect",size:"medium"},commit:!1,currency:e.paymentOption.currencyCode.toLowerCase(),amount:e.paymentOptionPrices.totalPrice}),Cn=(e,t)=>gn("blaize/payment/braintree/token",{method:"GET"},t,null,!0).then((e=>e.json())).then((e=>e.token));var vn;!function(e){e.GOOGLE_PAY="GOOGLE_PAY",e.APPLE_PAY="APPLE_PAY"}(vn||(vn={}));const Tn=new Promise((function(e){window.googlePayLoadBraintreeCallback=e})),_n=new Promise((function(e){window.applePayLoadBraintreeCallback=e})),On=(e,t,r)=>{const n=JSON.parse(e.organisationConfiguration?.braintreeMobilePaymentConfig??"{}");let o;return Tn.then((()=>{const a=document.getElementById("google-pay-button");for(;a.firstChild;)a.removeChild(a.lastChild);if(!n?.google)return a.style.display="none",void console.error("Braintree Mobile payments are not configured in the console");t=r.getFormState(),o=new window.google.payments.api.PaymentsClient({environment:e.organisationConfiguration.braintreeSandboxEnv?"TEST":"PRODUCTION"}),Sn.then((()=>Cn(0,r))).then((i=>{window.braintree.client.create({authorization:i},((i,s)=>{for(;a.firstChild;)a.removeChild(a.lastChild);if(i)return console.error("Error creating braintree client",i),void(a.style.display="none");window.braintree.googlePayment.create({client:s,googlePayVersion:2,googleMerchantId:n.google.googleMerchantId},((n,i)=>{if(n)return console.error("Error creating braintree client",n),void(a.style.display="none");o.isReadyToPay({apiVersion:2,apiVersionMinor:0,allowedPaymentMethods:i.createPaymentDataRequest().allowedPaymentMethods,existingPaymentMethodRequired:!0}).then((n=>{n.result&&n.paymentMethodPresent||(a.style.display="none",console.error(n.paymentMethodPresent?"Google Pay support not found":"No payment method"),r.updateFormState({serverErrors:[tt.MOBILE_PAYMENT_PROCESSING_ERROR]}),it(e,"zephr_form_error",{error:tt[tt.MOBILE_PAYMENT_PROCESSING_ERROR]})),a.appendChild(o.createButton({buttonColor:"default",buttonType:"plain",buttonSizeMode:"fill",onClick:()=>{wn(e,t,r,i,o)}}))}))}))}))}))}))},wn=(e,t,r,n,o)=>{r.updateFormState({mobilePaymentService:vn.GOOGLE_PAY,serverErrors:[]});const a=n.createPaymentDataRequest({transactionInfo:{currencyCode:t.paymentOption.currencyCode,totalPriceStatus:"FINAL",totalPrice:t.paymentOptionPrices.totalPrice.toFixed(2)},emailRequired:!1,shippingAddressRequired:!1});o.loadPaymentData(a).then((function(t){n.parseResponse(t,((t,n)=>{if(t||!n.nonce)return r.updateFormState({serverErrors:[tt.MOBILE_PAYMENT_PROCESSING_ERROR],mobilePaymentService:null}),console.error("Error requesting payment data",t,n),void it(e,"zephr_form_error",{error:tt[tt.MOBILE_PAYMENT_PROCESSING_ERROR]});r.updateFormState({mobilePaymentMethodId:n.nonce}),r.completeSection()}))})).catch((function(t){console.warn("Error requesting payment data",t),r.updateFormState({mobilePaymentService:null,serverErrors:[tt.MOBILE_PAYMENT_PROCESSING_ERROR]}),it(e,"zephr_form_error",{error:tt[tt.MOBILE_PAYMENT_PROCESSING_ERROR]})}))},In=(e,t,r)=>{const n=document.getElementById("apple_pay_button");for(;n.firstChild;)n.removeChild(n.lastChild);return _n.then((()=>window.ApplePaySession&&window.ApplePaySession.supportsVersion(3)&&window.ApplePaySession.canMakePayments()?Sn.then((()=>Cn(0,r))).then((o=>{window.braintree.client.create({authorization:o},((o,a)=>{if(o)return n.style.display="none",void console.error("Error creating braintree client:",o);window.braintree.applePay.create({client:a},(function(o,a){for(;n.firstChild;)n.removeChild(n.lastChild);if(o)return n.style.display="none",void console.error("Error creating applePayInstance:",o);const i=a.createPaymentRequest({total:{label:t.paymentOption.label,amount:t.paymentOptionPrices.totalPrice.toFixed(2)}}),s=document.createElement("div");s.classList.add("apple-pay-button"),s.classList.add("apple-pay-button-black"),n.appendChild(s),s.addEventListener("click",(function(){Rn(e,t,r,i,a)}))}))}))})):(n.style.display="none",void console.log("Cannot make payments with Apple Pay"))))},Rn=(e,t,r,n,o)=>{r.updateFormState({mobilePaymentService:vn.APPLE_PAY,serverErrors:[]});const a=new ApplePaySession(3,n);a.onvalidatemerchant=function(n){o.performValidation({validationURL:n.validationURL,displayName:t.paymentOption.label},(function(t,n){if(t)return r.updateFormState({serverErrors:[tt.MOBILE_PAYMENT_PROCESSING_ERROR],mobilePaymentService:null}),console.log("err in onvalidatemerchant in apple pay configuration: ",t),void it(e,"zephr_form_error",{error:tt[tt.MOBILE_PAYMENT_PROCESSING_ERROR]});a.completeMerchantValidation(n)}))},a.onpaymentauthorized=function(t){o.tokenize({token:t.payment.token},(function(t,n){if(t)return r.updateFormState({serverErrors:[tt.MOBILE_PAYMENT_PROCESSING_ERROR],mobilePaymentService:null}),console.error("Error tokenizing Apple Pay:",t),it(e,"zephr_form_error",{error:tt[tt.MOBILE_PAYMENT_PROCESSING_ERROR]}),void a.completePayment(ApplePaySession.STATUS_FAILURE);r.updateFormState({mobilePaymentMethodId:n.nonce}),r.completeSection(),a.completePayment(ApplePaySession.STATUS_SUCCESS)}))},a.begin()},$n=1e-5,Mn=(e,t)=>{try{if(3===t?.length){const r=((e,t)=>new Intl.NumberFormat(void 0,{style:"currency",currency:t,minimumFractionDigits:Math.abs(e)%1<$n?0:void 0,maximumFractionDigits:Math.abs(e)%1<$n?0:2}).format(e))(e,t);if(!r.includes("¤"))return r}}catch(e){console.warn(`Error formatting currency for symbol ${t}`,e)}return((e,t)=>1===t?.length?`${t}${e}`:`${e} ${t}`.trim())(e,t)},Nn=async(e,t,r,n=!1)=>{const o=pa(e.organisationConfiguration.paymentProvider);return o.hasProductAddons&&(t.loginRegistrationComplete||t.userSession)?gn(o.productAddonPath,{method:"POST",bodyObject:{promoCode:t.promoCodeValid?t.promoCode:null,paymentOptions:Ot(e).paymentOptions}},r,null,!0).then((async n=>{if(!n.ok)return console.log("error loading product addons",n),it(e,"zephr_form_error",{error:tt[tt.UNKNOWN]}),r.updateFormState({addons:[],serverErrors:[tt.UNKNOWN]});const o=await n.json();try{const e=o.map((e=>({id:e.id,label:e.label,planPrices:e.paymentOptions.map((e=>({planSlug:e.slug,productId:e.productId,addonPrice:e.addonPrice})))})));return r.updateFormState({addons:e})}catch(e){return console.error("Error parsing product addons response",e,o),t}})).then((async t=>(n||await xn(e,t,r),t))):Promise.resolve(t)},xn=async(e,t,r)=>{if(t.currentSection.elements.some((e=>e.type===Le&&!1!==e.config?.enabled))){r.incrementRequestCount();try{await da(e.organisationConfiguration.paymentProvider).loader(e,t,r)}finally{r.decrementRequestCount()}}},Ln=e=>e.addons.map((t=>{const r=t.planPrices.find((t=>t.planSlug===e.paymentOption.slug&&t.productId===e.paymentOption.productId));return r&&{label:t.label,addonPrice:r.addonPrice,addonPriceFormattedString:Mn(r.addonPrice,e.paymentOption.currencyCode)}})).filter((e=>e)),Fn=async(e,t,r)=>{if(null!=t.paymentOptionPrices&&t.paymentOptionPrices.productId===t.paymentOption.productId&&t.paymentOptionPrices.slug===t.paymentOption.slug&&t.paymentOptionPrices.promoCode===t.promoCode&&t.paymentOptionPrices.addonPrices==Ln(t)&&t.paymentOptionPrices.billingAddress.country===t.billingAddress.country&&t.paymentOptionPrices.billingAddress.postalCode===t.billingAddress.postalCode&&0==t.paymentOptionPrices.addonPrices.length&&0==Ln(t).length)return t;r.updateFormState({paymentOptionPrices:null});const n=await pa(e.organisationConfiguration.paymentProvider).priceCalculator(e,t,r);return r.updateFormState({paymentOptionPrices:n})},zn=["BIF","CLP","DJF","GNF","JPY","KMF","KRW","MGA","PYG","RWF","UGX","VND","VUV","XAF","XOF","XPF"],kn=e=>zn.includes(e),Dn=e=>{const t=JSON.parse(e??"{}");return{variables:{color:t?.color?.text?.main??"#32325d",fontFamily:`${t?.typography?.body?.font}, ${t?.typography?.body?.fallbackFont}, "Helvetica Neue", Helvetica, sans-serif`,fontSmooth:"always",fontSizeBase:"16px",colorWarningText:t?.color?.warning?.main??"#fa755a",colorIconCardError:t?.color?.warning?.main??"#fa755a",borderRadius:`${t?.input?.borderRadius??"4"}px`},rules:{".Input::placeholder":{color:"#aab7c4"}}}},Bn={base:{color:"#32325d",fontFamily:'"Helvetica Neue", Helvetica, sans-serif',fontSmoothing:"antialiased",fontSize:"16px","::placeholder":{color:"#aab7c4"}},invalid:{color:"#fa755a",iconColor:"#fa755a"}},Un=(e,t,r)=>t.organisationConfiguration.stripeAutomaticTaxEnabled&&t.formType!==vt.LIST_SUBSCRIPTIONS||Ot(t).paymentProviderFormConfig?.usePaymentElement?((e,t,r)=>{const n=r.getFormState(),o=kn(n.paymentOption.currencyCode.toUpperCase())?1:100;return e.elements({mode:"payment",currency:n.paymentOption.currencyCode.toLowerCase(),amount:parseFloat((n.paymentOptionPrices.totalPrice*o).toFixed(2)),setup_future_usage:"off_session",appearance:Dn(t.organisationConfiguration.siteStyles),paymentMethodTypes:["card"]}).create("payment",{terms:{card:"never"},wallets:{applePay:"never",googlePay:"never"}})})(e,t,r):(e=>e.elements().create("card",{style:Bn}))(e); /*! * mustache.js - Logic-less {{mustache}} templates with JavaScript * http://github.com/janl/mustache.js */ var Vn=Object.prototype.toString,Gn=Array.isArray||function(e){return"[object Array]"===Vn.call(e)};function jn(e){return"function"==typeof e}function qn(e){return e.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")}function Hn(e,t){return null!=e&&"object"==typeof e&&t in e}var Kn=RegExp.prototype.test;var Yn=/\S/;function Wn(e){return!function(e,t){return Kn.call(e,t)}(Yn,e)}var Jn={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/","`":"`","=":"="};var Qn=/\s*/,Zn=/\s+/,Xn=/\s*=/,eo=/\s*\}/,to=/#|\^|\/|>|\{|&|=|!/;function ro(e){this.string=e,this.tail=e,this.pos=0}function no(e,t){this.view=e,this.cache={".":this.view},this.parent=t}function oo(){this.templateCache={_cache:{},set:function(e,t){this._cache[e]=t},get:function(e){return this._cache[e]},clear:function(){this._cache={}}}}ro.prototype.eos=function(){return""===this.tail},ro.prototype.scan=function(e){var t=this.tail.match(e);if(!t||0!==t.index)return"";var r=t[0];return this.tail=this.tail.substring(r.length),this.pos+=r.length,r},ro.prototype.scanUntil=function(e){var t,r=this.tail.search(e);switch(r){case-1:t=this.tail,this.tail="";break;case 0:t="";break;default:t=this.tail.substring(0,r),this.tail=this.tail.substring(r)}return this.pos+=t.length,t},no.prototype.push=function(e){return new no(e,this)},no.prototype.lookup=function(e){var t,r,n,o=this.cache;if(o.hasOwnProperty(e))t=o[e];else{for(var a,i,s,c=this,l=!1;c;){if(e.indexOf(".")>0)for(a=c.view,i=e.split("."),s=0;null!=a&&s0?o[o.length-1][4]:r;break;default:n.push(t)}return r}(function(e){for(var t,r,n=[],o=0,a=e.length;o"===i?s=this.renderPartial(a,t,r,o):"&"===i?s=this.unescapedValue(a,t):"name"===i?s=this.escapedValue(a,t,o):"text"===i&&(s=this.rawValue(a)),void 0!==s&&(c+=s);return c},oo.prototype.renderSection=function(e,t,r,n,o){var a=this,i="",s=t.lookup(e[1]);if(s){if(Gn(s))for(var c=0,l=s.length;c0||!r)&&(o[a]=n+o[a]);return o.join("\n")},oo.prototype.renderPartial=function(e,t,r,n){if(r){var o=this.getConfigTags(n),a=jn(r)?r(e[1]):r[e[1]];if(null!=a){var i=e[6],s=e[5],c=e[4],l=a;0==s&&c&&(l=this.indentPartial(a,c,i));var u=this.parse(l,o);return this.renderTokens(u,t,r,l,n)}}},oo.prototype.unescapedValue=function(e,t){var r=t.lookup(e[1]);if(null!=r)return r},oo.prototype.escapedValue=function(e,t,r){var n=this.getConfigEscape(r)||ao.escape,o=t.lookup(e[1]);if(null!=o)return"number"==typeof o&&n===ao.escape?String(o):n(o)},oo.prototype.rawValue=function(e){return e[1]},oo.prototype.getConfigTags=function(e){return Gn(e)?e:e&&"object"==typeof e?e.tags:void 0},oo.prototype.getConfigEscape=function(e){return e&&"object"==typeof e&&!Gn(e)?e.escape:void 0};var ao={name:"mustache.js",version:"4.2.0",tags:["{{","}}"],clearCache:void 0,escape:void 0,parse:void 0,render:void 0,Scanner:void 0,Context:void 0,Writer:void 0,set templateCache(e){io.templateCache=e},get templateCache(){return io.templateCache}},io=new oo;ao.clearCache=function(){return io.clearCache()},ao.parse=function(e,t){return io.parse(e,t)},ao.render=function(e,t,r,n){if("string"!=typeof e)throw new TypeError('Invalid template! Template should be a "string" but "'+((Gn(o=e)?"array":typeof o)+'" was given as the first argument for mustache#render(template, view, partials)'));var o;return io.render(e,t,r,n)},ao.escape=function(e){return String(e).replace(/[&<>"'`=\/]/g,(function(e){return Jn[e]}))},ao.Scanner=ro,ao.Context=no,ao.Writer=oo;const so=(e,t)=>ao.render(e,t),co=async e=>{try{return await gn("blaize/profile",{method:"GET"},e).then((e=>e.json()))}catch(e){return console.error("Failed to fetch user attributes:",e),{}}},lo=async e=>{try{const t=await gn("zephr/public/sessions/v1/sessions",{method:"GET"},e,null,!0);return await t.json()}catch(e){return console.error("Failed to fetch sessions:",e),[]}},uo=()=>{const e=new URLSearchParams(window.location.search);return{source:e.get("utm_source"),medium:e.get("utm_medium"),campaign:e.get("utm_campaign"),term:e.get("utm_term"),content:e.get("utm_content")}},po=async(e,t)=>{try{const[r,n]=await Promise.all([lo(t),co(t)]),o=r.find((e=>e.requestingSession))||null;return{page:{url:window.location.href,path:window.location.pathname,searchParameters:Object.fromEntries(new URLSearchParams(window.location.search)),utmParameters:uo(),referrer:document.referrer||null},user:{attributes:n,session:o?{id:o.id,tenantId:o.tenantId,userId:o.userId,deviceName:o.deviceName,browser:o.browser,startDate:o.startDate,ipAddress:o.ipAddress??null,requestingSession:o.requestingSession}:null,geoLocation:{city:o?.city??"unknown",country:o?.country??"unknown",state:o?.geoState??"unknown",ipAddress:o?.ipAddress??null}},form:{id:e.id,outcomeId:e.outcomeId,ruleId:e.ruleId}}}catch(e){throw console.error("Failed to initialize subscription scope:",e),e}};let mo,fo,ho;const yo=e=>mo||(mo=new Promise((function(e){window.stripeLoadCallback=e})).then((()=>(e=>gn("blaize/payment/stripe/publicKey",{method:"GET"},e,null,!0).then((e=>e.text())))(e))).then((e=>(fo=window.Stripe(e),fo)))),go=(e,t,r)=>{const n=t.paymentMethodId;return r.incrementRequestCount(),n?Po(e,t,r,n):fo.createPaymentMethod("card",ho,{}).then((async({error:n,paymentMethod:o})=>{if(n||!o)throw r.decrementRequestCount(),`Error requesting payment method ${JSON.stringify(n)}`;await Po(e,t,r,o.id)}))},bo=(e,t,r,n)=>gn("zephr/payment/stripe/updateSubscription",{method:"POST",bodyObject:{payment_method_id:n,subscription_id:t.selectedSubscription.externalId}},r),Po=async(e,t,r,n)=>{const o=Ot(e).paymentProviderFormConfig?.subscriptionMetadata||{},a={};if(o){const t=await po(e,r);for(const[e,r]of Object.entries(o))a[e]=so(r,t)||""}const i=!!Object.keys(a).length,{url:s,body:c,method:l}=Pn(e,t,fn,{payment_method:n,billing_address_provided:!!t.billingAddress.country,...i?{subscription_metadata:JSON.stringify(a)}:{}});return gn(s,{method:l,bodyObject:c},r).then((async e=>{if(!e?.ok)throw e;return e.json()})).then((o=>{if(!o.grant_id){if("requires_action"===o.paymentIntentStatus)return fo.confirmCardPayment(o.clientSecret??o.client_secret).then((s=>{if(s.error||!s.paymentIntent)throw`Error requesting payment method ${JSON.stringify(s)}`;if(bn(t.paymentOption)&&o.payment_intent_id){const{url:s,body:c,method:l}=Pn(e,t,fn,{payment_method:n,billing_address_provided:!!t.billingAddress.country,payment_intent_id:o.payment_intent_id,...i?{subscription_metadata:JSON.stringify(a)}:{}});return gn(s,{method:l,bodyObject:c},r).then((e=>{if(!e?.ok)throw e}))}return gn("blaize/payment/stripe/subscription/confirmation",{method:"POST",bodyObject:{subscriptionId:o.subscriptionId}},r).then((e=>{if(!e?.ok)throw e}))}));throw o}})).catch((e=>{throw console.error(e),e})).finally((()=>{r.decrementRequestCount()}))},Ao=new Promise((function(e){window.googlePayLoadStripeCallback=e})),So=async(e,t,r,n,o,a)=>{if(o.googlePay?t.updateFormState({mobilePaymentService:vn.GOOGLE_PAY,serverErrors:[]}):o.applePay&&t.updateFormState({mobilePaymentService:vn.APPLE_PAY,serverErrors:[]}),!n)return n.complete("fail"),t.updateFormState({serverErrors:[tt.MOBILE_PAYMENT_PROCESSING_ERROR]}),void it(a,"zephr_form_error",{error:tt[tt.MOBILE_PAYMENT_PROCESSING_ERROR]});const i=n.paymentMethod.billing_details.address;if(a.organisationConfiguration.stripeAutomaticTaxEnabled&&(e=await Fn(a,t.updateFormState({billingAddress:{country:i.country,postalCode:i.postal_code}}),t)),e=t.updateFormState({paymentMethodId:n.paymentMethod.id}),n.complete("success"),e.paymentOptionPrices.taxPrice||!e.canAttemptSectionCompletion){const t=e.elementValidity.find((e=>!e.isValid&&"payment"!=e.elementType))?.elementId,r=t?document.getElementById(`zephr-form-${t}`):document.getElementsByClassName("zephr-form-button")[0];r?.scrollIntoView({block:"center"})}else t.completeSection()},Eo=(e,t,r)=>{const n=Ln(t),o=Ot(e).paymentOptions.find((e=>e.productId==t.paymentOption.productId&&e.slug==t.paymentOption.slug)).price,a=t.discountedPlanPrices.find((e=>e.planSlug===t.paymentOption.slug&&e.productId===t.paymentOption.productId))?.discountPrice??o,i=o-a,s=n.reduce(((e,t)=>e+t.addonPrice),a);return Promise.resolve({slug:t.paymentOption.slug,productId:t.paymentOption.productId,promoCode:t.promoCode,addonPrices:n,billingAddress:t.billingAddress,totalPrice:s,totalPriceFormattedString:Mn(s,t.paymentOption.currencyCode),netPrice:o,netPriceFormattedString:Mn(o,t.paymentOption.currencyCode),discountPrice:i,discountPriceFormattedPrice:Mn(i,t.paymentOption.currencyCode),chargeItems:[]})},Co=(e,t)=>Ot(e).formCurrency??t.paymentOption?.currencyCode,vo=async(e,t,r,n)=>{const o=t.paymentOption&&await Fn(e,t,r),[a,i]=(navigator.language??"").split("-"),s={locale:a||"en",region:Ot(e).requestCountry||i||"US",currency:Co(e,t),amount:`${o?.paymentOptionPrices?.totalPrice??"0.00"}`,profile:Ot(e).paymentProviderFormConfig?.paymentFormNumber??void 0,createPaymentSession:()=>(async(e,t)=>{if(t.getFormState().isBusy)console.warn("Form is busy - ignoring payment request");else{t.updateFormState({serverErrors:[],paymentProviderFormBusy:!0}),t.incrementRequestCount();try{const r=await gn("zephr/public/payment/v1/billing/payment-sessions",{method:"POST",bodyObject:{currency:Co(e,t.getFormState()),amount:t.getFormState().paymentOptionPrices?.totalPrice??.01}},t);if(r.ok)return(await r.json())?.token;console.error("Error occurred while creating payment session.",r),t.updateFormState({serverErrors:[tt.PAYMENT_PROCESSING_ERROR],paymentProviderFormBusy:!1}),it(e,"zephr_form_error",{error:tt[tt.PAYMENT_PROCESSING_ERROR]})}catch(r){console.error("Error occurred while creating payment session.",r),t.updateFormState({serverErrors:[tt.PAYMENT_PROCESSING_ERROR],paymentProviderFormBusy:!1}),it(e,"zephr_form_error",{error:tt[tt.PAYMENT_PROCESSING_ERROR]})}}})(e,r),onComplete:t=>((e,t,r)=>{if(!r?.success||!r.paymentMethodId)return t.decrementRequestCount(),console.warn("Non-success payment result",r),t.updateFormState({serverErrors:[tt.PAYMENT_PROCESSING_ERROR],paymentProviderFormBusy:!1}),void it(e,"zephr_form_error",{error:tt[tt.PAYMENT_PROCESSING_ERROR]});const n=t.getFormState();t.updateFormState({paymentFormComplete:!0,paymentProviderVendorFields:{currency:Co(e,n),detail:JSON.stringify({refId:r.paymentMethodId,email:n.emailAddress}),...n.dynamicOfferResult?{dynamicOfferResult:JSON.stringify(n.dynamicOfferResult)}:{}}}),t.decrementRequestCount(),t.completeSection()})(e,r,t)},c=window.Zuora(n);(await c.createPaymentForm(s)).mount("#zuora_payment"),r.updateFormState({paymentProviderFormLoaded:!0})};let To;const _o=()=>null!=To?To:To=new Promise((function(e){window.zuoraLoadCallback=e})),Oo=e=>Ot(e).paymentProviderFormConfig?.useDynamicForm,wo=(e,t)=>Oo(e)?(async(e,t)=>{const r=await gn("zephr/public/payment/v1/billing/publishable-key",{method:"GET"},t);return(await r.json())?.message})(0,t):gn("plugins/public/zuora-billing/payment-form-token",{method:"POST",bodyObject:{hostedPageId:Ot(e).paymentProviderFormConfig.hostedPageId,hostedPageUrl:Ot(e).paymentProviderFormConfig.hostedPageUrl}},t).then((e=>e.json())),Io=(e,t)=>{const r=e.trim();try{switch(t.toUpperCase()){case"INTEGER":{const e=parseInt(r,10);if(isNaN(e))throw new Error;return e}case"NUMBER":{const e=parseFloat(r);if(isNaN(e))throw new Error;return e}case"BOOLEAN":return"true"===r.toLowerCase();default:return r.toString()}}catch(e){return console.warn(`Error casting custom field value "${r}" to type ${t}`),null}},Ro=(e,t,r)=>!Ot(t).changeSubscriptionMode||t.environment.previewMode?e:{...e,products:e.products.map((e=>({...e,paymentPlans:e.paymentPlans.filter((t=>r.validChangeFromPlans.some((r=>r.planSlug===t.planId&&r.productId===e.id))))})))};function $o(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Mo(e){for(var t=1;t=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}var Lo,Fo={countries:{AD:"Andorra",AE:"United Arab Emirates",AF:"Afghanistan",AG:"Antigua and Barbuda",AI:"Anguilla",AL:"Albania",AM:"Armenia",AO:"Angola",AQ:"Antarctica",AR:"Argentina",AS:"American Samoa",AT:"Austria",AU:"Australia",AW:"Aruba",AX:"Åland Islands",AZ:"Azerbaijan",BA:"Bosnia and Herzegovina",BB:"Barbados",BD:"Bangladesh",BE:"Belgium",BF:"Burkina Faso",BG:"Bulgaria",BH:"Bahrain",BI:"Burundi",BJ:"Benin",BL:"Saint Barthélemy",BM:"Bermuda",BN:"Brunei",BO:"Bolivia",BQ:"Caribbean Netherlands",BR:"Brazil",BS:"Bahamas",BT:"Bhutan",BW:"Botswana",BY:"Belarus",BZ:"Belize",CA:"Canada",CC:"Cocos Islands",CD:"Democratic Republic of the Congo",CF:"Central African Republic",CG:"Republic of the Congo",CH:"Switzerland",CI:"Ivory Coast",CK:"Cook Islands",CL:"Chile",CM:"Cameroon",CN:"China",CO:"Colombia",CR:"Costa Rica",CU:"Cuba",CV:"Cabo Verde",CW:"Curaçao",CX:"Christmas Island",CY:"Cyprus",CZ:"Czechia",DE:"Germany",DJ:"Djibouti",DK:"Denmark",DM:"Dominica",DO:"Dominican Republic",DZ:"Algeria",EC:"Ecuador",EE:"Estonia",EG:"Egypt",EH:"Western Sahara",ER:"Eritrea",ES:"Spain",ET:"Ethiopia",FI:"Finland",FJ:"Fiji",FK:"Falkland Islands",FM:"Micronesia",FO:"Faroe Islands",FR:"France",GA:"Gabon",GB:"United Kingdom",GD:"Grenada",GE:"Georgia",GF:"French Guiana",GG:"Guernsey",GH:"Ghana",GI:"Gibraltar",GL:"Greenland",GM:"Gambia",GN:"Guinea",GP:"Guadeloupe",GQ:"Equatorial Guinea",GR:"Greece",GS:"South Georgia and the South Sandwich Islands",GT:"Guatemala",GU:"Guam",GW:"Guinea-Bissau",GY:"Guyana",HK:"Hong Kong",HN:"Honduras",HR:"Croatia",HT:"Haiti",HU:"Hungary",ID:"Indonesia",IE:"Ireland",IL:"Israel",IM:"Isle of Man",IN:"India",IO:"British Indian Ocean Territory",IQ:"Iraq",IR:"Iran",IS:"Iceland",IT:"Italy",JE:"Jersey",JM:"Jamaica",JO:"Jordan",JP:"Japan",KE:"Kenya",KG:"Kyrgyzstan",KH:"Cambodia",KI:"Kiribati",KM:"Comoros",KN:"Saint Kitts and Nevis",KP:"North Korea",KR:"South Korea",KW:"Kuwait",KY:"Cayman Islands",KZ:"Kazakhstan",LA:"Laos",LB:"Lebanon",LC:"Saint Lucia",LI:"Liechtenstein",LK:"Sri Lanka",LR:"Liberia",LS:"Lesotho",LT:"Lithuania",LU:"Luxembourg",LV:"Latvia",LY:"Libya",MA:"Morocco",MC:"Monaco",MD:"Moldova",ME:"Montenegro",MF:"Saint Martin",MG:"Madagascar",MH:"Marshall Islands",MK:"North Macedonia",ML:"Mali",MM:"Myanmar",MN:"Mongolia",MO:"Macao",MP:"Northern Mariana Islands",MQ:"Martinique",MR:"Mauritania",MS:"Montserrat",MT:"Malta",MU:"Mauritius",MV:"Maldives",MW:"Malawi",MX:"Mexico",MY:"Malaysia",MZ:"Mozambique",NA:"Namibia",NC:"New Caledonia",NE:"Niger",NF:"Norfolk Island",NG:"Nigeria",NI:"Nicaragua",NL:"Netherlands",NO:"Norway",NP:"Nepal",NR:"Nauru",NU:"Niue",NZ:"New Zealand",OM:"Oman",PA:"Panama",PE:"Peru",PF:"French Polynesia",PG:"Papua New Guinea",PH:"Philippines",PK:"Pakistan",PL:"Poland",PM:"Saint Pierre and Miquelon",PN:"Pitcairn",PR:"Puerto Rico",PS:"Palestine",PT:"Portugal",PW:"Palau",PY:"Paraguay",QA:"Qatar",RE:"Réunion",RO:"Romania",RS:"Serbia",RU:"Russia",RW:"Rwanda",SA:"Saudi Arabia",SB:"Solomon Islands",SC:"Seychelles",SD:"Sudan",SE:"Sweden",SG:"Singapore",SH:"Saint Helena, Ascension and Tristan da Cunha",SI:"Slovenia",SJ:"Svalbard and Jan Mayen",SK:"Slovakia",SL:"Sierra Leone",SM:"San Marino",SN:"Senegal",SO:"Somalia",SR:"Suriname",SS:"South Sudan",ST:"Sao Tome and Principe",SV:"El Salvador",SX:"Sint Maarten",SY:"Syria",SZ:"Eswatini",TC:"Turks and Caicos Islands",TD:"Chad",TF:"French Southern Territories",TG:"Togo",TH:"Thailand",TJ:"Tajikistan",TK:"Tokelau",TL:"Timor-Leste",TM:"Turkmenistan",TN:"Tunisia",TO:"Tonga",TR:"Türkiye",TT:"Trinidad and Tobago",TV:"Tuvalu",TW:"Taiwan",TZ:"Tanzania",UA:"Ukraine",UG:"Uganda",UM:"United States Minor Outlying Islands",US:"United States of America",UY:"Uruguay",UZ:"Uzbekistan",VA:"Holy See",VC:"Saint Vincent and the Grenadines",VE:"Venezuela",VG:"Virgin Islands (UK)",VI:"Virgin Islands (US)",VN:"Vietnam",VU:"Vanuatu",WF:"Wallis and Futuna",WS:"Samoa",YE:"Yemen",YT:"Mayotte",ZA:"South Africa",ZM:"Zambia",ZW:"Zimbabwe"},timezones:{"Africa/Abidjan":{u:0,c:["CI","BF","GH","GM","GN","IS","ML","MR","SH","SL","SN","TG"]},"Africa/Accra":{a:"Africa/Abidjan",c:["GH"],r:1},"Africa/Addis_Ababa":{a:"Africa/Nairobi",c:["ET"],r:1},"Africa/Algiers":{u:60,c:["DZ"]},"Africa/Asmara":{a:"Africa/Nairobi",c:["ER"],r:1},"Africa/Asmera":{a:"Africa/Nairobi",c:["ER"],r:1},"Africa/Bamako":{a:"Africa/Abidjan",c:["ML"],r:1},"Africa/Bangui":{a:"Africa/Lagos",c:["CF"],r:1},"Africa/Banjul":{a:"Africa/Abidjan",c:["GM"],r:1},"Africa/Bissau":{u:0,c:["GW"]},"Africa/Blantyre":{a:"Africa/Maputo",c:["MW"],r:1},"Africa/Brazzaville":{a:"Africa/Lagos",c:["CG"],r:1},"Africa/Bujumbura":{a:"Africa/Maputo",c:["BI"],r:1},"Africa/Cairo":{u:120,d:180,c:["EG"]},"Africa/Casablanca":{u:60,d:0,c:["MA"]},"Africa/Ceuta":{u:60,d:120,c:["ES"]},"Africa/Conakry":{a:"Africa/Abidjan",c:["GN"],r:1},"Africa/Dakar":{a:"Africa/Abidjan",c:["SN"],r:1},"Africa/Dar_es_Salaam":{a:"Africa/Nairobi",c:["TZ"],r:1},"Africa/Djibouti":{a:"Africa/Nairobi",c:["DJ"],r:1},"Africa/Douala":{a:"Africa/Lagos",c:["CM"],r:1},"Africa/El_Aaiun":{u:60,d:0,c:["EH"]},"Africa/Freetown":{a:"Africa/Abidjan",c:["SL"],r:1},"Africa/Gaborone":{a:"Africa/Maputo",c:["BW"],r:1},"Africa/Harare":{a:"Africa/Maputo",c:["ZW"],r:1},"Africa/Johannesburg":{u:120,c:["ZA","LS","SZ"]},"Africa/Juba":{u:120,c:["SS"]},"Africa/Kampala":{a:"Africa/Nairobi",c:["UG"],r:1},"Africa/Khartoum":{u:120,c:["SD"]},"Africa/Kigali":{a:"Africa/Maputo",c:["RW"],r:1},"Africa/Kinshasa":{a:"Africa/Lagos",c:["CD"],r:1},"Africa/Lagos":{u:60,c:["NG","AO","BJ","CD","CF","CG","CM","GA","GQ","NE"]},"Africa/Libreville":{a:"Africa/Lagos",c:["GA"],r:1},"Africa/Lome":{a:"Africa/Abidjan",c:["TG"],r:1},"Africa/Luanda":{a:"Africa/Lagos",c:["AO"],r:1},"Africa/Lubumbashi":{a:"Africa/Maputo",c:["CD"],r:1},"Africa/Lusaka":{a:"Africa/Maputo",c:["ZM"],r:1},"Africa/Malabo":{a:"Africa/Lagos",c:["GQ"],r:1},"Africa/Maputo":{u:120,c:["MZ","BI","BW","CD","MW","RW","ZM","ZW"]},"Africa/Maseru":{a:"Africa/Johannesburg",c:["LS"],r:1},"Africa/Mbabane":{a:"Africa/Johannesburg",c:["SZ"],r:1},"Africa/Mogadishu":{a:"Africa/Nairobi",c:["SO"],r:1},"Africa/Monrovia":{u:0,c:["LR"]},"Africa/Nairobi":{u:180,c:["KE","DJ","ER","ET","KM","MG","SO","TZ","UG","YT"]},"Africa/Ndjamena":{u:60,c:["TD"]},"Africa/Niamey":{a:"Africa/Lagos",c:["NE"],r:1},"Africa/Nouakchott":{a:"Africa/Abidjan",c:["MR"],r:1},"Africa/Ouagadougou":{a:"Africa/Abidjan",c:["BF"],r:1},"Africa/Porto-Novo":{a:"Africa/Lagos",c:["BJ"],r:1},"Africa/Sao_Tome":{u:0,c:["ST"]},"Africa/Timbuktu":{a:"Africa/Abidjan",c:["ML"],r:1},"Africa/Tripoli":{u:120,c:["LY"]},"Africa/Tunis":{u:60,c:["TN"]},"Africa/Windhoek":{u:120,c:["NA"]},"America/Adak":{u:-600,d:-540,c:["US"]},"America/Anchorage":{u:-540,d:-480,c:["US"]},"America/Anguilla":{a:"America/Puerto_Rico",c:["AI"],r:1},"America/Antigua":{a:"America/Puerto_Rico",c:["AG"],r:1},"America/Araguaina":{u:-180,c:["BR"]},"America/Argentina/Buenos_Aires":{u:-180,c:["AR"]},"America/Argentina/Catamarca":{u:-180,c:["AR"]},"America/Argentina/ComodRivadavia":{a:"America/Argentina/Catamarca",r:1},"America/Argentina/Cordoba":{u:-180,c:["AR"]},"America/Argentina/Jujuy":{u:-180,c:["AR"]},"America/Argentina/La_Rioja":{u:-180,c:["AR"]},"America/Argentina/Mendoza":{u:-180,c:["AR"]},"America/Argentina/Rio_Gallegos":{u:-180,c:["AR"]},"America/Argentina/Salta":{u:-180,c:["AR"]},"America/Argentina/San_Juan":{u:-180,c:["AR"]},"America/Argentina/San_Luis":{u:-180,c:["AR"]},"America/Argentina/Tucuman":{u:-180,c:["AR"]},"America/Argentina/Ushuaia":{u:-180,c:["AR"]},"America/Aruba":{a:"America/Puerto_Rico",c:["AW"],r:1},"America/Asuncion":{u:-240,d:-180,c:["PY"]},"America/Atikokan":{a:"America/Panama",c:["CA"],r:1},"America/Atka":{a:"America/Adak",r:1},"America/Bahia":{u:-180,c:["BR"]},"America/Bahia_Banderas":{u:-360,c:["MX"]},"America/Barbados":{u:-240,c:["BB"]},"America/Belem":{u:-180,c:["BR"]},"America/Belize":{u:-360,c:["BZ"]},"America/Blanc-Sablon":{a:"America/Puerto_Rico",c:["CA"],r:1},"America/Boa_Vista":{u:-240,c:["BR"]},"America/Bogota":{u:-300,c:["CO"]},"America/Boise":{u:-420,d:-360,c:["US"]},"America/Buenos_Aires":{a:"America/Argentina/Buenos_Aires",r:1},"America/Cambridge_Bay":{u:-420,d:-360,c:["CA"]},"America/Campo_Grande":{u:-240,c:["BR"]},"America/Cancun":{u:-300,c:["MX"]},"America/Caracas":{u:-240,c:["VE"]},"America/Catamarca":{a:"America/Argentina/Catamarca",r:1},"America/Cayenne":{u:-180,c:["GF"]},"America/Cayman":{a:"America/Panama",c:["KY"],r:1},"America/Chicago":{u:-360,d:-300,c:["US"]},"America/Chihuahua":{u:-360,c:["MX"]},"America/Ciudad_Juarez":{u:-420,d:-360,c:["MX"]},"America/Coral_Harbour":{a:"America/Panama",c:["CA"],r:1},"America/Cordoba":{a:"America/Argentina/Cordoba",r:1},"America/Costa_Rica":{u:-360,c:["CR"]},"America/Creston":{a:"America/Phoenix",c:["CA"],r:1},"America/Cuiaba":{u:-240,c:["BR"]},"America/Curacao":{a:"America/Puerto_Rico",c:["CW"],r:1},"America/Danmarkshavn":{u:0,c:["GL"]},"America/Dawson":{u:-420,c:["CA"]},"America/Dawson_Creek":{u:-420,c:["CA"]},"America/Denver":{u:-420,d:-360,c:["US"]},"America/Detroit":{u:-300,d:-240,c:["US"]},"America/Dominica":{a:"America/Puerto_Rico",c:["DM"],r:1},"America/Edmonton":{u:-420,d:-360,c:["CA"]},"America/Eirunepe":{u:-300,c:["BR"]},"America/El_Salvador":{u:-360,c:["SV"]},"America/Ensenada":{a:"America/Tijuana",r:1},"America/Fort_Nelson":{u:-420,c:["CA"]},"America/Fort_Wayne":{a:"America/Indiana/Indianapolis",r:1},"America/Fortaleza":{u:-180,c:["BR"]},"America/Glace_Bay":{u:-240,d:-180,c:["CA"]},"America/Godthab":{a:"America/Nuuk",r:1},"America/Goose_Bay":{u:-240,d:-180,c:["CA"]},"America/Grand_Turk":{u:-300,d:-240,c:["TC"]},"America/Grenada":{a:"America/Puerto_Rico",c:["GD"],r:1},"America/Guadeloupe":{a:"America/Puerto_Rico",c:["GP"],r:1},"America/Guatemala":{u:-360,c:["GT"]},"America/Guayaquil":{u:-300,c:["EC"]},"America/Guyana":{u:-240,c:["GY"]},"America/Halifax":{u:-240,d:-180,c:["CA"]},"America/Havana":{u:-300,d:-240,c:["CU"]},"America/Hermosillo":{u:-420,c:["MX"]},"America/Indiana/Indianapolis":{u:-300,d:-240,c:["US"]},"America/Indiana/Knox":{u:-360,d:-300,c:["US"]},"America/Indiana/Marengo":{u:-300,d:-240,c:["US"]},"America/Indiana/Petersburg":{u:-300,d:-240,c:["US"]},"America/Indiana/Tell_City":{u:-360,d:-300,c:["US"]},"America/Indiana/Vevay":{u:-300,d:-240,c:["US"]},"America/Indiana/Vincennes":{u:-300,d:-240,c:["US"]},"America/Indiana/Winamac":{u:-300,d:-240,c:["US"]},"America/Indianapolis":{a:"America/Indiana/Indianapolis",r:1},"America/Inuvik":{u:-420,d:-360,c:["CA"]},"America/Iqaluit":{u:-300,d:-240,c:["CA"]},"America/Jamaica":{u:-300,c:["JM"]},"America/Jujuy":{a:"America/Argentina/Jujuy",r:1},"America/Juneau":{u:-540,d:-480,c:["US"]},"America/Kentucky/Louisville":{u:-300,d:-240,c:["US"]},"America/Kentucky/Monticello":{u:-300,d:-240,c:["US"]},"America/Knox_IN":{a:"America/Indiana/Knox",r:1},"America/Kralendijk":{a:"America/Puerto_Rico",c:["BQ"],r:1},"America/La_Paz":{u:-240,c:["BO"]},"America/Lima":{u:-300,c:["PE"]},"America/Los_Angeles":{u:-480,d:-420,c:["US"]},"America/Louisville":{a:"America/Kentucky/Louisville",r:1},"America/Lower_Princes":{a:"America/Puerto_Rico",c:["SX"],r:1},"America/Maceio":{u:-180,c:["BR"]},"America/Managua":{u:-360,c:["NI"]},"America/Manaus":{u:-240,c:["BR"]},"America/Marigot":{a:"America/Puerto_Rico",c:["MF"],r:1},"America/Martinique":{u:-240,c:["MQ"]},"America/Matamoros":{u:-360,d:-300,c:["MX"]},"America/Mazatlan":{u:-420,c:["MX"]},"America/Mendoza":{a:"America/Argentina/Mendoza",r:1},"America/Menominee":{u:-360,d:-300,c:["US"]},"America/Merida":{u:-360,c:["MX"]},"America/Metlakatla":{u:-540,d:-480,c:["US"]},"America/Mexico_City":{u:-360,c:["MX"]},"America/Miquelon":{u:-180,d:-120,c:["PM"]},"America/Moncton":{u:-240,d:-180,c:["CA"]},"America/Monterrey":{u:-360,c:["MX"]},"America/Montevideo":{u:-180,c:["UY"]},"America/Montreal":{a:"America/Toronto",c:["CA"],r:1},"America/Montserrat":{a:"America/Puerto_Rico",c:["MS"],r:1},"America/Nassau":{a:"America/Toronto",c:["BS"],r:1},"America/New_York":{u:-300,d:-240,c:["US"]},"America/Nipigon":{a:"America/Toronto",c:["CA"],r:1},"America/Nome":{u:-540,d:-480,c:["US"]},"America/Noronha":{u:-120,c:["BR"]},"America/North_Dakota/Beulah":{u:-360,d:-300,c:["US"]},"America/North_Dakota/Center":{u:-360,d:-300,c:["US"]},"America/North_Dakota/New_Salem":{u:-360,d:-300,c:["US"]},"America/Nuuk":{u:-120,d:-60,c:["GL"]},"America/Ojinaga":{u:-360,d:-300,c:["MX"]},"America/Panama":{u:-300,c:["PA","CA","KY"]},"America/Pangnirtung":{a:"America/Iqaluit",r:1},"America/Paramaribo":{u:-180,c:["SR"]},"America/Phoenix":{u:-420,c:["US","CA"]},"America/Port-au-Prince":{u:-300,d:-240,c:["HT"]},"America/Port_of_Spain":{a:"America/Puerto_Rico",c:["TT"],r:1},"America/Porto_Acre":{a:"America/Rio_Branco",r:1},"America/Porto_Velho":{u:-240,c:["BR"]},"America/Puerto_Rico":{u:-240,c:["PR","AG","CA","AI","AW","BL","BQ","CW","DM","GD","GP","KN","LC","MF","MS","SX","TT","VC","VG","VI"]},"America/Punta_Arenas":{u:-180,c:["CL"]},"America/Rainy_River":{a:"America/Winnipeg",r:1},"America/Rankin_Inlet":{u:-360,d:-300,c:["CA"]},"America/Recife":{u:-180,c:["BR"]},"America/Regina":{u:-360,c:["CA"]},"America/Resolute":{u:-360,d:-300,c:["CA"]},"America/Rio_Branco":{u:-300,c:["BR"]},"America/Rosario":{a:"America/Argentina/Cordoba",r:1},"America/Santa_Isabel":{a:"America/Tijuana",r:1},"America/Santarem":{u:-180,c:["BR"]},"America/Santiago":{u:-240,d:-180,c:["CL"]},"America/Santo_Domingo":{u:-240,c:["DO"]},"America/Sao_Paulo":{u:-180,c:["BR"]},"America/Scoresbysund":{u:-60,d:0,c:["GL"]},"America/Shiprock":{a:"America/Denver",r:1},"America/Sitka":{u:-540,d:-480,c:["US"]},"America/St_Barthelemy":{a:"America/Puerto_Rico",c:["BL"],r:1},"America/St_Johns":{u:-210,d:-150,c:["CA"]},"America/St_Kitts":{a:"America/Puerto_Rico",c:["KN"],r:1},"America/St_Lucia":{a:"America/Puerto_Rico",c:["LC"],r:1},"America/St_Thomas":{a:"America/Puerto_Rico",c:["VI"],r:1},"America/St_Vincent":{a:"America/Puerto_Rico",c:["VC"],r:1},"America/Swift_Current":{u:-360,c:["CA"]},"America/Tegucigalpa":{u:-360,c:["HN"]},"America/Thule":{u:-240,d:-180,c:["GL"]},"America/Thunder_Bay":{a:"America/Toronto",c:["CA"],r:1},"America/Tijuana":{u:-480,d:-420,c:["MX"]},"America/Toronto":{u:-300,d:-240,c:["CA","BS"]},"America/Tortola":{a:"America/Puerto_Rico",c:["VG"],r:1},"America/Vancouver":{u:-480,d:-420,c:["CA"]},"America/Virgin":{a:"America/Puerto_Rico",c:["VI"],r:1},"America/Whitehorse":{u:-420,c:["CA"]},"America/Winnipeg":{u:-360,d:-300,c:["CA"]},"America/Yakutat":{u:-540,d:-480,c:["US"]},"America/Yellowknife":{a:"America/Edmonton",r:1},"Antarctica/Casey":{u:660,c:["AQ"]},"Antarctica/Davis":{u:420,c:["AQ"]},"Antarctica/DumontDUrville":{a:"Pacific/Port_Moresby",c:["AQ"],r:1},"Antarctica/Macquarie":{u:600,d:660,c:["AU"]},"Antarctica/Mawson":{u:300,c:["AQ"]},"Antarctica/McMurdo":{a:"Pacific/Auckland",c:["AQ"],r:1},"Antarctica/Palmer":{u:-180,c:["AQ"]},"Antarctica/Rothera":{u:-180,c:["AQ"]},"Antarctica/South_Pole":{a:"Pacific/Auckland",c:["AQ"],r:1},"Antarctica/Syowa":{a:"Asia/Riyadh",c:["AQ"],r:1},"Antarctica/Troll":{u:0,d:120,c:["AQ"]},"Antarctica/Vostok":{a:"Asia/Urumqi",c:["AQ"],r:1},"Arctic/Longyearbyen":{a:"Europe/Berlin",c:["SJ"],r:1},"Asia/Aden":{a:"Asia/Riyadh",c:["YE"],r:1},"Asia/Almaty":{u:360,c:["KZ"]},"Asia/Amman":{u:180,c:["JO"]},"Asia/Anadyr":{u:720,c:["RU"]},"Asia/Aqtau":{u:300,c:["KZ"]},"Asia/Aqtobe":{u:300,c:["KZ"]},"Asia/Ashgabat":{u:300,c:["TM"]},"Asia/Ashkhabad":{a:"Asia/Ashgabat",r:1},"Asia/Atyrau":{u:300,c:["KZ"]},"Asia/Baghdad":{u:180,c:["IQ"]},"Asia/Bahrain":{a:"Asia/Qatar",c:["BH"],r:1},"Asia/Baku":{u:240,c:["AZ"]},"Asia/Bangkok":{u:420,c:["TH","CX","KH","LA","VN"]},"Asia/Barnaul":{u:420,c:["RU"]},"Asia/Beirut":{u:120,d:180,c:["LB"]},"Asia/Bishkek":{u:360,c:["KG"]},"Asia/Brunei":{a:"Asia/Kuching",c:["BN"],r:1},"Asia/Calcutta":{a:"Asia/Kolkata",r:1},"Asia/Chita":{u:540,c:["RU"]},"Asia/Choibalsan":{u:480,c:["MN"]},"Asia/Chongqing":{a:"Asia/Shanghai",r:1},"Asia/Chungking":{a:"Asia/Shanghai",r:1},"Asia/Colombo":{u:330,c:["LK"]},"Asia/Dacca":{a:"Asia/Dhaka",r:1},"Asia/Damascus":{u:180,c:["SY"]},"Asia/Dhaka":{u:360,c:["BD"]},"Asia/Dili":{u:540,c:["TL"]},"Asia/Dubai":{u:240,c:["AE","OM","RE","SC","TF"]},"Asia/Dushanbe":{u:300,c:["TJ"]},"Asia/Famagusta":{u:120,d:180,c:["CY"]},"Asia/Gaza":{u:120,d:180,c:["PS"]},"Asia/Harbin":{a:"Asia/Shanghai",r:1},"Asia/Hebron":{u:120,d:180,c:["PS"]},"Asia/Ho_Chi_Minh":{u:420,c:["VN"]},"Asia/Hong_Kong":{u:480,c:["HK"]},"Asia/Hovd":{u:420,c:["MN"]},"Asia/Irkutsk":{u:480,c:["RU"]},"Asia/Istanbul":{a:"Europe/Istanbul",r:1},"Asia/Jakarta":{u:420,c:["ID"]},"Asia/Jayapura":{u:540,c:["ID"]},"Asia/Jerusalem":{u:120,d:180,c:["IL"]},"Asia/Kabul":{u:270,c:["AF"]},"Asia/Kamchatka":{u:720,c:["RU"]},"Asia/Karachi":{u:300,c:["PK"]},"Asia/Kashgar":{a:"Asia/Urumqi",c:["CN"],r:1},"Asia/Kathmandu":{u:345,c:["NP"]},"Asia/Katmandu":{a:"Asia/Kathmandu",r:1},"Asia/Khandyga":{u:540,c:["RU"]},"Asia/Kolkata":{u:330,c:["IN"]},"Asia/Krasnoyarsk":{u:420,c:["RU"]},"Asia/Kuala_Lumpur":{a:"Asia/Singapore",c:["MY"],r:1},"Asia/Kuching":{u:480,c:["MY","BN"]},"Asia/Kuwait":{a:"Asia/Riyadh",c:["KW"],r:1},"Asia/Macao":{a:"Asia/Macau",r:1},"Asia/Macau":{u:480,c:["MO"]},"Asia/Magadan":{u:660,c:["RU"]},"Asia/Makassar":{u:480,c:["ID"]},"Asia/Manila":{u:480,c:["PH"]},"Asia/Muscat":{a:"Asia/Dubai",c:["OM"],r:1},"Asia/Nicosia":{u:120,d:180,c:["CY"]},"Asia/Novokuznetsk":{u:420,c:["RU"]},"Asia/Novosibirsk":{u:420,c:["RU"]},"Asia/Omsk":{u:360,c:["RU"]},"Asia/Oral":{u:300,c:["KZ"]},"Asia/Phnom_Penh":{a:"Asia/Bangkok",c:["KH"],r:1},"Asia/Pontianak":{u:420,c:["ID"]},"Asia/Pyongyang":{u:540,c:["KP"]},"Asia/Qatar":{u:180,c:["QA","BH"]},"Asia/Qostanay":{u:360,c:["KZ"]},"Asia/Qyzylorda":{u:300,c:["KZ"]},"Asia/Rangoon":{a:"Asia/Yangon",c:["MM"],r:1},"Asia/Riyadh":{u:180,c:["SA","AQ","KW","YE"]},"Asia/Saigon":{a:"Asia/Ho_Chi_Minh",r:1},"Asia/Sakhalin":{u:660,c:["RU"]},"Asia/Samarkand":{u:300,c:["UZ"]},"Asia/Seoul":{u:540,c:["KR"]},"Asia/Shanghai":{u:480,c:["CN"]},"Asia/Singapore":{u:480,c:["SG","MY"]},"Asia/Srednekolymsk":{u:660,c:["RU"]},"Asia/Taipei":{u:480,c:["TW"]},"Asia/Tashkent":{u:300,c:["UZ"]},"Asia/Tbilisi":{u:240,c:["GE"]},"Asia/Tehran":{u:210,c:["IR"]},"Asia/Tel_Aviv":{a:"Asia/Jerusalem",r:1},"Asia/Thimbu":{a:"Asia/Thimphu",r:1},"Asia/Thimphu":{u:360,c:["BT"]},"Asia/Tokyo":{u:540,c:["JP"]},"Asia/Tomsk":{u:420,c:["RU"]},"Asia/Ujung_Pandang":{a:"Asia/Makassar",r:1},"Asia/Ulaanbaatar":{u:480,c:["MN"]},"Asia/Ulan_Bator":{a:"Asia/Ulaanbaatar",r:1},"Asia/Urumqi":{u:360,c:["CN","AQ"]},"Asia/Ust-Nera":{u:600,c:["RU"]},"Asia/Vientiane":{a:"Asia/Bangkok",c:["LA"],r:1},"Asia/Vladivostok":{u:600,c:["RU"]},"Asia/Yakutsk":{u:540,c:["RU"]},"Asia/Yangon":{u:390,c:["MM","CC"]},"Asia/Yekaterinburg":{u:300,c:["RU"]},"Asia/Yerevan":{u:240,c:["AM"]},"Atlantic/Azores":{u:-60,d:0,c:["PT"]},"Atlantic/Bermuda":{u:-240,d:-180,c:["BM"]},"Atlantic/Canary":{u:0,d:60,c:["ES"]},"Atlantic/Cape_Verde":{u:-60,c:["CV"]},"Atlantic/Faeroe":{a:"Atlantic/Faroe",r:1},"Atlantic/Faroe":{u:0,d:60,c:["FO"]},"Atlantic/Jan_Mayen":{a:"Europe/Berlin",c:["SJ"],r:1},"Atlantic/Madeira":{u:0,d:60,c:["PT"]},"Atlantic/Reykjavik":{a:"Africa/Abidjan",c:["IS"],r:1},"Atlantic/South_Georgia":{u:-120,c:["GS"]},"Atlantic/St_Helena":{a:"Africa/Abidjan",c:["SH"],r:1},"Atlantic/Stanley":{u:-180,c:["FK"]},"Australia/ACT":{a:"Australia/Sydney",r:1},"Australia/Adelaide":{u:570,d:630,c:["AU"]},"Australia/Brisbane":{u:600,c:["AU"]},"Australia/Broken_Hill":{u:570,d:630,c:["AU"]},"Australia/Canberra":{a:"Australia/Sydney",r:1},"Australia/Currie":{a:"Australia/Hobart",r:1},"Australia/Darwin":{u:570,c:["AU"]},"Australia/Eucla":{u:525,c:["AU"]},"Australia/Hobart":{u:600,d:660,c:["AU"]},"Australia/LHI":{a:"Australia/Lord_Howe",r:1},"Australia/Lindeman":{u:600,c:["AU"]},"Australia/Lord_Howe":{u:630,d:660,c:["AU"]},"Australia/Melbourne":{u:600,d:660,c:["AU"]},"Australia/NSW":{a:"Australia/Sydney",r:1},"Australia/North":{a:"Australia/Darwin",r:1},"Australia/Perth":{u:480,c:["AU"]},"Australia/Queensland":{a:"Australia/Brisbane",r:1},"Australia/South":{a:"Australia/Adelaide",r:1},"Australia/Sydney":{u:600,d:660,c:["AU"]},"Australia/Tasmania":{a:"Australia/Hobart",r:1},"Australia/Victoria":{a:"Australia/Melbourne",r:1},"Australia/West":{a:"Australia/Perth",r:1},"Australia/Yancowinna":{a:"Australia/Broken_Hill",r:1},"Brazil/Acre":{a:"America/Rio_Branco",r:1},"Brazil/DeNoronha":{a:"America/Noronha",r:1},"Brazil/East":{a:"America/Sao_Paulo",r:1},"Brazil/West":{a:"America/Manaus",r:1},CET:{u:60,d:120},CST6CDT:{u:-360,d:-300},"Canada/Atlantic":{a:"America/Halifax",r:1},"Canada/Central":{a:"America/Winnipeg",r:1},"Canada/Eastern":{a:"America/Toronto",c:["CA"],r:1},"Canada/Mountain":{a:"America/Edmonton",r:1},"Canada/Newfoundland":{a:"America/St_Johns",r:1},"Canada/Pacific":{a:"America/Vancouver",r:1},"Canada/Saskatchewan":{a:"America/Regina",r:1},"Canada/Yukon":{a:"America/Whitehorse",r:1},"Chile/Continental":{a:"America/Santiago",r:1},"Chile/EasterIsland":{a:"Pacific/Easter",r:1},Cuba:{a:"America/Havana",r:1},EET:{u:120,d:180},EST:{u:-300},EST5EDT:{u:-300,d:-240},Egypt:{a:"Africa/Cairo",r:1},Eire:{a:"Europe/Dublin",r:1},"Etc/GMT":{u:0},"Etc/GMT+0":{a:"Etc/GMT",r:1},"Etc/GMT+1":{u:-60},"Etc/GMT+10":{u:-600},"Etc/GMT+11":{u:-660},"Etc/GMT+12":{u:-720},"Etc/GMT+2":{u:-120},"Etc/GMT+3":{u:-180},"Etc/GMT+4":{u:-240},"Etc/GMT+5":{u:-300},"Etc/GMT+6":{u:-360},"Etc/GMT+7":{u:-420},"Etc/GMT+8":{u:-480},"Etc/GMT+9":{u:-540},"Etc/GMT-0":{a:"Etc/GMT",r:1},"Etc/GMT-1":{u:60},"Etc/GMT-10":{u:600},"Etc/GMT-11":{u:660},"Etc/GMT-12":{u:720},"Etc/GMT-13":{u:780},"Etc/GMT-14":{u:840},"Etc/GMT-2":{u:120},"Etc/GMT-3":{u:180},"Etc/GMT-4":{u:240},"Etc/GMT-5":{u:300},"Etc/GMT-6":{u:360},"Etc/GMT-7":{u:420},"Etc/GMT-8":{u:480},"Etc/GMT-9":{u:540},"Etc/GMT0":{a:"Etc/GMT",r:1},"Etc/Greenwich":{a:"Etc/GMT",r:1},"Etc/UCT":{a:"Etc/UTC",r:1},"Etc/UTC":{u:0},"Etc/Universal":{a:"Etc/UTC",r:1},"Etc/Zulu":{a:"Etc/UTC",r:1},"Europe/Amsterdam":{a:"Europe/Brussels",c:["NL"],r:1},"Europe/Andorra":{u:60,d:120,c:["AD"]},"Europe/Astrakhan":{u:240,c:["RU"]},"Europe/Athens":{u:120,d:180,c:["GR"]},"Europe/Belfast":{a:"Europe/London",c:["GB"],r:1},"Europe/Belgrade":{u:60,d:120,c:["RS","BA","HR","ME","MK","SI"]},"Europe/Berlin":{u:60,d:120,c:["DE","DK","NO","SE","SJ"]},"Europe/Bratislava":{a:"Europe/Prague",c:["SK"],r:1},"Europe/Brussels":{u:60,d:120,c:["BE","LU","NL"]},"Europe/Bucharest":{u:120,d:180,c:["RO"]},"Europe/Budapest":{u:60,d:120,c:["HU"]},"Europe/Busingen":{a:"Europe/Zurich",c:["DE"],r:1},"Europe/Chisinau":{u:120,d:180,c:["MD"]},"Europe/Copenhagen":{a:"Europe/Berlin",c:["DK"],r:1},"Europe/Dublin":{u:60,d:0,c:["IE"]},"Europe/Gibraltar":{u:60,d:120,c:["GI"]},"Europe/Guernsey":{a:"Europe/London",c:["GG"],r:1},"Europe/Helsinki":{u:120,d:180,c:["FI","AX"]},"Europe/Isle_of_Man":{a:"Europe/London",c:["IM"],r:1},"Europe/Istanbul":{u:180,c:["TR"]},"Europe/Jersey":{a:"Europe/London",c:["JE"],r:1},"Europe/Kaliningrad":{u:120,c:["RU"]},"Europe/Kiev":{a:"Europe/Kyiv",r:1},"Europe/Kirov":{u:180,c:["RU"]},"Europe/Kyiv":{u:120,d:180,c:["UA"]},"Europe/Lisbon":{u:0,d:60,c:["PT"]},"Europe/Ljubljana":{a:"Europe/Belgrade",c:["SI"],r:1},"Europe/London":{u:0,d:60,c:["GB","GG","IM","JE"]},"Europe/Luxembourg":{a:"Europe/Brussels",c:["LU"],r:1},"Europe/Madrid":{u:60,d:120,c:["ES"]},"Europe/Malta":{u:60,d:120,c:["MT"]},"Europe/Mariehamn":{a:"Europe/Helsinki",c:["AX"],r:1},"Europe/Minsk":{u:180,c:["BY"]},"Europe/Monaco":{a:"Europe/Paris",c:["MC"],r:1},"Europe/Moscow":{u:180,c:["RU"]},"Europe/Nicosia":{a:"Asia/Nicosia",r:1},"Europe/Oslo":{a:"Europe/Berlin",c:["NO"],r:1},"Europe/Paris":{u:60,d:120,c:["FR","MC"]},"Europe/Podgorica":{a:"Europe/Belgrade",c:["ME"],r:1},"Europe/Prague":{u:60,d:120,c:["CZ","SK"]},"Europe/Riga":{u:120,d:180,c:["LV"]},"Europe/Rome":{u:60,d:120,c:["IT","SM","VA"]},"Europe/Samara":{u:240,c:["RU"]},"Europe/San_Marino":{a:"Europe/Rome",c:["SM"],r:1},"Europe/Sarajevo":{a:"Europe/Belgrade",c:["BA"],r:1},"Europe/Saratov":{u:240,c:["RU"]},"Europe/Simferopol":{u:180,c:["RU","UA"]},"Europe/Skopje":{a:"Europe/Belgrade",c:["MK"],r:1},"Europe/Sofia":{u:120,d:180,c:["BG"]},"Europe/Stockholm":{a:"Europe/Berlin",c:["SE"],r:1},"Europe/Tallinn":{u:120,d:180,c:["EE"]},"Europe/Tirane":{u:60,d:120,c:["AL"]},"Europe/Tiraspol":{a:"Europe/Chisinau",r:1},"Europe/Ulyanovsk":{u:240,c:["RU"]},"Europe/Uzhgorod":{a:"Europe/Kyiv",r:1},"Europe/Vaduz":{a:"Europe/Zurich",c:["LI"],r:1},"Europe/Vatican":{a:"Europe/Rome",c:["VA"],r:1},"Europe/Vienna":{u:60,d:120,c:["AT"]},"Europe/Vilnius":{u:120,d:180,c:["LT"]},"Europe/Volgograd":{u:180,c:["RU"]},"Europe/Warsaw":{u:60,d:120,c:["PL"]},"Europe/Zagreb":{a:"Europe/Belgrade",c:["HR"],r:1},"Europe/Zaporozhye":{a:"Europe/Kyiv",r:1},"Europe/Zurich":{u:60,d:120,c:["CH","DE","LI"]},Factory:{u:0},GB:{a:"Europe/London",c:["GB"],r:1},"GB-Eire":{a:"Europe/London",c:["GB"],r:1},GMT:{a:"Etc/GMT",r:1},"GMT+0":{a:"Etc/GMT",r:1},"GMT-0":{a:"Etc/GMT",r:1},GMT0:{a:"Etc/GMT",r:1},Greenwich:{a:"Etc/GMT",r:1},HST:{u:-600},Hongkong:{a:"Asia/Hong_Kong",r:1},Iceland:{a:"Africa/Abidjan",c:["IS"],r:1},"Indian/Antananarivo":{a:"Africa/Nairobi",c:["MG"],r:1},"Indian/Chagos":{u:360,c:["IO"]},"Indian/Christmas":{a:"Asia/Bangkok",c:["CX"],r:1},"Indian/Cocos":{a:"Asia/Yangon",c:["CC"],r:1},"Indian/Comoro":{a:"Africa/Nairobi",c:["KM"],r:1},"Indian/Kerguelen":{a:"Indian/Maldives",c:["TF"],r:1},"Indian/Mahe":{a:"Asia/Dubai",c:["SC"],r:1},"Indian/Maldives":{u:300,c:["MV","TF"]},"Indian/Mauritius":{u:240,c:["MU"]},"Indian/Mayotte":{a:"Africa/Nairobi",c:["YT"],r:1},"Indian/Reunion":{a:"Asia/Dubai",c:["RE"],r:1},Iran:{a:"Asia/Tehran",r:1},Israel:{a:"Asia/Jerusalem",r:1},Jamaica:{a:"America/Jamaica",r:1},Japan:{a:"Asia/Tokyo",r:1},Kwajalein:{a:"Pacific/Kwajalein",r:1},Libya:{a:"Africa/Tripoli",r:1},MET:{u:60,d:120},MST:{u:-420},MST7MDT:{u:-420,d:-360},"Mexico/BajaNorte":{a:"America/Tijuana",r:1},"Mexico/BajaSur":{a:"America/Mazatlan",r:1},"Mexico/General":{a:"America/Mexico_City",r:1},NZ:{a:"Pacific/Auckland",c:["NZ"],r:1},"NZ-CHAT":{a:"Pacific/Chatham",r:1},Navajo:{a:"America/Denver",r:1},PRC:{a:"Asia/Shanghai",r:1},PST8PDT:{u:-480,d:-420},"Pacific/Apia":{u:780,c:["WS"]},"Pacific/Auckland":{u:720,d:780,c:["NZ","AQ"]},"Pacific/Bougainville":{u:660,c:["PG"]},"Pacific/Chatham":{u:765,d:825,c:["NZ"]},"Pacific/Chuuk":{a:"Pacific/Port_Moresby",c:["FM"],r:1},"Pacific/Easter":{u:-360,d:-300,c:["CL"]},"Pacific/Efate":{u:660,c:["VU"]},"Pacific/Enderbury":{a:"Pacific/Kanton",r:1},"Pacific/Fakaofo":{u:780,c:["TK"]},"Pacific/Fiji":{u:720,c:["FJ"]},"Pacific/Funafuti":{a:"Pacific/Tarawa",c:["TV"],r:1},"Pacific/Galapagos":{u:-360,c:["EC"]},"Pacific/Gambier":{u:-540,c:["PF"]},"Pacific/Guadalcanal":{u:660,c:["SB","FM"]},"Pacific/Guam":{u:600,c:["GU","MP"]},"Pacific/Honolulu":{u:-600,c:["US"]},"Pacific/Johnston":{a:"Pacific/Honolulu",r:1},"Pacific/Kanton":{u:780,c:["KI"]},"Pacific/Kiritimati":{u:840,c:["KI"]},"Pacific/Kosrae":{u:660,c:["FM"]},"Pacific/Kwajalein":{u:720,c:["MH"]},"Pacific/Majuro":{a:"Pacific/Tarawa",c:["MH"],r:1},"Pacific/Marquesas":{u:-570,c:["PF"]},"Pacific/Midway":{a:"Pacific/Pago_Pago",c:["UM"],r:1},"Pacific/Nauru":{u:720,c:["NR"]},"Pacific/Niue":{u:-660,c:["NU"]},"Pacific/Norfolk":{u:660,d:720,c:["NF"]},"Pacific/Noumea":{u:660,c:["NC"]},"Pacific/Pago_Pago":{u:-660,c:["AS","UM"]},"Pacific/Palau":{u:540,c:["PW"]},"Pacific/Pitcairn":{u:-480,c:["PN"]},"Pacific/Pohnpei":{a:"Pacific/Guadalcanal",c:["FM"],r:1},"Pacific/Ponape":{a:"Pacific/Guadalcanal",c:["FM"],r:1},"Pacific/Port_Moresby":{u:600,c:["PG","AQ","FM"]},"Pacific/Rarotonga":{u:-600,c:["CK"]},"Pacific/Saipan":{a:"Pacific/Guam",c:["MP"],r:1},"Pacific/Samoa":{a:"Pacific/Pago_Pago",c:["AS"],r:1},"Pacific/Tahiti":{u:-600,c:["PF"]},"Pacific/Tarawa":{u:720,c:["KI","MH","TV","UM","WF"]},"Pacific/Tongatapu":{u:780,c:["TO"]},"Pacific/Truk":{a:"Pacific/Port_Moresby",c:["FM"],r:1},"Pacific/Wake":{a:"Pacific/Tarawa",c:["UM"],r:1},"Pacific/Wallis":{a:"Pacific/Tarawa",c:["WF"],r:1},"Pacific/Yap":{a:"Pacific/Port_Moresby",c:["FM"],r:1},Poland:{a:"Europe/Warsaw",r:1},Portugal:{a:"Europe/Lisbon",r:1},ROC:{a:"Asia/Taipei",r:1},ROK:{a:"Asia/Seoul",r:1},Singapore:{a:"Asia/Singapore",c:["SG"],r:1},Turkey:{a:"Europe/Istanbul",r:1},UCT:{a:"Etc/UTC",r:1},"US/Alaska":{a:"America/Anchorage",r:1},"US/Aleutian":{a:"America/Adak",r:1},"US/Arizona":{a:"America/Phoenix",c:["US"],r:1},"US/Central":{a:"America/Chicago",r:1},"US/East-Indiana":{a:"America/Indiana/Indianapolis",r:1},"US/Eastern":{a:"America/New_York",r:1},"US/Hawaii":{a:"Pacific/Honolulu",r:1},"US/Indiana-Starke":{a:"America/Indiana/Knox",r:1},"US/Michigan":{a:"America/Detroit",r:1},"US/Mountain":{a:"America/Denver",r:1},"US/Pacific":{a:"America/Los_Angeles",r:1},"US/Samoa":{a:"Pacific/Pago_Pago",c:["AS"],r:1},UTC:{a:"Etc/UTC",r:1},Universal:{a:"Etc/UTC",r:1},"W-SU":{a:"Europe/Moscow",r:1},WET:{u:0,d:60},Zulu:{a:"Etc/UTC",r:1}}};function zo(e,t){var r=e.countries[t];if(!r)return null;var n=function(e){Lo||(Lo=function(e){return Object.keys(e.timezones).reduce((function(t,r){var n=e.timezones[r],o=n.c,a=n.a,i=e.timezones[a]||{},s=o||i.c;return s?(s.forEach((function(e){t[e]||Object.assign(t,No({},e,{current:[],all:[]})),void 0===n.r&&t[e].current.push(r),t[e].all.push(r)})),t):t}),{})}(e));return Lo}(e)[t]||{};return{id:t,name:r,timezones:n.current||[],allTimezones:n.all||[]}}function ko(e){var t=Math.floor(Math.abs(e)/60),r=e%60;return"".concat(e<0?"-":"+").concat(Do(t),":").concat(Do(r))}function Do(e){var t=Math.abs(e);return"".concat(t<10?"0":"").concat(t)}var Bo=["allTimezones"];Object.keys(Fo.timezones).length;var Uo={},Vo={};function Go(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return Uo[e]||function(e){if(!e)return;Uo[e.id]=e}(zo(Fo,e)),function(e,t){if(!e)return null;var r=t||{},n=r.deprecated;e.allTimezones;var o=xo(e,Bo),a=n?e.allTimezones:e.timezones;return Mo(Mo({},o),{},{timezones:a})}(Uo[e],t)}function jo(e){return Vo[e]||function(e){if(!e)return;Vo[e.name]=e,Object.keys(e).length}(function(e,t){var r=e.timezones[t];if(!r)return null;var n=r.a,o=void 0===n?null:n,a=Mo(Mo({},o?e.timezones[o]:{}),e.timezones[t]),i=a.c||[],s=a.u,c=Number.isInteger(a.d)?a.d:s,l={name:t,countries:i,utcOffset:s,utcOffsetStr:ko(s),dstOffset:c,dstOffsetStr:ko(c),aliasOf:o};return r.r&&(l.deprecated=!0),l}(Fo,e)),Vo[e]?Mo({},Vo[e]):null}const qo=()=>{const e=Intl.DateTimeFormat().resolvedOptions().timeZone;return function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return((jo(e)||{}).countries||[]).map((function(e){return Go(e,t)}))}(e)[0]?.id??""},Ho=e=>"unknown"===e?.toLowerCase()?"":e,Ko=(e,t,r)=>{if(e.environment.previewMode)return(e=>{const t=e?.products?e.products[0].paymentPlans[0].charges[0]:{prices:[{price:25}],chargeData:{name:"Monthly Fee"}},r=t.prices[0]?.price,n=t.chargeData?.name;return{success:!0,contractedMrr:r,totalContractedValue:null,amount:r+3,amountWithoutTax:r,taxAmount:3,invoiceTargetDate:"2024-05-20",documentDate:"2024-05-20",invoiceItems:{0:{serviceStartDate:"2024-05-20",serviceEndDate:"2024-06-19",chargeAmount:r,taxAmount:3,chargeDescription:"",chargeName:n,productName:"Product",productRatePlanChargeId:"8ad097b48f533234018f57a8982a5a45",quantity:1,unitOfMeasure:""}}}})(Ot(e).dynamicOfferPreview??{});const n={account:{city:Ho(Ot(e).requestCity),country:Ho(Ot(e).requestCountry)||qo(),county:"",state:Ho(Ot(e).requestState),zipCode:Ho(Ot(e).requestZipCode)},currency:Co(e,t),ratePlanIds:[t.paymentOption.slug],termType:"EVERGREEN",...t.dynamicOfferResult?{dynamicOfferResult:JSON.stringify(t.dynamicOfferResult),productId:t.paymentOption.productId}:{}};return gn("plugins/public/zuora-billing/preview-subscription",{method:"POST",bodyObject:n},r).then((e=>e.json()))},Yo=(e,t="en-UK")=>{if(!e)return"";const r=new Date(e);return Number.isNaN(r.getDate())?"Unknown":r.toLocaleDateString(t,{day:"numeric",month:"short",year:"numeric"})},Wo=/^<<<([a-z0-9\-.]+)\|(.*)>>>$/,Jo=(e,t)=>{if(null==t)return"";const r=e.languagePack?.entries??{},n=rt[t];return r[n.languagePackKey]??n.fallbackMessage},Qo=(e,t,r)=>{try{return(e.languagePack?.entries??{})[t]??r}catch(e){return console.warn(`error resolving language pack key in string ${t}`,e),r}},Zo=e=>Qo(e,"pages.common.date-time-format-locale","en-US"),Xo=(e,t)=>{try{return null==t?t:"object"==typeof t||Array.isArray(t)?Array.isArray(t)?t.map((t=>Xo(e,t))):Object.entries(t).reduce(((t,[r,n])=>({...t,[r]:Xo(e,n)})),{}):"string"==typeof t||t instanceof String?((e,t)=>{if(!t)return t;try{const r=Wo.exec(t);return r&&r[1]?(e?.entries??{})[r[1]]??r[2]:t}catch(e){return console.warn(`error resolving language pack key in string ${t}`,e),t}})(e,t):t}catch(e){return console.warn("error resolving language pack entries",e),t}},ea=(e,t)=>{try{if(t.isOneOff)return"";const r=Qo(e,"forms.billing.history.every","every"),n=t["transaction-history"]?.[0]??t["next-billing-time"],o=n?.["human-readable-amount"];if(!o)return"";const a=t.currency_code?.toUpperCase()??o.replace(/[0-9,.]/g,""),{discounts_applied:i,pre_discount_price:s,billing_frequency:c,billing_frequency_unit:l}=t??{};if(!i&&s&&c&&l)return 1===c?`${a} ${s}/${l.toLowerCase()}`:`${a} ${s} ${r} ${c} ${l.toLowerCase()}s`;const u=Number(o.replace(/[^\d.-]/g,"")),p=Number.isInteger(u)?u.toFixed(0):u;return 1===n.cycleCount?`${a}${p}/${n.cycle}`:`${a} ${p} ${r} ${n.cycleCount} ${n.cycle}s`}catch{return console.error("Failed to get subscription amount"),""}},ta=(e,t,r)=>(e?"":"+")+`${(t/100).toFixed(2)} ${r}`+(e?" incl.":""),ra=(e,t)=>{try{const r=t["default-tax-rates"],n=t["managed-by"].toLowerCase(),o="canceled"===t["subscription-state"].toLowerCase(),a=Yo("stripe"===n?t.ended:t.ends),i=Zo(e);let s=t["transaction-history"].reduce(((e,t)=>{const o=Yo(t.time,i),a=((e,t,r,n)=>{try{const o=new Date(e),a=(()=>{switch(t){case"day":return o.setDate(o.getDate()+r);case"week":return o.setDate(o.getDate()+7*r);case"month":return o.setMonth(o.getMonth()+r);case"year":return o.setFullYear(o.getFullYear()+r);default:return null}})();return`${Yo(e,n)} - ${Yo(a,n)}`}catch{return console.error("Failed to get subscription period"),""}})(t.time,t.cycle,t.cycleCount,i),{cents:s,currency:c,taxRate:l}=t;let u,p;if(l){const{displayName:e,taxInclusive:t,taxPercent:r}=l;({taxes:p,total:u}=((e,t,r,n)=>{try{const o=n*(e/100),a=((e+(r?0:o))/100).toFixed(2);return{taxes:`(${ta(r,o,t)})`,total:a}}catch{return console.error("Failed to get subscription tax"),{taxes:"",total:0}}})(s,e,t,r))}else r?.length?({taxes:p,total:u}=((e,t)=>{try{const r=[];let n=e;t.forEach((t=>{const o=t.taxPercent*(e/100),a=ta(t.taxInclusive,o,t.displayName);r.push(a),n+=t.taxInclusive?0:o}));const o=(n/100).toFixed(2);return{taxes:`(${r.join(", ")})`,total:o}}catch{return console.error("Failed to get subscription default tax"),{taxes:"",total:0}}})(s,r)):(u=(s/100).toFixed(2),p=null);return[...e,{date:o,period:a,subtotal:"stripe"===n?(t.cents/100).toFixed(2):null,currency:c,taxes:p,total:u}]}),[]);return o&&(s=[{date:a,period:"canceled"},...s]),s}catch{return console.error("Failed to get subscription billing history"),null}},na=(e,t,r,n)=>gn(`blaize/payment/${e.organisationConfiguration.paymentProvider}/subscriptions`,{method:"GET"},r,null,!0).then((e=>e.ok?e.json():[])).then((t=>t.filter((e=>!n||"active"===e["subscription-state"]?.toLowerCase())).map((t=>({externalId:t["external-id"],productId:t["blaize-product"].id,productLabel:t["blaize-product"].label??t["blaize-product"].id,planId:t.plan_id,planLabel:t.plan_name,currency:t.currency_code,status:"active"===t["subscription-state"]?.toLowerCase()?"active":"inactive",nextBillingTime:Yo(t["next-billing-time"]),amount:ea(e,t),transactionHistory:ra(e,t)}))))),oa={draft:"pending","pending activation":"pending","pending acceptance":"pending",active:"active",cancelled:"inactive",expired:"inactive",suspended:"inactive"},aa=(e,t)=>gn("zephr/payment/stripe/create-subscription-previews",{method:"POST",bodyObject:{product_id:e.paymentOption.productId,plan_id:e.paymentOption.slug,billing_country:e.billingAddress.country,billing_post_code:e.billingAddress.postalCode,promo_code:e.promoCodeValid?e.promoCode:void 0}},t,null,!0).then((e=>e.json()));function ia(t){let r,n;return{c(){r=P("script"),r.innerHTML="",_(r,"type","text/javascript"),c(r.src,n="https://js.zuora.com/payment/v3/zuora.js")||_(r,"src","https://js.zuora.com/payment/v3/zuora.js"),_(r,"onload","window.zuoraLoadCallback()")},m(e,t){h(document.head,r)},p:e,i:e,o:e,d(e){g(r)}}}function sa(e,t,r){let{onMountCallback:n}=t;return k(n),e.$$set=e=>{"onMountCallback"in e&&r(0,n=e.onMountCallback)},[n]}class ca extends pe{constructor(e){super(),ue(this,e,sa,ia,i,{onMountCallback:0})}}const la={[mn]:{loader:(e,t,r)=>{const n=Ot(e).paymentProviderFormConfig?.enablePaypal;r.incrementRequestCount(),Sn.then((()=>Cn(0,r))).then((e=>{window.braintree.dropin.create({authorization:e,container:"#braintree-dropin-container",...n?{paypal:En(t)}:{}},((e,t)=>{if(r.decrementRequestCount(),An=t,r.updateFormState({paymentProviderFormLoaded:!0}),e)throw e;An.isPaymentMethodRequestable()&&r.updateFormState({paymentFormComplete:!0}),An.on("paymentMethodRequestable",(()=>{r.updateFormState({paymentFormComplete:!0})})),An.on("noPaymentMethodRequestable",(()=>{r.updateFormState({paymentFormComplete:!1})}))}))})).catch((e=>{console.error(e),r.decrementRequestCount()}))},preLoader:null,completer:async(e,t,r)=>{let n,o;r.incrementRequestCount();const a=new Promise(((e,t)=>{n=e,o=t})),i=e=>{console.error(e),r.decrementRequestCount(),o()};return An.requestPaymentMethod(((o,a)=>{!o&&a||i(`Error requesting payment method ${JSON.stringify(o)}`);const{url:s,body:c,method:l}=Pn(e,t,mn,{payment_nonce:a.nonce,..."PayPalAccount"===a.type?{paypal:!0}:{}});return gn(s,{method:l,bodyObject:c},r).then((e=>{if(e?.ok)return r.decrementRequestCount(),void n();i(e)})).catch((e=>{i(e)}))})),a},changePaymentCompleter:async(e,t,r)=>{let n,o;const a=new Promise(((e,t)=>{n=e,o=t}));return An.requestPaymentMethod(((e,a)=>(!e&&a||console.error(`Error requesting payment method ${JSON.stringify(e)}`),gn(`blaize/payment/braintree/subscriptions/${t.selectedSubscription?.externalId}`,{method:"PATCH",bodyObject:{payment_method_nonce:a?.nonce}},r).then((e=>{console.log(e),e?.ok?n():o(e)})).catch((e=>{o(e)}))))),a},component:class extends pe{constructor(e){super(),ue(this,e,Qr,Jr,i,{onMountCallback:3,providerError:0,isDisabled:1,isLoaded:4,error:2})}},preLoaderComponent:null,promoCodeCheckPath:"blaize/payment/braintree/promo-code-check",productAddonPath:"blaize/payment/braintree/addons-check",existingSubscriptionLoader:na,priceCalculator:Eo,hasProductAddons:!0,hasPromoCodes:()=>!0,internalSubmit:()=>!1,noPaymentForm:()=>!1,canAttemptIncompletePaymentFormSubmission:!1},[fn]:{loader:(e,t,r)=>{r.incrementRequestCount(),yo(r).then((()=>{ho=Un(fo,e,r),ho.mount("#stripe-element"),ho.addEventListener("change",(t=>{r.updateFormState({paymentProviderError:t.error,paymentFormComplete:t.complete,serverErrors:[]}),e.organisationConfiguration.stripeAutomaticTaxEnabled&&e.formType!==vt.LIST_SUBSCRIPTIONS&&((e,t,r)=>{e.complete&&(r.incrementRequestCount(),fo.createPaymentMethod("card",ho,{}).then((({error:e,paymentMethod:t})=>e||!t?(console.error(`Error requesting payment method ${JSON.stringify(e)}`),null):(r.updateFormState({paymentMethodId:t.id}),t?.billing_details?.address))).catch((e=>(console.error(`Error requesting payment method ${JSON.stringify(e)}`),null))).then((e=>Fn(t,r.updateFormState({billingAddress:{country:e?.country,postalCode:e?.postal_code}}),r))).catch((e=>{console.error(`Error requesting payment method ${JSON.stringify(e)}`)})).finally((()=>{r.decrementRequestCount()})))})(t,e,r)})),ho.addEventListener("ready",(()=>{r.updateFormState({paymentProviderFormLoaded:!0})})),r.decrementRequestCount()})).catch((e=>{console.error(e),r.decrementRequestCount()}))},preLoader:null,completer:go,changePaymentCompleter:(e,t,r)=>{const n=t.paymentMethodId;return r.incrementRequestCount(),n?bo(e,t,r,n):fo.createPaymentMethod("card",ho,{}).then((async({error:n,paymentMethod:o})=>{if(n||!o)throw r.decrementRequestCount(),`Error requesting payment method ${JSON.stringify(n)}`;await gn("zephr/payment/stripe/setupIntentSecret",{method:"POST"},r).then((async e=>{const t=(await e.json()).clientSecret;return fo.confirmCardSetup(t,{payment_method:{card:ho}})})).then((async n=>bo(e,t,r,n.setupIntent.payment_method)))}))},component:class extends pe{constructor(e){super(),ue(this,e,Xr,Zr,i,{onMountCallback:4,providerError:0,isDisabled:1,isComplete:2,isLoaded:5,error:3})}},preLoaderComponent:null,promoCodeCheckPath:"zephr/payment/stripe/promo-code-check",existingSubscriptionLoader:na,priceCalculator:(e,t,r)=>e.organisationConfiguration.stripeAutomaticTaxEnabled&&null!=t.billingAddress.country?aa(t,r).then((r=>{if(!r.total)return Eo(e,t);const n=kn(t.paymentOption.currencyCode.toUpperCase())?1:.01,o=e=>Mn(e*n,t.paymentOption.currencyCode);return{slug:t.paymentOption.slug,productId:t.paymentOption.productId,promoCode:t.promoCode,billingAddress:t.billingAddress,addonPrices:[],totalPrice:r.total*n,totalPriceFormattedString:o(r.total),netPrice:r.sub_total*n,netPriceFormattedString:o(r.sub_total),taxPrice:r.tax?r.tax*n:null,taxPriceFormattedString:r.tax?o(r.tax):null,discountPrice:r.discount?r.discount*n:null,discountPriceFormattedPrice:r.discount?o(r.discount):null,chargeItems:[]}})).catch((r=>(console.error(`Error calculating stripe tax preview ${JSON.stringify(r)}`),Eo(e,t)))):Eo(e,t),changeSubscriptionProrateCalculator:(e,t,r)=>{const n=t.validChangeFromPlans.find((e=>t.paymentOption.slug===e.planSlug&&t.paymentOption.productId===e.productId))?.changesFromSubscription;if(n)return gn(`zephr/payment/stripe/subscriptions/${n.externalId}/change-previews`,{method:"POST",bodyObject:{plan_id:t.paymentOption.slug}},r).then((e=>e.json())).then((e=>{const r=kn(t.paymentOption.currencyCode.toUpperCase())?1:.01;return{totalPrice:e.total*r,totalPriceFormattedString:Mn(e.total*r,t.paymentOption.currencyCode),subTotalPrice:e.sub_total*r,subTotalPriceFormattedString:Mn(e.sub_total*r,t.paymentOption.currencyCode)}}));console.error("No valid change from subscription")},hasProductAddons:!1,hasPromoCodes:()=>!0,internalSubmit:()=>!1,noPaymentForm:()=>!1,canAttemptIncompletePaymentFormSubmission:!0},[hn]:{loader:(e,t,r)=>{Ot(e).changeSubscriptionMode?r.updateFormState({paymentFormComplete:!0}):_o().then((()=>wo(e,r))).then((n=>{if(!Co(e,t))return r.updateFormState({serverErrors:[tt.PAYMENT_PROCESSING_ERROR]}),console.error("Form currency not set"),void it(e,"zephr_form_error",{error:tt[tt.PAYMENT_PROCESSING_ERROR]});if(Oo(e))return vo(e,t,r,n);const o={tenantId:n.tenantId,token:n.token,signature:n.signature,key:n.key,id:n.id,url:n.url,style:"inline",submitEnabled:!0},a={email:t.emailAddress};window.Z.setEventHandler("onloadCallback",(()=>{r.updateFormState({paymentProviderFormLoaded:!0})})),window.Z.render(o,a,(n=>{if("true"!==n.success)return console.error("Payment failed",n),r.updateFormState({serverErrors:[tt.PAYMENT_PROCESSING_ERROR]}),void it(e,"zephr_form_error",{error:tt[tt.PAYMENT_PROCESSING_ERROR]});r.updateFormState({paymentFormComplete:!0,paymentProviderVendorFields:{currency:Co(e,t),detail:JSON.stringify({creditCardCountry:n.creditCardCountry,creditCardState:n.creditCardState,refId:n.refId,email:n.email}),...t.dynamicOfferResult?{dynamicOfferResult:JSON.stringify(t.dynamicOfferResult)}:{}}}),r.completeSection()}))}))},preLoader:_o,completer:async(e,t,r)=>{r.incrementRequestCount();try{if(!Ot(e).changeSubscriptionMode&&!t.paymentProviderVendorFields)return console.error("Flow error - no Zuora vendor fields found"),r.updateFormState({serverErrors:[tt.PAYMENT_PROCESSING_ERROR]}),it(e,"zephr_form_error",{error:tt[tt.PAYMENT_PROCESSING_ERROR]}),Promise.resolve();const n=Ot(e).paymentProviderFormConfig?.subscriptionCustomFields||[],o={};if(n?.length){const t=await po(e,r);for(const e of n){const r=so(e.value,t)||"";o[e.name]=Io(r,e.type)}}const a=!!Object.keys(o).length,i={...t.paymentProviderVendorFields,...a?{subscriptionCustomFields:JSON.stringify(o)}:{}},{url:s,body:c,method:l}=Pn(e,t,hn,i),u=Ot(e).changeSubscriptionMode?c:{...c,plan_id:`zuora-billing_product_rate_plan-${c.plan_id}-unused`};return await gn(s,{method:l,bodyObject:u},r).then((e=>{if(!e?.ok)return console.error("Error when subscribing",e),Promise.reject()}))}finally{r.decrementRequestCount(),r.updateFormState({paymentProviderFormBusy:!1})}},changePaymentCompleter:(e,t,r)=>{console.log(t.paymentProviderVendorFields);const n=JSON.parse(t.paymentProviderVendorFields?.detail).refId;return gn("plugins/public/zuora-billing/update-account",{method:"POST",bodyObject:{paymentMethodId:n}},r).then((e=>{if(!e?.ok)return console.error("Error when changing default payment method",e),Promise.reject()}))},component:class extends pe{constructor(e){super(),ue(this,e,ln,cn,i,{onMountCallback:5,isDisabled:0,providerError:1,isLoaded:2,isBusy:3,error:4})}},preLoaderComponent:e=>e?.useDynamicForm?ca:dn,promoCodeCheckPath:"",promoCodeServiceOverride:async(e,t,r)=>(async(e,t,r)=>{if(e.environment.previewMode)return;const n=Ot(e).dynamicOffer?.id;if(!n)throw Error("Missing Dynamic Offer id");let o;try{o=document.cookie.match(/blaize_session=[0-9a-z-]+/)[0].substring(15)}catch{o=null}const a=(t?.dynamicOfferResult?.products??[]).flatMap((e=>e.paymentPlans.map((t=>({id:e.id,payment_plan:{provider:"zuora-billing",plan_id:t.planId,charges:t.charges.map((e=>({charge_definition_id:e.chargeDefinitionData.productChargeDefinitionId,currency:e.prices[0]?.currency,price:e.prices[0].price})))}}))))),i=await gn("zephr/public/decisions/v1/promo-codes",{method:"POST",bodyObject:{promo_code:t.promoCode,session:o,selected_products:a}},r,"promo-code");if(!i.ok)return it(e,"zephr_form_error",{error:tt[tt.PROMO_CODE_INVALID_ERROR]}),Promise.resolve(r.updateFormState({promoCodeValid:!1,serverErrors:[tt.PROMO_CODE_INVALID_ERROR],discountedPlanPrices:[]}));const s=await i.json(),c=s?.products?.find((e=>e.id===t.paymentOption.productId&&e.paymentPlans.some((e=>e.planId===t.paymentOption.slug))));if(!c)return it(e,"zephr_form_error",{error:tt[tt.PROMO_CODE_INVALID_ERROR]}),Promise.resolve(r.updateFormState({promoCodeValid:!1,serverErrors:[tt.PROMO_CODE_INVALID_ERROR],discountedPlanPrices:[]}));const l=r.updateFormState({promoCodeValid:!0,serverErrors:[],discountedPlanPrices:[],originalDynamicOfferResult:t.dynamicOfferResult,dynamicOfferResult:{...t.dynamicOfferResult,...s}});await Fn(e,l,r)})(e,t,r),priceCalculator:(e,t,r)=>_o().then((()=>Ko(e,t,r))).then((r=>({slug:t.paymentOption.slug,productId:t.paymentOption.productId,promoCode:t.promoCode,addonPrices:[],totalPrice:r.amount,totalPriceFormattedString:Mn(r.amount,Co(e,t)),netPrice:r.amountWithoutTax,netPriceFormattedString:Mn(r.amountWithoutTax,Co(e,t)),taxPrice:r.taxAmount||null,taxPriceFormattedString:r.taxAmount?Mn(r.taxAmount,Co(e,t)):null,discountPrice:0,discountPriceFormattedPrice:Mn(0,Co(e,t)),chargeItems:[...Object.values(r.invoiceItems)].filter((e=>e.chargeAmount)).map((r=>({label:r.chargeName,priceFormattedString:Mn(r.chargeAmount,Co(e,t))}))),billingAddress:t.billingAddress}))),existingSubscriptionLoader:(e,t,r,n)=>gn("plugins/public/zuora-billing/subscriptions",{method:"GET"},r,null,!0).then((e=>e.json())).then((e=>[...Object.values(e.subscriptions)])).then((r=>r.filter((e=>!n||"active"===e.status?.toLowerCase())).map((r=>{const n=[...Object.values(r.ratePlans)],o=1===n.length?n:n.filter((e=>"Add"===e.lastChangeType));if(1!==o.length&&console.warn(`Subscription ${r.id} has ${o.length} active rate plans`,n),o[0]&&!Ot(e).dynamicOffer?.id&&Co(e,t)&&![...Object.values(o[0].ratePlanCharges??{})].every((r=>r?.currency===Co(e,t))))return console.log(`Subscription ${r.id} is not in the form currency`),null;const a=r.contractedMrr&&r.currency&&r.currentTermPeriodType?`${r.currency} ${r.contractedMrr}`:"";return{externalId:r.id,productId:r.SubscriptionExperienceProductID__c,productLabel:o[0]?.productName,planId:o[0]?.productRatePlanId,planLabel:null,currency:o[0]?.ratePlanCharges[0]?.currency,status:oa[r.status?.toLowerCase()]??"inactive",amount:a}})).filter((e=>e&&null!=e.planId&&null!=e.productId)))),changeSubscriptionProrateCalculator:(e,t,r)=>{const n=t.validChangeFromPlans.find((e=>t.paymentOption.slug===e.planSlug&&t.paymentOption.productId===e.productId))?.changesFromSubscription;if(n)return gn("plugins/public/zuora-billing/subscription-change-preview",{method:"POST",bodyObject:{subscriptionId:n.externalId,newProductRatePlanId:t.paymentOption.slug,currency:Co(e,t),...t.dynamicOfferResult?{dynamicOfferResult:JSON.stringify(t.dynamicOfferResult),productId:t.paymentOption.productId}:{}}},r).then((e=>e.json())).then((r=>({totalPrice:r.amount,totalPriceFormattedString:Mn(r.amount,Co(e,t)),subTotalPrice:r.amountWithoutTax,subTotalPriceFormattedString:Mn(r.amountWithoutTax,Co(e,t))})));console.error("No valid change from subscription")},hasProductAddons:!1,hasPromoCodes:e=>Ot(e).dynamicOffer&&!Ot(e).changeSubscriptionMode,internalSubmit:e=>!Ot(e).changeSubscriptionMode,noPaymentForm:e=>Ot(e).changeSubscriptionMode,canAttemptIncompletePaymentFormSubmission:!1}},ua={[mn]:{loader:async(e,t,r)=>{await On(e,t,r),await In(e,t,r)},completer:(e,t,r)=>{const{url:n,body:o,method:a}=Pn(e,t,mn,{payment_nonce:t.mobilePaymentMethodId,vault_payment_method:!0});return gn(n,{method:a,bodyObject:o},r).then((e=>{if(!e?.ok)throw e}))},component:class extends pe{constructor(e){super(),ue(this,e,Wr,Yr,i,{onMountCallback:1,isDisabled:0,disableCoreDependencyHeader:2})}},previewMode:e=>e.environment.previewMode},[fn]:{loader:async(e,t,r)=>{const n=JSON.parse(e.organisationConfiguration?.stripeMobilePaymentConfig??"{}"),o=document.getElementById("stripe-mobile-pay-button");return n?.google||n?.apple?Ao.then((async()=>await yo(r))).then((a=>{t=r.getFormState();const i=kn(t.paymentOption.currencyCode.toUpperCase())?1:100,s={country:n.google?.countryCode??n.apple?.countryCode,currency:t.paymentOption.currencyCode.toLowerCase(),total:{label:t.paymentOption.label,amount:parseFloat((t.paymentOptionPrices.totalPrice*i).toFixed(2))},requestPayerName:!0},c=a.paymentRequest(s),l=a.elements().create("paymentRequestButton",{paymentRequest:c});c.canMakePayment().then((n=>{if(!n||!n.googlePay&&!n.applePay)return console.warn("Cannot make mobile payments on this browser",n),void(o.style.display="none");l.mount("#stripe-mobile-pay-button"),c.on("paymentmethod",(o=>{So(t,r,a,o,n,e)}))}))})).catch((t=>{console.error(t),r.updateFormState({serverErrors:[tt.UNKNOWN]}),it(e,"zephr_form_error",{error:tt[tt.UNKNOWN]})})):(o.style.display="none",void console.error("Stripe Mobile payments are not configured in the console"))},completer:go,component:class extends pe{constructor(e){super(),ue(this,e,rn,tn,i,{onMountCallback:2,isDisabled:0,disableCoreDependencyHeader:1})}},previewMode:e=>e.environment.previewMode}},pa=e=>{const t=la[e];if(!t)throw`Payment provider ${e} not configured.`;return t},da=e=>{const t=ua[e];if(!t)throw`Mobile payment provider ${e} not configured.`;return t};function ma(e){let t,r;return t=new qt({props:{error:e[0]?.message??e[1]??"",isPaymentForm:!0}}),{c(){ie(t.$$.fragment)},m(e,n){se(t,e,n),r=!0},p(e,[r]){const n={};3&r&&(n.error=e[0]?.message??e[1]??""),t.$set(n)},i(e){r||(te(t.$$.fragment,e),r=!0)},o(e){re(t.$$.fragment,e),r=!1},d(e){ce(t,e)}}}function fa(e,t,r){let{providerError:n}=t,{error:o=null}=t;return e.$$set=e=>{"providerError"in e&&r(0,n=e.providerError),"error"in e&&r(1,o=e.error)},[n,o]}class ha extends pe{constructor(e){super(),ue(this,e,fa,ma,i,{providerError:0,error:1})}}const ya={matches:e=>e.type===Ee||e.type===Ke,create:(e,t,r)=>{const n=pa(e.organisationConfiguration.paymentProvider);return n.noPaymentForm(e)?{component:ha,props:{providerError:t.paymentProviderError},isValid:!0}:{component:n.component,props:{isLoaded:t.paymentProviderFormLoaded,isBusy:t.paymentProviderFormBusy,providerError:t.paymentProviderError,isComplete:t.paymentFormComplete,isDisabled:n.internalSubmit(e)?!t.canAttemptSectionCompletion:t.isBusy||null!=t.mobilePaymentService,onMountCallback:()=>{r.updateFormState({paymentProviderFormLoaded:!1}),n.loader(e,t,r)}},isValid:n.internalSubmit(e)?void 0:t.paymentFormComplete&&!t.paymentProviderError}}},ga=e=>e.parts.flatMap((e=>e.sections)).flatMap((e=>e.elements)).some((e=>e.type===Ee&&!1!==e.config?.enabled)),ba={matches:e=>e.type===Le,create:(e,t,r)=>{const n=da(e.organisationConfiguration.paymentProvider);return e.environment.previewMode?null:{component:n.component,props:{isDisabled:t.isBusy||null!=t.mobilePaymentService,onMountCallback:()=>n.loader(e,t,r),disableCoreDependencyHeader:ga(e)}}}};function Pa(t){let r,n,o,a,i,s;return{c(){r=P("div"),n=P("img"),a=E(),i=P("div"),s=S(t[0]),_(n,"class","check-image svelte-12ljnq4"),c(n.src,o="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGEAAABiCAYAAABAkr0NAAAJa0lEQVR4Xu2dT28TRxTA39oGUsHBiC/giKT/LiRHpBYIUPWQEmfVD9BwrQoJpZW4JbkhtRUO9E74AO3GQTkVCLSVOGIurVRCky/QkgNIodjezoxjsrZ3Zt7Mzu7OOraEkOLZ9Zv3m3lv/rx540BWPtc2S1Cvl6DplJjITb/1f/CTc7bAgW1w/G0oFLbg+vBWFqrnWCfkwmYRXtbH4HVuDPJwwp24MBNFRu9BtUbAERjOIzjUrMH3ow+jvC+OZ+2AQFv5q+Y0gF92z0+diaOiwXd691YJCKcKh3MrNvSW9CDQFv9Pk7TyZBTPA8t6iuMswVD+YVpAkofwzbMzUPdn3InpL+Ju8arv99bvLsNQbjFpGMlBoMp/7cwnYW5Uld9dnpmrQ/5iUv4jfgjfbo7BTuOGKeUzBeWpow35NPwi+WsRcn7RPVseiwwjoZ4RHwRq87fr8+5EeU5HGS1lw1PIE1t9AGpaJoI2gCaUoEFGWw3ntG5D8NarFRgqLGnJgKh8PBCI6XE/Lq8jfr+jiLe+ugQFfwWOFGqwMLyt+jyqfASfROS7CJWRZdTvKBQyC0Gj9Sdtfzt0c3VzGhpvplUGCaxXFAuLJhuJOQhkrO+enNzENgBSmUVSmYrJymB/u6fctT9LsJNfUILxeG3YlHkyA+HqxrR7asrDKMEq5XcLrAjD+3XVhR9GVjD1FpWJDuHy83n33IUFmSDM7Bx+cxGufxA+spG9IMnvFWB49+8uwM3ji1HEiwYBC8BQi4lSUa1nv96YcU9P3ZY9GxWEPgQEANb6j+VdK+y+TJO875G9IgoIPQgoAHevwK3jFd26W/fc3DPiuMvzIrl0QahDwAD4rTqR1JQ/UViI+Y8OCDUIlzdn3XOTwtbtPf6JDN0y4Hx16RHz5J78XDgU9+79TKzA+2grgIdAlgDcjyafCLtjvwNoVx4D4ve1cfhuuIZhjYOAmIj1fQ8ImVNIewRyQoeDcGljXbT4te8AIHsEGx3eGpmQ9QY5BIkj9hS6nUyYTH4vMdMY/yCGIDFD3r0+G4bqtgLJpM6TmCUxhNlnT3ibI2wNqDIqXa7QrVfmnpt7XiGRIbNhcsvMEh+CjG75D7kpy5wmIwhMl/Ff1Nf5jZa/F8FVpFv90OeJtG8dsYyRzD88WTsatoQTDkHgjAdmSEJCsLzB010vBJkzHpghMQViltzxyRdcKxLSG3ohCHxBXHussl6eue/Jtql7ajJ0kyusN/RAEPqCQS/AtwfBBNfr0mMnhEEvwCtZVlKw4ur9QrZFf9zbFu2EoEBPJsPge6IBjj675w17EAQOeeALNJvUpedz7vkLN0IncAEHvQdB9MB+8AU0PH+IHDAxGXQmGCkFHfQehNm/yRLFZz3xmyxSuXL8omZbsP+xrgmWzs6YsJKc5YygSWpBEJmift2qpPXmzHCNml+Rg941SS0IolFRv5oiwRKDd9+rws33yMkhMx/esL8NuwVh7q/lsBDAvjVFsjUewxBk+m1B4PqDeKKQzbQvzbdg9spNb1RJLI0DIg/ebxv3GADrayT8fXhZE3H4Y4LAAI/4BQdEjqOf/EFaAHaxcP0CGfg4wJkfyHaDjLaUuF+WMgBWvcsbK+65qXJ3VekWsQO8cSw9NVMZ0TrqFLdOld5vAwA2+Anf/qSnkxwRoczHktoCgELgWRwyEiPmKDymyMv6JM0mABTCV2SP4ZPePQbvwUrNETmMzAb12gaAQviShJF+Gh5GyocQ1/A0EFTMUhq8U3BNnf1ivsJGAFQuwTA1WQicSYssOArtiG0FYBUEzjCNyhgZhM0AsgIhEgjbAVgFAXPSBRlO/tZEZQGAVRDYpAVx9gsLIisAtCGYXkkMelcTILIEgNZdYAUc7jJ2V1gGeoSCLRgFRNYACCDQNbp0ly10QGQRgHTZIu0FPBUQWQUgXcATLCyZ3GcVWikMCJKaQZbExItjQwZrXmXluIFgdCnblk0dBAhRPa0GQAQXb+rYtL2pCcJ2AMKQIra9KaIUU7qxqKYp+Lz1AKiwvDUzsowNS++O2xnyguwRmQDAnLI4pMje4C8JiMwAQFiaFgSRX0hzh40DIksAhAOf3T2bQFQ2Z5sz7Q3/LhCZAiAyRbv+gBbZgyA6dcg5+ikbGhv7np4R3iGZf02HrhsTkP8i7tA0kA1hD4LIJA3SJ+jhEoU/BraPUcel+ioQTE+dWk/xe0Fn9pdOCJywDCpB5kNgtNQY4SGFQ5joI7SD3qAGROUocu9hcpGDzmp+UzX9RS+t0As6R0ftn9ZICxBd6v56g2pylvAEIxpJMvpLjRFqo5GcJRyCrDfEuf8cof6pP6qZnEUr6RQLXzxamDB65jd1DUYXQGiGBCvS4uxdojQL9DKHyuiV6KL3yRtEZog22qXRcV5NxRAkSVi9+6szcHPkTp+oUb8akszJskxpYghULEG6BTaJ2+/+QXYcF5GwUQ6BgZAlpzV3tYl+c0zhSZkjNpacltYNkxsaG7qYgq5i+UmDqatxPYHWAhPzs19AYAAomGk8BIR/YD6i30FgACgu/atBoFpGbML37YorJrQf4Yi7zaM6BCwIA7cuxWLLdV+KucBDAwAVRw8CFkRCF4jq6hX1HLs3uuHJ7u2MkrRXHwISBPMTaQSRoTQsKYS8xC8KgGg9oS0/wke0QKRz4bQWC3ZdfeO2rPW36hU9e360ntCuoSAjbrcSrIZBTc+/TXJ5k/wGRQbA0CaXGQhUIsSELgjEKhiKym8Nxc3domUOApWMXQXcJJfChV/mEGYaGIy8XzVxkaiy6dG4sp7dGV3ML5hcxjcLoa0F5J2Voaaq0LwTW04N2kheklvK6w65g3kq9NYPEci45j/xQNg1T7BzcE6lV3SYK3Y9vP8I8k4Ncvkt7J1lHUqkDvZNg1wND2fIvxMYRxveW823/uDvxAeh/SvIC0QxpoTt6DUdem38NoETfn18wy/pKrunZ9KGMJS/otUAMBXaLRM/hLYwGvZXoR5GiyZ9ZX1yEGLoGUY1T0c8dJAQp0/iCJw8hCCM/w4QW+3P8m5kMq3kUHtPTQ44VTiWWzY54lGRPT0IQSmp33h1kKRF9sum7LlwlNNW/OHcitGEVyqaD5S1A0K38Mx/5EgGe/805IijPVvuyWavUl9mZhrwFA41a3CkUEurxfNkthNCmLR0uFmvl8AvFMFvFKHpl3qK5Zwt9recvwWFwpYNrRzTWP4HK7laSxb9gaIAAAAASUVORK5CYII=")||_(n,"src","data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGEAAABiCAYAAABAkr0NAAAJa0lEQVR4Xu2dT28TRxTA39oGUsHBiC/giKT/LiRHpBYIUPWQEmfVD9BwrQoJpZW4JbkhtRUO9E74AO3GQTkVCLSVOGIurVRCky/QkgNIodjezoxjsrZ3Zt7Mzu7OOraEkOLZ9Zv3m3lv/rx540BWPtc2S1Cvl6DplJjITb/1f/CTc7bAgW1w/G0oFLbg+vBWFqrnWCfkwmYRXtbH4HVuDPJwwp24MBNFRu9BtUbAERjOIzjUrMH3ow+jvC+OZ+2AQFv5q+Y0gF92z0+diaOiwXd691YJCKcKh3MrNvSW9CDQFv9Pk7TyZBTPA8t6iuMswVD+YVpAkofwzbMzUPdn3InpL+Ju8arv99bvLsNQbjFpGMlBoMp/7cwnYW5Uld9dnpmrQ/5iUv4jfgjfbo7BTuOGKeUzBeWpow35NPwi+WsRcn7RPVseiwwjoZ4RHwRq87fr8+5EeU5HGS1lw1PIE1t9AGpaJoI2gCaUoEFGWw3ntG5D8NarFRgqLGnJgKh8PBCI6XE/Lq8jfr+jiLe+ugQFfwWOFGqwMLyt+jyqfASfROS7CJWRZdTvKBQyC0Gj9Sdtfzt0c3VzGhpvplUGCaxXFAuLJhuJOQhkrO+enNzENgBSmUVSmYrJymB/u6fctT9LsJNfUILxeG3YlHkyA+HqxrR7asrDKMEq5XcLrAjD+3XVhR9GVjD1FpWJDuHy83n33IUFmSDM7Bx+cxGufxA+spG9IMnvFWB49+8uwM3ji1HEiwYBC8BQi4lSUa1nv96YcU9P3ZY9GxWEPgQEANb6j+VdK+y+TJO875G9IgoIPQgoAHevwK3jFd26W/fc3DPiuMvzIrl0QahDwAD4rTqR1JQ/UViI+Y8OCDUIlzdn3XOTwtbtPf6JDN0y4Hx16RHz5J78XDgU9+79TKzA+2grgIdAlgDcjyafCLtjvwNoVx4D4ve1cfhuuIZhjYOAmIj1fQ8ImVNIewRyQoeDcGljXbT4te8AIHsEGx3eGpmQ9QY5BIkj9hS6nUyYTH4vMdMY/yCGIDFD3r0+G4bqtgLJpM6TmCUxhNlnT3ibI2wNqDIqXa7QrVfmnpt7XiGRIbNhcsvMEh+CjG75D7kpy5wmIwhMl/Ff1Nf5jZa/F8FVpFv90OeJtG8dsYyRzD88WTsatoQTDkHgjAdmSEJCsLzB010vBJkzHpghMQViltzxyRdcKxLSG3ohCHxBXHussl6eue/Jtql7ajJ0kyusN/RAEPqCQS/AtwfBBNfr0mMnhEEvwCtZVlKw4ur9QrZFf9zbFu2EoEBPJsPge6IBjj675w17EAQOeeALNJvUpedz7vkLN0IncAEHvQdB9MB+8AU0PH+IHDAxGXQmGCkFHfQehNm/yRLFZz3xmyxSuXL8omZbsP+xrgmWzs6YsJKc5YygSWpBEJmift2qpPXmzHCNml+Rg941SS0IolFRv5oiwRKDd9+rws33yMkhMx/esL8NuwVh7q/lsBDAvjVFsjUewxBk+m1B4PqDeKKQzbQvzbdg9spNb1RJLI0DIg/ebxv3GADrayT8fXhZE3H4Y4LAAI/4BQdEjqOf/EFaAHaxcP0CGfg4wJkfyHaDjLaUuF+WMgBWvcsbK+65qXJ3VekWsQO8cSw9NVMZ0TrqFLdOld5vAwA2+Anf/qSnkxwRoczHktoCgELgWRwyEiPmKDymyMv6JM0mABTCV2SP4ZPePQbvwUrNETmMzAb12gaAQviShJF+Gh5GyocQ1/A0EFTMUhq8U3BNnf1ivsJGAFQuwTA1WQicSYssOArtiG0FYBUEzjCNyhgZhM0AsgIhEgjbAVgFAXPSBRlO/tZEZQGAVRDYpAVx9gsLIisAtCGYXkkMelcTILIEgNZdYAUc7jJ2V1gGeoSCLRgFRNYACCDQNbp0ly10QGQRgHTZIu0FPBUQWQUgXcATLCyZ3GcVWikMCJKaQZbExItjQwZrXmXluIFgdCnblk0dBAhRPa0GQAQXb+rYtL2pCcJ2AMKQIra9KaIUU7qxqKYp+Lz1AKiwvDUzsowNS++O2xnyguwRmQDAnLI4pMje4C8JiMwAQFiaFgSRX0hzh40DIksAhAOf3T2bQFQ2Z5sz7Q3/LhCZAiAyRbv+gBbZgyA6dcg5+ikbGhv7np4R3iGZf02HrhsTkP8i7tA0kA1hD4LIJA3SJ+jhEoU/BraPUcel+ioQTE+dWk/xe0Fn9pdOCJywDCpB5kNgtNQY4SGFQ5joI7SD3qAGROUocu9hcpGDzmp+UzX9RS+t0As6R0ftn9ZICxBd6v56g2pylvAEIxpJMvpLjRFqo5GcJRyCrDfEuf8cof6pP6qZnEUr6RQLXzxamDB65jd1DUYXQGiGBCvS4uxdojQL9DKHyuiV6KL3yRtEZog22qXRcV5NxRAkSVi9+6szcHPkTp+oUb8akszJskxpYghULEG6BTaJ2+/+QXYcF5GwUQ6BgZAlpzV3tYl+c0zhSZkjNpacltYNkxsaG7qYgq5i+UmDqatxPYHWAhPzs19AYAAomGk8BIR/YD6i30FgACgu/atBoFpGbML37YorJrQf4Yi7zaM6BCwIA7cuxWLLdV+KucBDAwAVRw8CFkRCF4jq6hX1HLs3uuHJ7u2MkrRXHwISBPMTaQSRoTQsKYS8xC8KgGg9oS0/wke0QKRz4bQWC3ZdfeO2rPW36hU9e360ntCuoSAjbrcSrIZBTc+/TXJ5k/wGRQbA0CaXGQhUIsSELgjEKhiKym8Nxc3domUOApWMXQXcJJfChV/mEGYaGIy8XzVxkaiy6dG4sp7dGV3ML5hcxjcLoa0F5J2Voaaq0LwTW04N2kheklvK6w65g3kq9NYPEci45j/xQNg1T7BzcE6lV3SYK3Y9vP8I8k4Ncvkt7J1lHUqkDvZNg1wND2fIvxMYRxveW823/uDvxAeh/SvIC0QxpoTt6DUdem38NoETfn18wy/pKrunZ9KGMJS/otUAMBXaLRM/hLYwGvZXoR5GiyZ9ZX1yEGLoGUY1T0c8dJAQp0/iCJw8hCCM/w4QW+3P8m5kMq3kUHtPTQ44VTiWWzY54lGRPT0IQSmp33h1kKRF9sum7LlwlNNW/OHcitGEVyqaD5S1A0K38Mx/5EgGe/805IijPVvuyWavUl9mZhrwFA41a3CkUEurxfNkthNCmLR0uFmvl8AvFMFvFKHpl3qK5Zwt9recvwWFwpYNrRzTWP4HK7laSxb9gaIAAAAASUVORK5CYII="),_(n,"alt","Success indicator"),_(i,"class","zephr-form-success-message svelte-12ljnq4"),N(i,"zephr-payment-form-success-message",t[1])},m(e,t){y(e,r,t),h(r,n),h(r,a),h(r,i),h(i,s)},p(e,[t]){1&t&&I(s,e[0]),2&t&&N(i,"zephr-payment-form-success-message",e[1])},i:e,o:e,d(e){e&&g(r)}}}function Aa(e,t,r){let{text:n}=t,{isPaymentForm:o=!1}=t;return e.$$set=e=>{"text"in e&&r(0,n=e.text),"isPaymentForm"in e&&r(1,o=e.isPaymentForm)},[n,o]}class Sa extends pe{constructor(e){super(),ue(this,e,Aa,Pa,i,{text:0,isPaymentForm:1})}}const Ea={matches:e=>e.type===Te,create:(e,t,r,n)=>({component:Sa,props:{text:n?.text,isPaymentForm:e.formType===vt.PAYMENT}})},Ca=(e,t)=>({identifiers:{email_address:t},delivery:{method:"email",destination:t,action:e,redirect:window.location.href.replace(window.location.origin,"")}}),va=async(e,t,r,n)=>{try{(await gn("blaize/token-exchange",{method:"POST",bodyObject:Ca(t,r)},n)).ok||(n.updateFormState({serverErrors:[tt.UNKNOWN]}),it(e,"zephr_form_error",{error:tt[tt.UNKNOWN]}))}catch(t){n.updateFormState({serverErrors:[tt.UNKNOWN]}),it(e,"zephr_form_error",{error:tt[tt.UNKNOWN]})}},Ta=e=>e.formType===vt.REGISTRATION&&!1===Ot(e).usePassword&&!0===e.organisationConfiguration.requireEmailVerfication&&!1===Ot(e).useVerificationCodes,_a=async(e,t,r)=>Ia(t,r).then((async n=>{if(!n.redirected){const o=200===n.status,a=e.parts.flatMap((e=>e.sections)).some((e=>e.type===ot.VERIFICATION_CODE_REGISTRATION.type)),i=!!o&&((await n.json()).contact&&a),s=o&&!i;r.updateFormState({userExists:s,emailIsContact:i});return Ta(e)?s?(va(e,"login",t.emailAddress,r),st(ot.PASSWORDLESS_VIA_LOGIN_LINK.type,e,r)):mt(e,t,r):i||Ot(e).useVerificationCodes||e.organisationConfiguration.twoFactorEmailAuthenticationEnabled?(wa(e,t,r),st(s?ot.VERIFICATION_CODE_LOGIN.type:ot.VERIFICATION_CODE_REGISTRATION.type,e,r)):st(s?ot.LOGIN_PASSWORD.type:ot.PASSWORD_SETUP.type,e,r)}window.location.replace(n.url)})),Oa=e=>({identifiers:{email_address:e.emailAddress},delivery:{method:"email",destination:e.emailAddress,action:e.userExists?"login":"register",redirect:window.location.href.replace(window.location.origin,"")}}),wa=async(e,t,r)=>{r.updateFormState({verificationCode:"",verificationCodeValid:void 0});const n=await gn("blaize/two-factor-authentication",{method:"POST",bodyObject:Oa(t)},r);return n.ok||(r.updateFormState({serverErrors:[tt.VERIFICATION_CODE_SEND_ERROR]}),it(e,"zephr_form_error",{error:tt[tt.MOBILE_PAYMENT_PROCESSING_ERROR]})),n.ok},Ia=async(e,t)=>(t.updateFormState({password:"",verificationCode:void 0,verificationCodeValid:void 0,forgotPassword:!1}),await gn("zephr/media/user/info",{method:"POST",bodyObject:{identifiers:{email_address:e.emailAddress}}},t)),Ra=async e=>await new Promise((t=>setTimeout(t,e.environment.reduceDelays?1:1500))),$a=async(e,t,r)=>{r.incrementRequestCount(),r.updateFormState({verificationCodeValid:void 0});const n=await gn(`zephr/users/reset/${t.verificationCode}`,{method:"POST",bodyObject:{identifiers:{email_address:t.emailAddress}}},r);return it(e,"zephr_form_password_reset_code_validate",{success:n?.ok}),n.ok?Ra(e).then((()=>{r.decrementRequestCount(),r.jumpToSection(ot.PASSWORD_RESET.type)})):(r.updateFormState({serverErrors:[tt.VERIFICATION_CODE_INCORRECT]}),it(e,"zephr_form_error",{error:tt[tt.VERIFICATION_CODE_INCORRECT]}),r.decrementRequestCount(),Promise.resolve())},Ma=async(e,t,r)=>{r.updateFormState({createPassword:"",confirmCreatePassword:"",forgotPassword:!0,verificationCode:""}),r.incrementRequestCount();const n=await gn("zephr/users/reset",{method:"POST",bodyObject:{identifiers:{email_address:t.emailAddress}}},r);return it(e,"zephr_form_password_reset_code_sent",{success:n?.ok}),n.ok?Ra(e).then((()=>{r.decrementRequestCount(),r.jumpToSection(ot.FORGOT_PASSWORD.type)})):(r.updateFormState({serverErrors:[tt.PASSWORD_RESET_LINK_SEND_ERROR]}),r.decrementRequestCount(),it(e,"zephr_form_error",{error:tt[tt.PASSWORD_RESET_LINK_SEND_ERROR]}),Promise.resolve())},Na=async(e,t,r)=>{const n=await gn(`zephr/users/reset/${t.verificationCode}`,{method:"POST",bodyObject:{identifiers:{email_address:t.emailAddress},validators:{password:t.createPassword}}},r);return it(e,"zephr_form_password_reset",{success:n?.ok}),n.ok?(r.updateFormState({verificationCode:"",forgotPassword:!1}),r.jumpToPartStart(Xe.ACCOUNT_VERIFICATION.type)):(r.updateFormState({serverErrors:[tt.PASSWORD_RESET_ERROR]}),it(e,"zephr_form_error",{error:tt[tt.MOBILE_PAYMENT_PROCESSING_ERROR]}),Promise.resolve())};function xa(e){let t;function r(e,t){return e[14]&&!e[5]?Fa:La}let n=r(e),o=n(e);return{c(){o.c(),t=C()},m(e,r){o.m(e,r),y(e,t,r)},p(e,a){n===(n=r(e))&&o?o.p(e,a):(o.d(1),o=n(e),o&&(o.c(),o.m(t.parentNode,t)))},d(e){e&&g(t),o.d(e)}}}function La(e){let t,r,n,o;return{c(){t=P("button"),r=S(e[3]),_(t,"class","zephr-form-verification-resend-link svelte-b6r3ph"),N(t,"zephr-payment-form-verification-resend-link",e[9])},m(a,i){y(a,t,i),h(t,r),n||(o=v(t,"click",e[15]),n=!0)},p(e,n){8&n&&I(r,e[3]),512&n&&N(t,"zephr-payment-form-verification-resend-link",e[9])},d(e){e&&g(t),n=!1,o()}}}function Fa(e){let t,r;return{c(){t=P("div"),r=S(e[2]),_(t,"class","zephr-form-verification-resend-text svelte-b6r3ph"),N(t,"zephr-payment-form-verification-resend-text",e[9])},m(e,n){y(e,t,n),h(t,r)},p(e,n){4&n&&I(r,e[2]),512&n&&N(t,"zephr-payment-form-verification-resend-text",e[9])},d(e){e&&g(t)}}}function za(e){let t,r=e[3]&&xa(e);return{c(){r&&r.c(),t=C()},m(e,n){r&&r.m(e,n),y(e,t,n)},p(e,n){e[3]?r?r.p(e,n):(r=xa(e),r.c(),r.m(t.parentNode,t)):r&&(r.d(1),r=null)},d(e){e&&g(t),r&&r.d(e)}}}function ka(e){let t,r;return t=new lr({props:{icon:dr}}),{c(){ie(t.$$.fragment)},m(e,n){se(t,e,n),r=!0},i(e){r||(te(t.$$.fragment,e),r=!0)},o(e){re(t.$$.fragment,e),r=!1},d(e){ce(t,e)}}}function Da(e){let t,r;return t=new lr({props:{icon:pr,spin:!0}}),{c(){ie(t.$$.fragment)},m(e,n){se(t,e,n),r=!0},i(e){r||(te(t.$$.fragment,e),r=!0)},o(e){re(t.$$.fragment,e),r=!1},d(e){ce(t,e)}}}function Ba(e){let t,r,n,o,a,i,s,c;t=new er({props:{forInput:"zephr-form-verification-code",label:e[0],isPaymentForm:e[9]}}),o=new Jt({props:{id:"zephr-form-verification-code",value:e[8],placeholder:e[1],maxlength:6,hasError:null!=e[5],errorMessage:e[5],isPaymentForm:e[9],onFocus:e[12],onBlur:e[13],$$slots:{default:[za]},$$scope:{ctx:e}}}),o.$on("change",e[16]);let l=e[6]&&ka(),u=e[8]&&!e[6]&&e[7]&&Da();return{c(){ie(t.$$.fragment),r=E(),n=P("div"),ie(o.$$.fragment),a=E(),i=P("div"),l&&l.c(),s=E(),u&&u.c(),_(i,"class","zephr-form-input-inner-text"),N(i,"zephr-payment-form-input-inner-text",e[9]),_(n,"class","zephr-form-relative-container zephr-form-verification-resend-link-container svelte-b6r3ph"),N(n,"zephr-payment-form-relative-container",e[9]),N(n,"zephr-payment-form-verification-resend-link-container",e[9])},m(e,p){se(t,e,p),y(e,r,p),y(e,n,p),se(o,n,null),h(n,a),h(n,i),l&&l.m(i,null),h(i,s),u&&u.m(i,null),c=!0},p(e,[r]){const a={};1&r&&(a.label=e[0]),512&r&&(a.isPaymentForm=e[9]),t.$set(a);const p={};256&r&&(p.value=e[8]),2&r&&(p.placeholder=e[1]),32&r&&(p.hasError=null!=e[5]),32&r&&(p.errorMessage=e[5]),512&r&&(p.isPaymentForm=e[9]),4096&r&&(p.onFocus=e[12]),8192&r&&(p.onBlur=e[13]),150060&r&&(p.$$scope={dirty:r,ctx:e}),o.$set(p),e[6]?l?64&r&&te(l,1):(l=ka(),l.c(),te(l,1),l.m(i,s)):l&&(X(),re(l,1,1,(()=>{l=null})),ee()),e[8]&&!e[6]&&e[7]?u?448&r&&te(u,1):(u=Da(),u.c(),te(u,1),u.m(i,null)):u&&(X(),re(u,1,1,(()=>{u=null})),ee()),(!c||512&r)&&N(i,"zephr-payment-form-input-inner-text",e[9]),(!c||512&r)&&N(n,"zephr-payment-form-relative-container",e[9]),(!c||512&r)&&N(n,"zephr-payment-form-verification-resend-link-container",e[9])},i(e){c||(te(t.$$.fragment,e),te(o.$$.fragment,e),te(l),te(u),c=!0)},o(e){re(t.$$.fragment,e),re(o.$$.fragment,e),re(l),re(u),c=!1},d(e){e&&(g(r),g(n)),ce(t,e),ce(o),l&&l.d(),u&&u.d()}}}function Ua(e,t,r){let{label:n}=t,{placeholder:o}=t,{resendMessage:a=null}=t,{resendText:i=null}=t,{disabled:s}=t,{error:c=null}=t,{codeValid:l}=t,{formBusy:u}=t,{code:p}=t,{isPaymentForm:d=!1}=t,{onChange:m}=t,{onResendVerificationCode:f}=t,{onFocus:h}=t,{onBlur:y}=t,g=!1;return e.$$set=e=>{"label"in e&&r(0,n=e.label),"placeholder"in e&&r(1,o=e.placeholder),"resendMessage"in e&&r(2,a=e.resendMessage),"resendText"in e&&r(3,i=e.resendText),"disabled"in e&&r(4,s=e.disabled),"error"in e&&r(5,c=e.error),"codeValid"in e&&r(6,l=e.codeValid),"formBusy"in e&&r(7,u=e.formBusy),"code"in e&&r(8,p=e.code),"isPaymentForm"in e&&r(9,d=e.isPaymentForm),"onChange"in e&&r(10,m=e.onChange),"onResendVerificationCode"in e&&r(11,f=e.onResendVerificationCode),"onFocus"in e&&r(12,h=e.onFocus),"onBlur"in e&&r(13,y=e.onBlur)},[n,o,a,i,s,c,l,u,p,d,m,f,h,y,g,()=>{a&&(r(14,g=!0),setTimeout((()=>r(14,g=!1)),2e3)),f()},({detail:e})=>!s&&m(e)]}class Va extends pe{constructor(e){super(),ue(this,e,Ua,Ba,i,{label:0,placeholder:1,resendMessage:2,resendText:3,disabled:4,error:5,codeValid:6,formBusy:7,code:8,isPaymentForm:9,onChange:10,onResendVerificationCode:11,onFocus:12,onBlur:13})}}const Ga=e=>6===e?.length,ja={matches:e=>e.type===Ae,create:(e,t,r,n)=>({component:Va,props:{code:t.verificationCode,label:n.label,placeholder:n.placeholder,resendMessage:n.message,resendText:n.resendText,disabled:t.isBusy||t.verificationCodeValid,codeValid:t.verificationCodeValid,formBusy:t.isBusy,isPaymentForm:e.formType===vt.PAYMENT,onResendVerificationCode:()=>{(t.currentSection.type===ot.FORGOT_PASSWORD.type?Ma:wa)(e,t,r)},onChange:o=>{const a=r.updateFormState({verificationCodeValid:void 0,verificationCode:o,serverErrors:[]}),i=(e=>!e.elementValidity.filter((t=>t.partType===e.currentPart.type&&t.sectionType===e.currentSection.type&&t.sectionOrder===e.currentSection.order&&"user_attribute"===t.elementType)).some((e=>!e.isValid)))(t);if(r.updateFormState({showFieldErrors:!i}),Ga(o)){if(n.verificationEvent)return void r.onEvent(n.verificationEvent);t.currentSection.type===ot.FORGOT_PASSWORD.type?r.completeSection():i&&(async(e,t,r)=>{if(!(await gn("zephr/media/user/otp-check",{method:"POST",bodyObject:{code:t.verificationCode,email:t.emailAddress}},r)).ok)return r.updateFormState({verificationCodeValid:!1,serverErrors:[tt.VERIFICATION_CODE_INCORRECT]}),void it(e,"zephr_form_error",{error:tt[tt.VERIFICATION_CODE_INCORRECT]});r.updateFormState({verificationCodeValid:!1,serverErrors:[]}),r.completeSection()})(e,a,r)}it(e,"zephr_form_input_change",{inputName:"zephr-form-verification-code",sectionId:t.currentSection.type,field:"verification-code"})},onFocus:()=>it(e,"zephr_form_input_focus",{inputName:"zephr-form-verification-code",sectionId:t.currentSection.type,field:"verification-code"}),onBlur:()=>it(e,"zephr_form_input_blur",{inputName:"zephr-form-verification-code",sectionId:t.currentSection.type,field:"verification-code"})},isValid:Ga(t.verificationCode)})};function qa(t){let r;return{c(){r=P("div"),_(r,"class","zephr-form-custom-text svelte-12fdogm"),$(r,"text-align",t[1]?"center":"initial"),N(r,"zephr-payment-form-custom-text",t[2])},m(e,n){y(e,r,n),r.innerHTML=t[0]},p(e,[t]){1&t&&(r.innerHTML=e[0]),2&t&&$(r,"text-align",e[1]?"center":"initial"),4&t&&N(r,"zephr-payment-form-custom-text",e[2])},i:e,o:e,d(e){e&&g(r)}}}function Ha(e,t,r){let{text:n}=t,{centerText:o=!1}=t,{isPaymentForm:a=!1}=t;return e.$$set=e=>{"text"in e&&r(0,n=e.text),"centerText"in e&&r(1,o=e.centerText),"isPaymentForm"in e&&r(2,a=e.isPaymentForm)},[n,o,a]}class Ka extends pe{constructor(e){super(),ue(this,e,Ha,qa,i,{text:0,centerText:1,isPaymentForm:2})}}const Ya={matches:e=>e.type===_e,create:(e,t,r,n)=>({component:Ka,props:{text:n.text,centerText:n.centerText,isPaymentForm:e.formType===vt.PAYMENT}})};function Wa(r){let n,o,a,i,s,c,l,u,p=[{id:r[0]},{name:r[1]},{required:r[2]},{disabled:r[3]},r[8],{type:"checkbox"},{class:"zephr-form-checkbox"}],d={};for(let e=0;e{"id"in e&&r(0,o=e.id),"name"in e&&r(1,a=e.name),"required"in e&&r(2,i=e.required),"disabled"in e&&r(3,s=e.disabled),"hasError"in e&&r(4,c=e.hasError),"isPaymentForm"in e&&r(5,l=e.isPaymentForm),"label"in e&&r(6,u=e.label),"value"in e&&r(10,p=e.value),"placeholder"in e&&r(11,d=e.placeholder),"checked"in e&&r(7,m=e.checked),"pattern"in e&&r(12,f=e.pattern)},[o,a,i,s,c,l,u,m,h,e=>{n("change",e.target.checked)},p,d,f]}class Qa extends pe{constructor(e){super(),ue(this,e,Ja,Wa,i,{id:0,name:1,required:2,disabled:3,hasError:4,isPaymentForm:5,label:6,value:10,placeholder:11,checked:7,pattern:12})}}function Za(r){let n,o,a,i,s,c,l,u,p=[{id:r[0]},{name:r[1]},{required:r[2]},{disabled:r[3]},r[8],{type:"radio"},{class:"zephr-form-input-radio"}],d={};for(let e=0;e{"id"in e&&r(0,o=e.id),"name"in e&&r(1,a=e.name),"required"in e&&r(2,i=e.required),"disabled"in e&&r(3,s=e.disabled),"hasError"in e&&r(4,c=e.hasError),"isPaymentForm"in e&&r(5,l=e.isPaymentForm),"label"in e&&r(6,u=e.label),"value"in e&&r(10,p=e.value),"placeholder"in e&&r(11,d=e.placeholder),"checked"in e&&r(7,m=e.checked),"pattern"in e&&r(12,f=e.pattern)},[o,a,i,s,c,l,u,m,h,e=>{n("change",e.target.value)},p,d,f]}class ei extends pe{constructor(e){super(),ue(this,e,Xa,Za,i,{id:0,name:1,required:2,disabled:3,hasError:4,isPaymentForm:5,label:6,value:10,placeholder:11,checked:7,pattern:12})}}function ti(e,t,r){const n=e.slice();return n[19]=t[r],n}function ri(e,t,r){const n=e.slice();return n[19]=t[r],n}function ni(e){let t,r;return t=new Jt({props:{id:e[10],name:e[0].slug,required:e[0].required||e[1]?.required,type:e[1]?.["input-type"],value:e[2],checked:"checkbox"===e[1]?.["input-type"]&&e[2],pattern:e[1]?.["validation-expression"],placeholder:e[0].placeholder,hasError:e[8],isPaymentForm:e[3],onFocus:e[5],onBlur:e[6]}}),t.$on("change",e[18]),{c(){ie(t.$$.fragment)},m(e,n){se(t,e,n),r=!0},p(e,r){const n={};1&r&&(n.name=e[0].slug),3&r&&(n.required=e[0].required||e[1]?.required),2&r&&(n.type=e[1]?.["input-type"]),4&r&&(n.value=e[2]),6&r&&(n.checked="checkbox"===e[1]?.["input-type"]&&e[2]),2&r&&(n.pattern=e[1]?.["validation-expression"]),1&r&&(n.placeholder=e[0].placeholder),256&r&&(n.hasError=e[8]),8&r&&(n.isPaymentForm=e[3]),32&r&&(n.onFocus=e[5]),64&r&&(n.onBlur=e[6]),t.$set(n)},i(e){r||(te(t.$$.fragment,e),r=!0)},o(e){re(t.$$.fragment,e),r=!1},d(e){ce(t,e)}}}function oi(e){let t,r,n,o;r=new Jt({props:{id:e[10],required:e[0].required||e[1]?.required,type:e[1]["input-type"],value:e[2],min:e[1]["range-start"],max:e[1]["range-end"],step:e[1]["range-start"],isPaymentForm:e[3],onFocus:e[5],onBlur:e[6]}}),r.$on("change",e[17]);let a="range"===e[1]["input-type"]&&null!=e[2]&&li(e);return{c(){t=P("div"),ie(r.$$.fragment),n=E(),a&&a.c(),_(t,"class","zephr-form-flex-container"),N(t,"zephr-payment-form-flex-container",e[3])},m(e,i){y(e,t,i),se(r,t,null),h(t,n),a&&a.m(t,null),o=!0},p(e,n){const i={};3&n&&(i.required=e[0].required||e[1]?.required),2&n&&(i.type=e[1]["input-type"]),4&n&&(i.value=e[2]),2&n&&(i.min=e[1]["range-start"]),2&n&&(i.max=e[1]["range-end"]),2&n&&(i.step=e[1]["range-start"]),8&n&&(i.isPaymentForm=e[3]),32&n&&(i.onFocus=e[5]),64&n&&(i.onBlur=e[6]),r.$set(i),"range"===e[1]["input-type"]&&null!=e[2]?a?a.p(e,n):(a=li(e),a.c(),a.m(t,null)):a&&(a.d(1),a=null),(!o||8&n)&&N(t,"zephr-payment-form-flex-container",e[3])},i(e){o||(te(r.$$.fragment,e),o=!0)},o(e){re(r.$$.fragment,e),o=!1},d(e){e&&g(t),ce(r),a&&a.d()}}}function ai(t){let r,n,o,a,i;return{c(){r=P("textarea"),_(r,"id",t[10]),_(r,"class","zephr-form-input zephr-form-input-textarea svelte-1f2hwm0"),r.required=n=t[0].required||t[1]?.required,_(r,"placeholder",o=t[0].placeholder),N(r,"zephr-payment-form-input",t[3]),N(r,"zephr-payment-form-input-textarea",t[3])},m(e,n){y(e,r,n),R(r,t[7]),a||(i=v(r,"input",t[16]),a=!0)},p(e,t){3&t&&n!==(n=e[0].required||e[1]?.required)&&(r.required=n),1&t&&o!==(o=e[0].placeholder)&&_(r,"placeholder",o),128&t&&R(r,e[7]),8&t&&N(r,"zephr-payment-form-input",e[3]),8&t&&N(r,"zephr-payment-form-input-textarea",e[3])},i:e,o:e,d(e){e&&g(r),a=!1,i()}}}function ii(t){let r,n,o,a,i,s,c,l,u=(t[0].placeholder??"")+"",p=ne(t[1]?.["select-options"]),d=[];for(let e=0;ere(o[e],1,1,(()=>{o[e]=null}));return{c(){for(let e=0;e{i[c]=null})),ee(),r=i[t],r?r.p(e,o):(r=i[t]=a[t](e),r.c()),te(r,1),r.m(n.parentNode,n))},i(e){o||(te(r),o=!0)},o(e){re(r),o=!1},d(e){e&&g(n),i[t].d(e)}}}function mi(e){let t;return{c(){t=P("div"),t.textContent="Mandatory information must be entered",_(t,"class","zephr-form-input-error-text svelte-1f2hwm0"),N(t,"zephr-payment-form-input-error-text",e[3])},m(e,r){y(e,t,r)},p(e,r){8&r&&N(t,"zephr-payment-form-input-error-text",e[3])},d(e){e&&g(t)}}}function fi(e){let t,r,n,o;t=new er({props:{forInput:e[10],sublabel:e[1]["public-description"],label:/(hidden|checkbox)/.test(e[1]?.["input-type"]||"")?"":`${e[0].label}${e[0].required||e[1]?.required?"*":""}`,isPaymentForm:e[3],$$slots:{default:[di]},$$scope:{ctx:e}}});let a=e[8]&&mi(e);return{c(){ie(t.$$.fragment),r=E(),a&&a.c(),n=C()},m(e,i){se(t,e,i),y(e,r,i),a&&a.m(e,i),y(e,n,i),o=!0},p(e,[r]){const o={};2&r&&(o.sublabel=e[1]["public-description"]),3&r&&(o.label=/(hidden|checkbox)/.test(e[1]?.["input-type"]||"")?"":`${e[0].label}${e[0].required||e[1]?.required?"*":""}`),8&r&&(o.isPaymentForm=e[3]),16777727&r&&(o.$$scope={dirty:r,ctx:e}),t.$set(o),e[8]?a?a.p(e,r):(a=mi(e),a.c(),a.m(n.parentNode,n)):a&&(a.d(1),a=null)},i(e){o||(te(t.$$.fragment,e),o=!0)},o(e){re(t.$$.fragment,e),o=!1},d(e){e&&(g(r),g(n)),ce(t,e),a&&a.d(e)}}}function hi(e,t,r){let n,{formKey:o}=t,{config:a}=t,{attributeSchema:i}=t,{value:s}=t,{error:c}=t,{isPaymentForm:l=!1}=t,{onChange:u}=t,{onFocus:p}=t,{onBlur:d}=t,m=s;const f=e=>e,h=`zephr-form-${a.slug}-${o}`;return e.$$set=e=>{"formKey"in e&&r(11,o=e.formKey),"config"in e&&r(0,a=e.config),"attributeSchema"in e&&r(1,i=e.attributeSchema),"value"in e&&r(2,s=e.value),"error"in e&&r(12,c=e.error),"isPaymentForm"in e&&r(3,l=e.isPaymentForm),"onChange"in e&&r(4,u=e.onChange),"onFocus"in e&&r(5,p=e.onFocus),"onBlur"in e&&r(6,d=e.onBlur)},e.$$.update=()=>{4096&e.$$.dirty&&r(8,n=!!c),150&e.$$.dirty&&"textarea"===i?.["input-type"]&&m!==s&&u(m)},[a,i,s,l,u,p,d,m,n,f,h,o,c,({detail:e})=>u(e),({detail:e})=>u(e),e=>u(e.target.value),function(){m=this.value,r(7,m)},({detail:e})=>u(e),({detail:e})=>u(e)]}class yi extends pe{constructor(e){super(),ue(this,e,hi,fi,i,{formKey:11,config:0,attributeSchema:1,value:2,error:12,isPaymentForm:3,onChange:4,onFocus:5,onBlur:6})}}const gi=e=>null==e||""===e,bi={matches:e=>e.type===Oe,create:(e,t,r,n)=>{const o=e.organisationConfiguration.schemaFields.find((e=>e.slug===n.slug)),a=t.hideIfSetAttributes?.includes(n.slug);if(null==o||a)return;const i=o.required||n.required,s=t.userAttributes[n.slug]??(t.readOnlyAttributeValues??{})[n.slug];return{component:yi,props:{formKey:e.uniqueKey,config:n,value:s,attributeSchema:o,isPaymentForm:e.formType===vt.PAYMENT,onChange:o=>{r.updateFormState({userAttributes:{...t.userAttributes,[n.slug]:o}}),it(e,"zephr_form_input_change",{inputName:`zephr-form-${n.slug}-${e.uniqueKey}`,sectionId:t.currentSection.type,field:n.slug})},onFocus:()=>it(e,"zephr_form_input_focus",{inputName:`zephr-form-${n.slug}-${e.uniqueKey}`,sectionId:t.currentSection.type,field:n.slug}),onBlur:()=>it(e,"zephr_form_input_blur",{inputName:`zephr-form-${n.slug}-${e.uniqueKey}`,sectionId:t.currentSection.type,field:n.slug})},isValid:!(i&&gi(s)||i&&"checkbox"===o["input-type"]&&!s||"email"===o["input-type"]&&!gi(s)&&!Gr(s))}}};function Pi(t){let r,n,o,a;return{c(){r=P("button"),n=S(t[0]),_(r,"type","button"),_(r,"class","zephr-form-link svelte-1mdtotm"),N(r,"zephr-form-link-disabled",t[1]),N(r,"zephr-form-link-no-underline",t[3])},m(e,i){y(e,r,i),h(r,n),o||(a=v(r,"click",t[5]),o=!0)},p(e,[t]){1&t&&I(n,e[0]),2&t&&N(r,"zephr-form-link-disabled",e[1]),8&t&&N(r,"zephr-form-link-no-underline",e[3])},i:e,o:e,d(e){e&&g(r),o=!1,a()}}}function Ai(e,t,r){let{text:n}=t,{disabled:o=!1}=t,{onClick:a=(()=>{})}=t,{noUnderline:i=!1}=t;const s=D();return e.$$set=e=>{"text"in e&&r(0,n=e.text),"disabled"in e&&r(1,o=e.disabled),"onClick"in e&&r(2,a=e.onClick),"noUnderline"in e&&r(3,i=e.noUnderline)},[n,o,a,i,s,()=>{a(),s("linkClick",null)}]}class Si extends pe{constructor(e){super(),ue(this,e,Ai,Pi,i,{text:0,disabled:1,onClick:2,noUnderline:3})}}function Ei(e){let t,r;return t=new Si({props:{text:e[0],onClick:e[2]}}),t.$on("linkClick",e[7]),{c(){ie(t.$$.fragment)},m(e,n){se(t,e,n),r=!0},p(e,r){const n={};1&r&&(n.text=e[0]),4&r&&(n.onClick=e[2]),t.$set(n)},i(e){r||(te(t.$$.fragment,e),r=!0)},o(e){re(t.$$.fragment,e),r=!1},d(e){ce(t,e)}}}function Ci(t){let r,n;return{c(){r=P("div"),n=S(t[1]),_(r,"class","zephr-form-link-message svelte-11qigta")},m(e,t){y(e,r,t),h(r,n)},p(e,t){2&t&&I(n,e[1])},i:e,o:e,d(e){e&&g(r)}}}function vi(e){let t,r;return t=new qt({props:{error:e[3],isPaymentForm:e[5]}}),{c(){ie(t.$$.fragment)},m(e,n){se(t,e,n),r=!0},p(e,r){const n={};8&r&&(n.error=e[3]),32&r&&(n.isPaymentForm=e[5]),t.$set(n)},i(e){r||(te(t.$$.fragment,e),r=!0)},o(e){re(t.$$.fragment,e),r=!1},d(e){ce(t,e)}}}function Ti(e){let t,r,n,o,a;const i=[Ci,Ei],s=[];function c(e,t){return e[6]&&!e[3]?0:1}r=c(e),n=s[r]=i[r](e);let l=e[3]&&vi(e);return{c(){t=P("div"),n.c(),o=E(),l&&l.c(),_(t,"class","zephr-form-flex-container zephr-form-reset-link-container svelte-11qigta"),N(t,"zephr-payment-form-flex-container",e[5])},m(e,n){y(e,t,n),s[r].m(t,null),h(t,o),l&&l.m(t,null),a=!0},p(e,[u]){let p=r;r=c(e),r===p?s[r].p(e,u):(X(),re(s[p],1,1,(()=>{s[p]=null})),ee(),n=s[r],n?n.p(e,u):(n=s[r]=i[r](e),n.c()),te(n,1),n.m(t,o)),e[3]?l?(l.p(e,u),8&u&&te(l,1)):(l=vi(e),l.c(),te(l,1),l.m(t,null)):l&&(X(),re(l,1,1,(()=>{l=null})),ee()),(!a||32&u)&&N(t,"zephr-payment-form-flex-container",e[5])},i(e){a||(te(n),te(l),a=!0)},o(e){re(n),re(l),a=!1},d(e){e&&g(t),s[r].d(),l&&l.d()}}}function _i(e,t,r){let{text:n}=t,{message:o}=t,{onClick:a}=t,{error:i=null}=t,{delayMs:s}=t,{isPaymentForm:c=!1}=t,l=!1;return e.$$set=e=>{"text"in e&&r(0,n=e.text),"message"in e&&r(1,o=e.message),"onClick"in e&&r(2,a=e.onClick),"error"in e&&r(3,i=e.error),"delayMs"in e&&r(4,s=e.delayMs),"isPaymentForm"in e&&r(5,c=e.isPaymentForm)},[n,o,a,i,s,c,l,()=>{o&&(r(6,l=!0),setTimeout((()=>r(6,l=!1)),s))}]}class Oi extends pe{constructor(e){super(),ue(this,e,_i,Ti,i,{text:0,message:1,onClick:2,error:3,delayMs:4,isPaymentForm:5})}}const wi={matches:e=>e.type===we,create:(e,t,r,n)=>({component:Oi,props:{text:n.text,message:n.message,delayMs:e.environment.reduceDelays?1:3e3,isPaymentForm:e.formType===vt.PAYMENT,onClick:()=>Ma(e,t,r)}})};function Ii(e){let t,r;return t=new Si({props:{text:e[0],onClick:e[2]}}),t.$on("linkClick",e[7]),{c(){ie(t.$$.fragment)},m(e,n){se(t,e,n),r=!0},p(e,r){const n={};1&r&&(n.text=e[0]),4&r&&(n.onClick=e[2]),t.$set(n)},i(e){r||(te(t.$$.fragment,e),r=!0)},o(e){re(t.$$.fragment,e),r=!1},d(e){ce(t,e)}}}function Ri(t){let r,n;return{c(){r=P("div"),n=S(t[1]),_(r,"class","zephr-form-link-message svelte-11qigta")},m(e,t){y(e,r,t),h(r,n)},p(e,t){2&t&&I(n,e[1])},i:e,o:e,d(e){e&&g(r)}}}function $i(e){let t,r;return t=new qt({props:{error:e[3],isPaymentForm:e[5]}}),{c(){ie(t.$$.fragment)},m(e,n){se(t,e,n),r=!0},p(e,r){const n={};8&r&&(n.error=e[3]),32&r&&(n.isPaymentForm=e[5]),t.$set(n)},i(e){r||(te(t.$$.fragment,e),r=!0)},o(e){re(t.$$.fragment,e),r=!1},d(e){ce(t,e)}}}function Mi(e){let t,r,n,o,a;const i=[Ri,Ii],s=[];function c(e,t){return e[6]&&!e[3]?0:1}r=c(e),n=s[r]=i[r](e);let l=e[3]&&$i(e);return{c(){t=P("div"),n.c(),o=E(),l&&l.c(),_(t,"class","zephr-form-flex-container zephr-form-reset-link-container svelte-11qigta"),N(t,"zephr-payment-form-flex-container",e[5])},m(e,n){y(e,t,n),s[r].m(t,null),h(t,o),l&&l.m(t,null),a=!0},p(e,[u]){let p=r;r=c(e),r===p?s[r].p(e,u):(X(),re(s[p],1,1,(()=>{s[p]=null})),ee(),n=s[r],n?n.p(e,u):(n=s[r]=i[r](e),n.c()),te(n,1),n.m(t,o)),e[3]?l?(l.p(e,u),8&u&&te(l,1)):(l=$i(e),l.c(),te(l,1),l.m(t,null)):l&&(X(),re(l,1,1,(()=>{l=null})),ee()),(!a||32&u)&&N(t,"zephr-payment-form-flex-container",e[5])},i(e){a||(te(n),te(l),a=!0)},o(e){re(n),re(l),a=!1},d(e){e&&g(t),s[r].d(),l&&l.d()}}}function Ni(e,t,r){let{text:n}=t,{message:o}=t,{onClick:a}=t,{error:i=null}=t,{delayMs:s}=t,{isPaymentForm:c=!1}=t,l=!1;return e.$$set=e=>{"text"in e&&r(0,n=e.text),"message"in e&&r(1,o=e.message),"onClick"in e&&r(2,a=e.onClick),"error"in e&&r(3,i=e.error),"delayMs"in e&&r(4,s=e.delayMs),"isPaymentForm"in e&&r(5,c=e.isPaymentForm)},[n,o,a,i,s,c,l,()=>{o&&(r(6,l=!0),setTimeout((()=>r(6,l=!1)),s))}]}class xi extends pe{constructor(e){super(),ue(this,e,Ni,Mi,i,{text:0,message:1,onClick:2,error:3,delayMs:4,isPaymentForm:5})}}const Li={matches:e=>e.type===Ie,create:(e,t,r,n)=>({component:xi,props:{text:n.text,message:n.message,delayMs:e.environment.reduceDelays?1:3e3,isPaymentForm:e.formType===vt.PAYMENT,onClick:async()=>{await va(e,"login",t.emailAddress,r)}}})},Fi=(e,t)=>r=>{if(r?.data?.fromZephr)if(window.removeEventListener("message",window.zephrOAuthListener),e.environment.debugLogging&&console.log("Social signin message:",r),"register"===r.data.action){const n=t.updateFormState({emailAddress:r.data.identifier,socialSigninToken:r.data.stateKey,userAttributes:r.data.userAttributes??{},socialSignin:!0,userExists:!1,emailIsContact:void 0});if(e.organisationConfiguration.requireEmailVerfication)return void wa(e,n,t);mt(e,n,t)}else"otp"==r.data.action?(t.updateFormState({emailAddress:r.data.identifier,socialSigninToken:r.data.stateKey,userAttributes:r.data.userAttributes??{},socialSignin:!0,userExists:!0,emailIsContact:!1}),t.jumpToSection(ot.VERIFICATION_CODE_LOGIN.type)):"login"===r.data.action?(document.cookie=r.data.cookie,t.updateFormState({socialSignin:!0,userExists:!0,loginRegistrationComplete:!0,emailIsContact:!1}),t.onEvent(Ze.LOGIN_REGISTRATION_COMPLETE)):t.updateFormState({socialSigninError:r.data.message??"Something went wrong. Please try again later!"})};var zi={prefix:"fab",iconName:"microsoft",icon:[448,512,[],"f3ca","M0 32h214.6v214.6H0V32zm233.4 0H448v214.6H233.4V32zM0 265.4h214.6V480H0V265.4zm233.4 0H448V480H233.4V265.4z"]},ki={prefix:"fab",iconName:"apple",icon:[384,512,[],"f179","M318.7 268.7c-.2-36.7 16.4-64.4 50-84.8-18.8-26.9-47.2-41.7-84.7-44.6-35.5-2.8-74.3 20.7-88.5 20.7-15 0-49.4-19.7-76.4-19.7C63.3 141.2 4 184.8 4 273.5q0 39.3 14.4 81.2c12.8 36.7 59 126.7 107.2 125.2 25.2-.6 43-17.9 75.8-17.9 31.8 0 48.3 17.9 76.4 17.9 48.6-.7 90.4-82.5 102.6-119.3-65.2-30.7-61.7-90-61.7-91.9zm-56.6-164.2c27.3-32.4 24.8-61.9 24-72.5-24.1 1.4-52 16.4-67.9 34.9-17.5 19.8-27.8 44.3-25.6 71.9 26.1 2 49.9-11.4 69.5-34.3z"]},Di={prefix:"fab",iconName:"linkedin",icon:[448,512,[],"f08c","M416 32H31.9C14.3 32 0 46.5 0 64.3v383.4C0 465.5 14.3 480 31.9 480H416c17.6 0 32-14.5 32-32.3V64.3c0-17.8-14.4-32.3-32-32.3zM135.4 416H69V202.2h66.5V416zm-33.2-243c-21.3 0-38.5-17.3-38.5-38.5S80.9 96 102.2 96c21.2 0 38.5 17.3 38.5 38.5 0 21.3-17.2 38.5-38.5 38.5zm282.1 243h-66.4V312c0-24.8-.5-56.7-34.5-56.7-34.6 0-39.9 27-39.9 54.9V416h-66.4V202.2h63.7v29.2h.9c8.9-16.8 30.6-34.5 62.9-34.5 67.2 0 79.7 44.3 79.7 101.9V416z"]},Bi={prefix:"fab",iconName:"facebook",icon:[512,512,[62e3],"f09a","M512 256C512 114.6 397.4 0 256 0S0 114.6 0 256C0 376 82.7 476.8 194.2 504.5V334.2H141.4V256h52.8V222.3c0-87.1 39.4-127.5 125-127.5c16.2 0 44.2 3.2 55.7 6.4V172c-6-.6-16.5-1-29.6-1c-42 0-58.2 15.9-58.2 57.2V256h83.6l-14.4 78.2H287V510.1C413.8 494.8 512 386.9 512 256h0z"]},Ui={prefix:"fab",iconName:"twitter",icon:[512,512,[],"f099","M459.37 151.716c.325 4.548.325 9.097.325 13.645 0 138.72-105.583 298.558-298.558 298.558-59.452 0-114.68-17.219-161.137-47.106 8.447.974 16.568 1.299 25.34 1.299 49.055 0 94.213-16.568 130.274-44.832-46.132-.975-84.792-31.188-98.112-72.772 6.498.974 12.995 1.624 19.818 1.624 9.421 0 18.843-1.3 27.614-3.573-48.081-9.747-84.143-51.98-84.143-102.985v-1.299c13.969 7.797 30.214 12.67 47.431 13.319-28.264-18.843-46.781-51.005-46.781-87.391 0-19.492 5.197-37.36 14.294-52.954 51.655 63.675 129.3 105.258 216.365 109.807-1.624-7.797-2.599-15.918-2.599-24.04 0-57.828 46.782-104.934 104.934-104.934 30.213 0 57.502 12.67 76.67 33.137 23.715-4.548 46.456-13.32 66.599-25.34-7.798 24.366-24.366 44.833-46.132 57.827 21.117-2.273 41.584-8.122 60.426-16.243-14.292 20.791-32.161 39.308-52.628 54.253z"]};function Vi(t){let r,n,o,a,i;return{c(){r=A("svg"),n=A("path"),o=A("path"),a=A("path"),i=A("path"),_(n,"d","M533.5 278.4c0-18.5-1.5-37.1-4.7-55.3H272.1v104.8h147c-6.1 33.8-25.7 63.7-54.4 82.7v68h87.7c51.5-47.4 81.1-117.4 81.1-200.2z"),_(n,"fill","#4285f4"),_(o,"d","M272.1 544.3c73.4 0 135.3-24.1 180.4-65.7l-87.7-68c-24.4 16.6-55.9 26-92.6 26-71 0-131.2-47.9-152.8-112.3H28.9v70.1c46.2 91.9 140.3 149.9 243.2 149.9z"),_(o,"fill","#34a853"),_(a,"d","M119.3 324.3c-11.4-33.8-11.4-70.4 0-104.2V150H28.9c-38.6 76.9-38.6 167.5 0 244.4l90.4-70.1z"),_(a,"fill","#fbbc04"),_(i,"d","M272.1 107.7c38.8-.6 76.3 14 104.4 40.8l77.7-77.7C405 24.6 339.7-.8 272.1 0 169.2 0 75.1 58 28.9 150l90.4 70.1c21.5-64.5 81.8-112.4 152.8-112.4z"),_(i,"fill","#ea4335"),_(r,"class","zephr-form-social-sign-in-icon zephr-form-google-icon svelte-155mfls"),_(r,"viewBox","0 0 533.5 544.3"),_(r,"xmlns","http://www.w3.org/2000/svg")},m(e,t){y(e,r,t),h(r,n),h(r,o),h(r,a),h(r,i)},p:e,i:e,o:e,d(e){e&&g(r)}}}class Gi extends pe{constructor(e){super(),ue(this,e,null,Vi,i,{})}}function ji(e,t,r){const n=e.slice();return n[8]=t[r],n}function qi(e){let t,r,n,o,a,i,s,c,l,u,p,d,m=e[8]+"";const f=[Ki,Hi],b=[];function A(e,t){return"Google"===e[8]?0:1}function C(){return e[6](e[8])}return o=A(e),a=b[o]=f[o](e),{c(){t=P("button"),r=P("span"),n=P("span"),a.c(),i=E(),s=S(e[4]),c=E(),l=S(m),_(n,"class","zephr-form-social-sign-in-icon svelte-18a7qws"),N(n,"zephr-payment-form-social-sign-in-icon",e[3]),_(r,"class","zephr-form-flex-container zephr-form-social-sign-in svelte-18a7qws"),N(r,"zephr-payment-form-flex-container",e[3]),N(r,"zephr-payment-form-social-sign-in",e[3]),_(t,"type","button"),_(t,"class","zephr-form-button zephr-form-social-sign-in-button svelte-18a7qws"),N(t,"zephr-payment-form-button",e[3]),N(t,"zephr-payment-form-social-sign-in-button",e[3])},m(e,a){y(e,t,a),h(t,r),h(r,n),b[o].m(n,null),h(r,i),h(r,s),h(r,c),h(r,l),u=!0,p||(d=v(t,"click",T(C)),p=!0)},p(i,s){let c=o;o=A(e=i),o===c?b[o].p(e,s):(X(),re(b[c],1,1,(()=>{b[c]=null})),ee(),a=b[o],a?a.p(e,s):(a=b[o]=f[o](e),a.c()),te(a,1),a.m(n,null)),(!u||8&s)&&N(n,"zephr-payment-form-social-sign-in-icon",e[3]),(!u||1&s)&&m!==(m=e[8]+"")&&I(l,m),(!u||8&s)&&N(r,"zephr-payment-form-flex-container",e[3]),(!u||8&s)&&N(r,"zephr-payment-form-social-sign-in",e[3]),(!u||8&s)&&N(t,"zephr-payment-form-button",e[3]),(!u||8&s)&&N(t,"zephr-payment-form-social-sign-in-button",e[3])},i(e){u||(te(a),u=!0)},o(e){re(a),u=!1},d(e){e&&g(t),b[o].d(),p=!1,d()}}}function Hi(e){let r,n;const o=[e[5](e[8])];let a={};for(let e=0;e{n=null})),ee())},i(e){r||(te(n),r=!0)},o(e){re(n),r=!1},d(e){e&&g(t),n&&n.d(e)}}}function Wi(e){let t,r;return t=new qt({props:{error:e[2],isPaymentForm:e[3]}}),{c(){ie(t.$$.fragment)},m(e,n){se(t,e,n),r=!0},p(e,r){const n={};4&r&&(n.error=e[2]),8&r&&(n.isPaymentForm=e[3]),t.$set(n)},i(e){r||(te(t.$$.fragment,e),r=!0)},o(e){re(t.$$.fragment,e),r=!1},d(e){ce(t,e)}}}function Ji(e){let t,r,n,o=ne(Object.keys(e[0])),a=[];for(let t=0;tre(a[e],1,1,(()=>{a[e]=null}));let s=e[2]&&Wi(e);return{c(){for(let e=0;e{s=null})),ee())},i(e){if(!n){for(let e=0;e{"config"in e&&r(0,n=e.config),"onSelectProvider"in e&&r(1,o=e.onSelectProvider),"error"in e&&r(2,a=e.error),"isPaymentForm"in e&&r(3,i=e.isPaymentForm)},[n,o,a,i,c,e=>{switch(e){case"Facebook":default:return{icon:Bi,color:"#1877f2",size:"lg"};case"LinkedIn":return{icon:Di,color:"#0a66c2",size:"lg"};case"Apple":return{icon:ki,color:"#000",size:"lg"};case"Microsoft":return{icon:zi,color:"#00a4ef",size:"lg"};case"Twitter":return{icon:Ui,color:"#08a0e9",size:"lg"}}},e=>o(e.toLowerCase())]}class Zi extends pe{constructor(e){super(),ue(this,e,Qi,Ji,i,{config:0,onSelectProvider:1,error:2,isPaymentForm:3})}}const Xi={matches:e=>e.type===Re,create:(e,t,r,n)=>{const{enabled:o,hide:a,show:i,...s}=n??{};return{component:Zi,props:{config:s,isPaymentForm:e.formType===vt.PAYMENT,onSelectProvider:t=>((e,t,r)=>{r.updateFormState({socialSigninError:void 0}),window.open(`${t.environment.apiUrlBase??""}/blaize/oauth/${e}`,e+" sign-in","menubar=no,location=yes,resizable=no,scrollbars=no,status=no,width=500,height=600");const n=Fi(t,r);window.zephrOAuthListener=n,window.addEventListener("message",n)})(t,e,r)}}}},es="promo-code",ts=async(e,t,r)=>{const n=await Nn(e,t,r,!0),o=await Fn(e,n,r);if(t.currentSection.elements.some((e=>e.type===Le&&!1!==e.config?.enabled))){r.incrementRequestCount();try{await da(e.organisationConfiguration.paymentProvider).loader(e,o,r)}finally{r.decrementRequestCount()}}},rs=async(e,t,r)=>{const n=pa(e.organisationConfiguration.paymentProvider);return n.hasPromoCodes(e)?n?.promoCodeServiceOverride?n.promoCodeServiceOverride(e,t,r):(async(e,t,r)=>{r.updateFormState({promoCodeValid:void 0,serverErrors:[],discountedPlanPrices:[]});const n=pa(e.organisationConfiguration.paymentProvider),o=await gn(n.promoCodeCheckPath,{method:"POST",bodyObject:{promoCode:t.promoCode,paymentOptions:Ot(e).paymentOptions}},r,es);if(!o.ok){let t;if(403===o.status){const e=await o.json();t=2===e?.code||3===e?.code?tt.PROMO_CODE_EXPIRED_ERROR:tt.PROMO_CODE_INVALID_ERROR}else t=tt.PROMO_CODE_INVALID_ERROR,console.error("Unknown error evaluating promo code",o);return it(e,"zephr_form_error",{error:tt[t]}),Promise.resolve(r.updateFormState({promoCodeValid:!1,serverErrors:[t],discountedPlanPrices:[]}))}const a=(await o.json()).paymentOptions.map((e=>({planSlug:e.slug,productId:e.productId,discountPrice:e.discountPrice})));return a.find((e=>e.planSlug===t.paymentOption.slug&&e.productId===t.paymentOption.productId))?Promise.resolve(r.updateFormState({promoCodeValid:!0,serverErrors:[],discountedPlanPrices:a})):(it(e,"zephr_form_error",{error:tt[tt.PROMO_CODE_NOT_VALID_FOR_PLAN_ERROR]}),Promise.resolve(r.updateFormState({promoCodeValid:!1,serverErrors:[tt.PROMO_CODE_NOT_VALID_FOR_PLAN_ERROR],discountedPlanPrices:a})))})(e,t,r).then((t=>ts(e,t,r))):t};function ns(e,t,r){const n=e.slice();return n[34]=t[r],n}function os(e,t,r){const n=e.slice();return n[37]=t[r],n}function as(e){let t,r,n,o,a,i,s,c=e[37].label+"",l=e[37].priceFormattedString+"";return{c(){t=P("div"),r=P("span"),n=S(c),o=E(),a=P("div"),i=P("span"),s=S(l),_(r,"class","zephr-form-summary-charge-description zephr-payment-form-summary-charge-description svelte-19l6fte"),_(a,"class","zephr-form-summary-line-right zephr-payment-form-summary-line-right svelte-19l6fte"),_(t,"class","zephr-form-charge-line zephr-payment-form-charge-line svelte-19l6fte")},m(e,c){y(e,t,c),h(t,r),h(r,n),h(t,o),h(t,a),h(a,i),h(i,s)},p(e,t){524288&t[0]&&c!==(c=e[37].label+"")&&I(n,c),524288&t[0]&&l!==(l=e[37].priceFormattedString+"")&&I(s,l)},d(e){e&&g(t)}}}function is(e){let t,r,n,o,a,i;return{c(){t=P("div"),r=P("div"),n=S(e[22]),o=E(),a=P("div"),i=S(e[21]),_(r,"class","zephr-form-summary-charge-description zephr-payment-form-summary-charge-description svelte-19l6fte"),_(a,"class","zephr-form-summary-line-right zephr-payment-form-summary-line-right svelte-19l6fte"),_(t,"class","zephr-form-charge-line zephr-payment-form-charge-line svelte-19l6fte")},m(e,s){y(e,t,s),h(t,r),h(r,n),h(t,o),h(t,a),h(a,i)},p(e,t){4194304&t[0]&&I(n,e[22]),2097152&t[0]&&I(i,e[21])},d(e){e&&g(t)}}}function ss(e){let t,r,n,o,a,i,s,c=e[34].label+"",l=e[34].addonPrice+"";return{c(){t=P("div"),r=P("span"),n=S(c),o=E(),a=P("div"),i=P("span"),s=S(l),_(a,"class","zephr-form-summary-line-right zephr-payment-form-summary-line-right svelte-19l6fte"),_(t,"class","zephr-form-addon-line zephr-payment-form-addon-line svelte-19l6fte")},m(e,c){y(e,t,c),h(t,r),h(r,n),h(t,o),h(t,a),h(a,i),h(i,s)},p(e,t){262144&t[0]&&c!==(c=e[34].label+"")&&I(n,c),262144&t[0]&&l!==(l=e[34].addonPrice+"")&&I(s,l)},d(e){e&&g(t)}}}function cs(e){let t,r,n,o=!e[17]&&!(e[27]||e[11])&&ls(e),a=(e[27]||e[11])&&us(e);return{c(){o&&o.c(),t=E(),a&&a.c(),r=C()},m(e,i){o&&o.m(e,i),y(e,t,i),a&&a.m(e,i),y(e,r,i),n=!0},p(e,n){e[17]||e[27]||e[11]?o&&(o.d(1),o=null):o?o.p(e,n):(o=ls(e),o.c(),o.m(t.parentNode,t)),e[27]||e[11]?a?(a.p(e,n),134219776&n[0]&&te(a,1)):(a=us(e),a.c(),te(a,1),a.m(r.parentNode,r)):a&&(X(),re(a,1,1,(()=>{a=null})),ee())},i(e){n||(te(a),n=!0)},o(e){re(a),n=!1},d(e){e&&(g(t),g(r)),o&&o.d(e),a&&a.d(e)}}}function ls(e){let t,r,n,o,a;return{c(){t=P("button"),r=P("span"),n=S(e[4]),_(t,"type","button"),_(t,"class","zephr-form-promo-activate-line zephr-payment-form-promo-activate-line svelte-19l6fte")},m(i,s){y(i,t,s),h(t,r),h(r,n),o||(a=v(t,"click",e[32]),o=!0)},p(e,t){16&t[0]&&I(n,e[4])},d(e){e&&g(t),o=!1,a()}}}function us(e){let t,r,n,o,a,i,s,c,l,u,p,d;const m=[ds,ps],b=[];function A(e,t){return e[17]&&e[11]?0:e[17]?-1:1}~(n=A(e))&&(o=b[n]=m[n](e));const S=[gs,ys],v=[];function T(e,t){return e[12]?0:e[17]?-1:1}~(s=T(e))&&(c=v[s]=S[s](e));let O=e[14]&&Ps(e);return{c(){t=P("div"),r=P("div"),o&&o.c(),a=E(),i=P("div"),c&&c.c(),u=E(),O&&O.c(),p=C(),_(r,"class","zephr-form-promo-input-container zephr-payment-form-promo-input-container svelte-19l6fte"),_(i,"class",l=f(e[12]?"zephr-form-summary-line-right zephr-payment-form-summary-line-right":"zephr-form-summary-line-left zephr-payment-form-summary-line-left")+" svelte-19l6fte"),_(t,"class","zephr-form-promo-line zephr-payment-form-promo-line svelte-19l6fte")},m(e,o){y(e,t,o),h(t,r),~n&&b[n].m(r,null),h(t,a),h(t,i),~s&&v[s].m(i,null),y(e,u,o),O&&O.m(e,o),y(e,p,o),d=!0},p(e,t){let a=n;n=A(e),n===a?~n&&b[n].p(e,t):(o&&(X(),re(b[a],1,1,(()=>{b[a]=null})),ee()),~n?(o=b[n],o?o.p(e,t):(o=b[n]=m[n](e),o.c()),te(o,1),o.m(r,null)):o=null);let u=s;s=T(e),s===u?~s&&v[s].p(e,t):(c&&(X(),re(v[u],1,1,(()=>{v[u]=null})),ee()),~s?(c=v[s],c?c.p(e,t):(c=v[s]=S[s](e),c.c()),te(c,1),c.m(i,null)):c=null),(!d||4096&t[0]&&l!==(l=f(e[12]?"zephr-form-summary-line-right zephr-payment-form-summary-line-right":"zephr-form-summary-line-left zephr-payment-form-summary-line-left")+" svelte-19l6fte"))&&_(i,"class",l),e[14]?O?(O.p(e,t),16384&t[0]&&te(O,1)):(O=Ps(e),O.c(),te(O,1),O.m(p.parentNode,p)):O&&(X(),re(O,1,1,(()=>{O=null})),ee())},i(e){d||(te(o),te(c),te(O),d=!0)},o(e){re(o),re(c),re(O),d=!1},d(e){e&&(g(t),g(u),g(p)),~n&&b[n].d(),~s&&v[s].d(),O&&O.d(e)}}}function ps(e){let t,r,n;return r=new Jt({props:{id:"zephr-form-promo-code",value:e[11],placeholder:e[5],maxlength:50,hasError:null!=e[14],fill:!0,isPaymentForm:!0,onFocus:e[25],onBlur:e[26],$$slots:{default:[hs]},$$scope:{ctx:e}}}),r.$on("change",e[33]),{c(){t=P("div"),ie(r.$$.fragment),_(t,"class","zephr-form-relative-container zephr-form-promo-input zephr-form-relative-container zephr-payment-form-promo-input")},m(e,o){y(e,t,o),se(r,t,null),n=!0},p(e,t){const n={};2048&t[0]&&(n.value=e[11]),32&t[0]&&(n.placeholder=e[5]),16384&t[0]&&(n.hasError=null!=e[14]),33554432&t[0]&&(n.onFocus=e[25]),67108864&t[0]&&(n.onBlur=e[26]),53248&t[0]|512&t[1]&&(n.$$scope={dirty:t,ctx:e}),r.$set(n)},i(e){n||(te(r.$$.fragment,e),n=!0)},o(e){re(r.$$.fragment,e),n=!1},d(e){e&&g(t),ce(r)}}}function ds(t){let r,n;return{c(){r=P("span"),n=S(t[11]),_(r,"class","zephr-form-summary-promo-middle zephr-payment-form-summary-promo-middle svelte-19l6fte")},m(e,t){y(e,r,t),h(r,n)},p(e,t){2048&t[0]&&I(n,e[11])},i:e,o:e,d(e){e&&g(r)}}}function ms(e){let t,r;return t=new lr({props:{icon:pr,spin:!0}}),{c(){ie(t.$$.fragment)},m(e,n){se(t,e,n),r=!0},i(e){r||(te(t.$$.fragment,e),r=!0)},o(e){re(t.$$.fragment,e),r=!1},d(e){ce(t,e)}}}function fs(e){let t,r;return t=new lr({props:{icon:dr}}),{c(){ie(t.$$.fragment)},m(e,n){se(t,e,n),r=!0},i(e){r||(te(t.$$.fragment,e),r=!0)},o(e){re(t.$$.fragment,e),r=!1},d(e){ce(t,e)}}}function hs(e){let t,r,n,o;const a=[fs,ms],i=[];function s(e,t){return e[12]?0:e[15]&&!e[14]?1:-1}return~(r=s(e))&&(n=i[r]=a[r](e)),{c(){t=P("div"),n&&n.c(),_(t,"class","zephr-form-input-inner-text zephr-payment-form-input-inner-text zephr-form-input-inner-button")},m(e,n){y(e,t,n),~r&&i[r].m(t,null),o=!0},p(e,o){let c=r;r=s(e),r!==c&&(n&&(X(),re(i[c],1,1,(()=>{i[c]=null})),ee()),~r?(n=i[r],n||(n=i[r]=a[r](e),n.c()),te(n,1),n.m(t,null)):n=null)},i(e){o||(te(n),o=!0)},o(e){re(n),o=!1},d(e){e&&g(t),~r&&i[r].d()}}}function ys(e){let t,r;return t=new Rt({props:{disabled:e[16],text:e[6],onClick:e[24],noMargin:!0,inputHeight:!0,isPaymentForm:!0}}),{c(){ie(t.$$.fragment)},m(e,n){se(t,e,n),r=!0},p(e,r){const n={};65536&r[0]&&(n.disabled=e[16]),64&r[0]&&(n.text=e[6]),16777216&r[0]&&(n.onClick=e[24]),t.$set(n)},i(e){r||(te(t.$$.fragment,e),r=!0)},o(e){re(t.$$.fragment,e),r=!1},d(e){ce(t,e)}}}function gs(t){let r,n=t[0]&&bs(t);return{c(){r=P("span"),n&&n.c(),_(r,"class","zephr-form-summary-promo-middle zephr-payment-form-summary-promo-middle svelte-19l6fte")},m(e,t){y(e,r,t),n&&n.m(r,null)},p(e,t){e[0]?n?n.p(e,t):(n=bs(e),n.c(),n.m(r,null)):n&&(n.d(1),n=null)},i:e,o:e,d(e){e&&g(r),n&&n.d()}}}function bs(e){let t,r;return{c(){t=S("- "),r=S(e[13])},m(e,n){y(e,t,n),y(e,r,n)},p(e,t){8192&t[0]&&I(r,e[13])},d(e){e&&(g(t),g(r))}}}function Ps(e){let t,r;return t=new qt({props:{error:e[14],isPaymentForm:!0}}),{c(){ie(t.$$.fragment)},m(e,n){se(t,e,n),r=!0},p(e,r){const n={};16384&r[0]&&(n.error=e[14]),t.$set(n)},i(e){r||(te(t.$$.fragment,e),r=!0)},o(e){re(t.$$.fragment,e),r=!1},d(e){ce(t,e)}}}function As(e){let t,r;return{c(){t=P("div"),r=S(e[10]),_(t,"class","zephr-form-summary-prorate-disclaimer zephr-payment-form-summary-prorate-disclaimer svelte-19l6fte")},m(e,n){y(e,t,n),h(t,r)},p(e,t){1024&t[0]&&I(r,e[10])},d(e){e&&g(t)}}}function Ss(e){let t,r,n,o,a,i,s=(e[9]??"DUE TODAY")+"",c=e[20].totalPriceFormattedString+"";return{c(){t=P("div"),r=P("div"),n=S(s),o=E(),a=P("div"),i=S(c),_(r,"class","zephr-form-summary-line-total-title zephr-payment-form-summary-line-total-title"),_(a,"class","zephr-form-summary-line-price zephr-payment-form-summary-line-price svelte-19l6fte"),_(t,"class","zephr-form-summary-line zephr-form-summary-price-line zephr-payment-form-summary-line zephr-payment-form-summary-price-line svelte-19l6fte")},m(e,s){y(e,t,s),h(t,r),h(r,n),h(t,o),h(t,a),h(a,i)},p(e,t){512&t[0]&&s!==(s=(e[9]??"DUE TODAY")+"")&&I(n,s),1048576&t[0]&&c!==(c=e[20].totalPriceFormattedString+"")&&I(i,c)},d(e){e&&g(t)}}}function Es(e){let t,r,n,o,a,i,s,c,l,u,p,d,m,f,A,C,v,T,O,w,R,$,M,N,x=ne(e[19]),L=[];for(let t=0;t{D=null})),ee()),(!N||256&r[0])&&I(T,e[8]),(!N||4&r[0])&&I(R,e[2]),e[10]?B?B.p(e,r):(B=As(e),B.c(),B.m(t,M)):B&&(B.d(1),B=null),e[20]?U?U.p(e,r):(U=Ss(e),U.c(),U.m(t,null)):U&&(U.d(1),U=null)},i(e){N||(te(D),N=!0)},o(e){re(D),N=!1},d(e){e&&g(t),b(L,e),F&&F.d(),b(k,e),D&&D.d(),B&&B.d(),U&&U.d()}}}function Cs(e,t,r){let n,{showPromoCodeDiscountAmount:o=!0}=t,{planTitle:a}=t,{price:i}=t,{totalPrice:s}=t,{allowPromoCodes:c}=t,{promoCodeLinkText:l}=t,{promoCodePlaceholder:u}=t,{promoCodeButtonText:p}=t,{title:d}=t,{totalLabel:m}=t,{prorateLabel:f}=t,{prorateDisclaimer:h}=t,{promoCode:y}=t,{promoCodeValid:g}=t,{discountAmount:b}=t,{error:P=null}=t,{busy:A}=t,{promoCodeDisabled:S}=t,{paymentProcessed:E}=t,{addons:C}=t,{chargeItems:v}=t,{changeSubscriptionProrate:T}=t,{tax:_}=t,{taxLabel:O}=t,{subTotal:w}=t,{onChangePromoCode:I}=t,{verifyPromoCode:R}=t,{onFocus:$}=t,{onBlur:M}=t,{logBeginCheckout:N}=t,x=!1;N();return e.$$set=e=>{"showPromoCodeDiscountAmount"in e&&r(0,o=e.showPromoCodeDiscountAmount),"planTitle"in e&&r(1,a=e.planTitle),"price"in e&&r(29,i=e.price),"totalPrice"in e&&r(2,s=e.totalPrice),"allowPromoCodes"in e&&r(3,c=e.allowPromoCodes),"promoCodeLinkText"in e&&r(4,l=e.promoCodeLinkText),"promoCodePlaceholder"in e&&r(5,u=e.promoCodePlaceholder),"promoCodeButtonText"in e&&r(6,p=e.promoCodeButtonText),"title"in e&&r(7,d=e.title),"totalLabel"in e&&r(8,m=e.totalLabel),"prorateLabel"in e&&r(9,f=e.prorateLabel),"prorateDisclaimer"in e&&r(10,h=e.prorateDisclaimer),"promoCode"in e&&r(11,y=e.promoCode),"promoCodeValid"in e&&r(12,g=e.promoCodeValid),"discountAmount"in e&&r(13,b=e.discountAmount),"error"in e&&r(14,P=e.error),"busy"in e&&r(15,A=e.busy),"promoCodeDisabled"in e&&r(16,S=e.promoCodeDisabled),"paymentProcessed"in e&&r(17,E=e.paymentProcessed),"addons"in e&&r(18,C=e.addons),"chargeItems"in e&&r(19,v=e.chargeItems),"changeSubscriptionProrate"in e&&r(20,T=e.changeSubscriptionProrate),"tax"in e&&r(21,_=e.tax),"taxLabel"in e&&r(22,O=e.taxLabel),"subTotal"in e&&r(30,w=e.subTotal),"onChangePromoCode"in e&&r(23,I=e.onChangePromoCode),"verifyPromoCode"in e&&r(24,R=e.verifyPromoCode),"onFocus"in e&&r(25,$=e.onFocus),"onBlur"in e&&r(26,M=e.onBlur),"logBeginCheckout"in e&&r(31,N=e.logBeginCheckout)},e.$$.update=()=>{1611137024&e.$$.dirty[0]&&r(28,n=v.length?"":w||i)},[o,a,s,c,l,u,p,d,m,f,h,y,g,b,P,A,S,E,C,v,T,_,O,I,R,$,M,x,n,i,w,N,()=>r(27,x=!0),({detail:e})=>I(e)]}class vs extends pe{constructor(e){super(),ue(this,e,Cs,Es,i,{showPromoCodeDiscountAmount:0,planTitle:1,price:29,totalPrice:2,allowPromoCodes:3,promoCodeLinkText:4,promoCodePlaceholder:5,promoCodeButtonText:6,title:7,totalLabel:8,prorateLabel:9,prorateDisclaimer:10,promoCode:11,promoCodeValid:12,discountAmount:13,error:14,busy:15,promoCodeDisabled:16,paymentProcessed:17,addons:18,chargeItems:19,changeSubscriptionProrate:20,tax:21,taxLabel:22,subTotal:30,onChangePromoCode:23,verifyPromoCode:24,onFocus:25,onBlur:26,logBeginCheckout:31},null,[-1,-1])}}const Ts={matches:e=>e.type===$e,create:(e,t,r,n)=>{const o=pa(e.organisationConfiguration.paymentProvider);return{component:vs,props:{showPromoCodeDiscountAmount:!Ot(e).dynamicOffer,price:t.paymentOptionPrices?.netPriceFormattedString??"-",totalPrice:t.paymentOptionPrices?.totalPriceFormattedString??"-",tax:t.paymentOptionPrices?.taxPriceFormattedString,taxLabel:n.taxLabel??"Tax",subTotal:t.paymentOptionPrices?.netPriceFormattedString,planTitle:t.paymentOption.label,allowPromoCodes:(Ot(e).promoCodeConfig?.promoCodeAllowed||Ot(e).dynamicOffer)&&o.hasPromoCodes(e),promoCodeLinkText:Ot(e).promoCodeConfig?.promoCodeText,promoCodePlaceholder:Ot(e).promoCodeConfig?.promoCodePlaceholder,promoCodeButtonText:Ot(e).promoCodeConfig?.promoCodeButtonText,totalLabel:n.total,prorateLabel:n.prorateLabel,prorateDisclaimer:!Ot(e).changeSubscriptionMode||o.changeSubscriptionProrateCalculator?null:n.prorateDisclaimer,title:n.title,promoCode:t.promoCode,busy:t.isBusyByKey[es],promoCodeDisabled:t.isBusy||0===t.promoCode?.length,paymentProcessed:t.paymentProcessed,discountAmount:t.paymentOptionPrices?.discountPriceFormattedPrice??"-",addons:Ln(t).map((e=>({label:e.label,addonPrice:Mn(e.addonPrice,t.paymentOption.currencyCode)}))),chargeItems:t.paymentOptionPrices?.chargeItems??[],promoCodeValid:t.promoCodeValid,changeSubscriptionProrate:t.changeSubscriptionProrate,onChangePromoCode:n=>{let o=r.updateFormState({promoCode:n,promoCodeValid:void 0,discountedPlanPrices:[]});t.promoCodeValid&&(t.originalDynamicOfferResult&&(o=r.updateFormState({dynamicOfferResult:t.originalDynamicOfferResult})),ts(e,o,r)),it(e,"zephr_form_input_change",{inputName:"zephr-form-promo-code",sectionId:t.currentSection.type,field:"promo-code"})},onFocus:()=>it(e,"zephr_form_input_focus",{inputName:"zephr-form-promo-code",sectionId:t.currentSection.type,field:"promo-code"}),onBlur:()=>it(e,"zephr_form_input_blur",{inputName:"zephr-form-promo-code",sectionId:t.currentSection.type,field:"promo-code"}),verifyPromoCode:()=>{rs(e,t,r)},logBeginCheckout:()=>{t.userExists&&it(e,"begin_checkout",{ecommerce:{currency:Co(e,t),value:t.paymentOptionPrices?.netPrice,items:[{item_id:t.paymentOption.slug,item_name:t.paymentOption.productId,price:t.paymentOptionPrices?.netPrice,quantity:1}]}})}}}}};function _s(e){let t,r,n,o=e[1]&&Os(e),a=e[0]&&Rs(e),i=e[1]&&e[0]&&$s(e);return{c(){t=P("div"),o&&o.c(),r=E(),a&&a.c(),n=E(),i&&i.c(),_(t,"class","zephr-form-divider-container svelte-svq2r5"),N(t,"zephr-payment-form-divider-container",e[3])},m(e,s){y(e,t,s),o&&o.m(t,null),h(t,r),a&&a.m(t,null),h(t,n),i&&i.m(t,null)},p(e,s){e[1]?o?o.p(e,s):(o=Os(e),o.c(),o.m(t,r)):o&&(o.d(1),o=null),e[0]?a?a.p(e,s):(a=Rs(e),a.c(),a.m(t,n)):a&&(a.d(1),a=null),e[1]&&e[0]?i?i.p(e,s):(i=$s(e),i.c(),i.m(t,null)):i&&(i.d(1),i=null),8&s&&N(t,"zephr-payment-form-divider-container",e[3])},d(e){e&&g(t),o&&o.d(),a&&a.d(),i&&i.d()}}}function Os(e){let t;function r(e,t){return e[0]?Is:ws}let n=r(e),o=n(e);return{c(){o.c(),t=C()},m(e,r){o.m(e,r),y(e,t,r)},p(e,a){n===(n=r(e))&&o?o.p(e,a):(o.d(1),o=n(e),o&&(o.c(),o.m(t.parentNode,t)))},d(e){e&&g(t),o.d(e)}}}function ws(t){let r;return{c(){r=P("div"),_(r,"class","zephr-form-divider-line-complete svelte-svq2r5")},m(e,t){y(e,r,t)},p:e,d(e){e&&g(r)}}}function Is(e){let t;return{c(){t=P("div"),_(t,"class","zephr-form-divider-line svelte-svq2r5"),N(t,"zephr-payment-form-divider-line",e[3])},m(e,r){y(e,t,r)},p(e,r){8&r&&N(t,"zephr-payment-form-divider-line",e[3])},d(e){e&&g(t)}}}function Rs(e){let t,r;return{c(){t=P("span"),r=S(e[0]),_(t,"class","zephr-form-divider-text svelte-svq2r5"),N(t,"zephr-payment-form-divider-text",e[3])},m(e,n){y(e,t,n),h(t,r)},p(e,n){1&n&&I(r,e[0]),8&n&&N(t,"zephr-payment-form-divider-text",e[3])},d(e){e&&g(t)}}}function $s(e){let t;return{c(){t=P("div"),_(t,"class","zephr-form-divider-line svelte-svq2r5"),N(t,"zephr-payment-form-divider-line",e[3])},m(e,r){y(e,t,r)},p(e,r){8&r&&N(t,"zephr-payment-form-divider-line",e[3])},d(e){e&&g(t)}}}function Ms(t){let r,n=t[2]&&_s(t);return{c(){n&&n.c(),r=C()},m(e,t){n&&n.m(e,t),y(e,r,t)},p(e,[t]){e[2]?n?n.p(e,t):(n=_s(e),n.c(),n.m(r.parentNode,r)):n&&(n.d(1),n=null)},i:e,o:e,d(e){e&&g(r),n&&n.d(e)}}}function Ns(e,t,r){let{text:n}=t,{showLine:o}=t,{show:a}=t,{isPaymentForm:i=!1}=t;return e.$$set=e=>{"text"in e&&r(0,n=e.text),"showLine"in e&&r(1,o=e.showLine),"show"in e&&r(2,a=e.show),"isPaymentForm"in e&&r(3,i=e.isPaymentForm)},[n,o,a,i]}class xs extends pe{constructor(e){super(),ue(this,e,Ns,Ms,i,{text:0,showLine:1,show:2,isPaymentForm:3})}}const Ls={matches:e=>e.type===Me,create:(e,t,r,n)=>({component:xs,props:{text:n.text,showLine:n.showLine,show:n.show,isPaymentForm:e.formType===vt.PAYMENT}})};function Fs(t){let r,n,o,a,i;return{c(){r=P("div"),n=S(t[0]),o=E(),a=P("a"),i=S(t[1]),_(a,"href",t[2]),_(a,"class","svelte-1bpa3mq"),_(r,"class","zephr-form-login-link svelte-1bpa3mq"),N(r,"zephr-payment-login-link",t[3])},m(e,t){y(e,r,t),h(r,n),h(r,o),h(r,a),h(a,i)},p(e,[t]){1&t&&I(n,e[0]),2&t&&I(i,e[1]),4&t&&_(a,"href",e[2]),8&t&&N(r,"zephr-payment-login-link",e[3])},i:e,o:e,d(e){e&&g(r)}}}function zs(e,t,r){let{text:n}=t,{linkText:o}=t,{url:a}=t,{isPaymentForm:i=!1}=t;return e.$$set=e=>{"text"in e&&r(0,n=e.text),"linkText"in e&&r(1,o=e.linkText),"url"in e&&r(2,a=e.url),"isPaymentForm"in e&&r(3,i=e.isPaymentForm)},[n,o,a,i]}class ks extends pe{constructor(e){super(),ue(this,e,zs,Fs,i,{text:0,linkText:1,url:2,isPaymentForm:3})}}const Ds={matches:e=>e.type===Ne,create:(e,t,r,n)=>({component:ks,props:{text:n.alreadyRegText,linkText:n.loginText,url:n.url,isPaymentForm:e.formType===vt.PAYMENT}})},Bs={matches:e=>e.type===Se&&e.config.isLogin,create:(e,t,r,n)=>({component:Rt,props:{disabled:t.isBusy,text:n.text,onClick:()=>{it(e,"zephr_form_button_press",{sectionId:t.currentSection.type,buttonType:"SUBMIT"}),r.updateFormState({forgotPassword:!1}),r.jumpToPartStart(Xe.ACCOUNT_VERIFICATION.type)},isPaymentForm:e.formType===vt.PAYMENT}})},Us={matches:e=>e.type===Se&&e.config.isCancel,create:(e,t,r,n)=>({component:Rt,props:{text:n.text,onClick:()=>{it(e,"zephr_form_button_press",{sectionId:t.currentSection.type,buttonType:"SUBMIT"}),r.updateFormState({confirmCancel:!0}),r.completeSection()}}})};function Vs(e){let t,r;return t=new Si({props:{text:e[0]}}),t.$on("linkClick",e[10]),{c(){ie(t.$$.fragment)},m(e,n){se(t,e,n),r=!0},p(e,r){const n={};1&r&&(n.text=e[0]),t.$set(n)},i(e){r||(te(t.$$.fragment,e),r=!0)},o(e){re(t.$$.fragment,e),r=!1},d(e){ce(t,e)}}}function Gs(e){let t,r,n,o;return t=new er({props:{forInput:e[8],label:e[0]}}),n=new Jt({props:{id:e[8],value:e[2],errorMessage:e[3],placeholder:e[1],onFocus:e[5],onBlur:e[6]}}),n.$on("change",e[11]),{c(){ie(t.$$.fragment),r=E(),ie(n.$$.fragment)},m(e,a){se(t,e,a),y(e,r,a),se(n,e,a),o=!0},p(e,r){const o={};1&r&&(o.label=e[0]),t.$set(o);const a={};4&r&&(a.value=e[2]),8&r&&(a.errorMessage=e[3]),2&r&&(a.placeholder=e[1]),32&r&&(a.onFocus=e[5]),64&r&&(a.onBlur=e[6]),n.$set(a)},i(e){o||(te(t.$$.fragment,e),te(n.$$.fragment,e),o=!0)},o(e){re(t.$$.fragment,e),re(n.$$.fragment,e),o=!1},d(e){e&&g(r),ce(t,e),ce(n,e)}}}function js(e){let t,r,n,o=!e[7]&&Vs(e),a=(e[2]||e[7])&&Gs(e);return{c(){t=P("div"),o&&o.c(),r=E(),a&&a.c(),_(t,"class","zephr-form-account-code-container svelte-ctt9he")},m(e,i){y(e,t,i),o&&o.m(t,null),h(t,r),a&&a.m(t,null),n=!0},p(e,[n]){e[7]?o&&(X(),re(o,1,1,(()=>{o=null})),ee()):o?(o.p(e,n),128&n&&te(o,1)):(o=Vs(e),o.c(),te(o,1),o.m(t,r)),e[2]||e[7]?a?(a.p(e,n),132&n&&te(a,1)):(a=Gs(e),a.c(),te(a,1),a.m(t,null)):a&&(X(),re(a,1,1,(()=>{a=null})),ee())},i(e){n||(te(o),te(a),n=!0)},o(e){re(o),re(a),n=!1},d(e){e&&g(t),o&&o.d(),a&&a.d()}}}function qs(e,t,r){let{formKey:n}=t,{label:o}=t,{placeholder:a}=t,{accountMembershipCode:i}=t,{error:s=null}=t,{onChange:c}=t,{onFocus:l}=t,{onBlur:u}=t,p=!1;const d=`zephr-form-account-code-${n}`;return e.$$set=e=>{"formKey"in e&&r(9,n=e.formKey),"label"in e&&r(0,o=e.label),"placeholder"in e&&r(1,a=e.placeholder),"accountMembershipCode"in e&&r(2,i=e.accountMembershipCode),"error"in e&&r(3,s=e.error),"onChange"in e&&r(4,c=e.onChange),"onFocus"in e&&r(5,l=e.onFocus),"onBlur"in e&&r(6,u=e.onBlur)},[o,a,i,s,c,l,u,p,d,n,()=>r(7,p=!0),e=>c(e.detail)]}class Hs extends pe{constructor(e){super(),ue(this,e,qs,js,i,{formKey:9,label:0,placeholder:1,accountMembershipCode:2,error:3,onChange:4,onFocus:5,onBlur:6})}}const Ks={matches:e=>e.type===xe,create:(e,t,r,n)=>({component:Hs,props:{formKey:e.uniqueKey,label:n.label,placeholder:n.placeholder,accountMembershipCode:t.accountMembershipCode,onChange:n=>{r.updateFormState({accountMembershipCode:n,serverErrors:[]}),it(e,"zephr_form_input_change",{inputName:`zephr-form-account-code-${e.uniqueKey}`,sectionId:t.currentSection.type,field:"account-code"})},onFocus:()=>it(e,"zephr_form_input_focus",{inputName:`zephr-form-account-code-${e.uniqueKey}`,sectionId:t.currentSection.type,field:"account-code"}),onBlur:()=>it(e,"zephr_form_input_blur",{inputName:`zephr-form-account-code-${e.uniqueKey}`,sectionId:t.currentSection.type,field:"account-code"})}})};function Ys(e){let t,r,n;return r=new Sa({props:{text:e[4]}}),{c(){t=P("div"),ie(r.$$.fragment),_(t,"class","zephr-form-invitation-success-message svelte-yy7ok3")},m(e,o){y(e,t,o),se(r,t,null),n=!0},p(e,t){const n={};16&t&&(n.text=e[4]),r.$set(n)},i(e){n||(te(r.$$.fragment,e),n=!0)},o(e){re(r.$$.fragment,e),n=!1},d(e){e&&g(t),ce(r)}}}function Ws(e){let t,r,n,o,a,i,s,c,l,u,p,d,m,f,b,A;c=new er({props:{forInput:e[14],label:e[2],isPaymentForm:e[11]}}),d=new Jt({props:{disabled:e[10],required:!0,id:e[14],value:e[7]??"",errorMessage:e[9],isPaymentForm:e[11],onFocus:e[12],onBlur:e[13]}}),d.$on("change",e[16]),f=new Rt({props:{disabled:!Gr(e[7])||e[10],text:e[3],onClick:e[5],noMargin:!0,inputHeight:!0,aside:!0,isPaymentForm:e[11]}});let C=e[8]&&Ys(e);return{c(){t=P("div"),r=P("div"),n=S(e[0]),o=E(),a=P("div"),i=S(e[1]),s=E(),ie(c.$$.fragment),l=E(),u=P("div"),p=P("div"),ie(d.$$.fragment),m=E(),ie(f.$$.fragment),b=E(),C&&C.c(),_(r,"class","zephr-form-invitation-title svelte-yy7ok3"),_(a,"class","zephr-form-invitation-description"),_(p,"class","zephr-form-invitation-input-container svelte-yy7ok3"),_(u,"class","zephr-form-relative-container zephr-form-invitation-email svelte-yy7ok3"),N(u,"zephr-payment-form-relative-container",e[11]),_(t,"class","zephr-form-invitation-container svelte-yy7ok3")},m(e,g){y(e,t,g),h(t,r),h(r,n),h(t,o),h(t,a),h(a,i),h(t,s),se(c,t,null),h(t,l),h(t,u),h(u,p),se(d,p,null),h(u,m),se(f,u,null),h(t,b),C&&C.m(t,null),A=!0},p(e,[r]){(!A||1&r)&&I(n,e[0]),(!A||2&r)&&I(i,e[1]);const o={};4&r&&(o.label=e[2]),2048&r&&(o.isPaymentForm=e[11]),c.$set(o);const a={};1024&r&&(a.disabled=e[10]),128&r&&(a.value=e[7]??""),512&r&&(a.errorMessage=e[9]),2048&r&&(a.isPaymentForm=e[11]),4096&r&&(a.onFocus=e[12]),8192&r&&(a.onBlur=e[13]),d.$set(a);const s={};1152&r&&(s.disabled=!Gr(e[7])||e[10]),8&r&&(s.text=e[3]),32&r&&(s.onClick=e[5]),2048&r&&(s.isPaymentForm=e[11]),f.$set(s),(!A||2048&r)&&N(u,"zephr-payment-form-relative-container",e[11]),e[8]?C?(C.p(e,r),256&r&&te(C,1)):(C=Ys(e),C.c(),te(C,1),C.m(t,null)):C&&(X(),re(C,1,1,(()=>{C=null})),ee())},i(e){A||(te(c.$$.fragment,e),te(d.$$.fragment,e),te(f.$$.fragment,e),te(C),A=!0)},o(e){re(c.$$.fragment,e),re(d.$$.fragment,e),re(f.$$.fragment,e),re(C),A=!1},d(e){e&&g(t),ce(c),ce(d),ce(f),C&&C.d()}}}function Js(e,t,r){let{formKey:n}=t,{title:o}=t,{description:a}=t,{label:i}=t,{btnText:s}=t,{linkSentText:c}=t,{onSendInviteClick:l}=t,{onChange:u}=t,{invitationEmail:p}=t,{invitationSent:d}=t,{error:m=null}=t,{isBusy:f}=t,{isPaymentForm:h=!1}=t,{onFocus:y}=t,{onBlur:g}=t;const b=`zephr-form-invitation-email-${n}`;return e.$$set=e=>{"formKey"in e&&r(15,n=e.formKey),"title"in e&&r(0,o=e.title),"description"in e&&r(1,a=e.description),"label"in e&&r(2,i=e.label),"btnText"in e&&r(3,s=e.btnText),"linkSentText"in e&&r(4,c=e.linkSentText),"onSendInviteClick"in e&&r(5,l=e.onSendInviteClick),"onChange"in e&&r(6,u=e.onChange),"invitationEmail"in e&&r(7,p=e.invitationEmail),"invitationSent"in e&&r(8,d=e.invitationSent),"error"in e&&r(9,m=e.error),"isBusy"in e&&r(10,f=e.isBusy),"isPaymentForm"in e&&r(11,h=e.isPaymentForm),"onFocus"in e&&r(12,y=e.onFocus),"onBlur"in e&&r(13,g=e.onBlur)},[o,a,i,s,c,l,u,p,d,m,f,h,y,g,b,n,({detail:e})=>u(e)]}class Qs extends pe{constructor(e){super(),ue(this,e,Js,Ws,i,{formKey:15,title:0,description:1,label:2,btnText:3,linkSentText:4,onSendInviteClick:5,onChange:6,invitationEmail:7,invitationSent:8,error:9,isBusy:10,isPaymentForm:11,onFocus:12,onBlur:13})}}const Zs=async(e,t,r)=>{let n;n=t.userExists?await(e=>gn("blaize/profile",{method:"GET"},e).then((e=>e.json())))(r):t.userAttributes;const o=((e,t)=>(e??[]).reduce(((e,r)=>{const n=t[r.attrSlug];return{...e,[r.fieldName]:n}}),{}))(Ot(e).invitationMetadata.mapping,n),a=await gn("zephr/public/products/v1/shares/invitations/emails",{method:"POST",bodyObject:{product_id:t.paymentOption.productId,email_address:t.invitationEmail,base_url:Ot(e).invitationMetadata.url,meta_data:o}},r),i=await a.json();if(a.ok)r.updateFormState({invitationSent:!0,invitationEmail:""}),setTimeout((()=>{r.updateFormState({invitationSent:!1})}),3e3);else{const t=(s=i,403===s?.status&&s?.message?.includes("you do not have access to")?tt.INVITATION_FAILED_NO_PRODUCT_ACCESS:400===s?.status&&s?.message?.includes("Invalid recipient email")?tt.INVITATION_FAILED_INVALID_EMAIL:400===s?.status&&s?.message?.includes("reached the configured limit")?tt.INVITATION_FAILED_LIMIT_REACHED:409===s?.status?tt.INVITATION_FAILED_DUPLICATE_EMAIL:tt.INVITATION_FAILED_UNKNOWN);it(e,"zephr_form_error",{error:tt[t]}),r.updateFormState({invitationSent:!1,serverErrors:[t]})}var s},Xs={matches:e=>e.type===Fe,create:(e,t,r,n)=>t.paymentOption?.product_sharing_limit>0?{component:Qs,props:{formKey:e.uniqueKey,title:n.title,description:n.description,label:n.label,btnText:n.btnText,linkSentText:n.linkSentText,onSendInviteClick:()=>{it(e,"zephr_form_button_press",{sectionId:t.currentSection.type,buttonType:"SUBMIT"}),Zs(e,t,r)},onChange:n=>{r.updateFormState({invitationEmail:n,serverErrors:[]}),it(e,"zephr_form_input_change",{inputName:`zephr-form-invitation-email-${e.uniqueKey}`,sectionId:t.currentSection.type,field:"invitation-email"})},onFocus:()=>it(e,"zephr_form_input_focus",{inputName:`zephr-form-invitation-email-${e.uniqueKey}`,sectionId:t.currentSection.type,field:"invitation-email"}),onBlur:()=>it(e,"zephr_form_input_blur",{inputName:`zephr-form-invitation-email-${e.uniqueKey}`,sectionId:t.currentSection.type,field:"invitation-email"}),invitationEmail:t.invitationEmail,invitationSent:t.invitationSent,isBusy:t.isBusy,isPaymentForm:e.formType===vt.PAYMENT}}:{component:null,props:{}}};class ec extends pe{constructor(e){super(),ue(this,e,null,null,i,{})}}const tc={matches:e=>e.type===Ce,create:(e,t,r)=>{const n=pa(e.organisationConfiguration.paymentProvider);if(null==n.preLoaderComponent)return{component:ec,props:{}};return{component:n.preLoaderComponent(Ot(e).paymentProviderFormConfig),props:{onMountCallback:()=>n.preLoader()}}}};function rc(t){let r;return{c(){r=P("div")},m(e,n){y(e,r,n),r.innerHTML=t[0]},p(e,[t]){1&t&&(r.innerHTML=e[0])},i:e,o:e,d(e){e&&g(r)}}}function nc(e,t,r){let{html:n}=t;return e.$$set=e=>{"html"in e&&r(0,n=e.html)},[n]}class oc extends pe{constructor(e){super(),ue(this,e,nc,rc,i,{html:0})}}const ac=()=>(Math.random()+1).toString(36).substring(7),ic=ac(),sc=e=>e.dynamicOfferResult?Object.entries({tagline:e.dynamicOfferResult.tagline,...e.dynamicOfferResult.custom??{}}).reduce(((e,[t,r])=>(t&&null!=r&&(e[t]=r),e)),{}):{},cc=(e,t)=>(e.templateVariables??[]).reduce(((e,r)=>null==r.defaultValue||r.paymentOptionLevel!=t?e:{...e,[r.key]:r.defaultValue}),{}),lc=e=>{window.Zephr||(window.Zephr={}),window.Zephr.forms||(window.Zephr.forms={}),window.Zephr.forms[e.formInstanceId]=e},uc=(e,t,r,n,o,a)=>{if(!o)return{scope:{},actions:{}};try{const i=new Function("state","form","scope",o),s=(t.customComponentState??{})[r.id??"_"];return i(t.dynamicOfferResult?{...s??{},dynamicOfferResult:Ro(t.dynamicOfferResult,e,t)}:s,n,a)}catch(e){return console.error("Error evaluating pre-render script",e),{scope:{error:e},actions:{}}}},pc=(e,t,r)=>n=>{t.updateFormState({customComponentState:{...e.customComponentState??{},[r]:{...(e.customComponentState??{})[r]??{},...n??{}}}})},dc=(e,t,r,n)=>(o,a)=>{let i;if(n){const e=r.dynamicOfferResult.products.find((e=>e.id===o)),t=e?.paymentPlans.find((e=>e.planId===a));i={slug:t.planId,productId:e.id,label:e.label,currencyCode:t.charges[0].prices[0].currency}}else i=Ot(e).paymentOptions?.find((e=>e.productId===o&&e.slug===a));i?(t.updateFormState({paymentOption:i,serverErrors:[],billingAddress:{country:null,postalCode:null}}),t.completeSection()):console.warn(`No payment option exists for ${o} ${a}.`)},mc=(e,t,r,n,o)=>{const a=!!Ot(e).dynamicOffer?.id,i=(Ot(e).paymentOptions??[]).map(((e,t)=>({slug:e.slug,productId:e.productId,label:e.label,price:e.price,currencyCode:e.currencyCode,formattedPrice:Mn(e.price,e.currencyCode),index:t,...cc(o,!0),...e.templateValues??{}})));return{formId:e.id,formInstanceId:ic,paymentOptions:i,ref:`window.Zephr.forms['${ic}']`,setState:pc(t,r,n.id??"_"),getState:()=>r.getFormState(),selectPaymentOption:dc(e,r,t,a)}},fc={matches:e=>e.type===ze,create:(e,t,r,n)=>{const o=((e,t,r,n)=>{const o=(e.resolvedComponentTemplates??[]).find((e=>e.id===n.templateId));if(!o)return console.warn(`No component template found for id '${n.templateId}'`),"";const a=mc(e,t,r,n,o),i={...cc(o,!1),...n.templateValues??{},...sc(t),zephrForm:a,zephrOutcomeId:e.outcomeId,zephrRuleId:e.ruleId},s=uc(e,t,n,a,o.preRenderScript,i),c={...i,...s.scope??{}};a.actions=s.actions??{},lc(a);try{return ao.render(`\n ${o.css?`

      We've sent a code to the below email. "},"order":1},{"type":"email_address","id":"04f75cfe-98f5-4ab0-9e08-f2d18e7b1a17","config":{"label":"<<>>","editText":"<<>>","disabled":true},"order":2},{"type":"text","id":"061db881-5446-46b9-bf8b-1e0bb5327b17","config":{"text":"<<>>"},"order":3},{"type":"otp_code","id":"6be4e1da-eb31-455e-a37e-271b3e5d1238","config":{"label":"<<>>","placeholder":"<<>>","resendText":"<<>>","message":"<<>>"},"order":4},{"type":"divider","id":"527b7735-0df7-47a6-984f-1a22e1e1ff89","config":{"text":"Or","showLine":true,"show":true},"order":5},{"type":"button","id":"56bea640-e18d-4ca4-96c4-715c32cd4cc1","config":{"isSubmit":false,"isLogin":true,"text":"<<>>"},"order":6}]},{"type":"reset_password","order":7,"label":"Reset Password","elements":[{"type":"text","order":0,"id":"e04ab7b1-276a-4634-ba70-f01f7b05e8bf","config":{"text":"

      Reset Password","centerText":true},"hidden":false},{"type":"email_address","id":"2169d3c3-8726-4ef9-b024-2cabe7a263a3","config":{"label":"<<>>","editText":"<<>>","disabled":true},"order":1,"hidden":false},{"type":"password","id":"3b71bbed-1939-4102-b13d-5296b76ac602","config":{"password":"<<>>","show":"<<>>","hide":"<<>>","passValidatorEnabled":true,"placeholder":"<<>>","confirm":"<<>>","confirmPlaceholder":"<<>>","passwordsMatchIndicatorEnabled":false,"minLengthValidation":"<<>>","uppercaseValidation":"<<>>","numberValidation":"<<>>","symbolValidation":"<<>>","passwordsMatchText":"<<>>"},"order":2,"hidden":false},{"type":"button","id":"cabb1a51-015a-405e-ba9a-b49dcb21083b","config":{"text":"<<>>"},"order":3,"hidden":false}]}]},{"type":"success","sections":[{"type":"success","order":1,"label":"Successful Registration","elements":[{"type":"text","id":"72d042b3-2fe1-45f2-a28d-d30b573b9d8f","config":{"text":"
      \n
      \n
      \n
       
      \n

      Registration Success

      \n
      \n

      Congratulations! Your registration was successful. Welcome to our Community!

      \n
      \n
      "},"order":0},{"type":"button","id":"38065280-aa99-4fb1-8450-936fe78eeef0","config":{"text":"<<>>"},"order":1}]},{"type":"email_verified","order":2,"label":"Email Verification","elements":[{"type":"text","id":"25865225-d9a4-44ae-bb68-2441840e7208","config":{"text":"<<>>"}}]}]}],"timestamp":1733394421904,"id":"U-f7Vl02","outcomeId":"graph/1#2,graph/1#3,graph/1#5,graph/2#1,graph/2#2,transformation/1","ruleId":"H-side-drawer-body-2","resolvedComponentTemplates":[],"languagePack":{"entries":{"forms.billing.history.date":"Date","forms.billing.history.every":"every","forms.billing.history.period":"Period","forms.billing.history.subtotal":"Subtotal","forms.billing.history.total":"Total","forms.buttons.back-button":"Back","forms.common.account-code.label":"Have an account registration code? Enter it here","forms.common.account-code.placeholder":"e.g. ACCOUNT001","forms.common.additional-section":"Additional Section","forms.common.continue":"Continue","forms.common.current-password":"Current Password","forms.common.divider-text":"or use","forms.common.email":"Email","forms.common.email-edit":"Edit","forms.common.email-placeholder":"Your email address","forms.common.otp.code-sent-to":"A message with a code has been sent to","forms.common.otp.enter-code":"Enter the code in the box below.","forms.common.otp.forgot-password":"Forgot Password?","forms.common.otp.forgot-password-code-sent":"Code sent!","forms.common.otp.label":"Code","forms.common.otp.placeholder":"e.g. 350271","forms.common.otp.resend":"Didn't get a code?","forms.common.otp.resent":"Resent!","forms.common.password":"Password","forms.common.password-confirm":"Confirm Password","forms.common.password-confirm-placeholder":"confirm password...","forms.common.password-hide":"Hide","forms.common.password-placeholder":"password...","forms.common.password-show":"Show","forms.common.password-validator.length":"Must include at least 8 characters","forms.common.password-validator.match":"Passwords match","forms.common.password-validator.number":"Must include a number character","forms.common.password-validator.symbol":"Must include a supported symbol","forms.common.password-validator.uppercase":"Must include an uppercase letter","forms.common.social-sign-in-label":"Continue with","forms.common.submit":"Submit","forms.common.update":"Update","forms.complete-registration-form.default-intro-text":"Set up your password","forms.complete-registration-form.default-success-message":"Thank you for updating your profile.","forms.contact-form.default-intro-text-1":"Stay in touch","forms.contact-form.default-intro-text-2":"Subscribe to our newsletter today","forms.contact-form.default-success-message":"Thank you for submitting your contact information.","forms.data-capture-form.default-intro-text":"Tell us more about you!","forms.data-capture-form.default-success-message":"Thank you for updating your profile.","forms.devices.current-device-label":"Current Device","forms.devices.login-time-label":"Login Time","forms.devices.no-session-message":"No Device sessions recorded","forms.devices.sign-out-button":"Sign Out","forms.devices.sign-out-of-other-devices-button":"Sign Out of Other Devices","forms.devices.your-devices-label":"Your Devices","forms.errors.company-account-not-found":"Account not found","forms.errors.contact-creation-disabled":"This operation is not possible at the moment, please try again later","forms.errors.email-domain-blocked":"Please use a different email address, this domain is not supported","forms.errors.email-taken":"This email address is already registered. Please log in to continue","forms.errors.email-verification-required":"Email verification is required","forms.errors.invitation-failed-duplicate-email":"An invite has already been created for this email","forms.errors.invitation-failed-invalid-email":"Invalid email address","forms.errors.invitation-failed-limit-reached":"You have reached the sharing limit for this product","forms.errors.invitation-failed-no-product-access":"You do not currently have access to this product","forms.errors.login-failed":"The email address or password you entered is incorrect","forms.errors.no-authenticated-session":"Please login to update your profile","forms.errors.otp-incorrect":"The code you entered is incorrect","forms.errors.otp-or-password-incorrect":"The password or code you entered is incorrect","forms.errors.otp-send-failed":"Unable to send a verification code. Please try again later","forms.errors.password-reset-failed":"Unable to reset your password. Please try again later","forms.errors.password-reset-link-send-failed":"Unable to send a password reset link. Please try again later","forms.errors.promo-code-expired":"Promo code expired","forms.errors.promo-code-invalid":"Invalid promo code","forms.errors.promo-code-invalid-for-payment-option":"Promo code cannot be applied to selected option","forms.errors.session-limit-reached":"You have reached the session limit. Please log out from another device to access this content","forms.errors.too-many-requests":"To gain login access, please contact your administrator","forms.errors.unknown-error":"Something went wrong. Please try again later","forms.errors.unknown-payment-error":"Something went wrong when processing your payment. Please try again later","forms.errors.user-attribute-invalid":"Invalid user attribute","forms.errors.user-not-found":"User not found","forms.list-subscriptions.billing-history-link":"Billing history","forms.list-subscriptions.billing-history-text":"To see previous invoices visit","forms.list-subscriptions.cancel-subscription-text":"Cancel subscription","forms.list-subscriptions.change-default-payment-method-button":"Change Default Payment Method","forms.list-subscriptions.change-payment-method-button":"Change Payment Method","forms.list-subscriptions.change-payment-success-text":"Payment successfully changed","forms.list-subscriptions.change-subscription-text":"Change subscription","forms.list-subscriptions.next-payment-date":"Next payment date","forms.list-subscriptions.no-subscriptions-message":"You don't have any subscriptions","forms.list-subscriptions.subscription-rate-label":"Subscription rate","forms.payment.account-verification-section":"Account Verification","forms.payment.invitation-button":"Send Invite","forms.payment.invitation-description":"You can invite people by entering their email","forms.payment.invitation-label":"Email Address","forms.payment.invitation-link-sent":"Invite sent!","forms.payment.invitation-title":"Invite people to your sharable plan","forms.payment.login":"Login","forms.payment.login-link":"Login","forms.payment.login-link-message":"Already a registered user?","forms.payment.password-setup-text":"Create an account","forms.payment.payment-button":"Confirm and process payment","forms.payment.payment-option-select-button":"Select Plan","forms.payment.payment-section":"Payment Details","forms.payment.payment-summary-disclaimer":"Today's payment may vary","forms.payment.payment-summary-prorate":"DUE TODAY","forms.payment.payment-summary-tax":"Tax","forms.payment.payment-summary-title":"Subscription","forms.payment.payment-summary-total":"TOTAL","forms.payment.plan-select-section":"Plan Select","forms.payment.promo-code-button":"Verify","forms.payment.promo-code-placeholder":"Promo code","forms.payment.promo-code-text":"Have a promo code?","forms.payment.reset-password-text":"Reset your password","forms.payment.success-button":"Continue Reading","forms.payment.success-message":"Payment processed successfully","forms.registration.account-verification-section":"Account Verification","forms.registration.default-intro-text":"You've reached the limit of free articles","forms.registration.email-verification-required-message":"A link has been sent to you. Please check your Email.","forms.registration.login":"Login","forms.registration.login-link-text":"A login link has been sent to","forms.registration.password-setup-section":"Password Setup","forms.registration.password-setup-text":"Create an account","forms.registration.resend-login-link":"Didn't get a link?","forms.registration.resend-login-link-resent":"Resent!","forms.registration.reset":"Reset!","forms.registration.reset-password-text":"Reset your password","forms.registration.success-button":"Continue Reading","forms.registration.success-message":"You have signed up successfully!","forms.subscription-cancel.back-button":"Back","forms.subscription-cancel.cancel-button":"Cancel Subscription","forms.subscription-cancel.confirm-text":"Are you sure you want to cancel?","forms.subscription-cancel.intro-text":"Select a subscription to cancel","forms.subscription-cancel.offer-text":"

      We are sorry to see you go

      Here is a special offer just for you.","forms.subscription-cancel.payment-option-select-button":"Accept Offer","forms.subscription-cancel.reason-text":"

      We would like to hear your feedback

      We'd appreciate it if you could to take a moment to let us know why you are cancelling.","forms.subscription-cancel.success-text":"Your subscription has been cancelled","forms.subscription-select.amount-label":"Amount:","forms.subscription-select.intro-text":"Select a subscription to upgrade","forms.subscription-select.next-billing-date-label":"Next billing date:","forms.subscription-select.no-change-plan-mapping-message":"No upgrade options are available for this subscription","forms.subscription-select.no-subscriptions-message":"No subscriptions available","forms.subscription-select.select-button":"Select","forms.update-profile.update-email-title":"

      Update Email Address

      ","forms.update-profile.update-password-title":"

      Update Password

      ","forms.update-profile.your-profile":"Your Profile","forms.update-profile.your-profile-title":"

      Your Profile

      ","hidden.example-key":"Hello world","hidden.form-preview.locale":"en-US","hidden.forms-preview.example-payment-option-description":"Example Payment Option","hidden.forms-preview.example-payment-option-label":"Example Offer","interstitial-page.password-reset.new-password":"New password:","interstitial-page.password-reset.password-mismatch-error":"You did not enter the same password twice","interstitial-page.password-reset.repeat-password":"Repeat password:","interstitial-page.password-reset.reset-button":"Reset","interstitial-page.password-reset.return-home-link":"Go back to the site","interstitial-page.password-reset.success-message":"Your password has been reset successfully!","interstitial-page.password-reset.title":"Change your password","interstitial-page.password-reset.unknown-error":"Something went wrong! Please try again later.","interstitial-page.passwordless-login.title":"Welcome","interstitial-page.update-email.enter-password":"Please enter your current password to complete the email update request.","interstitial-page.update-email.incorrect-password-error":"Incorrect password.","interstitial-page.update-email.password":"Password:","interstitial-page.update-email.return-home-link":"Go back to the site","interstitial-page.update-email.submit-button":"Update","interstitial-page.update-email.title":"Changing your email","interstitial-page.update-email.unknown-error":"Something went wrong! Please try again later.","interstitial-page.update-email-passwordless.message":"Please check the inbox of your new email for further instructions.","interstitial-page.update-email-passwordless.title":"Changing your email","interstitial-page.update-email-passwordless-success.message":"You have successfully changed your email address.","interstitial-page.update-email-passwordless-success.title":"Changing your email","interstitial-page.update-email-success.message":"Your email has been updated successfully!","pages.account-management.account-select-dropdown":"Select account","pages.account-management.delete-link":"Delete","pages.account-management.delete-modal-body":"Are you sure you want to delete this user?","pages.account-management.delete-modal-button":"Yes Delete","pages.account-management.delete-modal-title":"You are about to delete user","pages.account-management.delete-success-modal-body":"has been successfully deleted.","pages.account-management.delete-success-modal-title":"User Deleted","pages.account-management.errors.already-exists":"already exists","pages.account-management.errors.delete-fail":"Failed to delete","pages.account-management.errors.invite-fail":"Could not invite user","pages.account-management.invite-button-text":"Invite a User","pages.account-management.invite-modal-cancel-button":"Cancel","pages.account-management.invite-modal-confirm-button":"Invite User","pages.account-management.invite-modal-email-label":"Email Address","pages.account-management.invite-modal-email-placeholder":"Enter Email Address","pages.account-management.invite-modal-title":"Invite User","pages.account-management.invite-success-modal-body":"An invite has been sent to","pages.account-management.no-users":"No users found","pages.account-management.owner":"Owner","pages.account-management.search-button-text":"Search","pages.account-management.search-placeholder-text":"Search for a user","pages.account-management.success-modal-button":"Close","pages.account-management.title":"Manage Your Users","pages.cancel.back-to-subscriptions":"Back to Subscriptions","pages.cancel.cancel-subscription":"Cancel Subscription","pages.cancel.cancelled":"Cancelled","pages.cancel.continue-subscription":"Continue Subscription","pages.cancel.days-left":"DAYS LEFT:","pages.cancel.plan-frequency":"Frequency","pages.cancel.plan-name":"Name","pages.cancel.plan-next-billing":"Next Billing","pages.cancel.plan-period":"Period","pages.cancel.plan-price":"Price","pages.cancel.plan-type":"Type","pages.cancel.select-plans":"Select the plans you wish to cancel","pages.cancel.status-active":"Active","pages.cancel.status-cancelled":"Cancelled","pages.cancel.status-draft":"Draft","pages.cancel.status-expired":"Expired","pages.cancel.status-pending-acceptance":"Pending Acceptance","pages.cancel.status-pending-activation":"Pending Activation","pages.cancel.status-suspended":"Suspended","pages.cancel.status-unknown":"Unknown","pages.cancel.subscription-ends-on":"Subscription ends on","pages.cancel.subscription-will-end-on":"Your subscription will end on","pages.cancel.success":"You've cancelled your subscription","pages.cancel.until-cancelled":"Until Cancelled","pages.common.collapsible-content-text":"See details","pages.common.confirmation-modal-cancel-button":"Cancel","pages.common.confirmation-modal-confirm-button":"Confirm","pages.common.confirmation-primary-error-message":"Something went wrong!","pages.common.confirmation-secondary-error-message":"Try again later.","pages.common.date-time-format-locale":"en-US","pages.common.input-errors-invalid-email":"Please enter a valid email","pages.common.input-errors-invalid-url":"Please enter a valid URL","pages.common.input-errors-missing-value":"Please enter a value","pages.common.loading":"Loading...","pages.common.no-access-back-link":"Go Back","pages.common.no-access-body":"Sorry, you are not allowed to access this page. Click the button to go back.","pages.common.no-access-title":"No access.","pages.common.password-hide":"Hide","pages.common.password-show":"Show","pages.login-reg.already-registered-sign-in":"Already registered? Sign in","pages.login-reg.cancel":"Cancel","pages.login-reg.complete-registration-button":"Complete Registration","pages.login-reg.continue-with-apple":"Continue with Apple","pages.login-reg.continue-with-facebook":"Continue with Facebook","pages.login-reg.continue-with-google":"Continue with Google","pages.login-reg.continue-with-linkedin":"Continue with Linkedin","pages.login-reg.continue-with-microsoft":"Continue with Microsoft","pages.login-reg.continue-with-open-id-connect":"Continue with Open ID Connect","pages.login-reg.continue-with-twitter":"Continue with X","pages.login-reg.create-account":"Create an account","pages.login-reg.email-me-login-link":"Email me login link","pages.login-reg.email-me-reset-code":"Email me reset code","pages.login-reg.email-placeholder":"Email Address","pages.login-reg.enter-account-reg-code-here":"Enter an account registration code here","pages.login-reg.errors.contact-admin":"Please contact the administrator","pages.login-reg.errors.email-already-taken":"Email already taken","pages.login-reg.errors.email-verification-required":"Email verification is required","pages.login-reg.errors.password-incorrect":"The password you entered is incorrect","pages.login-reg.errors.password-not-strong-enough":"Password is not strong enough","pages.login-reg.errors.seat-capacity":"Your registration request couldn't be completed due to account seat capacity issue.","pages.login-reg.errors.something-went-wrong":"Something went wrong!","pages.login-reg.errors.to-gain-access-contact-admin":"To gain login access, please contact your administrator","pages.login-reg.errors.try-again-later":"Please try again later.","pages.login-reg.errors.user-not-found":"User not found","pages.login-reg.errors.username-already-taken":"Username already taken","pages.login-reg.forgotten-password":"Forgotten Password?","pages.login-reg.logging-in":"Logging in...","pages.login-reg.login-button":"Login","pages.login-reg.login-to-account":"Login to your account","pages.login-reg.or":"Or","pages.login-reg.password-placeholder":"Password","pages.login-reg.password-requirement":"Password must be a minimum of 8 characters and contain uppercase and lowercase, numbers and at least 1 special character.","pages.login-reg.register-button":"Register","pages.login-reg.register-for-account":"Register for an account","pages.login-reg.reset-your-password":"Reset your password","pages.login-reg.wait":"Please wait...","pages.pref-center.devices.current-device":"Current Device","pages.pref-center.devices.error-loading":"There was an error getting the device list","pages.pref-center.devices.sign-in-time":"Login date and time:","pages.pref-center.devices.sign-out":"Sign out","pages.pref-center.devices.sign-out-all":"Sign out of all other devices","pages.pref-center.devices.sign-out-all-success":"All other devices are now signed out","pages.pref-center.devices.sign-out-fail":"Signing out failed","pages.pref-center.devices.sign-out-success":"is now signed out.","pages.pref-center.devices.title":"Your Devices","pages.pref-center.devices.unknown-device":"Unknown","pages.pref-center.email-update-passwordless-message":"A link has been sent to your current email. Please check your inbox.","pages.pref-center.email-update-passwordless-title":"Check Your Inbox","pages.pref-center.general-error":"Something went wrong - please try again later","pages.pref-center.profile.attributes-select-list-placeholder":"Select One","pages.pref-center.profile.attributes-update-save":"Save","pages.pref-center.profile.attributes-update-title":"Your profile","pages.pref-center.profile.email":"Email Address","pages.pref-center.profile.email-update-email-label":"New Email","pages.pref-center.profile.email-update-email-placeholder":"Enter Email","pages.pref-center.profile.email-update-password-label":"Your Password","pages.pref-center.profile.email-update-password-placeholder":"Enter password","pages.pref-center.profile.email-update-save":"Save","pages.pref-center.profile.email-update-step-2-title":"Update Email Address","pages.pref-center.profile.email-update-title":"Update Email Address","pages.pref-center.profile.errors.change-email-error":"Sorry but your email address has not been changed. Please try again.","pages.pref-center.profile.errors.change-password-error":"Sorry but we were unable to reset your password. Please try again.","pages.pref-center.profile.errors.email-already-taken-error":"This email address is already taken.","pages.pref-center.profile.errors.incorrect-code":"Entered code is incorrect","pages.pref-center.profile.errors.incorrect-password":"The password you entered is incorrect","pages.pref-center.profile.errors.password-validation-error":"Password is not strong enough","pages.pref-center.profile.errors.unsuccessful":"Unsuccessful","pages.pref-center.profile.errors.update-profile-error":"Sorry but we were unable to update your profile. Please try again.","pages.pref-center.profile.password":"Password","pages.pref-center.profile.password-update-current-password-label":"Current Password","pages.pref-center.profile.password-update-current-password-placeholder":"Enter your password","pages.pref-center.profile.password-update-new-password-label":"New Password","pages.pref-center.profile.password-update-new-password-placeholder":"Enter a password","pages.pref-center.profile.password-update-save":"Continue","pages.pref-center.profile.password-update-step-2-title":"Reset your password","pages.pref-center.profile.password-update-title":"Update Password","pages.pref-center.profile.title":"Your Profile","pages.pref-center.profile.update":"Update","pages.pref-center.profile.update-email-successful":"Your email address has been changed.","pages.pref-center.profile.update-password-successful":"Your password has been reset.","pages.pref-center.profile.update-profile-successful":"Your profile has been updated.","pages.pref-center.profile.update-return-text":"Return to Personal Information","pages.pref-center.profile.update-step-2-code-label":"Code","pages.pref-center.profile.update-step-2-code-placeholder":"e.g. 350271","pages.pref-center.profile.update-step-2-enter-code":"Enter the code in the box below.","pages.pref-center.profile.update-step-2-message-sent":"A message with a code has been sent to email address:","pages.pref-center.profile.update-step-2-new-code-modal-body":"Would you like to send a new verification code to","pages.pref-center.profile.update-step-2-new-code-modal-button":"Resend Code","pages.pref-center.profile.update-step-2-new-code-modal-title":"Get a new verification code","pages.pref-center.profile.update-step-2-resend-code-link-text":"Didn't get a code?","pages.pref-center.profile.update-step-2-save":"Submit","pages.pref-center.profile.update-successful":"Success","pages.pref-center.share-product.modal-body":"You can invite people by entering their email. Available seats:","pages.pref-center.share-product.modal-email-label":"Email Address","pages.pref-center.share-product.modal-email-placeholder":"Enter Email Address","pages.pref-center.share-product.modal-send-button-text":"Send Invite","pages.pref-center.share-product.modal-title":"Invite people to your sharable subscription","pages.pref-center.shared-members.done-button":"Done","pages.pref-center.shared-members.invite-button-text":"Invite new members","pages.pref-center.shared-members.manage-shared-members-title":"Manage shared members","pages.pref-center.shared-members.no-members":"This product is not currently shared with anyone.","pages.pref-center.shared-members.seats-used":"seats used","pages.pref-center.shared-members.status-active":"Active","pages.pref-center.shared-members.status-inactive":"Inactive","pages.pref-center.shared-members.status-pending":"Pending","pages.pref-center.shared-members.table-header-date":"Date Shared","pages.pref-center.shared-members.table-header-email":"Email Address","pages.pref-center.shared-members.table-header-status":"Status","pages.pref-center.shared-members.table-remove-member":"Remove member","pages.pref-center.shared-members.title":"Shared Members","pages.pref-center.shared-products.errors.existing-invite-error":"An invite has already been created for this email","pages.pref-center.shared-products.errors.invalid-email-error":"Invalid email address","pages.pref-center.shared-products.errors.limit-reached-error":"You have reached the sharing limit for this product","pages.pref-center.shared-products.errors.no-access-error":"You do not currently have access to this product","pages.pref-center.shared-products.leave-product-body":"Are you sure you want to leave this shared product?","pages.pref-center.shared-products.leave-product-title":"Leave Product","pages.pref-center.shared-products.no-subscriptions":"You do not currently have any products shared with you.","pages.pref-center.shared-products.remove-invite-body":"Are you sure you want to remove this pending invite from your subscription?","pages.pref-center.shared-products.remove-invite-title":"Remove Invite","pages.pref-center.shared-products.remove-member-body":"Are you sure you want to remove this user from your subscription?","pages.pref-center.shared-products.remove-member-title":"Remove Member","pages.pref-center.shared-products.remove-subscription":"Leave shared subscription","pages.pref-center.shared-products.shared-by":"Shared by","pages.pref-center.subscriptions.billing-history-link":"Billing History.","pages.pref-center.subscriptions.billing-history-table-canceled":"Subscription canceled","pages.pref-center.subscriptions.billing-history-table-header-date":"Date","pages.pref-center.subscriptions.billing-history-table-header-period":"Subscription Period","pages.pref-center.subscriptions.billing-history-table-header-subtotal":"Subtotal","pages.pref-center.subscriptions.billing-history-table-header-total":"Total","pages.pref-center.subscriptions.billing-history-title":"Billing History","pages.pref-center.subscriptions.cancel-subscription-confirm-modal-body":"Your subscription has been canceled.","pages.pref-center.subscriptions.cancel-subscription-confirm-modal-button":"Close","pages.pref-center.subscriptions.cancel-subscription-confirm-modal-title":"Subscription canceled","pages.pref-center.subscriptions.cancel-subscription-modal-body":"Are you sure you want to cancel the subscription","pages.pref-center.subscriptions.cancel-subscription-modal-button":"Cancel Subscription","pages.pref-center.subscriptions.cancel-subscription-modal-title":"Cancel your subscription","pages.pref-center.subscriptions.cancel-subscription-title":"Cancel your subscription","pages.pref-center.subscriptions.canceled-date":"Canceled on","pages.pref-center.subscriptions.change-multi-subscription-screen-active-subscription":"active","pages.pref-center.subscriptions.change-multi-subscription-screen-best-value":"best value","pages.pref-center.subscriptions.change-multi-subscription-screen-cancel-subscriptions-confirm-modal-body":"Your subscriptions have been canceled.","pages.pref-center.subscriptions.change-multi-subscription-screen-cancel-subscriptions-confirm-modal-title":"Subscriptions canceled","pages.pref-center.subscriptions.change-multi-subscription-screen-cancel-subscriptions-modal-title":"Cancel your subscriptions","pages.pref-center.subscriptions.change-multi-subscription-screen-cancel-subscriptions-text":"Cancel Subscriptions","pages.pref-center.subscriptions.change-multi-subscription-screen-current-subscription":"current subscription","pages.pref-center.subscriptions.change-multi-subscription-screen-current-subscriptions-title":"Current Subscriptions","pages.pref-center.subscriptions.change-multi-subscription-screen-edit-subscription-text":"Edit","pages.pref-center.subscriptions.change-multi-subscription-screen-new-subscriptions-title":"New Subscriptions","pages.pref-center.subscriptions.change-multi-subscription-screen-review-button":"Review Changes","pages.pref-center.subscriptions.change-multi-subscription-screen-title":"Manage Subscriptions","pages.pref-center.subscriptions.change-payment-method-description":"Adjust how you pay for the product.","pages.pref-center.subscriptions.change-payment-method-screen-description":"This credit card will be used as the payment method for the following subscription:","pages.pref-center.subscriptions.change-payment-method-screen-save-button":"Save","pages.pref-center.subscriptions.change-payment-method-screen-title":"Enter Payment Detail","pages.pref-center.subscriptions.change-payment-method-title":"Change payment method","pages.pref-center.subscriptions.change-single-subscription-screen-add-new":"Add a new card","pages.pref-center.subscriptions.change-single-subscription-screen-best-value":"Best Value","pages.pref-center.subscriptions.change-single-subscription-screen-confirm-button":"CONFIRM & PROCESS PAYMENT","pages.pref-center.subscriptions.change-single-subscription-screen-current-subscription-title":"Current Subscription","pages.pref-center.subscriptions.change-single-subscription-screen-existing-payment":"Use existing payment method","pages.pref-center.subscriptions.change-single-subscription-screen-new-subscription-description":"Change your current subscription for another.","pages.pref-center.subscriptions.change-single-subscription-screen-new-subscription-title":"Change Subscription","pages.pref-center.subscriptions.change-single-subscription-screen-payment-method-selection":"Payment Method","pages.pref-center.subscriptions.change-single-subscription-screen-review-button":"Review Changes","pages.pref-center.subscriptions.change-single-subscription-screen-select-plan":"Select Plan","pages.pref-center.subscriptions.change-single-subscription-screen-selected-plan":"Selected Plan","pages.pref-center.subscriptions.change-single-subscription-screen-title":"Manage Subscription","pages.pref-center.subscriptions.change-single-subscription-title":"Change your subscription","pages.pref-center.subscriptions.change-subscription-description":"Adjust what products you have access to.","pages.pref-center.subscriptions.change-subscriptions-title":"Change your subscriptions","pages.pref-center.subscriptions.invoices-text":"To see previous invoices visit","pages.pref-center.subscriptions.manage-single-subscription-title":"Manage Subscription","pages.pref-center.subscriptions.manage-subscriptions-title":"Manage Subscriptions","pages.pref-center.subscriptions.next-payment-title":"Next payment date","pages.pref-center.subscriptions.no-subscriptions":"You don't have any subscriptions.","pages.pref-center.subscriptions.one-off-expiry-date":"Expiry Date","pages.pref-center.subscriptions.one-off-price-title":"Price","pages.pref-center.subscriptions.payment-information-title":"Payment Information","pages.pref-center.subscriptions.payment-processing-text":"(payment processing)","pages.pref-center.subscriptions.product-canceled":"Product canceled","pages.pref-center.subscriptions.return-to-subscription-text":"Return to Subscription","pages.pref-center.subscriptions.return-to-subscriptions-text":"Return to Subscriptions","pages.pref-center.subscriptions.subscription-rate-title":"Subscription rate","pages.pref-center.subscriptions.update-success":"Update success"}}},"formTypeConfig":{"allowAccountRegistrationCodes":false,"usePasswordlessAuthentication":false,"twoFactorEmailAuthentication":true,"usePassword":true,"useVerificationCodes":false,"showSuccessOnFormCompletion":true,"autoApplyAttributes":{"daily":"true","partner-offers":"true","reader-offers":"true","special-editions":"true","webcam":"true","weekender":"true","worm":"true","registration-status":"complete"},"version":1,"requestCountry":"US","requestState":"Missouri","requestCity":"St Louis","requestZipCode":"63101"},"organisationConfig":{"schemaFields":[{"slug":"account-balance","visibility":"PUBLIC","label":"Account Balance","required":false,"public-description":"","validation-expression":null,"input-type":"hidden","select-options":null,"range-start":null,"range-end":null,"range-step":null},{"slug":"address-line-1","visibility":"PUBLIC","label":"Address (line 1)","required":false,"public-description":"","validation-expression":null,"input-type":"text","select-options":null,"range-start":null,"range-end":null,"range-step":null},{"slug":"address-line-2","visibility":"PUBLIC","label":"Address (line 2)","required":false,"public-description":"","validation-expression":null,"input-type":"text","select-options":null,"range-start":0,"range-end":100,"range-step":5},{"slug":"auto-renew","visibility":"PUBLIC","label":"Auto renew","required":false,"public-description":"","validation-expression":null,"input-type":"checkbox","select-options":null,"range-start":null,"range-end":null,"range-step":null},{"slug":"city","visibility":"PUBLIC","label":"City","required":false,"public-description":"","validation-expression":null,"input-type":"text","select-options":null,"range-start":null,"range-end":null,"range-step":null},{"slug":"concession-card-expiry","visibility":"PUBLIC","label":"Concession Card Expiry","required":false,"public-description":"","validation-expression":null,"input-type":"date","select-options":null,"range-start":null,"range-end":null,"range-step":null},{"slug":"concession-card-number","visibility":"PUBLIC","label":"Concession Card Number","required":false,"public-description":"","validation-expression":null,"input-type":"text","select-options":null,"range-start":null,"range-end":null,"range-step":null},{"slug":"concession-card-type","visibility":"PUBLIC","label":"Concession Card Type","required":false,"public-description":"","validation-expression":null,"input-type":"select","select-options":[{"label":"Seniors Card","value":"seniors_card","default":false},{"label":"Pension Card","value":"pension_card","default":false},{"label":"Veterans Card","value":"veterans_card","default":false},{"label":"Health Care Card","value":"health_care_card","default":false},{"label":"Student Card","value":"student_card","default":false},{"label":"Carer Card","value":"carer_card","default":false},{"label":"Disability Support Card","value":"disability_support_card","default":false},{"label":"Asylum Seeker Status","value":"asylum_seeker_card","default":false}],"range-start":null,"range-end":null,"range-step":null},{"slug":"credit-card-expiry","visibility":"PUBLIC","label":"Credit card expiry","required":false,"public-description":"","validation-expression":null,"input-type":"date","select-options":null,"range-start":0,"range-end":100,"range-step":5},{"slug":"credit-card-identifier","visibility":"PUBLIC","label":"Credit card identifier","required":false,"public-description":"","validation-expression":null,"input-type":"number","select-options":null,"range-start":0,"range-end":100,"range-step":5},{"slug":"daily","visibility":"PUBLIC","label":"Daily","required":false,"public-description":"Lunchtime delivery of deeply independent journalism; the insights, the analysis, the investigations","validation-expression":null,"input-type":"checkbox","select-options":null,"range-start":0,"range-end":100,"range-step":5},{"slug":"display-name","visibility":"PUBLIC","label":"Display name","required":false,"public-description":"","validation-expression":null,"input-type":"text","select-options":null,"range-start":0,"range-end":100,"range-step":5},{"slug":"email_status","visibility":"PUBLIC","label":"Email_Status","required":false,"public-description":"","validation-expression":null,"input-type":"hidden","select-options":null,"range-start":null,"range-end":null,"range-step":null},{"slug":"first-name","visibility":"PUBLIC","label":"First name","required":false,"public-description":"","validation-expression":null,"input-type":"text","select-options":null,"range-start":null,"range-end":null,"range-step":null},{"slug":"groupname","visibility":"PUBLIC","label":"groupname","required":false,"public-description":"","validation-expression":null,"input-type":"hidden","select-options":null,"range-start":null,"range-end":null,"range-step":null},{"slug":"groupstatus","visibility":"PUBLIC","label":"groupstatus","required":false,"public-description":"","validation-expression":null,"input-type":"hidden","select-options":null,"range-start":null,"range-end":null,"range-step":null},{"slug":"imported","visibility":"PUBLIC","label":"imported","required":false,"public-description":"","validation-expression":null,"input-type":"checkbox","select-options":null,"range-start":null,"range-end":null,"range-step":null},{"slug":"job-title","visibility":"PUBLIC","label":"Job Title","required":false,"public-description":"","validation-expression":null,"input-type":"text","select-options":null,"range-start":null,"range-end":null,"range-step":null},{"slug":"last-name","visibility":"PUBLIC","label":"Last name","required":false,"public-description":"","validation-expression":null,"input-type":"text","select-options":null,"range-start":null,"range-end":null,"range-step":null},{"slug":"mailchimp-id","visibility":"PUBLIC","label":"Mailchimp ID","required":false,"public-description":"","validation-expression":null,"input-type":"hidden","select-options":null,"range-start":null,"range-end":null,"range-step":null},{"slug":"partner-offers","visibility":"PUBLIC","label":"Partner offers","required":false,"public-description":"Crikey partnership content, delivered intermittently","validation-expression":null,"input-type":"checkbox","select-options":null,"range-start":0,"range-end":100,"range-step":5},{"slug":"phone-number","visibility":"PUBLIC","label":"Phone number","required":false,"public-description":"","validation-expression":null,"input-type":"tel","select-options":null,"range-start":null,"range-end":null,"range-step":null},{"slug":"post-code","visibility":"PUBLIC","label":"Post code","required":false,"public-description":"","validation-expression":null,"input-type":"number","select-options":null,"range-start":null,"range-end":null,"range-step":null},{"slug":"reader-offers","visibility":"PUBLIC","label":"Reader offers","required":false,"public-description":"Exclusives and giveaways from Crikey, delivered intermittently","validation-expression":null,"input-type":"checkbox","select-options":null,"range-start":0,"range-end":100,"range-step":5},{"slug":"registration-ip","visibility":"PUBLIC","label":"Registration IP","required":false,"public-description":"","validation-expression":null,"input-type":"hidden","select-options":null,"range-start":null,"range-end":null,"range-step":null},{"slug":"registration-status","visibility":"PUBLIC","label":"Registration Status","required":false,"public-description":"","validation-expression":null,"input-type":"hidden","select-options":null,"range-start":null,"range-end":null,"range-step":null},{"slug":"registration-timestamp","visibility":"PUBLIC","label":"Registration Timestamp","required":false,"public-description":"","validation-expression":null,"input-type":"hidden","select-options":null,"range-start":0,"range-end":100,"range-step":5},{"slug":"sf-crm-id","visibility":"PUBLIC","label":"SF CRM ID","required":false,"public-description":"","validation-expression":null,"input-type":"text","select-options":null,"range-start":null,"range-end":null,"range-step":null},{"slug":"special-editions","visibility":"PUBLIC","label":"Special Editions","required":false,"public-description":"Reserved for deeper dives and breaking news, delivered intermittently","validation-expression":null,"input-type":"checkbox","select-options":null,"range-start":0,"range-end":100,"range-step":5},{"slug":"state","visibility":"PUBLIC","label":"State","required":false,"public-description":"","validation-expression":null,"input-type":"select","select-options":[{"label":"ACT","value":"ACT","default":false},{"label":"NSW","value":"NSW","default":false},{"label":"NT","value":"NT","default":false},{"label":"QLD","value":"QLD","default":false},{"label":"SA","value":"SA","default":false},{"label":"TAS","value":"TAS","default":false},{"label":"VIC","value":"VIC","default":false},{"label":"WA","value":"WA","default":false},{"label":"Other - outside of Australia","value":"Other - outside of Australia","default":false}],"range-start":null,"range-end":null,"range-step":null},{"slug":"stripe_event_ts","visibility":"PUBLIC","label":"stripe_event_ts","required":false,"public-description":"","validation-expression":null,"input-type":"hidden","select-options":null,"range-start":null,"range-end":null,"range-step":null},{"slug":"stripe_user_ref","visibility":"PUBLIC","label":"stripe_user_ref","required":false,"public-description":"","validation-expression":null,"input-type":"hidden","select-options":null,"range-start":null,"range-end":null,"range-step":null},{"slug":"stripestatus","visibility":"PUBLIC","label":"stripestatus","required":false,"public-description":"","validation-expression":null,"input-type":"hidden","select-options":null,"range-start":null,"range-end":null,"range-step":null},{"slug":"subcancellation","visibility":"PUBLIC","label":"subcancellation","required":false,"public-description":"","validation-expression":null,"input-type":"hidden","select-options":null,"range-start":null,"range-end":null,"range-step":null},{"slug":"subcost","visibility":"PUBLIC","label":"subcost","required":false,"public-description":"","validation-expression":null,"input-type":"hidden","select-options":null,"range-start":null,"range-end":null,"range-step":null},{"slug":"subcoupon","visibility":"PUBLIC","label":"subcoupon","required":false,"public-description":"","validation-expression":null,"input-type":"hidden","select-options":null,"range-start":null,"range-end":null,"range-step":null},{"slug":"subend","visibility":"PUBLIC","label":"subend","required":false,"public-description":"","validation-expression":null,"input-type":"hidden","select-options":null,"range-start":null,"range-end":null,"range-step":null},{"slug":"subproduct","visibility":"PUBLIC","label":"subproduct","required":false,"public-description":"","validation-expression":null,"input-type":"hidden","select-options":null,"range-start":null,"range-end":null,"range-step":null},{"slug":"substart","visibility":"PUBLIC","label":"substart","required":false,"public-description":"","validation-expression":null,"input-type":"hidden","select-options":null,"range-start":null,"range-end":null,"range-step":null},{"slug":"substatus","visibility":"PUBLIC","label":"substatus","required":false,"public-description":"","validation-expression":null,"input-type":"hidden","select-options":null,"range-start":null,"range-end":null,"range-step":null},{"slug":"webcam","visibility":"PUBLIC","label":"WebCam","required":false,"public-description":"Explore the best (and worst) of the Australian internet every other Thursday with Cam Wilson.","validation-expression":null,"input-type":"checkbox","select-options":null,"range-start":0,"range-end":100,"range-step":5},{"slug":"weekender","visibility":"PUBLIC","label":"Weekender","required":false,"public-description":"Weekender is a lazy Saturday morning read; catch up on what you missed and the best read of the week","validation-expression":null,"input-type":"checkbox","select-options":null,"range-start":0,"range-end":100,"range-step":5},{"slug":"wordpress-id","visibility":"PUBLIC","label":"WordPress ID","required":false,"public-description":"","validation-expression":null,"input-type":"text","select-options":null,"range-start":0,"range-end":100,"range-step":5},{"slug":"worm","visibility":"PUBLIC","label":"Worm","required":false,"public-description":"Wake up every weekday and know what’s happening, what matters and who’s leading the debate","validation-expression":null,"input-type":"checkbox","select-options":null,"range-start":0,"range-end":100,"range-step":5},{"slug":"zuora-id","visibility":"PUBLIC","label":"Zuora Customer Id","required":false,"public-description":"","validation-expression":null,"input-type":"text","select-options":null,"range-start":0,"range-end":100,"range-step":5}],"siteStyles":"{\"color\":{\"text\":{\"main\":\"#000000\",\"tinted\":\"#333333\"},\"background\":{\"main\":\"#FFFFFF\",\"tinted\":\"#cccccc\"},\"accent\":{\"main\":\"#ff2828\",\"tinted\":\"#f40000\"},\"action\":{\"main\":\"#ff2828\",\"tinted\":\"#f40000\"},\"warning\":{\"main\":\"#D90B00\",\"tinted\":\"#ff190d\"}},\"typography\":{\"title\":{\"font\":\"National Narrow\",\"fallbackFont\":\"sans-serif\"},\"body\":{\"font\":\"National Narrow\",\"fallbackFont\":\"sans-serif\"}},\"button\":{\"fontWeight\":\"bold\",\"fontSize\":\"18\",\"borderWidth\":\"0\",\"borderRadius\":\"4\",\"height\":\"40\"},\"input\":{\"borderColor\":\"#000000\",\"borderWidth\":\"1\",\"borderRadius\":\"4\",\"height\":\"40\"}}","twoFactorEmailAuthenticationEnabled":false,"requireEmailVerfication":false,"hideConfirmPasswordOnRegForm":false,"passwordStrengthRequirements":{"minLength":"8","requireUppercase":true,"requireNumbers":true,"requireSpecialCharacters":false},"ruleAnalyticsEnabled":true,"paymentProvider":"","braintreeSandboxEnv":true,"braintreeMobilePaymentConfig":null,"stripeMobilePaymentConfig":null,"stripeAutomaticTaxEnabled":false,"dataLayerName":"zephrDL","trackFormDataLayerEvents":false}}));

      Journalists aren’t ‘selfish’ to strike for a more audacious vision of their industry

      Despite what the likes of ex-ABC chair Ita Buttrose and The Australian’s James Madden seem to believe, striking journalists have no moral obligation to prioritise their audience over their working conditions.
      Nine Publishing journalists on strike outside their office in Sydney, July 26, 2024 (Image: AAP/Mick Tsikas)
      Nine Publishing journalists on strike outside their office in Sydney, July 26, 2024 (Image: AAP/Mick Tsikas)

      Journalism in Australia needs a new kind of audacity. Not the kind that expects workers to “toe the line”, as former ABC chair Ita Buttrose believes, champagne-toasting (and torch-bearing) for the Olympics while their livelihoods fizzle out. Nor the kind that criticises striking journalists as “selfish and entitled”, as The Australian’s James Madden quipped, for daring to fight for fairer compensation.

      To hand-wring and pearl-clutch about the strike’s timing during the Olympics is also terribly unimaginative and unkind. What’s more important: two weeks of sports coverage or the future of a profession dedicated to informing the public and holding power to account?

      It’s crucial to remember that journalists have no moral obligation to prioritise their audience over their working conditions. They have the right to protest, and protests are meant to be disruptive. The striking journalists at Nine Publishing aren’t saboteurs, however. They’re canaries in the coal mine, warning us that the air in our industry is becoming too toxic.

      The urgency of this fight becomes clear when we look at the research on the Australian journalism industry. It paints a complex picture, with precarity, overwork, diminishing independence and increasing workplace toxicity as common themes. As a journalism lecturer, I’ve witnessed this firsthand, seeing promising new journalists leave the industry after short stints, jaded by their early experiences.

      One Australian study attributes this toxicity not solely to stress itself, but also “the lack of imagination or grace of the people entrusted with managing newsrooms”. This explains why attacks on striking journalists come from both outside and inside the industry, especially from those who speak about the relationships between journalists, readers and workplaces in corporate modes.

      When we dig into the data, we see a stark gender disparity emerging. From 2014 to 2018, male journalists saw their yearly pay rise by more than $30,000; their female counterparts experienced a mere $3,000 increase. It’s no coincidence that women — including some of the best journalists working in Australia right now — are at the forefront of this strike.

      This gender gap underscores why we must rethink not only journalism’s future but also its past, including diverse voices traditionally excluded from conversations about the industry. In this context, the strike from Nine staff takes on crucial importance. Beyond better wages, the strike calls for deeper engagement with diverse communities and demands ethical, transparent use of artificial intelligence in newsrooms.

      Achieving this reimagined journalism requires journalists who can function beyond corporate expectations and who can forge new partnerships with diverse communities. In other words, journalists who see diversity and anti-racism not as buzzwords but as the lifeblood of our newsrooms and our stories.

      Regarding the call for ethics and transparency in the use of AI, we do need journalists who can envision how digital technologies enhance our ability to speak truth to power. But this also requires time, investment and support — three things that our striking colleagues are not getting enough of.

      Importantly, this struggle isn’t happening in isolation. These striking journalists have allies who are rethinking reporting, acknowledging the diverse voices it has silenced, the communities it has overlooked, and the power structures it has too often served instead of challenged. This perspective helps us recognise that journalism has always been in flux, always adapting, always fighting for its place in society. Looking to our region, we see some of these allies. Publications like Rappler in the Philippines and Project Multatuli in Indonesia are already reimagining journalism, showing us what’s possible in Australia.

      So, to those fretting over a potential gap in Olympics coverage, I say this: It’s time to stand with these striking journalists. It’s time to demand not just fair wages, but a fair shot at reinventing journalism in Australia. It’s time to be as audacious in our vision for journalism as those who seek to undermine it.

      Do you support the striking journalists at Nine? Let us know your thoughts by writing to letters@crikey.com.au. Please include your full name to be considered for publication. We reserve the right to edit for length and clarity.