PageSourceSearch

https://shop.realfaith.com/cdn/shopifycloud/checkout-web/assets/c1…ooks-useReplaceShopPayInHistory.Cz4PqGkk.js

js realfaith.com collected 2026-09-24 10:56:52 UTC 4,386 bytes, 1 lines download raw bytes

1import{a7 as h,N as d}from"./addresses-is-address-empty.-MuOhIyI.js";import{u as c,h as m,q as y}from"./esnext-vendor.D7ldIee_.js";const u="2026-10",w="2023-04";function T(e){throw new h(`Unsupported API version: ${e}`)}function o(e){return e==="unstable"?"2025-07":e}function l(e,t){if(i(e,t))return!1;const s=o(e);return o(t)<s}function P(e,t){return i(e,t)?!1:!l(e,t)}function i(e,t){const s=o(e);return o(t)===s}function f(e){return{laterThan:t=>l(e,t),earlierThan:t=>P(e,t),equalTo:t=>i(e,t)}}function S(e){return e?f(e).laterThan(u)?u:e:w}function b(e){return f(e).laterThan("2025-07")}function V(e){return e.endsWith("/")?e.slice(0,-1):e}const _=["cart","checkout","storefront"],A=new RegExp(`^shopify:/{0,2}(${_.join("|")})`);function C(e,t){const[s,n]=e.match(A)||[];return s?_.includes(n)?t[n]?.(e,s)??e:e:(e.startsWith("shopify:")&&console.error(new h(`Invalid shopify URL: ${e}`)),e)}function U(e,t){const s=new URL(e).host;return n=>{const a=n.split("storefront/")[1].split("/");a.join("/")==="api/graphql.json"&&a.splice(1,0,t);const p=a.join("/");return`https://${s}/${p}`}}function z(e){return t=>{if(!e)return t;const s=new URL(e);return new URL(t).searchParams.forEach((n,r)=>{s.searchParams.append(r,n)}),s.toString()}}function I(){return(e,t)=>e.replace(t,"")}var R=(e=>(e.CheckoutExtensionsPositioning="read_checkout_extensions_positioning",e.CustomerAddress="read_customer_address",e.CustomerEmail="read_customer_email",e.CustomerName="read_customer_name",e.CustomerPersonalData="read_customer_personal_data",e.CustomerPhone="read_customer_phone",e.NetworkAccessScope="read_checkout_external_data",e.CheckoutExtensionPayments="write_checkout_extension_payments",e.CheckoutExtensionRedeemables="write_checkout_extension_redeemables",e.PaymentSessionModal="write_payment_session_modals",e))(R||{});function g(e){return e.approvalScopes.has("read_checkout_external_data")&&e.capabilities.networkAccess}class x{#e=new Map;syncExtension(t){this.#e.set(t.id,{extensionType:t.type,hasNetworkAccess:g(t),hasApiAccess:t.capabilities.apiAccess})}removeExtension(t){this.#e.delete(t)}has(t,s){const n=t==="networkAccess"?"hasNetworkAccess":"hasApiAccess";for(const r of this.#e.values())if(!(s?.extensionType&&r.extensionType!==s.extensionType)&&r[n])return!0;return!1}}class L{#e=new Map;app(t){let s=this.#e.get(t);return s||(s=new x,this.#e.set(t,s)),s}}const N=e=>c("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 47 20",...e,children:c("path",{d:"m9.095 6.766-2.33 1.186C6.233 7.035 5.5 6.565 4.48 6.565q-1.665 0-1.665 1.007c0 .716.821.873 2.663 1.275 1.842.403 3.931.985 3.931 3.29 0 2.238-1.73 3.58-4.593 3.58-2.308 0-4.02-.984-4.816-2.73l2.33-1.163c.488 1.077 1.331 1.633 2.486 1.633 1.198 0 1.797-.335 1.797-1.052 0-.716-.823-.872-2.668-1.275C2.101 10.727.02 10.145.02 7.84c0-2.17 1.709-3.536 4.46-3.536 2.153 0 3.773.873 4.615 2.462M11.05.5h2.884v5.102c.754-.828 1.842-1.298 3.085-1.298 2.485 0 4.26 1.925 4.26 4.655v6.646h-2.884V8.959c0-1.275-.932-2.216-2.22-2.216-1.287 0-2.24.962-2.24 2.216v6.646h-2.886zm12.116 4.61c.954-.671 2.33-1.14 3.795-1.14 3.906 0 6.746 2.663 6.746 6.311 0 3.401-2.441 5.774-5.837 5.774-2.907 0-4.992-1.97-4.992-4.61 0-1.79 1.067-3.111 2.574-3.626l1.22 2.082c-.82.38-1.13.94-1.13 1.633 0 1.14.955 1.947 2.33 1.947 1.687 0 3.018-1.343 3.018-3.155 0-2.127-1.664-3.737-3.927-3.737a4.5 4.5 0 0 0-2.508.738zm15.024 9.22v5.17h-2.885V4.417h2.818V5.78c.866-.94 2.086-1.477 3.462-1.477 3.04 0 5.415 2.484 5.415 5.707s-2.375 5.707-5.415 5.707c-1.354 0-2.53-.515-3.395-1.388m5.947-4.341c0-1.858-1.287-3.223-3.04-3.223-1.731 0-3.04 1.388-3.04 3.223s1.309 3.223 3.04 3.223c1.753 0 3.042-1.366 3.042-3.223z"})});function q(e){m(()=>{document.title=e},[e])}const v=()=>{const{shop:{hasStorefront:e},observability:t,url:s}=d();return{replaceShopPayInHistory:y(r=>{typeof window>"u"||(r?window.location.replace(r):e?(t.log("shop_pay_in_history_storefront_redirected","[Shop Pay] Redirecting to storefront url, as replacementUrl is not provided"),window.location.replace(s.storefront())):(t.counter({name:"shop_pay_cannot_replace_browser_history",value:1}
1),t.log("shop_pay_cannot_replace_browser_history","[Shop Pay] Unable to replace Shop Pay in browser history",{replacementUrl:r,storefrontUrl:s.storefront()})))},[e,t,s])}};export{R as A,w as D,N as S,L as a,v as b,g as c,T as d,V as e,I as f,S as g,z as h,b as i,C as r,U as s,f as t,q 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.