PageSourceSearch

https://shop.japanobjects.com/cdn/shopifycloud/checkout-web/assets/c1/hooks-payment-button.Byb-1Rv8.js

js japanobjects.com collected 2026-09-24 18:25:19 UTC 2,561 bytes, 1 lines download raw bytes

1import{q as u}from"./esnext-vendor.BBoIVOQW.js";import{az as y,aA as m,aB as g,aC as _,aD as v,T as p,aE as w,aF as P}from"./addresses-is-address-empty.ZJ1ThpFy.js";import{u as b}from"./hooks-useShopPayExternalAppContext.YLtTu3k6.js";const S=/\.(shop\.dev|shop\.test|tunnel\.shopifycloud\.tech)$/,T=/-prod\.tunnel\.shopifycloud\.tech$/;function A(){if(typeof window>"u")return!1;const e=window.location.host;return S.test(e)&&!T.test(e)}const D=()=>/debug=yes/.test(window.location.href)||/debug=true/.test(window.location.href)||/debug=1/.test(window.location.href)?!0:/debug=no/.test(window.location.href)||/debug=false/.test(window.location.href)||/debug=0/.test(window.location.href)?!1:!!A(),I=[75664294112,62390304886,85847245104,86752461117,58033635374,66379940012,70551503014,70463455488,93853155640,80263414008,69293637654];function M(e){const r=k();return{flow_version:_()?"iframe":"popup",...r&&{shopId:r},debugMode:D(),os:g(),browser:m().name,entrypoint:y,...e&&{client_source:e}}}function k(){const e=v();if(e)return e&&I.includes(e)?String(e):"other"}const c={shippingAddressError:"$.cart.deliveryGroups[0].deliveryAddress",discountCodeError:void 0,generalError:"$.cart"};Object.values(c).filter(Boolean);function x(){const{observability:e,source:r}=p(),t=r.type==="shopPayExternal",n=w(),o=b();return u(()=>{if(!t)return;let a=!1,s=!1;for(const i of n.validationErrors.value)i.target===c.generalError?a=!0:i.target===c.shippingAddressError&&(s=!0);!a&&!s||e.counter({name:"shop_pay_external_checkout_with_address_errors",value:1,attributes:{hasGeneralError:a,hasDeliveryAddressError:s,...M(o?.clientSource)}})},[t,o?.clientSource,e,n.validationErrors])}function O({breadcrumbPrefix:e,isApplePay:r=!1}){const{observability:t,source:n,i18n:o,checkout:{identity:a,validation:s},shopPay:i}=p(),d=n.type==="simulated",h=a.current.value==="shopPay"&&!i?.user.phoneNumber.value?.trim(),f=u(()=>{const l=s.missingFields.phone.isValid.value;if(!l){const E=s.missingFields.phone.input.value;s.missingFields.phone.error.value=E?o.translate("field_errors.shipping_line_phone_invalid"):o.translate("field_errors.phone_blank")}return l},[s,o]);return u(()=>d?(t.leaveErrorBreadcrumb(`${e} - simulated`),!1):h&&r&&!f()?(t.leaveErrorBreadcrumb(`${e} - requires phone`),!1):(t.leaveErrorBreadcrumb(e),!0),[e,t,d,h,r,f])}function V(){const{userEvents:e,source:r,checkout:t,shop:n}=p(),o=x();return u(()=>{o(),e.monorailEvent({schemaId:"shopify_pay_payment_page_pay_now/2.1",payload:{...P(r,t,n),clientTimestampMs:Date.now()}})},[e,r,t,n,o])}export{O as a,V 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.