PageSourceSearch

https://avpayurveda.com/cdn/shopifycloud/checkout-web/assets/c1/181d38d3.Ty4Mx6im.js

js avpayurveda.com collected 2026-10-02 11:03:20 UTC 2,839 bytes, 1 lines download raw bytes

1import{t as e}from"./2c1ab0fe.GMbxnz74.js";import{aI as n,aJ as t,n as o,S as i,T as r,aw as a,aK as s,aF as d,r as l}from"./4c290a1e.C6TDJ9Fn.js";import{aq as p,ad as m}from"./164ad2e3.BbIvMjRY.js";import{p as h,s as u,c,a as f}from"./347b440c.C7wvTwkm.js";function v(e){if(void 0===e)return;if("number"==typeof e)return{lower:e,upper:e};const{lower:n,upper:t}=e;return void 0!==n&&void 0!==t?{lower:n,upper:t}:void 0}function g(e){let n,t;for(const{estimatedTimeInTransit:o}of e){const e=v(o);if(!e)return;n=void 0===n?e.lower:Math.min(n,e.lower),t=void 0===t?e.upper:Math.max(t,e.upper)}if(void 0!==n&&void 0!==t)return n===t?n:{lower:n,upper:t}}function S(e,n){if(!e)return`unresolved:${n}`;const t=e.deliveryPresentationGroupToken;return t?`token:${t}`:`no-token:${n}:${e.handle}`}function M(e){const n=new Map;return e.forEach(({line:e,method:t},o)=>{const i=S(t,e.id??`index-${o}`);let r=n.get(i);r||(r={key:i,methods:[],merchandiseLines:[],mergedTimeInTransit:void 0,availableOn:e.availableOn},n.set(i,r)),t&&r.methods.push(t),e.targetMerchandiseLines&&r.merchandiseLines.push(...e.targetMerchandiseLines)}),[...n.values()].map(e=>({...e,merchandiseLines:p(e.merchandiseLines),mergedTimeInTransit:g(e.methods)}))}function b(e){const n=e.map(e=>({line:e,method:o(e)})),t=n.filter(T);return{groups:M(t),nonShippableCount:n.length-t.length}}function T({line:e,method:n}){return n?"SHIPPING"===n.methodType||"LOCAL"===n.methodType:0===e.methods.length||e.methods.some(({methodType:e})=>"SHIPPING"===e||"LOCAL"===e)}function L(e){return{...e,included:!0}}function I(e,n){return[...e.filter(e=>!n(e)),...e.filter(n)]}function k(){const{shop:{id:o,marketDrivenShippingEnabled:p,remoteShopsConfigMap:v}}=i(),{deliveryNext:g,remoteMerchandiseDetails:S}=r(),{parts:b}=a();return e(()=>{const e={includedMethods:new Set,total:void 0,presentsConsolidatedShipping:!1,groups:[]},i=g.value;if(!i||"filled"!==i.status)return e;const{oneTimePurchaseLines:r}=m(s(i).filter(d));if(r.length<2)return e;const a=(e,n)=>l({line:e,method:n,localShopId:o,marketDrivenShippingEnabled:p,remoteShopsConfigMap:v,remoteMerchandiseDetails:S.value}),L=r.some(e=>function({line:e,localShopId:o,marketDrivenShippingEnabled:i,remoteShopsConfigMap:r,remoteMerchandiseDetails:a}){const s=n(e,a,o);if(s===o)return i;const d=r?.get(s);return d?d.marketDrivenShippingEnabled:e.methods.some(e=>Boolean(t(e)))}({line:e,localShopId:o,marketDrivenShippingEnabled:p,remoteShopsConfigMap:v,remoteMerchandiseDetails:S.value}));if(!L)return e;const I=h(b.deliveryLines.value),k=u(r,I),C=k.filter(e=>Boolean(e.method)),w=C.length===r.length?c(C.map(({line:e,method:n})=>({...n,amountCombinabilityToken:a(e,n)}))):void 0,y=M(k.filter(T));return{includedMethods:f(r,k,a),total:w,presentsConsolidatedShipping:L,groups:y}})}export{L as a,b,M as c,T as i,g as m,I as o,S as s,k 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.