1import{s as e,u as i,l as a,x as s,q as t,m as n,t as r,_ as l,w as o,j as c,f as d,C as p,S as u}from"./2c1ab0fe.GMbxnz74.js";import{L as h,bP as m,bQ as v,bR as g,bS as f,R as b,i as y,bT as _,bU as j,w,bi as k,q as S,_ as D,V as x,X as A,r as I,Y as P,U as L,a3 as z,c as E,H as G,bV as M,P as N,aa as T,s as C,m as R,$ as V,p as F,I as B,o as U,bW as W}from"./164ad2e3.BmqNdq2P.js";import{T as q}from"./7b0c98ea.DbgJLP1v.js";import{u as O,S as Y,D as $}from"./d6447d9e.so38cQCJ.js";import{S as K}from"./f51e663e.0jgrFL1L.js";import{S as Q,c2 as H,T as J,bh as X,W as Z,aE as ee,t as ie,J as ae,bG as se}from"./4c290a1e.2OXqqQwu.js";import{P as te}from"./f49d4216.BpQn4XLS.js";import{a as ne,b as re,E as le}from"./a422df8c.Dcy8n41E.js";import{m as oe}from"./21cc90a2.BYvnDDaS.js";import{b as ce,c as de,u as pe}from"./64de7b49.3gNLw9g0.js";import{u as ue}from"./9f047e05.Bp-gLL-x.js";import{u as he,S as me}from"./ca5e9c49.DpiukyMw.js";import{h as ve}from"./31cc568e.udVq2alB.js";import"./app.iZwEIta_.js";import"./0a7dffce.BIRsKacx.js";import"./5fda1420.C7SyMXTh.js";import"./60a453ce.fEeMtJEq.js";import"./bb728e1c.D-ELh9cQ.js";import"./efa0389a.BaeWUwuC.js";import"./8e79be58.DxsDx_ZB.js";import"./0727407f.C7yJLDwL.js";import"./347b440c.BOPV79c3.js";import"./d5d34b3b.KVrpsmYg.js";import"./47b970b2.B-hNfQZG.js";import"./29034f35.B7Z7JU9E.js";import"./ac5a19ff.DlwW5UC8.js";import"./90e26f5f.BU9IB2gY.js";const ge="/cdn/shopifycloud/checkout-web/assets/c1/assets/shipping.CG9i_A4v.svg",fe=()=>{const{i18n:e,checkout:a}=Q(),s=a.configuration.layout.isOnePage.value,t=i(h,{href:"/information",children:e.translate("shipping.shipping_information_redirect_link")});return i(le,{children:[!s&&i(ne,{children:i("img",{src:ge,alt:""})}),i(re,{children:e.translate("shipping.shipping_information_required_notice",{link:t})})]})},be=()=>{const{i18n:e,checkout:a}=Q(),s=a.configuration.layout.isOnePage.value;return i(le,{children:[!s&&i(ne,{children:i("img",{src:ge,alt:""})}),i(re,{children:e.translate("shipping_errors.shipping_method_not_available_generic.one")})]})};function ye(){const{i18n:p}=Q(),u=m(),{allViolations:h,deliveryNext:g}=J(),f=X("deliveryNext"),b=function(){const{userEvents:i}=Q(),a=H();return e((e,s,t)=>{const n={schemaId:"checkout_display_shipping_methods/1.0",payload:{eventTimestamp:s,shopId:a.value.defaultAttributes?.shopId||1,apiClientId:t,promiseRetrievalTime:e}};i.monorailEvent(n)},[i,a.value.defaultAttributes?.shopId])}(),y=a(f.peek()),[,_]=s(),j=a(void 0),w=t(!1),{shippingAddress:k}=Z(),S=O(_),D=v();n(()=>{w.value=!0},[w]);const x=r(()=>{const e=u.value.shippableDeliveryLines;return e?ee(e):[]});l(()=>c(()=>
1{if(f.value)return void(j.current??=Date.now());y.current=!1;const e=j.current;if(null==e)return;const i=Date.now(),a=i-e,s=x.peek()[0]?.methods[0]?.deliveryPromiseProviderApiClientId;if(j.current=void 0,!s)return;const t=ae(s);d(()=>{b(a,i,Number(t)),D(a,Number(t))})}),[f,D,x,b]);const A=r(()=>h.value?.some(e=>"target"in e&&e.target.startsWith("$.cart.deliveryGroups[0].deliveryAddress"))),I=r(()=>function({deliveryLoading:e,showLoading:i,hasMounted:a,hasFilledShippingMethods:s}){return e&&i&&(a||!s)}({deliveryLoading:f.value,showLoading:y.current,hasMounted:w.value,hasFilledShippingMethods:"filled"===g.value?.status&&x.value.length>0}));return i(o,{when:()=>!I.value,fallback:i(te,{text:p.translate("shipping.waiting_on_rate_notice")}),children:i(o,{when:()=>!A.value,fallback:i(je,{}),children:i(o,{when:()=>!ie(k.value),fallback:i(fe,{}),children:i(o,{when:()=>"filled"===g.value?.status,fallback:i(_e,{}),children:i(o,{when:()=>x.value.length>0,fallback:i(_e,{}),children:i(Y,{lines:x.value,loading:S})})})})})})}function _e(){const{deliveryNext:e,shippingAddress:a}=J(),{shippingAddress:s}=Z(),t=g();return i(o,{when:()=>{const i=s.value,n=t(i);return f({deliveryNext:e.value,proposedAddress:i,negotiatedAddress:a.value,reloadStrategy:n})},fallback:i(fe,{}),children:i(be,{})})}function je(){const{router:e}=Q();return e.redirect("/information"),null}const we=e=>i(z,{children:e});function ke(){const{i18n:e,checkout:a}=Q(),{nextPage:s,previousPage:t}=b(),{progress:n,progressing:l}=y(),{deliveryNext:c,optionalDuties:h}=J(),m=X("deliveryNext").value,v=e.translate("shipping.shipping_method_title"),g=e.translate("shipping.duties_and_taxes_title"),f=e.translate("general.continue_to_payment_method"),O=a.configuration.layout.isOnePage.value,Y=_(),H=j(),Z=ce(),ee=r(()=>se(c.value)||Z.value.showShipmentBreakdown?"small-400":"base"),ie=de(),{customizationsBefore:ae,customizationsAfter:te}=pe({hasMultipleDeliveryGroups:ie.value.hasMultipleDeliveryGroups,targeted:!1}).value,ne=w("Checkout::Dynamic::Render","DELIVERY1"),re=w("Checkout::Dynamic::Render","DELIVERY2");he({stage:m?me.Usable:me.Complete,id:"Shipping"}),ue("shipping");const le=r(()=>null==c.value||"unavailable"===c.value.status);k(e=>{"success"===e.type&&"progression"===e.negotiationStage&&(Y("pageSubmit",{timestamp:new Date}),H({type:"page_submit",page:"shipping"}))});const ge=r(()=>Boolean(c.value));p(()=>{ge.value&&d(()=>{Y("shippingMethodsFilled",{timestamp:new Date}),H({type:"shipping_methods_filled"})})});const fe=r(()=>{const e=ie.value.onlyDeliveryGroupType;return{groupType:e?oe(e):void 0,includeDeliverySelectionGroups:!1}});return i(u,{children:[i(S,{children:e.translate("shipping.title")}),i(D,{onSubmit:()=>n("shipping-page-submit"),disabled:l.value||le.value,implicitSubmit:f,children:i(x,{section:"delivery",children:i(A,{section:"delivery",children:i(I,{children:[i(P,{children:[i(L,{customizations:ne,render:we}),i(z,{accessibilityLabel:v,children:i(E,{gap:ee.value,children:[i(E,{gap:"small-400",children:[i(G,{autoFocus:!O,id:M,level:1,children:v}),ve("shipping.shipping_method_notice",e)?i(N,{children:e.translate("shipping.shipping_method_notice")}):null]}),i(E,{gap:"base",children:i(T,{children:[i(o,{when:()=>Z.value.showShipmentBreakdown,children:i(q,{children:i(K,{})})}),i(L,{customizations:ae,options:fe.value}),i(ye,{}),i(L,{customizations:te,options:fe.value})]})})]})}),i(o,{when:()=>h.value?.refuseDutiesPermitted,children:i(z,{accessibilityLabel:g,children:i(E,{gap:"large-200",children:[i(G,{id:`${M}-duties-and-taxes`,level:1,children:g}),i($,{})]})})}),i(L,{customizations:re,render:we})]}),i(C,{children:[i(R,{children:i(V,{inlineSize:"fill",disabled:le.value,type:"submit",loading:l.value,size:"large",pixelId:"go_to_next_step",variant:"primary",children:s.label})}),t.route?i(F,{children:i(V,{href:t.route,variant:"plain",inlineSize:"fill",textDecoration:"none",pixelId:"go_to_previous_step",children:i(E,{direction:"inline",gap:"small-200",alignItems:"center",children:[i(B,{type:"chevron-left",size:"small"}),i(U,{children:t.label})]})})}):null]})]})})})}),i(W.Prefetch,{})]})}
1export{ke as default};
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.