PageSourceSearch

https://wttb.co.uk/_next/static/immutable/chunks/03_4mou1iejfv.js

js wttb.co.uk collected 2026-10-05 00:46:56 UTC 31,217 bytes, 4 lines download raw bytes

1;!function(){try { var e="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof global?global:"undefined"!=typeof window?window:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&((e._debugIds|| (e._debugIds={}))[n]="41a49677-9877-2026-066f-490ecfec1ffc")}catch(e){}}();
2(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,134487,e=>{"use strict";var t,r=((t={}).GOLD="gold",t.BRONZE="bronze",t.BLUE="blue",t.SILVER="silver",t.PLATINUM="platinum",t);e.s(["LoyaltyTier",()=>r,"tierColors",0,{gold:"#D4982F",bronze:"#A26009",blue:"#3281BA",silver:"#92969A",platinum:"#718896"},"vectorColors",0,{static:"#F2A725",increasing:"#4CB260",decreasing:"#D70000"}])},159109,e=>{"use strict";var t=e.i(89878);e.s(["default",0,({color:e="currentColor",width:r="18px",height:n="18px",className:i="md:w-4 xl:w-5 md:h-4 xl:h-5"})=>(0,t.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:r,height:n,viewBox:"0 0 20 20",className:i,children:(0,t.jsx)("path",{d:"M5,4H19a1,1,0,0,1,1,1V19a1,1,0,0,1-1,1H5a1,1,0,0,1-1-1V5A1,1,0,0,1,5,4ZM2,5A3,3,0,0,1,5,2H19a3,3,0,0,1,3,3V19a3,3,0,0,1-3,3H5a3,3,0,0,1-3-3Zm10,7C9.239,12,7,9.314,7,6H9c0,2.566,1.669,4,3,4s3-1.434,3-4h2C17,9.314,14.761,12,12,12Z",transform:"translate(-2 -2)",fill:e,fillRule:"evenodd"})})])},7886,957992,e=>{"use strict";var t=e.i(89878);e.s(["default",0,({strokeColor:e="#5B6771",width:r="32px",height:n="32px"})=>(0,t.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:r,height:n,fill:"none",children:(0,t.jsx)("path",{stroke:e,strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5,d:"m8 9.334 1.282 14.58c.137 1.558 1.455 2.753 3.036 2.753h7.364c1.58 0 2.9-1.195 3.036-2.753L24 9.334m-12 0v-1.09c0-1.608 1.592-2.91 3.556-2.91h.888c1.964 0 3.556 1.302 3.556 2.91v1.09m-14.664 0h21.333"})})],7886),e.s(["default",0,({width:e="32px",height:r="32px",className:n=""})=>(0,t.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:e,height:r,viewBox:"0 0 32 32",fill:"none",className:n,"aria-hidden":!0,children:(0,t.jsx)("path",{stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5,d:"m5.336 26.667 6.553-1.542 14.329-14.328a1.542 1.542 0 0 0 0-2.18l-2.83-2.831a1.542 1.542 0 0 0-2.182 0L6.878 20.114l-1.542 6.553zm21.328-.001h-8"})})],957992)},639137,241714,e=>{"use strict";var t=e.i(89878);e.s(["default",0,({color:e="currentColor",width:r="18px",height:n="20px"})=>(0,t.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:r,height:n,viewBox:"0 0 17.996 20.442",children:(0,t.jsx)("path",{d:"M48.187,7.823,39.851.182A.7.7,0,0,0,38.9.2L31.03,7.841a.7.7,0,0,0-.211.5V19.311a.694.694,0,0,0,.694.694H37.3A.694.694,0,0,0,38,19.311V14.217h3.242v5.095a.694.694,0,0,0,.694.694h5.789a.694.694,0,0,0,.694-.694V8.335a.7.7,0,0,0-.228-.512ZM47.023,18.617h-4.4V13.522a.694.694,0,0,0-.694-.694H37.3a.694.694,0,0,0-.694.694v5.095H32.2V8.63l7.192-6.98L47.02,8.642v9.975Z",transform:"translate(-30.619 0.236)",fill:e,stroke:e,strokeWidth:"0.4"})})],639137),e.s(["default",0,e=>(0,t.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"22",height:"14",viewBox:"0 0 25.567 18",...e,children:(0,t.jsxs)("g",{transform:"translate(-776 -462)",children:[(0,t.jsx)("rect",{id:"Rectangle_941","data-name":"Rectangle 941",width:"12.749",height:"2.499",rx:"1.25",transform:"translate(776 462)",fill:"currentColor"}),(0,t.jsx)("rect",{id:"Rectangle_942","data-name":"Rectangle 942",width:"25.567",height:"2.499",rx:"1.25",transform:"translate(776 469.75)",fill:"currentColor"}),(0,t.jsx)("rect",{id:"Rectangle_943","data-name":"Rectangle 943",width:"17.972",height:"2.499",rx:"1.25",transform:"translate(776 477.501)",fill:"currentColor"})]})})],241714)},199400,e=>{"use strict";var t=e.i(89878),r=e.i(816264),n=e.i(134487);e.s(["default",0,({tier:e,width:i="48px",height:a="48px",textColor:o="#fff",iconColor:u})=>{let c=u??n.tierColors[e];return(0,t.jsxs)("svg",{width:i,height:a,fill:"none",viewBox:"0 0 56 56",xmlns:"http://www.w3.org/2000/svg",children:[e===n.LoyaltyTier.BRONZE&&(0,t.jsxs)(r.default.Fragment,{children:[(0,t.jsx)("path",{d:"M17.5 56c-2.426 0-8.206-.757-13.578-6.973-5.372-6.221-4.5-15.636-1.698-21.718C4.335 22.723 12.21 7.755 15.752 1.055c.741-1.407 2.749-1.407 3.494 0 3.54 6.7 11.417 21.668 13.528 26.254 2.803 6.082 3.678 15.497-1.698 21.718C25.705 55.247 20.11 56 17.5 56z",fill:c}),(0,t.jsx)("path",{d:"M19.85 45.815H9.72V27.148h9.823c3.554 0 5.373 2.267 5.373 4.758 0 2.35-1.455 3.918-3.218 4.282 1.987.308 3.582 2.239 3.582 4.59 0 2.798-1.875 5.037-5.43 5.037zm-6.156-15.28v4.114h4.981c1.344 0 2.183-.868 2.183-2.071 0-1.148-.84-2.043-2.183-2.043h-4.981zm0 7.5v4.394h5.121c1.512 0 2.407-.868 2.407-2.211 0-1.176-.84-2.183-2.407-2.183h-5.121z",fill:o})]}),e===n.LoyaltyTier.GOLD&&(0,t.jsxs)(r.default.Fragment,{children:[(0,t.jsx)("path",{d:"M17.5 56c-2.426 0-8.206-.757-13.578-6.973-5.372-6.221-4.5-15.636-1.698-21.718C4.335 22.723 12.21 7.755 15.752 1.055c.741-1.407 2.749-1.407 3.494 0 3.54 6.7 11.417 21.668 13.528 26.254 2.803 6.082 3.678 15.497-1.698 21.718C25.705 55.247 20.11 56 17.5 56z",fill:c}),(0,t.jsx)("path",{d:"M8.87 36.455c0-5.7 4.321-9.32 9.589-9.32 3.728 0 6.078 1.81 7.456 3.944l-3.188 1.729a5.113 5.113 0 0 0-4.268-2.27c-3.269 0-5.646 2.513-5.646 5.917 0 3.403 2.377 5.916 5.646 5.916 1.648 0 3.107-.676 3.89-1.378v-2.188h-4.808v-3.296h8.59v6.889c-1.837 2.053-4.403 3.403-7.672 3.403-5.268 0-9.59-3.674-9.59-9.346z",fill:o})]}),e===n.LoyaltyTier.SILVER&&(0,t.jsxs)(r.default.Fragment,{children:[(0,t.jsx)("path",{d:"M17.5 56c-2.426 0-8.206-.757-13.578-6.973-5.372-6.221-4.5-15.636-1.698-21.718C4.335 22.723 12.21 7.755 15.752 1.055c.741-1.407 2.749-1.407 3.494 0 3.54 6.7 11.417 21.668 13.528 26.254 2.803 6.082 3.678 15.497-1.698 21.718C25.705 55.247 20.11 56 17.5 56z",fill:c}),(0,t.jsx)("path",{d:"m10.05 43.074 2.113-2.926a7.923 7.923 0 0 0 5.744 2.438c2.113 0 3.142-1.002 3.142-2.031 0-1.355-1.571-1.816-3.657-2.303-2.953-.678-6.746-1.49-6.746-
25.527 0-3.007 2.6-5.446 6.854-5.446 2.872 0 5.256.867 7.044 2.52l-2.14 2.818c-1.463-1.355-3.414-1.978-5.175-1.978-1.734 0-2.655.758-2.655 1.842 0 1.22 1.517 1.599 3.603 2.086 2.98.678 6.774 1.572 6.774 5.581 0 3.305-2.358 5.798-7.234 5.798-3.468 0-5.96-1.165-7.667-2.872z",fill:o})]}),e===n.LoyaltyTier.PLATINUM&&(0,t.jsxs)(r.default.Fragment,{children:[(0,t.jsx)("path",{d:"M17.5 56c-2.426 0-8.206-.757-13.578-6.973-5.372-6.221-4.5-15.636-1.698-21.718C4.335 22.723 12.21 7.755 15.752 1.055c.741-1.407 2.749-1.407 3.494 0 3.54 6.7 11.417 21.668 13.528 26.254 2.803 6.082 3.678 15.497-1.698 21.718C25.705 55.247 20.11 56 17.5 56z",fill:c}),(0,t.jsx)("path",{d:"M15.332 45.098h-3.974V26.432h8.731c4.058 0 6.27 2.742 6.27 6.017 0 3.246-2.24 5.96-6.27 5.96h-4.757v6.69zM22.3 32.421c0-1.54-1.175-2.575-2.742-2.575h-4.226v5.15h4.226c1.567 0 2.742-1.008 2.742-2.575z",fill:o})]})]})}])},854707,835917,e=>{"use strict";var t=e.i(493300);e.i(930160);var r=e.i(181584);let n=new Uint8Array(16),i=[];for(let e=0;e<256;++e)i.push((e+256).toString(16).slice(1));let a=function(e,t,r){return t||e||!crypto.randomUUID?function(e,t,r){let a=(e=e||{}).random??e.rng?.()??crypto.getRandomValues(n);if(a.length<16)throw Error("Random bytes length must be >= 16");if(a[6]=15&a[6]|64,a[8]=63&a[8]|128,t){if((r=r||0)<0||r+16>t.length)throw RangeError(`UUID byte range ${r}:${r+15} is out of buffer bounds`);for(let e=0;e<16;++e)t[r+e]=a[e];return t}return function(e,t=0){return(i[e[t+0]]+i[e[t+1]]+i[e[t+2]]+i[e[t+3]]+"-"+i[e[t+4]]+i[e[t+5]]+"-"+i[e[t+6]]+i[e[t+7]]+"-"+i[e[t+8]]+i[e[t+9]]+"-"+i[e[t+10]]+i[e[t+11]]+i[e[t+12]]+i[e[t+13]]+i[e[t+14]]+i[e[t+15]]).toLowerCase()}(a)}(e,t,r):crypto.randomUUID()};e.s(["v4",0,a],835917),e.i(3760);var o=e.i(860685),u=e.i(796861),c=e.i(856629),l=e.i(725639),s=e.i(912891);function d({order:e,cart:t}){let r=(e??t)?.discountCodes?.map(e=>e.discountCode.obj?.code).filter(e=>!!e);return{currency:(e??t).totalPrice.currencyCode,value:(0,s.transformCents)((e??t).totalPrice),valueNet:(0,s.transformCents)((e??t).totalPrice),valueGross:(0,s.transformCents)((e??t).taxedPrice.totalGross),totalTax:(0,s.transformCents)((e??t).taxedPrice.totalTax),totalShipping:(e??t).shipping?.reduce((e,t)=>e+(0,s.transformCents)(t.shippingInfo.price),0),coupon:r,client_id:(e??t).customerId}}function f({lineItem:e}){return{item_id:e.id,item_name:e.name["en-GB"],affiliation:"Where The Trade Buys",item_category:e.productType?.obj?.name,item_variant:e.variant?.sku,price:(0,s.transformCents)(e.price.value),unitPriceNet:(0,s.transformCents)(e.price.value),quantity:e.quantity}}var v=e.i(8669);let m=(0,v.createServerReference)("40bb79c6d3af686c4897a033bed60261a8705f50de",v.callServer,void 0,v.findSourceMapURL,"trackAddToCartEvent"),p=(0,v.createServerReference)("402d52c767197ef38166108a306703bc992c81fd0d",v.callServer,void 0,v.findSourceMapURL,"trackCheckoutEvent"),g=(0,v.createServerReference)("403de2466a1496894f9d1b545c63b0c205865cc495",v.callServer,void 0,v.findSourceMapURL,"trackViewItemEvent");function y(e){return{id:e.variant.sku,name:e.name["en-GB"],content_type:"product",quantity:e.quantity}}v.callServer,v.findSourceMapURL;let h=(0,v.createServerReference)("4022f8c73280928032780c3cfa517b4ad50b0ff3bf",v.callServer,void 0,v.findSourceMapURL,"trackOrderCreatedEvent");function b(e){return{product_id:e.variant?.sku??e.id,product_name:e.name["en-GB"],product_price:(0,s.transformCents)(e.price.value),product_quantity:e.quantity,product_category:e.productType?.obj?.name}}function C({email:e,customerId:t}){return{em:e,external_id:t}}let w=(0,v.createServerReference)("40e23fc91abc8ebb52bc3fbc24df303d645038c3b0",v.callServer,void 0,v.findSourceMapURL,"trackAddToCartEvent"),k=(0,v.createServerReference)("40f36823b51896b20aecc3b61a79cbf7d4b7307ac6",v.callServer,void 0,v.findSourceMapURL,"trackViewItemEvent"),_=(0,v.createServerReference)("407648e3898a2499117b366be5d0bd4849c3faa2fc",v.callServer,void 0,v.findSourceMapURL,"trackPurchaseEvent");function A(){return"u">typeof window}function I(){return(A()?window.vam:"production")||"production"}function P(){return"production"===I()}function x(e,t,r){var n,i;if(!A()){let e="[Vercel Web Analytics] Please import `track` from `@vercel/analytics/server` when using this function in a server environment";if(P())console.warn(e);else throw Error(e);return}if(!t){null==(n=window.va)||n.call(window,"event",{name:e,options:r});return}try{let n=function(e,t){if(!e)return;let r=e,n=[];for(let[i,a]of Object.entries(e))"object"==typeof a&&null!==a&&(t.strip?r=function(e,{[e]:t,...r}){return r}(i,r):n.push(i));if(n.length>0&&!t.strip)throw Error(`The following properties are not valid: ${n.join(", ")}. Only strings, numbers, booleans, and null are allowed.`);return r}(t,{strip:P()});null==(i=window.va)||i.call(window,"event",{name:e,data:n,options:r})}catch(e){e instanceof Error&&"development"===I()&&console.error(e)}}let S=e=>({product_sku:e.variant?.sku??null});async function M(e){let{lineItem:t,cart:r}=e,n=r??await L();if(!n)return;let i=a();V(()=>(function({lineItem:e,cart:t}){let r={event:"add_to_cart",...d({cart:t}),items:[f({lineItem:e})]};(0,l.sendGTMEvent)(r)})({lineItem:t,cart:n}),()=>m({lineItem:t,cart:n}),()=>(function({lineItem:e,cart:t,eventId:r}){(0,l.sendGTMEvent)({event:"pinterest_add_to_cart",pinterest:{event_id:r,currency:e.totalPrice.currencyCode,value:(0,s.transformCents)(e.totalPrice),order_quantity:e.quantity,line_items:[b(e)],...C({email:t.customerEmail,customerId:t.customerId})}})})({lineItem:t,cart:n,eventId:i}),()=>w({lineItem:t,cart:n,eventId:i}),()=>(({lineItem:e,cart:t})=>{x("Add to cart",{customer_id:t.customerId??null,...S(e)})})({lineItem:t,cart:n}))}async function j(e){let{lineItem:t,cart:r}=e,n=r??await L();n&&V(()=>(function({lineItem:e,cart:t}){let r={event:"remove_from_cart",...d({cart:t}),items:[f({lineItem:e})]};(0,l.sendGTMEvent)(r)})({lineItem:t,cart:n}),()=>(({lineItem:e,cart:t})=>{x("Delete Basket",{customer_id:t.customerId??null,product_sku:e.variant?.sku??null})})({lineItem:t,cart:n}))}async function O({product:e}){let t=await T().then(e=>(0,u.fetchMeRaw)(e)),r=(await (0,o.getPriceForConfig)({sku:e.fields.sku,config:null,metadata:{customerId:t?.id,loyaltyTier:t?.custom?.fields.loyaltyTierKey}}))?.price,n=a();r&&V(()=>(function({product:e,price:t}){let r=(0,s.transformCents)(t),n={event:"view_item",currency:t.currencyCode,value:r,items:[{item_id:e.fields.sku,item_name:e.fields.title,price:r}]};(0,l.sendGTMEvent)(n)})({product:e,price:r}),()=>g({product:e,price:r}),()=>(function({product:e,price:t,customer:r,eventId:n}){(0,l.sendGTMEvent)({event:"pinterest_page_visit",pinterest:{event_id:n,currency:t.currencyCode,value:(0,s.transformCents)(t),line_items:[{product_id:e.fields.sku,product_name:e.fields.title,product_price:(0,s.transformCents)(t),product_category:e.fields.masterCategory?.fields.title}],...C({email:r?.email,customerId:r?.id})}})})({product:e,price:r,customer:t,eventId:n}),()=>k({product:e,price:r,customer:t,eventId:n}))}async function E(){let e=await T().then(e=>(0,u.fetchMeRaw)(e));e&&V(()=>(function({user:e}){let t={event:"login",client_id:e.id};(0,l.sendGTMEvent)(t)})({user:e}))}async function R({sku:e}){let t=await T().then(e=>(0,u.fetchMeRaw)(e));V(()=>(({sku:e,customerId:t})=>{x("Shopping List Save",{customer_id:t??null,product_sku:e??null})})({sku:e,customerId:t?.id??null}))}function T(){return(0,r.getSession)()}function L(){return T().then(e=>(0,c.fetchCart)(e))}function V(...e){return e.forEach(async e=>{try{await e()}catch(e){t.captureMessage("Error while executing the logic to track the event",{extra:{err:e}}),console.error("Error while executing the logic to track the event",e)}})}e.s(["trackAddToCartEvent",0,M,"trackBeginCheckoutEvent",0,function({cart:e}){V(()=>(({cart:e})=>
2{e.lineItems.forEach(t=>{x("Begin Checkout",{customer_id:e.customerId??null,product_sku:t.variant.sku??null})})})({cart:e}))},"trackCanvaUrlClick",0,function(e){V(()=>(({link:e})=>{x("Canva_URL_Click",{link_clicked:e})})({link:e}))},"trackCheckoutEvent",0,function({cart:e}){V(()=>(function({cart:e}){let t={event:"begin_checkout",...d({cart:e}),items:e.lineItems.map(e=>f({lineItem:e}))};(0,l.sendGTMEvent)(t)})({cart:e}),()=>p({cart:e}))},"trackLoginEvent",0,E,"trackPurchaseEvent",0,function({order:e,extraOrderPurchaseInfo:t}){let r=a();V(()=>(function({order:e,extraOrderPurchaseInfo:t}){let r={event:"purchase",transaction_id:e.id,...d({order:e}),...t,items:e.lineItems.map(e=>f({lineItem:e}))};(0,l.sendGTMEvent)(r)})({order:e,extraOrderPurchaseInfo:t}),()=>(function({order:e,eventId:t}){(0,l.sendGTMEvent)({event:"pinterest_checkout",pinterest:{event_id:t,order_id:e.id,currency:e.totalPrice.currencyCode,value:(0,s.transformCents)(e.totalPrice),order_quantity:e.lineItems.reduce((e,t)=>e+t.quantity,0),line_items:e.lineItems.map(b),...C({email:e.customerEmail,customerId:e.customerId})}})})({order:e,eventId:r}),()=>_({order:e,eventId:r}),()=>(function({order:e}){var t;window.oaiq?.("measure","order_created",{type:"contents",amount:(t=e).totalPrice.centAmount,currency:t.totalPrice.currencyCode,contents:t.lineItems.map(y)},{event_id:e.id})})({order:e}),()=>h({orderId:e.id}),()=>(({order:e})=>{e.lineItems.forEach(t=>{x("Purchase",{customer_id:e.customerId??null,...S(t)})})})({order:e}))},"trackRemoveFromCartEvent",0,j,"trackShoppingListSaveEvent",0,R,"trackViewArtworkTemplateEvent",0,function({templateType:e,product:t,customer:r}){V(()=>(({templateType:e,product:t,customer:r})=>{x("View Artwork Template",{customer_id:r?.id??null,template_type:e,product_sku:t.fields.sku??null})})({templateType:e,product:t,customer:r}))},"trackViewCartEvent",0,function({cart:e}){V(()=>(function({cart:e}){let t={event:"view_cart",...d({cart:e}),items:e.lineItems.map(e=>f({lineItem:e}))};(0,l.sendGTMEvent)(t)})({cart:e}))},"trackViewItemEvent",0,O],854707)},332666,e=>{"use strict";var t=e.i(680488),r=e.i(178464),n=e.i(521444),i=e.i(8669);let a=(0,i.createServerReference)("40c58d71be3ff54ee369ed2dfa77a8e5267441613a",i.callServer,void 0,i.findSourceMapURL,"updateCartAddOn");var o=e.i(178531),u=e.i(856629);let c="Artwork Check";function l(e){return{name:e.name,quantity:1,money:{type:"centPrecision",centAmount:e.centAmount,currencyCode:"GBP",fractionDigits:2},slug:e.slug,priceMode:"Standard",taxCategory:{typeId:"tax-category",id:o.config.NEXT_PUBLIC_STANDARD_TAX_CATEGORY_ID},custom:{type:{typeId:"type",key:"custom-line-item-additional-fields"},fields:{lineItemKey:e.lineItemKey}}}}function s({cart:e,hasAddon:t,lineItemKey:r,price:n}){if(null==e)return null;let i=e.customLineItems.find(e=>e.slug.includes("artwork-check")&&e.custom?.fields.lineItemKey===r);if(!t&&!i||t&&i)return;let a=l({slug:`artwork-check-${+new Date}`,name:{en:c},centAmount:n,lineItemKey:r});return t?{action:"addCustomLineItem",cartId:e.id,cartVersion:e.version,customLineItemDraft:a}:{action:"removeCustomLineItem",cartId:e.id,cartVersion:e.version,lineId:i.id}}async function d(e,t,r){let n=function(e,t,r){if(null==e)return;let n=e.customLineItems.find(e=>e.slug.includes("artwork-check")&&e.custom?.fields.lineItemKey===t);if(!n)return;let i=l({slug:`artwork-check-${+new Date}`,name:{en:c},centAmount:r,lineItemKey:t});return{action:"changeCustomLineItemMoney",cartId:e.id,cartVersion:e?.version,lineId:n.id,customLineItemDraft:i}}(e,t,r);if(n)return await a(n)}async function f(e,t,r,n){let i=s({cart:e,hasAddon:t,lineItemKey:r,price:n});if(i)return await a(i)}e.s(["getArtworkChecks",0,e=>{if(e?.length)return e.filter(e=>e.slug.includes("artwork-check"))},"getLineItemArtworkCheck",0,(e,t)=>{if(e?.length)return e.find(e=>e.slug.includes("artwork-check")&&e.custom?.fields.lineItemKey===t)},"getUpdateArtworkCheckActionPayload",0,s,"updateArtworkCheckAddOn",0,f,"useArtworkCheckPrice",0,function(){let e=(0,r.useQueryClient)(),{data:i}=(0,u.useCart)();return(0,t.useMutation)({mutationFn:({lineItemKey:e,price:t})=>d(i,e,t),onSuccess:async()=>
2{await e.invalidateQueries({queryKey:["CART"]})},onError:e=>{n.toast.error(`An error occurred ${e.message}`)}})},"useSetArtworkCheckAddOn",0,function(){let e=(0,r.useQueryClient)(),{mutateAsync:i,isLoading:a}=(0,t.useMutation)({mutationFn:async({hasAddOn:e,lineItemKey:t,price:r})=>f(await (0,u.fetchCart)(null),e,t,r),onSuccess:async t=>(await e.invalidateQueries({queryKey:["CART"]}),t),onError:e=>{n.toast.error("Error updating addon in cart: "+e.message)}});return{mutateAsync:i,isLoading:a}}],332666)},784545,(e,t,r)=>{"use strict";var n=e.e&&e.e.__assign||function(){return(n=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var i in t=arguments[r])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)},i=e.e&&e.e.__spreadArray||function(e,t,r){if(r||2==arguments.length)for(var n,i=0,a=t.length;i<a;i++)!n&&i in t||(n||(n=Array.prototype.slice.call(t,0,i)),n[i]=t[i]);return e.concat(n||Array.prototype.slice.call(t))};Object.defineProperty(r,"__esModule",{value:!0}),r.useProduct=r.ProductContextProvider=r.ProductContext=void 0;var a=e.r(89878),o=e.r(816264),u=e.r(40484),c={config:null,deliveryOption:null,attributes:[]};r.ProductContext=(0,o.createContext)(c),r.ProductContext.displayName="ProductContext",r.ProductContextProvider=function(e){var t=e.children,l=e.attributes,s=void 0===l?[]:l,d=e.warnings,f=(0,o.useState)(n(n({},c),{config:n({},(0,u.generateInitialConfig)(s)),attributes:s})),v=f[0],m=f[1],p=(0,o.useState)(void 0===d?[]:d),g=p[0],y=p[1],h=(0,o.useState)({}),b=h[0],C=h[1],w=(0,o.useMemo)(function(){return(0,u.validateConfig)(v.config)},[v.config]),k=(0,o.useMemo)(function(){return(0,u.getAttributesHash)(v.attributes)},[v.attributes]),_=(0,o.useMemo)(function(){return(0,u.getIncompatibilitiesHash)(v.attributes)},[v.attributes]),A=(0,o.useMemo)(function(){return(0,u.getAttributeWarningsHash)(g)},[g]),I=(0,o.useCallback)(function(e,t,r){var n=_[e];return(null==n?void 0:n.length)?n.reduce(function(e,n){var a,o=n.incompatibleAttribute.key;return n.attribute.key===t&&(r[o]=(null==(a=r[o])?void 0:a.length)?i(i([],r[o],!0),[n],!1):[n]),e},r):r},[_]),P=(0,o.useCallback)(function(e,t,r){var n=(0,u.removeAttributeWarnings)(e,r);return(Array.isArray(t)?t:[t]).reduce(function(t,r){var n,i=null==(n=A[e])?void 0:n[r];return i&&t.push(i),t},n)},[A]),x=(0,o.useCallback)(function(e,t){m(function(r){y(function(r){return P(e,t,r)}),C(function(r){var n=(0,u.removeConfigValueIncompatibleValues)(e,structuredClone(r));return Array.isArray(t)?t.forEach(function(t){n=I(t,e,n)}):n=I(t,e,r),n});var i,a,o=(0,u.getAttributeValueByIdOrIds)(e,t,k);return a=Array.isArray(t)?t.reduce(function(t,i){return n(n({},t),(0,u.calcProductConfigValueChange)({incompatibilitiesHash:_,productConfig:r.config,attributesHash:k,valueId:i,key:e}))},{}):(0,u.calcProductConfigValueChange)({incompatibilitiesHash:_,productConfig:r.config,attributesHash:k,valueId:t,key:e}),n(n({},r),{config:n(n(n({},r.config),a),((i={})[e]=o,i))})})},[k]),S=(0,o.useCallback)(function(e,t){m(function(r){var i;return C(function(t){return(0,u.removeConfigValueIncompatibleValues)(e,structuredClone(t))}),y(function(t){return(0,u.removeAttributeWarnings)(e,t)}),n(n({},r),{config:n(n({},r.config),((i={})[e]=t,i))})})},[]),M=(0,o.useCallback)(function(e,t){var r=e.reduce(function(e,r){var n=r.values.find(function(e){return e[r.returnKey]===t[r.key]});return n&&(e.incompatibilities=I(n.id,r.key,e.incompatibilities),e.warnings=P(r.key,n.id,e.warnings)),e},{incompatibilities:{},warnings:[]});return{incompatibilities:r.incompatibilities,warnings:r.warnings}},[I]);(0,o.useEffect)(function(){var e=M(v.attributes,v.config),t=e.incompatibilities,r=e.warnings;C(t),y(r)},[v.config,v.attributes]);var j=(0,o.useCallback)(function(e){m(function(t){var r=M(t.attributes,e),i=r.incompatibilities,a=r.warnings;return C(i),y(a),n(n({},t),{config:n({},e)})})},[]),O=n(n({},v),{attributesHash:k,incompatibilitiesHash:_,isConfigValid:w,incompatibilities:b,warnings:g,setConfigValue:x,setCustomConfigValue:S,setProductConfig:j});return(0,a.jsx)(r.ProductContext.Provider,{value:O,children:t})},r.useProduct=function(){var e=(0,o.useContext)(r.ProductContext);if(void 0===e)throw Error("useProduct must be used within a ProductProvider");return e}},40484,(e,t,r)=>{"use strict";var n=e.e&&e.e.__assign||function(){return(n=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var i in t=arguments[r])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)},i=e.e&&e.e.__awaiter||function(e,t,r,n){return new(r||(r=Promise))(function(i,a){function o(e){try{c(n.next(e))}catch(e){a(e)}}function u(e){try{c(n.throw(e))}catch(e){a(e)}}function c(e){var t;e.done?i(e.value):((t=e.value)instanceof r?t:new r(function(e){e(t)})).then(o,u)}c((n=n.apply(e,t||[])).next())})},a=e.e&&e.e.__generator||function(e,t){var r,n,i,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]},o=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return o.next=u(0),o.throw=u(1),o.return=u(2),"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function u(u){return function(c){var l=[u,c];if(r)throw TypeError("Generator is already executing.");for(;o&&(o=0,l[0]&&(a=0)),a;)try{if(r=1,n&&(i=2&l[0]?n.return:l[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,l[1])).done)return i;switch(n=0,i&&(l=[2&l[0],i.value]),l[0]){case 0:case 1:i=l;break;case 4:return a.label++,{value:l[1],done:!1};case 5:a.label++,n=l[1],l=[0];continue;case 7:l=a.ops.pop(),a.trys.pop();continue;default:if(!(i=(i=a.trys).length>0&&i[i.length-1])&&(6===l[0]||2===l[0])){a=0;continue}if(3===l[0]&&(!i||l[1]>i[0]&&l[1]<i[3])){a.label=l[1];break}if(6===l[0]&&a.label<i[1]){a.label=i[1],i=l;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(l);break}i[2]&&a.ops.pop(),a.trys.pop();continue}l=t.call(e,a)}catch(e){l=[6,e],n=0}finally{r=i=0}if(5&l[0])throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}}},o=e.e&&e.e.__spreadArray||function(e,t,r){if(r||2==arguments.length)for(var n,i=0,a=t.length;i<a;i++)!n&&i in t||(n||(n=Array.prototype.slice.call(t,0,i)),n[i]=t[i]);return e.concat(n||Array.prototype.slice.call(t))};
2Object.defineProperty(r,"__esModule",{value:!0}),r.calcProductConfigValueChange=r.getAttributeValueByIdOrIds=r.getDeliveryOption=r.getPriceForConfig=r.removeAttributeWarnings=r.getAttributeWarningsHash=r.removeConfigValueIncompatibleValues=r.getAttributesHash=r.generatePartialConfig=r.getIncompatibilities=r.getIncompatibilitiesHash=r.generateInitialConfig=r.validateConfig=r.getSizeRunQuantity=r.ProductAttributeKeys=void 0,r.ProductAttributeKeys={Quantity:"quantity",SizeRun:"sizeRun",Size:"size",Pages:"pages",Spine:"spine",Orientation:"orientation",Cover:"cover",Inner:"inner",CoverMaterial:"coverMaterial",CoverMaterialWeight:"coverMaterialWeight",CoverLamination:"coverLamination",InnerMaterial:"innerMaterial",InnerMaterialWeight:"innerMaterialWeight",InnerColors:"innerColors",SequentialNumbering:"sequentialNumbering",SequentialNumberingValue:"sequentialNumberingValue",Versions:"versions"};var u=function(e){return"number"==typeof e&&isFinite(e)||"string"==typeof e&&e.length};r.getSizeRunQuantity=function(e){return Object.values(e).reduce(function(e,t){return e+(Number(t)||0)},0)},r.validateConfig=function(e){return!!e&&(!e[r.ProductAttributeKeys.SequentialNumbering]||!!e[r.ProductAttributeKeys.SequentialNumberingValue])&&Object.keys(e).every(function(t){var n=e[t];return t===r.ProductAttributeKeys.SizeRun?"object"==typeof n&&!!Object.values(n).every(u)&&(0,r.getSizeRunQuantity)(n)===Number(e[r.ProductAttributeKeys.Quantity]):Array.isArray(n)?n.every(u):void 0!==n&&(u(n)||"boolean"==typeof n)})};var c=function(e,t){var r=e.values.find(function(e){return e.id===t});if(r)return r[e.returnKey]};r.generateInitialConfig=function(e){return e.reduce(function(e,t){if(!t.required&&!t.defaultValueId)return e;if(t.key===r.ProductAttributeKeys.SizeRun)return e[t.key]=t.values.reduce(function(e,r){return e[r.id]=+(r.id===t.defaultValueId),e},{}),e;var n=c(t,t.defaultValueId);return void 0===n||(e[t.key]=t.multiple?[n]:n),e},{})},r.getIncompatibilitiesHash=function(e){return e.flatMap(function(e){return e.incompatibleValues}).reduce(function(e,t){var r=t.attributeValueId;return e[r]=e[r]?o(o([],e[r],!0),[t],!1):[t],e},{})},r.getIncompatibilities=function(e,t){if(!t)return{};var n=(0,r.getIncompatibilitiesHash)(e);return e.reduce(function(e,r){var i,a=r.values.find(function(e){return e[r.returnKey]===t[r.key]});return a&&(null!=(i=n[a.id])?i:[]).forEach(function(t){var n,i=t.incompatibleAttribute.key;t.attribute.key===r.key&&(e[i]=(null==(n=e[i])?void 0:n.length)?o(o([],e[i],!0),[t],!1):[t])}),e},{})},r.generatePartialConfig=function(e,t){return Object.keys(e).reduce(function(n,i){var a,o=e[i];if(null===o)return n;var u=Array.isArray(o)?o.map(function(e){var r;return null==(r=t[i])?void 0:r[e]}):"string"==typeof o?null==(a=t[i])?void 0:a[o]:null;return Object.values(r.ProductAttributeKeys).includes(i)&&!u&&(n[i]=e[i]),u&&(n[i]=Array.isArray(u)?u.map(function(e){return null==e?void 0:e.value}):u.value),n},{})},r.getAttributesHash=function(e){return e.reduce(function(e,t){var r=t.values.reduce(function(e,r){return e[r.id]={name:r.display,value:r[t.returnKey],isRecommended:r.isRecommended,settings:r.settings,isNew:r.isNew},e},{});return e[t.key]=n({},r),e},{})},r.removeConfigValueIncompatibleValues=function(e,t){return Object.keys(t).reduce(function(t,r){return t[r]=t[r].filter(function(t){return t.attribute.key!==e}),t},t)},r.getAttributeWarningsHash=function(e){return e.reduce(function(e,t){var r;return e[t.attribute.key]?e[t.attribute.key][t.valueId]=t:e[t.attribute.key]=((r={})[t.valueId]=t,r),e},{})},r.removeAttributeWarnings=function(e,t){return t.filter(function(t){return t.attribute.key!==e})},r.getPriceForConfig=function(e){return i(void 0,[e],void 0,function(e){var t,r,n=e.url,i=e.sku,o=e.config,u=e.includeQuantityCalculation,c=e.customerTier;return a(this,function(e){switch(e.label){case 0:return[4,fetch(n,{method:"POST",body:JSON.stringify({sku:i,productConfig:o,includeQuantityCalculation:u,customerTier:c}),headers:{Accept:"application/json"}})];case 1:return[4,(t=e.sent()).json()];case 2:if(r=e.sent(),200!==t.status)throw Error("An error occurred while calculating price: ".concat((null==r?void 0:r.message)||JSON.stringify(r)));return[2,r]}})})},r.getDeliveryOption=function(e,t){if(!(null==(r=null==e?void 0:e.deliveryOptions)?void 0:r.length))return null;var r,n,i=e.deliveryOptions;return t?null!=(n=i.find(function(e){return e.deliveryRuleId===t.deliveryRuleId}))?n:null:i.find(function(e){return"Standard"===e.name})||i.find(function(e){return 0===e.price.centAmount})||i[0]},r.getAttributeValueByIdOrIds=function(e,t,r){var n;return Array.isArray(t)?t.map(function(t){var n;return null==(n=r[e][t])?void 0:n.value}):null==(n=r[e][t])?void 0:n.value},r.calcProductConfigValueChange=function(e){var t,r=e.incompatibilitiesHash,n=e.productC
2onfig,i=e.attributesHash,a=e.valueId,o=e.key,u={};return null==(t=r[a])||t.forEach(function(e){var t=n[e.incompatibleAttribute.key];if("string"==typeof t&&e.attribute.key===o&&e.valueIds.includes(t)){var r=Object.keys(i[e.incompatibleAttribute.key]).find(function(t){return!e.valueIds.includes(t)});r&&(u[e.incompatibleAttribute.key]=r)}}),u}},566012,(e,t,r)=>{"use strict";var n,i,a,o,u,c,l,s,d,f,v,m;Object.defineProperty(r,"__esModule",{value:!0}),r.DiscountTarget=r.DiscountReason=r.Platform=r.CostModifier=r.IncompatibilityOperator=r.PrintingMethod=r.CUSTOM_CALCULATOR=r.CUSTOM_SKU=void 0,r.CUSTOM_SKU="custom",r.CUSTOM_CALCULATOR="custom",(l=n||(r.PrintingMethod=n={})).Litho="litho",l.Digital="digital",l.Wide="wide",(s=i||(r.IncompatibilityOperator=i={})).lt="lt",s.gt="gt",(d=a||(r.CostModifier=a={})).PERCENT="percent",d.AMOUNT="amount",(f=o||(r.Platform=o={})).SiteFlow="SiteFlow",f.PBLPrint="PBLPrint",f.AutomationEngine="AutomationEngine",f.Manual="Manual",f.PrintedDirect="PrintedDirect",(v=u||(r.DiscountReason=u={})).Coupon="coupon",v.Promotion="promotion",v.Cashback="cashback",v.Loyalty="loyalty",(m=c||(r.DiscountTarget=c={})).Cart="cart",m.LineItem="lineItem"},470683,(e,t,r)=>{"use strict";var n,i;Object.defineProperty(r,"__esModule",{value:!0}),r.TypeFormat=void 0,(i=n||(r.TypeFormat=n={})).Number="number",i.String="string",i.Boolean="boolean"},179036,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.getSizeValue=r.validateCustomSize=void 0,r.validateCustomSize=function(e,t,r){return!(isNaN(e)||isNaN(t))&&!(e<0)&&!(t<0)&&!(e>r.maxW)&&!(e<r.minW)&&!(t>r.maxH)&&!(t<r.minH)&&!0},r.getSizeValue=function(e,t){return"".concat(e,"x").concat(t)}},690191,(e,t,r)=>{"use strict";var n=e.e&&e.e.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);(!i||("get"in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=e.e&&e.e.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(r,"__esModule",{value:!0}),i(e.r(784545),r),i(e.r(40484),r),i(e.r(566012),r),i(e.r(470683),r),i(e.r(179036),r)}]);
3
4//# debugId=41a49677-9877-2026-066f-490ecfec1ffc

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.