PageSourceSearch

https://us.xgimi.com/cdn/shopifycloud/checkout-web/assets/c1/shipping-methods-grouping.DDWlTvqo.js

js xgimi.com collected 2026-09-24 09:24:10 UTC 1,888 bytes, 1 lines download raw bytes

1import{f,q as l}from"./esnext-vendor.D7ldIee_.js";import{O as p,dC as h,dE as y,N as L,bJ as C,bK as I,ap as B}from"./addresses-is-address-empty.-MuOhIyI.js";import{cg as A}from"./hydrate.ByRIsqvd.js";function P(e,s,{dismissible:r=!0,onCancel:i}={}){let t=null;const n=new Promise(o=>{t=o});e.setCrossBorderConfirmState({onConfirm:o=>{e.setCrossBorderConfirmState(null),o.setSelectedMethodTypes(["SHIPPING"]),s(),t?.()},...r&&{onCancel:()=>{e.setCrossBorderConfirmState(null),i?.(),t?.()}},modalPromise:n})}function N(){const{checkout:e}=L(),{locationAddress:s}=p(),r=A(),i=l(n=>{const o=s.fields.countryCode.value;return!!(r.value&&o&&n!==o)},[s,r]),t=l((n,{dismissible:o=!0,onCancel:a}={})=>{P(e,n,{dismissible:o,onCancel:a})},[e]);return{shouldGateCrossBorder:i,crossBorderGate:t}}function E(){const{shippingAddress:e}=p(),s=h();return f(()=>{const r=e.value?.countryCode;if(!r)return!1;const i=s.value;if(!i)return!1;const t=y(i)?.pickupLocation?.address.countryCode;return t?r!==t:!1})}function S(e){if(!e)return!1;const{methods:[s]}=e;return s?.brandedPromise?.handle===B.BuyWithPrime}function d(e){const s=[],r=[],i=new Map;return e.forEach(t=>{const{availableOn:n}=t;if(n===C)r.push(t);else if(!n||n===I)s.push(t);else{const[o,a,m]=n.split("-"),u=new Date(Date.UTC(Number(o),Number(a)-1,Number(m))).toISOString(),c=i.get(u)??[];c.push(t),i.set(u,c)}}),{shipsNowItems:s,shipsLaterItems:r,shipsByDateItems:Array.from(i.entries()).sort(([t],[n])=>t.localeCompare(n))}}function D(e){const s=[],r=[],i=[];e.forEach(o=>{S(o)?s.push(o):o.type==="SUBSCRIPTION"?r.push(o):o.availableOn!==void 0&&i.push(o)});const{shipsNowItems:t,shipsLaterItems:n}=d(i);return{buyWithPrimeLines:s,subscriptionLines:r,shipsNowLines:t,shipsLaterLines:n}}function O(e){const{shipsByDateItems:s}=d(e.filter(({type:r})=>r!=="SUBSCRIPTION"));return s.length?s:void 0}export{O as a,d as b,E as c,D as g,N 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.