PageSourceSearch

https://respoke.com/cdn/shopifycloud/checkout-web/assets/c1/d6447d9e.CjZeRf6L.js

js respoke.com collected 2026-10-06 22:38:01 UTC 8,671 bytes, 1 lines download raw bytes

1import{q as e,T as i,u as n,g as t,h as s,S as r,z as o,k as a,w as l}from"./2c1ab0fe.Bywc2Brn.js";import{b as c,a as d}from"./efa0389a.BrVghuh8.js";import{v as u,j as p,cd as h,f as g,o as m,U as y,S as f,t as _,H as v,cY as b,aa as C,a9 as D,ar as S,cZ as R}from"./164ad2e3.DHuJhR22.js";import{C as M}from"./a422df8c.69YDwZq9.js";import{c as E,Z as w,b9 as L,bf as P,z as B,c9 as T,bl as k,ba as x,cq as A}from"./9dba8418.DInoCEzY.js";import{D as j}from"./f49d4216.aE0oi_Pc.js";import{a as N}from"./f51e663e.Cswasroy.js";import{u as O,b as z}from"./64de7b49.CLNCr43I.js";import{m as H}from"./21cc90a2.DHzOO82q.js";import{S as I}from"./8e79be58.WzN5b53K.js";import{a as U,u as $,S as q,E as G}from"./347b440c.8UmgLgUR.js";import{S as F}from"./90e26f5f.BfJG0RLt.js";import{c as V}from"./31cc568e.95lmLO5k.js";const Y="pay_now",Z="pay_on_delivery",Q=()=>{const{i18n:t,checkout:{negotiator:s}}=E(),{negotiate:r}=u(),{optionalDuties:o}=s.parts,a=e(()=>{o.value={buyerRefusesDuties:!o.value?.buyerRefusesDuties,refuseDutiesPermitted:Boolean(o.value?.refuseDutiesPermitted)},r({silenceViolations:w(["deliveryNext","paymentLines"])})},[o,r]),{buyerRefusesDuties:l}=o.value||{},d=i(()=>[l?Z:Y],[l]);return n(M,{name:"duty_options",values:d,onChange:a,children:[n(c,{value:Y,details:n(p,{color:"subdued",children:t.translate("shipping.duties_and_taxes_options.ddp_caption")}),children:n(p,{children:t.translate("shipping.duties_and_taxes_options.ddp_title")})}),n(c,{value:Z,details:n(p,{color:"subdued",children:t.translate("shipping.duties_and_taxes_options.ddu_caption")}),children:n(p,{children:t.translate("shipping.duties_and_taxes_options.ddu_title")})})]})},W={id:"4469203c73c7b5540585d432935fd7580de7198a6cb0754b76a9ecc56da9f00b",type:"query",name:"ShippingRatesStatus",source:""},J=e=>{const i=t(!1),n=t(!1),r=t(0),{graphql:{coreGraphql:o},checkout:{negotiator:a}}=E(),{value:l}=a.current.fields.deliveryNext,c=L("deliveryNext").value,{negotiate:d}=u();return s(()=>{n.current=c},[c]),s(()=>{let t;l&&"filled"===l.status&&l.intermediateRates&&l.shippingRatesStatusToken&&l.progressiveRatesEstimatedTimeUntilCompletion?(i.current=!0,r.current=l.progressiveRatesEstimatedTimeUntilCompletion):(i.current=!1,r.current=0);const s=async()=>{if(!n.current){const n=await o.staticQuery(W,{variables:{token:l.shippingRatesStatusToken},cache:!1});"COMPLETED"===n?.data?.shippingRatesStatus?d({silenceViolations:["non-stock",...P],customizeNegotiation:e=>(e.delivery.useProgressiveRates=!1,e)}).finally(()=>{"function"==typeof e&&e()}).catch(e=>{throw e}):i.current&&(t=setTimeout(s,r.current))}};return i.current&&(t=setTimeout(s,r.current)),()=>t&&clearTimeout(t)},[e,o,d,l]),"filled"===l?.status&&l.intermediateRates},K=({deliveryMethod:e})=>{const{i18n:i}=E(),{cost:t,costAfterDiscounts:s,priceBreakdown:r}=e,[o]=r??[];if(!o||1!==r?.length)return null;const a=i.formatCurrency(s.amount,{currency:s.currencyCode}),l=o.excludeFromDeliveryOptionPrice,c=!o.targetMerchandiseLines[0]?.sellingPlan?.prepaid,{amount:d}=t,{amount:u}=s,h=c&&l?i.translate("shipping.subscription_delivery_description.shipping_price_included"):a;return d>u?n(U,{cost:t,costAfterDiscounts:s}):n(p,{children:h})},X=({priceBreakdown:e,discountedShippingPrice:i,sellingPlan:t,subscriptionDetails:s})=>{const{i18n:r}=E(),o=h(),{deliveryInterval:a,billingIntervalCount:l,billingMaxCycles:c}=s,d=o(a,l),{amount:u,discountRecurringCycleLimit:p,excludeFromDeliveryOptionPrice:m}=e,y=r.formatCurrency(u.amount,{currency:u.currencyCode}),f=t.prepaid?!c||c>1?function(){const e=`${y} ${d}`;return b()?v(p,e):m?D(e):`${C(t.deliveriesPerBillingCycle)} ${d}`}():_():function(){const e=`${y} ${d}`;return 1===t.subscriptionDetails.billingMaxCycles?_():b()||0!==i.amount&&i.amount<u.amount?v(p,e):m?D(e):d}();function _(){const e=m&&!b()?t.deliveriesPerBillingCycle-1:t.deliveriesPerBillingCycle;return e>0?V(C(e)):""}function v(e=0,i){return[r.translate("shipping.subscription_delivery_description.free_for_first_n_order",{count:e}),D(i)].filter(e=>""!==e.trim()).join(", ")}function b(){return 0===i.amount&&void 0!==p}function C(e){return r.translate("shipping.subscription_delivery_description.prepaid_delivery_frequency",{count:e})}function D(e){return r.translate("shipping.subscription_delivery_description.recurring_order_shipping_price",{recurring_order_shipping_price:e})}return n(g,{color:"subdued",type:"small",children:V(f)})},ee=({deliveryMethod:e})=>{const{i18n:t}
1=E(),{deliveryExpectationLines:s}=$(),o=m("Checkout::ShippingMethodDetails::RenderAfter"),a=m("Checkout::ShippingMethodDetails::RenderExpanded"),l=e?.handle??"",u=i(()=>[l],[l]),p=i(()=>({handle:l,isInModal:!1}),[l]);if(null==e)return null;const{title:h,priceBreakdown:g,costAfterDiscounts:_}=e;if(!g)return null;const v=g.every(e=>0===e.discountRecurringCycleLimit),b=!v&&1===g.length,[C]=g,D="LOCAL"===e.methodType?t.translate("shipping.local_delivery"):h,S=o.length>0,R=s?.find(i=>i.deliveryStrategyHandle===e.handle);return n("fieldset",{children:[n("legend",{className:B({screenReaders:"only"}),children:t.translate("general.choose_shipping_method")}),n(d,{name:"subscription_shipping_method",variant:"block",values:u,onChange:()=>{},hideRadioControl:!0,children:n(c,{value:l,details:n(r,{children:[n(q,{methodTitle:D}),n(G,{deliveryMethod:e,deliveryExpectationLine:R,paragraphColor:"subdued"})]}),secondaryContent:n("div",{className:"LkR2o",children:[n(K,{deliveryMethod:e}),b&&C&&function(e){const i=e.targetMerchandiseLines[0]?.sellingPlan;return i?.subscriptionDetails?n(X,{priceBreakdown:e,discountedShippingPrice:_,sellingPlan:i,subscriptionDetails:i.subscriptionDetails}):null}(C)]}),tertiaryContent:S&&n(y,{customizations:o,options:p}),renderSelectedContentWhenCollapsed:!0,selectedContent:((i,t,s)=>{const r=!i&&t.length>1,o=s.length>0;return r||o?n(f,{gap:"large-200",children:[r&&n(F,{deliveryMethod:e}),o&&n(y,{customizations:s,options:p})]}):null})(v,g,a),children:D})})]})},ie=({line:e,showHeader:t,loadingAdditionalShippingRates:s,hasMultipleShippingLines:r})=>{const{i18n:o}=E(),{customizationsBefore:a,customizationsAfter:l}=O({targeted:!0,hasMultipleDeliveryGroups:Boolean(r)}).value,c=T(),[d]=_({type:e.type}),{methods:u,type:p}=e,h=i(()=>({groupType:H(p),includeDeliverySelectionGroups:!1}),[p]),g=i(()=>u.find(e=>e.handle===d)||(u.length>0?u[0]:void 0),[u,d]),m=t?n(v,{level:3,children:"ONE_TIME_PURCHASE"===p?o.translate("shipping.shipping_method_first_shipment_group_title",{count:1}):o.translate("shipping.shipping_method_recurring_shipments_group_title.other")}):null,b="ONE_TIME_PURCHASE"!==p&&c.value?n(ee,{deliveryMethod:g}):n(I,{type:p,methods:u,loadingAdditionalShippingRates:s});return n(f,{gap:"small-200",children:[m,n(y,{customizations:a,options:h}),b,n(y,{customizations:l,options:h})]})};function ne({lines:t,loading:r,showErrorBanner:c=!1,deliveryChangedBannerOwnedBySection:d=!1}){const{showBanner:u,onDismiss:p}=function(n){const t=b(),[r,a]=o(!1),l=i(()=>n.flatMap(e=>e.hasDeliveryLineChange&&e.id?e.id:[]).sort().join(","),[n]);s(()=>{l&&a(!0)},[l]);const c=e(()=>{a(!1)},[]);return i(()=>{if(!r)return{showBanner:!1,onDismiss:c};const e=t.some(({code:e})=>"MERCHANDISE_CART_UPDATED_BASED_ON_COUNTRY"===e||"TaxExemption"===e);return e?{showBanner:!1,onDismiss:c}:{showBanner:r&&!e&&(n.length>1||n.some(e=>e.methods?.length>1)),onDismiss:c}},[n,t,r,c])}(t),{shop:h,i18n:g,checkout:{negotiator:m}}=E(),y=m.current.fields.deliveryNext,_=a(()=>k(y.value,!0)),{deliveryMacros:v}=m.parts,M=a(()=>x(y.value)),w=a(()=>v.value?.length>0||M.value),L=h.hasFlagEnabled(A),{showShipmentBreakdown:P}=z().value,B=L&&t.some(e=>e.targetMerchandiseLines?.some(e=>e.properties.some(e=>"_shopify_non_subscription_item"===e.name))),T=n(D,{tone:"info",errorType:C.DeliveryError,dismissible:!0,onDismiss:p,children:g.translate("shipping_errors.shipping_method")}),O=!P&&(t.length>1||function(e){const i=e[0];return!(1!==e.length||!i)&&"SUBSCRIPTION"===i.type&&i.methods.some(e=>e.displayCheckoutRedesign)}(t)),{subscriptionLines:H,oneTimePurchaseLines:I}=S(t);return n(R,{target:"cart.deliveryGroups[0].deliveryAddress",children:[(u&&!d||c)&&T,n(l,{when:_,fallback:(()=>{const[e]=I;return H.length>0&&e&&1===I.length?n(f,{gap:"large",children:[n(ie,{line:e,showHeader:O&&!B,loadingAdditionalShippingRates:r,hasMultipleShippingLines:!0}),!B&&n(N,{subscriptionLines:H})]}):t.map(e=>n(ie,{line:e,showHeader:O,loadingAdditionalShippingRates:r,hasMultipleShippingLines:t.length>1},e.id??`${e.type}-${t.indexOf(e)}`))})(),children:n("fieldset",{children:n(f,{gap:"large",children:[n(l,{when:w,children:n(j,{deliveryLines:I,deliveryMacrosOmitted:M.value})}
1),n(N,{subscriptionLines:H})]})})})]})}export{Q as D,ne 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.