PageSourceSearch

https://static.bnto.com/_nuxt/DAXjzjT0.js

js bnto.com collected 2026-10-02 15:26:20 UTC 14,360 bytes, 1 lines download raw bytes

1import{w as z,r as S,f as g,o as y,c as h,k as o,g as ee,s as $,n,t as r,a as I,b as e,e as A,$ as me,x as fe,y as te,l as be,F as D,B as q,A as K,m as W,P as oe,_ as ye,Z as ge,q as se}from"./N-K-mNOM.js";import{fM as he,r as pe,_ as re,cV as ae,az as ve,fN as Ce,o as ke,aa as P,fO as Te,f0 as le,ab as xe,u as ne}from"./C626XzFT.js";import{u as Ee}from"./DTbwzyc1.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{};t.SENTRY_RELEASE={id:"8c41826"};var m=new t.Error().stack;m&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[m]="ead22841-c538-416e-82f8-6590850bfe21",t._sentryDebugIdIdentifier="sentry-dbid-ead22841-c538-416e-82f8-6590850bfe21")}catch{}})();const Se=/^[^\s@]+@[^\s@]+\.[^\s@]+$/,_e={required:"Email is required.",invalid:"Please enter a valid email address.",notEligible:"This code is already saved to your account.",emailClaimDisabled:"This code is not valid.",emailMismatch:"Please use your account email.",rateLimit:"Too many attempts. Please try again in a minute.",network:"Something went wrong. Please try again."},Ne={NOT_ELIGIBLE:"notEligible",EMAIL_CLAIM_DISABLED:"emailClaimDisabled",EMAIL_MISMATCH:"emailMismatch"},we=t=>!t||!t.trim()?"required":Se.test(t.trim())?"":"invalid";function Me(){const t=Ee(),m=S(""),f=S(""),v=S(""),a=S(!1),C=S(0),T=g(()=>v.value||_e[f.value]||""),x=g(()=>!!f.value),k=()=>{f.value="",v.value=""};z(m,()=>{f.value&&k()});const l=(d,u)=>{f.value=d,u&&(v.value=u),C.value++};return{email:m,errorKey:f,errorText:T,hasError:x,errorNonce:C,loading:a,submitClaim:async({campaignNo:d,channel:u,requireEmail:b=!0}={})=>{if(a.value)return{ok:!1};const _=m.value.trim();if(b){const E=we(_);if(E)return l(E),{ok:!1}}k(),a.value=!0;try{const w=(await he({campaignNo:d,channel:u,email:b?_:void 0}))?.result||{};return w.result==="OK"?(b&&t.setFromClaim({email:_}),{ok:!0}):(l(Ne[w.result]||"network",w.message),{ok:!1})}catch(E){return l(E?.code===pe.BUSINESS_CODE.RATE_LIMIT?"rateLimit":"network"),{ok:!1}}finally{a.value=!1}},reset:()=>{m.value="",k(),a.value=!1}}}const Ae={xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",fill:"none"};function Ie(t,m){return y(),h("svg",Ae,[...m[0]||(m[0]=[o("path",{fill:"#292929","fill-rule":"evenodd",d:"M10.293 3.293a1 1 0 0 1 1.414 0l6 6a1 1 0 0 1 0 1.414l-6 6a1 1 0 0 1-1.414-1.414L14.586 11H3a1 1 0 1 1 0-2h11.586l-4.293-4.293a1 1 0 0 1 0-1.414","clip-rule":"evenodd"},null,-1)])])}const L={render:Ie},Oe=["inert"],$e=["disabled"],Le={class:"claim-cta__text"},Re=["inert"],Be={class:"claim-email"},De={class:"claim-email__field"},Pe=["value","aria-invalid","disabled","onKeydown"],He=["disabled"],Ue=["disabled"],Ve={key:2,class:"claim-email__error",role:"alert"},Fe=["inert"],qe={class:"claim-cta__text"},Ke=380,We={__name:"ModuleWelcomeOfferClaimCta",props:{state:{type:String,default:"front"},layout:{type:String,default:"banner"},triggerText:{type:String,default:"Claim offer"},subscribeText:{type:String,default:"Subscribe now"},ctaStyle:{type:Object,default:()=>({})},modelValue:{type:String,default:""},errorText:{type:String,default:""},hasError:{type:Boolean,default:!1},errorNonce:{type:Number,default:0},loading:{type:Boolean,default:!1}},emits:["trigger","submit","close","subscribe","update:modelValue"],setup(t,{emit:m}){const f=t,v=m,a=S(null),C={front:0,email:1,claimed:2},T=d=>{const u=C[f.state]??0,b=C[d];return b===u?"is-active":b<u?"is-above":"is-below"},x=d=>C[d]===(C[f.state]??0);z(()=>f.state,d=>{d==="email"&&te(()=>setTimeout(()=>a.value?.focus?.(),Ke))});const k=S(!1);z(()=>f.errorNonce,async d=>{!d||f.state!=="email"||(k.value=!1,await te(),k.value=!0)});const l=g(()=>({background:"#fff",borderColor:f.ctaStyle?.borderColor,color:f.ctaStyle?.color})),R=d=>v("update:modelValue",d.target.value),O=()=>{f.loading||v("submit")};return(d,u)=>(y(),h("div",{class:A(["welcome-offer-claim",`welcome-offer-claim--${t.layout}`])},[o("div",{class:A(["claim-layer claim-layer--front",T("front")]),inert:!x("front")},[t.layout==="banner"?ee(d.$slots,"months",{key:0},void 0,!0):$("",!0),o("button",{type:"button",class:"claim-cta claim-cta--trigger",style:n(t.ctaStyle),disabled:t.loading,onClick:u[0]||(u[0]=b=>v("trigger"))}
1,[o("span",Le,r(t.triggerText),1),I(e(L),{"aria-hidden":"true",class:"claim-cta__icon"})],12,$e)],10,Oe),o("div",{class:A(["claim-layer claim-layer--email",T("email")]),inert:!x("email")},[o("div",Be,[t.layout==="card"?(y(),h("button",{key:0,type:"button",class:"claim-email__back",style:n(t.ctaStyle),"aria-label":"Back",onClick:u[1]||(u[1]=b=>v("close"))},[I(e(L),{"aria-hidden":"true",class:"claim-email__back-icon"})],4)):$("",!0),o("div",De,[o("input",{ref_key:"inputRef",ref:a,value:t.modelValue,type:"email",class:A(["claim-email__input",{shake:e(k)}]),placeholder:"[email protected]","aria-label":"Email address",autocomplete:"email",inputmode:"email","aria-invalid":t.hasError,disabled:t.loading,onInput:R,onKeydown:me(fe(O,["prevent"]),["enter"]),onAnimationend:u[2]||(u[2]=b=>k.value=!1)},null,42,Pe),o("button",{type:"button",class:"claim-email__submit",style:n(e(l)),disabled:t.loading,onClick:O},r(t.loading?"Saving...":"Claim"),13,He)]),t.layout==="banner"?(y(),h("button",{key:1,type:"button",class:"claim-email__close",style:n(t.ctaStyle),"aria-label":"Close",disabled:t.loading,onClick:u[3]||(u[3]=b=>v("close"))},[...u[5]||(u[5]=[o("span",{"aria-hidden":"true"},"✕",-1)])],12,Ue)):$("",!0),t.hasError?(y(),h("p",Ve,r(t.errorText),1)):$("",!0)])],10,Re),o("div",{class:A(["claim-layer claim-layer--claimed",T("claimed")]),inert:!x("claimed")},[t.layout==="banner"?ee(d.$slots,"months",{key:0},void 0,!0):$("",!0),o("button",{type:"button",class:"claim-cta claim-cta--subscribe",style:n(t.ctaStyle),onClick:u[4]||(u[4]=b=>v("subscribe"))},[o("span",qe,r(t.subscribeText),1),I(e(L),{"aria-hidden":"true",class:"claim-cta__icon"})],4)],10,Fe)],2))}},ie=re(We,[["__scopeId","data-v-794be3eb"]]),ze=["sensors-expose-observe-async","sensors-module-type","sensors-module-name","sensors-op-position-id","sensors-op-position-rank","sensors-link"],Ye={class:"months","aria-label":"Discount breakdown"},Ge={class:"amount"},Xe={class:"amount-suffix"},je={class:"cta-text"},Je=["sensors-expose-observe-async","sensors-module-type","sensors-module-name","sensors-op-position-id","sensors-op-position-rank","sensors-link"],Ze={class:"inner"},Qe={class:"copy"},et={class:"right"},tt={class:"months-wrap"},ot={class:"months","aria-label":"Discount breakdown"},st={class:"amount"},at={class:"amount-suffix"},lt={class:"cta-text"},nt={class:"months-wrap"},it={class:"months","aria-label":"Discount breakdown"},rt={class:"amount"},ct={class:"amount-suffix"},ut="WELCOME OFFER",dt={__name:"ModuleWelcomeOffer",props:{variant:{type:String,default:"banner",validator:t=>["banner","card"].includes(t)},campaign:{type:Object,default:()=>({})},sensorsModuleName:{type:String,default:""}},setup(t){const m=t,f=s=>{if(s==null||s==="")return"0deg";if(typeof s=="number")return`${s}deg`;const c=String(s).trim();return/deg$/i.test(c)?c:`${c}deg`},v=s=>{const c=s.colorFrom,p=s.colorTo||s.colorFrom;if(!c)return"";const i=(s.type||"linear").toLowerCase();return i==="solid"?c:i==="radial"?`radial-gradient(circle, ${c} 0%, ${p} 100%)`:`linear-gradient(${f(s.angleDeg)}, ${c} 0%, ${p} 100%)`},a=g(()=>{const s=m.campaign||{},c=Array.isArray(s.monthCards)?s.monthCards:[],p=s.style||{},i=p.background||{},V=p.button||{},B=p.chip||{};return{campaignNo:s.campaignNo||"",channel:s.ctaAction?.channel||"",title:s.title||"",titleHighlight:s.titleHighlight||"",subtitle:s.subtitle||"",monthCards:c.map(F=>({amountText:F?.amountText||"",label:F?.label||"",suffixText:F?.suffixText||""})),footnote:s.footnote||"",ctaText:s.ctaText||"",ctaAction:{type:s.ctaAction?.type||"",promoCode:s.ctaAction?.promoCode||""},style:{background:{type:i.type||"",angleDeg:i.angleDeg||"",colorFrom:i.colorFrom||"",colorTo:i.colorTo||""},button:{bgColor:V.bgColor||"",borderColor:V.borderColor||"",textColor:V.textColor||""},chip:{amountColor:B.amountColor||"",bgColor:B.bgColor||"",borderColor:B.borderColor||"",labelColor:B.labelColor||""},titleColor:p.titleColor||"",titleHighlightColor:p.titleHighlightColor||"",subtitleColor:p.subtitleColor||"",footnoteColor:p.footnoteColor||""}}}),C=be(),T=g(()=>(a.value.ctaAction?.type||"").toUpperCase()==="JOIN_FLOW"?P(xe,C.query):P(le,C.query)),x=g(()=>P(T.value,C.query)),k=()=>{U();const s=a.value.ctaAction?.promoCode;s&&sessionStorage.setItem("off-promoCode",s)},l=g(()=>{const s=a.value.style;return{bg:{background:v(s.background)},title:{color:s.titleColor},titleHighlight:{color:s.titleHighlightColor},subtitle:{color:s.subtitleColor},footnote:{color:s.footnoteColor}
1,chip:{background:s.chip.bgColor,borderColor:s.chip.borderColor},chipAmount:{color:s.chip.amountColor},chipLabel:{color:s.chip.labelColor},cta:{background:s.button.bgColor,borderColor:s.button.borderColor,color:s.button.textColor}}}),R=g(()=>ne().getterIsMobile),O=g(()=>m.variant==="card"||R.value),d=g(()=>(a.value.ctaAction?.type||"").toUpperCase()==="CLAIM"),u=g(()=>ne().getterIsLogin),{email:b,errorText:_,hasError:E,errorNonce:w,loading:H,submitClaim:Y,reset:ce}=Me(),M=S("front"),G=g(()=>a.value.ctaText||"Claim offer"),X=()=>{se().$BNTOMessage?.success?.({title:"Offer claimed!"})},ue=()=>{se().$BNTOMessage?.error?.({message:_.value||void 0})},j=async()=>{if(U(),u.value){const{ok:s}=await Y({campaignNo:a.value.campaignNo,channel:a.value.channel,requireEmail:!1});s?(X(),M.value="claimed"):ue();return}M.value="email"},J=async()=>{const{ok:s}=await Y({campaignNo:a.value.campaignNo,channel:a.value.channel,requireEmail:!0});s&&(X(),M.value="claimed")},Z=()=>{H.value||(ce(),M.value="front")},Q=()=>(U(),ge(P(le,C.query))),de=g(()=>d.value?"":T.value),N=g(()=>({...Te({type:m.sensorsModuleName,config:m.campaign})[0],linkUrl:de.value})),U=()=>{m.sensorsModuleName&&ve(ke.POSITION_CLICK,Ce(N.value,{moduleType:m.sensorsModuleName}))};return(s,c)=>{const p=ye;return e(O)?(y(),h("section",{key:0,class:A(["module-welcome-offer-card",{"has-outer-padding":t.variant==="banner"}]),"aria-labelledby":"welcome-offer-title-card","sensors-expose-observe-async":t.sensorsModuleName?"":void 0,"sensors-module-type":t.sensorsModuleName?e(ae).OPERATION:void 0,"sensors-module-name":t.sensorsModuleName||void 0,"sensors-op-position-id":t.sensorsModuleName?e(N).id:void 0,"sensors-op-position-rank":t.sensorsModuleName?e(N).rank:void 0,"sensors-link":t.sensorsModuleName?e(N).linkUrl:void 0},[o("div",{class:"card",style:n(e(l).bg)},[o("h2",{id:"welcome-offer-title-card",class:"title",style:n(e(l).title)},[o("span",null,r(e(a).title),1),c[2]||(c[2]=o("br",null,null,-1)),o("span",{class:"title-highlight",style:n(e(l).titleHighlight)},r(e(a).titleHighlight),5)],4),o("p",{class:"description",style:n(e(l).subtitle)},r(e(a).subtitle),5),o("ul",Ye,[(y(!0),h(D,null,q(e(a).monthCards,i=>(y(),h("li",{key:i.label,class:"month-card",style:n(e(l).chip)},[o("div",{class:"month-amount",style:n(e(l).chipAmount)},[o("span",Ge,r(i.amountText),1),o("span",Xe,r(i.suffixText),1)],4),c[3]||(c[3]=o("span",{class:"divider","aria-hidden":"true"},null,-1)),o("span",{class:"month-label",style:n(e(l).chipLabel)},r(i.label),5)],4))),128))]),o("p",{class:"disclaimer",style:n(e(l).footnote)},r(e(a).footnote),5),e(d)?(y(),K(ie,{key:1,layout:"card",state:e(M),"trigger-text":e(G),"cta-style":e(l).cta,modelValue:e(b),"onUpdate:modelValue":c[0]||(c[0]=i=>oe(b)?b.value=i:null),"error-text":e(_),"has-error":e(E),"error-nonce":e(w),loading:e(H),onTrigger:j,onSubmit:J,onClose:Z,onSubscribe:Q},null,8,["state","trigger-text","cta-style","modelValue","error-text","has-error","error-nonce","loading"])):(y(),K(p,{key:0,to:e(x),class:"cta-button",style:n(e(l).cta),onClick:k},{default:W(()=>[o("span",je,r(e(a).ctaText),1),I(e(L),{"aria-hidden":"true",class:"cta-icon"})]),_:1},8,["to","style"]))],4)],10,ze)):(y(),h("section",{key:1,class:"module-welcome-offer-banner",style:n(e(l).bg),"aria-labelledby":"welcome-offer-title-banner","sensors-expose-observe-async":t.sensorsModuleName?"":void 0,"sensors-module-type":t.sensorsModuleName?e(ae).OPERATION:void 0,"sensors-module-name":t.sensorsModuleName||void 0,"sensors-op-position-id":t.sensorsModuleName?e(N).id:void 0,"sensors-op-position-rank":t.sensorsModuleName?e(N).rank:void 0,"sensors-link":t.sensorsModuleName?e(N).linkUrl:void 0},[o("div",Ze,[o("div",Qe,[o("p",{class:"eyebrow"},r(ut)),o("h2",{id:"welcome-offer-title-banner",class:"title",style:n(e(l).title)},[o("span",null,r(e(a).title),1),o("span",{class:"title-highlight",style:n(e(l).titleHighlight)},r(e(a).titleHighlight),5)],4),o("p",{class:"description",style:n(e(l).subtitle)},r(e(a).subtitle),5)]),o("div",et,[e(d)?(y(),K(ie,{key:1,layout:"banner",state:e(M),"trigger-text":e(G),"cta-style":e(l).cta,modelValue:e(b),"onUpdate:modelValue":c[1]||(c[1]=i=>oe(b)?b.value=i:null),"error-text":e(_),"has-error":e(E),"error-nonce":e(w),loading:e(H),onTrigger:j,onSubmit:J,onClose:Z,onSubscribe:Q},{months:W(()=>[o("div",nt,[o("ul",it,[(y(!0),h(D,null,q(e(a).monthCards,i=>(y(),h("li",{key:i.label,class:"month-card",style:n(e(l).chip)},[o("div",{class:"month-amount",style:n(e(l).chipAmount)},[o("span",rt,r(i.amountText),1),o("span",ct,r(i.suffixText),1)],4),c[5]||(c[5]=o("span",{class:"divider","aria-hidden":"true"},null,-1)),o("span",{class:"month-label",style:n(e(l).chipLabel)},r(i.label),5)],4))),128))]),o("p",{class:"disclaimer",style:n(e(l).footnote)},r(e(a).footnote),5)])]),_:1},8,["state","trigger-text","cta-style","modelValue","error-text","has-error","error-nonce","loading"])):(y(),h(D,{key:0},[o("div",tt,[o("ul",ot,[(y(!0),h(D,null,q(e(a).monthCards,i=>(y(),h("li",{key:i.label,class:"month-card",style:n(e(l).chip)},[o("div",{class:"month-amount",style:n(e(l).chipAmount)},[o("span",st,r(i.amountText),1),o("span",at,r(i.suffixText),1)],4),c[4]||(c[4]=o("span",{class:"divider","aria-hidden":"true"},null,-1)),o("span",{class:"month-label",style:n(e(l).chipLabel)},r(i.label),5)],4))),128))]),o("p",{class:"disclaimer",style:n(e(l).footnote)},r(e(a).footnote),5)]),I(p,{to:e(x),class:"cta-button",style:n(e(l).cta),onClick:k},{default:W(()=>[o("span",lt,r(e(a).ctaText),1),I(e(L),{"aria-hidden":"true",class:"cta-icon"})]),_:1},8,["to","style"])],64))])])],12,Je))}}},yt=re(dt,[["__scopeId","data-v-1d615cbb"]]);export{yt as default};

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