PageSourceSearch

https://arttactic.com/_next/static/chunks/app/(user)/cart/page-800c6da437b65c5a.js

js arttactic.com collected 2026-10-02 05:50:42 UTC 9,173 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[5945],{3406:function(e,t,s){Promise.resolve().then(s.bind(s,98224))},33145:function(e,t,s){"use strict";s.d(t,{default:function(){return a.a}});var r=s(48461),a=s.n(r)},48461:function(e,t,s){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var s in t)Object.defineProperty(e,s,{enumerable:!0,get:t[s]})}(t,{default:function(){return o},getImageProps:function(){return i}});let r=s(47043),a=s(55346),l=s(65878),n=r._(s(5084));function i(e){let{props:t}=(0,a.getImgProps)(e,{defaultLoader:n.default,imgConf:{deviceSizes:[640,750,828,1080,1200,1920,2048,3840],imageSizes:[16,32,48,64,96,128,256,384],path:"/_next/image",loader:"default",dangerouslyAllowSVG:!1,unoptimized:!1}});for(let[e,s]of Object.entries(t))void 0===s&&delete t[e];return{props:t}}let o=l.Image},85092:function(e,t,s){"use strict";s.d(t,{C:function(){return l}});var r=s(7261);let a={position:"top-right",autoClose:5e3,hideProgressBar:!1,closeOnClick:!0,pauseOnHover:!0,draggable:!0,progress:void 0,theme:"colored",transition:r.sm},l=(e,t,s)=>{let l={...a,...s};switch(e){case"success":return r.Am.success(t,l);case"error":return r.Am.error(t,l);case"info":return r.Am.info(t,l);case"warning":return r.Am.warn(t,l);default:return(0,r.Am)(t,l)}}},98224:function(e,t,s){"use strict";var r=s(57437),a=s(2265);s(92622);var l=s(49036),n=s(33145),i=s(37225),o=s(80605),c=s(19731),d=s(94295),u=s(35389),m=s(85092),x=s(60993),h=s(83788);let f=e=>{let{product:t,handleRemove:s}=e;return(0,r.jsxs)("tr",{children:[(0,r.jsxs)("td",{className:"w-[30%] pt-8",children:[(0,r.jsx)("a",{href:"/reports/"+(null==t?void 0:t.slug),children:(0,r.jsx)(n.default,{src:(0,c.I)(t.featuredImage),alt:"".concat(t.title," (Framed Image)"),width:"0",height:"0",sizes:"100vw",className:"h-auto w-full max-w-40 object-contain"})}),(0,r.jsxs)("h6",{className:"mt-2 line-clamp-3 text-left leading-snug",children:[" ",(0,r.jsx)("a",{href:"/reports/"+(null==t?void 0:t.slug),className:"transition-all duration-200 ease-in-out hover:text-orange-e7 hover:underline",children:t.title})," "]})]}),(0,r.jsx)("td",{className:"w-1/5 pt-8",children:(0,h.W5)(t.subtotal/t.qty)}),(0,r.jsx)("td",{className:"w-1/5 pt-8",children:(0,h.W5)(t.subtotal)}),(0,r.jsx)("td",{className:"w-[10%] pt-8",children:(0,r.jsx)("button",{className:"text-2xl 3xl:text-3xl",onClick:()=>s(t),children:(0,r.jsx)(d.QAE,{})})})]})},p=e=>{let{product:t,handleRemove:s}=e;return(0,r.jsxs)("div",{className:"grid grid-cols-5 space-x-3 text-left",children:[(0,r.jsxs)("div",{className:"col-span-4 flex space-x-3",children:[(0,r.jsx)("a",{href:"/reports/"+(null==t?void 0:t.slug),className:"block w-[35%]",children:(0,r.jsx)(n.default,{src:(0,c.I)(t.featuredImage),alt:"".concat(t.title," (Framed Image)"),width:"0",height:"0",sizes:"100vw",className:"h-full w-full object-contain"})}),(0,r.jsxs)("div",{className:"flex w-[65%] flex-col justify-between",children:[(0,r.jsxs)("h6",{className:"mt-1 text-left leading-snug",children:[" ",(0,r.jsx)("a",{href:"/reports/"+(null==t?void 0:t.slug),className:"line-clamp-2 transition-all duration-200 ease-in-out hover:text-orange-e7 hover:underline",children:t.title})," "]}),(0,r.jsx)("p",{children:(0,h.W5)(t.subtotal)})]})]}),(0,r.jsxs)("div",{className:"flex flex-col items-end justify-between",children:[(0,r.jsx)("button",{className:"text-lg sm:text-xl",onClick:()=>s(t),children:(0,r.jsx)(d.QAE,{})}),(0,r.jsxs)("p",{children:["Qty: ",t.qty]})]})]})},g=e=>{let{text:t,href:s=null,onClick:a,...l}=e;return null!==s||s?(0,r.jsx)("a",{href:s,className:"block w-full rounded-md border-[1px] border-black bg-black-70 p-1 font-medium text-inherit text-white transition-colors duration-200 ease-in-out hover:bg-transparent hover:text-black md:w-4/5",...l,children:t}):(0,r.jsx)("button",{className:"w-full rounded-md border-[1px] border-black bg-orange-e7 p-1 font-medium text-inherit text-white transition-colors duration-200 ease-in-out hover:bg-transparent hover:text-black md:w-4/5",onClick:a,...l,children:t})};t.default=function(){let{data:e}=(0,o.useSession)(),{cartData:t,totalPrice:s,removeCartItem:n}=(0,x.j)(),[c,d]=(0,a.useState)(!1),j=e=>{n(e._id),window&&(window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"remove_from_cart",ecommerce:{items:[{id:e._id,name:e.title,price:e.subtotal,quantity:1,url:window.location.origin+"/reports/"+e.slug}]}}))},w=async()=>{e||(window.location.href="/login?"+new URLSearchParams({redirect:"/cart"})),d(!0);let s=t.map(e=>({id:e._id,qty:e.qty})),r={email:e.user.email,itemData:s};try{let t=await i.Z.report.purchase(r,e.accessToken);window.location.href=null==t?void 0:t.session.url}catch(e){d(!1),(0,m.C)("error",e.message)}};return 0===t.length?(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("h1",{className:"page-title !leading-normal",children:"Your Shopping Cart Is Empty"}),(0,r.jsx)("div",{className:"mt-8 lg:mt-14",children:(0,r.jsx)("a",{className:"mx-auto block w-full max-w-96 rounded-md border-[1px] border-black bg-orange-e7 p-1 font-medium text-inherit text-white transition-colors duration-200 ease-in-out hover:bg-transparent hover:text-black md:w-4/5",href:"/reports",children:"Go to Reports"})})]}):(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("h1",{className:"page-title !leading-normal",children:"Your Shopping Cart"}),(0,r.jsxs)("div",{className:"mt-8 bg-white-f8 px-4 py-8 md:px-6 md:py-10 lg:mt-16 lg:px-8 lg:py-14",children:[(0,r.jsx)("h2",{className:"title-h2 !text-left !font-playfair-display !font-bold !leading-none",children:"Order details"}),(0,r.jsxs)("div",{className:"mt-8 overflow-x-auto lg:mt-12",children:[(0,r.jsxs)("table",{className:"hidden w-full min-w-[412px] md:table ".concat(l.pq," text-center font-medium"),children:[(0,r.jsx)("thead",{children:(0,r.jsxs)("tr",{children:[(0,r.jsx)("th",{className:"w-[30%] text-left font-medium",children:"Item"}),(0,r.jsxs)("th",{className:"w-1/5 font-medium",children:["Item Cost ",(0,r.jsx)("br",{}),"(GBP)"]}),(0,r.jsxs)("th",{className:"w-1/5 font-medium",children:["Subtotal",(0,r.jsx)("br",{}),"(GBP)"]}),(0,r.jsx)("th",{className:"w-[10px] font-medium"})]})}),(0,r.jsx)("tbody",{children:t.map((e,t)=>(0,r.jsx)(f,{product:e,handleRemove:j},t))}),(0,r.jsxs)("tfoot",{className:"text-left font-medium",children:[(0,r.jsx)("tr",{children:(0,r.jsx)("td",{className:"w-full py-10",colSpan:5,children:(0,r.jsx)("div",{className:"h-[1px] w-full bg-black opacity-80"})})}),(0,r.jsxs)("tr",{children:[(0,r.jsx)("td",{colSpan:2,className:"pt-4",children:"Total"}),(0,r.jsx)("td",{className:"pt-4 text-center",children:(0,h.W5)(s)})]})]})]}),(0,r.jsxs)("div",{className:"block font-medium md:hidden",children:[(0,r.jsx)("div",{className:"space-y-12",children:t.map((e,t)=>(0,r.jsx)(p,{product:e,handleRemove:j},t))}),(0,r.jsxs)("div",{children:[(0,r.jsx)("div",{className:"my-6 h-[1px] w-full bg-black opacity-80"}),(0,r.jsxs)("div",{className:"flex items-center justify-between",children:[(0,r.jsx)("p",{children:"Total"}),(0,r.jsx)("p",{children:(0,h.W5)(s)})]})]})]})]}),(0,r.jsxs)("div",{className:"mt-8 flex flex-col items-center justify-between gap-6 md:mt-12 md:flex-row md:gap-8",children:[(0,r.jsx)(g,{text:"Continue shopping",href:"/reports"}),(0,r.jsx)(g,{text:c?(0,r.jsx)("span",{className:"flex w-full items-center justify-center px-2 py-1",children:(0,r.jsx)(u.Z,{size:20,sx:{color:"#FFFFFF"}})}):"Checkout",onClick:w,disabled:c})]})]})]})}},60993:function(e,t,s){"use strict";s.d(t,{CartProvider:function(){return o},j:function(){return c}});var r=s(57437),a=s(27648),l=s(2265),n=s(32768);let i=(0,l.createContext)(),o=e=>{let{children:t}=e,s="cart989",[o,c]=(0,l.useState)([]),[d,u]=(0,l.useState)(0);return(0,l.useEffect)(()=>{let e=()=>{let e=JSON.parse(localStorage.getItem(s))||[];c(e),u(e.reduce((e,t)=>
1e+t.subtotal,0))};e();let t=t=>{t.key===s&&e()};return window.addEventListener("storage",t),()=>{window.removeEventListener("storage",t)}},[]),(0,r.jsxs)(i.Provider,{value:{cartData:o,addToCart:e=>{let t=[...o,e];c(t),u(t.reduce((e,t)=>e+t.subtotal,0)),localStorage.setItem(s,JSON.stringify(t))},removeCartItem:e=>{let t=o.filter(t=>t._id!==e);c(t),u(t.reduce((e,t)=>e+t.subtotal,0)),localStorage.setItem(s,JSON.stringify(t))},totalPrice:d},children:[t,(0,r.jsx)(a.default,{href:"/cart",className:"group ".concat(o.length>0?"opacity-100":"opacity-0"," transition-opacity duration-200 ease-in-out"),children:(0,r.jsx)("div",{className:"fixed bottom-4 right-4 z-50",children:(0,r.jsx)("div",{className:"rounded-full bg-orange-e7 p-3 shadow-md transition-colors duration-200 ease-in-out group-hover:bg-white",children:(0,r.jsx)(n.toq,{className:"text-2xl text-white transition-colors duration-200 ease-in-out group-hover:text-black md:text-3xl 3xl:text-4xl"})})})})]})},c=()=>(0,l.useContext)(i)},19731:function(e,t,s){"use strict";s.d(t,{I:function(){return n}});let{accountName:r,publicContainerName:a,privateContainerName:l}=s(92622).default.azure.storage;function n(e){return"https://".concat(r,".blob.core.windows.net/").concat(a,"/").concat(e)}}},function(e){e.O(0,[5452,5706,8610,9562,7983,605,813,7261,5878,599,3788,7225,2971,2117,1744],function(){return e(e.s=3406)}),_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.