1import{j as o}from"./fields-x7hmW9EE.js";import{g as c}from"./utils-rt4OdhCA.js";import{i as s,a as f,b as l,c as m,d as T,e as p}from"./date-C2CDivvz.js";try{let e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},r=new e.Error().stack;r&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[r]="9497bd57-bac1-44e4-be92-cc11296a1600",e._sentryDebugIdIdentifier="sentry-dbid-9497bd57-bac1-44e4-be92-cc11296a1600")}catch{}function D(e){return e.decorations.reduce((r,a)=>(r[a.type]||(r[a.type]=c(a.type)),r),{})}function b({settings:e,merch:r,store:a,useStockedTurnaround:i}){if(!r)return 0;if(!a&&(r.preferSameday||r.sameday)){const{turnaround:t}=h({settings:e,merch:r});return t}const d=Object.keys(D(r));let n=[],u=[];d.includes(o.Dtg)&&(n.push(a?e.dtgPartnerMinTurnaround:e.dtgMinTurnaround),u.push(a?e.dtgPartnerMaxTurnaround:e.dtgMaxTurnaround)),d.includes(o.Dtf)&&(n.push(a?e.dtfPartnerMinTurnaround:e.dtfMinTurnaround),u.push(a?e.dtfPartnerMaxTurnaround:e.dtfMaxTurnaround)),d.includes(o.Emb)&&(n.push(a?e.embPartnerMinTurnaround:e.embMinTurnaround),u.push(a?e.embPartnerMaxTurnaround:e.embMaxTurnaround)),d.includes(o.Scr)&&(n.push(a?e.scrPartnerMinTurnaround:e.scrMinTurnaround),u.push(a?e.scrPartnerMaxTurnaround:e.scrMaxTurnaround)),n=n.filter(t=>Number.isInteger(t)&&t>0),u=u.filter(t=>Number.isInteger(t)&&t>0);let y=Math.max(...i?n:u);return l()&&(y+=1),y}function M(){let e=s()?"Same Day":"Next Day";return m()?f()&&(e="Three Day"):T(p())===1?e="Next Day":e="Two Day",e}function h({settings:e,merch:r}
1){const a={samedayName:M(),samedayTitle:e.samedayPreCutoffTitle,samedayDescription:e.samedayPreCutoffDescription,samedayButtonOnTitle:e.samedayPreCutoffTitleButtonOn,samedayButtonOnDescription:e.samedayPreCutoffDescriptionButtonOn,turnaround:1};if(r)if(!m()||f())a.samedayTitle=e.samedayWeekendCutoffTitle,a.samedayDescription=e.samedayWeekendCutoffDescription,a.samedayButtonOnTitle=e.samedayWeekendCutoffTitle,a.samedayButtonOnDescription=e.samedayWeekendCutoffDescription;else{if(s())return a;a.samedayTitle=e.samedayPostCutoffTitle,a.samedayDescription=e.samedayPostCutoffDescription,a.samedayButtonOnTitle=e.samedayPostCutoffTitleButtonOn,a.samedayButtonOnDescription=e.samedayPostCutoffDescriptionButtonOn}return a}function B(e,r){if(!r.items||r.items.length===0)return 0;const a=r.items.map(i=>b({settings:e,merch:i.merch}));return Math.max(...a)}function O(e,r=!0){switch(e){case 1:return`${s()?"Today":f()?"Monday":"Tomorrow"} 4:30pm${r?" (excl. shipping)":""}`;default:return`${e} business day${e>1?"s":""}${r?" (excl. shipping)":""}`}}export{b as a,B as b,O as c,h as d,M as g}; 2//# sourceMappingURL=turnaround-Jm9aoSai.js.map
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.