1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[5630],{60867:function(e,n,r){(window.__NEXT_P=window.__NEXT_P||[]).push(["/frontend/instagram-checkout",function(){return r(55906)}])},19402:function(e,n,r){"use strict";r.r(n),r.d(n,{AuthCallbackLoading:function(){return i},default:function(){return c}});var t=r(85893),a=r(62286),s=r(11045),u=r(19961);function i(){return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("style",{children:"\n .spinner {\n width: 3rem;\n height: 3rem;\n border: 4px solid #e5e5e5;\n border-top: 4px solid #000;\n border-radius: 50%;\n animation: spin 1s linear infinite;\n }\n\n @keyframes spin {\n 0% { transform: rotate(0deg); }\n 100% { transform: rotate(360deg); }\n }\n "}),(0,t.jsx)("header",{className:"header",children:(0,t.jsx)("div",{className:"header__content-wrapper",children:(0,t.jsx)("div",{className:"header__center",children:(0,t.jsx)("img",{src:"https://res.cloudinary.com/taschen/image/upload/v1724856260/permanent-assets/Taschen_Logo_black_f2euvp.svg",alt:"Logo",className:"header__logo"})})})}),(0,t.jsx)("main",{children:(0,t.jsx)("div",{style:{minHeight:"calc(100vh - 61px)",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center"},children:(0,t.jsx)("div",{className:"spinner"})})})]})}function c(e){var n=(0,a.parseCookies)(e).language;return(0,t.jsx)(s.$j,{language:n,children:(0,t.jsx)(u.f8,{children:(0,t.jsx)(i,{})})})}},55906:function(e,n,r){"use strict";r.r(n);var t=r(47568),a=r(26042),s=r(69396),u=r(828),i=r(34051),c=r.n(i),o=r(85893),l=r(80129),d=r.n(l),p=r(11163),f=r(19402),h=r(88848),v=r(42789),g=r(57938),m=r(12340),x=r(11045),_=r(19961),j=r(54959),k=r(35235),w=r(60598),y=r(67294),b=r(55119),C=r.n(b),Z=function(e){var n=e.products,r=e.language,a=(0,p.useRouter)(),s=(0,h.rc)().client,u=((0,v.yL)()||{}).addToCart,i=(0,y.useState)(!1),l=i[0],d=i[1];return(0,y.useEffect)((function(){var e=function(){var e=(0,t.Z)(c().mark((function e(){var t,s,i,o,l,p,f,h,v,g;return c().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:d(!0),s=!0,i=!1,o=void 0,e.prev=3,l=n[Symbol.iterator]();case 5:if(s=(p=l.next()).done){e.next=18;break}return f=p.value,e.prev=7,e.next=10,u(f,f.quantity);case 10:e.next=15;break;case 12:e.prev=12,e.t0=e.catch(7),console.error("Failed to add product ".concat(f.id," to cart"),e.t0);case 15:s=!0,e.next=5;break;case 18:e.next=24;break;case 20:e.prev=20,e.t1=e.catch(3),i=!0,o=e.t1;case 24:e.prev=24,e.prev=25,s||null==l.return||l.return();case 27:if(e.prev=27,!i){e.next=30;break}throw o;case 30:return e.finish(27);case 31:return e.finish(24);case 32:(h=new URL(a.asPath,window.location.origin)).searchParams.delete("products"),v=null===(t=C().filter((function(e){return e.value===r})))||void 0===t?void 0:t[0],g=h.searchParams.size>0?"".concat(v.cartRoute,"?").concat(h.searchParams.toString()):v.cartRoute,a.push({pathname:"/frontend/cart"},g);case 37:case"end":return e.stop()}}),e,null,[[3,20,24,32],[7,12],[25,,27,31]])})));return function(){return e.apply(this,arguments)}}();u&&!l&&s&&e()}),[u,n,l,s,r,a]),(0,o.jsx)(f.AuthCallbackLoading,{})},N=function(e){var n=e.products,r=e.language,t=(0,p.useRouter)();return(0,y.useEffect)((function(){if(!n){var e,a=null===(e=C().filter((function(e){return e.value===r})))||void 0===e?void 0:e[0];t.push({pathname:"/frontend/cart"},a.cartRoute)}}),[n,r,t]),n?(0,o.jsx)(g.Uw,(0,s.Z)((0,a.Z)({},e),{children:(0,o.jsx)(m.Pc,{assetUrl:"MISSING_ENV_VAR".MAKAIRA_ASSET_URL,children:(0,o.jsx)(x.$j,{language:r||"en",children:(0,o.jsx)(_.f8,{children:(0,o.jsx)(j.Rp,{children:(0,o.jsx)(v.Zl,{children:(0,o.jsx)(Z,{products:n,language:null===r||void 0===r?void 0:r.toLowerCase()})})})})})})})):null};N.getInitialProps=function(){var e=(0,t.Z)(c().mark((function e(n){var r,t,i,o,l,p,f,h,v,g,m;return c().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=n.query,t=n.res,i=d().parse(r),o=i.products,l=i.language,p=(0,k.x)(n),o){e.next=7;break}return console.error('[InstagramCheckoutPage] "products" parameter is required'),t.statusCode=500,e.abrupt("return",{language:l});case 7:return f=o.split(",").map((function(e){var n=(0,u.Z)(e.split(":"),2),r=n[0],t=n[1];return{id:r,quantity:parseInt(t)}})),h=f.map((function(e){return e.id})),e.prev=9,e.next=12,(0,w.Z)({language:l,datatype:"makaira-product",ids:h});case 12:return v=e.sent,g=f.map((function(e){var n,r=v.find((function(n){return n.id===e.id}));if(!r)return null;var t=null===(n=r.groups[p])||void 0===n?void 0:n.shopifyId;return(0,s.Z)((0,a.Z)({},e),{shopifyId:t})})),m=g.filter((function(e){return null!==e})),e.abrupt("return",{products:m,group:p,language:l});case 18:return e.prev=18,e.t0=e.catch(9),console.error("[InstagramCheckoutPage] Failed to fetch variant data from Makaira",e.t0),t.statusCode=500,e.abrupt("return",{language:l});case 23:case"end":return e.stop()}}),e,null,[[9,18]])})));return function(n){return e.apply(this,arguments)}}(),n.default=N},60598:function(e,n,r){"use strict";r.d(n,{Z:function(){return c}});var t=r(47568),a=r(34051),s=r.n(a),u=r(97090),i=r(26258);function c(e){return o.apply(this,arguments)}function o(){return(o=(0,t.Z)(s().mark((function e(n){var r,t,a,c,o,l,d,p,f,h,v,g;return s().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=n.language,t=void 0===r?"":r,a=n.datatype,c=void 0===a?"":a,o=n.fields,l=void 0===o?[]:o,d=n.ids,p=void 0===d?[]:d,f=new u.Z,h=f.getConstraints({language:t}),v={constraints:h,datatype:c,fields:l,ids:p},e.next=6,(0,i.Z)({body:v,isDocument:!0});case 6:return g=e.sent,e.abrupt("return",g);case 8:case"end":return e.stop()}}),e)})))).apply(this,arguments)}}},function(e){e.O(0,[864,1664,7676,1045,9465,5654,9774,2888,179],(function(){return n=60867,e(e.s=n);var n}));var n=e.O();_N_E=n}]);
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.