PageSourceSearch

https://rumitrends.com/cdn/shopifycloud/checkout-web/assets/c1/7fd9930c._tvU8zAi.js

js rumitrends.com collected 2026-10-04 17:14:27 UTC 6,716 bytes, 1 lines download raw bytes

1import{x as e,l as a,m as n,u as t,H as o,T as i,s as l,S as s}from"./2c1ab0fe.GMbxnz74.js";import{M as r,P as c,Q as d,B as m,J as p,c as h,l as u,I as g,b as _,bz as f,bC as b}from"./164ad2e3.B4L1MRYB.js";import{Q as y,C as w}from"./3e6029dd.B7hwoFu9.js";import"./app.DGSHpWaV.js";import{bH as x,S as M,J as S,bI as k}from"./4c290a1e.DMQ9xOwP.js";import"./9f047e05.DwjCPgK0.js";import"./0a7dffce.BcNpdEJk.js";import"./5fda1420.BLaDhoyL.js";import"./60a453ce.Cg9T1Gj2.js";import"./21cc90a2.Ccyorzx_.js";import"./bb728e1c.CHt2JlPY.js";var v="var(--_1cm3fw00)";const z=d("Countdown");function C({duration:i=0,defaultValue:l=i,label:s,onEnd:d}){const m=r(void 0,z),[p]=e(()=>Date.now()+l),[h,u]=e(()=>Math.max(l,0)),g=a(d),_=a(!1);g.current=d,n(()=>{let e;const a=()=>{const n=Math.max(p-Date.now(),0);u(n),0!==n?e=setTimeout(a,n%1e3||1e3):_.current||(_.current=!0,g.current?.())};return a(),()=>clearTimeout(e)},[p]);const f=i>0?Math.min(Math.max((i-h)/i*100,0),100):0;return t("div",{role:s?"timer":void 0,"aria-labelledby":s?m:void 0,className:"_1cm3fw02 _1cm3fw01 _1fragem6t _1fragemzf _1fragem82",children:[t("div",{"aria-hidden":!0,className:"_1cm3fw04 _1cm3fw03 _1fragemup _1fragemv4 _1fragemzf _1fragem32",style:o({[v]:`${f}%`}),children:t("div",{className:"_1cm3fw06 _1cm3fw05 _1fragem4q"})}),s&&t(c,{id:m,accessibilityVisibility:"hidden",type:"small",textAlign:"center",color:"subdued",children:s(h)})]})}function I(e=navigator.userAgent,a){return x(e)||/Shop App\/[^/]+\/iOS\//.test(e)||null!=a&&"WEB"!==a}const E=new Set(["alipay","bancontact","blik","eps","ideal","klarna","mobilepay","multibanco","paypal","przelewy24","satispay","sofort","swish","twint","usdc","wechatpay"]);function R(e){return e.toLowerCase().replace(/[\s_-]+/gu,"")}const D=e=>{const a=Math.floor(e/36e5),n=String(Math.floor(e%36e5/6e4)).padStart(2,"0"),t=String(Math.floor(e%6e4/1e3)).padStart(2,"0");return a>0?`${a}:${n}:${t}`:`${n}:${t}`},A={bogus_app_coin:"/cdn/shopifycloud/checkout-web/assets/c1/assets/bogus.Dgqxw51f.svg",pix:"/cdn/shopifycloud/checkout-web/assets/c1/assets/pix.D3fYfWH5.svg",blik:"/cdn/shopifycloud/checkout-web/assets/c1/assets/blik.DVGmDGpj.svg",swish:"/cdn/shopifycloud/checkout-web/assets/c1/assets/swish.Bmk5gRpD.svg"},T=["wechat_pay","paynow"];function j({challengeType:a,challengeData:o,receipt:r,paymentMethod:d,onModalRender:x,challengeExpiresAt:v}){const z=((e,a)=>null!=a?Math.max(a-Date.now(),0):e&&b(e)&&e.timeout?.millisecondsRemaining||0)(r,v),[j,q]=e(!1),[N,O]=e(),[Q]=e(z),{i18n:$,client:L,embed:B}=M(),J=function(e){const{paymentMethod:a}=e,{userEvents:n,shop:{id:t},source:o}=M(),i=e=>n.monorailEvent({schemaId:"checkout_buyer_action_required_events/1.0",payload:{eventTriggerReason:e,paymentMethodDisplayName:a.name,checkoutSessionIdentifier:o.checkoutSessionIdentifier||"",shopId:parseInt(S(t),10)}});return{onModalRendered:()=>i("modal_rendered"),onModalTimeout:()=>i("buyer_action_timeout"),onModalExit:()=>i("buyer_closes_modal"),onCopiedToClipboard:()=>i("buyer_copies_to_clipboard"),onChallengeRendered:e=>{switch(e){case"QR_CODE":i("qr_code_rendered");break;case"EXTERNAL":i("external_action_rendered")}}}}({paymentMethod:d});i(()=>{j&&x&&setTimeout(()=>{x()},1e3)},[j,x]);const V=l(()=>r?(J.onModalTimeout(),q(!1),null):null,[r,J]);let H,W;n(()=>{a&&o&&Q&&(O(JSON.parse(o)),q(!0))},[a,o,Q]);let F,G=!1;switch(a){case"QR_CODE":if(H=$.translate("payment_challenge_modal.qr_code.instructions",{paymentMethod:d.name}),N){const e=JSON.parse(N.data);W=e?.mobile_app_universal_url,F=e?.instruction,G=T.includes(e?.instruction),"wechat_pay"===e?.instruction?H=I(L.userAgent,B?.platform)?$.translate("payment_challenge_modal.qr_code.wechat_instructions_mobile"):$.translate("payment_challenge_modal.qr_code.wechat_instructions"):"paynow"===e?.instruction&&(H=I(L.userAgent,B?.platform)?$.translate("payment_challenge_modal.qr_code.paynow_instructions_mobile"):$.translate("payment_challenge_modal.qr_code.paynow_instructions"))}break;case"EXTERNAL":H=$.translate("payment_challenge_modal.external.instructions",{paymentMethod:d.name});break;default:H=$.translate("payment_challenge_modal.instructions",{paymentMethod:d.name})}n(()=>{j&&N&&J.onModalRendered()},[j,N,J]),n(()=>{N&&J.onChallengeRendered(a)},[J,N,a]);const X=$.translate("payment_challenge_modal.copy_text",{paymentMethod:d.name}),P=$.translate("payment_challenge_modal.open_app_text",{paymentMethod:d.name}),U=W?P:X,Y=$.translate("payment_challenge_modal.header",{paymentMethod:d.name}),K=$.translate("payment_challenge_modal.close"),Z=(e=>{const a=k(e);return a?A[a]:null})(d),ee="QR_CODE"===a?function(e){for(const a of e){if("string"!=typeof a||""===a)continue;const e=R(a);if(E.has(e))return`https://cdn.shopify.com/static/retail/lpm-icons/png/square-icons/${e}.png`}}([F,...d.paymentBrands??[]]):void 0;return r&&t(f,{open:j,blocking:!0,accessibilityLabel:Y,size:"base",children:t(m,{children:[t(p,{gridAutoFlow:"column",gridTemplateColumns:"minmax(0, 1fr) minmax(auto, max-content)",gridTemplateRows:"minmax(0, 1fr)",gap:"large-300",alignItems:"center",alignContent:"center",children:[t(c,{size:"large",textAlign:"start",children:Y}),t(h,{gap:"small-400",alignItems:"end",children:t(u,{onClick:()=>(J.onModalExit(),void window.location.reload()),variant:"plain",tone:"monochrome",inlineAlignment:"end",accessibilityLabel:K,children:t(g,{type:"x"})})})]}),t(m,{children:[t(_,{blockSize:"base"}),Z&&!ee&&t(s,{children:[t(h,{gap:"large-300",alignItems:"center",children:t("img",{src:Z,alt:d.name})}),t(_,{blockSize:"small-400"})]}),t(h,{gap:"large-300",alignItems:"center",children:t(c,{size:"base",textAlign:"center",textWrap:"pretty",children:H})}),"QR_CODE"===a&&N&&t(s,{children:[t(_,{blockSize:"base"}),t(h,{gap:"base",alignItems:"center",children:[t(h,{gap:"base",maxInlineSize:"150px",minInlineSize:"150px",alignItems:"center",children:t(y,{content:N?.code,size:"fill",logo:ee},ee)}),!G&&t(s,{children:[t(_,{blockSize:"large-200"}),t(h,{gap:"base",alignItems:"center",maxInlineSize:"400px",minInlineSize:"@media (inline-size >= extraSmall) 400px, 100%",children:t(u,{commandFor:"qr-code-challenge-data-code",command:W?void 0:"--copy",inlineSize:"fill",inlineAlignment:"center",onClick:()=>{W&&(window.open(W,"_blank"),J.onChallengeRendered("QR_CODE"))},children:U})}),!W&&t(w,{text:N?.code,id:"qr-code-challenge-data-code",onCopy:()=>J.onCopiedToClipboard()})]})]})]}),t(_,{blockSize:"large-200"}),t(h,{alignItems:"center",children:t(m,{maxInlineSize:"150px",minInlineSize:"150px",children:t(C,{duration:Q,defaultValue:z,label:e=>$.translate("payment_challenge_modal.timer_message",{timeLeft:D(e)}),onEnd:V})})}),t(_,{blockSize:"large-200"})]})]})})}export{A as SUPPORTED_PAYMENT_METHOD_BRAND_ICONS,j 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.