PageSourceSearch

https://shop.51trips.com/cdn/shopifycloud/checkout-web/assets/c1/RememberMeSection.BOf68zmB.js

js 51trips.com collected 2026-09-24 12:48:28 UTC 14,228 bytes, 2 lines download raw bytes

1const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["component-RememberMe.qqAQHa0P.js","esnext-vendor.D7ldIee_.js","Checkbox.Cby2hWUV.js","hydrate.ByRIsqvd.js","addresses-is-address-empty.-MuOhIyI.js","app.A60-IfPs.js","assets/app.Sxsz5knT.css","assets/is-address-empty.DJksNKpk.css","constants.DowbVE6J.js","hooks-useReplaceShopPayInHistory.Cz4PqGkk.js","assets/previous.ClThmeCv.css","assets/Checkbox.SrYMuQu4.css","hooks-useCanChangeCompanyLocation.Bk004VMP.js","EmailField.Bx6jEWuK.js","PhoneField.BapDvZfY.js","hooks-useSuppressShopPayModalOnLoad.CI5bzdLE.js","hooks-useUnauthenticatedErrorModal.CzvtLqeY.js","assets/PhoneField.uZEuHncj.css","components-PaymentMethodProgressionHost.BgOpCmhs.js","Section.DIJn7eYY.js","assets/Section.CU18S7Ap.css","Choice.Dywz6_Fr.js","assets/Choice.aPApdPe_.css","ImpressionEventCapture.CIEEzh6Z.js","ChangeCompanyLocationLink.Ba8IeUdU.js","BillingAddressForm.DHpCPcqC.js","localization-index.DBksi22x.js","assets/index.BAKORI_U.css","Popover.BNecjV8x.js","assets/Popover.Bi1nHaU-.css","assets/BillingAddressForm.BdwN7V1K.css","useAddressMutationsWithNegotiation.Bu1iJp6d.js","PaymentIcon.Ddd-WnG2.js","assets/PaymentIcon.gzvCNwz_.css","PaymentLine.DhO8cHCS.js","Theme-ThemeOverride.4AonMthy.js","assets/PaymentLine.D3bcP-mr.css","IncentiveBadge.D66zssvS.js","assets/IncentiveBadge.Dlnp55te.css","hooks-useUpdateCheckoutAddress.4zyjtqEx.js","utilities-shopCashMoney.B9eyOzz9.js","payment-usePaymentExemptionReason.Q4GfCwuW.js","shop-pay-ProgressIntercepts.wTCQvlrM.js","shop-pay-normalizeBuyerDetails.BcEhgoK7.js","context-CheckoutSheetProtocolClient.CNLSBD5p.js","hooks-useShopPayProgressIntercepts.CnlV9rdf.js","assets/useShopPayProgressIntercepts.CIy8uDiZ.css","checkout-updaters-helpers.DKDxNKY0.js","assets/useAddressMutationsWithNegotiation.BcTJoNaV.css","hooks-useGeneralPaymentErrorMessage.CXe06B2R.js","assets/PaymentMethodProgressionHost.C8No5WOn.css","stopwatch.wWgdKLTI.js","components-RedirectionNotice.module.CqgkZHXB.js","assets/RedirectionNotice.B8v_QGNW.css","assets/RememberMe.Df3s08WT.css"])))=>i.map(i=>d[i]);
2import{f as Z,A as f,q as C,h as L,u as n,k as z,e as w,T as j,g as J,_ as Q,S as V,d as ee,r as ne}from"./esnext-vendor.D7ldIee_.js";import{c as te,B as H,dd as ae,de as re,df as k,cQ as oe,k as v,n as se,P as ie,ce as q,$ as le,b as ce,l as O,b_ as M,ak as S,L as ue,i as de,G as A}from"./hydrate.ByRIsqvd.js";import{N as P,$ as pe,F as me,o as he,an as ye,O as T,a0 as G,dj as _e,r as fe,cQ as be,bl as ge,bi as ve,c1 as Pe,dk as Ie,dl as Se,bf as Re,bh as Ce,cx as Ee,be as Oe,ca as Me,av as Te,d7 as Ne,am as ke}from"./addresses-is-address-empty.-MuOhIyI.js";import{u as xe,a as Ae,g as Le,h as we,i as He}from"./components-PaymentMethodProgressionHost.BgOpCmhs.js";import{a as ze}from"./PaymentIcon.Ddd-WnG2.js";import{a as Fe}from"./payment-usePaymentExemptionReason.Q4GfCwuW.js";import{u as Be}from"./stopwatch.wWgdKLTI.js";import{_ as De}from"./app.A60-IfPs.js";import{C as F}from"./Checkbox.Cby2hWUV.js";import{a as Ve,b as qe}from"./hooks-useCanChangeCompanyLocation.Bk004VMP.js";const B="shop_pay_approval_id",Ge=250,Ke=14;function Ue(e,a){if(!ae(e))return"malformed_uuid";if(e[Ke]!=="7")return"uuid_v7_required";if(!a)return"payment_not_required"}function Cn(){const{shop:e}=P(),{paymentMethods:a}=pe();return Z(()=>e.hasFlagEnabled(me)&&he(a.value))}function En(){const{observability:e,shop:a}=P(),{checkoutProtocolModalEventSignal:t}=ye(),r=T(),o=te(),{negotiate:s}=G(),i=f(null),l=f(""),d=f(""),c=a.hasFlagEnabled(_e),b=C(()=>{const m=i.current?.value.trim()??"";if(!m||m===l.current)return;const u=Ue(m,o.value);if(u){d.current!==m&&(d.current=m,e.counter({name:"shop_pay_approval_id_field_discarded",value:1,attributes:{reason:u}}),e.histogram({name:"shop_pay_approval_id_field_discarded_length",value:m.length,attributes:{reason:u}}),e.log("shop_pay_approval_id_field_discarded","Shop Pay approval id discarded before negotiation",{reason:u,valueLength:m.length}));return}l.current=m,e.counter({name:"shop_pay_approval_id_field_applied",value:1,attributes:{verificationOpen:t.peek()==="shopPayVerification"}});const p={method:{type:"shopWallet",shopPayApprovalId:m}};r.paymentLines.value=fe(r.paymentLines.value,p),r.generalPaymentError.value=void 0,r.generalPaymentErrorCode.value=void 0,s({})},[t,s,e,r,o]);return L(()=>{const m=setInterval(b,Ge);return()=>clearInterval(m)},[b]),n(H,{accessibilityVisibility:"exclusive",children:n("input",{ref:i,type:"text",tabIndex:-1,"aria-hidden":!0,id:B,name:B,autoComplete:"off",onInput:c?b:void 0})})}function On({localizationExtension:e,index:a}){const t=be(),{negotiate:r}=G(),[o,s]=z(),[i,l]=z(),d=ge(e.fields.value,t),c=e.fields.title.value,{localizedFieldErrors:b}=re().value,m=`$.cart.localizedField.${e.peek().key}`,u=`$.localizationExtension[${a}]`,p=b.find(({target:y})=>y===m),_=y=>{const E=y.violations?.find(x=>{const{code:I,localizedMessage:W,nonLocalizedMessage:Y,target:$}=x,X=W??Y;if(I==="LOCALIZATION_EXTENSION_FIELD_ERROR"&&$===u)return X});if(!E)return;const{localizedMessage:g,nonLocalizedMessage:N}=E;return g??N};L(()=>
2{if(p){t.value=p.message;return}if(i){t.value=i;return}t.value=void 0},[t,p,i,o]);const h=()=>{d.onBlur(),s(void 0),l(void 0),r({fieldsToResolve:["localizationExtensions"],include:[],onComplete:y=>{l(_(y)),s("blur")}})};return ve(y=>{l(_(y)),s("submit")}),n(k,{...d,label:c,name:c,onBlur:h,value:d.value??void 0})}const K=1,D=14;function We(e){const a=w(Math.min(e,K)),t=f(null),r=f(null),o=f(null),s=f(null),i=f(null),l=f(null),d=f(null),c=C(()=>{const u=t.current,p=r.current,_=o.current,h=s.current;u===null||p===null||_===null||h===null||(a.value=Ye(u,e,p,_,h))},[a,e]),b=C(u=>{const p=i.current;p&&d.current?.unobserve(p),i.current=u;const _=u?.parentElement;if(_){const h=getComputedStyle(_),y=parseFloat(h.fontSize)||D;r.current=parseFloat(h.columnGap)||0,o.current=ze.base.inlineSize/D*y,s.current=u.getBoundingClientRect().width,d.current?.observe(u)}c()},[c]);return{ref:C(u=>{if(d.current?.disconnect(),d.current=null,l.current=u,!u)return;if(typeof ResizeObserver>"u"){a.value=e;return}const p=new ResizeObserver(_=>{for(const h of _){const y=h.target===i.current?h.target.getBoundingClientRect().width:h.contentBoxSize?.[0]?.inlineSize??h.contentRect.width;y<=0||(h.target===i.current?s.current=y:h.target===l.current&&(t.current=y))}c()});p.observe(u),i.current&&p.observe(i.current),d.current=p},[a,e,c]),overflowIndicatorRef:b,maxVisibleBrands:a}}function Ye(e,a,t,r,o){return a*r+(a-1)*t<=e?a:Math.max(K,Math.floor((e-o)/(r+t)))}function $e(){const e=w(!1),a=f(null);return{ref:C(r=>{if(a.current?.disconnect(),a.current=null,!r)return;const o=()=>{const i=r.ownerDocument.createRange();i.selectNodeContents(r);const l=i.getClientRects;e.value=typeof l=="function"&&Array.from(l.call(i)).filter(({width:d})=>d>0).length>1};if(o(),typeof ResizeObserver>"u")return;const s=new ResizeObserver(o);s.observe(r),a.current=s},[e]),isMultiline:e}}function Xe(e,a,t,r){const o={title:a.translate("payment.title")};if(!t)return o;const[s]=e;return s?.type!=="direct"?o:{title:r?a.translate("payment.pay_with_debit_card"):a.translate("payment.pay_with_credit_card"),creditCardInline:{paymentBrands:s.paymentBrands,cardNetworkStateKey:Pe(s)}}}function Ze(e,a){return e.current.value==="shopPay"&&a}function je(){const{i18n:e,checkout:a}=P(),{identity:t}=a,{displayedPaymentMethods:r}=xe({experienceType:"list"}),o=Ae(r),s=Ze(t,a.installments.paymentMethodMustSupportDebitCardOnly.value),i=Le(),l=Fe(),c=!(we(t,l.value)!==null||i.value.freeOrder||i.value.giftCard||i.value.storeCredit||i.value.redeemables)&&o.mode==="singlePaymentMethodCreditCard";return j(()=>Xe(r,e,c,s),[r,e,c,s])}const Je="zA7WO",Qe="bIqDC",en="jGvwB",nn="haX3x",tn="_1OE8N",R={HeadingRow:Je,HeadingTitle:Qe,HeadingTitleText:en,HeadingIcons:nn,"HeadingIcons-networkSelector":"_5Jkpa","HeadingIcons-multiline":"iq64C",HeadingIconsContent:tn};function Mn({headingId:e,autoFocus:a}){const{i18n:t}=P(),o=oe().value?`${t.translate("payment.billing_must_match_shipping_notice")} `:"",s=t.translate("payment.card_security_notice"),{title:i,creditCardInline:l}=je(),{ref:d,isMultiline:c}=$e();return n(v,{gap:l?"small-300":"small-400",children:[n(v,{direction:"inline",gap:"small-200",alignItems:"end",className:R.HeadingRow,children:[n("div",{className:R.HeadingTitle,children:n(se,{id:e,level:1,autoFocus:a,children:n("span",{ref:d,className:R.HeadingTitleText,children:i})})}),l&&n(an,{cardNetworkStateKey:l.cardNetworkStateKey,availableBrands:l.paymentBrands,headingIsMultiline:c.value})]}),n(ie,{color:"subdued",children:o+s})]})}function an({cardNetworkStateKey:e,availableBrands:a,headingIsMultiline:t=!1}){const{checkout:{cardNetworkSelection:r}}=P(),o=r.forMethod(e),s=a.filter(Ie),i=o.networkSelectionEnabled.value&&o.selectableBrands.value.length>1,{ref:l,overflowIndicatorRef:d,maxVisibleBrands:c}=We(s.length);return s.length===0?null:n("div",{ref:l,className:J(R.HeadingIcons,i&&R["HeadingIcons-networkSelector"],t&&R["HeadingIcons-multiline"]),children:n(v,{direction:"inline",gap:"none",alignItems:"center",justifyContent:"end",className:R.HeadingIconsContent,children:n(He,{animate:!0,availableBrands:a,selectableBrands:o.selectableBrands.value,activeBrand:o.activeBrand.value,savedCardBrand:o.selectedSavedCreditCardBrand.value,onSelectBrand:o.setSelectedNetwork,networkSelectionEnabled:o.networkSelectionEnabled.value,binLength:o.bankIdNumberLength.value,viewTransitionKey:e,maxVisibleBrands:c.value,overflowIndicatorRef:d,announceNetworkSelector:!0,announceOverflowBrands:!0})})})}const rn=["AT","BE","BG","HR","CY","CZ","DK","EE","FI","FR","GF","DE","GR","HU","IE","IT","LV","LT","LU","MT","NL","PL","PT","RO","SK","SI","ES","SE","IS","LI","NO"],on=[...rn,"CH","GB"],U=e=>on.includes(e);function sn(){const e=Re.ShopPayRememberMeOptOut,a=C(r=>{r?Ce(e,r):Ee(e)},[e]),t=C(()=>Oe(e),[e]);return{storeOptOutPreference:a,getOptOutPreference:t}}function ln(){const{geolocation:e}=q(),{router:a,shop:t}=P(),r=a.currentUrl.value,o=Se(r.searchParams),s=T().shopPayArtifact.value,{getOptOutPreference:i}=sn(),l=w(!0);if(Q(()=>{l.value=!!i()},[i,l]),!(t.shopPayRememberMeAutoOptinEnabled??!0))return{autoOptIn:!1,isOptedIn:!1};const c=!U(e.country.code)&&!o&&!l.value;return{autoOptIn:c,isOptedIn:c&&s?.optIn!==!1}}function cn({busy:e,children:a,title:t,compact:r}){return r?n(le,{accessibilityLabel:t,children:n(v,{gap:"base",children:n("div",{"aria-busy":e||void 0,children:a})})}):n(V,{children:[n("div",{"aria-busy":e||void 0,"aria-label":t,role:"group",children:a}),n(ce,{blockSize:"large-300"})]})}function un(){const{geolocation:e}=q();return U(e.country.code)}function dn({buyerPhone:e,isApplePayWalletSelected:a,requiresExplicitConsent:t,validatedProposedPhone:r}){return e?"standard":t?a?"gdprCheckboxOnly":r?"gdprCheckboxWithPhone":"standaloneGdprPhone":"noInputRow"}function pn(e){const a=T(),{shop:t}=P(),o=!t.hasFlagEnabled(Me)&&!!Te(a.paymentLines.value,"APPLE_PAY"),s=un(),i=Ve(),l=qe(e??i.value).value;return{kind:dn({buyerPhone:a.phone.value,isApplePayWalletSelected:o,requiresExplicitConsent:s,validatedProposedPhone:l}),isApplePayWalletSelected:o,requiresExplicitConsent:s,validatedProposedPhone:l}}function mn({title:e,compact:a}){const{i18n:t,shop:{name:r}}=P(),o=T(),{shopPayArtifact:s}=o,{isOptedIn:i}=ln(),l=!!s.value?.optIn||i,d=Ne().value??!1,{kind:c}=pn(),b=t.translate("shop_pay_remember_me.terms"),m=t.translate("shop_pay_remember_me.privacy_policy"),u={terms_href:b,privacy_href:m},p=d?t.translate("shop_pay_remember_me.consent_by_completing_order",u):t.translate("shop_pay_remember_me.consent_by_paying",u),_=t.translate("shop_pay_remember_me.value_prop_shop_name_verbose",{shop_name:r}),h=t.translate("shop_pay_remember_me.consent_with_phone",u),y=t.translate("shop_pay_remember_me.consent_with_email",u),E=t.translate("shop_pay_remember_me.consent_with_checkbox_only",u),g=t.translate("shop_pay_remember_me.label"),N=t.translate("shop_pay_remember_me.mobile_phone_optional"),x=t.translate("shop_pay_remember_me.email_label_optional");let I;return c==="standaloneGdprPhone"?I=n(v,{gap:"base",children:[n(O,{children:g}),n(S,{contentDisplay:"block",inlineSize:"100%",children:n(k,{label:N})}),n(M,{content:h,size:"small"})]}):c==="gdprCheckboxWithPhone"?I=n(v,{gap:"base",children:[n(A,{gridTemplateColumns:"auto minmax(0, 1fr)",gap:"base",alignItems:"start",children:[n(S,{children:n(F,{accessibilityLabel:g})}),n(O,{children:g})]}),n(S,{contentDisplay:"block",inlineSize:"100%",children:n(k,{label:N})}),n(M,{content:E})]}):c==="gdprCheckboxOnly"?I=n(A,{gridTemplateColumns:"auto minmax(0, 1fr)",gap:"base",alignItems:"start",children:[n(S,{children:n(F,{accessibilityLabel:g})}),n(v,{children:[n(O,{children:g}),n(M,{content:E,size:"small"})]})]}):c==="standard"?I=n(v,{gap:"base",children:[n(O,{children:g}),n(S,{contentDisplay:"block",inlineSize:"100%",children:n(k,{label:
2x})}),n(M,{content:y,size:"small"})]}):I=n(A,{gridTemplateColumns:"minmax(0, 1fr) auto",gap:"base",alignItems:"center",children:[n(v,{children:[n(O,{children:g}),n(M,{content:l?p:_,size:"small"})]}),l?n(H,{paddingInlineStart:"small-500",children:n(S,{contentDisplay:"block",children:n(ue,{textDecoration:"none",children:t.translate("shop_pay_remember_me.not_now")})})}):n(S,{contentDisplay:"block",children:n(de,{variant:"secondary",children:t.translate("shop_pay_remember_me.save")})})]}),n(cn,{busy:!0,title:e,compact:a,children:I})}const hn=ee({displayName:"RememberMe",renderLoading:e=>n(mn,{...e}),renderError:()=>null,load:()=>ne(()=>De(()=>import("./component-RememberMe.qqAQHa0P.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54]))).then(({RememberMeSurface:e})=>e)});function Tn({compact:e}){const{i18n:a}=P(),t=ke(),r=Be(),o=T(),s=a.translate("shop_pay_remember_me.title"),i=o.shopPayRememberMeVisible.value?s:"";return L(()=>{r||(o.shopPayRememberMeVisible.value=!1)},[r,o.shopPayRememberMeVisible]),!t.value||!r?null:n(V,{children:[n(H,{accessibilityRole:"status",accessibilityVisibility:"exclusive",children:i}),n(hn,{title:s,compact:e})]})}export{On as L,Mn as P,Tn as R,En as S,ln as a,sn as b,pn as c,cn as d,Cn as u};

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.