PageSourceSearch

https://yuaiahaircare.com/cdn/shopifycloud/checkout-web/assets/c1/…g-methods-consolidated-included.Cuff-UKu.js

js yuaiahaircare.com collected 2026-09-28 23:25:07 UTC 2,865 bytes, 1 lines download raw bytes

1import{f as y}from"./esnext-vendor.DDpcaSqU.js";import{aM as b,aN as S,n as C,T,a5 as I,az as k,aO as x,aK as G,r as w}from"./utilities-previous.Cnwy8G2v.js";import{as as B,af as D}from"./hydrate.BcfGVx0L.js";import{p as A,s as N,c as P,a as E}from"./EstimatedDeliveryContent.DhMNjS2y.js";function F(t){if(t===void 0)return;if(typeof t=="number")return{lower:t,upper:t};const{lower:n,upper:e}=t;if(!(n===void 0||e===void 0))return{lower:n,upper:e}}function O(t){let n,e;for(const{estimatedTimeInTransit:o}of t){const i=F(o);if(!i)return;n=n===void 0?i.lower:Math.min(n,i.lower),e=e===void 0?i.upper:Math.max(e,i.upper)}if(!(n===void 0||e===void 0))return n===e?n:{lower:n,upper:e}}function $({line:t,localShopId:n,marketDrivenShippingEnabled:e,remoteShopsConfigMap:o,remoteMerchandiseDetails:i}){const s=b(t,i,n);if(s===n)return e;const r=o?.get(s);return r?r.marketDrivenShippingEnabled:t.methods.some(d=>!!S(d))}function K(t,n){if(!t)return`unresolved:${n}`;const e=t.deliveryPresentationGroupToken;return e?`token:${e}`:`no-token:${n}:${t.handle}`}function f(t){const n=new Map;return t.forEach(({line:e,method:o},i)=>{const s=K(o,e.id??`index-${i}`);let r=n.get(s);r||(r={key:s,methods:[],merchandiseLines:[],mergedTimeInTransit:void 0,availableOn:e.availableOn},n.set(s,r)),o&&r.methods.push(o),e.targetMerchandiseLines&&r.merchandiseLines.push(...e.targetMerchandiseLines)}),[...n.values()].map(e=>({...e,merchandiseLines:B(e.merchandiseLines),mergedTimeInTransit:O(e.methods)}))}function W(t){const n=t.map(o=>({line:o,method:C(o)})),e=n.filter(g);return{groups:f(e),nonShippableCount:n.length-e.length}}function g({line:t,method:n}){return n?n.methodType==="SHIPPING"||n.methodType==="LOCAL":t.methods.length===0||t.methods.some(({methodType:e})=>e==="SHIPPING"||e==="LOCAL")}function j(t){return{...t,included:!0}}function q(t,n){return[...t.filter(e=>!n(e)),...t.filter(n)]}function J(){const{shop:{id:t,marketDrivenShippingEnabled:n,remoteShopsConfigMap:e}}=T(),{deliveryNext:o,remoteMerchandiseDetails:i}=I(),{parts:s}=k();return y(()=>{const r={includedMethods:new Set,total:void 0,presentsConsolidatedShipping:!1,groups:[]},d=o.value;if(!d||d.status!=="filled")return r;const{oneTimePurchaseLines:u}=D(x(d).filter(G));if(u.length<2)return r;const c=(a,l)=>w({line:a,method:l,localShopId:t,marketDrivenShippingEnabled:n,remoteShopsConfigMap:e,remoteMerchandiseDetails:i.value}),h=u.some(a=>$({line:a,localShopId:t,marketDrivenShippingEnabled:n,remoteShopsConfigMap:e,remoteMerchandiseDetails:i.value}));if(!h)return r;const v=A(s.deliveryLines.value),p=N(u,v),m=p.filter(a=>!!a.method),L=m.length===u.length?P(m.map(({line:a,method:l})=>({...l,amountCombinabilityToken:c(a,l)}))):void 0,M=f(p.filter(g));return{includedMethods:E(u,p,c),total:L,presentsConsolidatedShipping:h,groups:M}})}export{j as a,W as b,f as c,g as i,O as m,q as o,K as s,J 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.