1"use strict";(self.webpackChunkthor_app=self.webpackChunkthor_app||[]).push([[1229],{35149:function(e,t,n){n.d(t,{h:function(){return p}});var a=n(65594),i=n(62415),o=n(92674);const c=function(e){return{"-dark":e}};function r(e,t){if(1&e){const e=i.\u0275\u0275getCurrentView();i.\u0275\u0275elementContainerStart(0),i.\u0275\u0275elementStart(1,"div",1),i.\u0275\u0275elementStart(2,"div",2),i.\u0275\u0275listener("click",function(){return i.\u0275\u0275restoreView(e),i.\u0275\u0275nextContext().handleCloseIconClick()}),i.\u0275\u0275elementEnd(),i.\u0275\u0275projection(3),i.\u0275\u0275elementEnd(),i.\u0275\u0275elementStart(4,"div",3),i.\u0275\u0275listener("click",function(){return i.\u0275\u0275restoreView(e),i.\u0275\u0275nextContext().handleCloseIconClick()}),i.\u0275\u0275elementEnd(),i.\u0275\u0275elementContainerEnd()}if(2&e){const e=i.\u0275\u0275nextContext();i.\u0275\u0275advance(1),i.\u0275\u0275property("@modal",e.showAnimation),i.\u0275\u0275advance(1),i.\u0275\u0275property("ngClass",i.\u0275\u0275pureFunction1(3,c,e.dark)),i.\u0275\u0275advance(2),i.\u0275\u0275property("@overlay",void 0)}}const s=["*"];let p=(()=>{class e{constructor(){this.showModal=!0,this.dark=!1,this.closeClicked=new i.EventEmitter,this.showAnimation=!0}handleCloseIconClick(){this.showModal=!1,this.closeClicked.emit()}}return e.\u0275fac=function(t){return new(t||e)},e.\u0275cmp=i.\u0275\u0275defineComponent({type:e,selectors:[["app-modal"]],inputs:{showModal:"showModal",dark:"dark",showAnimation:"showAnimation"},outputs:{closeClicked:"closeClicked"},ngContentSelectors:s,decls:1,vars:1,consts:[[4,"ngIf"],[1,"modal-container"],[1,"mdi","mdi-close","close-icon",3,"ngClass","click"],[1,"modal-overlay",3,"click"]],template:function(e,t){1&e&&(i.\u0275\u0275projectionDef(),i.\u0275\u0275template(0,r,5,5,"ng-container",0)),2&e&&i.\u0275\u0275property("ngIf",t.showModal)},directives:[o.O5,o.mk],styles:[".modal-container[_ngcontent-%COMP%]{background:#ffffff;position:fixed;left:50%;top:50%;-webkit-transform:translate(-50%,-50%);transform:translate(-50%,-50%);z-index:9999;width:calc(100vw - 44px);max-height:calc(100vh - 44px);max-width:400px;display:-webkit-box;display:-ms-flexbox;display:flex}.modal-container[_ngcontent-%COMP%] .close-icon[_ngcontent-%COMP%]{position:absolute;right:10px;top:10px;color:#000;font-size:24px;cursor:pointer}.modal-container[_ngcontent-%COMP%] .close-icon.-dark[_ngcontent-%COMP%]{color:#fff}.subscription-modal[_nghost-%COMP%] .modal-container[_ngcontent-%COMP%]{max-width:761px;width:calc(100vw - 44px)}@media (max-width: 768px){.subscription-modal[_nghost-%COMP%] .modal-container[_ngcontent-%COMP%]{width:100vw;height:100vh;max-width:100%;max-height:100%;top:0;left:0;-webkit-transform:none;transform:none;border-radius:0}}.subscription-modal[_nghost-%COMP%] .close-icon[_ngcontent-%COMP%]{background:#F7EFE5;padding:2px}.modal-overlay[_ngcontent-%COMP%]{width:100vw;height:100vh;position:fixed;top:0;left:0;z-index:9998;background-color:#3b3b3b99}"],data:{animation:[(0,a.X$)("overlay",[(0,a.eR)(":enter",[(0,a.oB)({opacity:0}),(0,a.jt)(".3s ease-out")]),(0,a.eR)(":leave",[(0,a.jt)(".3s ease-out",(0,a.oB)({opacity:0}))])]),(0,a.X$)("modal",[(0,a.eR)("void => true",[(0,a.oB)({transform:"translate(-50%, 100%)"}),(0,a.jt)(".5s ease-out")])])]}}),e})()},61229:function(e,t,n){n.r(t),n.d(t,{FaceSwapModule:function(){return ve}});var a=n(92674),i=n(13074),o=n(85572),c=n(30105),r=n(8355),s=n(62415),p=n(70013);const l=["previewImage"];function d(e,t){1&e&&(s.\u0275\u0275elementStart(0,"div",4),s.\u0275\u0275element(1,"img",5),s.\u0275\u0275elementEnd()),2&e&&(s.\u0275\u0275advance(1),s.\u0275\u0275property("imgSrc","svg/loading-img.svg"))}let g=(()=>{class e{constructor(){this.imgSrc="",this.alt="",this.loading=!0}getCardPreviewElementRef(){return this.previewImage.nativeElement}}return e.\u0275fac=function(t){return new(t||e)},e.\u0275cmp=s.\u0275\u0275defineComponent({type:e,selectors:[["face-swap-card-preview"]],viewQuery:function(e,t){if(1&e&&s.\u0275\u0275viewQuery(l,5),2&e){let e;s.\u0275\u0275queryRefresh(e=s.\u0275\u0275loadQuery())&&(t.previewImage=e.first)}},inputs:{imgSrc:"imgSrc",alt:"alt",loading:"loading"},decls:4,vars:3,consts:[[1,"face-swap-card-container"],["class","face-swap-loading",4,"ngIf"],["fetchpriority","high","crossOrigin","anonymous",1,"face-swap-card",3,"src","alt"],["previewImage",""],[1,"face-swap-loading"],[1,"face-swap-loading-inner",3,"imgSrc"]],template:function(e,t){1&e&&(s.\u0275\u0275elementStart(0,"div",0),s.\u0275\u0275template(1,d,2,1,"div",1),s.\u0275\u0275element(2,"img",2,3),s.\u0275\u0275elementEnd()),2&e&&(s.\u0275\u0275advance(1),s.\u0275\u0275property("ngIf",t.loading),s.\u0275\u0275advance(1),s.\u0275\u0275property("src",t.imgSrc,s.\u0275\u0275sanitizeUrl)("alt",t.alt))},directives:[a.O5,p.t1],styles:["@-webkit-keyframes pulse{50%{opacity:.5}}@keyframes pulse{50%{opacity:.5}}@-webkit-keyframes loading-skeleton{0%{background-position:200% 0}to{background-position:-200% 0}}@keyframes loading-skeleton{0%{background-position:200% 0}to{background-position:-200% 0}}.face-swap-card-container[_ngcontent-%COMP%]{max-width:400px;max-height:569px;margin:0 2.5em;line-height:0;position:relative}@media (min-width: 769px){.face-swap-card-container[_ngcontent-%COMP%]{margin:0}}.face-swap-card[_ngcontent-%COMP%]{width:100%}.face-swap-loading[_ngcontent-%COMP%]{background:#FAFAFA;width:100%;height:100%;position:absolute;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}.face-swap-loading[_ngcontent-%COMP%] > .face-swap-loading-inner[_ngcontent-%COMP%]{-webkit-animation:pulse 1s cubic-bezier(.1,0,.3,1) infinite;animation:pulse 1s cubic-bezier(.1,0,.3,1) infinite}"]}),e})();var f=n(9141),m=n(93386),u=n(13153),w=n(17291),h=n(95178),x=n(89477),b=n(2477);const C=function(){return{position:"relative",right:"12px"}},v=function(){return{}};function S(e,t){if(1&e){const e=s.\u0275\u0275getCurrentView();s.\u0275\u0275elementStart(0,"div",3),s.\u0275\u0275elementStart(1,"div",4),s.\u0275\u0275element(2,"img",5),s.\u0275\u0275elementStart(3,"p"),s.\u0275\u0275text(4,"Original face"),s.\u0275\u0275elementEnd(),s.\u0275\u0275elementEnd(),s.\u0275\u0275elementStart(5,"div",6),s.\u0275\u0275element(6,"img",7),s.\u0275\u0275elementEnd(),s.\u0275\u0275elementStart(7,"div",8),s.\u0275\u0275elementStart(8,"div",9),s.\u0275\u0275elementStart(9,"input",10),s.\u0275\u0275listener("change",function(t){return s.\u0275\u0275restoreView(e),s.\u0275\u0275nextContext().sourceImageSelected.emit(t)}),s.\u0275\u0275elementEnd(),s.\u0275\u0275elementStart(10,"label",11),s.\u0275\u0275listener("click",function(){return s.\u0275\u0275restoreView(e),s.\u0275\u0275nextContext().faceSwap
1ImageUploadClickedEvent()}),s.\u0275\u0275element(11,"img",5),s.\u0275\u0275element(12,"img",12),s.\u0275\u0275elementEnd(),s.\u0275\u0275elementEnd(),s.\u0275\u0275elementStart(13,"p",13),s.\u0275\u0275text(14),s.\u0275\u0275elementEnd(),s.\u0275\u0275elementEnd(),s.\u0275\u0275elementEnd()}if(2&e){const e=s.\u0275\u0275nextContext();s.\u0275\u0275advance(2),s.\u0275\u0275property("imgSrc",e.cardFacePreview?e.cardFacePreview:"img/hosted/choose-face.svg"),s.\u0275\u0275advance(9),s.\u0275\u0275property("imgSrc",e.userFacePreview?e.userFacePreview:"img/hosted/choose-face.svg"),s.\u0275\u0275advance(2),s.\u0275\u0275property("ngStyle",1!==e.faceSwapStage?s.\u0275\u0275pureFunction0(4,C):s.\u0275\u0275pureFunction0(5,v)),s.\u0275\u0275advance(1),s.\u0275\u0275textInterpolate(1===e.faceSwapStage?"Add a new face":"Change selected face")}}function O(e,t){if(1&e){const e=s.\u0275\u0275getCurrentView();s.\u0275\u0275elementStart(0,"div",17),s.\u0275\u0275listener("click",function(){const t=s.\u0275\u0275restoreView(e).index;return s.\u0275\u0275nextContext(2).onFaceClick(t)}),s.\u0275\u0275elementStart(1,"div",18),s.\u0275\u0275element(2,"img",5),s.\u0275\u0275elementEnd(),s.\u0275\u0275elementEnd()}if(2&e){const e=t.$implicit,n=t.index,a=s.\u0275\u0275nextContext(2);s.\u0275\u0275advance(1),s.\u0275\u0275property("ngClass",a.selectedFaceIndex===n?"selected":""),s.\u0275\u0275advance(1),s.\u0275\u0275property("imgSrc",e)}}function P(e,t){if(1&e&&(s.\u0275\u0275elementStart(0,"div",14),s.\u0275\u0275elementStart(1,"div",15),s.\u0275\u0275template(2,O,3,2,"div",16),s.\u0275\u0275elementEnd(),s.\u0275\u0275elementEnd()),2&e){const e=s.\u0275\u0275nextContext();s.\u0275\u0275advance(2),s.\u0275\u0275property("ngForOf",e.uploadedFaces)}}let k=(()=>{class e{constructor(e){this.faceSwapService=e,this.uploadedFaces=[],this.faceSwapStage=1,this.selectedFaceIndex=null,this.faceSelected=new s.EventEmitter,this.sourceImageSelected=new s.EventEmitter}onFaceClick(e){this.faceSelected.emit(e)}faceSwapImageUploadClickedEvent(){this.faceSwapService.faceSwapImageUploadClickedEvent()}}return e.\u0275fac=function(t){return new(t||e)(s.\u0275\u0275directiveInject(u.j))},e.\u0275cmp=s.\u0275\u0275defineComponent({type:e,selectors:[["face-swap-face-preview"]],inputs:{cardFacePreview:"cardFacePreview",userFacePreview:"userFacePreview",uploadedFaces:"uploadedFaces",faceSwapStage:"faceSwapStage",selectedFaceIndex:"selectedFaceIndex"},outputs:{faceSelected:"faceSelected",sourceImageSelected:"sourceImageSelected"},decls:3,vars:2,consts:[[1,"face-swap-face-preview"],["class","stage-one",4,"ngIf"],["class","stage-two",4,"ngIf"],[1,"stage-one"],[1,"card-face-preview"],[1,"face-preview",3,"imgSrc"],[1,"face-swap-symbol"],["imgSrc","img/hosted/swap.svg"],[1,"user-face-preview-container"],[1,"user-face-preview"],["id","sourceImageInput","type","file","accept","image/*",2,"display","none",3,"change"],["for","sourceImageInput",3,"click"],["imgSrc","img/hosted/edit-swap.svg",1,"face-preview-edit"],[3,"ngStyle"],[1,"stage-two"],[1,"user-face-preview-wrapper"],["class","user-face-preview",3,"click",4,"ngFor","ngForOf"],[1,"user-face-preview",3,"click"],[1,"user-face-preview-inner",3,"ngClass"]],template:function(e,t){1&e&&(s.\u0275\u0275elementStart(0,"div",0),s.\u0275\u0275template(1,S,15,6,"div",1),s.\u0275\u0275template(2,P,3,1,"div",2),s.\u0275\u0275elementEnd()),2&e&&(s.\u0275\u0275advance(1),s.\u0275\u0275property("ngIf",1===t.faceSwapStage||3===t.faceSwapStage),s.\u0275\u0275advance(1),s.\u0275\u0275property("ngIf",2===t.faceSwapStage))},directives:[a.O5,p.t1,a.PC,a.sg,a.mk],styles:[".stage-one[_ngcontent-%COMP%], .stage-three[_ngcontent-%COMP%]{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;grid-gap:10px;gap:10px}.stage-two[_ngcontent-%COMP%]{display:-webkit-box;display:-ms-flexbox;display:flex;overflow:scroll;position:relative;left:0;padding:12px 24px}@media (min-width: 769px){.stage-two[_ngcontent-%COMP%]{width:100%;padding:0;overflow:visible}}.user-face-preview-wrapper[_ngcontent-%COMP%]{display:-webkit-box;display:-ms-flexbox;display:flex;grid-gap:10px;gap:10px;margin:0 auto}@media (min-width: 769px){.user-face-preview-wrapper[_ngcontent-%COMP%]{-ms-flex-wrap:wrap;flex-wrap:wrap}}.card-face-preview[_ngcontent-%COMP%], .user-face-preview[_ngcontent-%COMP%]{max-width:110px;display:-webkit-box;display:-ms-flexbox;display:flex;-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;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;text-align:center}.user-face-preview[_ngcontent-%COMP%]{position:relative}.user-face-preview[_ngcontent-%COMP%] label[_ngcontent-%COMP%]{cursor:pointer}.user-face-preview-inner[_ngcontent-%COMP%]{width:80px;height:80px;aspect-ratio:1/1;border-radius:50%;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;-webkit-box-sizing:border-box;box-sizing:border-box;-webkit-transition:-webkit-box-shadow .2s;transition:-webkit-box-shadow .2s;
1transition:box-shadow .2s;transition:box-shadow .2s,-webkit-box-shadow .2s;cursor:pointer}.user-face-preview-inner.selected[_ngcontent-%COMP%]{-webkit-box-shadow:0 0 0px 5px #FD5825;box-shadow:0 0 0 5px #fd5825}.face-preview[_ngcontent-%COMP%]{width:80px;height:80px;border-radius:50%;-o-object-fit:cover;object-fit:cover}.face-swap-symbol[_ngcontent-%COMP%]{width:20%;aspect-ratio:1/1;max-width:40px;margin-bottom:10px;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}.face-swap-symbol[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{width:70%}.face-preview-edit[_ngcontent-%COMP%]{width:38px;height:44px;position:absolute;right:0px;top:-12px}"]}),e})(),M=(()=>{class e{}return e.\u0275fac=function(t){return new(t||e)},e.\u0275cmp=s.\u0275\u0275defineComponent({type:e,selectors:[["photo-tip-preview"]],decls:15,vars:0,consts:[[1,"photo-tip-preview"],[1,"photo-tip-title"],[1,"tooltip"],["imgSrc","/svg/info-icon.svg",1,"tooltip-icon"],[1,"tooltip-message"],[1,"photo-tip-description"],[1,"mdi","mdi-close","close-icon"]],template:function(e,t){1&e&&(s.\u0275\u0275elementStart(0,"div",0),s.\u0275\u0275elementStart(1,"h2",1),s.\u0275\u0275text(2,"Not quite right? Here\u2019s our top swap tips:"),s.\u0275\u0275elementEnd(),s.\u0275\u0275elementStart(3,"div",2),s.\u0275\u0275element(4,"img",3),s.\u0275\u0275elementStart(5,"div",4),s.\u0275\u0275text(6,"Some tips for a better swap result"),s.\u0275\u0275elementEnd(),s.\u0275\u0275elementEnd(),s.\u0275\u0275elementStart(7,"ul",5),s.\u0275\u0275elementStart(8,"li"),s.\u0275\u0275text(9,"Choose a photo where the subject is at a similar angle to your card."),s.\u0275\u0275elementEnd(),s.\u0275\u0275elementStart(10,"li"),s.\u0275\u0275text(11,"Make sure the lighting is bright and clear."),s.\u0275\u0275elementEnd(),s.\u0275\u0275elementStart(12,"li"),s.\u0275\u0275text(13,"The subject should be as close to the camera as possible."),s.\u0275\u0275elementEnd(),s.\u0275\u0275element(14,"div",6),s.\u0275\u0275elementEnd(),s.\u0275\u0275elementEnd())},directives:[p.t1],styles:[".photo-tip-preview[_ngcontent-%COMP%]{position:relative}.photo-tip-preview[_ngcontent-%COMP%] > .tooltip[_ngcontent-%COMP%]{font-size:14px;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;grid-gap:12px;gap:12px}.photo-tip-preview[_ngcontent-%COMP%] > .tooltip[_ngcontent-%COMP%]:hover + .photo-tip-description[_ngcontent-%COMP%], .photo-tip-preview[_ngcontent-%COMP%] > .tooltip[_ngcontent-%COMP%]:focus + .photo-tip-description[_ngcontent-%COMP%]{background-color:#fff;display:block;-webkit-box-shadow:0 4px 4px #00000040;box-shadow:0 4px 4px #00000040;border-radius:16px;position:absolute;padding:24px;bottom:calc(100% + 16px);width:calc(100vw - 42px);left:50%;-webkit-transform:translateX(-50%) translateY(10px);transform:translate(-50%) translateY(10px);max-width:330px}.photo-tip-preview[_ngcontent-%COMP%] > .tooltip[_ngcontent-%COMP%] > .tooltip-icon[_ngcontent-%COMP%]{cursor:help}@media (min-width: 769px){.photo-tip-preview[_ngcontent-%COMP%] > .tooltip[_ngcontent-%COMP%]{display:none}}.photo-tip-preview[_ngcontent-%COMP%] > .photo-tip-description[_ngcontent-%COMP%]{font-size:14px;padding:0;list-style-position:outside}.photo-tip-preview[_ngcontent-%COMP%] > .photo-tip-description[_ngcontent-%COMP%] > .close-icon[_ngcontent-%COMP%]{position:absolute;right:24px;font-size:20px;top:16px}@media (min-width: 769px){.photo-tip-preview[_ngcontent-%COMP%] > .photo-tip-description[_ngcontent-%COMP%] > .close-icon[_ngcontent-%COMP%]{display:none}}.photo-tip-preview[_ngcontent-%COMP%] > .photo-tip-title[_ngcontent-%COMP%]{font-weight:600;font-size:16px}.photo-tip-preview[_ngcontent-%COMP%] > .photo-tip-title[_ngcontent-%COMP%], .photo-tip-preview[_ngcontent-%COMP%] > .photo-tip-description[_ngcontent-%COMP%]{display:none}@media (min-width: 769px){.photo-tip-preview[_ngcontent-%COMP%] > .photo-tip-title[_ngcontent-%COMP%], .photo-tip-preview[_ngcontent-%COMP%] > .photo-tip-description[_ngcontent-%COMP%]{display:block}}"]}),e})();const y=function(e){return{selected:e}};let _=(()=>{class e{constructor(){this.isSelected=!1,this.buttonClicked=new s.EventEmitter}}return e.\u0275fac=function(t){return new(t||e)},e.\u0275cmp=s.\u0275\u0275defineComponent({type:e,selectors:[["rate-button"]],inputs:{isSelected:"isSelected",buttonIconUrl:"buttonIconUrl"},outputs:{buttonClicked:"buttonClicked"},decls:2,vars:4,consts:[[3,"ngClass","click"],["alt","Rate Button Icon",1,"icon-img",3,"imgSrc"]],template:function(e,t){1&e&&(s.\u0275\u0275elementStart(0,"button",0),s.\u0275\u0275listener("click",function(){return t.buttonClicked.emit
1()}),s.\u0275\u0275element(1,"img",1),s.\u0275\u0275elementEnd()),2&e&&(s.\u0275\u0275property("ngClass",s.\u0275\u0275pureFunction1(2,y,t.isSelected)),s.\u0275\u0275advance(1),s.\u0275\u0275property("imgSrc",t.buttonIconUrl))},directives:[a.mk,p.t1],styles:["button[_ngcontent-%COMP%]{width:40px;height:40px;border-radius:50%;background-color:#52525b;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;border:none;cursor:pointer;-webkit-transition:background-color .3s ease;transition:background-color .3s ease}button.selected[_ngcontent-%COMP%]{background-color:#ff6900}button[_ngcontent-%COMP%] .icon-img[_ngcontent-%COMP%]{width:85%;height:85%;-o-object-fit:contain;object-fit:contain}"]}),e})();var I=n(72890),F=n(65594),E=n(4184),j=n(65426),z=n(40673),T=n(39417);function V(e,t){if(1&e&&(s.\u0275\u0275elementStart(0,"p",2),s.\u0275\u0275text(1),s.\u0275\u0275elementEnd()),2&e){const e=s.\u0275\u0275nextContext().ngIf;s.\u0275\u0275property("@slideText",void 0),s.\u0275\u0275advance(1),s.\u0275\u0275textInterpolate(e)}}function R(e,t){if(1&e&&(s.\u0275\u0275elementStart(0,"div",4),s.\u0275\u0275template(1,V,2,2,"p",5),s.\u0275\u0275elementEnd()),2&e){const e=s.\u0275\u0275nextContext();s.\u0275\u0275advance(1),s.\u0275\u0275property("ngIf",e.showLoading)}}let B=(()=>{class e{constructor(){this.loadingMessages=["\u2026merging souls\u2026","\u2026remixing pixels\u2026","\u2026making mashup magic\u2026","\u2026blending bodies\u2026","\u2026blurring boundaries\u2026","\u2026trading features\u2026","\u2026fusing faces\u2026","\u2026aligning eyebrows\u2026","\u2026venturing into the uncanny valley\u2026","\u2026syncing smiles\u2026","\u2026calibrating cheekbones\u2026","\u2026scanning for good sides\u2026","\u2026smoothing over identity crises\u2026","\u2026decoding doppelg\xe4ngers\u2026","\u2026crunching cringey selfies\u2026","\u2026ironing out jawlines\u2026","\u2026negotiating with nostrils\u2026","\u2026stitching personalities\u2026","\u2026balancing beauty and chaos\u2026","\u2026questioning all life choices\u2026","\u2026gently massaging egos\u2026","\u2026mentally preparing you for the result\u2026"],this.showLoading=!0,this.loadingContent=(0,E.H)(0,3e3).pipe((0,j.b)(()=>
1this.showLoading=!1),(0,z.g)(100),(0,T.U)(e=>(this.showLoading=!0,this.loadingMessages[e%this.loadingMessages.length])))}}return e.\u0275fac=function(t){return new(t||e)},e.\u0275cmp=s.\u0275\u0275defineComponent({type:e,selectors:[["face-swap-loading-screen"]],decls:7,vars:4,consts:[[1,"face-swap-loading-screen"],["imgSrc","img/hosted/face-swap-loading.gif","alt","Face Swap Card Loading",1,"face-swap-loading-gif"],[1,"face-swap-loading-message"],["class","face-swap-loading-inner",4,"ngIf"],[1,"face-swap-loading-inner"],["class","face-swap-loading-message",4,"ngIf"]],template:function(e,t){1&e&&(s.\u0275\u0275elementStart(0,"div",0),s.\u0275\u0275elementStart(1,"div"),s.\u0275\u0275element(2,"img",1),s.\u0275\u0275elementStart(3,"p",2),s.\u0275\u0275text(4,"Hold tight, we're busy"),s.\u0275\u0275elementEnd(),s.\u0275\u0275template(5,R,2,1,"div",3),s.\u0275\u0275pipe(6,"async"),s.\u0275\u0275elementEnd(),s.\u0275\u0275elementEnd()),2&e&&(s.\u0275\u0275property("@fadeIn",void 0),s.\u0275\u0275advance(5),s.\u0275\u0275property("ngIf",s.\u0275\u0275pipeBind1(6,2,t.loadingContent)))},directives:[p.t1,a.O5],pipes:[a.Ov],styles:[".face-swap-loading-screen[_ngcontent-%COMP%]{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;position:fixed;top:0;width:100%;height:100%;left:0;background-color:#2e2e2ecc;z-index:10000}.face-swap-loading-screen[_ngcontent-%COMP%] div[_ngcontent-%COMP%]{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;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;max-width:400px;max-height:250px;overflow:hidden}.face-swap-loading-screen[_ngcontent-%COMP%] .face-swap-loading-gif[_ngcontent-%COMP%]{height:126px;width:126px}.face-swap-loading-screen[_ngcontent-%COMP%] .face-swap-loading-inner[_ngcontent-%COMP%]{min-height:24px}.face-swap-loading-screen[_ngcontent-%COMP%] .face-swap-loading-message[_ngcontent-%COMP%]{text-align:center;color:#fff;font-size:20px;font-weight:800;padding:0;margin:0}"],data:{animation:[(0,F.X$)("slideText",[(0,F.eR)(":enter",[(0,F.oB)({transform:"translateX(100%)"}),(0,F.jt)(".2s ease-in")])]),(0,F.X$)("fadeIn",[(0,F.eR)(":enter",[(0,F.oB)({opacity:0}),(0,F.jt)(".3s ease-out")]),(0,F.eR)(":leave",[(0,F.jt)(".3s ease-out",(0,F.oB)({opacity:0}))])])]}}),e})();var U=n(35149);function D(e,t){if(1&e&&s.\u0275\u0275element(0,"span"),2&e){const e=t.index,n=s.\u0275\u0275nextContext();s.\u0275\u0275classProp("active",e===n.currentStepIndex)}}function L(e,t){if(1&e){const e=s.\u0275\u0275getCurrentView();s.\u0275\u0275elementStart(0,"div",13),s.\u0275\u0275listener("click",function(){return s.\u0275\u0275restoreView(e),s.\u0275\u0275nextContext().previousStep()}),s.\u0275\u0275elementEnd()}}function A(e,t){if(1&e){const e=s.\u0275\u0275getCurrentView();s.\u0275\u0275elementStart(0,"div",14),s.\u0275\u0275listener("click",function(){return s.\u0275\u0275restoreView(e),s.\u0275\u0275nextContext().nextStep()}),s.\u0275\u0275elementEnd()}}function $(e,t){if(1&e){const e=s.\u0275\u0275getCurrentView();s.\u0275\u0275elementStart(0,"div",15),s.\u0275\u0275listener("click",function(){return s.\u0275\u0275restoreView(e),s.\u0275\u0275nextContext().closeOnboardingClicked.emit()}),s.\u0275\u0275text(1,"Take me to Face Swap"),s.\u0275\u0275elementEnd()}}let W=(()=>{class e{constructor(e){this.faceSwapService=e,this.currentStepIndex=0,this.content=[{step:1,title:"3 steps to Face Swap",image:"/img/hosted/faceswap-step-1.png",description:"1. Choose a photo taken at a similar angle to your card"},{step:2,title:"Make the magic happen",image:"/img/hosted/faceswap-step-2.gif",description:"2. Click SWAP FACE"},{step:3,title:"\u201cWOW! I belong in the Louvre!\u201d",image:"/img/hosted/faceswap-step-3.png",description:"3. Get ready for a BIG reaction to your unique card!"}],this.closeOnboardingClicked=new s.EventEmitter}nextStep(){this.currentStepIndex<this.content.length-1&&(this.currentStepIndex++,1===this.currentStepIndex?this.faceSwapService.faceSwapOnboardingStepTwo():2===this.currentStepIndex&&this.faceSwapService.faceSwapOnboardingStepThree())}previousStep(){this.currentStepIndex>0&&this.currentStepIndex--}}return e.\u0275fac=function(t){return new(t||e)(s.\u0275\u0275directiveInject(u.j))},e.\u0275cmp=s.\u0275\u0275defineComponent({type:e,selectors:[["face-swap-onboarding"]],inputs:{showOnboarding:"showOnboarding"},outputs:{closeOnboardingClicked:"closeOnboardingClicked"},decls:15,vars:10,consts:[[3,"showModal","showAnimation","dark","closeClicked"],[1,"face-swap-onboarding-container"],[1,"face-swap-onboarding-inner"],[1,"onboarding-title"],[1,"onboarding-image"],[3,"imgSrc"],[1,"onboarding-description"],[1,"onboarding-dots"],[3,"active",4,"ngFor","ngForOf"],[1,"buttons-container"],["class","arrow-left",3,"click",4,"ngIf"],["class","arrow-right",3,"click",4,"ngIf"],["class","cta",3,"click",4,"ngIf"],[1,"arrow-left",3,"click"],[1,"arrow-right",3,"click"],[1,"cta",3,"click"]],template:function(e,t){1&e&&(s.\u0275\u0275elementStart(0,"app-modal",0),s.\u0275\u0275listener("closeClicked",function(){return t.closeOnboardingClicked.emit
1()}),s.\u0275\u0275elementStart(1,"div",1),s.\u0275\u0275elementStart(2,"div",2),s.\u0275\u0275elementStart(3,"div",3),s.\u0275\u0275text(4),s.\u0275\u0275elementEnd(),s.\u0275\u0275elementStart(5,"div",4),s.\u0275\u0275element(6,"img",5),s.\u0275\u0275elementEnd(),s.\u0275\u0275elementStart(7,"div",6),s.\u0275\u0275text(8),s.\u0275\u0275elementEnd(),s.\u0275\u0275elementStart(9,"div",7),s.\u0275\u0275template(10,D,1,2,"span",8),s.\u0275\u0275elementEnd(),s.\u0275\u0275elementStart(11,"div",9),s.\u0275\u0275template(12,L,1,0,"div",10),s.\u0275\u0275template(13,A,1,0,"div",11),s.\u0275\u0275template(14,$,2,0,"div",12),s.\u0275\u0275elementEnd(),s.\u0275\u0275elementEnd(),s.\u0275\u0275elementEnd(),s.\u0275\u0275elementEnd()),2&e&&(s.\u0275\u0275property("showModal",t.showOnboarding)("showAnimation",!1)("dark",!0),s.\u0275\u0275advance(4),s.\u0275\u0275textInterpolate(t.content[t.currentStepIndex].title),s.\u0275\u0275advance(2),s.\u0275\u0275property("imgSrc",t.content[t.currentStepIndex].image),s.\u0275\u0275advance(2),s.\u0275\u0275textInterpolate(t.content[t.currentStepIndex].description),s.\u0275\u0275advance(2),s.\u0275\u0275property("ngForOf",t.content),s.\u0275\u0275advance(2),s.\u0275\u0275property("ngIf",1!==t.content[t.currentStepIndex].step),s.\u0275\u0275advance(1),s.\u0275\u0275property("ngIf",3!==t.content[t.currentStepIndex].step),s.\u0275\u0275advance(1),s.\u0275\u0275property("ngIf",3===t.content[t.currentStepIndex].step))},directives:[U.h,p.t1,a.sg,a.O5],styles:['.face-swap-onboarding-container[_ngcontent-%COMP%]{background-image:url(https://images-fe.thortful.com/svg/fs-top-wave.svg),url(https://images-fe.thortful.com/svg/fs-down-wave.svg);background-position:top center,bottom left;background-size:contain,contain;background-repeat:no-repeat,no-repeat;background-color:#f7efe5;overflow:hidden}.face-swap-onboarding-inner[_ngcontent-%COMP%] > .onboarding-image[_ngcontent-%COMP%]{width:100%;text-align:center}.face-swap-onboarding-inner[_ngcontent-%COMP%] > .onboarding-image[_ngcontent-%COMP%] > img[_ngcontent-%COMP%]{width:100%}.face-swap-onboarding-inner[_ngcontent-%COMP%] > .onboarding-title[_ngcontent-%COMP%], .face-swap-onboarding-inner[_ngcontent-%COMP%] .onboarding-description[_ngcontent-%COMP%]{font-family:"Courier Prime";text-align:center;font-weight:700;line-height:120%}.face-swap-onboarding-inner[_ngcontent-%COMP%] > .onboarding-title[_ngcontent-%COMP%]{font-size:24px;padding:24px;color:#fff}@media (min-width: 769px){.face-swap-onboarding-inner[_ngcontent-%COMP%] > .onboarding-title[_ngcontent-%COMP%]{padding:24px 60px;font-size:30px}}.face-swap-onboarding-inner[_ngcontent-%COMP%] > .onboarding-description[_ngcontent-%COMP%]{font-size:16px;padding:0 42px;margin-top:16px}@media (min-width: 769px){.face-swap-onboarding-inner[_ngcontent-%COMP%] > .onboarding-description[_ngcontent-%COMP%]{font-size:20px}}.buttons-container[_ngcontent-%COMP%]{display:-webkit-box;display:-ms-flexbox;display:flex;grid-gap:12px;gap:12px;padding:24px;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center}.buttons-container[_ngcontent-%COMP%] > .arrow-left[_ngcontent-%COMP%], .buttons-container[_ngcontent-%COMP%] > .arrow-right[_ngcontent-%COMP%]{width:50px;height:50px;border-radius:50%;-ms-flex-negative:0;flex-shrink:0;cursor:pointer}.buttons-container[_ngcontent-%COMP%] > .arrow-left[_ngcontent-%COMP%]{background:url(https://images-fe.thortful.com/svg/back-icon.svg) center no-repeat #000000}.buttons-container[_ngcontent-%COMP%] > .arrow-right[_ngcontent-%COMP%]{background:url(https://images-fe.thortful.com/svg/next-icon.svg) center no-repeat #000000}.buttons-container[_ngcontent-%COMP%] > .cta[_ngcontent-%COMP%]{background-color:#000;text-align:center;color:#fff;border-radius:24px;padding:8px 24px;height:50px;display:-webkit-box;display:-ms-flexbox;display:flex;font-size:16px;-webkit-box-align:center;-ms-flex-align:center;align-items:center;cursor:pointer}.onboarding-dots[_ngcontent-%COMP%]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;margin-top:24px}.onboarding-dots[_ngcontent-%COMP%] > span[_ngcontent-%COMP%]{width:10px;height:10px;margin:0 12px;border-radius:50%;background-color:#cbcbcb;display:inline-block}.onboarding-dots[_ngcontent-%COMP%] > span.active[_ngcontent-%COMP%]{background-color:#000}'],data:{animation:[(0,F.X$)("contentFadeIn",[(0,F.eR)("*=>*",[(0,F.oB)({transform:"translateX(100%)"}),(0,F.jt)("500ms ease-out",(0,F.oB)({transform:"translateX(0)"}))])])]}}),e})();function X(e,t){1&e&&s.\u0275\u0275element(0,"div",17)}function Q(e,t){1&e&&(s.\u0275\u0275elementStart(0,"h2",24),s.\u0275\u0275text(1,"Top Swap Tip:"),s.\u0275\u0275elementEnd())}function q(e,t){1&e&&(s.\u0275\u0275elementStart(0,"div",25),s.\u0275\u0275elementStart(1,"li"),s.\u0275\u0275text(2,"Choose a photo where the subject is at a similar angle to your card."),s.\u0275\u0275elementEnd(),s.\u0275\u0275elementStart(3,"li"),s.\u0275\u0275text(4,"Make sure the lighting is bright and clear."),s.\u0275\u0275elementEnd(),s.\u0275\u0275elementStart(5,"li"),s.\u0275\u0275text(6,"The subject should be as close to the camera as possible."),s.\u0275\u0275elementEnd(),s.\u0275\u0275elementEnd())}function H(e,t){1&e&&(s.\u0275\u0275elementStart(0,"p",26),s.\u0275\u0275text(1,"We detected multiple faces in your image, please pick one to Face Swap."),s.\u0275\u0275elementEnd())}function G(e,t){if(1&e){const e=s.\u0275\u0275getCurrentView();s.\u0275\u0275elementStart(0,"face-swap-face-preview",27),s.\u0275\u0275listener("faceSelected",function(t){return s.\u0275\u0275restoreView(e),s.\u0275\u0275nextContext(2).updateSelectedFace(t)})("sourceImageSelected",function(t){return s.\u0275\u0275restoreView(e),s.\u0275\u0275nextContext(2).chooseSourceImage(t)}),s.\u0275\u0275elementEnd()}if(2&e){const e=s.\u0275\u0275nextContext(2);s.\u0275\u0275property("uploadedFaces",e.detectedFaces)("faceSwapStage",e.faceSwapStage)("userFacePreview",e.selectedFace)("selectedFaceIndex",e.selectedFaceIndex)("cardFacePreview",e.cardFacePreview)}}function N(e,t){1&e&&(s.\u0275\u0275elementStart(0,"div",28),s.\u0275\u0275element(1,"photo-tip-preview"),s.\u0275\u0275elementEnd())}function K(e,t){1&e&&(s.\u0275\u0275elementContainerStart(0),s.\u0275\u0275element(1,"photo-tip-preview"),s.\u0275\u0275elementContainerEnd())}function Y(e,t){if(1&e&&(s.\u0275\u0275elementStart(0,"div",18),s.\u0275\u0275template(1,Q,2,0,"h2",19),s.\u0275\u0275template(2,q,7,0,"div",20),s.\u0275\u0275template(3,H,2,0,"p",21),s.\u0275\u0275template(4,G,1,5,"face-swap-face-preview",22),s.\u0275\u0275template(5,N,2,0,"div",23),s.\u0275\u0275template(6,K,2,0,"ng-container",14),s.\u0275\u0275elementEnd()),2&e){const e=s.\u0275\u0275nextContext();s.\u0275\u0275advance(1),s.\u0275\u0275property("ngIf",2!==e.faceSwapStage&&4!==e.faceSwapStage),s.\u0275\u0275advance(1),s.\u0275\u0275property("ngIf",2!==e.faceSwapStage&&4!==e.faceSwapStage),s.\u0275\u0275advance(1),s.\u0275\u0275property("ngIf",2===e.faceSwapStage),s.\u0275\u0275advance(1),s.\u0275\u0275property("ngIf",4!==e.faceSwapStage),s.\u0275\u0275advance(1),s.\u0275\u0275property("ngIf",2!==e.faceSwapStage&&4!==e.faceSwapStage),s.\u0275\u0275advance(1),s.\u0275\u0275property("ngIf",4===e.faceSwapStage)}}
1const J=function(e){return{"fade-out":e}};function Z(e,t){if(1&e){const e=s.\u0275\u0275getCurrentView();s.\u0275\u0275elementStart(0,"div",29),s.\u0275\u0275elementStart(1,"p"),s.\u0275\u0275text(2,"Rate this swap"),s.\u0275\u0275elementEnd(),s.\u0275\u0275elementStart(3,"rate-button",30),s.\u0275\u0275listener("buttonClicked",function(){return s.\u0275\u0275restoreView(e),s.\u0275\u0275nextContext().onRatingClicked("positive")}),s.\u0275\u0275elementEnd(),s.\u0275\u0275elementStart(4,"rate-button",30),s.\u0275\u0275listener("buttonClicked",function(){return s.\u0275\u0275restoreView(e),s.\u0275\u0275nextContext().onRatingClicked("negative")}),s.\u0275\u0275elementEnd(),s.\u0275\u0275elementEnd()}if(2&e){const e=s.\u0275\u0275nextContext();s.\u0275\u0275property("ngClass",s.\u0275\u0275pureFunction1(5,J,e.fadingOut)),s.\u0275\u0275advance(3),s.\u0275\u0275property("buttonIconUrl","/svg/thumbs-up.svg")("isSelected","positive"===e.selectedRating),s.\u0275\u0275advance(1),s.\u0275\u0275property("buttonIconUrl","/svg/thumbs-down.svg")("isSelected","negative"===e.selectedRating)}}function ee(e,t){if(1&e){const e=s.\u0275\u0275getCurrentView();s.\u0275\u0275elementStart(0,"app-button",31),s.\u0275\u0275listener("buttonClicked",function(){s.\u0275\u0275restoreView(e);const t=s.\u0275\u0275nextContext();return 2!==t.faceSwapStage?t.createFaceSwap():t.finishFaceSelection()}),s.\u0275\u0275elementEnd()}if(2&e){const e=s.\u0275\u0275nextContext();s.\u0275\u0275property("isSolid",!0)("isDisabled",!e.selectedFace)("buttonText",2!==e.faceSwapStage?"Swap Face":"Select Face")}}function te(e,t){if(1&e){const e=s.\u0275\u0275getCurrentView();s.\u0275\u0275elementContainerStart(0),s.\u0275\u0275elementStart(1,"app-button",32),s.\u0275\u0275listener("buttonClicked",function(){return s.\u0275\u0275restoreView(e),s.\u0275\u0275nextContext().editSwap()}),s.\u0275\u0275elementEnd(),s.\u0275\u0275elementStart(2,"app-button",33),s.\u0275\u0275listener("buttonClicked",function(){return s.\u0275\u0275restoreView(e),s.\u0275\u0275nextContext().continueToPDP()}),s.\u0275\u0275elementEnd(),s.\u0275\u0275elementContainerEnd()}2&e&&(s.\u0275\u0275advance(2),s.\u0275\u0275property("isSolid",!0))}function ne(e,t){1&e&&s.\u0275\u0275element(0,"face-swap-loading-screen")}function ae(e,t){if(1&e){const e=s.\u0275\u0275getCurrentView();s.\u0275\u0275elementStart(0,"face-swap-onboarding",34),s.\u0275\u0275listener("closeOnboardingClicked",function(){return s.\u0275\u0275restoreView(e),s.\u0275\u0275nextContext().hideFaceSwapOnboarding()}),s.\u0275\u0275elementEnd()}if(2&e){const e=s.\u0275\u0275nextContext();s.\u0275\u0275property("showOnboarding",e.showOnboarding)}}let ie=(()=>{class e{constructor(e,t,n,a,i,o){var c,r,s,p;this.route=e,this.faceSwapService=t,this.shareDataService=n,this.router=a,this.GeneralUtils=i,this.CardUtils=o,this.breadcrumbSegments=[{label:"Home",url:"/"},{label:"Face Swap Cards",url:"/face-swap-cards/"},{label:"Create A Face Swap Card"}],this.faceSwapStage=1,this.selectedRating=null,this.fadingOut=!1,this.showRatingButtons=!1,this.loadingFaceSwap=!1,this.previousFaceSwapPage="/face-swap-cards",this.selectedFaceIndex=null,this.loadingModels=!0,this.faceSwapCompleted=!1,this.lastSelectedFace="",this.lastFaceSwapCardImage="",this.showOnboarding=!1,this.destroy$=new m.xQ,this.card=null===(c=this.route.snapshot.data)||void 0===c?void 0:c.card,this.faceSwapCardImage=null===(r=this.card)||void 0===r?void 0:r.image,this.cardTemplateData=null===(s=this.route.snapshot.data)||void 0===s?void 0:s.card,this.faceSwapCardImage=null===(p=this.cardTemplateData)||void 0===p?void 0:p.image;const l=this.GeneralUtils.history.get().reverse().find(e=>e.includes("/face-swap-cards/"));this.previousFaceSwapPage=l||"/face-swap-cards",this.breadcrumbSegments[1].url=this.previousFaceSwapPage}ngOnInit(){this.updateScrollLock(),this.resizeListener=()=>this.updateScrollLock(),window.addEventListener("resize",this.resizeListener),this.CardUtils.setLocalCards(this.card.id),this.faceSwapService.faceSwapViewedFaceSwapCardEvent(this.card)}ngOnDestroy(){window.removeEventListener("resize",this.resizeListener),document.body.classList.remove("no-scroll-body"),this.destroy$.next(),this.destroy$.complete()}updateScrollLock(){window.innerWidth<f.Dh.MobileBreakpoint?document.body.classList.add("no-scroll-body"):document.body.classList.remove("no-scroll-body")}ngAfterViewInit(){return(0,o.mG)(this,void 0,void 0,function*(){try{yield this.faceSwapService.initFaceDetector(),this.loadingModels=!1,this.faceSwapService.detectFaceOnImage(this.cardPreviewComponent.getCardPreviewElementRef(),!0).then(e=>{this.cardFacePreview=e[0]})}catch(e){}})}createFaceSwap(){if(this.faceSwapCompleted&&this.selectedFace===this.lastSelectedFace)return this.faceSwapStage=4,this.showRatingButtons=!0,void(this.faceSwapCardImage=this.lastFaceSwapCardImage);
1this.loadingFaceSwap=!0,this.faceSwapService.faceSwapImageSubmitEvent(this.cardTemplateData.card.id),this.faceSwapService.generateFaceSwap(this.selectedFace,this.cardTemplateData.card.id).pipe((0,c.R)(this.destroy$)).subscribe(e=>{this.faceSwapCardImage=`data:image/png;base64,${e.image}`,this.swapId=e.draft_id,this.faceSwapStage=4,this.loadingFaceSwap=!1,this.showRatingButtons=!0,this.faceSwapCompleted=!0,this.lastSelectedFace=this.selectedFace,this.lastFaceSwapCardImage=this.faceSwapCardImage,this.faceSwapService.faceSwapCompleteEvent(this.cardTemplateData.card.id)},e=>{this.loadingFaceSwap=!1,this.shareDataService.trigger("showError","Something went wrong, please try again later"),this.faceSwapService.faceSwapImageSubmitEvent(this.cardTemplateData.card.id,"Something went wrong, please try again later")})}chooseSourceImage(e){const t=e.target;t.files&&0!==t.files.length&&this.faceSwapService.fileToImage(t.files[0]).pipe((0,r.q)(1)).subscribe(e=>(0,o.mG)(this,void 0,void 0,function*(){const t=yield this.faceSwapService.detectFaceOnImage(e);0===t.length?(this.shareDataService.trigger("showError","We couldn't detect a face in this image, please choose another image"),this.faceSwapService.faceSwapImageUploadedEvent("We couldn't detect a face in this image, please choose another image")):(this.detectedFaces=t,this.faceSwapStage=1===t.length?3:2,1===t.length?(this.selectedFace=t[0],this.faceSwapService.faceSwapImageUploadedEvent()):(this.selectedFace=null,this.selectedFaceIndex=null))}))}onRatingClicked(e){this.selectedRating=e,this.faceSwapService.faceSwapSendSegmentSwapRating(this.card,e),this.ratingTimeout&&clearTimeout(this.ratingTimeout),this.ratingTimeout=setTimeout(()=>{this.fadingOut=!0},3e3),setTimeout(()=>{this.showRatingButtons=!1},3400)}updateSelectedFace(e){this.selectedFace=this.detectedFaces[e],this.selectedFaceIndex=e}finishFaceSelection(){this.faceSwapStage=3,this.faceSwapService.faceSwapImageUploadedEvent()}onBackButtonClick(){history.back()}editSwap(){this.faceSwapStage=1,this.selectedRating=null,this.fadingOut=!1,this.showRatingButtons=!1,this.faceSwapService.faceSwapEditEvent()}continueToPDP(){this.router.navigate([`/card/${this.cardTemplateData.id}`],{queryParams:{swap_id:this.swapId}})}hideFaceSwapOnboarding(){this.showOnboarding=!1}showOnboardingPopUp(){this.showOnboarding=!0,this.faceSwapService.faceSwapOnboardingStepOne()}}return e.\u0275fac=function(t){return new(t||e)(s.\u0275\u0275directiveInject(i.gz),s.\u0275\u0275directiveInject(u.j),s.\u0275\u0275directiveInject(w.u),s.\u0275\u0275directiveInject(i.F0),s.\u0275\u0275directiveInject(h.w),s.\u0275\u0275directiveInject(x.Q))},e.\u0275cmp=s.\u0275\u0275defineComponent({type:e,selectors:[["face-swap-card-upload"]],viewQuery:function(e,t){if(1&e&&s.\u0275\u0275viewQuery(g,5),2&e){let e;s.\u0275\u0275queryRefresh(e=s.\u0275\u0275loadQuery())&&(t.cardPreviewComponent=e.first)}},decls:20,vars:10,consts:[[1,"face-swap-upload-page"],[1,"upload-page-breadcrumbs",3,"segments"],[1,"back-button",3,"click"],["imgSrc","img/action/back-arrow.png"],[1,"upload-page-header"],["imgSrc","img/hosted/help-button-swap.svg",1,"need-help-button",3,"click"],[1,"upload-container"],[3,"loading","imgSrc"],[1,"upload-editor"],["class","face-swap-loading-content",4,"ngIf"],["class","photo-tip",4,"ngIf"],["class","rating-buttons-container",3,"ngClass",4,"ngIf"],[1,"button-container"],["class","face-swap-button",3,"isSolid","isDisabled","buttonText","buttonClicked",4,"ngIf"],[4,"ngIf"],[1,"need-help-cta",3,"click"],[3,"showOnboarding","closeOnboardingClicked",4,"featureFlag"],[1,"face-swap-loading-content"],[1,"photo-tip"],["class","photo-tip-title",4,"ngIf"],["class","photo-tip-description",4,"ngIf"],["class","photo-tip-error",4,"ngIf"],[3,"uploadedFaces","faceSwapStage","userFacePreview","selectedFaceIndex","cardFacePreview","faceSelected","sourceImageSelected",4,"ngIf"],["class","initial-photo-tip",4,"ngIf"],[1,"photo-tip-title"],[1,"photo-tip-description"],[1,"photo-tip-error"],[3,"uploadedFaces","faceSwapStage","userFacePreview","selectedFaceIndex","cardFacePreview","faceSelected","sourceImageSelected"],[1,"initial-photo-tip"],[1,"rating-buttons-container",3,"ngClass"],[3,"buttonIconUrl","isSelected","buttonClicked"],[1,"face-swap-button",3,"isSolid","isDisabled","buttonText","buttonClicked"],["buttonText","Edit",1,"face-swap-button",3,"buttonClicked"],["buttonText","Continue",1,"face-swap-button",3,"isSolid","buttonClicked"],[3,"showOnboarding","closeOnboardingClicked"]],template:function(e,t){1&e&&(s.\u0275\u0275elementStart(0,"div",0),s.\u0275\u0275element(1,"thor-breadcrumbs",1),s.\u0275\u0275elementStart(2,"div",2),s.\u0275\u0275listener("click",function(){return t.onBackButtonClick()}),s.\u0275\u0275element(3,"img",3),s.\u0275\u0275elementEnd(),s.\u0275\u0275elementStart(4,"h1",4),s.\u0275\u0275text(5,"Create your Face Swap card"),s.\u0275\u0275elementEnd(),s.\u0275\u0275elementStart(6,"img",5),s.\u0275\u0275listener("click",function(){return t.showOnboardingPopUp()}),s.\u0275\u0275elementEnd(),s.\u0275\u0275elementStart(7,"div",6),s.\u0275\u0275element(8,"face-swap-card-preview",7),s.\u0275\u0275elementStart(9,"div",8),s.\u0275\u0275template(10,X,1,0,"div",9),s.\u0275\u0275template(11,Y,7,6,"div",10),s.\u0275\u0275template(12,Z,5,7,"div",11),s.\u0275\u0275elementStart(13,"div",12),s.\u0275\u0275template(14,ee,1,3,"app-button",13),s.\u0275\u0275template(15,te,3,1,"ng-container",14),s.\u0275\u0275elementEnd(),s.\u0275\u0275elementStart(16,"div",15),s.\u0275\u0275listener("click",function(){return t.showOnboardingPopUp()}),s.\u0275\u0275text(17,"How it works?"),s.\u0275\u0275elementEnd(),s.\u0275\u0275elementEnd(),s.\u0275\u0275elementEnd(),s.\u0275\u0275elementEnd(),s.\u0275\u0275template(18,ne,1,0,"face-swap-loading-screen",14),s.\u0275\u0275template(19,ae,1,1,"face-swap-onboarding",16)),2&e&&(s.\u0275\u0275advance(1),s.\u0275\u0275property("segments",t.breadcrumbSegments),s.\u0275\u0275advance(7),s.\u0275\u0275property("loading",t.loadingModels)("imgSrc",t.faceSwapCardImage),s.\u0275\u0275advance(2),s.\u0275\u0275property("ngIf",t.loadingModels),s.\u0275\u0275advance(1),s.\u0275\u0275property("ngIf",!t.loadingModels),s.\u0275\u0275advance(1),s.\u0275\u0275property("ngIf",t.showRatingButtons),s.\u0275\u0275advance(2),s.\u0275\u0275property("ngIf",4!==t.faceSwapStage),s.\u0275\u0275advance(1),s.\u0275\u0275property("ngIf",4===t.faceSwapStage),s.\u0275\u0275advance(3),s.\u0275\u0275property("ngIf",t.loadingFaceSwap),s.\u0275\u0275advance(1),s.\u0275\u0275property("featureFlag","WEB-2352"))},directives:[b.n,p.t1,g,a.O5,p.Hl,k,M,a.mk,_,I.V,B,W],styles:["@-webkit-keyframes pulse{50%{opacity:.5}}@keyframes pulse{50%{opacity:.5}}@-webkit-keyframes loading-skeleton{0%{background-position:200% 0}to{background-position:-200% 0}}@keyframes loading-skeleton{0%{background-position:200% 0}to{background-position:-200% 0}}.face-swap-upload-page[_ngcontent-%COMP%]{position:fixed;top:0;width:100%;height:100%;z-index:20;background:#ffffff;overflow:auto}.face-swap-upload-page[_ngcontent-%COMP%] > .need-help-button[_ngcontent-%COMP%]{position:absolute;right:20px;top:20px;max-width:30px;cursor:pointer}@media (min-width: 769px){.face-swap-upload-page[_ngcontent-%COMP%] > .need-help-button[_ngcontent-%COMP%]{display:none}}.face-swap-upload-page[_ngcontent-%COMP%] .face-swap-rating-icon-button[_ngcontent-%COMP%]{background:none;border:none;padding:0;cursor:pointer}.face-swap-upload-page[_ngcontent-%COMP%] .face-swap-rating-icon[_ngcontent-%COMP%]{width:32px;height:32px}.face-swap-upload-page[_ngcontent-%COMP%] .rating-buttons-container[_ngcontent-%COMP%]{-webkit-transition:opacity .4s ease,visibility .4s ease;transition:opacity .4s ease,visibility .4s ease;opacity:1;display:-webkit-box;display:-ms-flexbox;display:flex;grid-gap:12px;gap:12px;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;background-color:#fafafa;border-radius:2px;padding:12px;margin:auto 24px}@media (min-width: 769px){.face-swap-upload-page[_ngcontent-%COMP%] .rating-buttons-container[_ngcontent-%COMP%]{margin:0}}.face-swap-upload-page[_ngcontent-%COMP%] .rating-buttons-container[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{margin-bottom:0}.face-swap-upload-page[_ngcontent-%COMP%] .rating-buttons-container.fade-out[_ngcontent-%COMP%]{opacity:0;visibility:hidden;pointer-events:none}@media (min-width: 769px){.face-swap-upload-page[_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;max-width:1200px;margin:0 auto;padding-left:20px;padding-right:20px;position:relative;z-index:auto;overflow:hidden}}.face-swap-upload-page[_ngcontent-%COMP%] > .back-button[_ngcontent-%COMP%]{position:absolute;top:24px;left:24px;width:20px;height:20px}.face-swap-upload-page[_ngcontent-%COMP%] > .back-button[_ngcontent-%COMP%] > img[_ngcontent-%COMP%]{height:100%}@media (min-width: 769px){.face-swap-upload-page[_ngcontent-%COMP%] > .back-button[_ngcontent-%COMP%]{display:none}}.face-swap-upload-page[_ngcontent-%COMP%] > .upload-page-breadcrumbs[_ngcontent-%COMP%]{display:none}@media (min-width: 769px){.face-swap-upload-page[_ngcontent-%COMP%] > .upload-page-breadcrumbs[_ngcontent-%COMP%]{display:-webkit-box;display:-ms-flexbox;display:flex}}.face-swap-upload-page[_ngcontent-%COMP%] > .upload-page-header[_ngcontent-%COMP%]{font-size:16px;font-weight:700;text-align:center;padding:24px 0;margin:0}@media (min-width: 769px){.face-swap-upload-page[_ngcontent-%COMP%] > .upload-page-header[_ngcontent-%COMP%]{font-size:20px}}.face-swap-upload-page[_ngcontent-%COMP%] > .upload-container[_ngcontent-%COMP%]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;padding:0 24px 100px;grid-gap:24px;gap:24px;-webkit-box-align:center;-ms-flex-align:center;align-items:center}@media (min-width: 769px){.face-swap-upload-page[_ngcontent-%COMP%] > .upload-container[_ngcontent-%COMP%]{-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row;flex-direction:row;-webkit-box-align:start;-ms-flex-align:start;align-items:flex-start;padding:0 0 10px}}.face-swap-upload-page[_ngcontent-%COMP%] > .upload-container[_ngcontent-%COMP%] face-swap-card-preview[_ngcontent-%COMP%]{display:block;width:100%;height:100%;max-width:400px;max-height:569px}.face-swap-upload-page[_ngcontent-%COMP%] > .upload-container[_ngcontent-%COMP%] >
1 .upload-editor[_ngcontent-%COMP%]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:reverse;-ms-flex-direction:column-reverse;flex-direction:column-reverse;grid-gap:16px;gap:16px;max-width:400px;width:100vw}.face-swap-upload-page[_ngcontent-%COMP%] > .upload-container[_ngcontent-%COMP%] > .upload-editor[_ngcontent-%COMP%] .need-help-cta[_ngcontent-%COMP%]{display:none}@media (min-width: 769px){.face-swap-upload-page[_ngcontent-%COMP%] > .upload-container[_ngcontent-%COMP%] > .upload-editor[_ngcontent-%COMP%] .need-help-cta[_ngcontent-%COMP%]{color:#000;display:block;text-align:center;font-size:16px;text-decoration:underline;cursor:pointer}}@media (min-width: 769px){.face-swap-upload-page[_ngcontent-%COMP%] > .upload-container[_ngcontent-%COMP%] > .upload-editor[_ngcontent-%COMP%]{-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;grid-gap:24px;gap:24px}}.face-swap-upload-page[_ngcontent-%COMP%] > .upload-container[_ngcontent-%COMP%] > .upload-editor[_ngcontent-%COMP%] > .photo-tip[_ngcontent-%COMP%]{background-color:transparent;padding:0}@media (min-width: 769px){.face-swap-upload-page[_ngcontent-%COMP%] > .upload-container[_ngcontent-%COMP%] > .upload-editor[_ngcontent-%COMP%] > .photo-tip[_ngcontent-%COMP%]{background-color:#fafafa;border-radius:2px;padding:24px}}.face-swap-upload-page[_ngcontent-%COMP%] > .upload-container[_ngcontent-%COMP%] > .upload-editor[_ngcontent-%COMP%] > .photo-tip[_ngcontent-%COMP%] > .initial-photo-tip[_ngcontent-%COMP%]{width:100%;padding:10px 0}@media (min-width: 769px){.face-swap-upload-page[_ngcontent-%COMP%] > .upload-container[_ngcontent-%COMP%] > .upload-editor[_ngcontent-%COMP%] > .photo-tip[_ngcontent-%COMP%] > .initial-photo-tip[_ngcontent-%COMP%]{display:none}}.face-swap-upload-page[_ngcontent-%COMP%] > .upload-container[_ngcontent-%COMP%] > .upload-editor[_ngcontent-%COMP%] > .photo-tip[_ngcontent-%COMP%] > .photo-tip-description[_ngcontent-%COMP%]{font-size:14px;margin-bottom:24px}.face-swap-upload-page[_ngcontent-%COMP%] > .upload-container[_ngcontent-%COMP%] > .upload-editor[_ngcontent-%COMP%] > .photo-tip[_ngcontent-%COMP%] > .photo-tip-title[_ngcontent-%COMP%]{font-weight:600;font-size:16px}.face-swap-upload-page[_ngcontent-%COMP%] > .upload-container[_ngcontent-%COMP%] > .upload-editor[_ngcontent-%COMP%] > .photo-tip[_ngcontent-%COMP%] > .photo-tip-title[_ngcontent-%COMP%], .face-swap-upload-page[_ngcontent-%COMP%] > .upload-container[_ngcontent-%COMP%] > .upload-editor[_ngcontent-%COMP%] > .photo-tip[_ngcontent-%COMP%] > .photo-tip-description[_ngcontent-%COMP%]{display:none}@media (min-width: 769px){.face-swap-upload-page[_ngcontent-%COMP%] > .upload-container[_ngcontent-%COMP%] > .upload-editor[_ngcontent-%COMP%] > .photo-tip[_ngcontent-%COMP%] > .photo-tip-title[_ngcontent-%COMP%], .face-swap-upload-page[_ngcontent-%COMP%] > .upload-container[_ngcontent-%COMP%] > .upload-editor[_ngcontent-%COMP%] > .photo-tip[_ngcontent-%COMP%] > .photo-tip-description[_ngcontent-%COMP%]{display:block}}.face-swap-upload-page[_ngcontent-%COMP%] > .upload-container[_ngcontent-%COMP%] > .upload-editor[_ngcontent-%COMP%] > .photo-tip[_ngcontent-%COMP%] > .photo-tip-error[_ngcontent-%COMP%]{text-align:center;padding:0 24px;margin-bottom:0}@media (min-width: 769px){.face-swap-upload-page[_ngcontent-%COMP%] > .upload-container[_ngcontent-%COMP%] > .upload-editor[_ngcontent-%COMP%] > .photo-tip[_ngcontent-%COMP%] > .photo-tip-error[_ngcontent-%COMP%]{text-align:left;padding:0;margin-bottom:16px}}.face-swap-upload-page[_ngcontent-%COMP%] > .upload-container[_ngcontent-%COMP%] > .upload-editor[_ngcontent-%COMP%] > .button-container[_ngcontent-%COMP%]{-webkit-box-shadow:-4px -4px 4px 0px #C5C5C540;box-shadow:-4px -4px 4px #c5c5c540;padding:18px;position:fixed;width:100%;bottom:0;background:#ffffff;left:0;display:-webkit-box;display:-ms-flexbox;display:flex;grid-gap:12px;gap:12px}.face-swap-upload-page[_ngcontent-%COMP%] > .upload-container[_ngcontent-%COMP%] > .upload-editor[_ngcontent-%COMP%] > .button-container[_ngcontent-%COMP%] > .face-swap-button[_ngcontent-%COMP%]{-webkit-box-flex:1;-ms-flex-positive:1;flex-grow:1;width:100%}@media (min-width: 769px){.face-swap-upload-page[_ngcontent-%COMP%] > .upload-container[_ngcontent-%COMP%] >
1 .upload-editor[_ngcontent-%COMP%] > .button-container[_ngcontent-%COMP%]{position:relative;-webkit-box-shadow:none;box-shadow:none;padding:0}}.face-swap-loading-content[_ngcontent-%COMP%]{-webkit-animation:pulse 1s cubic-bezier(.1,0,.3,1) infinite;animation:pulse 1s cubic-bezier(.1,0,.3,1) infinite;background:url(https://images-fe.thortful.com/svg/loader-face-swap-mobile.svg) top center no-repeat;width:100%;height:112px}@media (min-width: 769px){.face-swap-loading-content[_ngcontent-%COMP%]{background:url(https://images-fe.thortful.com/svg/loader-face-swap-desktop.svg) top center no-repeat;height:249px}}"]}),e})();var oe=n(6650),ce=n(17419);let re=(()=>{class e{constructor(e,t){this.router=e,this.Store=t}canActivate(e){const t=e.paramMap.get("cardId");return this.Store.select("featureFlag","config","WEB-2252").pipe((0,oe.P)(e=>"boolean"==typeof e),(0,T.U)(e=>!!e||!!t&&this.router.createUrlTree([`/card/${t}`])))}}return e.\u0275fac=function(t){return new(t||e)(s.\u0275\u0275inject(i.F0),s.\u0275\u0275inject(ce.yh))},e.\u0275prov=s.\u0275\u0275defineInjectable({token:e,factory:e.\u0275fac}),e})();var se=n(13486),pe=n(58267),le=n(10480),de=n(51951),ge=n(80802);let fe=(()=>{class e{constructor(e,t){this.cardService=e,this.router=t}resolve(e){const t=e.paramMap.get("cardId");return this.cardService.fetchCard(t).pipe((0,pe.K)(()=>(0,se.of)(this.redirectTo404()))).filter(e=>"boolean"!=typeof e).pipe((0,le.w)(e=>(0,se.of)(e).map(de.wH)))}redirectTo404(){return this.router.navigate(["/page-not-found"])}}return e.\u0275fac=function(t){return new(t||e)(s.\u0275\u0275inject(ge.J),s.\u0275\u0275inject(i.F0))},e.\u0275prov=s.\u0275\u0275defineInjectable({token:e,factory:e.\u0275fac}),e})();const me=[{component:ie,path:":cardId",data:{url:"face-swap-card-upload",type:"product",currency:!0,appLinks:!0,shareLocation:!0},resolve:{card:fe},canActivate:[re]}];let ue=(()=>{class e{}return e.\u0275fac=function(t){return new(t||e)},e.\u0275mod=s.\u0275\u0275defineNgModule({type:e}),e.\u0275inj=s.\u0275\u0275defineInjector({imports:[[i.Bz.forChild(me)],i.Bz]}),e})();var we=n(41779),he=n(67053),xe=n(66389),be=n(34586),Ce=n(551);let ve=(()=>{class e{}return e.\u0275fac=function(t){return new(t||e)},e.\u0275mod=s.\u0275\u0275defineNgModule({type:e}),e.\u0275inj=s.\u0275\u0275defineInjector({providers:[he.g,xe.n,u.j,re,fe],imports:[[a.ez,ue,we.P,be.f,Ce.K]]}),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.