PageSourceSearch

https://ed-higher.com/_next/static/chunks/app/cart/page-4dd300e53bc3eddb.js

js ed-higher.com collected 2026-10-03 20:08:07 UTC 12,561 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4005],{4196:(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>S});var a=s(5155),n=s(2115),i=s(6720),l=s(1811);let d={name:"info",size:24,node:[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]]};d.node;let r=(0,l.A)(d);var c=s(4962),m=s(6620),o=s(4327),x=s(8370),u=s(5198),h=s(8500),p=s.n(h),y=s(9005),j=s(6565),b=s(2125),v=s(8599),f=s(9770);function N({line:e}){let{updateQuantity:t,removeItem:s}=(0,x._)(),{product:n,quantity:i,variant:l}=e,d=(0,f.Y)(n.source),r=n.estimatedShipping??0,c=n.estimatedTaxes??0,m=n.estimatedServiceFee??0,o=n.estimatedLandedPrice??0;return(0,a.jsxs)("div",{className:"flex flex-col sm:flex-row gap-4 py-5",children:[(0,a.jsx)("img",{src:n.image,alt:n.title,className:"h-24 w-24 rounded-xl object-cover shrink-0"}),(0,a.jsxs)("div",{className:"flex-1",children:[(0,a.jsxs)("div",{className:"flex items-start justify-between gap-3",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)(p(),{href:`/products/${n.id}`,className:"text-sm font-semibold text-navy-900 hover:underline",children:n.title}),(0,a.jsx)("p",{className:"text-xs text-navy-500 mt-0.5",children:d?.name??n.source}),l&&Object.keys(l).length>0&&(0,a.jsx)("p",{className:"text-xs text-navy-500 mt-0.5",children:Object.entries(l).map(([e,t])=>`${e}: ${t}`).join(" \xb7 ")})]}),(0,a.jsx)("button",{onClick:()=>s(n.id),"aria-label":"Remove item",className:"text-navy-400 hover:text-navy-700",children:(0,a.jsx)(y.A,{className:"h-4 w-4"})})]}),(0,a.jsxs)("div",{className:"mt-3 flex flex-wrap items-center justify-between gap-4",children:[(0,a.jsxs)("div",{className:"inline-flex items-center rounded-full border border-line",children:[(0,a.jsx)("button",{onClick:()=>t(n.id,i-1),className:"flex h-8 w-8 items-center justify-center text-navy-700","aria-label":"Decrease quantity",children:(0,a.jsx)(j.A,{className:"h-3.5 w-3.5"})}),(0,a.jsx)("span",{className:"w-7 text-center text-sm font-medium text-navy-900",children:i}),(0,a.jsx)("button",{onClick:()=>t(n.id,i+1),className:"flex h-8 w-8 items-center justify-center text-navy-700","aria-label":"Increase quantity",children:(0,a.jsx)(b.A,{className:"h-3.5 w-3.5"})})]}),(0,a.jsxs)("div",{className:"text-right",children:[(0,a.jsxs)("p",{className:"text-xs text-navy-500",children:[(0,v.$g)(n.price,n.currency)," \xb7 shipping ",(0,v.lD)(r)," \xb7 import ",(0,v.lD)(c+m)]}),(0,a.jsxs)("p",{className:"text-sm font-semibold text-navy-900",children:[(0,v.lD)(o*i)," estimated total"]})]})]})]})]})}var g=s(1275),k=s(9512);function w(){let{cart:e,loading:t,error:s,updateLine:n,removeLine:i}=(0,u.G)();return e&&0!==e.lines.length?(0,a.jsxs)("div",{className:"mb-10",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2 mb-4",children:[(0,a.jsx)("h2",{className:"text-lg font-semibold text-navy-900",children:"Globeport Store order"}),(0,a.jsx)(k.E,{tone:"success",children:"Sold by Globeport"})]}),(0,a.jsxs)("div",{className:"grid grid-cols-1 lg:grid-cols-[1fr_340px] gap-10",children:[(0,a.jsx)("div",{className:"divide-y divide-line rounded-2xl border border-line bg-white px-5",children:e.lines.map(e=>(0,a.jsxs)("div",{className:"flex flex-col sm:flex-row gap-4 py-5",children:[e.image&&(0,a.jsx)("img",{src:e.image,alt:e.title,className:"h-24 w-24 rounded-xl object-cover shrink-0"}),(0,a.jsxs)("div",{className:"flex-1",children:[(0,a.jsxs)("div",{className:"flex items-start justify-between gap-3",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("p",{className:"text-sm font-semibold text-navy-900",children:e.title}),!e.availableForSale&&(0,a.jsx)(k.E,{tone:"muted",className:"mt-1",children:"Sold out"})]}),(0,a.jsx)("button",{onClick:()=>i(e.id),"aria-label":"Remove item",className:"text-navy-400 hover:text-navy-700",disabled:t,children:(0,a.jsx)(y.A,{className:"h-4 w-4"})})]}),(0,a.jsxs)("div",{className:"mt-3 flex flex-wrap items-center justify-between gap-4",children:[(0,a.jsxs)("div",{className:"inline-flex items-center rounded-full border border-line",children:[(0,a.jsx)("button",{onClick:()=>n(e.id,Math.max(1,e.quantity-1)),className:"flex h-8 w-8 items-center justify-center text-navy-700","aria-label":"Decrease quantity",disabled:t,children:(0,a.jsx)(j.A,{className:"h-3.5 w-3.5"})}),(0,a.jsx)("span",{className:"w-7 text-center text-sm font-medium text-navy-900",children:e.quantity}),(0,a.jsx)("button",{onClick:()=>n(e.id,e.quantity+1),className:"flex h-8 w-8 items-center justify-center text-navy-700","aria-label":"Increase quantity",disabled:t,children:(0,a.jsx)(b.A,{className:"h-3.5 w-3.5"})})]}),(0,a.jsx)("p",{className:"text-sm font-semibold text-navy-900",children:(0,v.$g)(e.lineTotal,e.currency)})]})]})]},e.id))}),(0,a.jsxs)("div",{className:"rounded-2xl border border-line bg-paper p-6 h-fit",children:[(0,a.jsx)("p",{className:"text-xs font-semibold uppercase tracking-wide text-navy-500 mb-3",children:"Order summary"}),(0,a.jsxs)("div",{className:"flex justify-between text-sm",children:[(0,a.jsx)("span",{className:"text-navy-600",children:"Subtotal"}),(0,a.jsx)("span",{className:"font-medium text-navy-800",children:(0,v.$g)(e.subtotal,e.currency)})]}),(0,a.jsxs)("div",{className:"mt-3 pt-3 border-t border-line flex justify-between",children:[(0,a.jsx)("p",{className:"text-sm font-semibold text-navy-900",children:"Total"}),(0,a.jsx)("p",{className:"text-base font-semibold text-navy-900",children:(0,v.$g)(e.total,e.currency)})]}),(0,a.jsx)("p",{className:"mt-2 text-xs text-navy-500",children:"Shipping and any applicable tax are calculated at checkout."}),e.checkoutUrl?(0,a.jsx)("a",{href:e.checkoutUrl,className:"mt-5 block",children:(0,a.jsxs)(o.$,{className:"w-full justify-center",size:"lg",children:["Checkout ",(0,a.jsx)(g.A,{className:"h-4 w-4"})]})}):(0,a.jsx)("p",{role:"alert",className:"mt-5 text-sm text-amber-800",children:"Checkout unavailable. Remove products that are no longer approved for Globeport checkout."}),(0,a.jsx)("p",{className:"mt-2 text-xs text-navy-400",children:"Checkout and payment are completed on Globeport's secure Shopify checkout page."}),s&&(0,a.jsx)("p",{className:"mt-3 text-xs text-amber-700",children:s})]})]})]}):null}function S(){let{lines:e,clear:t}=(0,x._)(),{cart:s}
1=(0,u.G)(),[l,d]=(0,n.useState)(!1),h=(0,n.useMemo)(()=>{let t=0,s=0,a=0;for(let n of e)t+=((n.product.estimatedLandedPrice??0)-(n.product.estimatedShipping??0)-(n.product.estimatedTaxes??0)-(n.product.estimatedServiceFee??0))*n.quantity,s+=(n.product.estimatedShipping??0)*n.quantity,a+=((n.product.estimatedTaxes??0)+(n.product.estimatedServiceFee??0))*n.quantity;return{product:t,shipping:s,importCosts:a,total:t+s+a}},[e]),p=!!(s&&s.lines.length>0);return 0!==e.length||p?(0,a.jsxs)(m.m,{className:"py-10 md:py-14",children:[(0,a.jsx)("h1",{className:"text-2xl font-semibold text-navy-900",children:"Your cart"}),(0,a.jsx)("div",{className:"mt-8",children:(0,a.jsx)(w,{})}),0===e.length?null:(0,a.jsxs)("div",{className:"mt-8 grid grid-cols-1 lg:grid-cols-[1fr_340px] gap-10",children:[(0,a.jsx)("div",{className:"divide-y divide-line rounded-2xl border border-line bg-white px-5",children:e.map(e=>(0,a.jsx)(N,{line:e},e.product.id))}),(0,a.jsx)("div",{children:(0,a.jsxs)("div",{className:"rounded-2xl border border-line bg-paper p-6 sticky top-24",children:[(0,a.jsx)("p",{className:"text-xs font-semibold uppercase tracking-wide text-navy-500 mb-3",children:"Estimated order summary"}),(0,a.jsxs)("dl",{className:"space-y-2 text-sm",children:[(0,a.jsxs)("div",{className:"flex justify-between",children:[(0,a.jsx)("dt",{className:"text-navy-600",children:"Product subtotal"}),(0,a.jsx)("dd",{className:"font-medium text-navy-800",children:(0,v.lD)(h.product)})]}),(0,a.jsxs)("div",{className:"flex justify-between",children:[(0,a.jsx)("dt",{className:"text-navy-600",children:"Estimated shipping"}),(0,a.jsx)("dd",{className:"font-medium text-navy-800",children:(0,v.lD)(h.shipping)})]}),(0,a.jsxs)("div",{className:"flex justify-between",children:[(0,a.jsx)("dt",{className:"text-navy-600",children:"Estimated import costs"}),(0,a.jsx)("dd",{className:"font-medium text-navy-800",children:(0,v.lD)(h.importCosts)})]})]}),(0,a.jsxs)("div",{className:"mt-3 pt-3 border-t border-line flex justify-between",children:[(0,a.jsx)("p",{className:"text-sm font-semibold text-navy-900",children:"Estimated total"}),(0,a.jsx)("p",{className:"text-base font-semibold text-navy-900",children:(0,v.lD)(h.total)})]}),(0,a.jsxs)("div",{className:"mt-4 flex gap-2 rounded-xl bg-accent-100 p-3",children:[(0,a.jsx)(r,{className:"h-4 w-4 shrink-0 text-accent-600 mt-0.5"}),(0,a.jsx)("p",{className:"text-xs text-accent-600 leading-relaxed",children:"Final international shipping, duties, taxes and availability are confirmed before purchase."})]}),l?(0,a.jsxs)("div",{className:"mt-5 flex items-center gap-2 rounded-xl bg-emerald-50 px-4 py-3 text-sm text-emerald-700",children:[(0,a.jsx)(c.A,{className:"h-4 w-4 shrink-0"}
1),"Quote requested — our team will confirm final pricing shortly."]}):(0,a.jsx)(o.$,{className:"mt-5 w-full justify-center",size:"lg",onClick:()=>d(!0),children:"Request Order Quote"}),(0,a.jsx)("button",{onClick:t,className:"mt-3 w-full text-center text-xs text-navy-500 hover:text-navy-800",children:"Clear cart"})]})})]})]}):(0,a.jsxs)(m.m,{className:"py-20 text-center max-w-md",children:[(0,a.jsx)(i.A,{className:"h-8 w-8 mx-auto text-navy-400"}),(0,a.jsx)("h1",{className:"mt-4 text-xl font-semibold text-navy-900",children:"Your cart is empty"}),(0,a.jsx)("p",{className:"mt-2 text-sm text-navy-600",children:"Search our global catalogue or paste a product link to get started."}),(0,a.jsxs)("div",{className:"mt-6 flex justify-center gap-3",children:[(0,a.jsx)(o.v,{href:"/search",children:"Search the world"}),(0,a.jsx)(o.v,{href:"/paste-link",variant:"outline",children:"Paste a link"})]})]})}},6366:(e,t,s)=>{Promise.resolve().then(s.bind(s,4196))},6620:(e,t,s)=>{"use strict";s.d(t,{m:()=>i,w:()=>l});var a=s(5155),n=s(8599);function i({children:e,className:t}){return(0,a.jsx)("div",{className:(0,n.cn)("container-gsg",t),children:e})}function l({eyebrow:e,title:t,description:s,className:i}){return(0,a.jsxs)("div",{className:(0,n.cn)("max-w-2xl",i),children:[e&&(0,a.jsx)("p",{className:"text-xs font-semibold uppercase tracking-[0.14em] text-accent-600 mb-3",children:e}),(0,a.jsx)("h2",{className:"text-2xl md:text-3xl font-semibold text-navy-900 text-balance",children:t}),s&&(0,a.jsx)("p",{className:"mt-3 text-navy-600 leading-relaxed",children:s})]})}},6720:(e,t,s)=>{"use strict";s.d(t,{A:()=>i});var a=s(1811);let n={name:"shopping-bag",size:24,node:[["path",{d:"M16 10a4 4 0 0 1-8 0",key:"1ltviw"}],["path",{d:"M3.103 6.034h17.794",key:"awc11p"}],["path",{d:"M3.4 5.467a2 2 0 0 0-.4 1.2V20a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2V6.667a2 2 0 0 0-.4-1.2l-2-2.667A2 2 0 0 0 17 2H7a2 2 0 0 0-1.6.8z",key:"o988cm"}]]};n.node;let i=(0,a.A)(n)},9005:(e,t,s)=>{"use strict";s.d(t,{A:()=>i});var a=s(1811);let n={name:"x",size:24,node:[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]};n.node;let i=(0,a.A)(n)},9770:(e,t,s)=>{"use strict";s.d(t,{Hl:()=>a,Y:()=>n});let a=[{id:"amazon",name:"Amazon",brandId:"amazon",country:"United States",countryCode:"US",integrationStatus:"demo"},{id:"amazon-uk",name:"Amazon UK",brandId:"amazon",country:"United Kingdom",countryCode:"GB",integrationStatus:"demo"},{id:"amazon-us",name:"Amazon US",brandId:"amazon",country:"United States",countryCode:"US",integrationStatus:"demo"},{id:"ebay-uk",name:"eBay UK",brandId:"ebay",country:"United Kingdom",countryCode:"GB",integrationStatus:"demo"},{id:"argos-uk",name:"Argos",brandId:"argos",country:"United Kingdom",countryCode:"GB",integrationStatus:"demo"},{id:"nike-uk",name:"Nike UK",brandId:"nike",country:"United Kingdom",countryCode:"GB",integrationStatus:"demo"},{id:"adidas-uk",name:"Adidas UK",brandId:"adidas",country:"United Kingdom",countryCode:"GB",integrationStatus:"demo"},{id:"apple-uk",name:"Apple UK",brandId:"apple",country:"United Kingdom",countryCode:"GB",integrationStatus:"demo"},{id:"apple-us",name:"Apple US",brandId:"apple",country:"United States",countryCode:"US",integrationStatus:"demo"},{id:"samsung-uk",name:"Samsung UK",brandId:"samsung",country:"United Kingdom",countryCode:"GB",integrationStatus:"demo"},{id:"shopify",name:"Globeport Store",brandId:"globeport",country:"Sri Lanka",countryCode:"LK",integrationStatus:"live"}];function n(e){return a.find(t=>t.id===e)}}},e=>{e.O(0,[8500,8409,9133,8441,3794,7358],()=>e(e.s=6366)),_N_E=e.O()}]);

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.