PageSourceSearch

https://www.thortful.com/2282-es5.51838a43c49d6432512f.js

js thortful.com collected 2026-10-02 05:33:16 UTC 162,955 bytes, 1 lines download raw bytes

vendor: 4,442 bytes, line 1
1!function(){"use strict";function e(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var i,a,r,o,l=[],c=!0,s=!1;try{if(r=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;c=!1}else for(;!(c=(i=r.call(n)).done)&&(l.push(i.value),l.length!==t);c=!0);}catch(e){s=!0,a=e}finally{try{if(!c&&null!=n.return&&(o=n.return(),Object(o)!==o))return}finally{if(s)throw a}}return l}}(e,t)||d(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function t(e,t,i){return t=r(t),function(e,t){if(t&&("object"==typeof t||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,n()?Reflect.construct(t,i||[],r(e).constructor):t.apply(e,i))}function n(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(n=function(){return!!e})()}function i(){return i="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var i=a(e,t);if(i){var r=Object.getOwnPropertyDescriptor(i,t);return r.get?r.get.call(arguments.length<3?e:n):r.value}},i.apply(null,arguments)}function a(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=r(e)););return e}function r(e){return r=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},r(e)}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&l(e,t)}function l(e,t){return l=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},l(e,t)}function c(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */c=function(){return t};var e,t={},n=Object.prototype,i=n.hasOwnProperty,a=Object.defineProperty||function(e,t,n){e[t]=n.value},r="function"==typeof Symbol?Symbol:{},o=r.iterator||"@@iterator",l=r.asyncIterator||"@@asyncIterator",s=r.toStringTag||"@@toStringTag";function d(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{d({},"")}catch(e){d=function(e,t,n){return e[t]=n}}function p(e,t,n,i){var r=t&&t.prototype instanceof v?t:v,o=Object.create(r.prototype),l=new U(i||[]);return a(o,"_invoke",{value:O(e,n,l)}),o}function u(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}t.wrap=p;var g="suspendedStart",f="executing",m="completed",h={};function v(){}function C(){}function _(){}var x={};d(x,o,function(){return this});var P=Object.getPrototypeOf,b=P&&P(P(E([])));b&&b!==n&&i.call(b,o)&&(x=b);var y=_.prototype=v.prototype=Object.create(x);function k(e){["next","throw","return"].forEach(function(t){d(e,t,function(e){return this._invoke(t,e)})})}function w(e,t){function n(a,r,o,l){var c=u(e[a],e,r);if("throw"!==c.type){var s=c.arg,d=s.value;return d&&"object"==typeof d&&i.call(d,"__await")?t.resolve(d.__await).then(function(e){n("next",e,o,l)},function(e){n("throw",e,o,l)}):t.resolve(d).then(function(e){s.value=e,o(s)},function(e){return n("throw",e,o,l)})}l(c.arg)}var r;a(this,"_invoke",{value:function(e,i){function a(){return new t(function(t,a){n(e,i,t,a)})}return r=r?r.then(a,a):a()}})}function O(t,n,i){var a=g;return function(r,o){if(a===f)throw Error("Generator is already running");if(a===m){if("throw"===r)throw o;return{value:e,done:!0}}for(i.method=r,i.arg=o;;){var l=i.delegate;if(l){var c=M(l,i);if(c){if(c===h)continue;return c}}if("next"===i.method)i.sent=i._sent=i.arg;else if("throw"===i.method){if(a===g)throw a=m,i.arg;i.dispatchException(i.arg)}else"return"===i.method&&i.abrupt("return",i.arg);a=f;var s=u(t,n,i);if("normal"===s.type){if(a=i.done?m:"suspendedYield",s.arg===h)continue;return{value:s.arg,done:i.done}}"throw"===s.type&&(a=m,i.method="throw",i.arg=s.arg)}}}function M(t,n){var i=n.method,a=t.iterator[i];if(a===e)return n.delegate=null,"throw"===i&&t.iterator.return&&
1(n.method="return",n.arg=e,M(t,n),"throw"===n.method)||"return"!==i&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+i+"' method")),h;var r=u(a,t.iterator,n.arg);if("throw"===r.type)return n.method="throw",n.arg=r.arg,n.delegate=null,h;var o=r.arg;return o?o.done?(n[t.resultName]=o.value,n.next=t.nextLoc,"return"!==n.method&&(n.method="next",n.arg=e),n.delegate=null,h):o:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,h)}function S(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function I(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function U(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(S,this),this.reset(!0)}function E(t){if(t||""===t){var n=t[o];if(n)return n.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var a=-1,r=function n(){for(;++a<t.length;)if(i.call(t,a))return n.value=t[a],n.done=!1,n;return n.value=e,n.done=!0,n};return r.next=r}}throw new TypeError(typeof t+" is not iterable")}return C.prototype=_,a(y,"constructor",{value:_,configurable:!0}),a(_,"constructor",{value:C,configurable:!0}),C.displayName=d(_,s,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===C||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,_):(e.__proto__=_,d(e,s,"GeneratorFunction")),e.prototype=Object.create(y),e},t.awrap=function(e){return{__await:e}},k(w.prototype),d(w.prototype,l,function(){return this}),t.AsyncIterator=w,t.async=function(e,n,i,a,r){void 0===r&&(r=Promise);var o=new w(p(e,n,i,a),r);return t.isGeneratorFunction(n)?o:o.next().then(function(e){return e.done?e.value:o.next()})},k(y),d(y,s,"Generator"),d(y,o,function(){return this}),d(y,"toString",function(){return"[object Generator]"}),t.keys=function(e){var t=Object(e),n=[];for(var i in t)n.push(i);return n.reverse(),function e(){for(;n.length;){var i=n.pop();if(i in t)return e.value=i,e.done=!1,e}return e.done=!0,e}},t.values=E,U.prototype={constructor:U,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(I),!t)for(var n in this)"t"===n.charAt(0)&&i.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var n=this;function a(i,a){return l.type="throw",l.arg=t,n.next=i,a&&(n.method="next",n.arg=e),!!a}for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r],l=o.completion;if("root"===o.tryLoc)return a("end");if(o.tryLoc<=this.prev){var c=i.call(o,"catchLoc"),s=i.call(o,"finallyLoc");if(c&&s){if(this.prev<o.catchLoc)return a(o.catchLoc,!0);if(this.prev<o.finallyLoc)return a(o.finallyLoc)}else if(c){if(this.prev<o.catchLoc)return a(o.catchLoc,!0)}else{if(!s)throw Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return a(o.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var a=this.tryEntries[n];if(a.tryLoc<=this.prev&&i.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var r=a;break}}r&&("break"===e||"continue"===e)&&r.tryLoc<=t&&t<=r.finallyLoc&&(r=null);var o=r?r.completion:{};return o.type=e,o.arg=t,r?(this.method="next",this.next=r.finallyLoc,h):this.complete(o)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),h},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),I(n),h}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var i=n.completion;if("throw"===i.type){var a=i.arg;I(n)}return a}}throw Error("illegal catch attempt")},delegateYield:function(t,n,i){return this.delegate={iterator:E(t),resultName:n,nextLoc:i},"next"===this.method&&(this.arg=e),h}},t}function s(e){return function(e){if(Array.isArray(e))return p(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||d(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function d(e,t){if(e){if("string"==typeof e)return p(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?p(e,t):void 0}}function p(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=Array(t);n<t;n++)i[n]=e[n];return i}function u(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function g(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,m(i.key),i)}}function f(e,t,n){return t&&g(e.prototype,t),n&&g(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function m(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var i=n.call(e,t||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(self.webpackChunkthor_app=self.webpackChunkthor_app||[]).push([[2282],{26633:function(e,t,n){n.d(t,{l:function(){return P}});var i=n(62415),a=n(92674),r=n(70013),o=n(27953),l=n(379),c=n(33483),s=["carouselInner"];function d(e,t){if(1&e){var n=i.\u0275\u0275getCurrentView();i.\u0275\u0275elementStart(0,"button",7),i.\u0275\u0275listener("click",function(){return i.\u0275\u0275restoreView(n),i.\u0275\u0275nextContext(2).scroll("left")}),i.\u0275\u0275element(1,"i",8),i.\u0275\u0275elementEnd()}if(2&e){var a=i.\u0275\u0275nextContext(2);i.\u0275\u0275classProp("hidden",!a.showLeftArrow)}}function p(e,t){1&e&&i.\u0275\u0275element(0,"face-swap-badge")}function g(e,t){1&e&&i.\u0275\u0275element(0,"photoCardBadge")}function m(e,t){if(1&e){var n=i.\u0275\u0275getCurrentView();i.\u0275\u0275elementStart(0,"div",14),i.\u0275\u0275element(1,"thor-heart",15),i.\u0275\u0275elementStart(2,"img",16),i.\u0275\u0275listener("click",function(){i.\u0275\u0275restoreView(n);
1var e=i.\u0275\u0275nextContext().$implicit;return i.\u0275\u0275nextContext(2).addToBasketClicked.emit(e)}),i.\u0275\u0275elementEnd(),i.\u0275\u0275elementEnd()}if(2&e){var a=i.\u0275\u0275nextContext().$implicit;i.\u0275\u0275advance(1),i.\u0275\u0275property("card",a)("className","type-2")}}function h(e,t){if(1&e){var n=i.\u0275\u0275getCurrentView();i.\u0275\u0275elementStart(0,"div",9),i.\u0275\u0275elementStart(1,"div",10),i.\u0275\u0275elementStart(2,"img",11),i.\u0275\u0275listener("click",function(){var e=i.\u0275\u0275restoreView(n).$implicit;return i.\u0275\u0275nextContext(2).cardClicked.emit(e)}),i.\u0275\u0275elementEnd(),i.\u0275\u0275template(3,p,1,0,"face-swap-badge",12),i.\u0275\u0275template(4,g,1,0,"photoCardBadge",12),i.\u0275\u0275elementEnd(),i.\u0275\u0275template(5,m,3,2,"div",13),i.\u0275\u0275elementEnd()}if(2&e){var a=t.$implicit,r=i.\u0275\u0275nextContext(2);i.\u0275\u0275advance(2),i.\u0275\u0275property("imgSrc",a.image.medium),i.\u0275\u0275advance(1),i.\u0275\u0275property("ngIf","FACE_SWAP_CARD"===a.price_class),i.\u0275\u0275advance(1),i.\u0275\u0275property("ngIf","TEMPLATE"===a.price_class),i.\u0275\u0275advance(1),i.\u0275\u0275property("ngIf",r.showQuickActions)}}function v(e,t){if(1&e){var n=i.\u0275\u0275getCurrentView();i.\u0275\u0275elementStart(0,"button",17),i.\u0275\u0275listener("click",function(){return i.\u0275\u0275restoreView(n),i.\u0275\u0275nextContext(2).scroll("right")}),i.\u0275\u0275element(1,"i",18),i.\u0275\u0275elementEnd()}if(2&e){var a=i.\u0275\u0275nextContext(2);i.\u0275\u0275classProp("hidden",!a.showRightArrow||a.cards.length<5)}}function C(e,t){if(1&e&&(i.\u0275\u0275elementStart(0,"div",1),i.\u0275\u0275template(1,d,2,2,"button",2),i.\u0275\u0275elementStart(2,"div",3,4),i.\u0275\u0275template(4,h,6,4,"div",5),i.\u0275\u0275elementEnd(),i.\u0275\u0275template(5,v,2,2,"button",6),i.\u0275\u0275elementEnd()),2&e){var n=i.\u0275\u0275nextContext();i.\u0275\u0275advance(1),i.\u0275\u0275property("ngIf",n.showControls),i.\u0275\u0275advance(3),i.\u0275\u0275property("ngForOf",n.cards),i.\u0275\u0275advance(1),i.\u0275\u0275property("ngIf",n.showControls)}}function _(e,t){1&e&&(i.\u0275\u0275elementStart(0,"div",1),i.\u0275\u0275element(1,"div",19),i.\u0275\u0275elementEnd())}var x,P=((x=function(){return f(function e(){u(this,e),this.showControls=!0,this.showQuickActions=!0,this.cardClicked=new i.EventEmitter,this.addToBasketClicked=new i.EventEmitter,this.showLeftArrow=!1,this.showRightArrow=!0},[{key:"ngAfterViewInit",value:function(){var e,t=this;if(this.showControls){var n=null===(e=this.carouselInner)||void 0===e?void 0:e.nativeElement;!n||(setTimeout(function(){return t.updateArrows()},50),n.addEventListener("scroll",function(){return t.updateArrows()}))}}},{key:"ngOnDestroy",value:function(){var e,t=this,n=null===(e=this.carouselInner)||void 0===e?void 0:e.nativeElement;n&&n.removeEventListener("scroll",function(){return t.updateArrows()})}},{key:"scroll",value:function(e){var t,n=this,i=null===(t=this.carouselInner)||void 0===t?void 0:t.nativeElement,a=i.offsetWidth/1.5;i.scrollBy("left"===e?{left:-a,behavior:"smooth"}:{left:a,behavior:"smooth"}),setTimeout(function(){return n.updateArrows()},400)}},{key:"updateArrows",value:function(){var e,t=null===(e=this.carouselInner)||void 0===e?void 0:e.nativeElement,n=t.scrollLeft,i=t.scrollWidth,a=t.clientWidth;this.showLeftArrow=n>10,this.showRightArrow=n+a<i-10}}])}()).\u0275fac=function(e){return new(e||x)},x.\u0275cmp=i.\u0275\u0275defineComponent({type:x,selectors:[["card-carousel"]],viewQuery:function(e,t){var n;1&e&&i.\u0275\u0275viewQuery(s,5),2&e&&i.\u0275\u0275queryRefresh(n=i.\u0275\u0275loadQuery())&&(t.carouselInner=n.first)},inputs:{cards:"cards",showControls:"showControls",showQuickActions:"showQuickActions"},outputs:{cardClicked:"cardClicked",addToBasketClicked:"addToBasketClicked"},decls:2,vars:2,consts:[["class","card-carousel",4,"ngIf"],[1,"card-carousel"],["class","carousel-arrow left",3,"hidden","click",4,"ngIf"],[1,"card-carousel-inner"],["carouselInner",""],["class","card",4,"ngFor","ngForOf"],["class","carousel-arrow right",3,"hidden","click",4,"ngIf"],[1,"carousel-arrow","left",3,"click"],[1,"mdi","mdi-chevron-left"],[1,"card"],[1,"card-image"],[3,"imgSrc","click"],[4,"ngIf"],["class","card-actions",4,"ngIf"],[1,"card-actions"],[3,"card","className"],["imgSrc","svg/basket2.svg",1,"icon",3,"click"],[1,"carousel-arrow","right",3,"click"],[1,"mdi","mdi-chevron-right"],[1,"loader"]],template:function(e,t){1&e&&(i.\u0275\u0275template(0,C,6,3,"div",0),i.\u0275\u0275template(1,_,2,0,"div",0)),2&e&&(i.\u0275\u0275property("ngIf",t.cards),i.\u0275\u0275advance(1),i.\u0275\u0275property("ngIf",!t.cards))},directives:[a.O5,a.sg,r.t1,o.M,l.M,c.J],styles:['.card[_ngcontent-%COMP%]{-ms-flex-negative:0;flex-shrink:0;max-width:6.5rem;position:relative}@media (min-width: 450px){.card[_ngcontent-%COMP%]{max-width:10rem}}@media (min-width: 992px){.card[_ngcontent-%COMP%]{max-width:125px}}@media (min-width: 1200px){.card[_ngcontent-%COMP%]{max-width:137px}}.card[_ngcontent-%COMP%] > .card-image[_ngcontent-%COMP%]{position:relative}.card[_ngcontent-%COMP%] > .card-image[_ngcontent-%COMP%] > img[_ngcontent-%COMP%]{cursor:pointer;width:100%;-webkit-box-shadow:0px 4px 4px 0px #00000024;box-shadow:0 4px 4px #00000024;border-radius:4px}.card[_ngcontent-%COMP%] > .card-actions[_ngcontent-%COMP%]{display:-webkit-box;display:-ms-flexbox;display:flex;width:75px;margin:10% auto 0;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between}.card[_ngcontent-%COMP%] > .card-actions[_ngcontent-%COMP%] > .icon[_ngcontent-%COMP%]{height:20px;width:24px;
1cursor:pointer}.carousel-arrow[_ngcontent-%COMP%]{position:absolute;top:50%;-webkit-transform:translateY(-50%);transform:translateY(-50%);background-color:#000;border:none;border-radius:50%;cursor:pointer;width:30px;height:30px;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;z-index:2;opacity:1;-webkit-transition:opacity .3s ease;transition:opacity .3s ease}.carousel-arrow.hidden[_ngcontent-%COMP%]{opacity:0;pointer-events:none}.carousel-arrow.left[_ngcontent-%COMP%]{left:10px}.carousel-arrow.right[_ngcontent-%COMP%]{right:10px}.carousel-arrow[_ngcontent-%COMP%]   i[_ngcontent-%COMP%]{font-size:30px;cursor:pointer;color:#fff;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center}.card-carousel[_ngcontent-%COMP%]{position:relative;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.card-carousel-inner[_ngcontent-%COMP%]{display:-webkit-box;display:-ms-flexbox;display:flex;overflow-x:auto;scroll-behavior:smooth;grid-gap:8px;gap:8px;padding:0 16px 10px;scroll-snap-type:x mandatory;-ms-overflow-style:none;scrollbar-width:none;width:100%}.card-carousel-inner[_ngcontent-%COMP%]::-webkit-scrollbar{display:none}@media (min-width: 769px){.card-carousel-inner[_ngcontent-%COMP%]{grid-gap:16px;gap:16px;padding:0 24px 10px}}.loader[_ngcontent-%COMP%]{width:100%;height:100%;width:6rem;position:relative;display:inline-block;aspect-ratio:1/1;margin:0 auto}.loader[_ngcontent-%COMP%]:after, .loader[_ngcontent-%COMP%]:before{position:absolute;left:0;top:0;-webkit-box-sizing:border-box;box-sizing:border-box;aspect-ratio:1/1;content:"";border-radius:50%;-webkit-animation:anim-loader 2s ease-in-out infinite;animation:anim-loader 2s ease-in-out infinite;width:100%;background:#0000000f}.loader[_ngcontent-%COMP%]:after{opacity:0;-webkit-animation-delay:1s;animation-delay:1s}@-webkit-keyframes anim-loader{0%,to{-webkit-transform:scale(0);transform:scale(0);opacity:1}50%{-webkit-transform:scale(1);transform:scale(1);opacity:0}}@keyframes anim-loader{0%,to{-webkit-transform:scale(0);transform:scale(0);opacity:1}50%{-webkit-transform:scale(1);transform:scale(1);opacity:0}}']}),x)},32282:function(n,a,l){l.r(a),l.d(a,{GiftUpsellModule:function(){return Sn}});var d=l(71637),p=l(13074),g=l(85572),m=l(20820),h=l(6650),v=l(8355),C=l(10480),_=l(39417),x=l(20354),P=l(67053),b=l(81547),y=l(95410),k=l(33822),w=l(617),O=l(62415),M=l(70013),S=l(9141),I=l(2477),U=l(41636),E=l(92674),A=l(33138),B=l(29806),G=l(86215),T=l(29452),V=l(39446),j=l(37756),z=l(22459),F=l(17419),L=l(93386),D=l(30105),N=l(23576);function R(e,t){if(1&e&&(O.\u0275\u0275elementStart(0,"div",1),O.\u0275\u0275elementStart(1,"span",2),O.\u0275\u0275text(2,"XTRAthortful"),O.\u0275\u0275elementEnd(),O.\u0275\u0275elementStart(3,"span",3),O.\u0275\u0275text(4,"Members price:"),O.\u0275\u0275elementEnd(),O.\u0275\u0275elementStart(5,"span",4),O.\u0275\u0275text(6),O.\u0275\u0275pipe(7,"currency"),O.\u0275\u0275elementEnd(),O.\u0275\u0275elementStart(8,"span",5),O.\u0275\u0275text(9),O.\u0275\u0275pipe(10,"currency"),O.\u0275\u0275elementEnd(),O.\u0275\u0275elementEnd()),2&e){var n=O.\u0275\u0275nextContext();O.\u0275\u0275advance(6),O.\u0275\u0275textInterpolate(O.\u0275\u0275pipeBind2(7,2,n.price,"GBP")),O.\u0275\u0275advance(3),O.\u0275\u0275textInterpolate(O.\u0275\u0275pipeBind2(10,5,n.memberPrice,"GBP"))}}var $,W=(($=function(){return f(function e(t,n){u(this,e),this.thortfulSubscription=t,this.cdr=n,this.memberPrice=null,this.destroy$=new L.xQ},[{key:"ngOnInit",value:function(){var e=this;this.thortfulSubscription.ready$.pipe((0,h.P)(),(0,D.R)(this.destroy$)).subscribe(function(){e.calculateMemberPrice(),e.cdr.markForCheck()})}},{key:"ngOnDestroy",value:function(){this.destroy$.next(),this.destroy$.complete()}},{key:"getCardOnlyPrice",value:function(){var e,t,n,i,a=this;return(null===(e=this.sizes)||void 0===e?void 0:e.some(function(e){return e.id===a.itemId}))?this.price:null===(i=null===(n=null===(t=this.sizes)||void 0===t?void 0:t[0])||void 0===n?void 0:n.cost)||void 0===i?void 0:i.value}},{key:"calculateMemberPrice",value:function(){var e;if(!this.thortfulSubscription.userIsSubscribed()){var t=null===(e=this.thortfulSubscription.subscriptionPrices)||void 0===e?void 0:e.subscriptionDiscountPercentages;if(t&&this.price){var n="TEMPLATE"===this.priceClass?t.template:"FACE_SWAP_CARD"===this.priceClass?t.faceswap:t.standard,i=this.getCardOnlyPrice();this.memberPrice=n?this.price-i*n/100:null}}}}])}()).\u0275fac=function(e){return new(e||$)(O.\u0275\u0275directiveInject(N._),O.\u0275\u0275directiveInject(O.ChangeDetectorRef))},$.\u0275cmp=O.\u0275\u0275defineComponent({type:$,selectors:[["member-pricing-roundel"]],inputs:{price:"price",itemId:"itemId",sizes:"sizes",priceClass:"priceClass"},decls:1,vars:1,consts:[["class","members-label",4,"ngIf"],[1,"members-label"],[1,"members-label-code"],[1,"members-label-text"],[1,"members-label-original"],[1,"members-label-discounted"]],template:function(e,t){1&e&&O.\u0275\u0275template(0,R,11,8,"div",0),2&e&&O.\u0275\u0275property("ngIf",t.memberPrice)},directives:[E.O5],pipes:[E.H9],styles:['.members-label[_ngcontent-%COMP%]{display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;grid-gap:6px;gap:6px;width:100%;height:27px;background:url(https://images-fe.thortful.com/img/hosted/member-pricing-roundel-background.png) no-repeat;background-size:100% 100%;border-radius:4px;padding:6px 10px;font-family:"Courier New",Courier,monospace;font-size:.875rem;
1color:#1a1a1a}.members-label-code[_ngcontent-%COMP%]{font-family:"Courier Prime","Courier New",Courier,monospace;font-weight:700;font-style:normal;font-size:12px;line-height:100%;letter-spacing:0;text-decoration:underline;-webkit-text-decoration-style:solid;text-decoration-style:solid;text-underline-offset:0;text-decoration-thickness:from-font}.members-label-text[_ngcontent-%COMP%]{font-family:"Courier Prime","Courier New",Courier,monospace;font-weight:400;font-size:12px;line-height:100%;letter-spacing:0}.members-label-original[_ngcontent-%COMP%]{font-family:"Courier Prime","Courier New",Courier,monospace;font-weight:400;font-size:12px;line-height:100%;letter-spacing:0;text-decoration:line-through;color:#666}.members-label-discounted[_ngcontent-%COMP%]{font-family:"Courier Prime","Courier New",Courier,monospace;font-weight:400;font-size:12px;line-height:100%;letter-spacing:0}'],changeDetection:0}),$);function q(e,t){if(1&e&&O.\u0275\u0275element(0,"img",4),2&e){var n=O.\u0275\u0275nextContext(2);O.\u0275\u0275property("src",n.callout.icon.data.attributes.url,O.\u0275\u0275sanitizeUrl)}}function H(e,t){if(1&e&&(O.\u0275\u0275elementStart(0,"div",1),O.\u0275\u0275elementStart(1,"div",2),O.\u0275\u0275text(2),O.\u0275\u0275elementEnd(),O.\u0275\u0275template(3,q,1,1,"img",3),O.\u0275\u0275elementEnd()),2&e){var n=O.\u0275\u0275nextContext();O.\u0275\u0275styleProp("background-color",n.callout.background_colour||"#fff"),O.\u0275\u0275advance(1),O.\u0275\u0275styleProp("color",n.callout.colour||"#000"),O.\u0275\u0275advance(1),O.\u0275\u0275textInterpolate(n.callout.text),O.\u0275\u0275advance(1),O.\u0275\u0275property("ngIf",null==n.callout.icon||null==n.callout.icon.data||null==n.callout.icon.data.attributes?null:n.callout.icon.data.attributes.url)}}var Q=function(){var e=f(function e(){u(this,e)});return e.\u0275fac=function(t){return new(t||e)},e.\u0275cmp=O.\u0275\u0275defineComponent({type:e,selectors:[["web-callout"]],inputs:{callout:"callout"},decls:1,vars:1,consts:[["class","callout-container",3,"background-color",4,"ngIf"],[1,"callout-container"],[1,"callout-text"],["class","callout-icon",3,"src",4,"ngIf"],[1,"callout-icon",3,"src"]],template:function(e,t){1&e&&O.\u0275\u0275template(0,H,4,6,"div",0),2&e&&O.\u0275\u0275property("ngIf",t.callout)},directives:[E.O5],styles:[".callout-container[_ngcontent-%COMP%]{width:-webkit-fit-content!important;width:-moz-fit-content!important;width:fit-content!important;height:-webkit-fit-content!important;height:-moz-fit-content!important;height:fit-content!important;padding:8px 12px;font:normal 500 14px Roboto,Arial,Helvetica,sans-serif;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;grid-gap:10px;gap:10px;border-radius:4px}.callout-container[_ngcontent-%COMP%]   .callout-icon[_ngcontent-%COMP%]{width:17px}"]}),e}();function Y(e,t){if(1&e&&(O.\u0275\u0275elementStart(0,"div",17),O.\u0275\u0275text(1),O.\u0275\u0275pipe(2,"currency"),O.\u0275\u0275elementEnd()),2&e){var n=O.\u0275\u0275nextContext(2).$implicit;O.\u0275\u0275advance(1),O.\u0275\u0275textInterpolate(O.\u0275\u0275pipeBind2(2,1,n.cost.value,n.cost.currency))}}function J(e,t){if(1&e&&(O.\u0275\u0275elementStart(0,"div",10),O.\u0275\u0275element(1,"div",11),O.\u0275\u0275element(2,"input",12),O.\u0275\u0275elementStart(3,"label"),O.\u0275\u0275element(4,"div",13),O.\u0275\u0275element(5,"div",14),O.\u0275\u0275element(6,"div",15),O.\u0275\u0275elementStart(7,"span"),O.\u0275\u0275text(8),O.\u0275\u0275elementEnd(),O.\u0275\u0275elementEnd(),O.\u0275\u0275template(9,Y,3,4,"div",16),O.\u0275\u0275elementEnd()),2&e){var n=O.\u0275\u0275nextContext().$implicit,i=O.\u0275\u0275reference(6),a=O.\u0275\u0275nextContext(2);O.\u0275\u0275advance(2),O.\u0275\u0275property("checked",n.id===a.selectedSizeId),O.\u0275\u0275advance(6),O.\u0275\u0275textInterpolate(n.name),O.\u0275\u0275advance(1),O.\u0275\u0275property("ngIf",n.id===a.selectedSizeId)("ngIfElse",i)}}function K(e,t){if(1&e&&O.\u0275\u0275element(0,"member-pricing-roundel",19),2&e){var n=O.\u0275\u0275nextContext(2).$implicit,i=O.\u0275\u0275nextContext(2);O.\u0275\u0275property("price",n.cost.value)("itemId",n.id)("sizes",i.pdpUpsell.sizes)("priceClass",i.priceClass)}}function X(e,t){if(1&e&&(O.\u0275\u0275elementContainerStart(0),O.\u0275\u0275template(1,K,1,4,"member-pricing-roundel",18),O.\u0275\u0275elementContainerEnd()),2&e){var n=O.\u0275\u0275nextContext().$implicit,i=O.\u0275\u0275nextContext(2);O.\u0275\u0275advance(1),O.\u0275\u0275property("ngIf",n.id===i.selectedSizeId&&i.sizeIds.has(n.id))}}function Z(e,t){if(1&e&&(O.\u0275\u0275elementStart(0,"div",21),O.\u0275\u0275element(1,"web-callout",22),O.\u0275\u0275elementEnd()),2&e){var n=O.\u0275\u0275nextContext(2).$implicit,i=O.\u0275\u0275nextContext(2);O.\u0275\u0275advance(1),O.\u0275\u0275property("callout",i.getCallout(n.id))}}function ee(e,t){if(1&e&&(O.\u0275\u0275elementContainerStart(0),O.\u0275\u0275template(1,Z,2,1,"div",20),O.\u0275\u0275elementContainerEnd()),2&e){var n=O.\u0275\u0275nextContext().$implicit,i=O.\u0275\u0275nextContext(2);O.\u0275\u0275advance(1),O.\u0275\u0275property("ngIf",!!i.getCallout(n.id))}}function te(e,t){1&e&&(O.\u0275\u0275elementStart(0,"div",21),O.\u0275\u0275element(1,"img",23),O.\u0275\u0275elementEnd())}function ne(e,t){if(1&e&&(O.\u0275\u0275elementContainerStart(0),O.\u0275\u0275template(1,te,2,0,"div",20),O.\u0275\u0275elementContainerEnd()),2&e){var n=O.\u0275\u0275nextContext(2).$implicit;O.\u0275\u0275advance(1),O.\u0275\u0275property("ngIf","A6"===n.id)}}function ie(e,t){1&e&&(O.\u0275\u0275elementStart(0,"div",21),O.\u0275\u0275element(1,"img",24),O.\u0275\u0275elementEnd())}function ae(e,t){if(1&e&&(O.\u0275\u0275elementContainerStart(0),O.\u0275\u0275template(1,ie,2,0,"div",20),O.\u0275\u0275elementContainerEnd()),2&e){var n=O.\u0275\u0275nextContext(2).$implicit;O.\u0275\u0275advance(1),O.\u0275\u0275property("ngIf","67533969a1def37bd497e3b2"===n.id)}}function re(e,t){1&e&&(O.\u0275\u0275elementContainerStart(0),O.\u0275\u0275template(1,ne,2,1,"ng-container",6),O.\u0275\u0275template(2,ae,2,1,"ng-container",6),O.\u0275\u0275elementContainerEnd()),2&e&&(O.\u0275\u0275advance(1),O.\u0275\u0275property("featureFlag","WEB-1555"),O.\u0275\u0275advance(1),O.\u0275\u0275property("featureFlag","WAL-573"))}function oe(e,t){if(1&e&&(O.\u0275\u0275elementStart(0,"div",17),O.\u0275\u0275text(1),O.\u0275\u0275pipe(2,"currency"),O.\u0275\u0275elementEnd()),2&e){var n=O.\u0275\u0275nextContext(2).$implicit;O.\u0275\u0275advance(1),O.\u0275\u0275textInterpolate("+"+O.\u0275\u0275pipeBind2(2,1,0,n.cost.currency))}}function le(e,t){if(1&e&&(O.\u0275\u0275elementStart(0,"div",17),O.\u0275\u0275text(1),O.\u0275\u0275pipe(2,"currency"),O.\u0275\u0275elementEnd()),2&e){var n=O.\u0275\u0275nextContext(2).$implicit,i=O.\u0275\u0275nextContext(2);O.\u0275\u0275advance(1),O.\u0275\u0275textInterpolate((n.cost.value>i.selectedPrice?"+":"")+O.\u0275\u0275pipeBind2(2,1,n.cost.value-i.selectedPrice,n.cost.currency))}}function ce(e,t){if(1&e&&(O.\u0275\u0275template(0,oe,3,4,"div",25),O.\u0275\u0275template(1,le,3,4,"div",25)),2&e){var n=O.\u0275\u0275nextContext().$implicit,i=O.\u0275\u0275nextContext(2);O.\u0275\u0275property("ngIf",n.cost.value===i.selectedPrice),O.\u0275\u0275advance(1),O.\u0275\u0275property("ngIf",n.cost.value!==i.selectedPrice)}}function se(e,t){if(1&e&&(O.\u0275\u0275elementStart(0,"div",10),O.\u0275\u0275element(1,"div",11),O.\u0275\u0275element(2,"input",12),O.\u0275\u0275elementStart(3,"label"),O.\u0275\u0275element(4,"div",13),O.\u0275\u0275element(5,"div",14),O.\u0275\u0275element(6,"div",15),O.\u0275\u0275elementStart(7,"span"),O.\u0275\u0275text(8),O.\u0275\u0275elementEnd(),O.\u0275\u0275elementEnd(),O.\u0275\u0275elementStart(9,"div",17),O.\u0275\u0275text(10),O.\u0275\u0275pipe(11,"currency"),O.\u0275\u0275elementEnd(),O.\u0275\u0275elementEnd()),2&e){var n=O.\u0275\u0275nextContext().$implicit,i=O.\u0275\u0275nextContext(2);O.\u0275\u0275advance(2),O.\u0275\u0275property("checked",n.id===i.selectedSizeId),O.\u0275\u0275advance(6),O.\u0275\u0275textInterpolate(n.name),O.\u0275\u0275advance(2),O.\u0275\u0275textInterpolate(O.\u0275\u0275pipeBind2(11,3,n.cost.value,n.cost.currency))}}var de=function(e){return{selected:e}};function pe(e,t){if(1&e){var n=O.\u0275\u0275getCurrentView();O.\u0275\u0275elementStart(0,"div",4),O.\u0275\u0275listener("click",function(){var e=O.\u0275\u0275restoreView(n).$implicit;return O.\u0275\u0275nextContext(2).selectProductSize(e)}
1),O.\u0275\u0275template(1,J,10,4,"div",5),O.\u0275\u0275template(2,X,2,1,"ng-container",6),O.\u0275\u0275template(3,ee,2,1,"ng-container",6),O.\u0275\u0275template(4,re,3,2,"ng-container",7),O.\u0275\u0275template(5,ce,2,2,"ng-template",null,8,O.\u0275\u0275templateRefExtractor),O.\u0275\u0275template(7,se,12,6,"ng-template",null,9,O.\u0275\u0275templateRefExtractor),O.\u0275\u0275elementEnd()}if(2&e){var i=t.$implicit,a=O.\u0275\u0275reference(8),r=O.\u0275\u0275nextContext(2);O.\u0275\u0275property("ngClass",O.\u0275\u0275pureFunction1(6,de,i.id===r.selectedSizeId)),O.\u0275\u0275advance(1),O.\u0275\u0275property("ngIf",r.isDynamicPricingActive)("ngIfElse",a),O.\u0275\u0275advance(1),O.\u0275\u0275property("featureFlag","WEB-2827"),O.\u0275\u0275advance(1),O.\u0275\u0275property("featureFlag","TSN-651"),O.\u0275\u0275advance(1),O.\u0275\u0275property("featureFlagDisabled","TSN-651")}}function ue(e,t){if(1&e&&(O.\u0275\u0275elementStart(0,"div",1),O.\u0275\u0275elementStart(1,"p"),O.\u0275\u0275text(2,"Select size:"),O.\u0275\u0275elementEnd(),O.\u0275\u0275elementStart(3,"div",2),O.\u0275\u0275template(4,pe,9,8,"div",3),O.\u0275\u0275elementEnd(),O.\u0275\u0275elementEnd()),2&e){var n=O.\u0275\u0275nextContext();O.\u0275\u0275advance(4),O.\u0275\u0275property("ngForOf",n.pdpUpsellSizesAndGifts)}}var ge=function(){var e=function(){return f(function e(t,n){var i=this;u(this,e),this.strapiService=t,this.Store=n,this.selectSizeElementClicked=new O.EventEmitter,this.defaultPdpUpsell={card_id:"",gift_relevance_criteria:"default",sizes:[{id:"A5",name:"A5 Card",cost:{currency:"GBP",value:y.g.Price},legacy:{format:"A5",variation_id:"59bf9c49e4b0eb6fae24966b"}}],gifts:[]},this.pdpUpsellSizesAndGifts=[{id:"A5",name:"A5 Card",cost:{currency:"GBP",value:y.g.Price},legacy:{format:"A5",variation_id:"59bf9c49e4b0eb6fae24966b"}}],this.selectedPrice=y.g.Price,this.sizeIds=new Set,this.webCallouts=[],this.isDynamicPricingActive=!1,this.Store.select("featureFlag","config","TSN-840").pipe((0,h.P)(function(e){return"boolean"==typeof e})).subscribe(function(e){i.isDynamicPricingActive=e,i.isDynamicPricingActive&&i.getSelectedPrice()})},[{key:"ngOnInit",value:function(){this.pdpUpsell=this.defaultPdpUpsell,this.getWebCalloutContent()}},{key:"ngOnChanges",value:function(e){var t=JSON.parse(localStorage.getItem("hide-gift-upsell"))||!1;e.pdpUpsell&&e.pdpUpsell.currentValue&&(t?this.pdpUpsellSizesAndGifts=s(this.pdpUpsell.sizes):this.pdpUpsell.sizes.length?this.pdpUpsellSizesAndGifts=[].concat(s(this.pdpUpsell.sizes),s(this.pdpUpsell.gifts)):(this.pdpUpsellSizesAndGifts=[].concat(s(this.defaultPdpUpsell.sizes),s(this.pdpUpsell.gifts)),this.pdpUpsell.sizes=this.defaultPdpUpsell.sizes),this.sizeIds=new Set(this.pdpUpsell.sizes.map(function(e){return e.id})),this.isDynamicPricingActive&&this.getSelectedPrice(),this.getWebCalloutContent()),e.selectedSizeId&&this.isDynamicPricingActive&&this.getSelectedPrice()}},{key:"getWebCalloutEnabled",value:function(){return this.Store.select("featureFlag","config","TSN-651").pipe((0,h.P)(function(e){return"boolean"==typeof e})).toPromise()}},{key:"getWebCalloutContent",value:function(){return(0,g.mG)(this,void 0,void 0,c().mark(function e(){var t=this;return c().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(e.t0="boolean"!=typeof this.webCalloutsEnabled,!e.t0){e.next=5;break}return e.next=4,this.getWebCalloutEnabled();case 4:this.webCalloutsEnabled=e.sent;case 5:this.webCalloutsEnabled&&this.strapiService.requestStrapiWebCallouts().then(function(e){var n;t.webCallouts=(null===(n=e.data)||void 0===n?void 0:n.map(function(e){return e.attributes}))||[]});case 6:case"end":return e.stop()}},e,this)}))}},{key:"getCallout",value:function(e){var t;return null===(t=this.webCallouts)||void 0===t?void 0:t.find(function(t){return t.reference_id===e})}},{key:"selectProductSize",value:function(e){this.isDynamicPricingActive&&(this.selectedPrice=e.cost.value),this.selectSizeElementClicked.emit(e)}},{key:"getSelectedPrice",value:function(){var e=this,t=this.pdpUpsellSizesAndGifts.find(function(t){return t.id===e.selectedSizeId});t&&(this.selectedPrice=t.cost.value)}}])}();return e.\u0275fac=function(t){return new(t||e)(O.\u0275\u0275directiveInject(z.a),O.\u0275\u0275directiveInject(F.yh))},e.\u0275cmp=O.\u0275\u0275defineComponent({type:e,selectors:[["pdp-upsell-select-size"]],inputs:{selectedSizeId:"selectedSizeId",priceClass:"priceClass",pdpUpsell:"pdpUpsell"},outputs:{selectSizeElementClicked:"selectSizeElementClicked"},features:[O.\u0275\u0275NgOnChangesFeature],decls:1,vars:1,consts:[["class","size-container",4,"ngIf"],[1,"size-container"],[1,"radio-buttons"],["class","radio-container",3,"ngClass","click",4,"ngFor","ngForOf"],[1,"radio-container",3,"ngClass","click"],["class","thor-radiobox",4,"ngIf","ngIfElse"],[4,"featureFlag"],[4,"featureFlagDisabled"],["showNonSelectedItems",""],["isDynamicPricingInactive",""],[1,"thor-radiobox"],[1,"thor-checkbox"],["type","checkbox",1,"required",3,"checked"],[1,"unchecked"],[1,"hovered"],[1,"checked"],["class","price",4,"ngIf","ngIfElse"],[1,"price"],[3,"price","itemId","sizes","priceClass",4,"ngIf"],[3,"price","itemId","sizes","priceClass"],["class","callout",4,"ngIf"],[1,"callout"],[3,"callout"],["imgSrc","/img/gifts/callout_A6.jpg"],["imgSrc","/img/gifts/callout-valentines-flowers.png"],["class","price",4,"ngIf"]],template:function(e,t){1&e&&O.\u0275\u0275template(0,ue,5,1,"div",0),2&e&&O.\u0275\u0275property("ngIf",t.pdpUpsellSizesAndGifts)},directives:[E.O5,E.sg,E.mk,M.Hl,M.oT,W,Q,M.t1],pipes:[E.H9],styles:["@media (min-width: 769px){.size-container[_ngcontent-%COMP%]{margin-top:-175px}}@media (min-width: 769px){.size-container.mobile[_ngcontent-%COMP%]{display:none}}.size-container.desktop[_ngcontent-%COMP%]{display:none}@media (min-width: 769px){.size-container.desktop[_ngcontent-%COMP%]{display:block}}.radio-buttons[_ngcontent-%COMP%]{margin-bottom:20px}.radio-buttons[_ngcontent-%COMP%]   .radio-container[_ngcontent-%COMP%]{margin-bottom:8px;text-align:center;border-radius:4px;border:1px solid rgba(0,0,0,.2);width:100%;vertical-align:middle;line-height:49px;cursor:pointer;font-size:16px;padding:0 14px}.radio-buttons[_ngcontent-%COMP%]   .radio-container[_ngcontent-%COMP%]   .price[_ngcontent-%COMP%]{margin-left:auto}.radio-buttons[_ngcontent-%COMP%]   .radio-container[_ngcontent-%COMP%]:hover, .radio-buttons[_ngcontent-%COMP%]   .radio-container.selected[_ngcontent-%COMP%]{border:solid 1px #ff6900}.radio-buttons[_ngcontent-%COMP%]   .radio-container.selected[_ngcontent-%COMP%]{font-weight:700}.radio-buttons[_ngcontent-%COMP%]   .radio-container.selected[_ngcontent-%COMP%]   span[_ngcontent-%COMP%]{font-weight:700}.radio-buttons[_ngcontent-%COMP%]   .radio-container[_ngcontent-%COMP%]   member-pricing-roundel[_ng
1content-%COMP%]{display:block;position:relative;top:-10px;line-height:normal}.thor-radiobox[_ngcontent-%COMP%]   label[_ngcontent-%COMP%]   .unchecked[_ngcontent-%COMP%]{border:1px solid #000}.thor-radiobox[_ngcontent-%COMP%]{display:-webkit-box;display:-ms-flexbox;display:flex;text-align:left}.thor-checkbox[_ngcontent-%COMP%]   label[_ngcontent-%COMP%], .thor-radiobox[_ngcontent-%COMP%]   label[_ngcontent-%COMP%]{position:absolute;max-width:80%;padding-right:8px;top:50%;-webkit-transform:translateY(-50%);transform:translateY(-50%);padding-top:0}.thor-checkbox[_ngcontent-%COMP%]   input[type=checkbox][_ngcontent-%COMP%]:checked + label[_ngcontent-%COMP%]   .checked[_ngcontent-%COMP%], .thor-checkbox[_ngcontent-%COMP%]   input[type=checkbox][_ngcontent-%COMP%] + label[_ngcontent-%COMP%]   .unchecked[_ngcontent-%COMP%], .thor-checkbox[_ngcontent-%COMP%]   .hovered[_ngcontent-%COMP%], .thor-radiobox[_ngcontent-%COMP%]   input[type=checkbox][_ngcontent-%COMP%]:checked + label[_ngcontent-%COMP%]   .checked[_ngcontent-%COMP%], .thor-radiobox[_ngcontent-%COMP%]   input[type=checkbox][_ngcontent-%COMP%] + label[_ngcontent-%COMP%]   .unchecked[_ngcontent-%COMP%], .thor-radiobox[_ngcontent-%COMP%]   .hovered[_ngcontent-%COMP%]{position:absolute;top:50%;-webkit-transform:translateY(-50%);transform:translateY(-50%)}.callout[_ngcontent-%COMP%]{text-align:left;line-height:1;padding-left:28px;padding-bottom:10px}.callout[_ngcontent-%COMP%]   img[_ngcontent-%COMP%]{height:35px}.checked.--experiment[_ngcontent-%COMP%]{border-width:1px;position:relative}.checked.--experiment[_ngcontent-%COMP%]   span[_ngcontent-%COMP%]{display:inline-block;width:10px;height:10px;border-radius:50%;background-color:#ff6900;position:absolute;top:50%;left:50%;-webkit-transform:translate(-50%,-50%);transform:translate(-50%,-50%)}h6[_ngcontent-%COMP%]{font-size:16px}"]}),e}
1(),fe=l(94433),me=l(65166),he=l(20298),ve=l(62725),Ce=l(33483),_e=l(37632),xe=l(89477),Pe=l(14905),be=l(17291),ye=l(25801);function ke(e,t){if(1&e){var n=O.\u0275\u0275getCurrentView();O.\u0275\u0275elementStart(0,"div",8),O.\u0275\u0275elementStart(1,"img",9),O.\u0275\u0275listener("click",function(){var e=O.\u0275\u0275restoreView(n).$implicit;return O.\u0275\u0275nextContext(2).openCardPDP(e)}),O.\u0275\u0275elementEnd(),O.\u0275\u0275elementStart(2,"div",10),O.\u0275\u0275element(3,"thor-heart",11),O.\u0275\u0275elementStart(4,"img",12),O.\u0275\u0275listener("click",function(){var e=O.\u0275\u0275restoreView(n).$implicit;return O.\u0275\u0275nextContext(2).addCardToBasket(e)}),O.\u0275\u0275elementEnd(),O.\u0275\u0275elementEnd(),O.\u0275\u0275elementEnd()}if(2&e){var i=t.$implicit;O.\u0275\u0275advance(1),O.\u0275\u0275property("imgSrc",i.image.medium),O.\u0275\u0275advance(2),O.\u0275\u0275property("card",i)("className","type-2")}}function we(e,t){if(1&e){var n=O.\u0275\u0275getCurrentView();O.\u0275\u0275elementStart(0,"div",1),O.\u0275\u0275elementStart(1,"div",2),O.\u0275\u0275elementStart(2,"h5",3),O.\u0275\u0275text(3,"More by this Creator"),O.\u0275\u0275elementEnd(),O.\u0275\u0275elementStart(4,"div",4),O.\u0275\u0275listener("click",function(){return O.\u0275\u0275restoreView(n),O.\u0275\u0275nextContext().redirectToCreatorProfile()}),O.\u0275\u0275element(5,"img",5),O.\u0275\u0275elementStart(6,"span"),O.\u0275\u0275text(7,"View Shop"),O.\u0275\u0275elementEnd(),O.\u0275\u0275elementEnd(),O.\u0275\u0275elementEnd(),O.\u0275\u0275elementStart(8,"div",6),O.\u0275\u0275template(9,ke,5,3,"div",7),O.\u0275\u0275elementEnd(),O.\u0275\u0275elementEnd()}if(2&e){var i=O.\u0275\u0275nextContext();O.\u0275\u0275advance(9),O.\u0275\u0275property("ngForOf",i.similarCards)}}var Oe=(0,M.jT)("Product Clicked - Creator Similiar Cards"),Me=(0,M.jT)("Product Added - Creator Similiar Cards"),Se=function(){var e=function(){return f(function e(t,n,i,a,r,o,l){u(this,e),this.ExploreUtils=t,this.CardUtils=n,this.BasketService=i,this.ShareData=a,this.Notification=r,this.router=o,this.segmentService=l},[{key:"ngOnChanges",value:function(){this.similarCards=null,this.cardDetails&&this.creatorProfile&&this.buildExploreQuery()}},{key:"redirectToCreatorProfile",value:function(){var e,t,n,i,a=this.creatorProfile.friendly_url;this.segmentService.trackCustom({name:"Click on View Shop",data:{creator_name:null===(t=null===(e=this.cardDetails)||void 0===e?void 0:e.creatorProfile)||void 0===t?void 0:t.nickname,creator_id:null===(i=null===(n=this.cardDetails)||void 0===n?void 0:n.creatorProfile)||void 0===i?void 0:i.profile_id}}),this.router.navigate([a?"/creator/".concat(a):"/profile/".concat(this.creatorProfile.profile_id)])}},{key:"buildExploreQuery",value:function(){var e=this,t=this.ExploreUtils.initQuery("cards");t.criteria.categories=this.cardDetails.card.categories,t.criteria.owner_ids=[this.cardDetails.creatorProfile.profile_id];try{this.CardUtils.getCards(t).then(function(t){var n;e.similarCards=t.cards.filter(function(t){return t.id!==e.cardDetails.card.id}),(null===(n=e.similarCards)||void 0===n?void 0:n.length)>6&&(e.similarCards=e.similarCards.slice(0,6))})}catch(n){this.segmentService.trackCustom({name:"Error to get Creator Similiar Cards",data:{}}),this.similarCards=null}}},{key:"addCardToBasket",value:function(e){var t=this;this.BasketService.addToBasket(e,"CART_ADD_SV","A5",void 0).then(function(n){var i,a,r;n&&(t.ShareData.trigger("basketUpdate"),t.Notification.success("Successfully added to basket!"),t.segmentService.track(Me.apply(void 0,s((0,M.xo)(Object.assign({},e))).concat([["tags","[".concat(null===(i=null==e?void 0:e.tags)||void 0===i?void 0:i.join("],["),"]")],["occasion","[".concat(null===(r=null===(a=null==e?void 0:e.classification)||void 0===a?void 0:a.categories)||void 0===r?void 0:r.join("],["),"]")],["card_product_type",null==e?void 0:e.price_class]]))))})}},{key:"openCardPDP",value:function(e){var t,n,i;this.segmentService.trackCustom(Oe.apply(void 0,s((0,M.xo)(e)).concat([["tags","[".concat(null===(t=e.tags)||void 0===t?void 0:t.join("],["),"]")],["occasion","[".concat(null===(i=null===(n=null==e?void 0:e.classification)||void 0===n?void 0:n.categories)||void 0===i?void 0:i.join("],["),"]")],["card_product_type",e.price_class]]))),this.router.navigate(["/card",e.pdp_url||e.card_id])}}])}();return e.\u0275fac=function(t){return new(t||e)(O.\u0275\u0275directiveInject(_e.q),O.\u0275\u0275directiveInject(xe.Q),O.\u0275\u0275directiveInject(Pe.v),O.\u0275\u0275directiveInject(be.u),O.\u0275\u0275directiveInject(ye.P),O.\u0275\u0275directiveInject(p.F0),O.\u0275\u0275directiveInject(M.BP))},e.\u0275cmp=O.\u0275\u0275defineComponent({type:e,selectors:[["creator-similar-cards"]],inputs:{creatorProfile:"creatorProfile",cardDetail
1s:"cardDetails"},features:[O.\u0275\u0275NgOnChangesFeature],decls:1,vars:1,consts:[["class","creator-similar-cards",4,"ngIf"],[1,"creator-similar-cards"],[1,"creator-similar-cards-inner"],[1,"title"],[1,"creator-profile-cta",3,"click"],["imgSrc","svg/store.svg",1,"icon"],[1,"creator-similar-cards-carousel"],["class","card",4,"ngFor","ngForOf"],[1,"card"],[1,"card-image",3,"imgSrc","click"],[1,"card-actions"],[3,"card","className"],["imgSrc","svg/basket2.svg",1,"icon",3,"click"]],template:function(e,t){1&e&&O.\u0275\u0275template(0,we,10,1,"div",0),2&e&&O.\u0275\u0275property("ngIf",t.similarCards&&t.similarCards.length>0)},directives:[E.O5,M.t1,E.sg,Ce.J],styles:[".creator-similar-cards[_ngcontent-%COMP%]{margin-top:32px}.creator-similar-cards-inner[_ngcontent-%COMP%]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between;margin-bottom:16px}@media (min-width: 769px){.creator-similar-cards-inner[_ngcontent-%COMP%]{-webkit-box-pack:start;-ms-flex-pack:start;justify-content:flex-start;grid-gap:12px;gap:12px}}.creator-similar-cards-inner[_ngcontent-%COMP%]   .creator-profile-cta[_ngcontent-%COMP%]{display:-webkit-box;display:-ms-flexbox;display:flex;grid-gap:8px;gap:8px;padding:0 12px;border-radius:16px;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;cursor:pointer}.creator-similar-cards-inner[_ngcontent-%COMP%]   .creator-profile-cta[_ngcontent-%COMP%]:hover{background:#F7EFE5;-webkit-transition:all .2s;transition:all .2s}.creator-similar-cards-inner[_ngcontent-%COMP%]   .creator-profile-cta[_ngcontent-%COMP%] > .icon[_ngcontent-%COMP%]{width:20px}.creator-similar-cards-inner[_ngcontent-%COMP%]   .creator-profile-cta[_ngcontent-%COMP%] > span[_ngcontent-%COMP%]{font-size:14px;font-weight:500}@media (min-width: 769px){.creator-similar-cards-inner[_ngcontent-%COMP%]   .creator-profile-cta[_ngcontent-%COMP%] > span[_ngcontent-%COMP%]{font-size:16px}}.creator-similar-cards-inner[_ngcontent-%COMP%] > .title[_ngcontent-%COMP%]{font-size:16px;margin:0}@media (min-width: 769px){.creator-similar-cards-inner[_ngcontent-%COMP%] > .title[_ngcontent-%COMP%]{font-size:24px}}.creator-similar-cards-carousel[_ngcontent-%COMP%]{overflow-y:scroll;display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-wrap:nowrap;flex-wrap:nowrap;width:100%;grid-gap:16px;gap:16px;scrollbar-width:none;margin-bottom:24px}.card[_ngcontent-%COMP%]{-ms-flex-negative:0;flex-shrink:0;max-width:110px}@media (min-width: 450px){.card[_ngcontent-%COMP%]{max-width:133px}}@media (min-width: 769px){.card[_ngcontent-%COMP%]{max-width:107px}}@media (min-width: 992px){.card[_ngcontent-%COMP%]{max-width:125px}}@media (min-width: 1200px){.card[_ngcontent-%COMP%]{max-width:157px}}.card[_ngcontent-%COMP%] > .card-image[_ngcontent-%COMP%]{cursor:pointer;width:100%;-webkit-box-shadow:0px 4px 4px 0px #00000024;box-shadow:0 4px 4px #00000024}.card[_ngcontent-%COMP%] > .card-actions[_ngcontent-%COMP%]{display:-webkit-box;display:-ms-flexbox;display:flex;width:75px;margin:10% auto 0;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between}.card[_ngcontent-%COMP%] > .card-actions[_ngcontent-%COMP%] > .icon[_ngcontent-%COMP%]{height:20px;width:24px;cursor:pointer}"]}),e}(),Ie=l(66696),Ue=l(26633);function Ee(e,t){if(1&e){var n=O.\u0275\u0275getCurrentView();O.\u0275\u0275elementStart(0,"div",1),O.\u0275\u0275elementStart(1,"div",2),O.\u0275\u0275text(2,"You may also like"),O.\u0275\u0275elementEnd(),O.\u0275\u0275elementStart(3,"card-carousel",3),O.\u0275\u0275listener("cardClicked",function(e){return O.\u0275\u0275restoreView(n),O.\u0275\u0275nextContext().openCardPDP(e)})("addToBasketClicked",function(e){return O.\u0275\u0275restoreView(n),O.\u0275\u0275nextContext().addCardToBasket(e)}),O.\u0275\u0275elementEnd(),O.\u0275\u0275elementEnd()}if(2&e){var i=O.\u0275\u0275nextContext();O.\u0275\u0275advance(3),O.\u0275\u0275property("cards",i.cards)("showControls",!0)("showQuickActions",!1)}}var Ae=(0,M.jT)("Product Clicked - Similiar Cards"),Be=(0,M.jT)("Product Added - Similiar Cards"),Ge=function(){var e=function(){return f(function e(t,n,i,a,r,o){u(this,e),this.BasketService=t,this.ShareData=n,this.Notification=i,this.router=a,this.segmentService=r,this.similarCardsService=o},[{key:"ngOnChanges",value:function(e){var t=this;e.card&&"STANDARD"===this.card.card.price_class&&this.similarCardsService.getSimilarCards(this.card.id).then(function(e){t.cards=e})}},{key:"addCardToBasket",value:function(e){var t=this;this.BasketService.addToBasket(e,"CART_ADD_SV","A5",void 0).then(function(n){var i,a,r;n&&(t.ShareData.trigger("basketUpdate"),t.Notification.success("Successfully added to basket!"),t.segmentService.track(Be.apply(void 0,s((0,M.xo)(Object.assign({},e))).concat([["tags","[".concat(null===(i=null==e?void 0:e.tags)||void 0===i?void 0:i.join("],["),"]")],["occasion","[".concat(null===(r=null===(a=null==e?void 0:e.classification)||void 0===a?void 0:a.categories)||void 0===r?void 0:r.join("],["),"]")],["card_product_type",null==e?void 0:e.price_class]]))))})}},{key:"openCardPDP",value:function(e){var t,n,i;this.segmentService.trackCustom(Ae.apply(void 0,s((0,M.xo)(e)).concat([["tags","[".concat(null===(t=e.tags)||void 0===t?void 0:t.join("],["),"]")],["occasion","[".concat(null===(i=null===(n=null==e?void 0:e.classification)||void 0===n?void 0:n.categories)||void 0===i?void 0:i.join("],["),"]")],["card_product_type",e.price_class]]))),this.router.navigate(["/card",e.pdp_url||e.card_id])}}])}();return e.\u0275fac=function(t){return new(t||e)(O.\u0275\u0275directiveInject(Pe.v),O.\u0275\u0275directiveInject(be.u),O.\u0275\u0275directiveInject(ye.P),O.\u0275\u0275directiveInject(p.F0),O.\u0275\u0275directiveInject(M.BP),O.\u0275\u0275directiveInject(Ie.I))},e.\u0275cmp=O.\u0275\u0275defineComponent({type:e,selectors:[["similar-cards"]],inputs:{card:"card"},features:[O.\u0275\u0275NgOnChangesFeature],decls:1,vars:1,consts:[["class","similar-cards",4,"ngIf"],[1,"similar-cards"],[1,"similar-cards-title"],[3,"cards","showControls","showQuickActions","cardClicked","addToBasketClicked"]],template:function(e,t){1&e&&O.\u0275\u0275template(0,Ee,4,3,"div",0),2&e&&O.\u0275\u0275property("ngIf",t.cards&&"STANDARD"===(null==t.card||null==t.card.card?null:t.card.card.price_class))},directives:[E.O5,Ue.l],styles:[".similar-cards[_ngcontent-%COMP%]{margin-top:16px}@media (min-width: 769px){.similar-cards[_ngcontent-%COMP%]{margin-top:32px}}.similar-cards[_ngcontent-%COMP%] > .similar-cards-title[_ngcontent-%COMP%]{padding-left:24px;margin-bottom:12px;font-size:16px;font-weight:500}@media (min-width: 769px){.similar-cards[_ngcontent-%COMP%] > .similar-cards-title[_ngcontent-%COMP%]{font-size:18px;padding:0;margin:0}}"]}),e}(),Te=l(85031),Ve=l(16199),je=function(){var e=function(){return f(function e(t){u(this,e),this.router=t},[{key:"navigateToCardPacks",value:function(){this.router.navigate(["/card-packs"],{queryParams:{c:"birthday-card-packs"}})}}])}();return e.\u0275fac=function(t){return new(t||e)(O.\u0275\u0275directiveInject(p.F0))},e.\u0275cmp=O.\u0275\u0275defineComponent({type:e,selectors:[["pdp-cardpacks-promo"]],decls:7,vars:0,consts:[[1,"pdp-cp-promo-container"],[1,"copy","text"],[1,"copy","description"],[1,"thor-btn","cta","text",3,"click"]],template:function(e,t){1&e&&(O.\u0275\u0275elementStart(0,"div",0),O.\u0275\u0275elementStart(1,"div",1),O.\u0275\u0275text(2,"NEW! Card Packs"),O.\u0275\u0275elementEnd(),O.\u0275\u0275elementStart(3,"div",2),O.\u0275\u0275text(4,"8 cards, \xa31 each"),O.\u0275\u0275elementEnd(),O.\u0275\u0275elementStart(5,"button",3),O.\u0275\u0275listener("click",function(){return t.navigateToCardPacks()}),O.\u0275\u0275text(6,"Shop Now"),O.\u0275\u0275elementEnd(),O.\u0275\u0275elementEnd())},styles:['.pdp-cp-promo-container[_ngcontent-%COMP%]{width:100%;background-color:#000;margin-top:16px;padding:8px;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;justify-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;text-align:center;color:#f7efe5;line-height:100%;text-transform:none!important}@media (min-width: 769px){.pdp-cp-promo-container[_ngcontent-%COMP%]{margin-top:-25px;margin-bottom:43px}}.pdp-cp-promo-container[_ngcontent-%COMP%]   .copy[_ngcontent-%COMP%]{font:normal 22px "Roboto"}.pdp-cp-promo-container[_ngcontent-%COMP%]   .text[_ngcontent-%COMP%]{font-weight:500}.pdp-cp-promo-container[_ngcontent-%COMP%]   .description[_ngcontent-%COMP%]{font-weight:400}.pdp-cp-promo-container[_ngcontent-%COMP%]   .cta[_ngcontent-%COMP%]{margin-top:8px;background-color:#f7efe5;font:normal 600 18px "Roboto";text-transform:uppercase;color:#000;padding:4px 32px;border-radius:8px}']}
1),e}(),ze=function(){var e=function(){return f(function e(t){u(this,e),this.router=t},[{key:"navigateToCardPacks",value:function(){this.router.navigate(["/card-packs/".concat(this.cardPack.id)])}}])}();return e.\u0275fac=function(t){return new(t||e)(O.\u0275\u0275directiveInject(p.F0))},e.\u0275cmp=O.\u0275\u0275defineComponent({type:e,selectors:[["pdp-available-cardpack-banner"]],inputs:{cardPack:"cardPack"},decls:9,vars:1,consts:[[1,"available-cardpack-banner"],[1,"left"],[1,"info"],[1,"cta",3,"click"],[1,"right"],[1,"image"],["imgSrc","img/hosted/card-pack-icon.png","alt","Card Pack Image"]],template:function(e,t){1&e&&(O.\u0275\u0275elementStart(0,"div",0),O.\u0275\u0275elementStart(1,"div",1),O.\u0275\u0275elementStart(2,"div",2),O.\u0275\u0275text(3),O.\u0275\u0275elementEnd(),O.\u0275\u0275elementStart(4,"div",3),O.\u0275\u0275listener("click",function(){return t.navigateToCardPacks()}),O.\u0275\u0275text(5,"View Pack"),O.\u0275\u0275elementEnd(),O.\u0275\u0275elementEnd(),O.\u0275\u0275elementStart(6,"div",4),O.\u0275\u0275elementStart(7,"div",5),O.\u0275\u0275element(8,"img",6),O.\u0275\u0275elementEnd(),O.\u0275\u0275elementEnd(),O.\u0275\u0275elementEnd()),2&e&&(O.\u0275\u0275advance(3),O.\u0275\u0275textInterpolate1("Also available in a pack of ",t.cardPack.size," assorted cards "))},directives:[M.t1],styles:[".available-cardpack-banner[_ngcontent-%COMP%]{background-color:#ff6900;color:#fff;padding:8px 36px;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:start;-ms-flex-pack:start;justify-content:start;width:100%;margin-top:16px}@media (min-width: 769px){.available-cardpack-banner[_ngcontent-%COMP%]{margin-top:-24px}}.available-cardpack-banner[_ngcontent-%COMP%]   .left[_ngcontent-%COMP%]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;-ms-flex-pack:distribute;justify-content:space-around;font:normal 500 18px Roboto,Arial,Helvetica,sans-serif sans-serif;line-height:100%}.available-cardpack-banner[_ngcontent-%COMP%]   .left[_ngcontent-%COMP%]   .cta[_ngcontent-%COMP%]{font-size:14px;background-color:#000;width:100%;padding:10px;text-align:center;border-radius:4px}.available-cardpack-banner[_ngcontent-%COMP%]   .right[_ngcontent-%COMP%]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;margin-left:20px}.available-cardpack-banner[_ngcontent-%COMP%]   .right[_ngcontent-%COMP%]   img[_ngcontent-%COMP%]{width:auto;height:105px}"]}),e}();function Fe(e,t){if(1&e&&(O.\u0275\u0275elementStart(0,"div",1),O.\u0275\u0275elementStart(1,"div",2),O.\u0275\u0275element(2,"img",3),O.\u0275\u0275elementEnd(),O.\u0275\u0275elementStart(3,"div",4),O.\u0275\u0275elementStart(4,"div",5),O.\u0275\u0275text(5),O.\u0275\u0275elementEnd(),O.\u0275\u0275elementStart(6,"div",6),O.\u0275\u0275text(7),O.\u0275\u0275elementEnd(),O.\u0275\u0275elementEnd(),O.\u0275\u0275elementEnd()),2&e){var n=O.\u0275\u0275nextContext();O.\u0275\u0275advance(2),O.\u0275\u0275property("imgSrc",n.promoElement.icon||""),O.\u0275\u0275advance(3),O.\u0275\u0275textInterpolate(n.promoElement.title||""),O.\u0275\u0275advance(2),O.\u0275\u0275textInterpolate(n.promoElement.copy||"")}}var Le=function(){var e=function(){return f(function e(){u(this,e)},[{key:"ngOnInit",value:function(){}}])}();return e.\u0275fac=function(t){return new(t||e)},e.\u0275cmp=O.\u0275\u0275defineComponent({type:e,selectors:[["pdp-promo"]],inputs:{promoElement:"promoElement"},decls:1,vars:1,consts:[["class","PdpPromo",4,"ngIf"],[1,"PdpPromo"],[1,"PdpPromo__Icon"],[3,"imgSrc"],[1,"PdpPromo__Text"],[1,"PdpPromo__Title"],[1,"PdpPromo__Copy"]],template:function(e,t){1&e&&O.\u0275\u0275template(0,Fe,8,3,"div",0),2&e&&O.\u0275\u0275property("ngIf",t.promoElement)},directives:[E.O5,M.t1],styles:['.PdpPromo[_ngcontent-%COMP%]{width:100%;background-color:#f5f5f5;display:grid;grid-template-columns:15% 85%;-webkit-box-align:center;-ms-flex-align:center;align-items:center;padding:16px 0;margin-top:16px}@media (min-width: 769px){.PdpPromo[_ngcontent-%COMP%]{margin-top:-24px;grid-template-columns:20% 80%}}@media (min-width: 992px){.PdpPromo[_ngcontent-%COMP%]{grid-template-columns:15% 85%}}.PdpPromo__Icon[_ngcontent-%COMP%]{margin-left:auto;margin-right:auto}.PdpPromo__Text[_ngcontent-%COMP%]{font:normal 16px "Roboto";font-weight:400;padding:0 8px}.PdpPromo__Title[_ngcontent-%COMP%]{font-weight:700}']}),e}(),De=l(62090);function Ne(e,t){if(1&e){var n=O.\u0275\u0275getCurrentView();O.\u0275\u0275elementStart(0,"product-addon-popup",24),O.\u0275\u0275listener("addGiftAddon",function(e){return O.\u0275\u0275restoreView(n),O.\u0275\u0275nextContext(2).addGiftAddonToBasket(e)})("skipGiftAddon",function(){return O.\u0275\u0275restoreView(n),O.\u0275\u0275nextContext(2).skipUpsellAndAddToBasket()}),O.\u0275\u0275pipe(1,"async"),O.\u0275\u0275elementEnd()}if(2&e){var i=O.\u0275\u0275nextContext(2);O.\u0275\u0275property("location","PDP Upsell")("refFormat",O.\u0275\u0275pipeBind1(1,4,i.selectedVariation).format)("displayPopup",i.displayAddon)("refCost",i.addonReferenceCost)}}function Re(e,t){if(1&e&&(O.\u0275\u0275elementContainerStart(0),O.\u0275\u0275template(1,Ne,2,6,"product-addon-popup",23),O.\u0275\u0275elementContainerEnd()),2&e){var n=O.\u0275\u0275nextContext();O.\u0275\u0275advance(1),O.\u0275\u0275property("ngIf",n.giftHasAddon)}}function $e(e,t){if(1&e){var n=O.\u0275\u0275getCurrentView();O.\u0275\u0275elementStart(0,"thortful-subscription-upsell-popup",25),O.\u0275\u0275listener("addSubscription",function(){return O.\u0275\u0275restoreView(n),O.\u0275\u0275nextContext().addSubscriptionAndProductToBasket()})("skipSubscription",function(){return O.\u0275\u0275restoreView(n),O.\u0275\u0275nextContext().skipUpsellAndAddToBasket()}),O.\u0275\u0275elementEnd()}if(2&e){var i=O.\u0275\u0275nextContext();O.\u0275\u0275property("displayPopup",i.displaySubscriptionUpsell)}}function We(e,t){if(1&e&&(O.\u0275\u0275element(0,"thor-heart",26),O.\u0275\u0275pipe(1,"async")),2&e){var n=O.\u0275\u0275nextContext();O.\u0275\u0275property("card",O.\u0275\u0275pipeBind1(1,2,n.cardObject))("className","type-3")}}function qe(e,t){if(1&e){var n=O.\u0275\u0275getCurrentView();O.\u0275\u0275elementStart(0,"div",28),O.\u0275\u0275listener("click",function(){return O.\u0275\u0275restoreView(n),O.\u0275\u0275nextContext(2).saveForLater()}),O.\u0275\u0275text(1,"Save photo card draft for later"),O.\u0275\u0275elementEnd()}}function He(e,t){if(1&e&&(O.\u0275\u0275elementContainerStart(0),O.\u0275\u0275template(1,qe,2,0,"div",27),O.\u0275\u0275elementContainerEnd()),2&e){var n=O.\u0275\u0275nextContext();O.\u0275\u0275advance(1),O.\u0275\u0275property("ngIf",!n.isFullUserLoggedIn&&n.isPhotoCardJourney)}}function Qe(e,t){if(1&e&&(O.\u0275\u0275element(0,"creator-similar-cards",29),O.\u0275\u0275pipe(1,"async"),O.\u0275\u0275pipe(2,"async")),2&e){var n=O.\u0275\u0275nextContext();O.\u0275\u0275property("creatorProfile",O.\u0275\u0275pipeBind1(1,2,n.cardCreatorPublicProfile))("cardDetail
1s",O.\u0275\u0275pipeBind1(2,4,n.card))}}function Ye(e,t){if(1&e&&(O.\u0275\u0275element(0,"similar-cards",5),O.\u0275\u0275pipe(1,"async")),2&e){var n=O.\u0275\u0275nextContext();O.\u0275\u0275property("card",O.\u0275\u0275pipeBind1(1,1,n.card))}}function Je(e,t){1&e&&O.\u0275\u0275element(0,"thortful-subscriber-banner",30),2&e&&O.\u0275\u0275property("variant","pdp")}function Ke(e,t){if(1&e){var n=O.\u0275\u0275getCurrentView();O.\u0275\u0275elementStart(0,"primary-button",31),O.\u0275\u0275listener("click",function(){var e=O.\u0275\u0275restoreView(n).ngIf;return O.\u0275\u0275nextContext().addToBasketClicked(null==e.data?null:e.data.gift_relevance_criteria)}),O.\u0275\u0275pipe(1,"async"),O.\u0275\u0275text(2,"Add to basket"),O.\u0275\u0275elementEnd()}if(2&e){var i=O.\u0275\u0275nextContext();O.\u0275\u0275property("disabled",!O.\u0275\u0275pipeBind1(1,1,i.selectedVariationOptionInStock))}}function Xe(e,t){1&e&&O.\u0275\u0275element(0,"pdp-cardpacks-promo")}function Ze(e,t){if(1&e&&O.\u0275\u0275element(0,"pdp-available-cardpack-banner",32),2&e){var n=O.\u0275\u0275nextContext();O.\u0275\u0275property("cardPack",n.availableCardPack)}}function et(e,t){if(1&e&&O.\u0275\u0275element(0,"pdp-promo",33),2&e){var n=O.\u0275\u0275nextContext();O.\u0275\u0275property("promoElement",n.promoElement)}}function tt(e,t){1&e&&(O.\u0275\u0275elementStart(0,"div",34),O.\u0275\u0275elementStart(1,"thor-standard-title"),O.\u0275\u0275text(2,"Out of Stock"),O.\u0275\u0275elementEnd(),O.\u0275\u0275elementEnd())}function nt(e,t){1&e&&O.\u0275\u0275element(0,"div",35),2&e&&O.\u0275\u0275property("@fadeIn",void 0)}function it(e,t){if(1&e){var n=O.\u0275\u0275getCurrentView();O.\u0275\u0275elementStart(0,"div",36),O.\u0275\u0275listener("click",function(){return O.\u0275\u0275restoreView(n),O.\u0275\u0275nextContext().closeLightbox()}),O.\u0275\u0275element(1,"img",37),O.\u0275\u0275element(2,"img",38),O.\u0275\u0275pipe(3,"async"),O.\u0275\u0275elementEnd()}if(2&e){var i=O.\u0275\u0275nextContext();O.\u0275\u0275property("@fadeIn",void 0),O.\u0275\u0275advance(2),O.\u0275\u0275property("src",O.\u0275\u0275pipeBind1(3,2,i.cardFrontImage),O.\u0275\u0275sanitizeUrl)}}var at=function(e,t,n){return[e,t,n]},rt=function(){return["[B17.0] Show Creator Similar Cards on PDP","Variation 1"]},ot=function(e){return[e]},lt=function(){return[2.84,2.64,107,139,177]},ct=function(e){return{data:e}},st=function(){var n,a=function(n){function a(){var e;return u(this,a),(e=t(this,a,arguments)).promoElement={title:"Get 4 cards for \xa310",copy:"Got four occasions coming up? Plan ahead and save \xa3".concat((4*y.g.Price-10).toFixed(2)," when you buy 4 A5 cards"),icon:"img/action/cards_large_icon.png"},e.showSimilarCards=!1,e}return o(a,n),f(a,[{key:"onPopState",value:function(){this.BackToExploreService.backButtonClicked()}},{key:"ngOnInit",value:function(){var e=this,t=Object.create(null,{ngOnInit:{get:function(){return function(e,t,n,a){var o=i(r(1&a?e.prototype:e),t,n);return 2&a&&"function"==typeof o?function(e){return o.apply(n,e)}:o}(a,"ngOnInit",e,1)}}});return(0,g.mG)(this,void 0,void 0,c().mark(function e(){return c().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return this.showSimilarCards=(0,k.a$)("[B20.0] Show Similar Cards on PDP","Variation 1")||(0,k.a$)("[B20.0] Show Similar Cards on PDP","Variation 2"),this.checkForPromoElementContent(),e.next=4,t.ngOnInit.call(this);case 4:this.checkForAvailableCardPack();case 5:case"end":return e.stop()}},e,this)}))}},{key:"checkForPromoElementContent",value:function(){var t=this;(0,m.aj)([this.Store.select("featureFlag","config","TSN-982").pipe((0,h.P)(function(e){return"boolean"==typeof e})),this.Store.select("featureFlag","config","WEB-2830").pipe((0,h.P)(function(e){return"boolean"==typeof e}))]).subscribe(function(n){var i=e(n,2),a=i[0];i[1]?t.promoElement={title:"Get 4 cards for \xa310.99",copy:"Got four occasions coming up? Plan ahead and save \xa3".concat((4*y.g.Price-10.99).toFixed(2)," when you buy 4 A5 cards"),icon:"img/action/cards_large_icon.png"}:a&&(t.promoElement={title:"Get 4 cards for \xa312",copy:"Got four occasions coming up? Plan ahead and save \xa3".concat((4*y.g.Price-12).toFixed(2)," when you buy 4 A5 cards"),icon:"img/action/cards_large_icon.png"})})}},{key:"addToBasketClicked",value:function(t){var n=this;(0,m.aj)([this.Store.select("featureFlag","config","TSN-760").pipe((0,h.P)(function(e){return"boolean"==typeof e})),this.Store.select("featureFlag","config","WAL-1461").pipe((0,h.P)(function(e){return"boolean"==typeof e})),this.selectedVariation.pipe((0,v.q)(1)),this.$pdpUpsell,this.card]).subscribe(function(i){var a=e(i,5),r=a[0],o=a[1],l=a[2],s=a[3],d=a[4];return(0,g.mG)(n,void 0,void 0,c().mark(function e(){var n,i,a,p,u;return c().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(!r){e.next=8;break}
1return e.next=3,this.giftAddonService.giftHasAddon(l.format,w.u.PDP);case 3:if(this.giftHasAddon=e.sent,!this.giftHasAddon||this.displayAddon){e.next=7;break}return p=null===(a=null===(i=null===(n=s.gifts)||void 0===n?void 0:n.find(function(e){var t;return(null===(t=e.legacy)||void 0===t?void 0:t.format)===l.format}))||void 0===i?void 0:i.cost)||void 0===a?void 0:a.value,u=d.card.price_class,e.abrupt("return",(this.addonReferenceCost=p-("STANDARD"===u?y.g.Price:"TEMPLATE"===u?y.g.PhotoCardPrice:y.g.FaceSwapPrice),void(this.displayAddon=!0)));case 7:this.displayAddon&&(this.displayAddon=!1);case 8:if(!o){e.next=12;break}if(this.subscriptionUpsellAvailable=this.basketService.isSubscriptionUpsellAvailable(),!this.subscriptionUpsellAvailable||this.displaySubscriptionUpsell){e.next=11;break}return e.abrupt("return",(this.displaySubscriptionUpsell=!0,void this.thortfulSubscription.subscriptionUpsellModalViewedEvent()));case 11:this.displaySubscriptionUpsell&&(this.displaySubscriptionUpsell=!1,this.thortfulSubscription.subscriptionUpsellModalDismissedEvent());case 12:this.addToBasket(t);case 13:case"end":return e.stop()}},e,this)}))})}},{key:"addToBasket",value:function(t){return(0,g.mG)(this,void 0,void 0,c().mark(function n(){var i,a,r,o=this;return c().wrap(function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,this.selectedVariationOptionInStock.pipe((0,v.q)(1)).toPromise();case 2:if(n.sent){n.next=4;break}return n.abrupt("return");case 4:return i=this.card.map(function(e){return e.card}).pipe((0,v.q)(1)),a=this.selectedVariation.pipe((0,v.q)(1)),r=this.selectedVariationOption.pipe((0,v.q)(1)),n.next=7,(0,m.aj)(i,a,r).pipe((0,v.q)(1)).pipe((0,C.w)(function(n){var i=e(n,3),a=i[0],r=i[1],l=i[2];return(0,g.mG)(o,void 0,void 0,c().mark(function e(){var n,i,o,s,d=this;return c().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,this.basketService.addToBasket(Object.assign(Object.assign({},a),{format:r.format,list_index:null===(i=null===(n=null==window?void 0:window.history)||void 0===n?void 0:n.state)||void 0===i?void 0:i.card_list_index,gift_relevance_criteria:t}),"CART_ADD_SV",r.format,l?[l]:[]).then(function(e){return d.itemBasket=e.basket_items[e.basket_items.length-1]});case 3:this.shareDataService.trigger("basketUpdate"),this.notificationService.success("Successfully added to basket!"),o=JSON.parse(localStorage.getItem("hide-gift-upsell"))||!1,this.isFaceSwapJourney&&this.faceSwapIsActive&&(s=this.route.snapshot.queryParamMap.get("swap_id"),this.faceSwapService.updateDraftStatus(s).pipe((0,v.q)(1)).subscribe()),"A5"!==this.itemBasket.cards[0].format||o?this.router.navigate(["/basket"]):this.router.navigate(["gift/"+this.itemBasket.id],{relativeTo:this.route}),e.next=13;break;case 10:e.prev=10,e.t0=e.catch(0),this.notificationService.error("Something went wrong!");case 13:case"end":return e.stop()}},e,this,[[0,10]])}))})).map(function(){return o.Analytics.customEvent("Customiser","Add to cart","v-3")}).toPromise();case 7:case"end":return n.stop()}},n,this)}))}},{key:"isFullUserLoggedIn",get:function(){return this.Authentication.isFullUserLoggedIn()}},{key:"saveForLater",value:function(){var e=this;this.card.pipe((0,v.q)(1)).subscribe(function(t){var n,i,a,r,o,l,c,s=t.card;return e.SegmentService.trackCustom({name:"Photocard Draft Saved",data:{creator_id:s.creator_id,creator_name:null===(i=null===(n=s.owner)||void 0===n?void 0:n.public_profile)||void 0===i?void 0:i.nickname,product_exclusive_status:s.exclusive,product_format:e.format,product_id:s.id,product_image:s.image.large,product_price:(null===(o=null===(r=null===(a=s.costs)||void 0===a?void 0:a.find(function(t){return t.format===e.format}))||void 0===r?void 0:r.cost)||void 0===o?void 0:o.amount)||0,product_rude_status:(null===(c=null===(l=s.classification)||void 0===l?void 0:l.tags)||void 0===c?void 0:c.indexOf("rude"))>-1||!1,product_url:window.location.href}})}),this.shareDataService.trigger("openAuth",{loginTitle:"Log in to save your photo card for later",signUpTitle:"Create an account to save your photo card"})}},{key:"addGiftAddonToBasket",value:function(t){var n=this;(0,m.aj)([this.$pdpUpsell.pipe((0,v.q)(1)),this.card.pipe((0,_.U)(function(e){return e.card}
1),(0,v.q)(1))]).subscribe(function(i){var a=e(i,2),r=a[0],o=a[1];return(0,g.mG)(n,void 0,void 0,c().mark(function e(){var n,i,a,l=this;return c().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return a=r.gift_relevance_criteria,e.prev=1,e.next=4,this.basketService.addToBasket(Object.assign(Object.assign({},o),{format:t.format,list_index:null===(i=null===(n=null==window?void 0:window.history)||void 0===n?void 0:n.state)||void 0===i?void 0:i.card_list_index,gift_relevance_criteria:a}),"CART_ADD_SV",t.format,t?[t]:[]).then(function(e){return l.itemBasket=e.basket_items[e.basket_items.length-1]});case 4:this.shareDataService.trigger("basketUpdate"),this.notificationService.success("Successfully added to basket!"),"A5"===this.itemBasket.cards[0].format?this.router.navigate(["gift/"+this.itemBasket.id],{relativeTo:this.route}):this.router.navigate(["/basket"]),e.next=12;break;case 9:e.prev=9,e.t0=e.catch(1),this.notificationService.error("Something went wrong!");case 12:case"end":return e.stop()}},e,this,[[1,9]])}))})}},{key:"skipUpsellAndAddToBasket",value:function(){return(0,g.mG)(this,void 0,void 0,c().mark(function e(){var t;return c().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.$pdpUpsell.pipe((0,v.q)(1)).toPromise();case 2:t=e.sent.gift_relevance_criteria,this.addToBasket(t);case 4:case"end":return e.stop()}},e,this)}))}},{key:"checkForAvailableCardPack",value:function(){return(0,g.mG)(this,void 0,void 0,c().mark(function e(){var t,n=this;return c().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:t=(0,k.a$)("[W54.0] Card Available on Card Pack Banner","Variation 1"),this.route.data.pipe((0,x.j)("card","id")).pipe((0,h.P)()).subscribe(function(e){e&&t?n.cardPackService.getCardPacksByCardId(e).then(function(e){var t=e[0]||null;(null==t?void 0:t.format)?n.cardPackService.getItemOptionByFormat(t.format).then(function(e){n.availableCardPack={size:t.size||8,id:e.id}}):n.availableCardPack=null}).catch(function(){n.availableCardPack=null}):n.availableCardPack=null});case 2:case"end":return e.stop()}},e,this)}))}},{key:"addSubscriptionAndProductToBasket",value:function(){return(0,g.mG)(this,void 0,void 0,c().mark(function e(){var t,n=this;return c().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.$pdpUpsell.pipe((0,v.q)(1)).toPromise();case 2:t=e.sent.gift_relevance_criteria,this.addToBasket(t).then(function(){n.basketService.addSubscriptionToBasket()});case 4:case"end":return e.stop()}},e,this)}))}}])}(b.p);return a.\u0275fac=function(e){return(n||(n=O.\u0275\u0275getInheritedFactory(a)))(e||a)},a.\u0275cmp=O.\u0275\u0275defineComponent({type:a,selectors:[["gift-upsell"]],hostBindings:function(e,t){1&e&&O.\u0275\u0275listener("popstate",function(){return t.onPopState()},!1,O.\u0275\u0275resolveWindow)},features:[O.\u0275\u0275ProvidersFeature([P.g]),O.\u0275\u0275InheritDefinitionFeature],decls:59,vars:97,consts:[[4,"featureFlag"],[3,"displayPopup","addSubscription","skipSubscription",4,"featureFlag"],[3,"segments"],[3,"inStock","slides","orientation","outerImage","innerImage","displayThumnails","displayInfoButton","alt","openLightbox"],[3,"card","className",4,"ngIf"],[3,"card"],[3,"cardDescription"],[3,"profile"],[3,"creatorProfile","cardDetails",4,"experimentVariantActive"],[3,"card",4,"ngIf"],["type","type2",3,"hideCardId","itemsNumber","spacing","noPadding","alternativeSearch"],[3,"pdpUpsell","selectedSizeId","priceClass","selectSizeElementClicked"],[3,"variant",4,"featureFlag"],["data-test-id","addMessage",3,"disabled","click"],["data-test-id","addToBasket",3,"disabled","click",4,"ngIf"],[4,"ngIf"],[3,"cardPack",4,"ngIf"],[3,"promoElement",4,"ngIf"],["class","NewCardPage__OutOfStock",4,"ngIf"],["pageType","PAGE_ACCORDION",3,"contentId"],["class","NewCardPage__PopupShadow",4,"ngIf"],[1,"NewCardPage__Popup"],["class","Lightbox",3,"click",4,"ngIf"],[3,"location","refFormat","displayPopup","refCost","addGiftAddon","skipGiftAddon",4,"ngIf"],[3,"location","refFormat","displayPopup","refCost","addGiftAddon","skipGiftAddon"],[3,"displayPopup","addSubscription","skipSubscription"],[3,"card","className"],["class","save-for-later",3,"click",4,"ngIf"],[1,"save-for-later",3,"click"],[3,"creatorProfile","cardDetail
1s"],[3,"variant"],["data-test-id","addToBasket",3,"disabled","click"],[3,"cardPack"],[3,"promoElement"],[1,"NewCardPage__OutOfStock"],[1,"NewCardPage__PopupShadow"],[1,"Lightbox",3,"click"],["imgSrc","img/action/cancel.svg",1,"Lightbox__Close"],[1,"Lightbox__Image",3,"src"]],template:function(e,t){var n,i;(1&e&&(O.\u0275\u0275template(0,Re,2,1,"ng-container",0),O.\u0275\u0275template(1,$e,1,1,"thortful-subscription-upsell-popup",1),O.\u0275\u0275elementStart(2,"product-page-layout"),O.\u0275\u0275element(3,"thor-breadcrumbs",2),O.\u0275\u0275pipe(4,"async"),O.\u0275\u0275elementStart(5,"product-gallery",3),O.\u0275\u0275listener("openLightbox",function(){return t.openLightbox()}),O.\u0275\u0275pipe(6,"async"),O.\u0275\u0275pipe(7,"async"),O.\u0275\u0275pipe(8,"async"),O.\u0275\u0275pipe(9,"async"),O.\u0275\u0275pipe(10,"async"),O.\u0275\u0275pipe(11,"async"),O.\u0275\u0275pipe(12,"async"),O.\u0275\u0275pipe(13,"async"),O.\u0275\u0275pipe(14,"async"),O.\u0275\u0275template(15,We,2,4,"thor-heart",4),O.\u0275\u0275pipe(16,"async"),O.\u0275\u0275element(17,"share"),O.\u0275\u0275elementEnd(),O.\u0275\u0275element(18,"view-admin",5),O.\u0275\u0275element(19,"product-name-description",6),O.\u0275\u0275pipe(20,"async"),O.\u0275\u0275template(21,He,2,1,"ng-container",0),O.\u0275\u0275element(22,"creator-profile-overview",7),O.\u0275\u0275pipe(23,"async"),O.\u0275\u0275template(24,Qe,3,6,"creator-similar-cards",8),O.\u0275\u0275template(25,Ye,2,3,"similar-cards",9),O.\u0275\u0275element(26,"recent-cards",10),O.\u0275\u0275pipe(27,"async"),O.\u0275\u0275pipe(28,"async"),O.\u0275\u0275elementStart(29,"pdp-upsell-select-size",11),O.\u0275\u0275listener("selectSizeElementClicked",function(e){return t.switchCardSize(e)}),O.\u0275\u0275pipe(30,"async"),O.\u0275\u0275pipe(31,"async"),O.\u0275\u0275elementEnd(),O.\u0275\u0275template(32,Je,1,1,"thortful-subscriber-banner",12),O.\u0275\u0275elementStart(33,"sticky-product-price"),O.\u0275\u0275text(34),O.\u0275\u0275pipe(35,"async"),O.\u0275\u0275elementEnd(),O.\u0275\u0275elementStart(36,"sticky-product-name"),O.\u0275\u0275text(37),O.\u0275\u0275pipe(38,"async"),O.\u0275\u0275elementEnd(),O.\u0275\u0275elementStart(39,"product-page-layout-add-message-button"),O.\u0275\u0275elementStart(40,"secondary-button",13),O.\u0275\u0275listener("click",function(){return t.addMessage()}),O.\u0275\u0275pipe(41,"async"),O.\u0275\u0275text(42,"Add a message"),O.\u0275\u0275elementEnd(),O.\u0275\u0275elementEnd(),O.\u0275\u0275elementStart(43,"product-page-layout-add-to-basket-button"),O.\u0275\u0275template(44,Ke,3,3,"primary-button",14),O.\u0275\u0275pipe(45,"async"),O.\u0275\u0275elementEnd(),O.\u0275\u0275template(46,Xe,1,0,"pdp-cardpacks-promo",15),O.\u0275\u0275template(47,Ze,1,1,"pdp-available-cardpack-banner",16),O.\u0275\u0275template(48,et,1,1,"pdp-promo",17),O.\u0275\u0275pipe(49,"async"),O.\u0275\u0275elementStart(50,"product-page-description"),O.\u0275\u0275template(51,tt,3,0,"div",18),O.\u0275\u0275pipe(52,"async"),O.\u0275\u0275element(53,"cms-content",19),O.\u0275\u0275pipe(54,"async"),O.\u0275\u0275elementEnd(),O.\u0275\u0275elementEnd(),O.\u0275\u0275template(55,nt,1,1,"div",20),O.\u0275\u0275elementStart(56,"div",21),O.\u0275\u0275element(57,"router-outlet"),O.\u0275\u0275elementEnd(),O.\u0275\u0275template(58,it,4,4,"div",22)),2&e)&&(O.\u0275\u0275property("featureFlag","TSN-760"),O.\u0275\u0275advance(1),O.\u0275\u0275property("featureFlag","WAL-1461"),O.\u0275\u0275advance(2),O.\u0275\u0275property("segments",O.\u0275\u0275pipeBind1(4,39,t.breadcrumbSegments)),O.\u0275\u0275advance(2),O.\u0275\u0275property("inStock",O.\u0275\u0275pipeBind1(6,41,t.selectedVariationOptionInStock))("slides",O.\u0275\u0275pipeBind1(7,43,t.selectedVariationOptionGalleryItems))("orientation",O.\u0275\u0275pipeBind1(8,45,t.cardOrientation))("outerImage",O.\u0275\u0275pipeBind1(9,47,t.cardFrontImage))("innerImage",O.\u0275\u0275pipeBind1(10,49,t.selectedVariationInnerInside))("displayThumnails",t.isDesktop)("displayInfoButton",O.\u0275\u0275pipeBind1(11,51,t.giftSelected))("alt",O.\u0275\u0275pureFunction3(87,at,O.\u0275\u0275pipeBind1(12,53,t.cardPrimaryCategory),null==(n=O.\u0275\u0275pipeBind1(13,55,t.cardCreatorPublicProfile))?null:n.nickname,O.\u0275\u0275pipeBind1(14,57,t.cardTitle))),O.\u0275\u0275advance(10),O.\u0275\u0275property("ngIf",O.\u0275\u0275pipeBind1(16,59,t.A5FormatSelected)),O.\u0275\u0275advance(3),O.\u0275\u0275property("card",t.route.snapshot.data.card.card),O.\u0275\u0275advance(1),O.\u0275\u0275property("cardDescription",O.\u0275\u0275pipeBind1(20,61,t.cardDescription)),O.\u0275\u0275advance(2),O.\u0275\u0275property("featureFlag","WEB-2033"),O.\u0275\u0275advance(1),O.\u0275\u0275property("profile",O.\u0275\u0275pipeBind1(23,63,t.cardCreatorPublicProfile)),O.\u0275\u0275advance(2),O.\u0275\u0275property("experimentVariantActive",O.\u0275\u0275pureFunction0(91,rt)),O.\u0275\u0275advance(1),O.\u0275\u0275property("ngIf",t.showSimilarCards),O.\u0275\u0275advance(1),O.\u0275\u0275property("hideCardId",O.\u0275\u0275pureFunction1(92,ot,O.\u0275\u0275pipeBind1(27,65,t.cardId)))("itemsNumber",O.\u0275\u0275pureFunction0(94,lt))("spacing",15)("noPadding",!0)("alternativeSearch",O.\u0275\u0275pipeBind1(28,67,t.cardPrimaryCategory)),O.\u0275\u0275advance(3),O.\u0275\u0275property("pdpUpsell",O.\u0275\u0275pipeBind1(30,69,t.$pdpUpsell))("selectedSizeId",t.selectedSizeId)("priceClass",null==(i=O.\u0275\u0275pipeBind1(31,71,t.card))||null==i.card?null:i.card.price_class),O.\u0275\u0275advance(3),O.\u0275\u0275property("featureFlag","WAL-1461"),O.\u0275\u0275advance(2),O.\u0275\u0275textInterpolate1("\xa3",O.\u0275\u0275pipeBind1(35,73,t.selectedVariationPrice),""),O.\u0275\u0275advance(3),O.\u0275\u0275textInterpolate(O.\u0275\u0275pipeBind1(38,75,t.selectedVariationProductName)),O.\u0275\u0275advance(3),O.\u0275\u0275property("disabled",!O.\u0275\u0275pipeBind1(41,77,t.selectedVariationOptionInStock)),O.\u0275\u0275advance(4),O.\u0275\u0275property("ngIf",O.\u0275\u0275pureFunction1(95,ct,O.\u0275\u0275pipeBind1(45,79,t.$pdpUpsell))),O.\u0275\u0275advance(2),O.\u0275\u0275property("ngIf",!t.availableCardPack),O.\u0275\u0275advance(1),O.\u0275\u0275property("ngIf",t.availableCardPack),O.\u0275\u0275advance(1),O.\u0275\u0275property("ngIf",O.\u0275\u0275pipeBind1(49,81,t.A5FormatSelected)&&!t.availableCardPack),O.\u0275\u0275advance(3),O.\u0275\u0275property("ngIf",!O.\u0275\u0275pipeBind1(52,83,t.selectedVariationOptionInStock)),O.\u0275\u0275advance(2),O.\u0275\u0275property("contentId",O.\u0275\u0275pipeBind1(54,85,t.contentDescriptionId)),O.\u0275\u0275advance(2),O.\u0275\u0275property("ngIf",t.popoverStateOpen),O.\u0275\u0275advance(1),O.\u0275\u0275property("@slideOver",t.popoverState),O.\u0275\u0275advance(2),O.\u0275\u0275property("ngIf",t.showLightbox))},directives:[M.Hl,S.lE,I.n,U.g,E.O5,A.N,B.k,G.l,T.j,V.M,j.h,ge,S.pp,S.H8,S.VU,fe.k,S.CM,S.IH,me.p,p.lC,he.d,ve.u,Ce.J,Se,Ge,Te.E,Ve.K,je,ze,Le,De.K,M.t1],pipes:[E.Ov],styles:[".NewCardPage__SelectOptionButton[_ngcontent-%COMP%]{display:block;margin-top:24px;margin-bottom:24px}@media (min-width: 780px){.NewCardPage__Gallery[_ngcontent-%COMP%]{width:50%}}.NewCardPage__Overlay[_ngcontent-%COMP%]{visibility:hidden}.NewCardPage__Overlay.--open[_ngcontent-%COMP%]{position:fixed;height:100vh;width:100vw;top:0;left:0;bottom:0;right:0;z-index:16;visibility:visible;-webkit-transition:.3s;transition:.3s;background-color:#000c}.NewCardPage[_ngcontent-%COMP%]   .GalleryItem[_ngcontent-%COMP%]{position:relative;width:100%;padding-top:100%}.NewCardPage[_ngcontent-%COMP%]   .GalleryItem__Image[_ngcontent-%COMP%]{position:absolute;top:0;width:100%;height:100%;-o-object-fit:contain;object-fit:contain}
1.NewCardPage__VariationName[_ngcontent-%COMP%]{font-size:18px;font-weight:700}@media (min-width: 780px){.NewCardPage__VariationName[_ngcontent-%COMP%]{font-size:26px;line-height:1}}.NewCardPage__OptionName[_ngcontent-%COMP%]{font-size:14px;margin-bottom:4px}@media (min-width: 780px){.NewCardPage__OptionName[_ngcontent-%COMP%]{margin-bottom:12px;font-size:18px}}@media (min-width: 780px){.NewCardPage__Price[_ngcontent-%COMP%]{line-height:1}}.NewCardPage__PopupShadow[_ngcontent-%COMP%]{position:fixed;top:0;left:0;width:100%;height:100%;background:rgba(0,0,0,.8);z-index:800}.NewCardPage__Popup[_ngcontent-%COMP%]{position:fixed;bottom:0;left:0;width:100%;z-index:1000}.NewCardPage__OutOfStock[_ngcontent-%COMP%]{margin-bottom:30px;padding:15px;background:#f3f3f3}@media (min-width: 767px){.NewCardPage__OutOfStock[_ngcontent-%COMP%]{margin-bottom:43px}}.NewCardPage__OutOfStock[_ngcontent-%COMP%]     h1{margin-bottom:0}.Lightbox[_ngcontent-%COMP%]{position:fixed;top:0;left:0;width:100%;height:100%;background:#000;z-index:20}.Lightbox__Image[_ngcontent-%COMP%]{position:absolute;top:50%;left:50%;max-width:75%;max-height:75%;-webkit-transform:translate(-50%,-50%);transform:translate(-50%,-50%)}@media (max-width: 414px){.Lightbox__Image[_ngcontent-%COMP%]{max-width:100%}}.Lightbox__Close[_ngcontent-%COMP%]{position:absolute;display:block;top:0;right:0;width:20px;height:20px;padding:25px;-webkit-box-sizing:content-box;box-sizing:content-box;margin-left:auto;z-index:5;cursor:pointer}.save-for-later[_ngcontent-%COMP%]{color:#ff6900;font-size:16px;font-weight:700;-webkit-text-decoration-line:underline;text-decoration-line:underline;margin-top:16px;width:-webkit-fit-content;width:-moz-fit-content;width:fit-content;cursor:pointer}"]}),a}(),dt=l(87918),pt=l(70966),ut=l(10976),gt=l(65426),ft=l(13486),mt=l(16710),ht=l(58267),vt=function(e){return[(0,gt.b)(function(t){var n;(null===(n=null==t?void 0:t.gift_groups)||void 0===n?void 0:n.some(function(e){return e.gifts.length}))||e.navigate(["/basket"])}),(0,mt.d)(),(0,ht.K)(function(t){return 404===t.status?e.navigate(["/page-not-found"]):(e.navigate(["/basket"]),(0,ft.of)(null))})]},Ct=l(95178),_t=l(22393),xt=l(49841),Pt=l(55502),bt=l(80802),yt=l(38592),kt=l(36951),wt=function(){var e=function(){return f(function e(t,n){u(this,e),this.elementRef=t,this.renderer=n},[{key:"updateView",value:function(e){e&&this.renderer.addClass(this.elementRef.nativeElement,e)}},{key:"experimentVariantActiveClass",set:function(e){var t=(0,k.ji)(e[0],e[1],e[2]);this.updateView(t)}}])}();return e.\u0275fac=function(t){return new(t||e)(O.\u0275\u0275directiveInject(O.ElementRef),O.\u0275\u0275directiveInject(O.Renderer2))},e.\u0275dir=O.\u0275\u0275defineDirective({type:e,selectors:[["","experimentVariantActiveClass",""]],inputs:{experimentVariantActiveClass:"experimentVariantActiveClass"}}),e}(),Ot=l(23176),Mt=l(730),St=["horizontalScroll"];function It(e,t){1&e&&O.\u0275\u0275elementContainer(0)}function Ut(e,t){if(1&e&&(O.\u0275\u0275elementStart(0,"div",5),O.\u0275\u0275template(1,It,1,0,"ng-container",6),O.\u0275\u0275elementEnd()),2&e){var n=t.$implicit;O.\u0275\u0275advance(1),O.\u0275\u0275property("ngTemplateOutlet",n.template)}}var Et=function(e){return{"hide-arrow":e}};function At(e,t){if(1&e){var n=O.\u0275\u0275getCurrentView();O.\u0275\u0275elementStart(0,"div",7),O.\u0275\u0275elementStart(1,"div",8),O.\u0275\u0275listener("click",function(){return O.\u0275\u0275restoreView(n),O.\u0275\u0275nextContext().scrollLeft()}),O.\u0275\u0275element(2,"i",9),O.\u0275\u0275elementEnd(),O.\u0275\u0275elementStart(3,"div",10),O.\u0275\u0275listener("click",function(){return O.\u0275\u0275restoreView(n),O.\u0275\u0275nextContext().scrollRight()}),O.\u0275\u0275element(4,"i",11),O.\u0275\u0275elementEnd(),O.\u0275\u0275elementEnd()}if(2&e){var i=O.\u0275\u0275nextContext();O.\u0275\u0275advance(1),O.\u0275\u0275property("ngClass",O.\u0275\u0275pureFunction1(2,Et,i.hideLeftArrow)),O.\u0275\u0275advance(2),O.\u0275\u0275property("ngClass",O.\u0275\u0275pureFunction1(4,Et,i.hideRightArrow))}}var Bt=function(){var e=function(){return f(function e(t){u(this,e),this.cdr=t,this.items=[],this.tileWidth=0,this.tilesStartPosition=[],this.hideLeftArrow=!1,this.hideRightArrow=!1},[{key:"ngAfterContentInit",value:function(){var e=this;this.items=this.viewItem.toArray(),this.viewItem.changes.subscribe(function(t){e.items=t})}},{key:"ngAfterViewInit",value:function(){var e,t=this;this.tileWidth=null===(e=this.firstElement)||void 0===e?void 0:e.offsetWidth,this.tilesStartPosition=this.items.map(function(e,n){return n*t.tileWidth}
1),this.showOrHideArrows(),this.horizontalScroll.nativeElement&&this.addScrollListener()}},{key:"addScrollListener",value:function(){var e=this;this.scrollSubscription=(0,Mt.R)(this.scrollableContainer,"scroll").subscribe(function(){e.showOrHideArrows()})}},{key:"ngOnDestroy",value:function(){this.scrollSubscription&&this.scrollSubscription.unsubscribe()}},{key:"scrollableContainer",get:function(){var e;return null===(e=this.horizontalScroll)||void 0===e?void 0:e.nativeElement}},{key:"firstElement",get:function(){var e;return null===(e=this.scrollableContainer)||void 0===e?void 0:e.firstElementChild}},{key:"scrollableContainerWidth",get:function(){var e,t;return null===(t=null===(e=this.horizontalScroll)||void 0===e?void 0:e.nativeElement)||void 0===t?void 0:t.offsetWidth}},{key:"scrollLeft",value:function(){var e=this,t=s(this.tilesStartPosition).reverse();this.scrollableContainer.scrollTo({left:t.find(function(t){return t<e.scrollableContainer.scrollLeft}),behavior:"smooth"})}},{key:"scrollRight",value:function(){this.scrollableContainer.scrollTo({left:this.scrollableContainer.scrollLeft+this.tileWidth-(this.scrollableContainer.scrollLeft+this.scrollableContainerWidth%this.tileWidth)%this.tileWidth,behavior:"smooth"})}},{key:"showOrHideArrows",value:function(){this.hideLeftArrow=0===this.scrollableContainer.scrollLeft,this.hideRightArrow=this.scrollableContainer.scrollLeft+this.scrollableContainerWidth===this.tileWidth*this.items.length,this.cdr.detectChanges()}}])}();return e.\u0275fac=function(t){return new(t||e)(O.\u0275\u0275directiveInject(O.ChangeDetectorRef))},e.\u0275cmp=O.\u0275\u0275defineComponent({type:e,selectors:[["app-horizontal-scroll-v2"]],contentQueries:function(e,t,n){var i;(1&e&&O.\u0275\u0275contentQuery(n,Ot.f,4),2&e)&&(O.\u0275\u0275queryRefresh(i=O.\u0275\u0275loadQuery())&&(t.viewItem=i))},viewQuery:function(e,t){var n;(1&e&&O.\u0275\u0275viewQuery(St,5),2&e)&&(O.\u0275\u0275queryRefresh(n=O.\u0275\u0275loadQuery())&&(t.horizontalScroll=n.first))},inputs:{showArrows:"showArrows"},decls:5,vars:2,consts:[[1,"virtual-scroll-wrapper"],[1,"scrollable-container"],["horizontalScroll",""],["class","scrollable-item",4,"ngFor","ngForOf"],["class","virtual-scroll-arrows-container",4,"ngIf"],[1,"scrollable-item"],[4,"ngTemplateOutlet"],[1,"virtual-scroll-arrows-container"],[1,"virtual-scroll-arrow","next",3,"ngClass","click"],[1,"mdi","mdi-chevron-left"],[1,"virtual-scroll-arrow","prev",3,"ngClass","click"],[1,"mdi","mdi-chevron-right"]],template:function(e,t){1&e&&(O.\u0275\u0275elementStart(0,"div",0),O.\u0275\u0275elementStart(1,"div",1,2),O.\u0275\u0275template(3,Ut,2,1,"div",3),O.\u0275\u0275elementEnd(),O.\u0275\u0275template(4,At,5,6,"div",4),O.\u0275\u0275elementEnd()),2&e&&(O.\u0275\u0275advance(3),O.\u0275\u0275property("ngForOf",t.items),O.\u0275\u0275advance(1),O.\u0275\u0275property("ngIf",t.showArrows))},directives:[E.sg,E.O5,E.tP,E.mk],styles:[".virtual-scroll-wrapper{position:relative}.virtual-scroll-wrapper .scrollable-container{width:-webkit-fit-content;width:-moz-fit-content;width:fit-content;max-width:100%;overflow-x:auto;scrollbar-width:none;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row;flex-direction:row}.virtual-scroll-wrapper .scrollable-container::-webkit-scrollbar{display:none}.virtual-scroll-wrapper .virtual-scroll-arrow{position:absolute;top:50%;-webkit-transform:translateY(-100%);transform:translateY(-100%);z-index:1;display:none;height:40px;width:40px;padding:3px}@media (min-width: 992px){.virtual-scroll-wrapper .virtual-scroll-arrow{display:block;background-color:#ff6900b3;border-radius:50%;-webkit-transition:all .3s;transition:all .3s}}.virtual-scroll-wrapper .virtual-scroll-arrow:hover{background-color:#ff6900;-webkit-transition:all .3s;transition:all .3s}.virtual-scroll-wrapper .virtual-scroll-arrow.hidden-arrow{-webkit-transition:all .3s;transition:all .3s;display:none;cursor:cell}.virtual-scroll-wrapper .virtual-scroll-arrow.next{left:10px;padding-left:4px}.virtual-scroll-wrapper .virtual-scroll-arrow.prev{right:10px;padding-left:6px}.virtual-scroll-wrapper .virtual-scroll-arrow i{height:40px;width:40px;font-size:31px;fill:#000;cursor:pointer;color:#fff}.hide-arrow{display:none!important}\n"],encapsulation:2,changeDetection:0}),e}(),Gt=l(50774),Tt=l(5464);function Vt(e,t){if(1&e){var n=O.\u0275\u0275getCurrentView();O.\u0275\u0275elementStart(0,"product-addon-popup",11),O.\u0275\u0275listener("addGiftAddon",function(e){return O.\u0275\u0275restoreView(n),O.\u0275\u0275nextContext(2).addGiftAddonToBasket(e)})("skipGiftAddon",function(){O.\u0275\u0275restoreView(n);var e=O.\u0275\u0275nextContext(2);return e.addToBasket(e.gift)}),O.\u0275\u0275elementEnd()}if(2&e){var i=O.\u0275\u0275nextContext(2);O.\u0275\u0275property("refFormat",null==i.gift||null==i.gift.legacy?null:i.gift.legacy.format)("location","Pre-Basket Upsell")("displayPopup",i.displayAddon)("refCost",null==i.gift||null==i.gift.cost?null:i.gift.cost.value)}}function jt(e,t){if(1&e&&(O.\u0275\u0275elementContainerStart(0),O.\u0275\u0275template(1,Vt,1,4,"product-addon-popup",10),O.\u0275\u0275elementContainerEnd()),2&e){var n=O.\u0275\u0275nextContext();O.\u0275\u0275advance(1),O.\u0275\u0275property("ngIf",n.giftHasAddon)}}function zt(e,t){1&e&&(O.\u0275\u0275elementStart(0,"div",12),O.\u0275\u0275text(1,"Out of stock"),O.\u0275\u0275elementEnd())}var Ft=function(e,t,n){return[e,t,n]},Lt=function(e){return{OutOfStock:e}},Dt=function(){var e=function(){return f(function e(t,n,i){u(this,e),this.printerFormatsService=t,this.giftAddonService=n,this.Store=i,this.themeCssClass="",this.themeExperiment={name:"",variation:""},this.addGiftToCard=new O.EventEmitter,this.openGiftDetails=new O.EventEmitter,this.addStandaloneToBasket=new O.EventEmitter},[{key:"ngOnInit",value:function(){return(0,g.mG)(this,void 0,void 0,c().mark(function e(){return c().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.printerFormatsService.getStandaloneFormats();case 2:this.productIsStandalone=this.printerFormatsService.isProductStandalone(this.gift.legacy.format),this.giftCost=this.gift.cost.value+(this.productIsStandalone?y.g.Price:0);case 4:case"end":return e.stop()}},e,this)}))}},{key:"addToBasket",value:function(e){return(0,g.mG)(this,void 0,void 0,c().mark(function t(){return c().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:this.productIsStandalone?this.addStandaloneToBasket.emit(e):this.addGiftToCard.emit(e);case 1:case"end":return t.stop()}},t,this)}))}},{key:"addToBasketClicked",value:function(e){var t=this;this.Store.select("featureFlag","config","TSN-760").pipe((0,h.P)(function(e){return"boolean"==typeof e})).subscribe(function(n){return(0,g.mG)(t,void 0,void 0,c().mark(function t(){var i;return c().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(!n){t.next=7;break}
1return t.next=3,this.giftAddonService.giftHasAddon(null===(i=e.legacy)||void 0===i?void 0:i.format,w.u.PBU);case 3:if(this.giftHasAddon=t.sent,!this.giftHasAddon||this.displayAddon){t.next=6;break}return t.abrupt("return",void(this.displayAddon=!0));case 6:this.displayAddon&&(this.displayAddon=!1);case 7:this.addToBasket(e);case 8:case"end":return t.stop()}},t,this)}))})}},{key:"addGiftAddonToBasket",value:function(e){var t=this.giftAddonService.formatGiftOptionIntoGift(e);this.productIsStandalone?this.addStandaloneToBasket.emit(t):this.addGiftToCard.emit(t)}}])}();return e.\u0275fac=function(t){return new(t||e)(O.\u0275\u0275directiveInject(Gt.t),O.\u0275\u0275directiveInject(Tt.h),O.\u0275\u0275directiveInject(F.yh))},e.\u0275cmp=O.\u0275\u0275defineComponent({type:e,selectors:[["pre-basket-gift-upsell-item"]],inputs:{gift:"gift",themeCssClass:"themeCssClass",themeExperiment:"themeExperiment"},outputs:{addGiftToCard:"addGiftToCard",openGiftDetails:"openGiftDetails",addStandaloneToBasket:"addStandaloneToBasket"},decls:14,vars:17,consts:[[4,"featureFlag"],[1,"GiftCarouselItem",3,"experimentVariantActiveClass"],[1,"GiftCarouselItem__ImageContainer",3,"click"],["imgMod","width=300,format=auto,quality=85","height","250","width","250","loading","lazy",1,"GiftCarouselItem__Image",3,"imgSrc","ngClass"],["class","GiftCarouselItem__OutOfStock",4,"ngIf"],[1,"GiftCarouselItem__Title"],[1,"GiftCarouselItem__DetailsContainer"],[1,"GiftCarouselItem__Price"],[1,"GiftCarouselItem__Button"],[1,"primary-button",3,"disabled","click"],[3,"refFormat","location","displayPopup","refCost","addGiftAddon","skipGiftAddon",4,"ngIf"],[3,"refFormat","location","displayPopup","refCost","addGiftAddon","skipGiftAddon"],[1,"GiftCarouselItem__OutOfStock"]],template:function(e,t){1&e&&(O.\u0275\u0275template(0,jt,2,1,"ng-container",0),O.\u0275\u0275elementStart(1,"div",1),O.\u0275\u0275elementStart(2,"div",2),O.\u0275\u0275listener("click",function(){return t.openGiftDetails.emit(t.gift)}),O.\u0275\u0275element(3,"img",3),O.\u0275\u0275template(4,zt,2,0,"div",4),O.\u0275\u0275elementEnd(),O.\u0275\u0275elementStart(5,"div",5),O.\u0275\u0275text(6),O.\u0275\u0275elementEnd(),O.\u0275\u0275elementStart(7,"div",6),O.\u0275\u0275elementStart(8,"div",7),O.\u0275\u0275text(9),O.\u0275\u0275pipe(10,"currency"),O.\u0275\u0275elementEnd(),O.\u0275\u0275elementStart(11,"div",8),O.\u0275\u0275elementStart(12,"button",9),O.\u0275\u0275listener("click",function(){return t.addToBasketClicked(t.gift)}),O.\u0275\u0275text(13,"Add"),O.\u0275\u0275elementEnd(),O.\u0275\u0275elementEnd(),O.\u0275\u0275elementEnd(),O.\u0275\u0275elementEnd()),2&e&&(O.\u0275\u0275property("featureFlag","TSN-760"),O.\u0275\u0275advance(1),O.\u0275\u0275property("experimentVariantActiveClass",O.\u0275\u0275pureFunction3(11,Ft,t.themeCssClass,null==t.themeExperiment?null:t.themeExperiment.name,null==t.themeExperiment?null:t.themeExperiment.variation)),O.\u0275\u0275advance(2),O.\u0275\u0275property("imgSrc",t.gift.images.gifting)("ngClass",O.\u0275\u0275pureFunction1(15,Lt,!t.gift.stock)),O.\u0275\u0275advance(1),O.\u0275\u0275property("ngIf",!t.gift.stock),O.\u0275\u0275advance(2),O.\u0275\u0275textInterpolate(t.gift.name),O.\u0275\u0275advance(3),O.\u0275\u0275textInterpolate(O.\u0275\u0275pipeBind2(10,8,t.giftCost,"GBP")),O.\u0275\u0275advance(3),O.\u0275\u0275property("disabled",!t.gift.stock))},directives:[M.Hl,wt,M.t1,E.mk,E.O5,he.d],pipes:[E.H9],styles:[".GiftCarouselItem[_ngcontent-%COMP%]{height:338px;width:228px;border-radius:3px;border:#B2B2B2 1px solid;margin:0 4px;position:relative;overflow:hidden}@media (min-width: 992px){.GiftCarouselItem[_ngcontent-%COMP%]{height:360px;width:250px;margin:0 8px}.GiftCarouselItem[_ngcontent-%COMP%]:hover{border:#ff6900 1px solid}}.GiftCarouselItem.--valentines-day[_ngcontent-%COMP%], .GiftCarouselItem.--valentines-day-male[_ngcontent-%COMP%], .GiftCarouselItem.--valentines-day-female[_ngcontent-%COMP%], .GiftCarouselItem.--birthday[_ngcontent-%COMP%], .GiftCarouselItem.--birthday-male[_ngcontent-%COMP%], .GiftCarouselItem.--birthday-female[_ngcontent-%COMP%], .GiftCarouselItem.--mothers-day[_ngcontent-%COMP%]{background-color:#fff;color:#000;border-style:hidden;border-radius:16px;margin:1px 8px 8px 1px;-webkit-box-shadow:0px 4px 4px 0px rgba(126,126,126,.25);box-shadow:0 4px 4px #7e7e7e40;padding-bottom:16px}@media (min-width: 992px){.GiftCarouselItem.--valentines-day[_ngcontent-%COMP%], .GiftCarouselItem.--valentines-day-male[_ngcontent-%COMP%], .GiftCarouselItem.--valentines-day-female[_ngcontent-%COMP%], .GiftCarouselItem.--birthday[_ngcontent-%COMP%], .GiftCarouselItem.--birthday-male[_ngcontent-%COMP%], .GiftCarouselItem.--birthday-female[_ngcontent-%COMP%], .GiftCarouselItem.--mothers-day[_ngcontent-%COMP%]{margin:1px 16px 8px 1px;padding-bottom:16px}.GiftCarouselItem.--valentines-day[_ngcontent-%COMP%]:hover, .GiftCarouselItem.--valentines-day-male[_ngcontent-%COMP%]:hover, .GiftCarouselItem.--valentines-day-female[_ngcontent-%COMP%]:hover, .GiftCarouselItem.--birthday[_ngcontent-%COMP%]:hover, .GiftCarouselItem.--birthday-male[_ngcontent-%COMP%]:hover, .GiftCarouselItem.--birthday-female[_ngcontent-%COMP%]:hover, .GiftCarouselItem.--mothers-day[_ngcontent-%COMP%]:hover{outline:#ff6900 1px solid}}.GiftCarouselItem.--valentines-day[_ngcontent-%COMP%]   .GiftCarouselItem__ImageContainer[_ngcontent-%COMP%], .GiftCarouselItem.--valentines-day-male[_ngcontent-%COMP%]   .GiftCarouselItem__ImageContainer[_ngcontent-%COMP%], .GiftCarouselItem.--valentines-day-female[_ngcontent-%COMP%]   .GiftCarouselItem__ImageContainer[_ngcontent-%COMP%], .GiftCarouselItem.--birthday[_ngcontent-%COMP%]   .GiftCarouselItem__ImageContainer[_ngcontent-%COMP%], .GiftCarouselItem.--birthday-male[_ngcontent-%COMP%]   .GiftCarouselItem__ImageContainer[_ngcontent-%COMP%], .GiftCarouselItem.--birthday-female[_ngcontent-%COMP%]   .GiftCarouselItem__ImageContainer[_ngcontent-%COMP%], .GiftCarouselItem.--mothers-day[_ngcontent-%COMP%]   .GiftCarouselItem__ImageContainer[_ngcontent-%COMP%]{height:228px}@media (min-width: 992px){.GiftCarouselItem.--valentines-day[_ngcontent-%COMP%]   .GiftCarouselItem__ImageContainer[_ngcontent-%COMP%], .GiftCarouselItem.--valentines-day-male[_ngcontent-%COMP%]   .GiftCarouselItem__ImageContainer[_ngcontent-%COMP%], .GiftCarouselItem.--valentines-day-female[_ngcontent-%COMP%]   .GiftCarouselItem__ImageContainer[_ngcontent-%COMP%], .GiftCarouselItem.--birthday[_ngcontent-%COMP%]   .GiftCarouselItem__ImageContainer[_ngcontent-%COMP%], .GiftCarouselItem.--birthday-male[_ngcontent-%COMP%]   .GiftCarouselItem__ImageContainer[_ngcontent-%COMP%], .GiftCarouselItem.--birthday-female[_ngcontent-%COMP%]   .GiftCarouselItem__ImageContainer[_ngcontent-%COMP%], .GiftCarouselItem.--mothers-day[_ngcontent-%COMP%]   .GiftCarouselItem__ImageContainer[_ngcontent-%COMP%]{height:250px}}.GiftCarouselItem__ImageContainer[_ngcontent-%COMP%]{height:226px;background-color:#fff;position:relative}@media (min-width: 992px){.GiftCarouselItem__ImageContainer[_ngcontent-%COMP%]{height:250px}}.GiftCarouselItem__Image[_ngcontent-%COMP%]{cursor:pointer;width:auto;height:100%;position:absolute;
1left:50%;-webkit-transform:translateX(-50%);transform:translate(-50%)}.GiftCarouselItem__Image.OutOfStock[_ngcontent-%COMP%]{-webkit-filter:grayscale(100%);filter:grayscale(100%)}.GiftCarouselItem__OutOfStock[_ngcontent-%COMP%]{position:absolute;padding-top:8px;width:100%;text-align:center;font-size:16px;font-weight:700;background-color:#fafafab3;height:32px;bottom:18px}.GiftCarouselItem__Title[_ngcontent-%COMP%]{width:198px;margin-top:16px;margin-left:16px;font-size:16px;font-weight:400;-webkit-line-clamp:2;overflow:hidden;text-overflow:ellipsis;display:-webkit-box;-webkit-box-orient:vertical}.GiftCarouselItem__DetailsContainer[_ngcontent-%COMP%]{display:grid;grid-template-columns:1fr 1fr;height:32px;-webkit-box-align:center;-ms-flex-align:center;align-items:center;position:absolute;bottom:16px}.GiftCarouselItem__Price[_ngcontent-%COMP%]{width:67px;height:15px;font-size:16px;font-weight:700;margin-left:16px}.GiftCarouselItem__Button[_ngcontent-%COMP%]{width:125px;height:32px;margin-right:16px}.GiftCarouselItem__Button[_ngcontent-%COMP%]   button[_ngcontent-%COMP%]{height:100%;width:100%;border:1px solid #ff6900;background:#fff;color:#ff6900;border-radius:4px;cursor:pointer;font-weight:700;font-size:16px}.GiftCarouselItem__Button[_ngcontent-%COMP%]   button[_ngcontent-%COMP%]:disabled{cursor:not-allowed;color:#979797;border:1px solid #979797}.GiftCarouselItem__Button[_ngcontent-%COMP%]   button[_ngcontent-%COMP%]:hover{background-color:#ff6900;color:#fff}.GiftCarouselItem__Button[_ngcontent-%COMP%]   button.primary-button[_ngcontent-%COMP%]{background-color:#ff6900;color:#fff}"]}),e}(),Nt=l(98459),Rt=l(65061),$t=function(){var e=function(){return f(function e(){u(this,e),this.isChecked=!1,this.checked=new O.EventEmitter},[{key:"emitCheckedEvent",value:function(e){this.isChecked=e,this.checked.emit(this.isChecked)}}])}();return e.\u0275fac=function(t){return new(t||e)},e.\u0275cmp=O.\u0275\u0275defineComponent({type:e,selectors:[["app-checkbox"]],inputs:{id:"id",label:"label"},outputs:{checked:"checked"},decls:5,vars:6,consts:[[1,"checkbox-wrapper"],[1,"control"],["type","checkbox",1,"input",3,"id","ngModel","ngModelChange"],[1,"label",3,"for"]],template:function(e,t){1&e&&(O.\u0275\u0275elementStart(0,"div",0),O.\u0275\u0275element(1,"div",1),O.\u0275\u0275elementStart(2,"input",2),O.\u0275\u0275listener("ngModelChange",function(e){return t.emitCheckedEvent(e)}),O.\u0275\u0275elementEnd(),O.\u0275\u0275elementStart(3,"label",3),O.\u0275\u0275text(4),O.\u0275\u0275elementEnd(),O.\u0275\u0275elementEnd()),2&e&&(O.\u0275\u0275advance(1),O.\u0275\u0275classProp("--checked",t.isChecked),O.\u0275\u0275advance(1),O.\u0275\u0275property("id",t.id)("ngModel",t.isChecked),O.\u0275\u0275advance(1),O.\u0275\u0275property("for",t.id),O.\u0275\u0275advance(1),O.\u0275\u0275textInterpolate(t.label))},directives:[Rt.Wl,Rt.JJ,Rt.On],styles:[".checkbox-wrapper[_ngcontent-%COMP%]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;position:relative;grid-gap:16px;gap:16px}.checkbox-wrapper[_ngcontent-%COMP%] > .input[_ngcontent-%COMP%]{position:absolute;cursor:pointer;left:0;margin:0;opacity:0}.checkbox-wrapper[_ngcontent-%COMP%] > .control[_ngcontent-%COMP%]{background:#ffffff;border-radius:4px;border:1px solid #BDBDBD;-ms-flex-negative:0;flex-shrink:0}.checkbox-wrapper[_ngcontent-%COMP%] > .control.--checked[_ngcontent-%COMP%]{background:url(https://images-fe.thortful.com/svg/check-mark.svg) center center no-repeat;background-color:#ff6900;border-color:#ff6900}.checkbox-wrapper[_ngcontent-%COMP%] > .control[_ngcontent-%COMP%], .checkbox-wrapper[_ngcontent-%COMP%] > .input[_ngcontent-%COMP%]{width:24px;height:24px}.checkbox-wrapper[_ngcontent-%COMP%] > .input[_ngcontent-%COMP%]:checked + .label[_ngcontent-%COMP%]{color:#000}.checkbox-wrapper[_ngcontent-%COMP%] > .label[_ngcontent-%COMP%]{color:#495057;font-size:16px}"]}),e}();function Wt(e,t){if(1&e){var n=O.\u0275\u0275getCurrentView();O.\u0275\u0275elementStart(0,"app-horizontal-scroll-item"),O.\u0275\u0275elementStart(1,"pre-basket-gift-upsell-item",10),O.\u0275\u0275listener("addGiftToCard",function(e){var t=O.\u0275\u0275restoreView(n).index,i=O.\u0275\u0275nextContext(2),a=i.$implicit,r=i.index,o=O.\u0275\u0275nextContext().ngIf;return O.\u0275\u0275nextContext().addGiftToCardV2(e,a,t,r,o.gift_relevance_criteria)})("addStandaloneToBasket",function(e){var t=O.\u0275\u0275restoreView(n).index,i=O.\u0275\u0275nextContext(2),a=i.index,r=i.$implicit;return O.\u0275\u0275nextContext(2).addStandaloneProductToBasket(e,t,a,r.name)})("openGiftDetails",function(e){var t=O.\u0275\u0275restoreView(n).index,i=O.\u0275\u0275nextContext(2),a=i.$implicit,r=i.index,o=O.\u0275\u0275nextContext().ngIf;return O.\u0275\u0275nextContext().openGiftDetailsV2(e,a,t,r,o.gift_relevance_criteria)})("inViewChange",function(e){var t=O.\u0275\u0275restoreView(n),i=t.index,a=t.$implicit,r=O.\u0275\u0275nextContext(2),o=r.index,l=r.$implicit,c=O.\u0275\u0275nextContext(2);return e&&c.segmentProductCarouselImpressionV2(i,o,a,l)}),O.\u0275\u0275elementEnd(),O.\u0275\u0275elementEnd()}
1if(2&e){var i=t.$implicit,a=O.\u0275\u0275nextContext(3).ngIf;O.\u0275\u0275advance(1),O.\u0275\u0275property("themeCssClass",a.css)("themeExperiment",a.experiment)("gift",i)("inViewThreshold",.75)}}function qt(e,t){if(1&e&&(O.\u0275\u0275elementStart(0,"div",7),O.\u0275\u0275elementStart(1,"div",8),O.\u0275\u0275text(2),O.\u0275\u0275elementEnd(),O.\u0275\u0275elementStart(3,"app-horizontal-scroll-v2",9),O.\u0275\u0275template(4,Wt,2,4,"app-horizontal-scroll-item",5),O.\u0275\u0275elementEnd(),O.\u0275\u0275elementEnd()),2&e){var n=O.\u0275\u0275nextContext(),i=n.$implicit;O.\u0275\u0275property("id","pdp-upsell-carousel-"+n.index),O.\u0275\u0275advance(2),O.\u0275\u0275textInterpolate(i.name),O.\u0275\u0275advance(1),O.\u0275\u0275property("showArrows",!0),O.\u0275\u0275advance(1),O.\u0275\u0275property("ngForOf",i.gifts)}}function Ht(e,t){if(1&e&&(O.\u0275\u0275elementContainerStart(0),O.\u0275\u0275template(1,qt,5,4,"div",6),O.\u0275\u0275elementContainerEnd()),2&e){var n=t.$implicit;O.\u0275\u0275advance(1),O.\u0275\u0275property("ngIf",null==n.gifts?null:n.gifts.length)}}var Qt=function(e,t,n){return[e,t,n]};function Yt(e,t){if(1&e&&(O.\u0275\u0275elementStart(0,"div",2),O.\u0275\u0275elementStart(1,"div",3),O.\u0275\u0275text(2,"Add a gift"),O.\u0275\u0275elementEnd(),O.\u0275\u0275elementStart(3,"div",4),O.\u0275\u0275template(4,Ht,2,1,"ng-container",5),O.\u0275\u0275elementEnd(),O.\u0275\u0275elementEnd()),2&e){var n=t.ngIf;O.\u0275\u0275property("experimentVariantActiveClass",O.\u0275\u0275pureFunction3(2,Qt,n.css,n.experiment.name,n.experiment.variation)),O.\u0275\u0275advance(4),O.\u0275\u0275property("ngForOf",n.gift_groups)}}function Jt(e,t){if(1&e){var n=O.\u0275\u0275getCurrentView();O.\u0275\u0275elementStart(0,"secondary-button",15),O.\u0275\u0275listener("click",function(){return O.\u0275\u0275restoreView(n),O.\u0275\u0275nextContext(2).showAllGifts()}),O.\u0275\u0275text(1,"Show more gifts"),O.\u0275\u0275elementEnd()}}function Kt(e,t){if(1&e){var n=O.\u0275\u0275getCurrentView();O.\u0275\u0275elementStart(0,"app-checkbox",17),O.\u0275\u0275listener("checked",function(e){return O.\u0275\u0275restoreView(n),O.\u0275\u0275nextContext(3).handleUpsellOptOut(e)}),O.\u0275\u0275elementEnd()}}function Xt(e,t){if(1&e&&(O.\u0275\u0275elementContainerStart(0),O.\u0275\u0275template(1,Kt,1,0,"app-checkbox",16),O.\u0275\u0275elementContainerEnd()),2&e){var n=O.\u0275\u0275nextContext(2);O.\u0275\u0275advance(1),O.\u0275\u0275property("ngIf",n.showSkipCheckbox)}}function Zt(e,t){if(1&e){var n=O.\u0275\u0275getCurrentView();O.\u0275\u0275elementStart(0,"button",18),O.\u0275\u0275listener("click",function(){return O.\u0275\u0275restoreView(n),O.\u0275\u0275nextContext(2).proceedToBasket()}),O.\u0275\u0275text(1,"Continue without a gift"),O.\u0275\u0275elementEnd()}}var en=function(e,t){return{"hide-sticky-btn":e,"display-sticky-btn":t}},tn=function(){return["[W19.0] Add to basket from modal","Variation 1"]};function nn(e,t){if(1&e&&(O.\u0275\u0275elementStart(0,"div",11),O.\u0275\u0275template(1,Jt,2,0,"secondary-button",12),O.\u0275\u0275template(2,Xt,2,1,"ng-container",13),O.\u0275\u0275template(3,Zt,2,0,"button",14),O.\u0275\u0275elementEnd()),2&e){var n=t.ngIf,i=O.\u0275\u0275nextContext();O.\u0275\u0275property("ngClass",O.\u0275\u0275pureFunction2(4,en,i.hideStickyButton,!i.hideStickyButton)),O.\u0275\u0275advance(1),O.\u0275\u0275property("ngIf",i.carouselLimit&&i.carouselLimit<i.giftCarousels.length),O.\u0275\u0275advance(1),O.\u0275\u0275property("experimentVariantActive",O.\u0275\u0275pureFunction0(7,tn)),O.\u0275\u0275advance(1),O.\u0275\u0275property("ngIf",null==n||null==n.gift_groups?null:n.gift_groups.length)}}var an=function(){var e=function(){return f(function e(t,n,i,a,r,o,l,c,d,p,g,f,m,v){var C=this;u(this,e),this.ShareData=t,this.GeneralUtils=n,this.route=i,this.router=a,this.remoteConfigService=r,this.basketService=o,this.SegmentService=l,this.headerService=c,this.footerService=d,this.cardService=p,this.Store=g,this.Api=f,this.Endpoint=m,this.notificationService=v,this.enabledGifts=[],this.giftCarousels=[],this.overlayVisible=!1,this.giftInView=!0,this.cardTags=[],this.cardCategories=[],this.isUpsellOptOut=!1,this.showSkipCheckbox=this.route.
1snapshot.queryParams.quickAdd,this.stickyButtonWasShown=!1,this.giftingPrebasketUpsellExperiment={name:"[W36.0] Gifting PBU reskin",variation:"Variation 1"},this.pdpUpsellReskinConfiguration={birthday:{experiment:this.giftingPrebasketUpsellExperiment},default:{experiment:this.giftingPrebasketUpsellExperiment}},this.enableRemoveFormats=!1,this.card=this.route.data.pipe((0,x.j)("card"),(0,gt.b)(function(e){var t,n,i,a,r;C.cardTags=(null===(n=null===(t=null==e?void 0:e.card)||void 0===t?void 0:t.tags)||void 0===n?void 0:n.map(function(e){return e.toLowerCase()}))||[],C.cardCategories=(null===(r=null===(a=null===(i=null==e?void 0:e.card)||void 0===i?void 0:i.classification)||void 0===a?void 0:a.categories)||void 0===r?void 0:r.map(function(e){return e.toLowerCase()}))||[]})),this.allVariations=this.remoteConfigService.cardVariations,this.cardVariationOptions=this.remoteConfigService.cardVariationOptions,this.Store.select("featureFlag","config","WAL-280").pipe((0,h.P)(function(e){return"boolean"==typeof e})).subscribe(function(e){var t;C.$preBasketGiftUpsellData=(t=C.Api.request("".concat(C.Endpoint.preBasketGiftUpsell).concat(e?C.route.snapshot.data.card.id:C.route.
1snapshot.params.cardId),void 0,!0)).pipe.apply(t,s(vt(C.router))),C.$preBasketWithReskinInformation=C.$preBasketGiftUpsellData.pipe((0,_.U)(function(e){var t=e.gift_relevance_criteria.split(" ")[0],n=C.pdpUpsellReskinConfiguration[t];return n?n.css="--"+e.gift_relevance_criteria.replace(/ /g,"-"):n=Object.assign(Object.assign({},C.pdpUpsellReskinConfiguration.default),{css:"--default"}),Object.assign(Object.assign({},e),n)}))})},[{key:"ngOnInit",value:function(){var e,t=this;this.tagSubscription=this.Store.subscribe(function(e){t.isTagExclusionsActive=e.featureFlag.config["tag-exclusions"]}),y.g.Holder.scrollPositionTop=!1,this.upsellLocation=(null===(e=this.GeneralUtils.previousRoute)||void 0===e?void 0:e.includes("/basket"))?"basket":"pdp",this.date=new Date,this.GeneralUtils.serviceOptions.then(function(e){return(0,g.mG)(t,void 0,void 0,c().mark(function t(){var n,i,a=this;return c().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(n=e.general_settings.filter(function(e){return"gift_upsell_carousel"===e.name}),!this.isTagExclusionsActive){t.next=8;break}return t.next=4,this.card.pipe((0,v.q)(1)).toPromise();case 4:return i=t.sent,t.next=7,this.cardService.getExcludedProducts(i.id);case 7:this.excludedProducts=t.sent;case 8:n.forEach(function(e){return(0,g.mG)(a,void 0,void 0,c().mark(function t(){var n,i,a;return c().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return n=e.value.split(","),i=n.shift(),t.next=4,this.extractOptionInfo(this.cardVariationOptions,n,this.card,this.allVariations);case 4:(a=t.sent).length&&this.giftCarousels.push({name:i,values:a});case 6:case"end":return t.stop()}},t,this)}))});case 9:case"end":return t.stop()}},t,this)}))}),this.basketUpdate=this.ShareData.listen("basketUpdate",function(){var e=t.basketService.getFullBasket(),n=t.route.snapshot.params.cardId,i=t.route.snapshot.params.basketItemId;e.find(function(e){return e.id===i})||t.router.navigate(["card/"+n])}),this.costsUpdate=this.ShareData.listen("costsUpdate",function(){t.trackGiftUpsellViewed()}),(0,k.a$)("[B11.0] Add gift upsell on basket","Variation 1")&&"basket"===this.upsellLocation&&this.trackGiftUpsellViewed(),this.deviceListener=this.ShareData.listen("device-change",function(e){return t.device=e}),this.device=this.ShareData.getProperty("device"),this.Store.select("featureFlag","config","NEMO-216").pipe((0,h.P)(function(e){return"boolean"==typeof e})).subscribe(function(e){t.enableRemoveFormats=e})}},{key:"ngOnDestroy",value:function(){var e;this.basketUpdate.unsubscribe(),this.costsUpdate.unsubscribe(),this.tagSubscription&&this.tagSubscription.unsubscribe(),y.g.Holder.scrollPositionTop=!0,null===(e=this.deviceListener)||void 0===e||e.unsubscribe()}},{key:"hideStickyButton",get:function(){if(this.stickyButtonWasShown)return!1;var e=document.getElementById("pdp-upsell-carousel-2");if(!e)return this.stickyButtonWasShown=!0,!1;var t=null==e?void 0:e.getElementsByClassName("UpsellPage__CarouselTitle")[0],n=!!e&&(null==t?void 0:t.getBoundingClientRect().bottom)>window.innerHeight;return this.stickyButtonWasShown=!n,n}},{key:"extractOptionInfo",value:function(e,t,n,i){return(0,g.mG)(this,void 0,void 0,c().mark(function a(){var r,o,l,s,d;return c().wrap(function(a){for(;;)switch(a.prev=a.next){case 0:return a.next=2,n.pipe((0,v.q)(1)).toPromise();case 2:return r=a.sent,a.next=5,e.pipe((0,v.q)(1)).toPromise();case 5:return o=a.sent,a.next=8,i.pipe((0,v.q)(1)).toPromise();case 8:if(l=a.sent,o.find(function(e){return"A5"===e.printer_format}),s=o.map(function(e){var t,n,i,a=e.id,r=e.name,o=e.subtitle,c=e.printer_format,s=null===(i=null===(n=null===(t=e.product_assets)||void 0===t?void 0:t.find(function(e){return"gifting"===e.name}))||void 0===n?void 0:n.images)||void 0===i?void 0:i[0],d=e.product_assets,p=e.cost?(parseFloat(e.cost)-y.g.Price).toFixed(2).toString():e.cost,u=e.stock,g=e.card_variation_id,f=[e],m=l.find(function(e){return e.id===g}).product_url;return{id:a,name:r,subtitle:o,format:c,image:s,images:d,cost:p,stock:u,variationId:g,item_options:f,product_url:m}}),!this.isTagExclusionsActive){a.next=14;break}return d=this.excludedProducts,a.abrupt("return",t.map(function(e){return s.find(function(t){var n;return t.name===e&&!!t.image&&!!t.cost&&!(null===(n=null==d?void 0:d.product_ids)||void 0===n?void 0:n.includes(t.id))})}).filter(function(e){return e}));case 14:return a.abrupt("return",this.enableRemoveFormats?t.map(function(e){return s.find(function(t){return t.name===e&&!!t.image&&!!t.cost})}).filter(function(e){return e}):t.map(function(e){return s.find(function(t){return t.name===e&&!!t.image&&!!t.cost&&r.formats.includes(t.format)})}).filter(function(e){return e}));case 15:case"end":return a.stop()}},a,this)}))}},{key:"proceedToBasket",value:function(){sessionStorage.setItem("gift_upsell_opt_out",JSON.stringify(this.isUpsellOptOut)),this.isUpsellOptOut&&this.trackGiftUpsellSkipButtonSelected(),this.router.navigate(["/basket"])}},{key:"showAllGifts",value:function(){this.carouselLimit=void 0}},{key:"openGiftDetails",value:function(e){var t=e.gift,n=e.carousel,i=e.itemIndex,a=e.carouselIndex;this.selectedGift=t,this.selectedCarousel=n,this.selectedGiftIndex=i,this.overlayVisible=!0,this.SegmentService.track((0,ut.RX)(["carousel_name",n.name],["gift_name",t.name],["gift_price",t.cost],["position_index",i],["carousel_position",a],["product_format",t.format],["product_id",t.id],["product_image",t.image.image],["product_url",t.product_url],["upsell_location",this.upsellLocation])),this.router.navigate([t.id],{relativeTo:this.route})}},{key:"openGiftDetailsV2",value:function(e,t,n,i,a){this.router.navigate([e.id],{relativeTo:this.route}),this.SegmentService.track((0,ut.RX)(["carousel_name",t.name],["gift_name",e.name],["gift_price",e.cost],["position_index",n],["carousel_position",i],["product_format",e.legacy.format],["product_id",e.id],["product_image",e.images.gifting],["gift_relevance_criteria",a],["upsell_location",this.upsellLocation]))}},{key:"segmentProductCarouselImpression",value:function(e,t,n,i){this.giftInView&&this.SegmentService.track((0,ut.QU)(["position_index",e],["carousel_position",t],["carousel_name",i.name],["gift_name",n.name],["gift_price",n.cost],["product_id",n.id],["product_format",n.format],["product_image",n.image.image],["upsell_location",this.upsellLocation]))}},{key:"segmentProductCarouselImpressionV2",value:function(e,t,n,i){this.SegmentService.track((0,ut.QU)(["position_index",e],["carousel_position",t],["carousel_name",i.name],["gift_name",n.name],["gift_price",n.cost],["product_id",n.id],["product_format",n.legacy.format],["product_image",n.images.gifting],["upsell_location",this.upsellLocation]))}},{key:"trackGiftUpsellViewed",value:function(){return(0,g.mG)(this,void 0,void 0,c().mark(function e(){var t,n,i,a;return c().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.$preBasketGiftUpsellData.toProm
1ise();case 2:return t=e.sent,n=t.gift_relevance_criteria,e.next=6,this.basketService.isBasketReady();case 6:i=this.basketService.processCardsBasketApi(),a=this.basketService.orderCostValue(),this.SegmentService.track(ut.rL.apply(void 0,s((0,pt.BG)(i.length,a,i)).concat([["gift_relevance_criteria",n],["upsell_location",this.upsellLocation]])));case 8:case"end":return e.stop()}},e,this)}))}},{key:"addGiftToCardV2",value:function(e,t,n,i,a){var r=this,o=e.legacy,l=o.format,c=o.item_option,s=this.basketService,d=this.route,p=this.notificationService,u=this.router,g={format:l,item_options:[JSON.parse(atob(c))]};s.updateCardsBasket(g,["format","item_options"],d.snapshot.params.basketItemId).then(function(){p.success("Successfully added to basket!"),u.navigate(["/basket"]),r.trackGiftUpsellProductAdded(e,n,i,t.name,"card_pack",a),r.basketService.giftUpsellCartUpdateTrack(d.snapshot.params.basketItemId)}).catch(function(){return p.error("Something went wrong!")})}},{key:"handleUpsellOptOut",value:function(e){this.isUpsellOptOut=e}},{key:"trackGiftUpsellSkipButtonSelected",value:function(){var e=this.basketService.processCardsBasketApi(),t=this.basketService.orderCostValue();this.SegmentService.track(ut.L3.apply(void 0,s((0,pt.BG)(e.length,t,e)).concat([["upsell_location",this.upsellLocation]])))}},{key:"addStandaloneProductToBasket",value:function(e,t,n,i,a){var r=this;return this.GeneralUtils.getDummyCard().then(function(o){r.basketService.addToBasket(Object.assign(Object.assign({},o),{format:e.legacy.format}),"CART_ADD_LV",e.legacy.format,[e]).then(function(o){o&&(r.notificationService.success("Successfully added to basket!"),r.router.navigate(["/basket"]),r.trackGiftUpsellProductAdded(e,t,n,i,"card_pack",a))})})}},{key:"trackGiftUpsellProductAdded",value:function(e,t,n,i,a,r){this.SegmentService.track((0,ut.AG)(["gift_name",e.name],["gift_price",e.cost.value],["product_format",e.legacy.format],["product_id",e.id],["product_image",e.images.gifting],["carousel_name",i],["position_index",t],["carousel_position",n],["button_location","QUICKADD"],["gift_relevance_criteria",r],["product_type",a],["upsell_location",this.upsellLocation]))}}])}();return e.\u0275fac=function(t){return new(t||e)(O.\u0275\u0275directiveInject(be.u),O.\u0275\u0275directiveInject(Ct.w),O.\u0275\u0275directiveInject(p.gz),O.\u0275\u0275directiveInject(p.F0),O.\u0275\u0275directiveInject(_t.y),O.\u0275\u0275directiveInject(Pe.v),O.\u0275\u0275directiveInject(M.BP),O.\u0275\u0275directiveInject(xt.o),O.\u0275\u0275directiveInject(Pt.q),O.\u0275\u0275directiveInject(bt.J),O.\u0275\u0275directiveInject(F.yh),O.\u0275\u0275directiveInject(yt.V),O.\u0275\u0275directiveInject(kt.F),O.\u0275\u0275directiveInject(ye.P))},e.\u0275cmp=O.\u0275\u0275defineComponent({type:e,selectors:[["app-product-page-upsell"]],decls:6,vars:6,consts:[["class","UpsellPage content",3,"experimentVariantActiveClass",4,"ngIf"],["class","UpsellPage__ButtonsContainerSticky",3,"ngClass",4,"ngIf"],[1,"UpsellPage","content",3,"experimentVariantActiveClass"],[1,"UpsellPage__Title"],[1,"UpdatePage__Carousels"],[4,"ngFor","ngForOf"],["class","UpsellPage__CarouselContainer",3,"id",4,"ngIf"],[1,"UpsellPage__CarouselContainer",3,"id"],[1,"UpsellPage__CarouselTitle"],[1,"UpsellPage__Carousel",3,"showArrows"],["inView","",3,"themeCssClass","themeExperiment","gift","inViewThreshold","addGiftToCard","addStandaloneToBasket","openGiftDetails","inViewChange"],[1,"UpsellPage__ButtonsContainerSticky",3,"ngClass"],["class","UpsellPage__ShowMoreGifts",3,"click",4,"ngIf"],[4,"experimentVariantActive"],["class","UpsellPage__ProceedToBasket outline-button","data-test-id","proceedToBasket",3,"click",4,"ngIf"],[1,"UpsellPage__ShowMoreGifts",3,"click"],["class","UpsellPage__Checkbox","id","upsell-opt-out","label","I am just shopping for cards, don't show me gifts again",3,"checked",4,"ngIf"],["id","upsell-opt-out","label","I am just shopping for cards, don't show me gifts again",1,"UpsellPage__Checkbox",3,"checked"],["data-test-id","proceedToBasket",1,"UpsellPage__ProceedToBasket","outline-button",3,"click"]],template:function(e,t){1&e&&(O.\u0275\u0275template(0,Yt,5,6,"div",0),O.\u0275\u0275pipe(1,"async"),O.\u0275\u0275elementContainerStart(2),O.\u0275\u0275template(3,nn,4,8,"div",1),O.\u0275\u0275pipe(4,"async"),O.\u0275\u0275elementContainerEnd(),O.\u0275\u0275element(5,"router-outlet")),2&e&&(O.\u0275\u0275property("ngIf",O.\u0275\u0275pipeBind1(1,2,t.$preBasketWithReskinInformation)),O.\u0275\u0275advance(3),O.\u0275\u0275property("ngIf",O.\u0275\u0275pipeBind1(4,4,t.$preBasketGiftUpsellData)))},directives:[E.O5,p.lC,wt,E.sg,Bt,Ot.f,Dt,Nt.z,E.mk,V.M,fe.k,$t],pipes:[E.Ov],styles:['.UpsellPage[_ngcontent-%COMP%]{padding:22px 0 22px 22px;min-height:100vh}@media (min-width: 992px){.UpsellPage[_ngcontent-%COMP%]{padding:22px}}.UpsellPage.--valentines-day[_ngcontent-%COMP%], .UpsellPage.--valentines-day-male[_ngcontent-%COMP%], .UpsellPage.--valentines-day-female[_ngcontent-%COMP%]{padding:0 0 8px;background-color:#f6e5f5}@media (min-width: 769px){.UpsellPage.--valentines-day[_ngcontent-%COMP%], .UpsellPage.--valentines-day-male[_ngcontent-%COMP%], .UpsellPage.--valentines-day-female[_ngcontent-%COMP%]{max-width:100%}}@media (min-width: 992px){.UpsellPage.--valentines-day[_ngcontent-%COMP%], .UpsellPage.--valentines-day-male[_ngcontent-%COMP%], .UpsellPage.--valentines-day-female[_ngcontent-%COMP%]{max-width:100%}}@media (min-width: 1200px){.UpsellPage.--valentines-day[_ngcontent-%COMP%], .UpsellPage.--valentines-day-male[_ngcontent-%COMP%], .UpsellPage.--valentines-day-female[_ngcontent-%COMP%]{max-width:100%}}@media (min-width: 992px){.UpsellPage.--valentines-day[_ngcontent-%COMP%], .UpsellPage.--valentines-day-male[_ngcontent-%COMP%], .UpsellPage.--valentines-day-female[_ngcontent-%COMP%]{padding:0 0 24px}}.UpsellPage.--valentines-day[_ngcontent-%COMP%]   .UpsellPage__Title[_ngcontent-%COMP%], .UpsellPage.--valentines-day-male[_ngcontent-%COMP%]   .UpsellPage__Title[_ngcontent-%COMP%], .UpsellPage.--valentines-day-female[_ngcontent-%COMP%]   .UpsellPage__Title[_ngcontent-%COMP%]{background:#A4009D;padding:24px 16px 8px;margin-bottom:0;color:#fff}@media (min-width: 992px){.UpsellPage.--valentines-day[_ngcontent-%COMP%]   .UpsellPage__Title[_ngcontent-%COMP%], .UpsellPage.--valentines-day-male[_ngcontent-%COMP%]   .UpsellPage__Title[_ngcontent-%COMP%], .UpsellPage.--valentines-day-female[_ngcontent-%COMP%]   .UpsellPage__Title[_ngcontent-%COMP%]{background-color:#a4009d;padding:24px 16px 8px 24px;font-size:32px}}.UpsellPage.--valentines-day[_ngcontent-%COMP%]   .UpsellPage__CarouselContainer[_ngcontent-%COMP%], .UpsellPage.--valentines-day-male[_ngcontent-%COMP%]   .UpsellPage__CarouselContainer[_ngcontent-%COMP%], .UpsellPage.--valentines-day-female[_ngcontent-%COMP%]   .UpsellPage__CarouselContainer[_ngcontent-%COMP%]{height:100%;margin-bottom:0;padding:16px 0 0 16px;position:relative;z-index:0}@media (min-width: 992px){.UpsellPage.--valentines-day[_ngcontent-%COMP%]   .UpsellPage__CarouselContainer[_ngcontent-%COMP%], .UpsellPage.--valentines-day-male[_ngcontent-%COMP%]   .UpsellPage__CarouselContainer[_ngcontent-%COMP%], .UpsellPage.--valentines-day-female[_ngcontent-%COMP%]   .UpsellPage__CarouselContainer[_ngcontent-%COMP%]{padding:8px 0 0 24px}}.UpsellPage.--valentines-day[_ngcontent-%COMP%]   .UpsellPage__CarouselContainer[_ngcontent-%COMP%]:first-of-type, .UpsellPage.--valentines-day-male[_ngcontent-%COMP%]   .UpsellPage__CarouselContainer[_ngcontent-%COMP%]:first-of-type, .UpsellPage.--valentines-day-female[_ngcontent-%COMP%]   .UpsellPage__CarouselContainer[_ngcontent-%COMP%]:first-of-type{background-color:#a4009d;padding:0 0 8px 16px;color:#fff}@media (min-width: 992px){.UpsellPage.--valentines-day[_ngcontent-%COMP%]   .UpsellPage__CarouselContainer[_ngcontent-%COMP%]:first-of-type, .UpsellPage.--valentines-day-male[_ngcontent-%COMP%]   .UpsellPage__CarouselContainer[_ngcontent-%COMP%]:first-of-type, .UpsellPage.--valentines-day-female[_ngcontent-%COMP%]   .UpsellPage__CarouselContainer[_ngcontent-%COMP%]:first-of-type{padding:0 0 16px 24px;margin-bottom:8px}}.UpsellPage.--valentines-day[_ngcontent-%COMP%]   .UpsellPage__CarouselTitle[_ngcontent-%COMP%], .UpsellPage.--valentines-day-male[_ngcontent-%COMP%]   .UpsellPage__CarouselTitle[_ngcontent-%COMP%], .UpsellPage.--valentines-day-female[_ngcontent-%COMP%]   .UpsellPage__CarouselTitle[_ngcontent-%COMP%]{font-size:18px;margin-bottom:14px}@media (min-width: 992px){.UpsellPage.--valentines-day[_ngcontent-%COMP%]   .UpsellPage__CarouselTitle[_ngcontent-%COMP%], .UpsellPage.--valentines-day-male[_ngcontent-%COMP%]   .UpsellPage__CarouselTitle[_ngcontent-%COMP%], .UpsellPage.--valentines-day-female[_ngcontent-%COMP%]   .UpsellPage__CarouselTitle[_ngcontent-%COMP%]{width:50%;font-size:20px;margin-bottom:16px}}@media (min-width: 992px){.UpsellPage.--valentines-day[_ngcontent-%COMP%]   .UpsellPage__Title[_ngcontent-%COMP%], .UpsellPage.--valentines-day-male[_ngcontent-%COMP%]   .UpsellPage__Title[_ngcontent-%COMP%], .UpsellPage.--valentines-day-female[_ngcontent-%COMP%]   .UpsellPage__Title[_ngcontent-%COMP%]{background:url(https://images-fe.thortful.com/img/occasions/valentines-pink-bg-shape-desktop.png) bottom 16px right calc(100% * .2) no-repeat,url(https://images-fe.thortful.com/img/occasions/valentines-heart-white-small.png) top 16px right 40px no-repeat,#A4009D;background-size:770px 100px 20px 20px auto}}.UpsellPage.--valentines-day[_ngcontent-%COMP%]   .UpsellPage__CarouselContainer[_ngcontent-%COMP%]:first-of-type, .UpsellPage.--valentines-day-male[_ngcontent-%COMP%]   .UpsellPage__CarouselContainer[_ngcontent-%COMP%]:first-of-type, .UpsellPage.--valentines-day-female[_ngcontent-%COMP%]   .UpsellPage__CarouselContainer[_ngcontent-%COMP%]:first-of-type{background:url(https://images-fe.thortful.com/img/occasions/valentines-heart-pink.png) top calc(100% * 1/2) left 8px no-repeat,#A4009D;background-size:30px 30px}@media (min-width: 992px){.UpsellPage.--valentines-day[_ngcontent-%COMP%]   .UpsellPage__CarouselContainer[_ngcontent-%COMP%]:first-of-type:after, .UpsellPage.--valentines-day-male[_ngcontent-%COMP%]   .UpsellPage__CarouselContainer[_ngcontent-%COMP%]:first-of-type:after, .UpsellPage.--valentines-day-female[_ngcontent-%COMP%]   .UpsellPage__CarouselContainer[_ngcontent-%COMP%]:first-of-type:after{content:"";position:absolute;top:-40px;right:120px;width:215px;height:230px;z-index:-1;background:url(https://images-fe.thortful.com/img/occasions/valentines-thortle.png) no-repeat center;background-size:215px 230px}}.UpsellPage.--birthday[_ngcontent-%COMP%], .UpsellPage.--birthday-male[_ngcontent-%COMP%], .UpsellPage.--birthday-female[_ngcontent-%COMP%]{padding:0 0 8px;background-color:#dbe9ff}@media (min-width: 769px){.UpsellPage.--birthday[_ngcontent-%COMP%], .UpsellPage.--birthday-male[_ngcontent-%COMP%], .UpsellPage.--birthday-female[_ngcontent-%COMP%]{max-width:100%}}@media (min-width: 992px){.UpsellPage.--birthday[_ngcontent-%COMP%], .UpsellPage.--birthday-male[_ngcontent-%COMP%], .UpsellPage.--birthday-female[_ngcontent-%COMP%]{max-width:100%}}@media (min-width: 1200px){.UpsellPage.--birthday[_ngcontent-%COMP%], .UpsellPage.--birthday-male[_ngcontent-%COMP%], .UpsellPage.--birthday-female[_ngcontent-%COMP%]{max-width:100%}}@media (min-width: 992px){.UpsellPage.--birthday[_ngcontent-%COMP%], .UpsellPage.--birthday-male[_ngcontent-%COMP%], .UpsellPage.--birthday-female[_ngcontent-%COMP%]{padding:0 0 24px}}.UpsellPage.--birthday[_ngcontent-%COMP%]   .UpsellPage__Title[_ngcontent-%COMP%], .UpsellPage.--birthday-male[_ngcontent-%COMP%]   .UpsellPage__Title[_ngcontent-%COMP%], .UpsellPage.--birthday-female[_ngcontent-%COMP%]   .UpsellPage__Title[_ngcontent-%COMP%]{background:#001E75;padding:24px 16px 8px;margin-bottom:0;color:#fff}@media (min-width: 992px){.UpsellPage.--birthday[_ngcontent-%COMP%]   .UpsellPage__Title[_ngcontent-%COMP%], .UpsellPage.--birthday-male[_ngcontent-%COMP%]   .UpsellPage__Title[_ngcontent-%COMP%], .UpsellPage.--birthday-female[_ngcontent-%COMP%]   .UpsellPage__Title[_ngcontent-%COMP%]{background-color:#001e75;padding:24px 16px 8px 24px;font-size:32px}}.UpsellPage.--birthday[_ngcontent-%COMP%]   .UpsellPage__CarouselContainer[_ngcontent-%COMP%], .UpsellPage.--birthday-male[_ngcontent-%COMP%]   .UpsellPage__CarouselContainer[_ngcontent-%COMP%], .UpsellPage.--birthday-female[_ngcontent-%COMP%]   .UpsellPage__CarouselContainer[_ngcontent-%COMP%]{height:100%;margin-bottom:0;padding:16px 0 0 16px;position:relative;z-index:0}@media (min-width: 992px){.UpsellPage.--birthday[_ngcontent-%COMP%]   .UpsellPage__CarouselContainer[_ngcontent-%COMP%], .UpsellPage.--birthday-male[_ngcontent-%COMP%]   .UpsellPage__CarouselContainer[_ngcontent-%COMP%], .UpsellPage.--birthday-female[_ngcontent-%COMP%]   .UpsellPage__CarouselContainer[_ngcontent-%COMP%]{padding:8px 0 0 24px}}.UpsellPage.--birthday[_ngcontent-%COMP%]   .UpsellPage__CarouselContainer[_ngcontent-%COMP%]:first-of-type, .UpsellPage.--birthday-male[_ngcontent-%COMP%]   .UpsellPage__CarouselContainer[_ngcontent-%COMP%]:first-of-type, .UpsellPage.--birthday-female[_ngcontent-%COMP%]   .UpsellPage__CarouselContainer[_ngcontent-%COMP%]:first-of-type{background-color:#001e75;padding:0 0 8px 16px;color:#fff}@media (min-width: 992px){.UpsellPage.--birthday[_ngcontent-%COMP%]   .UpsellPage__CarouselContainer[_ngcontent-%COMP%]:first-of-type, .UpsellPage.--birthday-male[_ngcontent-%COMP%]   .UpsellPage__CarouselContainer[_ngcontent-%COMP%]:first-of-type, .UpsellPage.--birthday-female[_ngcontent-%COMP%]   .UpsellPage__CarouselContainer[_ngcontent-%COMP%]:first-of-type{padding:0 0 16px 24px;margin-bottom:8px}}.UpsellPage.--birthday[_ngcontent-%COMP%]   .UpsellPage__CarouselTitle[_ngcontent-%COMP%], .UpsellPage.--birthday-male[_ngcontent-%COMP%]   .UpsellPage__CarouselTitle[_ngcontent-%COMP%], .UpsellPage.--birthday-female[_ngcontent-%COMP%]   .UpsellPage__CarouselTitle[_ngcontent-%COMP%]{font-size:18px;margin-bottom:14px}@media (min-width: 992px){.UpsellPage.--birthday[_ngcontent-%COMP%]   .UpsellPage__CarouselTitle[_ngcontent-%COMP%], .UpsellPage.--birthday-male[_ngcontent-%COMP%]   .UpsellPage__CarouselTitle[_ngcontent-%COMP%], .UpsellPage.--birthday-female[_ngcontent-%COMP%]   .UpsellPage__CarouselTitle[_ngcontent-%COMP%]{width:50%;font-size:20px;margin-bottom:16px}}.UpsellPage.--birthday[_ngcontent-%COMP%]   .UpsellPage__Title[_ngcontent-%COMP%], .UpsellPage.--birthday[_ngcontent-%COMP%]   .UpsellPage__CarouselTitle[_ngcontent-%COMP%], .UpsellPage.--birthday-male[_ngcontent-%COMP%]   .UpsellPage__Title[_ngcontent-%COMP%], .UpsellPage.--birthday-male[_ngcontent-%COMP%]   .UpsellPage__CarouselTitle[_ngcontent-%COMP%], .UpsellPage.--birthday-female[_ngcontent-%COMP%]   .UpsellPage__Title[_ngcontent-%COMP%], .UpsellPage.--birthday-female[_ngcontent-%COMP%]   .UpsellPage__CarouselTitle[_ngcontent-%COMP%]{background:#DBE9FF;color:#001e75}.UpsellPage.--birthday[_ngcontent-%COMP%]   .UpsellPage__CarouselContainer[_ngcontent-%COMP%]:first-of-type, .UpsellPage.--birthday-male[_ngcontent-%COMP%]   .UpsellPage__CarouselContainer[_ngcontent-%COMP%]:first-of-type, .UpsellPage.--birthday-female[_ngcontent-%COMP%]   .UpsellPage__CarouselContainer[_ngcontent-%COMP%]:first-of-type{background-color:#dbe9ff;padding:0 0 0 16px}@media (min-width: 992px){.UpsellPage.--birthday[_ngcontent-%COMP%]   .UpsellPage__CarouselContainer[_ngcontent-%COMP%]:first-of-type, .UpsellPage.--birthday-male[_ngcontent-%COMP%]   .UpsellPage__CarouselContainer[_ngcontent-%COMP%]:first-of-type, .UpsellPage.--birthday-female[_ngcontent-%COMP%]   .UpsellPage__CarouselContainer[_ngcontent-%COMP%]:first-of-type{padding:0 0 0 24px;margin-bottom:8px}}@media (min-width: 992px){.UpsellPage.--birthday[_ngcontent-%COMP%]   .UpsellPage__CarouselContainer[_ngcontent-%COMP%]:first-of-type:after, .UpsellPage.--birthday-male[_ngcontent-%COMP%]   .UpsellPage__CarouselContainer[_ngcontent-%COMP%]:first-of-type:after, .UpsellPage.--birthday-female[_ngcontent-%COMP%]   .UpsellPage__CarouselContainer[_ngcontent-%COMP%]:first-of-type:after{content:"";position:absolute;top:-64px;right:0;width:450px;height:230px;z-index:-1;background:url(https://images-fe.thortful.com/img/occasions/birthday-blue-bg-shape-desktop.png) no-repeat center;background-size:450px 230px}}@media (min-width: 769px){.UpsellPage.--birth
1day[_ngcontent-%COMP%]   .UpsellPage__CarouselContainer[_ngcontent-%COMP%]:first-of-type:after, .UpsellPage.--birthday-male[_ngcontent-%COMP%]   .UpsellPage__CarouselContainer[_ngcontent-%COMP%]:first-of-type:after, .UpsellPage.--birthday-female[_ngcontent-%COMP%]   .UpsellPage__CarouselContainer[_ngcontent-%COMP%]:first-of-type:after{width:400px;height:200px;background-size:400px 200px}}.UpsellPage.--mothers-day[_ngcontent-%COMP%]{padding:0 0 8px;background-color:#fff7eb}@media (min-width: 769px){.UpsellPage.--mothers-day[_ngcontent-%COMP%]{max-width:100%}}@media (min-width: 992px){.UpsellPage.--mothers-day[_ngcontent-%COMP%]{max-width:100%}}@media (min-width: 1200px){.UpsellPage.--mothers-day[_ngcontent-%COMP%]{max-width:100%}}@media (min-width: 992px){.UpsellPage.--mothers-day[_ngcontent-%COMP%]{padding:0 0 24px}}.UpsellPage.--mothers-day[_ngcontent-%COMP%]{background:url(https://images-fe.thortful.com/img/occasions/mothers-day-flower-lilac.png) top 32px right 32px no-repeat,#FFF7EB;background-size:25px 25px}.UpsellPage.--mothers-day[_ngcontent-%COMP%]   .UpsellPage__Title[_ngcontent-%COMP%]{background:#001E75;padding:24px 16px 8px;margin-bottom:0;color:#fff}@media (min-width: 992px){.UpsellPage.--mothers-day[_ngcontent-%COMP%]   .UpsellPage__Title[_ngcontent-%COMP%]{background-color:#001e75;padding:24px 16px 8px 24px;font-size:32px}}.UpsellPage.--mothers-day[_ngcontent-%COMP%]   .UpsellPage__CarouselContainer[_ngcontent-%COMP%]{height:100%;margin-bottom:0;padding:16px 0 0 16px;position:relative;z-index:0}@media (min-width: 992px){.UpsellPage.--mothers-day[_ngcontent-%COMP%]   .UpsellPage__CarouselContainer[_ngcontent-%COMP%]{padding:8px 0 0 24px}}.UpsellPage.--mothers-day[_ngcontent-%COMP%]   .UpsellPage__CarouselContainer[_ngcontent-%COMP%]:first-of-type{background-color:#001e75;padding:0 0 8px 16px;color:#fff}@media (min-width: 992px){.UpsellPage.--mothers-day[_ngcontent-%COMP%]   .UpsellPage__CarouselContainer[_ngcontent-%COMP%]:first-of-type{padding:0 0 16px 24px;margin-bottom:8px}}.UpsellPage.--mothers-day[_ngcontent-%COMP%]   .UpsellPage__CarouselTitle[_ngcontent-%COMP%]{font-size:18px;margin-bottom:14px}@media (min-width: 992px){.UpsellPage.--mothers-day[_ngcontent-%COMP%]   .UpsellPage__CarouselTitle[_ngcontent-%COMP%]{width:50%;font-size:20px;margin-bottom:16px}}@media (min-width: 992px){.UpsellPage.--mothers-day[_ngcontent-%COMP%]{background:url(https://images-fe.thortful.com/img/occasions/mothers-day-flower-lilac.png) top -8px right calc(100% * .5) no-repeat,url(https://images-fe.thortful.com/img/occasions/mothers-day-flower-lilac.png) right 48px top 32px no-repeat,#FFF7EB}}.UpsellPage.--mothers-day[_ngcontent-%COMP%]   .UpsellPage__Title[_ngcontent-%COMP%], .UpsellPage.--mothers-day[_ngcontent-%COMP%]   .UpsellPage__CarouselTitle[_ngcontent-%COMP%]{color:#001e75;background:transparent}.UpsellPage.--mothers-day[_ngcontent-%COMP%]   .UpsellPage__CarouselContainer[_ngcontent-%COMP%]:first-of-type{padding:0 0 0 16px;background:transparent}@media (min-width: 992px){.UpsellPage.--mothers-day[_ngcontent-%COMP%]   .UpsellPage__CarouselContainer[_ngcontent-%COMP%]:first-of-type{padding:0 0 0 24px;margin-bottom:8px}}.UpsellPage.--mothers-day[_ngcontent-%COMP%]   .UpsellPage__CarouselContainer[_ngcontent-%COMP%]:nth-child(2){background:url(https://images-fe.thortful.com/img/occasions/mothers-day-flower-lilac.png) top 16px right 8px no-repeat;background-size:25px 25px}@media (min-width: 992px){.UpsellPage.--mothers-day[_ngcontent-%COMP%]   .UpsellPage__CarouselContainer[_ngcontent-%COMP%]:nth-child(2){background:url(https://images-fe.thortful.com/img/occasions/mothers-day-flower-lilac.png) top right calc(100% * 1/3) no-repeat,url(https://images-fe.thortful.com/img/occasions/mothers-day-flower-lilac.png) top calc(.5 * 50%) left no-repeat}}.UpsellPage__Checkbox[_ngcontent-%COMP%]{margin-bottom:16px;padding:0 20px}@media (min-width: 769px){.UpsellPage__Checkbox[_ngcontent-%COMP%]{padding:0}}.UpsellPage__SkipGiftsButton[_ngcontent-%COMP%]{position:absolute;width:128px;height:40px;right:0;top:70px}.UpsellPage__SkipGiftsButton[_ngcontent-%COMP%]   button[_ngcontent-%COMP%]{height:100%;width:100%;border:1px solid #ff6900;background:#fff;color:#ff6900;border-radius:4px;cursor:pointer;font-weight:700;font-size:16px}.UpsellPage__Title[_ngcontent-%COMP%]{font-size:24px;font-weight:bold;margin-bottom:12px}.UpsellPage__CarouselContainer[_ngcontent-%COMP%]{margin-bottom:32px;height:370px}@media (min-width: 992px){.UpsellPage__CarouselContainer[_ngcontent-%COMP%]{height:400px}}.UpsellPage__CarouselTitle[_ngcontent-%COMP%]{font-size:20px;font-weight:700;margin-bottom:12px}.UpsellPage__ButtonsContainerSticky[_ngcontent-%COMP%]{position:sticky;bottom:0;background-color:#fff;z-index:1;display:-webkit-box;display:-ms-flexbox;display:flex;width:100%;-webkit-box-shadow:4px 0px 10px rgba(0,0,0,.25);box-shadow:4px 0 10px #00000040;padding:16px 0;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.UpsellPage__ButtonsContainerSticky.hide-sticky-btn[_ngcontent-%COMP%]{opacity:0}
1.UpsellPage__ButtonsContainerSticky.display-sticky-btn[_ngcontent-%COMP%]{-webkit-transition:opacity .2s ease-out;transition:opacity .2s ease-out;opacity:1}.UpsellPage__ButtonsContainerSticky[_ngcontent-%COMP%]   button.outline-button[_ngcontent-%COMP%]{border:1px solid #ff6900;background:#ffffff;color:#ff6900;border-radius:4px;cursor:pointer;font-weight:700;font-size:16px}.UpsellPage__ButtonsContainerSticky[_ngcontent-%COMP%]   button.outline-button[_ngcontent-%COMP%]:hover{background:#ff6900;color:#fff}.UpsellPage__ProceedToBasket[_ngcontent-%COMP%], .UpsellPage__ShowMoreGifts[_ngcontent-%COMP%]{margin-bottom:10px;width:320px;height:50px}.Footer[_ngcontent-%COMP%]{background-color:#54668e}.Footer__Container[_ngcontent-%COMP%]{text-align:center;height:128px}@media (min-width: 992px){.Footer__Container[_ngcontent-%COMP%]{text-align:left;height:70px;padding:16px 0}}.Footer__Container[_ngcontent-%COMP%]   img[_ngcontent-%COMP%]{width:114px;margin:25px 0 5px}@media (min-width: 992px){.Footer__Container[_ngcontent-%COMP%]   img[_ngcontent-%COMP%]{margin:0 0 -6px}}.Footer__Container[_ngcontent-%COMP%]   p[_ngcontent-%COMP%]{color:#fff;font:normal 12px "Roboto";font-weight:300;margin-bottom:10px}.Footer__Container[_ngcontent-%COMP%]   p.version[_ngcontent-%COMP%]{font:normal 8px "Roboto";font-weight:300;margin:0}@media (min-width: 992px){.Footer__Container[_ngcontent-%COMP%]   p[_ngcontent-%COMP%]{display:inline;margin:0 12px 0 -12px}}']}),e}(),rn=l(22958),on=l(18933),ln=l(47052),cn=l(43354),sn=function(){var n,i=function(n){function i(){return u(this,i),t(this,i,arguments)}return o(i,n),f(i,[{key:"ngOnDestroy",value:function(){this.redirectSubscription&&this.redirectSubscription.unsubscribe()}},{key:"proceedToBasket",value:function(){return(0,g.mG)(this,void 0,void 0,c().mark(function t(){var n,i,a,r=this;return c().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return this.loadingTextCustomisation=!0,t.next=3,this.productOutOfStock.pipe((0,v.q)(1)).toPromise();case 3:if(n=t.sent,i=this.card.pipe((0,v.q)(1)),a=this.selectedVariation.pipe((0,v.q)(1)),!n&&!this.lineLimitExceeded){t.next=10;break}this.loadingTextCustomisation=!1,t.next=13;break;case 10:return t.next=12,this.addToBasket();case 12:this.redirectSubscription=(0,m.aj)([i,a]).subscribe(function(t){var n=e(t,2),i=n[0],a=n[1];r.loadingTextCustomisation=!1,r.router.navigate("A5"===a.format?["card/"+i.id+"/gift/"+r.itemBasketId]:["/basket"])});case 13:case"end":return t.stop()}},t,this)}))}},{key:"addToBasket",value:function(){return(0,g.mG)(this,void 0,void 0,c().mark(function t(){var n,i,a,r,o=this;return c().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.productOutOfStock.pipe((0,v.q)(1)).toPromise();case 2:if(!t.sent){t.next=4;break}return t.abrupt("return");case 4:return n=this.card.pipe((0,v.q)(1)),i=this.selectedVariation.pipe((0,v.q)(1)),a=this.selectedOption.pipe((0,v.q)(1)),t.next=7,this.thorText.updateInnerBackText();case 7:return r=this.customisation.pipe((0,x.j)("text_customisation_request")),t.abrupt("return",(0,m.aj)([n,r,i,a]).pipe((0,v.q)(1)).pipe((0,C.w)(function(t){var n=e(t,4),i=n[0].card,a=n[1],r=n[2],l=n[3];return(0,g.mG)(o,void 0,void 0,c().mark(function e(){var t=this;return c().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,this.basketService.addToBasket(Object.assign(Object.assign({},i),{format:r.format,inner_back:{text_customisation_request:a},gift_relevance_criteria:this.giftRelevanceCriteria}),"CART_ADD_SV",r.format,l?[l]:[]).then(function(e){return t.itemBasketId=e.basket_items[e.basket_items.length-1].id});case 3:this.shareDataService.trigger("basketUpdate"),this.notificationService.success("Successfully added to basket!"),e.next=10;break;case 7:e.prev=7,e.t0=e.catch(0),this.notificationService.error("Something went wrong!");case 10:case"end":return e.stop()}},e,this,[[0,7]])}))})).toPromise());case 9:case"end":return t.stop()}},t,this)}))}}])}(ln.W);return i.\u0275fac=function(e){return(n||(n=O.\u0275\u0275getInheritedFactory(i)))(e||i)},i.\u0275cmp=O.\u0275\u0275defineComponent({type:i,selectors:[["ng-component"]],features:[O.\u0275\u0275ProvidersFeature([P.g]),O.\u0275\u0275InheritDefinitionFeature],decls:11,vars:11,consts:[[1,"content"],[1,"Breadcrumbs"],[3,"segments"],[1,"ProductCustomisationPage"],[3,"hideUpdateButton","showMessage","currentSettings","onTextConfirm","onLineLimit"],[1,"ProductCustomisationPage__Buttons"],[1,"ProductCustomisationPage__Button","primary-button",3,"disabled","click"]],template:function(e,t){1&e&&(O.\u0275\u0275elementStart(0,"div",0),O.\u0275\u0275elementStart(1,"div",1),O.\u0275\u0275element(2,"thor-breadcrumbs",2),O.\u0275\u0275pipe(3,"async"),O.\u0275\u0275elementEnd(),O.\u0275\u0275elementStart(4,"div",3),O.\u0275\u0275elementStart(5,"thor-text",4),O.\u0275\u0275listener("onTextConfirm",function(e){return t.updateCustomisation(e)})("onLineLimit",function(e){return t.setLineLimitExceeded(e)}),O.\u0275\u0275pipe(6,"async"),O.\u0275\u0275elementStart(7,"div",5),O.\u0275\u0275elementStart(8,"button",6),O.\u0275\u0275listener("click",function(){return t.proceedToBasket()}),O.\u0275\u0275pipe(9,"async"),O.\u0275\u0275text(10,"Add to basket"),O.\u0275\u0275elementEnd(),O.\u0275\u0275elementEnd(),O.\u0275\u0275elementEnd(),O.\u0275\u0275elementEnd(),O.\u0275\u0275elementEnd()),2&e&&(O.\u0275\u0275advance(2),O.\u0275\u0275property("segments",O.\u0275\u0275pipeBind1(3,5,t.breadcrumbSegments)),O.\u0275\u0275advance(3),O.\u0275\u0275property("hideUpd
1ateButton",!0)("showMessage",!0)("currentSettings",O.\u0275\u0275pipeBind1(6,7,t.currentSettings)),O.\u0275\u0275advance(3),O.\u0275\u0275property("disabled",O.\u0275\u0275pipeBind1(9,9,t.productOutOfStock)||t.lineLimitExceeded||t.loadingTextCustomisation))},directives:[I.n,cn.V],pipes:[E.Ov],styles:[".Breadcrumbs[_ngcontent-%COMP%]{padding:10px 4px}@media (max-width: 768px){.Breadcrumbs[_ngcontent-%COMP%]{padding:0 14px}}.ProductCustomisationPage[_ngcontent-%COMP%]{padding:22px}.ProductCustomisationPage__Buttons[_ngcontent-%COMP%]{display:-webkit-box;display:-ms-flexbox;display:flex;width:100%;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column}@media (max-width: 768px){.ProductCustomisationPage[_ngcontent-%COMP%]     .sm.title.center{text-align:left}}.primary-button[_ngcontent-%COMP%]{width:100%;height:44px;border-radius:6px;font-size:16px;font-weight:800;color:#fff;border:none;background-color:#fd5825}.primary-button[_ngcontent-%COMP%]:disabled{opacity:.5;cursor:not-allowed}"]}),i}(),dn=l(57965),pn=l(35665);function un(e,t){if(1&e){var n=O.\u0275\u0275getCurrentView();O.\u0275\u0275elementStart(0,"primary-button",26),O.\u0275\u0275listener("click",function(){var e=O.\u0275\u0275restoreView(n).ngIf,t=O.\u0275\u0275nextContext(2).ngIf;return O.\u0275\u0275nextContext().addToBasket(t,null==e.data?null:e.data.gift_relevance_criteria)}),O.\u0275\u0275text(1,"Add gift"),O.\u0275\u0275elementEnd()}if(2&e){var i=O.\u0275\u0275nextContext(2).ngIf;O.\u0275\u0275property("disabled",!(i.stock>0))}}function gn(e,t){1&e&&(O.\u0275\u0275elementStart(0,"div",27),O.\u0275\u0275text(1,"Unfortunately we are out of stock."),O.\u0275\u0275elementEnd())}var fn=function(e){return{data:e}};function mn(e,t){if(1&e){var n=O.\u0275\u0275getCurrentView();O.\u0275\u0275elementStart(0,"div",15),O.\u0275\u0275elementStart(1,"div",16),O.\u0275\u0275elementStart(2,"h5",17),O.\u0275\u0275text(3),O.\u0275\u0275elementEnd(),O.\u0275\u0275elementEnd(),O.\u0275\u0275elementStart(4,"div",18),O.\u0275\u0275elementStart(5,"h6",19),O.\u0275\u0275text(6),O.\u0275\u0275elementEnd(),O.\u0275\u0275elementEnd(),O.\u0275\u0275elementStart(7,"div",20),O.\u0275\u0275elementStart(8,"div",21),O.\u0275\u0275listener("click",function(e){return O.\u0275\u0275restoreView(n),O.\u0275\u0275nextContext(2).trackSubtitleClicked(e)}),O.\u0275\u0275element(9,"markdown",22),O.\u0275\u0275elementEnd(),O.\u0275\u0275elementEnd(),O.\u0275\u0275elementStart(10,"div",23),O.\u0275\u0275template(11,un,2,1,"primary-button",24),O.\u0275\u0275pipe(12,"async"),O.\u0275\u0275elementEnd(),O.\u0275\u0275template(13,gn,2,0,"div",25),O.\u0275\u0275elementEnd()}if(2&e){var i=O.\u0275\u0275nextContext().ngIf,a=O.\u0275\u0275nextContext();O.\u0275\u0275advance(3),O.\u0275\u0275textInterpolate(i.name),O.\u0275\u0275advance(3),O.\u0275\u0275textInterpolate1("\xa3",i.cost,""),O.\u0275\u0275advance(3),O.\u0275\u0275property("raw",i.subtitle),O.\u0275\u0275advance(2),O.\u0275\u0275property("ngIf",O.\u0275\u0275pureFunction1(7,fn,O.\u0275\u0275pipeBind1(12,5,a.$preBasketGiftUpsellData))),O.\u0275\u0275advance(2),O.\u0275\u0275property("ngIf",!(i.stock>0))}}function hn(e,t){if(1&e){var n=O.\u0275\u0275getCurrentView();O.\u0275\u0275elementStart(0,"primary-button",26),O.\u0275\u0275listener("click",function(){var e=O.\u0275\u0275restoreView(n).ngIf,t=O.\u0275\u0275nextContext(2).ngIf;return O.\u0275\u0275nextContext().addToBasket(t,null==e.data?null:e.data.gift_relevance_criteria)}),O.\u0275\u0275text(1,"Add gift"),O.\u0275\u0275elementEnd()}if(2&e){var i=O.\u0275\u0275nextContext(2).ngIf;O.\u0275\u0275property("disabled",!(i.stock>0))}}function vn(e,t){1&e&&(O.\u0275\u0275elementStart(0,"div",27),O.\u0275\u0275text(1,"Unfortunately we are out of stock. "),O.\u0275\u0275elementEnd())}function Cn(e,t){if(1&e){var n=O.\u0275\u0275getCurrentView();O.\u0275\u0275elementStart(0,"div",28),O.\u0275\u0275elementStart(1,"div",29),O.\u0275\u0275elementStart(2,"div",16),O.\u0275\u0275elementStart(3,"h5",17),O.\u0275\u0275text(4),O.\u0275\u0275elementEnd(),O.\u0275\u0275elementEnd(),O.\u0275\u0275elementEnd(),O.\u0275\u0275elementStart(5,"div",29),O.\u0275\u0275elementStart(6,"div",18),O.\u0275\u0275elementStart(7,"h6",19),O.\u0275\u0275text(8),O.\u0275\u0275elementEnd(),O.\u0275\u0275elementEnd(),O.\u0275\u0275elementEnd(),O.\u0275\u0275elementStart(9,"div",30),O.\u0275\u0275elementStart(10,"div",21),O.\u0275\u0275listener("click",function(e){return O.\u0275\u0275restoreView(n),O.\u0275\u0275nextContext(2).trackSubtitleClicked(e)}),O.\u0275\u0275element(11,"markdown",22),O.\u0275\u0275elementEnd(),O.\u0275\u0275elementEnd(),O.\u0275\u0275elementStart(12,"div",23),O.\u0275\u0275template(13,hn,2,1,"primary-button",24),O.\u0275\u0275pipe(14,"async"),O.\u0275\u0275elementEnd(),O.\u0275\u0275template(15,vn,2,0,"div",25),O.\u0275\u0275elementEnd()}if(2&e){var i=O.\u0275\u0275nextContext().ngIf,a=O.\u0275\u0275nextContext();O.\u0275\u0275advance(4),O.\u0275\u0275textInterpolate(i.name),O.\u0275\u0275advance(4),O.\u0275\u0275textInterpolate1("\xa3",i.cost,""),O.\u0275\u0275advance(3),O.\u0275\u0275property("raw",i.subtitle),O.\u0275\u0275advance(2),O.\u0275\u0275property("ngIf",O.\u0275\u0275pureFunction1(7,fn,O.\u0275\u0275pipeBind1(14,5,a.$preBasketGiftUpsellData))),O.\u0275\u0275advance(2),O.\u0275\u0275property("ngIf",!(i.stock>0))}}function _n(e,t){if(1&e&&(O.\u0275\u0275elementStart(0,"div",3),O.\u0275\u0275elementStart(1,"div",4),O.\u0275\u0275elementStart(2,"div",5),O.\u0275\u0275elementStart(3,"div",6),O.\u0275\u0275elementStart(4,"div",7),O.\u0275\u0275element(5,"product-gallery",8),O.\u0275\u0275pipe(6,"async"),O.\u0275\u0275elementEnd(),O.\u0275\u0275elementEnd(),O.\u0275\u0275elementEnd(),O.\u0275\u0275elementStart(7,"div",9),O.\u0275\u0275template(8,mn,14,9,"div",10),O.\u0275\u0275elementStart(9,"div",11),O.\u0275\u0275template(10,Cn,16,9,"div",12),O.\u0275\u0275elementEnd(),O.\u0275\u0275elementStart(11,"div",13),O.\u0275\u0275element(12,"cms-content",14),O.\u0275\u0275elementEnd(),O.\u0275\u0275elementEnd(),O.\u0275\u0275elementEnd(),O.\u0275\u0275elementEnd()),2&e){var n=t.ngIf,i=O.\u0275\u0275nextContext();O.\u0275\u0275advance(5),O.\u0275\u0275property("inStock",n.stock>0)("slides",O.\u0275\u0275pipeBind1(6,12,i.slides))("orientation","PORTRAIT")("outerImage",n.image.image)("innerImage","gift.image.image")("displayThumnails",i.isDesktop())("displayInfoButton",!0)("alt",n.subtitle)("displayDotsApart",!0),O.\u0275\u0275advance(3),O.\u0275\u0275property("ngIf",i.isDesktop()),O.\u0275\u0275advance(2),O.\u0275\u0275property("ngIf",!i.isDesktop()),O.\u0275\u0275advance(2),O.\u0275\u0275property("contentId",n.id)}}var xn=function(){var t=function(){return f(function t(n,i,a,r,o,l,c,d,p,g,f,v,C,x){var P=this;u(this,t),this.location=n,this.headerService=i,this.footerService=a,this.route=r,this.remoteConfigService=o,this.router=l,this.basketService=c,this.SegmentService=d,this.notificationService=p,this.Endpoint=g,this.Api=f,this.GeneralUtils=v,this.printerFormatsService=C,this.Store=x,this.closeOverlay=new O.EventEmitter,this.allGifts=this.remoteConfigService.cardVariationOptions,this.selectedGiftId=this.route.paramMap.pipe((0,_.U)(function(e){return e.get("giftId")})),this.selectedGift=(0,m.aj)([this.allGifts,this.selectedGiftId]).pipe((0,_.U)(function(t){var n,i,a,r=e(t,2),o=r[0],l=r[1],c=o.find(function(e){return e.id===l});return{id:c.id,name:c.name,subtitle:c.subtitle,format:c.printer_format,image:null===(a=null===(i=null===(n=c.product_assets)||void 0===n?void 0:n.find(function(e){return"gifting"===e.name}))||void 0===i?void 0:i.images)||void 0===a?void 0:a[0],images:c.product_assets,cost:c.cost&&!P.printerFormatsService.isProductStandalone(c.printer_format)?(parseFloat(c.cost)-y.g.Price).toFixed(2).toString():c.cost,stock:c.stock,variationId:c.card_variation_id,item_options:[c]}})),this.slides=this.selectedGift.pipe((0,_.U)(function(e){var t=e.images.filter(function(e){return e.name.startsWith("carousel")});return[{images:[e.image]}].concat(s(t)).map(function(e){return{type:dn.v.WithoutCard,outerImage:"",innerImage:"",cardPositions:[{x:0,y:0,width:0,height:0,rotation:0}],showExclusive:!1,background:e.images[0].image}})})),this.Store.select("featureFlag","config","WAL-280").pipe((0,h.P)(function(e){return"boolean"==typeof e})).subscribe(function(e){var t;P.$preBasketGiftUpsellData=(t=P.Api.request("".concat(P.Endpoint.preBasketGiftUpsell).concat(e?P.route.snapshot.data.card.id:P.route.snapshot.params.cardId),void 0,!0)).pipe.apply(t,s(vt(P.router)))})},[{key:"ngOnDestroy",value:function(){document.body.style.overflowY=""}},{key:"ngOnInit",value:function(){return(0,g.mG)(this,void 0,void 0,c().mark(function e(){return c().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:document.body.style.overflowY="hidden",this.printerFormatsService.getStandaloneFormats();case 1:case"end":return e.stop()}},e,this)}))}},{key:"addToBasket",value:function(e,t){return(0,g.mG)(this,void 0,void 0,c().mark(function n(){return c().wrap(function(n){for(;;)switch(n.prev=n.next){case 0:this.printerFormatsService.isProductStandalone(e.format)?this.addStandaloneProductToBasket(e,t):this.addGiftToCard(e,t);case 1:case"end":return n.stop()}},n,this)}))}},{key:"addGiftToCard",value:function(e,t){var n=this;e.stock>0&&this.basketService.updateCardsBasket(e,["format","item_options"],this.route.
1snapshot.params.basketItemId).then(function(){n.trackGiftUpsellProductAdded(e,"gift",t),n.notificationService.success("Successfully added to basket!"),n.router.navigate(["/basket"])})}},{key:"addStandaloneProductToBasket",value:function(e,t){var n=this;e.stock>0&&this.GeneralUtils.getDummyCard().then(function(i){n.basketService.addToBasket(Object.assign(Object.assign({},i),{format:e.format}),"CART_ADD_LV",e.format,[e]).then(function(i){i&&(n.trackGiftUpsellProductAdded(e,"card_pack",t),n.notificationService.success("Successfully added to basket!"),n.router.navigate(["/basket"]))})})}},{key:"trackGiftUpsellProductAdded",value:function(e,t,n){var i,a;this.SegmentService.track((0,ut.AG)(["gift_name",e.name],["gift_price",null===(i=e.cost)||void 0===i?void 0:i.value],["product_format",e.format],["product_id",e.id],["product_image",null===(a=e.images)||void 0===a?void 0:a.gifting],["button_location","MODAL"],["gift_relevance_criteria",n],["product_type",t]))}},{key:"isDesktop",value:function(){return window.innerWidth>769}},{key:"goBack",value:function(){this.location.back()}},{key:"trackSubtitleClicked",value:function(e){var t,n,i=e.target;"A"===(null===(n=null===(t=i)||void 0===t?void 0:t.nodeName)||void 0===n?void 0:n.toLocaleUpperCase())&&this.SegmentService.trackCustom({name:"External Link Clicked",data:{destination_url:i.href}})}}])}();return t.\u0275fac=function(e){return new(e||t)(O.\u0275\u0275directiveInject(E.Ye),O.\u0275\u0275directiveInject(xt.o),O.\u0275\u0275directiveInject(Pt.q),O.\u0275\u0275directiveInject(p.gz),O.\u0275\u0275directiveInject(_t.y),O.\u0275\u0275directiveInject(p.F0),O.\u0275\u0275directiveInject(Pe.v),O.\u0275\u0275directiveInject(M.BP),O.\u0275\u0275directiveInject(ye.P),O.\u0275\u0275directiveInject(kt.F),O.\u0275\u0275directiveInject(yt.V),O.\u0275\u0275directiveInject(Ct.w),O.\u0275\u0275directiveInject(Gt.t),O.\u0275\u0275directiveInject(F.yh))},t.\u0275cmp=O.\u0275\u0275defineComponent({type:t,selectors:[["gift-details-page"]],outputs:{closeOverlay:"closeOverlay"},decls:4,vars:3,consts:[[1,"GiftDetailsPage"],["imgSrc","/img/action/cancel.svg",1,"GiftDetailsPage__Back",3,"click"],["class","PageLayout__Content",4,"ngIf"],[1,"PageLayout__Content"],[1,"SplitView","PageLayout__Hero"],[1,"SplitView__View","SplitView__View--big"],[1,"PageLayout__GalleryContainer"],[1,"PageLayout__Gallery"],[3,"inStock","slides","orientation","outerImage","innerImage","displayThumnails","displayInfoButton","alt","displayDotsApart"],[1,"SplitView__View","SplitView__View--small","SplitView__View--contain"],["class","PageLayout__VariationDetails",4,"ngIf"],[1,"PageLayout__ProductCTA"],["class","PageLayout__ProductCTA__Content",4,"ngIf"],[1,"PageLayout__Description"],["pageType","PAGE_ACCORDION",3,"contentId"],[1,"PageLayout__VariationDetails"],[1,"PageLayout__Variation"],[1,"NewCardPage__VariationName"],[1,"PageLayout__Price"],[1,"NewCardPage__Price"],[1,"PageLayout__Variationgift"],[1,"NewCardPage__giftName",3,"click"],[3,"raw"],[1,"PageLayout__button"],[3,"disabled","click",4,"ngIf"],["class","PageLayout__oos",4,"ngIf"],[3,"disabled","click"],[1,"PageLayout__oos"],[1,"PageLayout__ProductCTA__Content"],[1,"PageLayout__Row"],[1,"PageLayout__giftName"]],template:function(e,t){1&e&&(O.\u0275\u0275elementStart(0,"div",0),O.\u0275\u0275elementStart(1,"img",1),O.\u0275\u0275listener("click",function(){return t.goBack()}),O.\u0275\u0275elementEnd(),O.\u0275\u0275template(2,_n,13,14,"div",2),O.\u0275\u0275pipe(3,"async"),O.\u0275\u0275elementEnd()),2&e&&(O.\u0275\u0275advance(2),O.\u0275\u0275property("ngIf",O.\u0275\u0275pipeBind1(3,1,t.selectedGift)))},directives:[M.t1,E.O5,U.g,me.p,pn.l,Ve.K],pipes:[E.Ov],styles:[".GiftDetailsPage[_ngcontent-%COMP%]{position:fixed;top:0;right:0;bottom:0;left:0;z-index:1;background:#FFFFFF;overflow-y:auto}.GiftDetailsPage__Back[_ngcontent-%COMP%]{position:absolute;display:block;top:0;right:0;width:20px;height:20px;padding:25px;-webkit-box-sizing:content-box;box-sizing:content-box;margin-left:auto;z-index:5;cursor:pointer;-webkit-filter:invert(100%);filter:invert(100%)}.GiftDetailsPage__Container[_ngcontent-%COMP%]{padding:70px 27px;height:100%}@media (min-width: 769px){.GiftDetailsPage__Container[_ngcontent-%COMP%]{padding:70px 60px}}.PageLayout__button[_ngcontent-%COMP%]{margin-top:16px}.PageLayout__Content[_ngcontent-%COMP%]{max-width:1200px;margin:7% auto auto}@media (min-width: 769px){.PageLayout__Content[_ngcontent-%COMP%]{padding:0 22px}}.PageLayout__oos[_ngcontent-%COMP%]{margin-top:16px;font-family:Roboto;font-size:14px}@media (max-width: 768px){.PageLayout__oos[_ngcontent-%COMP%]{font-size:14px}}.PageLayout__Hero[_ngcontent-%COMP%]{margin-top:13px}.PageLayout__Row[_ngcontent-%COMP%]{display:-webkit-box;display:-ms-flexbox;display:flex}.PageLayout__Row[_ngcontent-%COMP%]   h5[_ngcontent-%COMP%], .PageLayout__Row[_ngcontent-%COMP%]   h6[_ngcontent-%COMP%]{font-size:16px}
1@media (min-width: 769px){.PageLayout__VariationDetails[_ngcontent-%COMP%]{min-height:175px}}.PageLayout__Variation[_ngcontent-%COMP%]{-webkit-box-flex:1;-ms-flex-positive:1;flex-grow:1}@media (max-width: 768px){.PageLayout__ProductCTA[_ngcontent-%COMP%]{min-height:175px;margin-bottom:16px}}@media (max-width: 768px){.PageLayout__ProductCTA__Content[_ngcontent-%COMP%]{padding:16px 28px 0}}.PageLayout__Description[_ngcontent-%COMP%]{margin-top:25px;margin-bottom:43px}@media (min-width: 769px){.PageLayout__Description[_ngcontent-%COMP%]{margin-bottom:0}}@media (max-width: 768px){.PageLayout__Description[_ngcontent-%COMP%]{padding:0 28px}}.PageLayout__GalleryContainer[_ngcontent-%COMP%]{top:226px;-webkit-transition:top .3s;transition:top .3s}@media (max-width: 768px){.PageLayout.__GalleryContainer[_ngcontent-%COMP%]{padding:0 28px}.PageLayout__Gallery[_ngcontent-%COMP%]{margin-top:40px;padding:0 28px}}.SplitView[_ngcontent-%COMP%]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between}@media (max-width: 768px){.SplitView[_ngcontent-%COMP%]{-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column}}.SplitView__View[_ngcontent-%COMP%]{-webkit-box-flex:0;-ms-flex-positive:0;flex-grow:0;-ms-flex-negative:0;flex-shrink:0;-ms-flex-preferred-size:calc(50% - 45px / 2);flex-basis:calc(50% - 45px / 2)}@media (min-width: 989px){.SplitView__View--big[_ngcontent-%COMP%]{-ms-flex-preferred-size:calc(60% - 45px / 2);flex-basis:calc(60% - 45px / 2)}.SplitView__View--small[_ngcontent-%COMP%]{-ms-flex-preferred-size:calc(40% - 45px / 2);flex-basis:calc(40% - 45px / 2)}}.SplitView__View--contain[_ngcontent-%COMP%]{overflow:none}@media (min-width: 768px){.SplitView__View--contain[_ngcontent-%COMP%]{overflow:hidden}.SplitView__View--small[_ngcontent-%COMP%]{margin-bottom:155px}}.SplitView[_ngcontent-%COMP%]   .ProductPageLayout__AddMessageButton[_ngcontent-%COMP%]{margin-bottom:13px}"]}),t}(),Pn=function(){var e=function(){return f(function e(t){u(this,e),this.router=t,this.isExperimentActive=(0,k.a$)("[W19.0] Add to basket from modal","Variation 1")},[{key:"canActivate",value:function(){return this.isExperimentActive&&JSON.parse(sessionStorage.getItem("gift_upsell_opt_out"))?(0,ft.of)(this.router.createUrlTree(["/basket"])):(0,ft.of)(!0)}}])}();return e.\u0275fac=function(t){return new(t||e)(O.\u0275\u0275inject(p.F0))},e.\u0275prov=O.\u0275\u0275defineInjectable({token:e,factory:e.\u0275fac}),e}(),bn=[{path:":cardId",children:[{path:"",component:st,children:[{component:dt.j,path:"options"}]},{component:an,path:"gift/:basketItemId",children:[{path:":giftId",component:xn}],canActivate:[Pn]},{component:sn,path:"customise"}],resolve:{card:rn.p},canActivate:[on.T]}],yn=function(){var e=f(function e(){u(this,e)});return e.\u0275fac=function(t){return new(t||e)},e.\u0275mod=O.\u0275\u0275defineNgModule({type:e}),e.\u0275inj=O.\u0275\u0275defineInjector({imports:[[p.Bz.forChild(bn)],p.Bz]}),e}(),kn=l(41779),wn=l(34741),On=function(){var e=f(function e(){u(this,e)});return e.\u0275fac=function(t){return new(t||e)},e.\u0275mod=O.\u0275\u0275defineNgModule({type:e}),e.\u0275inj=O.\u0275\u0275defineInjector({imports:[[E.ez,Rt.u5]]}),e}(),Mn=l(71695),Sn=function(){var e=f(function e(){u(this,e)});return e.\u0275fac=function(t){return new(t||e)},e.\u0275mod=O.\u0275\u0275defineNgModule({type:e}),e.\u0275inj=O.\u0275\u0275defineInjector({providers:[Pn],imports:[[yn,d.k,kn.P,wn.Cl,On,Mn.m]]}),e}()}}])}();

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.