PageSourceSearch

https://static.lightxeditor.com/web/4430.585964902209ab61.js

js lightxeditor.com collected 2026-09-24 09:23:53 UTC 287,424 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunklightx=self.webpackChunklightx||[]).push([[4430],{64430:(nt,Q,d)=>{d.r(Q),d.d(Q,{VideoTemplateEditorUiModule:()=>Ea});var m=d(60177),S=d(84341),q=d(83339),ee=d(48928),L=d(21626),re=d(34870),_=d(33391),ae=d(72913),B=d(89818),V=d(19338),N=d(85188),le=d(21652),te=d(43387),A=d(96545),ce=d(61053),de=d(90866),pe=d(79421),me=d(13227),ue=d(24269),T=d(80186),O=d(54556),C=d(74710),v=d(94329),f=d(10467),P=d(1408),w=d(3781),I=d(32294),G=d(28567),ot=d(63065),D=d(59176),E=d(93552),ge=d(28662),st=d(21413),j=d(88450),he=d(92452),U=d(68465),Z=d(16471),rt=d(85269),at=d(24886),k=d(16478),Se=d(67294),we=d(50585),lt=d(9095),ie=d(71971),ye=d(67091),Ie=d(95659),e=d(54438),ct=d(66518),Ee=d(55349),ne=d(84301),oe=d(74983),dt=d(45944),_e=d(20999),Me=d(32764),R=d(68010),Oe=d(74343),Ve=d(91367),pt=d(22154),mt=d(43779),ut=d(33993),gt=d(24593),ht=d(45975),_t=d(90521),vt=d(68287),ft=d(13316),bt=d(90858),Ct=d(71897),M=d(68064),xt=d(38957),kt=d(69698),Tt=d(81058),jt=d(72619),Pt=d(49679),St=d(10561),F=d(45312),wt=d(27707),yt=d(6421),It=d(25119),ve=d(62261),Et=d(48039),Re=d(60004),X=d(33645),Mt=d(39385),K=d(23486),Ge=d(86820),$=d(54124);const Be=o=>({gray:o}),Ot=o=>({"text-black":o});function Vt(o,r){if(1&o){const n=e.RV6();e.j41(0,"div",15),e.bIt("click",function(){e.eBV(n);const i=e.XpG();return i.searchTerm="",e.Njj(i.refreshSearch())}),e.nrm(1,"pi",16),e.k0s()}}function Rt(o,r){if(1&o){const n=e.RV6();e.j41(0,"input",17),e.mxI("ngModelChange",function(i){e.eBV(n);const s=e.XpG();return e.DH7(s.searchTerm,i)||(s.searchTerm=i),e.Njj(i)}),e.bIt("keydown.enter",function(){e.eBV(n);const i=e.XpG();return e.Njj(i.searchItems())}),e.k0s()}if(2&o){const n=e.XpG();e.R50("ngModel",n.searchTerm),e.Y8G("ngClass",e.eq3(2,Be,""!=n.searchTerm))}}function Gt(o,r){if(1&o){const n=e.RV6();e.j41(0,"input",18),e.mxI("ngModelChange",function(i){e.eBV(n);const s=e.XpG();return e.DH7(s.searchTerm,i)||(s.searchTerm=i),e.Njj(i)}),e.bIt("keydown.enter",function(){e.eBV(n);const i=e.XpG();return e.Njj(i.searchItems())}),e.k0s()}if(2&o){const n=e.XpG();e.R50("ngModel",n.searchTerm),e.Y8G("ngClass",e.eq3(2,Be,""!=n.searchTerm))}}function Bt(o,r){if(1&o){const n=e.RV6();e.j41(0,"div",19)(1,"ng-select",20),e.mxI("ngModelChange",function(i){e.eBV(n);const s=e.XpG();return e.DH7(s.searchMode,i)||(s.searchMode=i),e.Njj(i)}),e.bIt("change",function(){e.eBV(n);const i=e.XpG();return e.Njj(i.modeChanged())}),e.j41(2,"ng-option",21),e.nrm(3,"ei",22),e.EFF(4,"Video"),e.k0s(),e.j41(5,"ng-option",21),e.nrm(6,"ei",23),e.EFF(7,"Image"),e.k0s()()()}if(2&o){const n=e.XpG();e.R7$(),e.Y8G("searchable",!1)("clearable",!1),e.R50("ngModel",n.searchMode),e.R7$(),e.Y8G("value","video"),e.R7$(3),e.Y8G("value","image")}}function Dt(o,r){1&o&&e.nrm(0,"p",37)}function Nt(o,r){1&o&&(e.j41(0,"div",50)(1,"span",51),e.EFF(2,"Loading..."),e.k0s()())}function At(o,r){if(1&o&&(e.j41(0,"div",46)(1,"video",47),e.nrm(2,"source",48),e.k0s(),e.DNE(3,Nt,3,0,"div",49),e.k0s()),2&o){const n=e.XpG().$implicit,t=e.XpG(2);e.R7$(),e.FS9("id",n.picture_id),e.R7$(),e.Y8G("src",n.videos.tiny.url,e.B4B),e.R7$(),e.Y8G("ngIf",n.picture_id===t.lastPlayedVideo.picture_id&&t.loading)}}function Ut(o,r){if(1&o){const n=e.RV6();e.j41(0,"div",38)(1,"div",39)(2,"img",40),e.bIt("click",function(){const i=e.eBV(n).$implicit,s=e.XpG(2);return e.Njj(s.addVideo(i))}),e.k0s(),e.DNE(3,At,4,3,"div",41),e.j41(4,"div",42)(5,"span")(6,"button",43),e.bIt("click",function(i){const s=e.eBV(n).$implicit,a=e.XpG(2);return e.Njj(a.playVideo(s,i))}),e.nrm(7,"i",44),e.k0s()(),e.j41(8,"span",45),e.EFF(9),e.nI1(10,"minuteSeconds"),e.k0s()()()()}if(2&o){const n=r.$implicit,t=e.XpG(2);e.R7$(2),e.FCK("src","",t.basePixabayVideoThumbUrl,"",n.picture_id,"_200x150.jpg",e.B4B),e.R7$(),e.Y8G("ngIf",n.isPlay),e.R7$(6),e.JRh(e.bMT(10,5,n.duration))}}function Ft(o,r){1&o&&(e.j41(0,"div",63)(1,"span",51),e.EFF(2,"Loading..."),e.k0s()())}function Xt(o,r){if(1&o){const n=e.RV6();e.j41(0,"div",60)(1,"video",61),e.bIt("mouseover",function(){e.eBV(n);const i=e.XpG().$implicit,s=e.XpG(2);return e.Njj(s.showHidePauseIcon(i))})("mouseout",function(){e.eBV(n);const i=e.XpG(3);return e.Njj(i.showpauseicon=!1)}),e.nrm(2,"source",48),e.k0s(),e.DNE(3,Ft,3,0,"div",62),e.k0s()}if(2&o){const n=e.XpG().$implicit,t=e.XpG(2);e.R7$(),e.FS9("id",n.picture_id),e.R7$(),e.Y8G("src",n.videos.tiny.url,e.B4B),e.R7$(),e.Y8G("ngIf",n.picture_id===t.lastPlayedVideo.picture_id&&t.loading)}}function $t(o,r){if(1&o){const n=e.RV6();e.j41(0,"a",64),e.bIt("click",function(i){e.eBV(n);const s=e.XpG().$implicit,a=e.XpG(2);return e.Njj(a.playVideo(s,i))}),e.nrm(1,"pi",65),e.k0s()}}function zt(o,r){if(1&o){const n=e.RV6();e.j41(0,"a",64),e.bIt("click",function(i){e.eBV(n);const s=e.XpG().$implicit,a=e.XpG(2);return e.Njj(a.playVideo(s,i))}),e.nrm(1,"pi",66),e.k0s()}}function Yt(o,r){if(1&o){const n=e.RV6();e.j41(0,"div",52)(1,"div",53)(2,"img",40),e.bIt("click",function(){const i=e.eBV(n).$implicit,s=e.XpG(2);return e.Njj(s.addVideo(i))}),e.k0s(),e.DNE(3,Xt,4,3,"div",54),e.j41(4,"div",55),e.bIt("mouseover",function(){const i=e.eBV(n).$implicit,s=e.XpG(2);return e.Njj(s.showHidePauseIcon(i))}),e.j41(5,"div",56),e.DNE(6,$t,2,0,"a",57)(7,zt,2,0,"a",57),e.k0s()(),e.j41(8,"div",58)(9,"div",59),e.EFF(10),e.nI1(11,"minuteSeconds"),e.k0s()()()()}if(2&o){const n=r.$implicit,t=e.XpG(2);e.R7$(2),e.FCK("src","",t.basePixabayVideoThumbUrl,"",n.picture_id,"_200x150.jpg",e.B4B),e.R7$(),e.Y8G("ngIf",n.isPlay),e.R7$(3),e.Y8G("ngIf",!n.isPlay),e.R7$(),e.Y8G("ngIf",n.isPlay&&t.showpauseicon),e.R7$(3),e.JRh(e.bMT(11,7,n.duration))}}function Lt(o,r){1&o&&(e.j41(0,"div",63)(1,"span",51),e.EFF(2,"Loa
1ding..."),e.k0s()())}function Wt(o,r){if(1&o){const n=e.RV6();e.j41(0,"div",60)(1,"video",61),e.bIt("mouseover",function(){e.eBV(n);const i=e.XpG().$implicit,s=e.XpG(2);return e.Njj(s.showHidePauseIcon(i))})("mouseout",function(){e.eBV(n);const i=e.XpG(3);return e.Njj(i.showpauseicon=!1)}),e.nrm(2,"source",48),e.k0s(),e.DNE(3,Lt,3,0,"div",62),e.k0s()}if(2&o){const n=e.XpG().$implicit,t=e.XpG(2);e.R7$(),e.FS9("id",n.picture_id),e.R7$(),e.Y8G("src",n.videos.tiny.url,e.B4B),e.R7$(),e.Y8G("ngIf",n.picture_id===t.lastPlayedVideo.picture_id&&t.loading)}}function Ht(o,r){if(1&o){const n=e.RV6();e.j41(0,"a",64),e.bIt("click",function(i){e.eBV(n);const s=e.XpG().$implicit,a=e.XpG(2);return e.Njj(a.playVideo(s,i))}),e.nrm(1,"pi",65),e.k0s()}}function Zt(o,r){if(1&o){const n=e.RV6();e.j41(0,"a",64),e.bIt("click",function(i){e.eBV(n);const s=e.XpG().$implicit,a=e.XpG(2);return e.Njj(a.playVideo(s,i))}),e.nrm(1,"pi",66),e.k0s()}}function Kt(o,r){if(1&o){const n=e.RV6();e.j41(0,"div",52)(1,"div",53)(2,"img",40),e.bIt("click",function(){const i=e.eBV(n).$implicit,s=e.XpG(2);return e.Njj(s.addVideo(i))}),e.k0s(),e.DNE(3,Wt,4,3,"div",54),e.j41(4,"div",55),e.bIt("mouseover",function(){const i=e.eBV(n).$implicit,s=e.XpG(2);return e.Njj(s.showHidePauseIcon(i))}),e.j41(5,"div",56),e.DNE(6,Ht,2,0,"a",57)(7,Zt,2,0,"a",57),e.k0s()(),e.j41(8,"div",58)(9,"div",59),e.EFF(10),e.nI1(11,"minuteSeconds"),e.k0s()()()()}if(2&o){const n=r.$implicit,t=e.XpG(2);e.R7$(2),e.FCK("src","",t.basePixabayVideoThumbUrl,"",n.picture_id,"_200x150.jpg",e.B4B),e.R7$(),e.Y8G("ngIf",n.isPlay),e.R7$(3),e.Y8G("ngIf",!n.isPlay),e.R7$(),e.Y8G("ngIf",n.isPlay&&t.showpauseicon),e.R7$(3),e.JRh(e.bMT(11,7,n.duration))}}function Jt(o,r){if(1&o&&e.nrm(0,"blank-thumbs",67),2&o){const n=e.XpG(2);e.Y8G("count",n.pageSize)}}function Qt(o,r){if(1&o){const n=e.RV6();e.j41(0,"div",24)(1,"div",25),e.nrm(2,"img",26),e.k0s(),e.j41(3,"div",27),e.EFF(4),e.k0s(),e.DNE(5,Dt,1,0,"p",28),e.j41(6,"div",29,0),e.bIt("scrolled",function(){e.eBV(n);const i=e.XpG();return e.Njj(i.scrollVideoEnd())}),e.j41(8,"div",30),e.DNE(9,Ut,11,7,"div",31),e.k0s(),e.j41(10,"div",32)(11,"div",33),e.DNE(12,Yt,12,9,"div",34),e.k0s(),e.j41(13,"div",35),e.DNE(14,Kt,12,9,"div",34),e.k0s()(),e.DNE(15,Jt,1,1,"blank-thumbs",36),e.k0s()()}if(2&o){const n=e.XpG();e.R7$(4),e.JRh(n.photoLabel),e.R7$(),e.Y8G("ngIf",!n.isVideoProgress&&0==n.templateVideosA.length&&0==n.templateVideosB.length),e.R7$(),e.Y8G("scrollWindow",!1)("infiniteScrollDistance",.6)("infiniteScrollUpDistance",2)("infiniteScrollThrottle",120),e.R7$(3),e.Y8G("ngForOf",n.stockVideos),e.R7$(3),e.Y8G("ngForOf",n.templateVideosA),e.R7$(2),e.Y8G("ngForOf",n.templateVideosB),e.R7$(),e.Y8G("ngIf",n.isVideoProgress)}}function qt(o,r){if(1&o&&(e.j41(0,"span")(1,"p",72),e.EFF(2),e.k0s()()),2&o){const n=e.XpG(2);e.R7$(),e.Y8G("ngClass",e.eq3(2,Ot,n.from)),e.R7$(),e.JRh(n.notFoundStock)}}function ei(o,r){if(1&o){const n=e.RV6();e.j41(0,"div",73),e.bIt("click",function(){const i=e.eBV(n).$implicit,s=e.XpG(2);return e.Njj(s.addImage(i))}),e.j41(1,"div",74),e.nrm(2,"img",75),e.k0s()()}if(2&o){const n=r.$implicit;e.R7$(2),e.Y8G("src",n.previewURL,e.B4B)}}function ti(o,r){if(1&o){const n=e.RV6();e.j41(0,"div",73),e.bIt("click",function(){const i=e.eBV(n).$implicit,s=e.XpG(2);return e.Njj(s.addImage(i))}),e.j41(1,"div",74),e.nrm(2,"img",75),e.k0s()()}if(2&o){const n=r.$implicit;e.R7$(2),e.Y8G("src",n.previewURL,e.B4B)}}function ii(o,r){if(1&o){const n=e.RV6();e.j41(0,"div",76)(1,"div",77)(2,"button",78),e.bIt("click",function(){e.eBV(n);const i=e.XpG(2);return e.Njj(i.scrollImage())}),e.EFF(3,"Load More"),e.k0s()()()}if(2&o){const n=e.XpG(2);e.R7$(2),e.Y8G("disabled",n.isImageProgress)}}function ni(o,r){if(1&o&&e.nrm(0,"blank-thumbs",67),2&o){const n=e.XpG(2);e.Y8G("count",n.pageSize)}}function oi(o,r){if(1&o){const n=e.RV6();e.j41(0,"div",24)(1,"div",25),e.nrm(2,"img",26),e.k0s(),e.j41(3,"h5",27),e.EFF(4),e.k0s(),e.DNE(5,qt,3,4,"span",68),e.j41(6,"div",69,1),e.bIt("scrolled",function(){e.eBV(n);const i=e.XpG();return e.Njj(i.scrollImage())}),e.j41(8,"div",32)(9,"div",33),e.DNE(10,ei,3,1,"div",70),e.k0s(),e.j41(11,"div",35),e.DNE(12,ti,3,1,"div",70),e.k0s()(),e.DNE(13,ii,4,1,"div",71)(14,ni,1,1,"blank-thumbs",36),e.k0s()()}if(2&o){const n=e.XpG();e.R7$(4),e.JRh(n.photoLabel),e.R7$(),e.Y8G("ngIf",!n.isImageProgress&&0==n.templateImagesA.length&&0==n.templateImagesB.length),e.R7$(5),e.Y8G("ngForOf",n.templateImagesA),e.R7$(2),e.Y8G("ngForOf",n.templateImagesB),e.R7$(),e.Y8G("ngIf",!n.stockImagePageEnd),e.R7$(),e.Y8G("ngIf",n.isImageProgress)}}let si=(()=>{var o;
1class r{constructor(t,i,s,a,l){this.mediaContentService=t,this.route=i,this.authService=s,this.ngZone=a,this.document=l,this.templateImagesA=[],this.templateImagesB=[],this.showpauseicon=!1,this.templateVideosA=[],this.templateVideosB=[],this.serchPlaceHolder="Search photos",this.stockVideos=[],this.activePane="stock",this.stockVideosPageNumber=1,this.isVideoProgress=!1,this.searchTerm="",this.searchMode="image",this.basePixabayVideoThumbUrl=F.c.basePixabayVideoThumbUrl,this.stockImages=[],this.stockImagePageNumber=1,this.stockImagePageEnd=!1,this.stockVideoPageEnd=!1,this.isImageProgress=!1,this.isUploadedImageProgress=!1,this.isUploadedImageLoaded=!1,this.clickStockImage=new e.bkB,this.clickStockVideo=new e.bkB,this.mediaAccept="video/*,image/*",this.uplodedAssets=[],this.pageSize=14,this.loading=!0,this.photoLabel="Photos",this.notFoundStock=k.b.message.notFoundStock,this.showVideos=!1,this.onLoadStart=c=>{this.loading=!0},this.onCanPlay=c=>{this.loading=!1},this.user=this.authService.currentUser(),this.from=this.route.snapshot.queryParamMap.get("from")}ngOnInit(){this.getStockImages()}showHidePauseIcon(t){this.showpauseicon=!!t.isPlay}modeChanged(){"video"===this.searchMode?(this.resetVideos(),this.get
1StockVideos(),this.photoLabel="Videos"):"image"===this.searchMode&&(this.resetImages(),this.getStockImages(),this.photoLabel="Photos"),this.searchTerm=""}searchItems(){"image"===this.searchMode?(this.resetImages(),this.searchStockImages(this.searchTerm)):(this.resetVideos(),this.searchStockVideos(this.searchTerm)),this.photoLabel="Search Result"}resetImages(){this.stockImagePageNumber=1,this.stockImages=[],this.templateImagesA=[],this.templateImagesB=[],this.stockImagePageEnd=!1}resetVideos(){this.stockVideosPageNumber=1,this.stockVideos=[],this.templateVideosA=[],this.templateVideosB=[],this.stockVideoPageEnd=!1}playVideo(t,i){i.preventDefault(),t.isPlay?(t.isPlay=!1,this.removeEventFromvideo(t),this.lastPlayedVideo&&(this.lastPlayedVideo.isPlay=!1,this.removeEventFromvideo(this.lastPlayedVideo))):(this.lastPlayedVideo&&(this.lastPlayedVideo.isPlay=!1,this.removeEventFromvideo(this.lastPlayedVideo)),t.isPlay=!0,this.lastPlayedVideo=t,setTimeout(()=>{this.addEventTovideo(t)},0))}addEventTovideo(t){const i=this.document.getElementById(t.picture_id);i&&(i.addEventListener("loadstart",this.onLoadStart),i.addEventListener("waiting",this.onLoadStart),i.addEventListener("canplay",this.onCanPlay))}removeEventFromvideo(t){const i=this.document.getElementById(t.picture_id);i&&(i.removeEventListener("loadstart",this.onLoadStart),i.removeEventListener("waiting",this.onLoadStart),i.removeEventListener("canplay",this.onCanPlay))}getStockImages(){this.isImageProgress=!0,this.mediaContentService.getImages(this.stockImagePageNumber,this.pageSize,t=>{const i=Object.assign([],t.hits);this.ngZone.run(()=>{if(i&&i.length>0){i.length<this.pageSize&&(this.stockImagePageEnd=!0);let s=Math.round(i.length/2),a=i.splice(0,s);this.templateImagesA=this.templateImagesA.concat(a),this.templateImagesB=this.templateImagesB.concat(i)}else this.stockImagePageEnd=!0}),t.hits&&0==t.hits.length&&(this.stockImagePageEnd=!0),this.isImageProgress=!1},t=>{this.isImageProgress=!1}),setTimeout(()=>{window.dispatchEvent(new Event("resize"))},50)}searchStockImages(t){t&&("string"==typeof t||t instanceof String)?(this.isImageProgress=!0,this.mediaContentService.searchStockImages(t,this.stockImagePageNumber,this.pageSize,i=>{this.ngZone.run(()=>{const s=Object.assign([],i.hits);if(s&&s.length>0){s.length<this.pageSize&&(this.stockImagePageEnd=!0);let a=Math.round(s.length/2),l=s.splice(0,a);this.templateImagesA=this.templateImagesA.concat(l),this.templateImagesB=this.templateImagesB.concat(s)}else this.stockImagePageEnd=!0,this.photoLabel=""}),i.hits&&0==i.hits.length&&(this.stockImagePageEnd=!0),this.isImageProgress=!1},i=>{this.isImageProgress=!1})):this.modeChanged(),setTimeout(()=>{window.dispatchEvent(new Event("resize"))},50)}getStockVideos(){this.isVideoProgress=!0,this.mediaContentService.getStockVideos(this.stockVideosPageNumber,this.pageSize,t=>{let i=this.stockVideos.concat(t.hits);this.ngZone.run(()=>{if(i&&i.length>0){i.length<this.pageSize&&(this.stockVideoPageEnd=!0);let s=Math.round(i.length/2),a=i.splice(0,s);this.templateVideosA=this.templateVideosA.concat(a),this.templateVideosB=this.templateVideosB.concat(i)}else this.stockVideoPageEnd=!0}),t.hits&&0==t.hits.length&&(this.stockVideoPageEnd=!0),this.isVideoProgress=!1},t=>{this.isVideoProgress=!1}),setTimeout(()=>{window.dispatchEvent(new Event("resize"))},50)}searchStockVideos(t){t&&("string"==typeof t||t instanceof String)?(this.isVideoProgress=!0,this.stockVideosPageNumber=1,this.mediaContentService.searchStockVideos(t,this.stockVideosPageNumber,this.pageSize,i=>{this.ngZone.run(()=>{const s=Object.assign([],i.hits);if(s&&s.length>0){s.length<this.pageSize&&(this.stockVideoPageEnd=!0);let a=Math.round(s.length/2),l=s.splice(0,a);this.templateVideosA=this.templateVideosA.concat(l),this.templateVideosB=this.templateVideosB.concat(s)}else this.stockVideoPageEnd=!0,this.photoLabel=""}),i.hits&&0==i.hits.length&&(this.stockVideoPageEnd=!0),this.isVideoProgress=!1},i=>{this.isVideoProgress=!1})):this.modeChanged(),setTimeout(()=>{window.dispatchEvent(new Event("resize"))},50)}addImage(t){t.thumbnail=t.previewURL,this.clickStockImage.emit(t)}addVideo(t){t.thumbnail=this.basePixabayVideoThumbUrl+t.picture_id+"_200x150.jpg",this.clickStockVideo.emit(t)}scrollImageEnd(){}scrollImage(){this.stockImagePageEnd||this.isImageProgress||(this.isImageProgress=!0,this.stockImagePageNumber++,this.searchTerm?this.searchStockImages(this.searchTerm):this.getStockImages())}scrollVideoEnd(){this.stockVideoPageEnd||this.isVideoProgress||(this.isVideoProgress=!0,this.stockVideosPageNumber++,this.searchTerm?this.searchStockVideos(this.searchTerm):this.getStockVideos())}dropped(t){}refreshSearch(){this.searchTerm="",this.modeChanged()}}return(o=r).\u0275fac=function(t){return new(t||o)(e.rXU(ve.Z),e.rXU(C.nX),e.rXU(R.u),e.rXU(e.SKi),e.rXU(m.qQ))},o.\u0275cmp=e.VBU({type:o,selectors:[["stock-media-list"]],inputs:{showVideos:"showVideos"},outputs:{clickStockImage:"clickStockImage",clickStockVideo:"clickStockVideo"},decls:14,vars:6,consts:[["stockVideoSb",""],["stockImageSb",""],[1,"common-container","mt-0"],[1,"mt-10"],[1,"wp-100"],[1,"input-group","searchmedia"],[1,"input-group-append"],[1,"input-group-text","border-end-0"],["name","searchLineIcon",1,"f-20"],["class","vedio-editor-searchbar",3,"click",4,"ngIf"],["type","search","type","text","class","form-control text-normal border-start-0 ps-1","style","padding: 0px 32px 0px 0px;","placeholder","Search videos",3,"ngModel","ngClass","ngModelChange","keydown.enter",4,"ngIf"],["type","search","type","text","class","form-control text-normal border-start-0 ps-1","style","padding: 0px 32px 0px 0px;","placeholder","Search images",3,"ngModel","ngClass","ngModelChange","keydown.enter",4,"ngIf"],["class","wp-100 pt-8",4,"ngIf"],[1,"pane-section","ps-content-top-0"],["class","scroll-content",4,"ngIf"],[1,"vedio-editor-searchbar",3,"click"],["name","searchClose",1,"pointer","f-14"],["type","search","type","text","placeholder","Search videos",1,"form-control","text-normal","border-start-0","ps-1",2,"padding","0p
1x 32px 0px 0px",3,"ngModelChange","keydown.enter","ngModel","ngClass"],["type","search","type","text","placeholder","Search images",1,"form-control","text-normal","border-start-0","ps-1",2,"padding","0px 32px 0px 0px",3,"ngModelChange","keydown.enter","ngModel","ngClass"],[1,"wp-100","pt-8"],["autofocus","",1,"select-ctrl",3,"ngModelChange","change","searchable","clearable","ngModel"],[3,"value"],["name","videoicon",1,"f-24","me-2"],["name","imageicon",1,"f-24","me-2"],[1,"scroll-content"],[1,"powered-by","ml-8"],["src","https://static.lightxeditor.com/assets/images/powered-by-pixabay.png","width","149px","height","32px"],[1,"m-0","text-normal","grey-100","text-semi","ms-3","mt-10","mb-6"],["class","notfoundImage",4,"ngIf"],["customScrollDir","","infiniteScroll","",1,"is-popover-tb-n","scroll-container","darkscroll",2,"height","calc(100% - 45px)",3,"scrolled","scrollWindow","infiniteScrollDistance","infiniteScrollUpDistance","infiniteScrollThrottle"],[1,"p-0","nogut"],["class","video-thumb image-thumb",4,"ngFor","ngForOf"],[2,"display","flex"],["id","column",1,"colA"],["class","image-thumb-template",4,"ngFor","ngForOf"],["id","column",1,"colB"],[3,"count",4,"ngIf"],[1,"notfoundImage"],[1,"video-thumb","image-thumb"],[1,"inner"],["disableRC","",3,"click","src"],["style","    position: absolute;\n            width: 100%;\n            height: 100%;",4,"ngIf"],[1,"meta","justify-content-between","align-items-center"],[1,"btn","btn-play-dark",3,"click"],[1,"icon","play-scene-icon","hw-14"],[1,"text-sm"],[2,"position","absolute","width","100%","height","100%"],["width","100%","height","100%","muted","true","autoplay","autoplay","disableRC","",1,"video-box",3,"id"],[3,"src"],["class","spinner-border","role","status","style","position: absolute;\n                top: 50%;\n                left: 50%;",4,"ngIf"],["role","status",1,"spinner-border",2,"position","absolute","top","50%","left","50%"],[1,"sr-only","text-nowrap","border-0","position-absolute","overflow-hidden"],[1,"image-thumb-template"],[1,"inner","position-relative"],["class","d-flex align-items-center justify-content-center","style","    position: absolute;\n            width: 100%;\n            height: 100%;    top: 0;",4,"ngIf"],[1,"meta","justify-content-center","align-items-center",3,"mouseover"],[2,"cursor","pointer"],[3,"click",4,"ngIf"],[1,"metaone","justify-content-center","align-items-center"],[1,"duration-display"],[1,"d-flex","align-items-center","justify-content-center",2,"position","absolute","width","100%","height","100%","top","0"],["width","100%","height","100%","muted","true","autoplay","autoplay","disableRC","",1,"video-box","p-0",3,"mouseover","mouseout","id"],["class","spinner-border","role","status","style","position: absolute;",4,"ngIf"],["role","status",1,"spinner-border",2,"position","absolute"],[3,"click"],["name","playvideomedia",1,"f-32"],["name","pausemusic",1,"f-32"],[3,"count"],[4,"ngIf"],["customScrollDir","",1,"is-popover-tb-n","scroll-container","darkscroll",2,"height","calc(100% - 45px)",3,"scrolled"],["class","image-thumb-template",3,"click",4,"ngFor","ngForOf"],["class","text-center mt-10","style","padding-bottom: 50px;",4,"ngIf"],[1,"notfoundImage",3,"ngClass"],[1,"image-thumb-template",3,"click"],[1,""],["disableRC","",3,"src"],[1,"text-center","mt-10",2,"padding-bottom","50px"],[1,"text-center"],[1,"btn-all","btn-outline-primary","btn-h40","text-13","ps-4","pe-4",3,"click","disabled"]],template:function(t,i){1&t&&(e.j41(0,"div",2)(1,"div",3)(2,"div",4)(3,"div",5)(4,"div",6)(5,"div",7),e.nrm(6,"pi",8),e.k0s()(),e.DNE(7,Vt,2,0,"div",9)(8,Rt,1,4,"input",10)(9,Gt,1,4,"input",11),e.k0s()(),e.DNE(10,Bt,8,5,"div",12),e.k0s()(),e.j41(11,"div",13),e.DNE(12,Qt,16,10,"div",14)(13,oi,15,6,"div",14),e.k0s()),2&t&&(e.R7$(7),e.Y8G("ngIf",i.searchTerm&&i.searchTerm.length>0),e.R7$(),e.Y8G("ngIf","video"===i.searchMode),e.R7$(),e.Y8G("ngIf","video"!==i.searchMode),e.R7$(),e.Y8G("ngIf",i.showVideos),e.R7$(2),e.Y8G("ngIf","video"===i.searchMode),e.R7$(),e.Y8G("ngIf","image"===i.searchMode))},dependencies:[m.YU,m.Sq,m.bT,Mt.f,Re.G,X.q,S.me,S.BC,S.vS,B.vr,B.xt,M.b,K.KK,Ge.D,$.ks],styles:[".drag-media[_ngcontent-%COMP%]{height:120px;border:2px dotted #bbb;text-align:center}.input-group-text[_ngcontent-%COMP%]{background-color:#fff!important}.input-group-append[_ngcontent-%COMP%]{margin-left:0!important}.image-thumb[_ngcontent-%COMP%]{width:47%!important;float:left;margin:4px;position:relative}.image-thumb[_ngcontent-%COMP%]   img[_ngcontent-%COMP%]{padding:0}.powered-by[_ngcontent-%COMP%]{position:absolute;z-index:99;bottom:8px;width:149px;height:32px;border-radius:12px}#column[_ngcontent-%COMP%]{width:50%}#column[_ngcontent-%COMP%]   .image-thumb-template[_ngcontent-%COMP%]{width:100%;position:relative}#column[_ngcontent-%COMP%]   .image-thumb-template[_ngcontent-%COMP%]   img[_ngcontent-%COMP%]:hover{transform:scale(1.03)}.duration-display[_ngcontent-%COMP%]{position:absolute;bottom:4px;right:4px;color:#fff;background:#0006;width:26px;height:16px;border-radius:4px;text-align:center;font-size:11px}.notfoundImage[_ngcontent-%COMP%]{text-align:center;color:#fff;padding:10px 10px 0}"]}),r})();var ri=d(52581),ai=d(40813),De=d(63612),li=d(1441),Ne=d(52411);const ci=o=>({"disabled-tool-btns":o}),se=o=>({active:o}),fe=o=>({"tab-child-active":o}),di=(o,r)=>
1({"tab-child-active":o,mid:r});function pi(o,r){if(1&o){const n=e.RV6();e.j41(0,"div",13)(1,"div",14)(2,"ai-text-to-image",15),e.bIt("genImageEvent",function(i){e.eBV(n);const s=e.XpG();return e.Njj(s.generate(i))})("addImageTocanvas",function(i){e.eBV(n);const s=e.XpG();return e.Njj(s.addImageTocanvas(i))}),e.k0s()()()}if(2&o){const n=e.XpG();e.R7$(2),e.Y8G("aiImages",n.aiImages)("activePane",n.aiActiveTab)}}function mi(o,r){if(1&o){const n=e.RV6();e.j41(0,"div",24)(1,"div",25)(2,"h5",26),e.EFF(3,"Current color"),e.k0s(),e.j41(4,"div",27)(5,"div",28)(6,"button",29),e.bIt("click",function(){e.eBV(n);const i=e.XpG(2);return i.bgColorPanelVisible=!0,e.Njj(i.darkTheme=!0)}),e.nrm(7,"pi",30),e.k0s()()()()()}if(2&o){const n=e.XpG(2);e.R7$(6),e.xc7("background",n.selectedBgColor)}}function ui(o,r){if(1&o){const n=e.RV6();e.j41(0,"button",36),e.bIt("click",function(){const i=e.eBV(n).$implicit,s=e.XpG(3);return e.Njj(s.changeColor(i))}),e.k0s()}2&o&&e.xc7("background",r.$implicit)}function gi(o,r){if(1&o&&(e.j41(0,"div",31)(1,"h5",32),e.EFF(2,"Document colors"),e.k0s(),e.j41(3,"div",33)(4,"div",34),e.DNE(5,ui,1,2,"button",35),e.k0s()()()),2&o){const n=e.XpG(2);e.R7$(5),e.Y8G("ngForOf",n.colors)}}function hi(o,r){if(1&o){const n=e.RV6();e.j41(0,"button",49),e.bIt("click",function(){const i=e.eBV(n).$implicit,s=e.XpG(3);return e.Njj(s.changeColor(i))}),e.k0s()}2&o&&e.xc7("background",r.$implicit)}function _i(o,r){if(1&o){const n=e.RV6();e.j41(0,"button",49),e.bIt("click",function(){const i=e.eBV(n).$implicit,s=e.XpG(4);return e.Njj(s.changeColor(i))}),e.k0s()}2&o&&e.xc7("background",r.$implicit)}function vi(o,r){if(1&o&&(e.j41(0,"div",50)(1,"div",28)(2,"div",51),e.DNE(3,_i,1,2,"button",46),e.k0s()()()),2&o){const n=e.XpG(3);e.R7$(3),e.Y8G("ngForOf",n.colorsBgPresets.slice(12))}}function fi(o,r){if(1&o&&(e.j41(0,"div",37)(1,"div",38)(2,"div",39)(3,"button",40)(4,"h5",41),e.EFF(5,"Preset colors"),e.k0s()(),e.j41(6,"button",42)(7,"span",43),e.EFF(8,"See less"),e.k0s(),e.j41(9,"span",44),e.EFF(10,"See all"),e.k0s()()(),e.j41(11,"div",28)(12,"div",45),e.DNE(13,hi,1,2,"button",46),e.k0s()()(),e.j41(14,"div",47)(15,"div",48),e.DNE(16,vi,4,1,"ng-template"),e.k0s()()()),2&o){const n=e.XpG(2);e.R7$(13),e.Y8G("ngForOf",n.colorsBgPresets.slice(0,12))}}function bi(o,r){1&o&&e.nrm(0,"span",60)}function Ci(o,r){if(1&o){const n=e.RV6();e.j41(0,"div",56),e.bIt("click",function(){const i=e.eBV(n).$implicit,s=e.XpG(3);return e.Njj(s.addPattern(i))}),e.j41(1,"div",57),e.DNE(2,bi,1,0,"span",58),e.nrm(3,"img",59),e.k0s()()}if(2&o){const n=r.$implicit,t=e.XpG(3);e.R7$(2),e.Y8G("ngIf",1==n.pro&&!(t.user&&t.user.subscribed)),e.R7$(),e.Y8G("src",n.thumbUrl,e.B4B)}}function xi(o,r){1&o&&e.nrm(0,"span",60)}function ki(o,r){if(1&o){const n=e.RV6();e.j41(0,"div",64),e.bIt("click",function(){const i=e.eBV(n).$implicit,s=e.XpG(4);return e.Njj(s.addPattern(i))}),e.j41(1,"div",65),e.DNE(2,xi,1,0,"span",58),e.nrm(3,"img",59),e.k0s()()}if(2&o){const n=r.$implicit,t=e.XpG(4);e.R7$(2),e.Y8G("ngIf",1==n.pro&&!(t.user&&t.user.subscribed)),e.R7$(),e.Y8G("src",n.thumbUrl,e.B4B)}}function Ti(o,r){if(1&o){const n=e.RV6();e.j41(0,"div",61),e.bIt("scrolled",function(){e.eBV(n);const i=e.XpG(),s=i.$implicit,a=i.index,l=e.XpG(2);return e.Njj(l.scrollContentEnd(s,a))}),e.j41(1,"div",62),e.DNE(2,ki,4,2,"div",63),e.k0s()()}if(2&o){const n=e.XpG().$implicit;e.Y8G("scrollWindow",!1)("infiniteScrollDistance",.6)("infiniteScrollUpDistance",2)("infiniteScrollThrottle",120),e.R7$(2),e.Y8G("ngForOf",n.storeProductImages.slice(0))}}function ji(o,r){if(1&o){const n=e.RV6();e.j41(0,"div",52)(1,"div",38)(2,"div",53)(3,"button",40)(4,"h5",41),e.EFF(5),e.k0s()(),e.j41(6,"button",42)(7,"span",43),e.EFF(8,"See less"),e.k0s(),e.j41(9,"span",54),e.bIt("click",function(i){const s=e.eBV(n).index,a=e.XpG(2);return e.Njj(a.resetProduct(s,i))}),e.EFF(10,"See all"),e.k0s()()(),e.j41(11,"div",50),e.DNE(12,Ci,4,2,"div",55),e.k0s()(),e.j41(13,"div",47)(14,"div",48),e.DNE(15,Ti,3,5,"ng-template"),e.k0s()()()}if(2&o){const n=r.$implicit,t=r.index;e.XpG();const i=e.sdS(7);e.Mz_("ngbAccordionItem","sticker-panel-",t,""),e.R7$(5),e.JRh(n.displayName),e.R7$(6),e.AVh("content-close",i.isExpanded("sticker-panel-"+t)),e.R7$(),e.Y8G("ngForOf",n.storeProductImages.slice(0,3))}}function Pi(o,r){1&o&&(e.j41(0,"div",66),e.nrm(1,"element-placeholder",67),e.k0s()),2&o&&(e.R7$(),e.Y8G("count",4)("col",3))}function Si(o,r){if(1&o){const n=e.RV6();e.j41(0,"div",80)(1,"app-color",81),e.bIt("changed",function(i){e.eBV(n);const s=e.XpG(3);return e.Njj(s.onColorPickerChange(i))}),e.k0s()()}if(2&o){const n=e.XpG(3);e.R7$(),e.Y8G("darkTheme",n.darkTheme)("panel",n.bgColorPanelVisible)("selectedColor",n.selectedBgColor)("colorMap",n.colorMap)}}function wi(o,r){if(1&o){const n=e.RV6();e.j41(0,"div",68)(1,"div",14)(2,"div",69)(3,"div",25)(4,"div",70)(5,"h5",71),e.EFF(6,"Current color "),e.k0s(),e.j41(7,"div",72)(8,"div",28)(9,"button",73),e.nrm(10,"pi",30),e.k0s()()(),e.nrm(11,"div",74),e.j41(12,"div",75)(13,"button",76),e.EFF(14,"Custom"),e.k0s(),e.j41(15,"button",77),e.bIt("click",function(){e.eBV(n);const i=e.XpG(2);return e.Njj(i.colorPickerClose())}),e.nrm(16,"pi",78),e.k0s()()(),e.DNE(17,Si,2,4,"div",79),e.k0s()()()()}if(2&o){const n=e.XpG(2);e.R7$(9),e.xc7("background",n.selectedBgColor),e.AVh("color-active",!0===n.bgColorPanelVisible),e.R7$(8),e.Y8G("ngIf",n.bgColorPanelVisible)}}function yi(o,r){if(1&o){const n=e.RV6();e.j41(0,"div",13)(1,"div",13)(2,"div",14)(3,"div",16),e.bIt("scrolled",function(){e.eBV(n);const i=e.XpG();return e.Njj(i.scrollDrawerEnd())}),e.DNE(4,mi,8,2,"div",17)(5,gi,6,1,"div",18),e.j41(6,"div",19,1),e.DNE(8,fi,17,1,"div",20)(9,ji,16,6,"div",21),e.k0s(),e.DNE(10,Pi,2,2,"div",22),e.k0s()()(),e.DNE(11,wi,18,5,"div",23),e.k0s()}if(2&o){const n=e.XpG();e.R7$(3),e.Y8G("scrollWindow",!1)("infiniteScrollDistance",.5)("infiniteScrollUpDistance",2)("infiniteScrollThrottle",50),e.R7$(),e.Y8G("ngIf",!n.selectedBgMedia&&n.selectedBgColor),e.R7$(),e.Y8G("ngIf",n.colors&&n.colors.length>0),e.R7$(),e.Y8G("closeOthers",!0)("destroyOnHide",!0),e.R7$(2),e.Y8G("ngIf",n.createScratch),e.R7$(),e.Y8G("ngForOf",n.storePatternProducts),e.R7$(),e.Y8G("ngIf",n.isPatternLoadProgress),e.R7$(),e.Y8G("ngIf",n.bgColorPanelVisible&&n.selectedBgColor)}}function Ii(o,r){if(1&o){const n=e.RV6();e.j41(0,"div",13)(1,"stock-media-list",82),e.bIt("clickStockImage",function(i){e.eBV(n);const s=e.XpG();return e.Njj(s.addBaseImage(i))})("clickStockVideo",function(i){e.eBV(n);const s=e.XpG();return e.Njj(s.addBaseVideo(i))}),e.k0s()()}2&o&&(e.R7$(),e.Y8G("showVideos",!1))}function Ei(o,r){if(1&o){const n=e.RV6();e.j41(0,"button",90),e.bIt("click",function(){e.eBV(n);const i=e.XpG(3);return e.Njj(i.uploadModal())}),e.nrm(1,"pi",91),e.EFF(2," Uploads "),e.k0s()}}function Mi(o,r){if(1&o&&(e.j41(0,"button",92),e.nrm(1,"pi",91),e.EFF(2," Uploads "),e.k0s()),2&o){e.XpG(3);const n=e.sdS(22);e.Y8G("ngbPopover",n)}}function Oi(o,r){if(1&o&&(e.j41(0,"div",87),e.DNE(1,Ei,3,0,"button",88)(2,Mi,3,1,"button",89),e.k0s()),2&o){const n=e.XpG(2);e.R7$(),e.Y8G("ngIf",!n.isDataLimit),e.R7$(),e.Y8G("ngIf",n.isDataLimit)}}function Vi(o,r){if(1&o){const n=e.RV6();e.qex(0,13),e.j41(1,"div",83),e.DNE(2,Oi,3,2,"div",84),e.j41(3,"div",13)(4,"div",85)(5,"uploaded-media-list",86),e.bIt("addUploadedMedia",function(i){e.eBV(n);const s=e.XpG();return e.Njj(s.addUploadedAsset(i))}),e.k0s()()()(),e.bVm()}if(2&o){const n=e.XpG();e.R7$(2),e.Y8G("ngIf",n.user),e.R7$(3),e.Y8G("isUploadedMediaLoaded",n.isUploadedImageLoaded)("uplodedAssets",n.uplodedAssets)("templateType",2)("editorType",n.editorType)}}function Ri(o,r){if(1&o){const n=e.RV6();e.j41(0,"div")(1,"div",14)(2,"div",69),e.nrm(3,"blur-tool",95),e.j41(4,"image-filter-tool",96),e.bIt("changed",function(i){e.eBV(n);const s=e.XpG(2);return e.Njj(s.applyFilter(i))}),e.k0s()()()()}if(2&o){const n=e.XpG(2);e.R7$(3),e.Y8G("imageFilterUtil",n.selectedBgMedia.imageFilterUtil),e.R7$(),e.Y8G("filter",n.filter)}}function Gi(o,r){if(1&o){const n=e.RV6();e.j41(0,"div",97)(1,"div",98)(2,"div",99)(3,"h5",26),e.EFF(4,"Volume"),e.k0s(),e.j41(5,"div",100)(6,"div",101)(7,"mv-sl
1ider",102),e.bIt("change",function(i){e.eBV(n);const s=e.XpG(2);return e.Njj(s.inputVideoVolume(i))}),e.k0s()(),e.j41(8,"div",103)(9,"input",104),e.bIt("ngModelChange",function(i){e.eBV(n);const s=e.XpG(2);return e.Njj(s.inputVideoVolume(i))}),e.k0s()()()()(),e.j41(10,"div",98)(11,"div",99)(12,"h5",26),e.EFF(13,"Loop"),e.k0s(),e.j41(14,"div",100)(15,"div")(16,"div",105)(17,"input",106),e.bIt("click",function(i){e.eBV(n);const s=e.XpG(2);return e.Njj(s.inputVideoLoop(i))}),e.k0s()()()()()()()}if(2&o){const n=e.XpG(2);e.R7$(7),e.Y8G("value",n.videoVolume)("min",0)("max",100)("step",1),e.R7$(2),e.Y8G("ngModel",n.videoVolume),e.R7$(8),e.Y8G("checked",n.videoLoop)}}function Bi(o,r){if(1&o&&(e.j41(0,"div",13),e.DNE(1,Ri,5,2,"div",93)(2,Gi,18,6,"div",94),e.k0s()),2&o){const n=e.XpG();e.R7$(),e.Y8G("ngIf",0===(null==n.selectedBgMedia?null:n.selectedBgMedia.getMediaType())),e.R7$(),e.Y8G("ngIf",1===(null==n.selectedBgMedia?null:n.selectedBgMedia.getMediaType()))}}function Di(o,r){1&o&&e.eu8(0)}function Ni(o,r){if(1&o&&e.DNE(0,Di,1,0,"ng-container",107),2&o){const n=e.XpG();e.Y8G("ngComponentOutlet",n.propopover)("ngComponentOutletInjector",n.injector)}}let Ai=(()=>{var o;class r extends It._{constructor(t,i,s,a,l,c,p){super(),this.mediaContentService=t,this.authService=i,this.sceneController=s,this.editorService=a,this.modalService=l,this.injector=c,this.editorUiService=p,this.editorType=Z._Y.VideoTemplate,this.darkTheme=!0,this.stockVideos=[],this.activePane="ai",this.stockVideosPageNumber=1,this.isVideoProgress=!1,this.searchTerm="",this.searchMode="image",this.basePixabayVideoThumbUrl=F.c.basePixabayVideoThumbUrl,this.stockImages=[],this.stockImagePageNumber=1,this.isImageProgress=!1,this.storePatternProducts=[],this.isPatternLoadProgress=!1,this.bgColorPanelVisible=!1,this.colors=["rgb(0,0,0)","rgb(255, 255, 255)","rgb(242, 38, 19)","rgb(249, 105, 14)","rgb(253, 227, 167)"],this.progressChanged=new e.bkB,this.adjustBackground=new e.bkB,this.cancelAdjust=new e.bkB,this.applyAdjust=new e.bkB,this.executeAction=new e.bkB,this.generatedImage=new e.bkB,this.uplodedAssets=[],this.recentlyUsed=[],this.colorsBgPresets=[],this.inBackgroundAdjustMode=!1,this.isUploadedImageLoaded=!1,this.mediaAccept="video/*,image/*",this.filters=[{name:"none",title:"None",icon:"https://static.lightxeditor.com/assets/images/none.png"},{name:"grayscale",title:"Grayscale",icon:"https://static.lightxeditor.com/assets/images/grayscale.png"},{name:"sepia",title:"Sepia",icon:"https://static.lightxeditor.com/assets/images/sepia.png"},{name:"bw",title:"Black/White",icon:"https://static.lightxeditor.com/assets/images/black-white.png"},{name:"brownie",title:"Brownie",icon:"https://static.lightxeditor.com/assets/images/brownie.png"},{name:"vintage",title:"Vintage",icon:"https://static.lightxeditor.com/assets/images/vintage.png"},{name:"kodachrome",title:"Kodachrome",icon:"https://static.lightxeditor.com/assets/images/kodachrom.png"},{name:"technicolor",title:"Technicolor",icon:"https://static.lightxeditor.com/assets/images/technicolor.png"},{name:"polaroid",title:"Polaroid",icon:"https://static.lightxeditor.com/assets/images/polarid.png"}],this.videoVolume=0,this.videoLoop=0,this.isDataLimit=!1,this.propopover=yt.A,this.createScratch=!1,this.isUploadedImageProgress=!1,this.subscriptions=[],this.pagenumber=0,this.patternPageEnd=!1,this.contentPageEnd=!1,this.contentpageNumber=1,this.aiActiveTab="generator",this.aiImages=[],this.user=this.authService.currentUser(),this.user&&(this.isDataLimit=this.user.usedQuota>this.user.quota),this.colorsBgPresets=wt.PV.ui.colorBgPresets.items;let u=this.authService.usrPropChanged.subscribe(g=>{this.user=this.authService.currentUser(),this.user&&(this.isDataLimit=this.user.usedQuota>this.user.quota)});this.subscriptions.push(u),this.injector=this.createInjector(),u=this.authService.loggedIn.subscribe(g=>{this.user=this.authService.currentUser()}),this.subscriptions.push(u)}ngOnDestroy(){this.sceneController.editingInProcess&&this.colorPickerClose(),this.subscriptions.forEach(t=>t.unsubscribe())}ngOnInit(){this.sceneController.getSelectedScene()&&(this.selectedBgColor=this.sceneController.getSelectedScene().getBackGroundColor(),this.selectedBgMedia=this.sceneController.getSelectedScene().getBackgroun
1dMedia(),this.init());let t=this.editorService.sceneChanged.subscribe(i=>{this.sceneController.getSelectedScene()&&(this.selectedBgColor=this.sceneController.getSelectedScene().getBackGroundColor(),this.selectedBgMedia=this.sceneController.getSelectedScene().getBackgroundMedia(),this.init())});this.subscriptions.push(t),this.pagenumber<=0&&this.getBackgroundPatterns(),this.sceneController.getSelectedScene(),this.colors=this.sceneController.selectedScene.getDocumentColour()}createInjector(){let t;return t={title:k.b.popover.dataLimitTitle,desc:k.b.popover.dataLimitDesc,name:"datalimit"},e.zZn.create([{provide:_e.hl,useValue:t}],this.injector)}init(){this.selectedBgMedia&&1===this.selectedBgMedia.getMediaType()&&(this.videoVolume=Math.round(100*this.selectedBgMedia.getBgImageObj().volumeFactor),this.videoLoop=this.selectedBgMedia.getBgImageObj().loop),this.selectedBgMedia&&(-1!=this.sceneController.getSelectedScene().getBackgroundMediaName().search("text2image")?(this.activatePane("ai"),this.aiActiveTab="generator"):(this.aiActiveTab="generator",this.activatePane("ai")))}scrollDrawerEnd(){!this.patternPageEnd&&this.pagenumber>0&&this.getBackgroundPatterns()}scrollContentEnd(t,i){}resetProduct(t,i){if(this.storePatternProducts[t].storeProductImages.length>20?this.contentPageEnd=!0:(this.storePatternProducts[t].storeProductImages=this.storePatternProducts[t].storeProductImages.slice(0,20),this.contentpageNumber=1,this.contentPageEnd=this.storePatternProducts[t].storeProductImages.length<20),i){let s=document.getElementById("scroll-adjuster");s&&i.target&&this.setActiveScrollPos(s,i.target.parentElement)}}getEditorProductContent(t,i){this.isImageProgress=!0,setTimeout(()=>{this.contentPageEnd||(this.contentpageNumber++,this.mediaContentService.getTemplateByProductId(t.productId,this.contentpageNumber-1,s=>{s&&s.storeProductImages&&s.storeProductImages.length>0?this.storePatternProducts[i].storeProductImages=this.contentpageNumber>0?this.storePatternProducts[i].storeProductImages.concat(s.storeProductImages):s.body.storeProductImages:this.contentPageEnd=!0,this.isImageProgress=!1},s=>{this.isImageProgress=!1}))},200)}selectThumbFile(){document.getElementById("upload-media").click()}handleMediaFileInput(t){const i=t[0];i&&(URL.createObjectURL(i),this.progressChanged.emit(!0))}addBaseVideo(t){if(-1===this.sceneController.inProgressCount){const i=t.videos.tiny.url;if(i){this.sceneController.inProgressCount=0,this.progressChanged.emit(!0);const s=this.sceneController.getSelectedScene().setBackGroundMedia(i,1,t.thumbnail);this.sceneController.setCancelDownloadingCallback(()=>s.cancel()),s.promise.then(()=>{this.progressChanged.emit(!1),this.selectedBgMedia=this.sceneController.getSelectedScene().getBackgroundMedia(),this.selectedBgColor=null,this.executeAction.emit({name:"show_edit_tools",val:!0}),this.init()},()=>{}).finally(()=>this.sceneController.inProgressCount=-1)}}}addBaseImage(t){this.sceneController.inProgress=!0,this.sceneController.getSelectedScene().setBackGroundMedia(t.fullHDURL,0,t.thumbnail,!1).promise.then(i=>{this.selectedBgMedia=this.sceneController.getSelectedScene().getBackgroundMedia(),this.sceneController.checkAndUpdateBgImageWatermark(),this.selectedBgColor=null,this.executeAction.emit({name:"show_edit_tools",val:!0})}).finally(()=>this.sceneController.inProgress=!1)}addUploadedImage(t){let i=0;-1===this.sceneController.inProgressCount&&!this.sceneController.inProgress&&("video"===t.assetType?(i=1,this.sceneController.inProgressCount=0):this.sceneController.inProgress=!0,this.sceneController.getSelectedScene().setBackGroundMedia(t.metadata.contentUrl,i,t.thumbUrl).promise.then(s=>{this.selectedBgMedia=this.sceneController.getSelectedScene().getBackgroundMedia(),this.selectedBgColor=null,this.executeAction.emit({name:"show_edit_tools",val:!0}),this.init(),1===i?this.sceneController.inProgressCount=-1:this.sceneController.inProgress=!1},()=>{1===i?this.sceneController.inProgressCount=-1:this.sceneController.inProgress=!1}))}getBackgroundPatterns(){this.isPatternLoadProgress=!0,this.pagenumber++,this.mediaContentService.getProductDetails(U.KK.Pattern,this.pagenumber-1,t=>{t&&t.body&&t.body.storeProducts.length>0?this.storePatternProducts=this.pagenumber>0?this.storePatternProducts.concat(t.body.storeProducts):t.body.storeProducts:this.patternPageEnd=!0,this.isPatternLoadProgress=!1,this.isImageProgress=!1},t=>{this.isImageProgress=!1})}activatePane(t){this.activePane=t}dropped(t){}
1changeColor(t){this.selectedBgMedia=null,this.selectedBgColor=t,this.sceneController.getSelectedScene().setBackGroundColor(t,!0),this.sceneController.checkAndUpdateBgImageWatermark(),this.executeAction.emit({name:"show_edit_tools",val:!1})}addPattern(t){let i=1==t.pro;this.sceneController.getSelectedScene().setBackGroundMedia(t.imgUrl,0,t.thumbUrl,!1,i).promise.then(s=>{this.selectedBgMedia=this.sceneController.getSelectedScene().getBackgroundMedia(),this.sceneController.checkAndUpdateBgImageWatermark(),this.selectedBgColor=null,this.executeAction.emit({name:"show_edit_tools",val:!0})})}adjust(){this.executeAction.emit({name:"show_adjust",val:!0})}cancelBackgroundAdjust(){this.executeAction.emit({name:"apply_adjust",val:!0})}applyBackgroundAdjust(){this.executeAction.emit({name:"apply_adjust",val:!0})}addUploadedAsset(t){let i=0;-1===this.sceneController.inProgressCount&&!this.sceneController.inProgress&&("video"===t.assetType?(i=1,this.sceneController.inProgressCount=0):this.sceneController.inProgress=!0,this.sceneController.getSelectedScene().setBackGroundMedia(t.metadata.contentUrl,i,t.thumbUrl,!1).promise.then(s=>{this.selectedBgMedia=this.sceneController.getSelectedScene().getBackgroundMedia(),this.sceneController.checkAndUpdateBgImageWatermark(),this.selectedBgColor=null,this.init(),1===i?this.sceneController.inProgressCount=-1:this.sceneController.inProgress=!1},()=>{1===i?this.sceneController.inProgressCount=-1:this.sceneController.inProgress=!1}))}get filter(){return this.selectedBgMedia.getFilter()}applyFilter(t){this.selectedBgMedia.setFilter(t)}inputVideoVolume(t){let i;i=t.newValue||0===t.newValue?t.newValue:t,Number.isNaN(i)&&(i=100),i||0===i?i>100?setTimeout(()=>{this.selectedBgMedia.getBgImageObj().volumeFactor=1,this.init()},0):i<=0?setTimeout(()=>{this.selectedBgMedia.getBgImageObj().volumeFactor=0,this.init()},0):setTimeout(()=>{this.selectedBgMedia.getBgImageObj().volumeFactor=i/100,this.init()},0):setTimeout(()=>{this.selectedBgMedia.getBgImageObj().volumeFactor=1,this.init()},0)}inputVideoLoop(t){(t.currentTarget||t.target).checked?(this.selectedBgMedia.getBgImageObj().loop=1,this.videoLoop=1):(this.selectedBgMedia.getBgImageObj().loop=0,this.videoLoop=0)}uploadModal(){this.editorUiService.uploadModal(this.mediaAccept,this.editorType)}colorPickerClose(){this.bgColorPanelVisible=!1,this.sceneController.getSelectedScene().setBackGroundColor(this.selectedBgColor,!0),this.sceneController.editingInProcess=!1}onColorPickerChange(t){this.executeAction.emit({name:"show_edit_tools",val:!1}),this.selectedBgMedia=null,this.selectedBgColor=t,this.sceneController.getSelectedScene().setBackGroundColor(t),this.sceneController.editingInProcess=!0}generate(t){t.fullHDURL=t.aiImageResult.imgUrl,t.thumbnail=t.aiImageResult.outputImgUrl,this.addBaseImage(t),this.generatedImage.emit(t)}addImageTocanvas(t){t.fullHDURL=t.aiImageResult.imgUrl,t.thumbnail=t.aiImageResult.outputImgUrl,this.addBaseImage(t)}}return(o=r).\u0275fac=function(t){return new(t||o)(e.rXU(ve.Z),e.rXU(R.u),e.rXU(I.Z),e.rXU(P.x),e.rXU(_.Bq),e.rXU(e.zZn),e.rXU(Ee.f))},o.\u0275cmp=e.VBU({type:o,selectors:[["background-drawer"]],inputs:{inBackgroundAdjustMode:"inBackgroundAdjustMode",createScratch:"createScratch",aiImages:"aiImages"},outputs:{progressChanged:"progressChanged",adjustBackground:"adju
1stBackground",cancelAdjust:"cancelAdjust",applyAdjust:"applyAdjust",executeAction:"executeAction",generatedImage:"generatedImage"},features:[e.Vt3],decls:23,vars:37,consts:[["popContent",""],["acc","ngbAccordion"],[1,"drawer-content","perfect-s-height"],[1,"common-container","mt-0"],[1,"wp-100","btn-tabs"],[1,"d-flex","justify-content-between",3,"ngClass"],[1,"btn-all","btn-auto","btn-tab","new_item",3,"click","disabled","ngClass"],[1,"btn-all","btn-auto","btn-tab",3,"click","disabled","ngClass"],[1,"tab-child-item","one",3,"ngClass"],["class","pane-section",4,"ngIf"],[1,"tab-child-item","two",3,"ngClass"],[1,"tab-child-item","three",3,"ngClass"],[1,"tab-child-item","four",3,"ngClass"],[1,"pane-section"],[1,"scroll-content"],[3,"genImageEvent","addImageTocanvas","aiImages","activePane"],["id","scroll-adjuster","customScrollDir","","infiniteScroll","",1,"scroll-container","darkscroll","pb-3","pt-3",3,"scrolled","scrollWindow","infiniteScrollDistance","infiniteScrollUpDistance","infiniteScrollThrottle"],["class","drawer-content h-auto",4,"ngIf"],["class","card-body mb-0",4,"ngIf"],["ngbAccordion","",3,"closeOthers","destroyOnHide"],["ngbAccordionItem","sticker-panel-00","class","tab-div",4,"ngIf"],["class","tab-div",3,"ngbAccordionItem",4,"ngFor","ngForOf"],["class","blank-preview",4,"ngIf"],["class","bg-color-panel pane-section mt-0 dark-section",4,"ngIf"],[1,"drawer-content","h-auto"],[1,"card-body"],[1,"card-title","m-0","text-semi","text-normal"],[1,"d-flex","mt-9","document-color",2,"height","38px"],[1,"colors-bg"],["placement","top","ngbTooltip","Change Color","container","body","tooltipClass","tooltip-custom-all min-82",1,"no-style","color","control","p-0","me-2",3,"click"],["name","currentcoloricon",1,"f-24"],[1,"card-body","mb-0"],[1,"card-title","m-0","mt-10","text-semi","text-normal"],[1,"d-flex","mt-9","document-color",2,"margin-right","-8px"],[1,"colors-bg","flex-wrap"],["class","no-style color control p-0 me-2",3,"background","click",4,"ngFor","ngForOf"],[1,"no-style","color","control","p-0","me-2",3,"click"],["ngbAccordionItem","sticker-panel-00",1,"tab-div"],["ngbAccordionHeader",""],[1,"d-flex","align-items-center","justify-content-between"],["type","button","ngbAccordionButton","",1,"btn-acc-title","w-auto"],[1,"m-0","btn","btn-link","card-title"],["type","button","ngbAccordionButton","",1,"btn-collapse","p-0","ps-1","pe-1","lh-p1","justify-content-end",2,"width","auto !important","margin-right","8px"],[1,"collapse-text","text-11","grey-300","text-semi"],[1,"expand-text","text-11","grey-300","text-semi"],[1,"colors","color-thumbPc","mt-9","presets"],["class","no-style color control p-0 color-boxPc",3,"background","click",4,"ngFor","ngForOf"],["ngbAccordionCollapse",""],["ngbAccordionBody",""],[1,"no-style","color","control","p-0","color-boxPc",3,"click"],[1,"content"],[1,"colors","color-thumbPc","presets"],[1,"tab-div",3,"ngbAccordionItem"],[1,"d-flex","align-items-center","mt-2","justify-content-between"],[1,"expand-text","text-11","grey-300","text-semi",3,"click"],["class","sticker-thumb mt-9 position-relative",3,"click",4,"ngFor","ngForOf"],[1,"sticker-thumb","mt-9","position-relative",3,"click"],[1,"inner","position-relative"],["class","hw-20 icon  pro-asset-icon",4,"ngIf"],["disableRC","",3,"src"],[1,"hw-20","icon","pro-asset-icon"],["customScrollDir","","infiniteScroll","",1,"scroll-container","darkscroll","ps-0","pe-0",2,"max-height","450px",3,"scrolled","scrollWindow","infiniteScrollDistance","infiniteScrollUpDistance","infiniteScrollThrottle"],[1,"content","full-items-row",2,"margin-right","-6px"],["class","sticker-thumb position-relative",3,"click",4,"ngFor","ngForOf"],[1,"sticker-thumb","position-relative",3,"click"],[1,"inner"],[1,"blank-preview"],[3,"count","col"],[1,"bg-color-panel","pane-section","mt-0","dark-section"],["customScrollDir","",1,"scroll-container","darkscroll","pt-3","pb-3"],[1,"fixedCurrentColor","pe-3"],[1,"text-normal","text-semi","text-dark","m-0","cc-c","mt-3","ms-3"],[1,"d-flex","mt-9","document-color","ms-3"],[1,"no-style","color","control","hw-40","m-0","p-0"],[1,"border-line-color","mt-7"],[1,"pb-3","me-2","ms-3"],[1,"btn-all","p-0","m-0","btn-left-color","text-normal","text-semi","text-dark"],[1,"btn-all","p-0","m-0","btn-right-color","float-end",3,"click"],["name","closecolortool"],["class","drawer-content","style","width: 100%;",4,"ngIf"],[1,"drawer-content",2,"width","100%"],[2,"margin-top","142px",3,"changed","darkTheme","panel","selectedColor","colorMap"],[1,"drawer-content",3,"clickStockImage","clickStockVideo","showVideos"],[1,"drawer-content"],["class","common-container pt-10 position-absolute top-0","style","z-index: 3;\n        width: calc(100% - 16px); background: #272B34;",4,"ngIf"],[1,"scroll-content","uploaded-content"],[3,"addUploadedMedia","isUploadedMediaLoaded","uplodedAssets","templateType","editorType"],[1,"common-container","pt-10","position-absolute","top-0",2,"z-index","3","width","calc(100% - 16px)","background","#272B34"],["class","btn btn-outline-white bg-white btn-auto text-13 upload-btn",3,"click",4,"ngIf"],["class","btn btn-outline-white bg-white btn-auto text-normal \n         upload-btn","container","body",3,"ngbPopover",4,"ngIf"],[1,"btn","btn-outline-white","bg-white","btn-auto","text-13","upload-btn",3,"click"],["name","uploadmedia",1,"icon","f-24","me-2"],["container","body",1,"btn","btn-outline-white","bg-white","btn-auto","text-normal","upload-btn",3,"ngbPopover"],[4,"ngIf"],["class","ms-3 me-3",4,"ngIf"],[3,"imageFilterUtil"],[3,"changed","filter"],[1,"ms-3","me-3"],[1,"card","drawer-card"],[1,"card-body","p-9"],[1,"d-flex","mt-9"],[1,"wp-100","d-flex","align-items-center"],[1,"opacity-slider",2,"width","100%",3,"change","value","min","max","step"],[1,"ml-9"],["type","text","mask","000",1,"form-control","text-normal","text-black","form-input-sm",3,"ngModelChange","ngModel"],[1,"checkboxc","d-flex"],["type","checkbox",1,"marked-check",3,"click","checked"],[4,"ngComponentOutlet","ngComponentOutletInjector"]],template:function(t,i){if(1&t){const s=e.RV6();e.j41(0,"div",2)(1,"div",3)(2,"div",4)(3,"div",5)(4,"button",6),e.bIt("click",function(){return e.eBV(s),e.Njj(i.activatePane("ai"))}),e.EFF(5,"AI"),e.k0s(),e.j41(6,"button",7),e.bIt("click",function(){return e.eBV(s),e.Njj(i.activatePane("fill"))}),e.EFF(7,"Fill"),e.k0s(),e.j41(8,"button",7),e.bIt("click",function(){return e.eBV(s),e.Njj(i.activatePane("stock"))}),e.EFF(9,"Stock"),e.k0s(),e.j41(10,"button",7),e.bIt("click",function(){return e.eBV(s),e.Njj(i.activatePane("upload"))}),e.EFF(11,"Uploads"),e.k0s()()()(),e.j41(12,"div",8),e.DNE(13,pi,3,2,"div",9),e.k0s(),e.j41(14,"div",10),e.DNE(15,yi,12,12,"div",9),e.k0s(),e.j41(16,"div",11),e.DNE(17,Ii,2,1,"div",9),e.k0s(),e.j41(18,"div",12),e.DNE(19,Vi,6,5,"ng-container",9),e.k0s(),e.DNE(20,Bi,3,2,"div",9),e.k0s(),e.DNE(21,Ni,1,2,"ng-template",null,0,e.C5r)}
12&t&&(e.R7$(3),e.Y8G("ngClass",e.eq3(18,ci,i.inBackgroundAdjustMode)),e.R7$(),e.Y8G("disabled",i.inBackgroundAdjustMode)("ngClass",e.eq3(20,se,"ai"==i.activePane)),e.R7$(2),e.Y8G("disabled",i.inBackgroundAdjustMode)("ngClass",e.eq3(22,se,"fill"==i.activePane)),e.R7$(2),e.Y8G("disabled",i.inBackgroundAdjustMode)("ngClass",e.eq3(24,se,"stock"==i.activePane)),e.R7$(2),e.Y8G("disabled",i.inBackgroundAdjustMode)("ngClass",e.eq3(26,se,"upload"==i.activePane)),e.R7$(2),e.Y8G("ngClass",e.eq3(28,fe,"ai"==i.activePane)),e.R7$(),e.Y8G("ngIf","ai"===i.activePane&&!i.inBackgroundAdjustMode),e.R7$(),e.Y8G("ngClass",e.eq3(30,fe,"fill"==i.activePane)),e.R7$(),e.Y8G("ngIf","fill"===i.activePane&&!i.inBackgroundAdjustMode),e.R7$(),e.Y8G("ngClass",e.l_i(32,di,"stock"==i.activePane,"upload"==i.activePane)),e.R7$(),e.Y8G("ngIf","stock"===i.activePane&&!i.inBackgroundAdjustMode),e.R7$(),e.Y8G("ngClass",e.eq3(35,fe,"upload"==i.activePane)),e.R7$(),e.Y8G("ngIf","upload"===i.activePane),e.R7$(),e.Y8G("ngIf",i.inBackgroundAdjustMode))},dependencies:[m.YU,m.OI,m.Sq,m.bT,Et.n,Re.G,X.q,_.WP,_.r6,_.tW,_.x7,_.UA,_.$R,_.ZM,_.md,S.me,S.BC,S.vS,V.d1,N.Zr,si,ri.K,ai.X,De.X,li.h,M.b,Ge.D,Ne.N],styles:[".bg-cover[_ngcontent-%COMP%]{background-size:cover}.drag-media[_ngcontent-%COMP%]{height:120px;border:2px dotted #bbb;text-align:center}.video-thumb[_ngcontent-%COMP%]{height:100%;width:50%;float:left}.video-thumb[_ngcontent-%COMP%]   img[_ngcontent-%COMP%]{width:100%;border-radius:6px}.video-thumb[_ngcontent-%COMP%]   .inner[_ngcontent-%COMP%]{background:#fff;height:100%}.video-thumb[_ngcontent-%COMP%]   .meta[_ngcontent-%COMP%]{height:20px;bottom:0;width:100%;display:flex;color:#bbb}.sticker-thumb[_ngcontent-%COMP%]{height:auto;width:33.3%;float:left;padding:0 8px 8px 0}.sticker-thumb[_ngcontent-%COMP%]   img[_ngcontent-%COMP%]{width:100%;height:100%;border-radius:8px;cursor:pointer}.sticker-thumb[_ngcontent-%COMP%]   .inner[_ngcontent-%COMP%]{background:#272b34;height:100%}.sticker-thumb[_ngcontent-%COMP%]   img[_ngcontent-%COMP%]:hover{transform:scale(1.03)}.bg-color-panel[_ngcontent-%COMP%]{position:absolute;top:0;background:#fff;height:100%;width:100%;z-index:9;margin-top:41px}.colors[_ngcontent-%COMP%]{display:flex;justify-content:left}.color-thumb[_ngcontent-%COMP%]{display:block!important;padding:0 10px 10px}.color-thumbPc[_ngcontent-%COMP%]{display:block!important;padding:0}.color-thumb[_ngcontent-%COMP%]   .color-box[_ngcontent-%COMP%]{margin:0 6px 12px}.color-thumbPc[_ngcontent-%COMP%]   .color-boxPc[_ngcontent-%COMP%]{margin:0 6px 8px 0}.hw-46[_ngcontent-%COMP%]{width:37px;height:37px}.disabled-tool-btns[_ngcontent-%COMP%]   .btn-outline-primary.disabled[_ngcontent-%COMP%], .disabled-tool-btns[_ngcontent-%COMP%]   .btn-outline-primary[_ngcontent-%COMP%]:disabled{color:#e4e4eb;border-color:#e4e4eb}.disabled-tool-btns[_ngcontent-%COMP%]   .btn-outline-primary.disabled.active[_ngcontent-%COMP%], .disabled-tool-btns[_ngcontent-%COMP%]   .btn-outline-primary[_ngcontent-%COMP%]:disabled.active{color:#fff;border-color:#e4e4eb;background:#e4e4eb}.disabled-tool-btns[_ngcontent-%COMP%]   .btn-outline-primary[_ngcontent-%COMP%]:hover{color:#e4e4eb;border-color:#e4e4eb;background-color:transparent}.card-title[_ngcontent-%COMP%]{font-size:14px;color:#e2e3e9;text-decoration:none;font-weight:600}.card-title-dark[_ngcontent-%COMP%]{font-size:14px;color:#272b34;text-decoration:none;font-weight:600}.document-color[_ngcontent-%COMP%]   button.color[_ngcontent-%COMP%], .document-color[_ngcontent-%COMP%]   .colors-bg[_ngcontent-%COMP%]   button.color[_ngcontent-%COMP%]{margin:0 8px 8px 0!important;width:38px!important;height:38px!important}.btn-acc-title[_ngcontent-%COMP%]   .btn-link[_ngcontent-%COMP%]{padding:0!important}.pro-asset-icon[_ngcontent-%COMP%]{left:6px;top:6px;z-index:1}.one[_ngcontent-%COMP%]{transform:translate(-20px)}.two[_ngcontent-%COMP%], .three[_ngcontent-%COMP%], .four[_ngcontent-%COMP%]{transform:translate(20px)}.mid[_ngcontent-%COMP%]{transform:translate(-20px)!important}.tab-child-item[_ngcontent-%COMP%]{overflow:hidden;width:100%;height:0px;opacity:0;transition-duration:.35s;transition-property:opacity,transform;transition-timing-function:ease-in-out}.tab-child-active[_ngcontent-%COMP%]{height:100%;opacity:1;transform:translate(0)}.btn-tabs[_ngcontent-%COMP%]   .new_item[_ngcontent-%COMP%]:after{left:auto!important;padding:0!important;height:18px;position:absolute}.content.content-close[_ngcontent-%COMP%]{display:none}.full-items-row[_ngcontent-%COMP%]   .sticker-thumb[_ngcontent-%COMP%]:nth-child(1), .full-items-row[_ngcontent-%COMP%]   .sticker-thumb[_ngcontent-%COMP%]:nth-child(2), .full-items-row[_ngcontent-%COMP%]   .sticker-thumb[_ngcontent-%COMP%]:nth-child(3){margin-top:12px}"]}),r})();var Ui=d(34309),Fi=d(67298),Xi=d(88198);function $i(o,r){if(1&o){const n=e.RV6();e.j41(0,"div")(1,"div",4)(2,"h5",5),e.EFF(3,"Volume"),e.k0s(),e.j41(4,"div",6)(5,"div",7)(6,"mv-slider",8),e.bIt("change",function(i){e.eBV(n);const s=e.XpG(2);return e.Njj(s.inputVideoVolume(i))}),e.k0s()(),e.j41(7,"div",9)(8,"input",10),e.bIt("ngModelChange",function(i){e.eBV(n);const s=e.XpG(2);return e.Njj(s.inputVideoVolume(i))}),e.k0s()()()(),e.j41(9,"div",11)(10,"div",12)(11,"h5",5),e.EFF(12,"Loop"),e.k0s(),e.j41(13,"div",13)(14,"div",14)(15,"input",15),e.bIt("click",function(i){e.eBV(n);const s=e.XpG(2);return e.Njj(s.inputVideoLoop(i))}),e.k0s()()()()(),e.j41(16,"div",16)(17,"div",12)(18,"h5",5),e.EFF(19,"Trim"),e.k0s(),e.nrm(20,"div",13),e.k0s()(),e.j41(21,"div",17)(22,"button",18),e.bIt("click",function(){e.eBV(n);const i=e.XpG(2);return e.Njj(i.trimVideo())}),e.EFF(23,"Trim Video"),e.k0s()()()}if(2&o){const n=e.XpG(2);e.R7$(6),e.Y8G("value",n.videoVolume)("min",0)("max",100)("step",1),e.R7$(2),e.Y8G("ngModel",n.videoVolume),e.R7$(7),e.Y8G("checked",n.videoLoop)}}function zi(o,r){if(1&o){const n=e.RV6();e.j41(0,"div")(1,"button",21),e.bIt("click",function(){e.eBV(n);const i=e.XpG(3);return e.Njj(i.crop())}),e.EFF(2,"Crop"),e.k0s()()}}function Yi(o,r){if(1&o){const n=e.RV6();e.j41(0,"div",22)(1,"div",23)(2,"button",24),e.bIt("click",function(){e.eBV(n);const i=e.XpG(3);return e.Njj(i.cancelAdjust())}),e.EFF(3,"Cancel"),e.k0s(),e.j41(4,"button",25),e.bIt("click",function(){e.eBV(n);const i=e.XpG(3);return e.Njj(i.applyAdjust())}),e.EFF(5,"Done"),e.k0s()()()}}function Li(o,r){if(1&o&&(e.j41(0,"div"),e.DNE(1,zi,3,0,"div",3)(2,Yi,6,0,"div",19),e.nrm(3,"adjust-tool",20),e.k0s()),2&o){const n=e.XpG(2);
1e.R7$(),e.Y8G("ngIf",!n.inBackgroundAdjustMode),e.R7$(),e.Y8G("ngIf",n.inBackgroundAdjustMode),e.R7$(),e.Y8G("activeObject",n.activeObject)("Align",!1)("Scale",!0)("Rotate",!1)("Flip",!1)("isBackbround",!0)}}function Wi(o,r){if(1&o&&(e.j41(0,"div"),e.DNE(1,$i,24,6,"div",3)(2,Li,4,8,"div",3),e.k0s()),2&o){const n=e.XpG();e.R7$(),e.Y8G("ngIf","Edit"===n.activePane),e.R7$(),e.Y8G("ngIf","Transform"===n.activePane)}}function Hi(o,r){if(1&o){const n=e.RV6();e.j41(0,"div",27)(1,"div",28)(2,"h5",29),e.EFF(3,"Current color"),e.k0s(),e.j41(4,"div",30)(5,"div",31)(6,"button",32),e.bIt("click",function(){e.eBV(n);const i=e.XpG(2);return e.Njj(i.bgColorPanelVisible=!0)}),e.nrm(7,"pi",33),e.k0s()()()()()}if(2&o){const n=e.XpG(2);e.R7$(6),e.xc7("background",n.selectedBgColor)}}function Zi(o,r){if(1&o){const n=e.RV6();e.j41(0,"div")(1,"button",34),e.bIt("click",function(){e.eBV(n);const i=e.XpG(3);return e.Njj(i.crop())}),e.EFF(2,"Crop"),e.k0s()()}}function Ki(o,r){if(1&o){const n=e.RV6();e.j41(0,"div",22)(1,"div",23)(2,"button",35),e.bIt("click",function(){e.eBV(n);const i=e.XpG(3);return e.Njj(i.cancelAdjust())}),e.EFF(3,"Cancel"),e.k0s(),e.j41(4,"button",25),e.bIt("click",function(){e.eBV(n);const i=e.XpG(3);return e.Njj(i.applyAdjust())}),e.EFF(5,"Done"),e.k0s()()()}}function Ji(o,r){if(1&o&&(e.j41(0,"div"),e.DNE(1,Zi,3,0,"div",3)(2,Ki,6,0,"div",19),e.nrm(3,"adjust-tool",20),e.k0s()),2&o){const n=e.XpG(2);e.R7$(),e.Y8G("ngIf",!n.inBackgroundAdjustMode),e.R7$(),e.Y8G("ngIf",n.inBackgroundAdjustMode),e.R7$(),e.Y8G("activeObject",n.activeObject)("Align",!1)("Scale",!0)("Rotate",!1)("Flip",!1)("isBackbroun
1d",!0)}}function Qi(o,r){if(1&o&&(e.j41(0,"div"),e.nrm(1,"enhance-tool",36),e.k0s()),2&o){const n=e.XpG(2);e.R7$(),e.Y8G("Enhance",!0)("imageFilterUtil",n.selectedBgMedia.imageFilterUtil)}}function qi(o,r){if(1&o){const n=e.RV6();e.j41(0,"div")(1,"div",37)(2,"image-filter-tool",38),e.bIt("changed",function(i){e.eBV(n);const s=e.XpG(2);return e.Njj(s.applyFilter(i))}),e.k0s()()()}if(2&o){const n=e.XpG(2);e.R7$(2),e.Y8G("filter",n.filter)}}function en(o,r){if(1&o&&(e.j41(0,"div"),e.DNE(1,Hi,8,2,"div",26)(2,Ji,4,8,"div",3)(3,Qi,2,2,"div",3)(4,qi,3,1,"div",3),e.k0s()),2&o){const n=e.XpG();e.R7$(),e.Y8G("ngIf",!n.selectedBgMedia&&n.selectedBgColor),e.R7$(),e.Y8G("ngIf","Transform"===n.activePane),e.R7$(),e.Y8G("ngIf","Enhance"===n.activePane),e.R7$(),e.Y8G("ngIf","Filter"===n.activePane)}}let tn=(()=>{var o;class r{constructor(t,i,s,a){this.editorService=t,this.sceneController=i,this.mediaContentService=s,this.modalService=a,this.activePane="color",this.recentlyUsed=[],this.colorsBgPresets=[],this.inBackgroundAdjustMode=!1,this.isUploadedImageLoaded=!1,this.mediaAccept="video/*,image/*",this.videoVolume=0,this.videoLoop=0,this.isVideoProgress=!1,this.searchTerm="",this.searchMode="image",this.basePixabayVideoThumbUrl=F.c.basePixabayVideoThumbUrl,this.stockImages=[],this.stockImagePageNumber=1,this.isImageProgress=!1,this.storePatternProducts=[],this.isPatternLoadProgress=!1,this.bgColorPanelVisible=!1,this.colors=["rgb(0,0,0)","rgb(255, 255, 255)","rgb(242, 38, 19)","rgb(249, 105, 14)","rgb(253, 227, 167)"],this.selectedMediaItemIndex=0,this.executeAction=new e.bkB}ngOnChanges(){}ngOnInit(){this.sceneController.getSelectedScene()&&(this.selectedBgColor=this.sceneController.getSelectedScene().getBackGroundColor(),this.selectedBgMedia=this.sceneController.getSelectedScene().getBackgroundMedia(),this.init()),this.activeObject=this.sceneController.selectedScene.getBackgroundMedia(),this.editorService.sceneChanged.subscribe(t=>{this.sceneController.getSelectedScene()&&(this.selectedBgColor=this.sceneController.getSelectedScene().getBackGroundColor(),this.selectedBgMedia=this.sceneController.getSelectedScene().getBackgroundMedia(),this.init())}),this.getBackgroundPatterns(),this.sceneController.getSelectedScene()}init(){this.selectedBgMedia&&1===this.selectedBgMedia.getMediaType()&&(this.videoVolume=Math.round(100*this.selectedBgMedia.getBgImageObj().volumeFactor),this.videoLoop=this.selectedBgMedia.getBgImageObj().loop)}trimVideo(){const t=this.modalService.open(Ui.R,{centered:!0,size:"lg",backdrop:"static",windowClass:"trim-video-modal"});t.componentInstance.videoCanvasElement=this.selectedBgMedia.getVideo(),t.componentInstance.imgName=this.selectedBgMedia.getBgImageObj().imgName,t.componentInstance.mediaElementJson=this.selectedBgMedia.getBgImageObj(),t.componentInstance.isNew=!0,t.componentInstance.sceneController=this.sceneController,t.result.then(i=>{"ok"===i&&this.sceneController.getCanvas().renderAll()})}crop(){this.executeAction.emit({name:"show_adjust",val:!0})}applyAdjust(){this.executeAction.emit({name:"apply_adjust",val:!0})}cancelAdjust(){this.executeAction.emit({name:"cancel_adjust",val:!0})}getBackgroundPatterns(){this.isPatternLoadProgress=!0,this.mediaContentService.getProductDetails(U.KK.Pattern,0,t=>{t&&t.body&&(this.storePatternProducts=t.body.storeProducts,this.isPatternLoadProgress=!1),this.isImageProgress=!1},t=>{this.isImageProgress=!1})}replace(){this.editorService.replace=!0,this.editorService.setActiveToolPanel(Se.sv.ILLUSTRATION)}onColorPickerChange(t,i){i.value.forEach(a=>a.set("fill",t)),this.activeObject.canvas.renderAll()}colorPickerClose(t,i){const s=i.value,a=[];let l=0;for(const u of s.keys())a[l++]=u;const c=s.get(t);s.delete(t),s.set(c[0].fill,c),a[a.indexOf(t)]=c[0].fill;const p=new Map;for(const u of a)p.set(u,s.get(u));i.value=p,this.activeObject.setShapeSVGColor(i.key,t,c[0].fill)}sortNull(t,i){return 0}get filter(){return this.selectedBgMedia.getFilter()}applyFilter(t){this.selectedBgMedia.setFilter(t)}inputVideoVolume(t){let i;i=t.newValue||0===t.newValue?t.newValue:t,Number.isNaN(i)&&(i=100),i||0===i?i>100?setTimeout(()=>{this.selectedBgMedia.getBgImageObj().volumeFactor=1,this.init()},0):i<=0?setTimeout(()=>{this.selectedBgMedia.getBgImageObj().volumeFactor=0,this.init()},0):setTimeout(()=>{this.selectedBgMedia.getBgImageObj().volumeFactor=i/100,this.init()},0):setTimeout(()=>{this.selectedBgMedia.getBgImageObj().volumeFactor=1,this.init()},0)}inputVideoLoop(t){(t.currentTarget||t.target).checked?(this.selectedBgMedia.getBgImageObj().loop=1,this.videoLoop=1):(this.selectedBgMedia.getBgImageObj().loop=0,this.videoLoop=0)}}return(o=r).\u0275fac=function(t){return new(t||o)(e.rXU(P.x),e.rXU(I.Z),e.rXU(ve.Z),e.rXU(_.Bq))}
1,o.\u0275cmp=e.VBU({type:o,selectors:[["background-edit-tools"]],inputs:{activePane:"activePane",activeObject:"activeObject",inBackgroundAdjustMode:"inBackgroundAdjustMode"},outputs:{executeAction:"executeAction"},features:[e.OA$],decls:5,vars:2,consts:[[1,"pane-section","pane-sectionEditTools"],[1,"edit-content","h-100"],["customScrollDir","",1,"scroll-container","pt-3","pb-3"],[4,"ngIf"],[1,"card","drawer-card"],[1,"card-title","m-0","text-semi"],[1,"d-flex","mt-1"],[1,"wp-100","d-flex","align-items-center"],[1,"opacity-slider",2,"width","100%",3,"change","value","min","max","step"],[1,"ml-9"],["type","text","mask","000",1,"form-control","text-normal","text-black","form-input-sm",3,"ngModelChange","ngModel"],[1,"card","drawer-card","wp-100"],[1,"card-body","d-inline-flex","align-items-center"],[1,"ms-auto"],[1,"checkboxc","d-flex"],["type","checkbox",1,"marked-check",3,"click","checked"],[1,"wp-100"],[1,"wp-100","mt-8"],[1,"btn","btn-outline-primary","btn-auto","text-13","me-3",3,"click"],["class","wp-100 mb-3",4,"ngIf"],[3,"activeObject","Align","Scale","Rotate","Flip","isBackbround"],["type","button",1,"btn","btn-outline-primary","text-13","btn-h40","w-100","mb-9",3,"click"],[1,"wp-100","mb-3"],[1,"d-flex","justify-content-between"],[1,"btn","btn-outline-primary","btn-auto","text-13","mr-8","cancleAdjust",3,"click"],[1,"btn","btn-primary","btn-auto","text-13",3,"click"],["class","drawer-content",4,"ngIf"],[1,"drawer-content"],[1,"card-body"],[1,"card-title","m-0","text-semi","text-normal"],[1,"d-flex","mt-9","document-color",2,"height","38px"],[1,"colors-bg"],["placement","top","ngbTooltip","Change Color","container","body","tooltipClass","tooltip-custom-all min-82",1,"no-style","color","control","p-0","me-2",3,"click"],["name","currentcoloricon",1,"f-24"],["type","button",1,"btn-all","btn-outline-primary","text-13","btn-h40","w-100","mb-9",3,"click"],[1,"btn-all","btn-outline-primary","btn-auto","text-13","mr-8","cancleAdjust",3,"click"],[3,"Enhance","imageFilterUtil"],[1,""],[3,"changed","filter"]],template:function(t,i){1&t&&(e.j41(0,"div",0)(1,"div",1)(2,"div",2),e.DNE(3,Wi,3,2,"div",3)(4,en,5,4,"div",3),e.k0s()()()),2&t&&(e.R7$(3),e.Y8G("ngIf",1===(null==i.selectedBgMedia?null:i.selectedBgMedia.getMediaType())),e.R7$(),e.Y8G("ngIf",0===(null==i.selectedBgMedia?null:i.selectedBgMedia.getMediaType())))},dependencies:[m.bT,X.q,_.md,S.me,S.BC,S.vS,V.d1,N.Zr,Fi.v,De.X,Xi.g,M.b],styles:[".checkboxc[_ngcontent-%COMP%]   input[type=checkbox][_ngcontent-%COMP%]{border:1px solid #E2E3E9}"]}),r})();var nn=d(99939),on=d(41153),sn=d(19945),rn=d(20702),an=d(27649),ln=d(64141),y=d(49969);const cn=o=>({"is-active-tool":o}),dn=o=>({new_item:o});function pn(o,r){if(1&o&&(e.j41(0,"a",10)(1,"div",11),e.nrm(2,"pi",12),e.k0s(),e.j41(3,"span",13),e.EFF(4),e.k0s()()),2&o){const n=e.XpG(2).$implicit;e.R7$(),e.Y8G("ngClass",e.eq3(3,dn,"animated"==n.name)),e.R7$(),e.Y8G("name",n.icon),e.R7$(2),e.JRh(n.title)}}function mn(o,r){if(1&o&&(e.j41(0,"div"),e.DNE(1,pn,5,5,"a",9),e.k0s()),2&o){const n=e.XpG().$implicit;e.R7$(),e.Y8G("ngIf",0==n.subNavs.length&&n.enable)}}function un(o,r){if(1&o){const n=e.RV6();e.j41(0,"div",5),e.bIt("click",function(){const i=e.eBV(n).$implicit,s=e.XpG();return e.Njj(s.executeAction(i))}),e.DNE(1,mn,2,1,"div",6),e.nrm(2,"span",7)(3,"span",8),e.k0s()}if(2&o){const n=r.$implicit,t=e.XpG();e.Y8G("ngClass",e.eq3(2,cn,t.activeTool==n.name)),e.R7$(),e.Y8G("ngIf",n.visible&&!(t.backgroundDrawerDisabled&&"background"===n.name))}}function gn(o,r){if(1&o){const n=e.RV6();e.j41(0,"div",14),e.bIt("click",function(){e.eBV(n);const i=e.XpG();return e.Njj(i.toggleSliderOpen(!0))}),e.nrm(1,"ei",15),e.k0s()}}function hn(o,r){if(1&o){const n=e.RV6();e.j41(0,"div",16),e.bIt("click",function(){e.eBV(n);const i=e.XpG();return e.Njj(i.toggleSliderOpen(!1))}),e.nrm(1,"ei",17),e.k0s()}}let _n=(()=>{var o;class r{constructor(t){this.editorService=t,this.backgroundDrawerDisabled=!0,this.toggleSliderEvent=new e.bkB}ngOnInit(){}ngOnChanges(t){this.editorService.replace&&(this.activeTool=""),this.backgroundDrawerDisabled=this.projectType===ge.gM.VideoEditor}executeAction(t){this.editorService.replace=!1,this.editorService.setActiveToolPanel({panel:t.action,from:"nav"})}toggleSliderOpen(t){this.toggleSliderEvent.emit(t)}}return(o=r).\u0275fac=function(t){return new(t||o)(e.rXU(P.x))},o.\u0275cmp=e.VBU({type:o,selectors:[["toolbar-navigation"]],inputs:{tools:"tools",projectType:"projectType",activeTool:"activeTool",sldBtn:"sldBtn"},outputs:{toggleSliderEvent:"toggleSliderEvent"},features:[e.OA$],decls:5,vars:3,consts:[[1,"menu",2,"height","calc(100% - 5rem)"],["customScrollDir","",1,"is-popover-tb-n","p-0","darkscroll","scroll-container"],["class","inner-nav mt-11",3,"ngClass","click",4,"ngFor","ngForOf"],["class","sliderBtnvideo","placement","top","ngbTooltip","Expand",3,"click",4,"ngIf"],["class","sliderBtnvideo","placement","top","ngbTooltip","Collapse",3,"click",4,"ngIf"],[1,"inner-nav","mt-11",3,"click","ngClass"],[4,"ngIf"],[1,"curve-before","curve"],[1,"curve-after","curve"],["class","nav",4,"ngIf"],[1,"nav"],[1,"hw-40","icon","m-auto",3,"ngClass"],[1,"f-24",3,"name"],[1,"nav-title","text-semi","d-inline-flex","mt-1"],["placement","top","ngbTooltip","Expand",1,"sliderBtnvideo",3,"click"],["name","sliderarrowopen"],["placement","top","ngbTooltip","Collapse",1,"sliderBtnvideo",3,"click"],["name","sliderarrowclose"]],template:function(t,i){1&t&&(e.j41(0,"div",0)(1,"div",1),e.DNE(2,un,4,4,"div",2),e.k0s()(),e.DNE(3,gn,2,0,"div",3)(4,hn,2,0,"div",4)),2&t&&(e.R7$(2),e.Y8G("ngForOf",i.tools),e.R7$(),e.Y8G("ngIf",!i.sldBtn),e.R7$(),e.Y8G("ngIf",i.sldBtn))},dependencies:[m.YU,m.Sq,m.bT,X.q,_.md,M.b,K.KK],styles:[".menu[_ngcontent-%COMP%]   .nav[_ngcontent-%COMP%]   .nav-title[_ngcontent-%COMP%]{color:#939aa9}.menu[_ngcontent-%COMP%]   .nav[_ngcontent-%COMP%]:hover   .nav-title[_ngcontent-%COMP%]{visibility:visible;position:relative;color:#939aa9}.menu[_ngcontent-%COMP%]   .is-active-tool[_ngcontent-%COMP%]   .nav[_ngcontent-%COMP%]   .nav-title[_ngcontent-%COMP%]{visibility:visible;position:relative;color:#fff!important}.new_item[_ngcontent-%COMP%]:after{position:absolute;top:1px;padding-left:44px}"],data:{animation:[(0,y.hZ)("controlsAnimation",[(0,y.kY)(":enter",[(0,y.iF)({opacity:0}
1),(0,y.i0)("225ms cubic-bezier(.4,0,.2,1)",(0,y.iF)({opacity:1}))]),(0,y.kY)(":leave",[(0,y.i0)("0ms cubic-bezier(.4,0,.2,1)",(0,y.iF)({opacity:0}))])])]}}),r})();var vn=d(81947),fn=d(73744);const bn=["dialogcontainer"],Cn=["dropdown"],xn=["add-new-scene",""],kn=o=>({active:o});function Tn(o,r){1&o&&e.nrm(0,"pi",33)}function jn(o,r){if(1&o){const n=e.RV6();e.j41(0,"div",29)(1,"div",30),e.bIt("click",function(){const i=e.eBV(n).$implicit,s=e.XpG(2);return s.selectProject(i),e.Njj(s.proceed())}),e.nrm(2,"img",31),e.k0s(),e.DNE(3,Tn,1,0,"pi",32),e.k0s()}if(2&o){const n=r.$implicit,t=e.XpG(2);e.xc7("width",t.imageSizel.width,"px")("height",t.imageSizel.height,"px")("margin-left",t.thumbLeftMargin,"px")("margin-right",t.thumbRightMargin,"px"),e.R7$(),e.Y8G("ngClass",e.eq3(11,kn,n.item.productImageId===(null==t.selectedProject?null:t.selectedProject.item.productImageId))),e.R7$(),e.Y8G("src",n.posterImage,e.B4B),e.R7$(),e.Y8G("ngIf",1==n.item.pro&&!t.isSubscribed)}}function Pn(o,r){if(1&o&&(e.j41(0,"div",27),e.DNE(1,jn,4,13,"div",28),e.k0s()),2&o){const n=e.XpG();e.R7$(),e.Y8G("ngForOf",null==n.mainSelectedProduct?null:n.mainSelectedProduct.imageObjects)}}function Sn(o,r){if(1&o&&e.nrm(0,"div",37),2&o){const n=e.XpG(2);e.xc7("width",n.imageSizel.width,"px")("height",n.imageSizel.height,"px")("margin-left",n.thumbLeftMargin,"px")("margin-right",n.thumbRightMargin,"px")}}function wn(o,r){if(1&o&&(e.j41(0,"div",34)(1,"div",35),e.DNE(2,Sn,1,8,"div",36),e.k0s()()),2&o){const n=e.XpG();e.R7$(2),e.Y8G("ngForOf",n.Arr(6).fill(1))}}let yn=(()=>{var o;class r{constructor(t,i,s,a,l){this.activeModal=t,this.http=i,this.modalService=s,this.authService=a,this.templateService=l,this.projectName="",this.submit=!1,this.mainCategories=[],this.mainSelectedFormat=3,this.selectedProject=null,this.Arr=Array,this.inProgress=!1,this.thumbLeftMargin=15,this.thumbRightMargin=15,this.isLoaded=!1,this.dropdownItems=[],this.rowsCount=15,this.pageNumber=0,this.isProductsEnd=!1,this.user=this.authService.currentUser(),this.isSubscribed=!!this.user&&this.user.subscribed,this.mainSelectedProduct={productId:"",displayName:"",imageSizel:"",imageObjects:[]}}ngOnInit(){this.mainSelectedFormat=1===this.hRatio&&1===this.wRatio?2:9===this.hRatio&&16===this.wRatio?1:16===this.hRatio&&9===this.wRatio?3:1,this.sceneController.design&&this.sceneController.design.properties.productId&&(this.productId=this.sceneController.design.properties.productId),this.dropdown.selectFirstOrDefault()}changeProduct(t){var i=this;return(0,f.A)(function*(s,a=!1){i.isLoaded=!1,i.pageNumber=0,i.isProductsEnd=!1,i.mainSelectedProduct.imageObjects=[],i.mainSelectedProduct.productId=s.productId,i.getNewTemplateByProductId(s.productId,l=>{},a)}).apply(this,arguments)}getTemplates(t,i,s){this.templateService.getProductDetails(114,0,a=>{a&&s(a.storeProducts)},a=>{},null,i)}getTemplateByProductId(t,i,s,a){this.templateService.getTemplateByProductId(t,0,l=>{a(l.storeProductImages)},l=>{},i,s)}getFormattedProduct(t,i,s){let l,a=[];for(let c=0;c<s.length;c++)l=s[c],a.push({video:l.videoThumbUrl,posterImage:l.thumbUrl,item:l,format:l.format});return t.imageSizel=this.imageSizel,a&&a.length>0&&(t.imageObjects=t.imageObjects.concat(a)),t}onCategorySelect(t){this.isLoaded=!1,this.getTemplateByProductId(t.productId,this.mainSelectedFormat,he.i.Main,i=>{let a=this.getFormattedProduct(t,this.mainSelectedFormat,i);this.mainSelectedProduct=a,this.isLoaded=!0})}get imageSizel(){let t=this.container.nativeElement.clientWidth,s=this.templateService.getImageSizeL(this.mainSelectedFormat,t,t,!0,!1);return this.thumbLeftMargin=s.space,this.thumbRightMargin=s.space,s}selectProject(t){this.selectedProject=t}proceed(){this.sceneController.selectedScene&&this.sceneController.selectedScene.deselectAll(),this.inProgress=!0;let t=this.showProgress();this.templateService.getTemplateByContentUrl(this.selectedProject.item.contentUrl,i=>{i&&this.sceneController.addScene(i.sceneItems[0],this.selectedProject.item.pro,this.onIndexForAddScene).then(()=>{t.dismiss(),this.inProgress=!1,this.activeModal.close("ok")})},i=>{this.inProgress=!1,this.activeModal.close()})}showProgress(){const t=this.modalService.open(vn.x,{backdrop:"static",size:"sm",centered:!0});return t.result.then(i=>{}),t}addBlankScene(){this.sceneController.selectedScene&&this.sceneController.selectedScene.deselectAll();let t="";1===this.wRatio&&1===this.hRatio?t="scene_11.json":9===this.wRatio&&16===this.hRatio?t="scene_916.json":16===this.wRatio&&9===this.hRatio&&(t="scene_169.json"),this.http.get("assets/json/init/"+t).subscribe(i=>{this.sceneController.addScene(i.sceneItems[0],0,this.onIndexForAddScene),setTimeout(()=>{this.activeModal.close("ok")},500)})}
1getNewTemplateByProductId(t,i=null,s=!1){let a=this.mainSelectedFormat;this.isLoaded=!1,this.templateService.getNewTemplatesByProductId({format:a,pageNumber:this.pageNumber,rows:this.rowsCount,productId:t,tagId:null},c=>{let p=c.storeProductImages;if(p&&p.length>0){let u=this.getFormattedProduct(this.mainSelectedProduct,this.mainSelectedFormat,p);this.mainSelectedProduct=u,p.length<this.rowsCount&&(this.isProductsEnd=!0)}else this.isProductsEnd=!0,0===this.pageNumber&&this.dropdown.selectFirstOrDefault();this.isLoaded=!0,i()},c=>{})}}return(o=r).\u0275fac=function(t){return new(t||o)(e.rXU(_.Lw),e.rXU(L.Qq),e.rXU(_.Bq),e.rXU(R.u),e.rXU(Me.I))},o.\u0275cmp=e.VBU({type:o,selectors:[["","add-new-scene",""]],viewQuery:function(t,i){if(1&t&&(e.GBs(bn,7),e.GBs(Cn,7)),2&t){let s;e.mGM(s=e.lsd())&&(i.container=s.first),e.mGM(s=e.lsd())&&(i.dropdown=s.first)}},inputs:{sceneController:"sceneController",hRatio:"hRatio",wRatio:"wRatio",onIndexForAddScene:"onIndexForAddScene"},attrs:xn,decls:30,vars:6,consts:[["dropdown",""],["dialogcontainer",""],[1,"modal-header","border-0"],["type","button","aria-hidden","close",1,"close",3,"click"],["name","close",1,"f-30"],[1,"container-fluid","modal-inner-content"],[1,"row","my-project","h-100"],[1,"sidenav","p-0","h-100","drawer-content",2,"position","inherit!important"],[1,"ml-13"],[1,"text-24","text-semi","text-black"],["id","sidebar1",1,"drawer-content","ml-13","mt-4"],[1,"pane-section"],[1,"scroll-content"],["customScrollDir","",1,"scroll-container",2,"border-bottom-left-radius","1rem"],[1,"list-unstyled","pt-3","ps-0","pe-0"],[1,"cfs",3,"click"],["data-toggle","modal","data-target","#exampleModal",1,"add-btn","ms-2","me-3"],["name","iconplus",1,"f-12"],[1,"mb-2"],[1,"list-unstyled","components","temp-tab","add-scene","ps-0","pe-0"],[3,"changeProduct","mainSelectedFormat","templateType","productId","addRouterLink"],[1,"drawer-content","dialog-main-content","mt-4",2,"margin-left","25px"],[1,"p-0","pane-section",2,"margin","28px 0 30px 0"],[1,"h-100","scroll-content","templates-thumbs-list"],["customScrollDir","",1,"scroll-container","ps-0","pe-0"],["class","templates-thumbs-list",4,"ngIf"],["class","placeholder-view ng-image-slider",4,"ngIf"],[1,"templates-thumbs-list"],["class","project-outer img-div",3,"width","height","margin-left","margin-right",4,"ngFor","ngForOf"],[1,"project-outer","img-div"],[1,"template-item",3,"click","ngClass"],[3,"src"],["name","proTemplateIcon","class","f-28 icon  pro-template-icon",4,"ngIf"],["name","proTemplateIcon",1,"f-28","icon","pro-template-icon"],[1,"placeholder-view","ng-image-slider"],[1,"inner"],["class","img",3,"width","height","margin-left","margin-right",4,"ngFor","ngForOf"],[1,"img"]],template:function(t,i){if(1&t){const s=e.RV6();e.j41(0,"div",2)(1,"button",3),e.bIt("click",function(){return e.eBV(s),e.Njj(i.activeModal.dismiss("Cross click"))}),e.nrm(2,"pi",4),e.k0s()(),e.j41(3,"div",5)(4,"div",6)(5,"div",7)(6,"div",8)(7,"div",9),e.EFF(8,"Add New Scene"),e.k0s()(),e.j41(9,"div",10)(10,"div",11)(11,"div",12)(12,"div",13)(13,"ul",14)(14,"li",15),e.bIt("click",function(){return e.eBV(s),e.Njj(i.addBlankScene())}),e.j41(15,"a",16),e.nrm(16,"pi",17),e.k0s(),e.EFF(17," Add Blank "),e.k0s()(),e.nrm(18,"hr",18),e.j41(19,"ul",19)(20,"li")(21,"drop-down-menu",20,0),e.bIt("changeProduct",function(l){return e.eBV(s),e.Njj(i.changeProduct(l))}),e.k0s()()()()()()()(),e.j41(23,"div",21,1)(25,"div",22)(26,"div",23)(27,"div",24),e.DNE(28,Pn,2,1,"div",25)(29,wn,3,1,"div",26),e.k0s()()()()()()}2&t&&(e.R7$(21),e.Y8G("mainSelectedFormat",i.mainSelectedFormat)("templateType",2)("productId",i.productId)("addRouterLink",!1),e.R7$(7),e.Y8G("ngIf",i.isLoaded),e.R7$(),e.Y8G("ngIf",!i.isLoaded))},dependencies:[m.YU,m.Sq,m.bT,X.q,fn.S,M.b],styles:[".template-item[_ngcontent-%COMP%]{float:left;margin:1rem;border-radius:16px;box-shadow:1px 1px 10px #c4c4c4}.template-item.active[_ngcontent-%COMP%], .template-item[_ngcontent-%COMP%]   img[_ngcontent-%COMP%]:hover{border:2px solid #475AE7}.template-item[_ngcontent-%COMP%]   img[_ngcontent-%COMP%]{width:100%;height:100%;box-sizing:border-box}.scroll[_ngcontent-%COMP%]{overflow-y:auto;height:410px}.btn.layout-btn[_ngcontent-%COMP%]{font-size:1rem;color:#000;padding:.5rem 2rem;border-radius:1rem;border:solid 1px #E4E4EB}.btn.layout-btn.btn-outline-primary.active[_ngcontent-%COMP%]{background-color:#f8f8fa;color:#475ae7}"],data:{animation:[(0,y.hZ)("controlsAnimation",[(0,y.kY)(":enter",[(0,y.iF)({opacity:0}
1),(0,y.i0)("225ms cubic-bezier(.4,0,.2,1)",(0,y.iF)({opacity:1}))]),(0,y.kY)(":leave",[(0,y.i0)("0ms cubic-bezier(.4,0,.2,1)",(0,y.iF)({opacity:0}))])])]}}),r})();var Ae=d(56751),Ue=d(47986),Fe=d(36060);const In=["timelineCanvasWrapper"],En=["thumblineWrapper"],Mn=["timelineSb"],Xe=o=>({active:o}),$e=(o,r)=>({"e-active":o,"w-active":r}),ze=o=>({"btn-prev-next-hidden":o}),On=(o,r,n,t)=>({"top-b":o,"bottom-b":r,"left-b":n,"right-b":t}),Ye=o=>({transform:o}),Vn=o=>({"audio-loop":o});function Rn(o,r){if(1&o){const n=e.RV6();e.j41(0,"div",41),e.bIt("rzResizing",function(i){e.eBV(n);const s=e.XpG(4);return e.Njj(s.rzResizing(i))})("rzStop",function(i){e.eBV(n);const s=e.XpG(2).$implicit,a=e.XpG(2);return e.Njj(a.designItemResized(i,s.selectedDesignItem))})("endOffset",function(i){e.eBV(n);const s=e.XpG(2).$implicit,a=e.XpG(2);return e.Njj(a.stoppedMove(i,s.selectedDesignItem))}),e.j41(1,"div",42)(2,"div",43),e.nrm(3,"pi",44),e.k0s(),e.j41(4,"div",45),e.EFF(5),e.nI1(6,"mstoseconds"),e.k0s()()()}if(2&o){const n=e.XpG(2).$implicit,t=e.sdS(2),i=e.XpG(2);e.xc7("width",n.selectedDesignItem.getDuration()*i.sceneWidthPerDuration,"px")("left",n.selectedDesignItem.getStartTime()*i.sceneWidthPerDuration,"px"),e.Y8G("rzMinWidth",n.selectedDesignItem.designItemAnimationEditUtil.minAllowedDuration()*i.sceneWidthPerDuration)("rzMaxWidth",n.selectedDesignItem.designItemAnimationEditUtil.maxAllowedDuration()*i.sceneWidthPerDuration)("ngClass",e.l_i(17,$e,i.showETooltip,i.showWTooltip))("rzHandles",n.selectedDesignItem.designItemAnimationEditUtil.isEditable?i.rzHandlesDesignItem:"")("rzContainment","parent")("rzContainment","parent")("bounds",t)("inBounds","true")("trackPosition",!1),e.R7$(3),e.FS9("name",n.selectedDesignItem.designItemAnimationEditUtil.designItemIcon),e.R7$(2),e.JRh(e.bMT(6,15,n.selectedDesignItem.getDuration()))}}function Gn(o,r){if(1&o&&(e.j41(0,"div",50),e.nrm(1,"div",51),e.j41(2,"div",52),e.EFF(3),e.nI1(4,"mstoseconds"),e.k0s()()),2&o){const n=e.XpG(5);e.xc7("top",n.eToolTipTop,"px")("left",n.eToolTipLeft,"px"),e.R7$(3),e.JRh(e.bMT(4,5,n.elementEndTime))}}function Bn(o,r){if(1&o&&(e.j41(0,"div",50),e.nrm(1,"div",51),e.j41(2,"div",52),e.EFF(3),e.nI1(4,"mstoseconds"),e.k0s()()),2&o){const n=e.XpG(5);e.xc7("top",n.wToolTipTop,"px")("left",n.wToolTipLeft,"px"),e.R7$(3),e.JRh(e.bMT(4,5,n.elementStartTime))}}function Dn(o,r){if(1&o){const n=e.RV6();e.j41(0,"div",46),e.bIt("rzStop",function(i){e.eBV(n);const s=e.XpG(2).$implicit,a=e.XpG(2);return e.Njj(a.designItemResized(i,s.selectedMediaContainer))})("endOffset",function(i){e.eBV(n);const s=e.XpG(2).$implicit,a=e.XpG(2);return e.Njj(a.stoppedMove(i,s.selectedDesignItem))}),e.j41(1,"div",42),e.nrm(2,"span",47),e.EFF(3),e.nI1(4,"mstominuteSeconds"),e.k0s(),e.DNE(5,Gn,5,7,"div",48)(6,Bn,5,7,"div",49),e.k0s()}if(2&o){const n=e.XpG(2).$implicit,t=e.sdS(2),i=e.XpG(2);e.xc7("width",n.selectedMediaContainer.getDuration()*i.sceneWidthPerDuration,"px")("left",n.selectedMediaContainer.getStartTime()*i.sceneWidthPerDuration,"px"),e.Y8G("rzMinWidth",n.selectedMediaContainer.designItemAnimationEditUtil.minAllowedDuration()*i.sceneWidthPerDuration)("rzMaxWidth",n.selectedMediaContainer.designItemAnimationEditUtil.maxAllowedDuration()*i.sceneWidthPerDuration)("ngClass",e.l_i(20,$e,i.showETooltip,i.showWTooltip))("rzHandles",n.selectedMediaContainer.designItemAnimationEditUtil.isEditable?i.rzHandlesDesignItem:"")("rzContainment","parent")("bounds",t)("inBounds","true")("trackPosition",!1),e.R7$(2),e.ZvI("ng-tns-c153-0 hw-15 icon \n             ",n.selectedMediaContainer.designItemAnimationEditUtil.animationTitle,"-icon"),e.R7$(),e.SpI(" ",e.bMT(4,18,n.selectedMediaContainer.getDuration())," "),e.R7$(2),e.Y8G("ngIf",i.showETooltip),e.R7$(),e.Y8G("ngIf",i.showWTooltip)}}function Nn(o,r){if(1&o&&(e.j41(0,"div",38),e.DNE(1,Rn,7,20,"div",39)(2,Dn,7,23,"div",40),e.k0s()),2&o){const n=e.XpG().$implicit;e.R7$(),e.Y8G("ngIf",n.selectedDesignItem),e.R7$(),e.Y8G("ngIf",n.selectedMediaContainer)}}function An(o,r){if(1&o){const n=e.RV6();e.j41(0,"pi",53),e.bIt("click",function(){e.eBV(n);const i=e.XpG().index,s=e.XpG(2);return e.Njj(s.moveToPrev(i))}),e.k0s()}if(2&o){const n=e.XpG().$implicit,t=e.XpG(2);
1e.Y8G("ngClass",e.eq3(1,ze,n.getDuration()*t.sceneWidthPerDuration<=120))}}function Un(o,r){if(1&o){const n=e.RV6();e.j41(0,"li")(1,"a",32),e.bIt("click",function(){e.eBV(n);const i=e.XpG().index,s=e.XpG(2);return e.Njj(s.moveToPrev(i))}),e.nrm(2,"pi",54),e.EFF(3,"Move Left"),e.k0s()()}}function Fn(o,r){if(1&o){const n=e.RV6();e.j41(0,"li")(1,"a",32),e.bIt("click",function(){e.eBV(n);const i=e.XpG().index,s=e.XpG(2);return e.Njj(s.moveToNext(i))}),e.nrm(2,"pi",55),e.EFF(3,"Move Right"),e.k0s()()}}function Xn(o,r){if(1&o){const n=e.RV6();e.j41(0,"pi",56),e.bIt("click",function(){e.eBV(n);const i=e.XpG().index,s=e.XpG(2);return e.Njj(s.moveToNext(i))}),e.k0s()}if(2&o){const n=e.XpG().$implicit,t=e.XpG(2);e.Y8G("ngClass",e.eq3(1,ze,n.getDuration()*t.sceneWidthPerDuration<=120))}}function $n(o,r){if(1&o){const n=e.RV6();e.j41(0,"div",17)(1,"div",18,3),e.DNE(3,Nn,3,2,"div",19),e.k0s(),e.j41(4,"div",20),e.bIt("rzStop",function(i){const s=e.eBV(n),a=s.$implicit,l=s.index,c=e.XpG(2);return e.Njj(c.sceneResized(i,l,a))})("click",function(){const i=e.eBV(n).index,s=e.XpG(2);return e.Njj(s.selectScene(i))})("rzResizing",function(i){e.eBV(n);const s=e.XpG(2);return e.Njj(s.sceneResizing(i))}),e.j41(5,"div",21),e.DNE(6,An,1,3,"pi",22),e.j41(7,"div",23)(8,"div",24)(9,"div",25)(10,"a",26),e.bIt("click",function(i){return e.eBV(n),e.Njj(i.preventDefault())}),e.nrm(11,"pi",27),e.k0s(),e.j41(12,"div",28)(13,"ul",29),e.DNE(14,Un,4,0,"li",30)(15,Fn,4,0,"li",30),e.j41(16,"li",31)(17,"a",32),e.bIt("click",function(){const i=e.eBV(n).index,s=e.XpG(2);return e.Njj(s.addScene(i+1))}),e.nrm(18,"pi",33),e.EFF(19,"Add"),e.k0s()(),e.j41(20,"li")(21,"a",32),e.bIt("click",function(){const i=e.eBV(n).index,s=e.XpG(2);return e.Njj(s.duplicateScene(i))}),e.nrm(22,"pi",34),e.EFF(23,"Duplicate"),e.k0s()(),e.j41(24,"li")(25,"a",35),e.bIt("click",function(){const i=e.eBV(n).index,s=e.XpG(2);return e.Njj(s.deleteScene(i))}),e.nrm(26,"pi",36),e.EFF(27,"Delete"),e.k0s()()()()()()(),e.DNE(28,Xn,1,3,"pi",37),e.k0s()()()}if(2&o){const n=r.$implicit,t=r.index,i=r.last,s=e.XpG(2);e.R7$(3),e.Y8G("ngIf",s.selectedSceneIndex===t),e.R7$(),e.xc7("width",n.getDuration()*s.sceneWidthPerDuration,"px")("background-image","url("+n.getThumb()+")"),e.Y8G("rzHandles","e")("rzMaxWidth",3e4*s.sceneWidthPerDuration)("rzMinWidth",n.getMinimumDuration()*s.sceneWidthPerDuration+1)("ngClass",e.eq3(14,Xe,t===s.selectedSceneIndex)),e.R7$(2),e.Y8G("ngIf",0!=t),e.R7$(8),e.Y8G("ngIf",0!=t&&n.getDuration()*s.sceneWidthPerDuration<=120),e.R7$(),e.Y8G("ngIf",!i&&n.getDuration()*s.sceneWidthPerDuration<=120),e.R7$(10),e.Y8G("disabled",1===s.sceneController.scenes.length),e.R7$(3),e.Y8G("ngIf",!i)}}function zn(o,r){if(1&o&&(e.j41(0,"div",50),e.nrm(1,"div",51),e.j41(2,"div",52),e.EFF(3),e.nI1(4,"mstoseconds"),e.k0s()()),2&o){const n=e.XpG(2);e.xc7("top",n.eToolTipTop,"px")("left",n.eToolTipLeft,"px"),e.R7$(3),e.JRh(e.bMT(4,5,n.elementEndTime))}}function Yn(o,r){if(1&o&&(e.j41(0,"div",50),e.nrm(1,"div",51),e.j41(2,"div",52),e.EFF(3),e.nI1(4,"mstoseconds"),e.k0s()()),2&o){const n=e.XpG(2);e.xc7("top",n.wToolTipTop,"px")("left",n.wToolTipLeft,"px"),e.R7$(3),e.JRh(e.bMT(4,5,n.elementStartTime))}}function Ln(o,r){if(1&o){const n=e.RV6();e.j41(0,"button",57),e.bIt("click",function(){e.eBV(n);const i=e.XpG(2);return e.Njj(i.addScene())}),e.EFF(1,"+"),e.k0s()}}function Wn(o,r){if(1&o&&(e.j41(0,"div",11),e.DNE(1,$n,29,16,"div",12)(2,zn,5,7,"div",13)(3,Yn,5,7,"div",14)(4,Ln,2,0,"button",15),e.nrm(5,"div",16),e.k0s()),2&o){const n=e.XpG();e.R7$(),e.Y8G("ngForOf",null==n.sceneController?null:n.sceneController.scenes),e.R7$(),e.Y8G("ngIf",n.showETooltip),e.R7$(),e.Y8G("ngIf",n.showWTooltip),e.R7$(),e.Y8G("ngIf",(null==n.sceneController?null:n.sceneController.scenes.length)>0&&(null==n.sceneController?null:n.sceneController.scenes.length)<6)}}function Hn(o,r){if(1&o&&(e.j41(0,"span",77),e.EFF(1),e.nI1(2,"mstominuteSeconds"),e.k0s()),2&o){const n=e.XpG(3);e.R7$(),e.SpI(" ",e.bMT(2,1,null==n.sceneController||null==n.sceneController.audioObj?null:n.sceneController.audioObj.trimStart)," ")}}function Zn(o,r){if(1&o){const n=e.RV6();e.j41(0,"button",78),e.bIt("click",function(){e.eBV(n);const i=e.XpG(3);return e.Njj(i.playAudio())}),e.nrm(1,"pi",79),e.k0s()}}function Kn(o,r){if(1&o){const n=e.RV6();
1e.j41(0,"button",80),e.bIt("click",function(){e.eBV(n);const i=e.XpG(3);return e.Njj(i.stopAudio())}),e.nrm(1,"pi",81),e.k0s()}}function Jn(o,r){1&o&&e.nrm(0,"button",82)}function Qn(o,r){if(1&o){const n=e.RV6();e.j41(0,"button",83),e.bIt("click",function(){e.eBV(n);const i=e.XpG(3);return e.Njj(i.changeLoop(!1))}),e.nrm(1,"pi",84),e.k0s()}}function qn(o,r){if(1&o){const n=e.RV6();e.j41(0,"button",85),e.bIt("click",function(){e.eBV(n);const i=e.XpG(3);return e.Njj(i.changeLoop(!0))}),e.nrm(1,"pi",84),e.k0s()}}function eo(o,r){if(1&o){const n=e.RV6();e.j41(0,"div",91),e.bIt("movingOffset",function(i){e.eBV(n);const s=e.XpG(4);return e.Njj(s.trimAudio(i))})("edge",function(i){e.eBV(n);const s=e.XpG(4);return e.Njj(s.checkEdge(i))}),e.k0s()}if(2&o){e.XpG();const n=e.sdS(1),t=e.XpG(3);e.xc7("width",t.audioItemWidth,"px"),e.Y8G("position",t.position)("lockXAxix",40)("preventDefaultEvent","true")("lockAxis","y")("bounds",n)("inBounds",t.inBounds)("outOfBounds",t.outOfBounds)}}function to(o,r){if(1&o&&(e.j41(0,"div",86,4)(2,"div",87),e.nrm(3,"div",88)(4,"div",89),e.k0s(),e.DNE(5,eo,1,9,"div",90),e.k0s()),2&o){const n=e.XpG(3);e.Y8G("ngClass",e.ziG(5,On,!(null!=n.edge&&n.edge.top),!(null!=n.edge&&n.edge.bottom),!(null!=n.edge&&n.edge.left),!(null!=n.edge&&n.edge.right))),e.R7$(2),e.xc7("width",n.videoThumbWidth,"px"),e.R7$(),e.Y8G("ngStyle",e.eq3(10,Ye,"translateX("+n.audioSeekPos+"px)")),e.R7$(2),e.Y8G("ngIf",null==n.sceneController||null==n.sceneController.audioObj?null:n.sceneController.audioObj.audioElementDuration)}}function io(o,r){if(1&o&&e.nrm(0,"div",88),2&o){const n=e.XpG(4);e.Y8G("ngStyle",e.eq3(1,Ye,"translateX("+n.audioSeekPos+"px)"))}}function no(o,r){if(1&o&&e.nrm(0,"div",95),2&o){const n=e.XpG(4);e.xc7("width",n.sceneController.audioObj.loop?n.videoThumbWidth:n.audioItemWidth,"px"),e.Y8G("ngClass",e.eq3(3,Vn,!0===n.sceneController.audioObj.loop))}}function oo(o,r){if(1&o&&(e.j41(0,"div",92)(1,"div",87),e.DNE(2,io,1,3,"div",93),e.nrm(3,"div",89),e.k0s(),e.DNE(4,no,1,5,"div",94),e.k0s()),2&o){const n=e.XpG(3);e.R7$(),e.xc7("width",n.videoThumbWidth,"px"),e.R7$(),e.Y8G("ngIf",!n.sceneController.isPlaying),e.R7$(2),e.Y8G("ngIf",null==n.sceneController||null==n.sceneController.audioObj?null:n.sceneController.audioObj.audioElementDuration)}}function so(o,r){if(1&o&&(e.j41(0,"div",96),e.nrm(1,"div",97),e.k0s()),2&o){const n=r.$implicit,t=r.index,i=e.XpG(3);e.xc7("width",i.sceneDurationMusic(n),"px"),e.Y8G("ngClass",e.eq3(3,Xe,i.selectedSceneIndex==t))}}function ro(o,r){if(1&o&&(e.j41(0,"div",61)(1,"div",62),e.DNE(2,Hn,3,3,"span",63),e.k0s(),e.j41(3,"div",64)(4,"div",65)(5,"div",66),e.DNE(6,Zn,2,0,"button",67)(7,Kn,2,0,"button",68)(8,Jn,1,0,"button",69)(9,Qn,2,0,"button",70)(10,qn,2,0,"button",71),e.k0s()(),e.j41(11,"div",72),e.DNE(12,to,6,12,"div",73)(13,oo,5,4,"div",74),e.j41(14,"div",75),e.DNE(15,so,2,5,"div",76),e.k0s()()()()),2&o){const n=e.XpG(2);e.R7$(),e.xc7("left",130,"px"),e.R7$(),e.Y8G("ngIf",n.sceneController.audioObj),e.R7$(4),e.Y8G("ngIf",!n.sceneController.isPlaying&&n.sceneController.audioObj&&!(null!=n.sceneController&&null!=n.sceneController.audioObj&&n.sceneController.audioObj.isPlaying)),e.R7$(),e.Y8G("ngIf",!n.sceneController.isPlaying&&n.sceneController.audioObj&&(null==n.sceneController||null==n.sceneController.audioObj?null:n.sceneController.audioObj.isPlaying)),e.R7$(),e.Y8G("ngIf",n.sceneController.audioObj&&n.videoDuration<(null==n.sceneController||null==n.sceneController.audioObj?null:n.sceneController.audioObj.audioElementDuration)),e.R7$(),e.Y8G("ngIf",n.sceneController.audioObj&&n.videoDuration>(null==n.sceneController||null==n.sceneController.audioObj?null:n.sceneController.audioObj.audioElementDuration)&&n.sceneController.audioObj.loop),e.R7$(),e.Y8G("ngIf",n.sceneController.audioObj&&n.videoDuration>(null==n.sceneController||null==n.sceneController.audioObj?null:n.sceneController.audioObj.audioElementDuration)&&!n.sceneController.audioObj.loop),e.R7$(2),e.Y8G("ngIf",n.videoDuration<(null==n.sceneController||null==n.sceneController.audioObj?null:n.sceneController.audioObj.audioElementDuration)),e.R7$(),e.Y8G("ngIf",n.sceneController.audioObj&&n.videoDuration>(null==n.sceneController||null==n.sceneController.audioObj?null:n.sceneController.audioObj.audioElementDuration)),e.R7$(2),e.Y8G("ngForOf",n.sceneController.scenes)}}function ao(o,r){1&o&&(e.j41(0,"div",31)(1,"div",98)(2,"div",99)(3,"div",100),e.nrm(4,"img",101),e.k0s(),e.j41(5,"div",102)(6,"h6",103),e.EFF(7,"No Music added"),e.k0s(),e.j41(8,"p",104),e.EFF(9,"There is no music added in your project as of now. Add now from left panel and show your creativity."),e.k0s()()()()())}function lo(o,r){if(1&o&&(e.j41(0,"div",58),e.DNE(1,ro,16,11,"div",59)(2,ao,10,0,"div",60),e.k0s()),2&o){const n=e.XpG();e.R7$(),e.Y8G("ngIf",null==n.sceneController?null:n.sceneController.audioObj),e.R7$(),e.Y8G("ngIf",!(null!=n.sceneController&&n.sceneController.audioObj))}}let co=(()=>{var o;class r{set timelineView(t){this.view=t,"music"===t&&(this.position=this.sceneController.audioObj?{x:-(this.sceneController.audioObj.trimStart*this.getPixelPerTime()-40),y:0}:{x:40,y:0})}onResize(t){this.position=this.sceneController.audioObj?{x:-(this.sceneController.audioObj.trimStart*this.getPixelPerTime()-40),y:0}:{x:40,y:0}}get timelineView(){return this.view}constructor(t,i,s,a,l,c,p){this.andorService=t,this.stateService=i,this.ngZone=s,this.sceneController=a,this.modalService=l,this.authSevice=c,this.editorService=p,this.isPlaying=this.andorService.isPlaying,this.zoomFactor=50,this.speedFactor=50,this.maxThumbRange=8,this.minThumbRange=.2,this.up
1perSpeedRange=3,this.lowerSpeedRange=.75,this.startAnimFnCall=!1,this.playTime="00:00/00:00",this.totalDuration=0,this.currentDuration=0,this.inBounds=!0,this.sceneDuration=60,this.sceneWidthPerDuration=.035,this.edge={top:!0,bottom:!0,left:!0,right:!0},this.outOfBounds={top:!1,bottom:!1,left:!0,right:!0},this.outOfDesignItemBounds={top:!1,bottom:!1,left:!1,right:!1},this.volume=40,this.position={x:40,y:0},this.isLoop=!1,this.audioSeekPos=0,this.rzHandlesDesignItem="w,e",this.showETooltip=!1,this.showWTooltip=!1,this.sceneController.onChange=u=>{u&&"music-volume"===u.name?this.volume=Math.round(100*u.val):u&&"music-delete"===u.name?this.progressEvent=null:u&&"music-add"===u.name&&(this.progressEvent=null,this.audioSeekPos=0)},this.user=this.authSevice.currentUser()}ngOnDestroy(){this.sceneController.audioObj&&this.sceneController.audioObj.stop()}ngAfterViewInit(){}checkEdge(t){this.edge=t}trimAudio(t){let i=40-t.x,a=this.getTimePerPixel()*i;this.sceneController.audioObj&&(this.sceneController.audioObj.trimStart=Math.round(a),this.sceneController.audioObj.trimEnd=a+this.videoDuration>this.sceneController.audioObj.audioElementDuration?this.sceneController.audioObj.audioElementDuration:Math.round(a+this.videoDuration))}duplicate(t){this.sceneController.duplicateScene(t)}select(){}getTimePerPixel(){return this.videoDuration/this.videoThumbWidth}getPixelPerTime(){return this.videoThumbWidth/this.videoDuration}inputVolume(){this.sceneController.audioObj&&this.sceneController.audioObj.updateVolume(this.volume/100)}inputVolumeFromSlider(t){this.sceneController.audioObj&&(this.volume=t.newValue,this.sceneController.audioObj.updateVolume(this.volume/100))}changeLoop(t){this.sceneController.audioObj.updateLoop(t)}get audioItemWidth(){let t=0,i=this.getPixelPerTime();return this.sceneController&&this.sceneController.audioObj&&(t=this.sceneController?.audioObj?.audioElementDuration*i),t}get videoDuration(){let t=0;for(let i=0;i<this.sceneController.scenes.length;i++)t+=this.sceneController.scenes[i].getDuration();return t}get videoThumbWidth(){let i=0;return i||(i=this.thumblineWrapper.nativeElement.clientWidth-30),i-160}sceneDurationMusic(t){return t.getDuration()*this.getPixelPerTime()}ngOnInit(){this.changing.subscribe(t=>{})}play(){}playAudio(){if(this.sceneController.audioObj){let s=this.sceneController.audioObj.trimEnd;this.sceneController.audioObj.playSceneAudio(this.sceneController.audioObj.trimStart,s);var t=this.videoDuration/1e3;this.progressEvent||(this.sceneController.audioObj.progressEvent=a=>{this.progressEvent="init";let l=this.getPixelPerTime();this.audioSeekPos=a*l*1e3,s=this.sceneController.audioObj.trimEnd,this.sceneController.audioObj.loop?a>t&&this.sceneController.audioObj.pause():s<t?a>s&&this.sceneController.audioObj.pause():a>t&&this.sceneController.audioObj.pause()})}}stopAudio(){this.sceneController.audioObj.pause()}sceneResizing(t){}sceneResized(t,i,s){let l=Math.round(t.size.width/this.sceneWidthPerDuration);this.selectedSceneIndex!==i&&this.selectScene(i),this.sceneController.scenes[i].chageDuration(l),this.setHistory()}setHistory(){const t=this.sceneController.getDesign();this.sceneController.addHistory(t)}designItemResized(t,i){let s=t.position.left,c=(s+t.size.width)/this.sceneWidthPerDuration;t.direction.w&&i.designItemAnimationEditUtil.updateStartTime(s/this.sceneWidthPerDuration),t.direction.e&&i.designItemAnimationEditUtil.updateEndTime(c),this.showWTooltip=!1,this.showETooltip=!1}selectScene(t){this.selectedSceneIndex=t,this.sceneController.selectScene(t)}addScene(t=null){const i=this.modalService.open(yn,{centered:!0,size:"xl",backdrop:"static",windowClass:"create-video-dialog "});i.componentInstance.hRatio=this.sceneController.design.metadata.data.hRatio,i.componentInstance.wRatio=this.sceneController.design.metadata.data.wRatio,i.componentInstance.onIndexForAddScene=t,i.componentInstance.sceneController=this.sceneController,i.result.then(s=>{if("ok"===s){this.selectScene(this.sceneController.scenes.length-1);const a=this.sceneController.getDesign();a.sceenIndex=this.sceneController.scenes.length-1,this.sceneController.updateHistory(a)}})}deleteScene(t){this.sceneController.delete(t)}duplicateScene(t){this.sceneController.duplicateScene(t)}stop(){}cancelClick(t){}inputSpeed(t){}
1changeSpeed(){}inputZoom(t){}changeZoom(){}startAnim(){const t=this;E.fabric.util.requestAnimFrame(function i(){t.stateService.mainCanvas.renderAll(),t.stateService.timelineCanvas.renderAll(),t.andorService.isPlaying&&(t.currentDuration=t.andorService.timelineController._lastTimePosition),E.fabric.util.requestAnimFrame(i)})}getDesignItemStartPosition(t){return{x:t.getStartTime()*this.sceneWidthPerDuration,y:0}}rzResizing(t){if(t.direction.w){this.showWTooltip=!0;let s=t.host.getBoundingClientRect();this.wToolTipTop=s.top-45,this.wToolTipLeft=s.left-25;let a=t.position.left;setTimeout(()=>{this.ngZone.run(()=>{this.elementStartTime=a/this.sceneWidthPerDuration})},0)}if(t.direction.e){this.showETooltip=!0;let s=t.host.getBoundingClientRect();this.eToolTipTop=s.top-45,this.eToolTipLeft=s.left+t.size.width-35,this.elementEndTime=(t.position.left+t.size.width)/this.sceneWidthPerDuration}}moveToNext(t){this.sceneController.moveToNext(t)}moveToPrev(t){this.sceneController.moveToPrev(t)}stoppedMove(t,i){t.actualx<0&&(t.actualx=0);let l=Math.round(t.actualx/this.sceneWidthPerDuration),c=i.designItemAnimationEditUtil.getEndTime()-i.designItemAnimationEditUtil.getStartTime();i.designItemAnimationEditUtil.drag(l,l+c)}}return(o=r).\u0275fac=function(t){return new(t||o)(e.rXU(Ae.M),e.rXU(w.X),e.rXU(e.SKi),e.rXU(I.Z),e.rXU(_.Bq),e.rXU(R.u),e.rXU(P.x))},o.\u0275cmp=e.VBU({type:o,selectors:[["timeline"]],viewQuery:function(t,i){if(1&t&&(e.GBs(In,7),e.GBs(En,7),e.GBs(Mn,5)),2&t){let s;e.mGM(s=e.lsd())&&(i.timelineCanvasWrapper=s.first),e.mGM(s=e.lsd())&&(i.thumblineWrapper=s.first),e.mGM(s=e.lsd())&&(i.timelineSb=s.first)}},hostBindings:function(t,i){1&t&&e.bIt("resize",function(a){return i.onResize(a)},!1,e.tSv)},inputs:{changing:"changing",timelineView:"timelineView",selectedSceneIndex:"selectedSceneIndex"},decls:9,vars:2,consts:[["timelineCanvasWrapper",""],["thumblineWrapper",""],["timelineSb",""],["designItemBounds",""],["myBounds",""],[1,"timeline-wrapper","ps-3","pt-3"],[1,"timeline-base","h-100"],[1,"thumbline-wrapper","h-100"],["customScrollDir","",1,"is-popover-b","ps-0","pe-0","me-0","scroll-container","horizontal-true"],["class","thumbline",4,"ngIf"],["class","musicline","style","width: 100%;",4,"ngIf"],[1,"thumbline"],["class","scene-wrapper me-2",4,"ngFor","ngForOf"],["class","tooltip fade bs-tooltip-top show","role","tooltip","style","will-change: transform; position: fixed; \n                         width:50px","x-placement","top",3,"top","left",4,"ngIf"],["class","tooltip fade bs-tooltip-top show","role","tooltip","style","will-change: transform; position: fixed; \n                       width:50px","x-placement","top",3,"top","left",4,"ngIf"],["class","btn btn-add-scene","placement","top","tooltipClass","tooltip-custom-all","ngbTooltip","Add Scene",3,"click",4,"ngIf"],[2,"width","500px"],[1,"scene-wrapper","me-2"],[1,"scene-header-wrapper"],["class","scene-header",4,"ngIf"],["ngResizable","",1,"resizable-widget","thumb-scene","mt-1","p-0",3,"rzStop","click","rzResizing","rzHandles","rzMaxWidth","rzMinWidth","ngClass"],[1,"scene-order","pt-3","ps-3","pe-3"],["name","slideprevsm","class","move-scene-svg pointer position-absolute f-24",3,"ngClass","click",4,"ngIf"],[1,"scene-action-btn-container"],[1,"edit-menu","pointer"],["ngbDropdown","","container","body",1,"d-inline-block"],["id","dropdownBasic1","ngbDropdownToggle","",1,"icon","scene-menu",2,"border","none",3,"click"],["name","threedots",1,"icon","no-valign",2,"vertical-align","unset"],["ngbDropdownMenu","","aria-labelledby","dropdownBasic1",1,"nav-small-device"],[1,"list-unstyled"],[4,"ngIf"],[1,""],["ngbDropdownItem","",3,"click"],["name","addtovideo",1,"mr-8","f-20"],["name","duplicatetovideo",1,"mr-8","f-20"],["ngbDropdownItem","",3,"click","disabled"],["name","deleteoth",1,"mr-8","f-20"],["name","slidenextsm","class","move-scene-svg float-end pointer f-24",3,"ngClass","click",4,"ngIf"],[1,"scene-header"],["class","design-item","ngResizable","","ngResizable","","ngDraggable","",3,"width","left","rzMinWidth","rzMaxWidth","ngClass","rzHandles","rzContainment","bounds","inBounds","trackPosition","rzResizing","rzStop","endOffset",4,"ngIf"],["class","design-item","ngResizable","","ngDraggable","",3,"width","left","rzMinWidth","rzMaxWidth","ngClass","rzHandles","rzContainment","bounds","inBounds","trackPosition","rzStop","endOffset",4,"ngIf"],["ngResizable","","ngResizable","","ngDraggable","",1,"design-item",3,"rzResizing","rzStop","endOffset","rzMinWidth","rzMaxWidth","ngClass","rzHandles","rzContainment","bounds","inBounds","trackPosition"],[1,"design-item-content"],[2,"width","30px","height","25px"],["_ngcontent-krq-c153","",1,"ng-tns-c153-0","f-20","icon","no-valign",3,"name"],[1,"di-time","text-semi"],["ngResizable","","ngDraggable","",1,"design-item",3,"rzStop","endOffset","rzMinWidth","rzMaxWidth","ngClass","rzHandles","rzContainment","bounds","inBounds","trackPosition"],["_ngcontent-krq-c153",""],["class","tooltip fade bs-tooltip-top show","role","tooltip","style","will-change: transform; position: fixed; \n            width:50px","x-placement","top",3,"top","left",4,"ngIf"],["class","tooltip fade bs-tooltip-top show","role","tooltip","style","will-change: transform; position: fixed; \n          width:50px","x-placement","top",3,"top","left",4,"ngIf"],["role","tooltip","x-placement","top",1,"tooltip","fade","bs-tooltip-top","show",2,"will-change","transform","position","fixed","width","50px"],[1,"arrow",2,"left","25px"],[1,"tooltip-inner"],["name","slideprevsm",1,"move-scene-svg","pointer","position-absolute","f-24",3,"click","ngClass"],["name","moveleft",1,"mr-8","f-20"],["name","moveright",1,"mr-8","f-20"],["name","slidenextsm",1,"move-scene-svg","float-end","pointer","f-24",3,"click","ngClass"],["placement","top","tooltipClass","tooltip-custom-all","ngbTooltip","Add Scene",1,"btn","btn-add-scene",3,"click"],[1,"musicline",2,"width","100%"],["class","music-bottom",4,"ngIf"],["class","",4,"ngIf"],[1,"music-bottom"],[1,"trim-info"],["class","text-primary",4,"ngIf"],[1,"row","no-margin"],[1,"timeline-icon","w-auto","ps-0","pe-0"],[2,"width","100%","height","80%","align-items","center","justify-content","center","display","flex"],["placement","top","ngbTooltip","Play Music","tooltipClass","tooltip-custom-all","container","body","class","btn-all p-0 btn-icon ng-star-inserted text-primary","style","border-radius: 50%;",3,"click",4,"ngIf"],["placement","top","ngbTooltip","Pause Music","tooltipClass","tooltip-custom-all","container","body","class","btn-all p-0 btn-icon ng-star-inserted text-primary","style","border-radius: 50%;",3,"click",4,"ngIf"],["class","btn hw-40 icon ms-3 loop-disabled-icon",4,"ngIf"],["class","ms-3 btn-all btn-tool p-0  btn-tool active",3,"click",4,"ngIf"],["class","ms-3 btn-all btn-tool p-0 btn-tool",3,"click",4,"ngIf"],[1,"col","ps-0","pe-0",2,"width","calc(100% - 160px)"],["class","drag-boundary",3,"ngClass",4,"ngIf"],["class","drag-boundary",4,"ngIf"],[1,"scenes-marker"],["class","scene-line",3,"width","ngClass",4,"ngFor","ngForOf"],[1,"text-primary"],["placement","top","ngbTooltip","Play Music","tooltipClass","tooltip-custom-all","container","body",1,"btn-all","p-0","btn-icon","ng-star-inserted","text-primary",2,"border-radius","50%",3,"click"],["name","playmusicwhite",1,"icon","f-32"],["placement","top","ngbTooltip","Pause Music","tooltipClass","tooltip-custom-all","container","body",1,"btn-all","p-0","btn-icon","ng-star-inserted","text-primary",2,"border-radius","50%",3,"click"],["name","pausescene",1,"icon","f-32"],[1,"btn","hw-40","icon","ms-3","loop-disabled-icon"],[1,"ms-3","btn-all","btn-tool","p-0","btn-tool","active",3,"click"],["name","loopdefault",1,"icon","f-38"],[1,"ms-3","btn-all","btn-tool","p-0","btn-tool",3,"click"],[1,"drag-boundary",3,"ngClass"],[1,"video-thumb"],[1,"play-cursor",3,"ngStyle"],[2,"width","100%","height","100%","opacity",".6"],["ngDraggable","","class","audio-item",3,"width","position","lockXAxix","preventDefaultEvent","lockAxis","bounds","inBounds","outOfBounds","movingOffset","edge",4,"ngIf"],["ngDraggable","",1,"audio-item",3,"movingOffset","edge","position","lockXAxix","preventDefaultEvent","lockAxis","bounds","inBounds","outOfBounds"],[1,"drag-boundary"],["class","play-cursor",3,"ngStyle",4,"ngIf"],["class","audio-item short-audio",3,"ngClass","width",4,"ngIf"],[1,"audio-item","short-audio",3,"ngClass"],[1,"scene-line",3,"ngClass"],[1,"inner"],[1,"mx-auto","col-sm-6","col-xl-7","p-0"],[1,"row"],[1,"col-sm-12","col-xl-4","ps-0","text-center","d-none","d-lg-block"],["src","https://static.lightxeditor.com/assets/images/no-music.png",1,"img-fluid"],[1,"col-sm-12","col-xl-8","p-0","align-self-center"],[1,"grey-300","text-xxxl","text-bold"],[1,"grey-300","text-normal","text-semi"]],template:function(t,i){1&t&&(e.j41(0,"div",5,0)(2,"div",6)(3,"div",7,1)(5,"div",8,2),e.DNE(7,Wn,6,4,"div",9)(8,lo,3,2,"div",10),e.k0s()()()()),2&t&&(e.R7$(7),e.Y8G("ngIf","scene"===i.view),e.R7$(),e.Y8G("ngIf","music"===i.view))},dependencies:[m.YU,m.Sq,m.bT,m.B3,X.q,_.tg,_.do,_.U0,_._H,_.md,Ue.b,Fe.v,M.b,$.EX,$.J_],styles:['.timeline-wrapper[_ngcontent-%COMP%]{width:100%;overflow-x:auto}.thumb-scene[_ngcontent-%COMP%]{width:300px;border:2px solid #626ADF;border-radius:12px;background-size:contain;background-repeat:no-repeat;background-position:center}.thumb-scene[_ngcontent-%COMP%]   .move-scene-svg[_ngcontent-%COMP%]{visibility:visible}.thumb-scene.sm[_ngcontent-%COMP%]   .move-scene-svg[_ngcontent-%COMP%]{visibility:hidden}.thumb-scene.sm[_ngcontent-%COMP%]   .scene-action-btn-container[_ngcontent-%COMP%]{right:calc(50% - 16px)}.scene-header-wrapper[_ngcontent-%COMP%]{height:28px;width:100%;display:flex;align-items:center;border-radius:6px}.scene-header[_ngcontent-%COMP%]{height:100%;width:100%;background:#e2e3e9 0% 0% no-repeat padding-box;display:flex;align-items:center;border-radius:6px}.timeline-base[_ngcontent-%COMP%]{width:100%}.timeline-header[_ngcontent-%COMP%]{height:28px;width:100%;background:#f8f8fb 0% 0% no-repeat padding-box;border:1px solid #707070;display:flex;align-items:center}.timeline-container[_ngcontent-%COMP%]{width:100%;display:flex}.thumbline[_ngcontent-%COMP%]{height:100%;display:inline-flex}.musicline[_ngcontent-%COMP%]{height:100%;width:100%;background:#fff 0% 0% no-repeat padding-box;border-radius:8px}.music-top[_ngcontent-%COMP%]{height:2.5rem;width:100%}.music-bottom[_ngcontent-%COMP%]   .drag-boundary[_ngcontent-%COMP%]{width:100%;height:80%;position:relative;overflow:hidden}.music-bottom[_ngcontent-%COMP%]   .trim-info[_ngcontent-%COMP%]{height:1.5rem;width:50px;position:relative}.music-bottom[_ngcontent-%COMP%]   .audio-item[_ngcontent-%COMP%]{width:100%;background:url(https://static.lightxeditor.com/assets/images/waveform.png);background-repeat:no-repeat;background-repeat:repeat-x;opacity:.7;padding:6px 0;background-position-y:center}.music-bottom[_ngcontent-%COMP%]   .video-thumb[_ngcontent-%COMP%]{position:absolute;width:500px;top:0;left:40px;height:100%;outline:4px solid #626ADF;transform:translate(0);padding:6px 0}.music-bottom[_ngcontent-%COMP%]   .short-audio[_ngcontent-%COMP%]{left:40px;position:absolute}.play-cursor[_ngcontent-%COMP%]{transform:translate(5px);background:#626adf;width:1px;height:100%;position:absolute}.thumbline-wrapper[_ngcontent-%COMP%]{position:relative;margin:0;overflow:hidden;display:block;overflow-x:auto}.thumb-scene[_ngcontent-%COMP%]{flex:0 0 auto;position:relative;will-change:width,transform;transform-origin:0 0;-webkit-backface-visibility:hidden;backface-visibility:hidden;-ms-perspective:1000;perspective:1000;border:2px solid transparent}.timeline-icon[_ngcontent-%COMP%]{height:5.5rem}.scene-wrapper[_ngcontent-%COMP%]   .active[_ngcontent-%COMP%]{border:2px solid #626ADF!important}.design-item[_ngcontent-%COMP%]{height:100%;background:#c3a6ff 0% 0% no-repeat padding-box;border-radius:6px;text-align:center;color:#4a4f5e;overflow:hidden}.scene-index[_ngcontent-%COMP%]{position:absolute;bottom:10px}.scene-index[_ngcontent-%COMP%]   span[_ngcontent-%COMP%]{background:#606765;color:#fff;padding:2px 10px;border-radius:8px;font-size:12px;margin-left:10px}.btn-add-scene[_ngcontent-%COMP%]{position:relative;width:60px;height:60px;top:32px;font-size:24px;background:#e2e3e966;border-radius:12px;border:0px!important}.btn-add-scene[_ngcontent-%COMP%]:hover, .btn-add-scene[_ngcontent-%COMP%]:focus, .btn-add-scene[_ngcontent-%COMP%]:active, .btn-add-scene[_ngcontent-%COMP%]:visited{background-color:#e2e3e980!important}.design-item-content[_ngcontent-%COMP%]{text-align:center;padding:3px 14px;display:flex;overflow:hidden;-webkit-user-select:none;user-select:none}.scene-menu[_ngcontent-%COMP%]{background:#272b34;opacity:.6;border-radius:4px;
1height:16px;width:24px}.scene-menu[_ngcontent-%COMP%]:hover{opacity:1}.scene-action-btn-container[_ngcontent-%COMP%]{position:absolute;right:45px;padding:2px}.btn-scene[_ngcontent-%COMP%]{height:20px;width:20px;border-radius:4px;background-color:#fff;opacity:.6;margin:0 4px;border:none;padding:0 4px;color:#475ae7}.btn-scene[disabled][_ngcontent-%COMP%]{opacity:.6!important;color:#aaa}.btn-scene[_ngcontent-%COMP%]:hover{opacity:1}.scene-action-btn-container[_ngcontent-%COMP%]   .trash-scene-icon[_ngcontent-%COMP%], .copy-scene-icon[_ngcontent-%COMP%], .add-scene-icon[_ngcontent-%COMP%]{background-size:12px 14px;background-repeat:no-repeat;background-position:center}.scenes-marker[_ngcontent-%COMP%]{height:10px;left:40px;position:relative;display:flex;align-items:baseline;margin-top:8px;width:fit-content}.scenes-marker[_ngcontent-%COMP%]   .scene-line[_ngcontent-%COMP%]   .inner[_ngcontent-%COMP%]{background:#9eabff;height:4px;margin:0 2px;border-radius:2px}.scenes-marker[_ngcontent-%COMP%]   .scene-line.active[_ngcontent-%COMP%]   .inner[_ngcontent-%COMP%]{height:6px;background:#626adf}.di-time[_ngcontent-%COMP%]{line-height:24px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;margin:0 8px;font-size:11px}.timeline-scroll[_ngcontent-%COMP%]   .thumb-scene[_ngcontent-%COMP%]{background-repeat:repeat-x;border:2px solid #ebeaf9}.move-scene-svg[_ngcontent-%COMP%]{color:#272b34}.move-scene-svg[_ngcontent-%COMP%]:hover{color:#000}.btn-prev-next-hidden[_ngcontent-%COMP%]{visibility:collapse}.thumbline[_ngcontent-%COMP%]   .bs-tooltip-top[_ngcontent-%COMP%]   .arrow[_ngcontent-%COMP%]{position:absolute;bottom:0;width:.8rem;height:.4rem;left:0!important;transform:translate(20px);display:block}.thumbline[_ngcontent-%COMP%]   .bs-tooltip-top[_ngcontent-%COMP%]   .arrow[_ngcontent-%COMP%]:before{position:absolute;content:"";border-color:transparent;border-style:solid;top:-1px;border-width:.4rem .4rem 0;border-top-color:#000}']}),r})();const po=["timelineCanvasWrapper"],mo=["thumblineWrapper"],uo=["timelineSb"],Le=o=>({active:o}),We=(o,r)=>({"e-active":o,"w-active":r}),go=(o,r)=>({"audio-loop":o,"photo-music":r}),ho=(o,r,n,t)=>({"top-b":o,"bottom-b":r,"left-b":n,"right-b":t}),He=o=>({transform:o}),_o=(o,r)=>({"audio-loop":o,"scene-w":r});function vo(o,r){if(1&o){const n=e.RV6();e.j41(0,"div",22),e.bIt("rzResizing",function(i){e.eBV(n);const s=e.XpG(4);return e.Njj(s.rzResizing(i))})("rzStop",function(i){e.eBV(n);const s=e.XpG(2).$implicit,a=e.XpG(2);return e.Njj(a.designItemResized(i,s.selectedDesignItem))})("endOffset",function(i){e.eBV(n);const s=e.XpG(2).$implicit,a=e.XpG(2);return e.Njj(a.stoppedMove(i,s.selectedDesignItem))}),e.j41(1,"div",23)(2,"div",24),e.nrm(3,"pi",25),e.k0s(),e.j41(4,"div",26),e.EFF(5),e.nI1(6,"mstoseconds"),e.k0s()()()}if(2&o){const n=e.XpG(2).$implicit,t=e.sdS(2),i=e.XpG(2);e.xc7("width",n.selectedDesignItem.getDuration()*i.sceneWidthPerDuration,"px")("left",n.selectedDesignItem.getStartTime()*i.sceneWidthPerDuration,"px"),e.Y8G("rzMinWidth",n.selectedDesignItem.designItemAnimationEditUtil.minAllowedDuration()*i.sceneWidthPerDuration)("rzMaxWidth",n.selectedDesignItem.designItemAnimationEditUtil.maxAllowedDuration()*i.sceneWidthPerDuration)("ngClass",e.l_i(17,We,i.showETooltip,i.showWTooltip))("rzHandles",n.selectedDesignItem.designItemAnimationEditUtil.isEditable?i.rzHandlesDesignItem:"")("rzContainment","parent")("rzContainment","parent")("bounds",t)("inBounds","true")("trackPosition",!1),e.R7$(3),e.FS9("name",n.selectedDesignItem.designItemAnimationEditUtil.designItemIcon),e.R7$(2),e.JRh(e.bMT(6,15,n.selectedDesignItem.getDuration()))}}function fo(o,r){if(1&o&&(e.j41(0,"div",30),e.nrm(1,"div",31),e.j41(2,"div",32),e.EFF(3),e.nI1(4,"mstoseconds"),e.k0s()()),2&o){const n=e.XpG(5);e.xc7("top",n.eToolTipTop,"px")("left",n.eToolTipLeft,"px"),e.R7$(3),e.JRh(e.bMT(4,5,n.elementEndTime))}}function bo(o,r){if(1&o&&(e.j41(0,"div",30),e.nrm(1,"div",31),e.j41(2,"div",32),e.EFF(3),e.nI1(4,"mstoseconds"),e.k0s()()),2&o){const n=e.XpG(5);e.xc7("top",n.wToolTipTop,"px")("left",n.wToolTipLeft,"px"),e.R7$(3),e.JRh(e.bMT(4,5,n.elementStartTime))}}function Co(o,r){if(1&o){const n=e.RV6();e.j41(0,"div",27),e.bIt("rzStop",function(i){e.eBV(n);const s=e.XpG(2).$implicit,a=e.XpG(2);return e.Njj(a.designItemResized(i,s.selectedMediaContainer))}),e.j41(1,"div",23),e.nrm(2,"span",28),e.EFF(3),e.nI1(4,"mstominuteSeconds"),e.k0s(),e.DNE(5,fo,5,7,"div",29)(6,bo,5,7,"div",13),e.k0s()}if(2&o){const n=e.XpG(2).$implicit,t=e.XpG(2);
1e.xc7("width",n.selectedMediaContainer.getDuration()*t.sceneWidthPerDuration,"px")("left",n.selectedMediaContainer.getStartTime()*t.sceneWidthPerDuration,"px"),e.Y8G("rzMinWidth",n.selectedMediaContainer.designItemAnimationEditUtil.minAllowedDuration()*t.sceneWidthPerDuration)("rzMaxWidth",n.selectedMediaContainer.designItemAnimationEditUtil.maxAllowedDuration()*t.sceneWidthPerDuration)("ngClass",e.l_i(17,We,t.showETooltip,t.showWTooltip))("rzHandles",n.selectedMediaContainer.designItemAnimationEditUtil.isEditable?t.rzHandlesDesignItem:"")("rzContainment","parent"),e.R7$(2),e.ZvI("ng-tns-c153-0 hw-15 icon \n             ",n.selectedMediaContainer.designItemAnimationEditUtil.animationTitle,"-icon"),e.R7$(),e.SpI(" ",e.bMT(4,15,n.selectedMediaContainer.getDuration())," "),e.R7$(2),e.Y8G("ngIf",t.showETooltip),e.R7$(),e.Y8G("ngIf",t.showWTooltip)}}function xo(o,r){if(1&o&&(e.j41(0,"div",19),e.DNE(1,vo,7,20,"div",20)(2,Co,7,20,"div",21),e.k0s()),2&o){const n=e.XpG().$implicit;e.R7$(),e.Y8G("ngIf",n.selectedDesignItem),e.R7$(),e.Y8G("ngIf",n.selectedMediaContainer)}}function ko(o,r){if(1&o){const n=e.RV6();e.j41(0,"div",15)(1,"div",16,3),e.DNE(3,xo,3,2,"div",17),e.k0s(),e.j41(4,"div",18),e.bIt("click",function(){e.eBV(n);const i=e.XpG(2);return e.Njj(i.activeVideoTool())}),e.k0s()()}if(2&o){const n=r.$implicit,t=r.index,i=e.XpG(2);e.R7$(3),e.Y8G("ngIf",i.selectedSceneIndex===t),e.R7$(),e.xc7("width",n.getDuration()*i.sceneWidthPerDuration,"px")("background-image","url("+n.getThumb()+")"),e.Y8G("ngClass",e.eq3(6,Le,i._activeVideoTool))}}function To(o,r){if(1&o&&(e.j41(0,"div",30),e.nrm(1,"div",31),e.j41(2,"div",32),e.EFF(3),e.nI1(4,"mstoseconds"),e.k0s()()),2&o){const n=e.XpG(2);e.xc7("top",n.eToolTipTop,"px")("left",n.eToolTipLeft,"px"),e.R7$(3),e.JRh(e.bMT(4,5,n.elementEndTime))}}function jo(o,r){if(1&o&&(e.j41(0,"div",30),e.nrm(1,"div",31),e.j41(2,"div",32),e.EFF(3),e.nI1(4,"mstoseconds"),e.k0s()()),2&o){const n=e.XpG(2);e.xc7("top",n.wToolTipTop,"px")("left",n.wToolTipLeft,"px"),e.R7$(3),e.JRh(e.bMT(4,5,n.elementStartTime))}}function Po(o,r){if(1&o&&(e.j41(0,"div",11),e.DNE(1,ko,5,8,"div",12)(2,To,5,7,"div",13)(3,jo,5,7,"div",14),e.k0s()),2&o){const n=e.XpG();e.R7$(),e.Y8G("ngForOf",null==n.sceneController?null:n.sceneController.scenes),e.R7$(),e.Y8G("ngIf",n.showETooltip),e.R7$(),e.Y8G("ngIf",n.showWTooltip)}}function So(o,r){if(1&o&&(e.j41(0,"span",52),e.EFF(1),e.nI1(2,"mstominuteSeconds"),e.k0s()),2&o){const n=e.XpG(4);e.R7$(),e.SpI(" ",e.bMT(2,1,null==n.sceneController||null==n.sceneController.audioObj?null:n.sceneController.audioObj.trimStart)," ")}}function wo(o,r){if(1&o&&(e.j41(0,"div",50),e.DNE(1,So,3,3,"span",51),e.k0s()),2&o){const n=e.XpG(3);e.xc7("left",130,"px"),e.R7$(),e.Y8G("ngIf",n.sceneController.audioObj)}}function yo(o,r){if(1&o){const n=e.RV6();e.j41(0,"button",53),e.bIt("click",function(){e.eBV(n);const i=e.XpG(3);return e.Njj(i.playAudio())}),e.nrm(1,"pi",54),e.k0s()}}function Io(o,r){if(1&o){const n=e.RV6();e.j41(0,"button",55),e.bIt("click",function(){e.eBV(n);const i=e.XpG(3);return e.Njj(i.stopAudio())}),e.nrm(1,"pi",56),e.k0s()}}function Eo(o,r){1&o&&e.nrm(0,"button",57)}function Mo(o,r){if(1&o){const n=e.RV6();e.j41(0,"button",58),e.bIt("click",function(){e.eBV(n);const i=e.XpG(3);return e.Njj(i.changeLoop(!1))}),e.nrm(1,"pi",59),e.k0s()}}function Oo(o,r){if(1&o){const n=e.RV6();e.j41(0,"button",60),e.bIt("click",function(){e.eBV(n);const i=e.XpG(3);return e.Njj(i.changeLoop(!0))}),e.nrm(1,"pi",59),e.k0s()}}function Vo(o,r){if(1&o){const n=e.RV6();e.j41(0,"div",66),e.bIt("movingOffset",function(i){e.eBV(n);const s=e.XpG(4);return e.Njj(s.trimAudio(i))})("edge",function(i){e.eBV(n);const s=e.XpG(4);return e.Njj(s.checkEdge(i))}),e.k0s()}if(2&o){e.XpG();const n=e.sdS(1),t=e.XpG(3);e.xc7("width",t.audioItemWidth,"px"),e.Y8G("position",t.position)("lockXAxix",40)("preventDefaultEvent","true")("lockAxis","y")("bounds",n)("inBounds",t.inBounds)("outOfBounds",t.outOfBounds)}}function Ro(o,r){if(1&o&&(e.j41(0,"div",61,4)(2,"div",62),e.nrm(3,"div",63)(4,"div",64),e.k0s(),e.DNE(5,Vo,1,9,"div",65),e.k0s()),2&o){const n=e.XpG(3);e.Y8G("ngClass",e.ziG(5,ho,!(null!=n.edge&&n.edge.top),!(null!=n.edge&&n.edge.bottom),!(null!=n.edge&&n.edge.left),!(null!=n.edge&&n.edge.right))),e.R7$(2),e.xc7("width",n.videoThumbWidth,"px"),e.R7$(),e.Y8G("ngStyle",e.eq3(10,He,"translateX("+n.audioSeekPos+"px)")),e.R7$(2),e.Y8G("ngIf",null==n.sceneController||null==n.sceneController.audioObj?null:n.sceneController.audioObj.audioElementDuration)}}function Go(o,r){if(1&o&&e.nrm(0,"div",63),2&o){const n=e.XpG(4);e.Y8G("ngStyle",e.eq3(1,He,"translateX("+n.audioSeekPos+"px)"))}}function Bo(o,r){if(1&o&&e.nrm(0,"div",71),2&o){const n=e.XpG(4);e.xc7("width",n.sceneController.audioObj.loop?n.videoThumbWidth:n.audioItemWidth,"px"),e.Y8G("ngClass",e.l_i(3,_o,!0===n.sceneController.audioObj.loop,0==n.mediaType))}}function Do(o,r){if(1&o&&(e.j41(0,"div",67)(1,"div",68),e.DNE(2,Go,1,3,"div",69),e.nrm(3,"div",64),e.k0s(),e.DNE(4,Bo,1,6,"div",70),e.k0s()),2&o){const n=e.XpG(3);e.R7$(),e.xc7("width",n.sceneController.audioObj.loop?n.videoThumbWidth:n.audioItemWidth,"px")("width",n.videoThumbWidth,"px"),e.Y8G("ngClass",0==n.mediaType?"img-thumb":"video-thumb"),e.R7$(),e.Y8G("ngIf",!n.sceneController.isPlaying),e.R7$(2),e.Y8G("ngIf",null==n.sceneController||null==n.sceneController.audioObj?null:n.sceneController.audioObj.audioElementDuration)}}function No(o,r){if(1&o&&(e.j41(0,"div",74),e.nrm(1,"div",75),e.k0s()),2&o){const n=r.$implicit,t=r.index,i=e.XpG(4);e.xc7("width",i.sceneDurationMusic(n),"px"),e.Y8G("ngClass",e.eq3(3,Le,i.selectedSceneIndex==t))}}function Ao(o,r){if(1&o&&(e.j41(0,"div",72),e.DNE(1,No,2,5,"div",73),e.k0s()),2&o){const n=e.XpG(3);e.R7$(),e.Y8G("ngForOf",n.sceneController.scenes)}}function Uo(o,r){if(1&o&&(e.j41(0,"div",36),e.DNE(1,wo,2,3,"div",37),e.j41(2,"div",38)(3,"div",39)(4,"div",40),e.DNE(5,yo,2,0,"button",41)(6,Io,2,0,"button",42)(7,Eo,1,0,"button",43)(8,Mo,2,0,"button",44)(9,Oo,2,0,"button",45),e.k0s()(),e.j41(10,"div",46),e.DNE(11,Ro,6,12,"div",47)(12,Do,5,7,"div",48)(13,Ao,2,1,"div",49),e.k0s()()()),2&o){const n=e.XpG(2);e.R7$(),e.Y8G("ngIf",0!=n.mediaType),e.R7$(),e.Y8G("ngClass",e.l_i(10,go,!0===n.sceneController.audioObj.loop,0==n.mediaType)),e.R7$(3),e.Y8G("ngIf",!n.sceneController.isPlaying&&n.sceneController.audioObj&&!(null!=n.sceneController&&null!=n.sceneController.audioObj&&n.sceneController.audioObj.isPlaying)),e.R7$(),e.Y8G("ngIf",!n.sceneController.isPlaying&&n.sceneController.audioObj&&(null==n.sceneController||null==n.sceneController.audioObj?null:n.sceneController.audioObj.isPlaying)),e.R7$(),e.Y8G("ngIf",0!=n.mediaType&&n.sceneController.audioObj&&n.videoDuration<(null==n.sceneController||null==n.sceneController.audioObj?null:n.sceneController.audioObj.audioElementDuration)),e.R7$(),e.Y8G("ngIf",0!=n.mediaType&&n.sceneController.audioObj&&n.videoDuration>(null==n.sceneController||null==n.sceneController.audioObj?null:n.sceneController.audioObj.audioElementDuration)&&n.sceneController.audioObj.loop),e.R7$(),e.Y8G("ngIf",0!=n.mediaType&&n.sceneController.audioObj&&n.videoDuration>(null==n.sceneController||null==n.sceneController.audioObj?null:n.sceneController.audioObj.audioElementDuration)&&!n.sceneController.audioObj.loop),e.R7$(2),e.Y8G("ngIf",n.videoDuration<(null==n.sceneController||null==n.sceneController.audioObj?null:n.sceneController.audioObj.audioElementDuration)),e.R7$(),e.Y8G("ngIf",n.sceneController.audioObj&&n.videoDuration>(null==n.sceneController||null==n.sceneController.audioObj?null:n.sceneController.audioObj.audioElementDuration)),e.R7$(),e.Y8G("ngIf",0!=n.mediaType)}}function Fo(o,r){1&o&&(e.j41(0,"div",76)(1,"div",77)(2,"div",78)(3,"div",79),e.nrm(4,"img",80),e.k0s(),e.j41(5,"div",81)(6,"h6",82),e.EFF(7,"No Music added"),e.k0s(),e.j41(8,"p",83),e.EFF(9,"There is no music added in your project as of now. Add now from left panel and show your creativity."),e.k0s()()()()())}function Xo(o,r){if(1&o&&(e.j41(0,"div",33),e.DNE(1,Uo,14,13,"div",34)(2,Fo,10,0,"div",35),e.k0s()),2&o){const n=e.XpG();e.R7$(),e.Y8G("ngIf",null==n.sceneController?null:n.sceneController.audioObj),e.R7$(),e.Y8G("ngIf",!(null!=n.sceneController&&n.sceneController.audioObj))}}let $o=(()=>{var o;class r{set timelineView(t){this.view=t,"music"===t&&(this.position=this.sceneController.audioObj?{x:-(this.sceneController.audioObj.trimStart*this.getPixelPerTime()-40),y:0}:{x:40,y:0})}onResize(t){this.position=this.sceneController.audioObj?{x:-(this.sceneController.audioObj.trimStart*this.getPixelPerTime()-40),y:0}:{x:40,y:0},this.setSceneWidthPerDuration()}get timelineView(){return this.view}constructor(t,i,s,a,l){this.andorService=t,this.ngZone=i,this.sceneController=s,this.authSevice=a,this.editorService=l,this.isPlaying=this.andorService.isPlaying,this.zoomFactor=50,this.speedFactor=50,this.maxThumbRange=8,this.minThumbRange=.2,this.up
1perSpeedRange=3,this.lowerSpeedRange=.75,this.startAnimFnCall=!1,this.playTime="00:00/00:00",this.totalDuration=0,this.currentDuration=0,this.flag=!1,this._activeVideoTool=!1,this.openEditTool=new e.bkB,this.localSldBtn=null,this.mediaType=1,this.inBounds=!0,this.sceneDuration=60,this.sceneWidthPerDuration=0,this.edge={top:!0,bottom:!0,left:!0,right:!0},this.outOfBounds={top:!1,bottom:!1,left:!0,right:!0},this.outOfDesignItemBounds={top:!1,bottom:!1,left:!1,right:!1},this.volume=40,this.position={x:40,y:0},this.isLoop=!1,this.audioSeekPos=0,this.rzHandlesDesignItem="w,e",this.showETooltip=!1,this.showWTooltip=!1,this.sceneController.onChange=c=>{c&&"music-volume"===c.name?this.volume=Math.round(100*c.val):c&&"music-delete"===c.name?this.progressEvent=null:c&&"music-add"===c.name&&(this.progressEvent=null,this.audioSeekPos=0)},this.user=this.authSevice.currentUser()}ngOnChanges(t){null!=this.localSldBtn?this.localSldBtn!=this.sldBtn&&(this.localSldBtn=this.sldBtn,this.setSceneWidthPerDuration()):this.localSldBtn=this.sldBtn}setSceneWidthPerDuration(){this.sceneWidthPerDuration=this.videoThumbWidth/this.videoDuration}ngAfterViewInit(){}checkEdge(t){this.edge=t}trimAudio(t){let i=40-t.x,a=this.getTimePerPixel()*i;this.sceneController.audioObj&&(this.sceneController.audioObj.trimStart=Math.round(a),this.sceneController.audioObj.trimEnd=a+this.videoDuration>this.sceneController.audioObj.audioElementDuration?this.sceneController.audioObj.audioElementDuration:Math.round(a+this.videoDuration))}getTimePerPixel(){return this.videoDuration/this.videoThumbWidth}getPixelPerTime(){return this.videoThumbWidth/this.videoDuration}inputVolume(){this.sceneController.audioObj&&this.sceneController.audioObj.updateVolume(this.volume/100)}inputVolumeFromSlider(t){this.sceneController.audioObj&&(this.volume=t.newValue,this.sceneController.audioObj.updateVolume(this.volume/100))}changeLoop(t){this.sceneController.audioObj.updateLoop(t)}get audioItemWidth(){let t=0,i=this.getPixelPerTime();return this.sceneController&&this.sceneController.audioObj&&(t=this.sceneController?.audioObj?.audioElementDuration*i),t}get videoDuration(){let t=0;for(let i=0;i<this.sceneController.scenes.length;i++)t+=this.sceneController.scenes[i].getDuration();return t}get videoThumbWidth(){let t=0;return t||(t=this.thumblineWrapper.nativeElement.clientWidth-30),t}sceneDurationMusic(t){return t.getDuration()*this.getPixelPerTime()}ngOnInit(){this.changing.subscribe(t=>
1{"scene-duration"===t?this.setSceneWidthPerDuration():"video-duration"===t&&(this.setSceneWidthPerDuration(),this.activeEditToolPanelSubscription=this.sceneController.activeEditToolPanel.subscribe(i=>{this._activeVideoTool=null===i}),this.editorServiceSubscription=this.editorService.activeToolPanel.subscribe(()=>{this.flag?this.flag=!1:this._activeVideoTool=!1}))})}ngOnDestroy(){this.activeEditToolPanelSubscription&&this.activeEditToolPanelSubscription.unsubscribe(),this.editorServiceSubscription&&this.editorServiceSubscription.unsubscribe()}playAudio(){if(this.sceneController.audioObj){let s=this.sceneController.audioObj.trimEnd;this.sceneController.audioObj.playSceneAudio(this.sceneController.audioObj.trimStart,s);var t=this.videoDuration/1e3;this.progressEvent||(this.sceneController.audioObj.progressEvent=a=>{this.progressEvent="init";let l=this.getPixelPerTime();this.audioSeekPos=a*l*1e3,s=this.sceneController.audioObj.trimEnd,this.sceneController.audioObj.loop?a>t&&this.sceneController.audioObj.pause():s<t?a>s&&this.sceneController.audioObj.pause():a>t&&this.sceneController.audioObj.pause()})}}stopAudio(){this.sceneController.audioObj.pause()}selectScene(t){this.selectedSceneIndex=t,this.sceneController.selectScene(t)}activeVideoTool(){this.flag=!0,this._activeVideoTool=!0,this.openEditTool.emit(null)}getDesignItemStartPosition(t){return{x:t.getStartTime()*this.sceneWidthPerDuration,y:0}}rzResizing(t){if(t.direction.w){this.showWTooltip=!0;let i=t.host.getBoundingClientRect();this.wToolTipTop=i.top-45,this.wToolTipLeft=i.left-25;let s=t.position.left;setTimeout(()=>{this.ngZone.run(()=>{this.elementStartTime=s/this.sceneWidthPerDuration})},0)}if(t.direction.e){this.showETooltip=!0;let i=t.host.getBoundingClientRect();this.eToolTipTop=i.top-45,this.eToolTipLeft=i.left+t.size.width-35,this.elementEndTime=(t.position.left+t.size.width)/this.sceneWidthPerDuration}}designItemResized(t,i){let s=t.position.left,c=(s+t.size.width)/this.sceneWidthPerDuration;t.direction.w&&i.designItemAnimationEditUtil.updateStartTime(s/this.sceneWidthPerDuration),t.direction.e&&i.designItemAnimationEditUtil.updateEndTime(c),this.showWTooltip=!1,this.showETooltip=!1}stoppedMove(t,i){t.actualx<0&&(t.actualx=0);let l=Math.round(t.actualx/this.sceneWidthPerDuration),c=i.designItemAnimationEditUtil.getEndTime()-i.designItemAnimationEditUtil.getStartTime();i.designItemAnimationEditUtil.drag(l,l+c)}}return(o=r).\u0275fac=function(t){return new(t||o)(e.rXU(Ae.M),e.rXU(e.SKi),e.rXU(I.Z),e.rXU(R.u),e.rXU(P.x))},o.\u0275cmp=e.VBU({type:o,selectors:[["timeline-veditor"]],viewQuery:function(t,i){if(1&t&&(e.GBs(po,7),e.GBs(mo,7),e.GBs(uo,5)),2&t){let s;e.mGM(s=e.lsd())&&(i.timelineCanvasWrapper=s.first),e.mGM(s=e.lsd())&&(i.thumblineWrapper=s.first),e.mGM(s=e.lsd())&&(i.timelineSb=s.first)}},hostBindings:function(t,i){1&t&&e.bIt("resize",function(a){return i.onResize(a)},!1,e.tSv)},inputs:{changing:"changing",timelineView:"timelineView",sldBtn:"sldBtn",localSldBtn:"localSldBtn",mediaType:"mediaType",selectedSceneIndex:"selectedSceneIndex"},outputs:{openEditTool:"openEditTool"},features:[e.OA$],decls:9,vars:2,consts:[["timelineCanvasWrapper",""],["thumblineWrapper",""],["timelineSb",""],["designItemBounds",""],["myBounds",""],[1,"timeline-wrapper","ps-3","pt-3"],[1,"timeline-base","h-100"],[1,"thumbline-wrapper","h-100"],["customScrollDir","",1,"is-popover-b","ps-0","pe-0","me-0","scroll-container","horizontal-true"],["class","thumbline",4,"ngIf"],["class","musicline","style","width: 100%;",4,"ngIf"],[1,"thumbline"],["class","scene-wrapper me-2",4,"ngFor","ngForOf"],["class","tooltip fade bs-tooltip-top show","role","tooltip","style","will-change: transform; position: fixed; \n          width:56px","x-placement","top",3,"top","left",4,"ngIf"],["class","tooltip fade bs-tooltip-top show","role","tooltip","style","will-change: transform; position: fixed; \n        width:56px","x-placement","top",3,"top","left",4,"ngIf"],[1,"scene-wrapper","me-2"],[1,"scene-header-wrapper"],["class","scene-header",4,"ngIf"],[1,"resizable-widget","thumb-scene","mt-1","p-0",3,"click","ngClass"],[1,"scene-header"],["class","design-item","ngResizable","","ngResizable","","ngDraggable","",3,"width","left","rzMinWidth","rzMaxWidth","ngClass","rzHandles","rzContainment","bounds","inBounds","trackPosition","rzResizing","rzStop","endOffset",4,"ngIf"],["class","design-item","ngResizable","",3,"width","left","rzMinWidth","rzMaxWidth","ngClass","rzHandles","rzContainment","rzStop",4,"ngIf"],["ngResizable","","ngResizable","","ngDraggable","",1,"design-item",3,"rzResizing","rzStop","endOffset","rzMinWidth","rzMaxWidth","ngClass","rzHandles","rzContainment","bounds","inBounds","trackPosition"],[1,"design-item-content"],[2,"width","30px","height","25px"],["_ngcontent-krq-c153","",1,"ng-tns-c153-0","f-20","icon","no-valign",3,"name"],[1,"di-time","text-semi"],["ngResizable","",1,"design-item",3,"rzStop","rzMinWidth","rzMaxWidth","ngClass","rzHandles","rzContainment"],["_ngcontent-krq-c153",""],["class","tooltip fade bs-tooltip-top show","role","tooltip","style","will-change: transform; position: fixed; \n            width:56px","x-placement","top",3,"top","left",4,"ngIf"],["role","tooltip","x-placement","top",1,"tooltip","fade","bs-tooltip-top","show",2,"will-change","transform","position","fixed","width","56px"],[1,"arrow",2,"left","25px"],[1,"tooltip-inner"],[1,"musicline",2,"width","100%"],["class","music-bottom",4,"ngIf"],["class","",4,"ngIf"],[1,"music-bottom"],["class","trim-info",3,"left",4,"ngIf"],[1,"row","no-margin",3,"ngClass"],[1,"timeline-icon","w-auto","ps-0","pe-0"],[1,"only-music",2,"width","100%","height","80%","align-items","center","justify-content","center","display","flex"],["placement","top","ngbTooltip","Play Audio","tooltipClass","tooltip-custom-all","container","body","class","btn-all p-0 btn-icon ng-star-inserted text-primary","style","border-radius: 50%;",3,"click",4,"ngIf"],["placement","top","ngbTooltip","Pause Audio","tooltipClass","tooltip-custom-all","container","body","class","btn-all p-0 btn-icon ng-star-inserted text-primary","style","border-radius: 50%;",3,"click",4,"ngIf"],["class","btn hw-40 icon ms-3 loop-disabled-icon",4,"ngIf"],["class","ms-3 btn-all btn-tool p-0  btn-tool active",3,"click",4,"ngIf"],["class","ms-3 btn-all btn-tool p-0 btn-tool",3,"click",4,"ngIf"],[1,"col","ps-0","pe-0",2,"width","calc(100% - 160px)"],["class","drag-boundary",3,"ngClass",4,"ngIf"],["class","drag-boundary",4,"ngIf"],["class","scenes-marker",4,"ngIf"],[1,"trim-info"],["class","text-primary",4,"ngIf"],[1,"text-primary"],["placement","top","ngbTooltip","Play Audio","tooltipClass","tooltip-custom-all","container","body",1,"btn-all","p-0","btn-icon","ng-star-inserted","text-primary",2,"border-radius","50%",3,"click"],["name","playmusicwhite",1,"icon","f-32"],["placement","top","ngbTooltip","Pause Audio","tooltipClass","tooltip-custom-all","container","body",1,"btn-all","p-0","btn-icon","ng-star-inserted","text-primary",2,"border-radius","50%",3,"click"],["name","pausescene",1,"icon","f-32"],[1,"btn","hw-40","icon","ms-3","loop-disabled-icon"],[1,"ms-3","btn-all","btn-tool","p-0","btn-tool","active",3,"click"],["name","loopdefault",1,"icon","f-38"],[1,"ms-3","btn-all","btn-tool","p-0","btn-tool",3,"click"],[1,"drag-boundary",3,"ngClass"],[1,"video-thumb"],[1,"play-cursor",3,"ngStyle"],[2,"width","100%","height","100%","opacity",".6"],["ngDraggable","","class","audio-item",3,"width","position","lockXAxix","preventDefaultEvent","lockAxis","bounds","inBounds","outOfBounds","movingOffset","edge",4,"ngIf"],["ngDraggable","",1,"audio-item",3,"movingOffset","edge","position","lockXAxix","preventDefaultEvent","lockAxis","bounds","inBounds","outOfBounds"],[1,"drag-boundary"],[1,"",3,"ngClass"],["class","play-cursor",3,"ngStyle",4,"ngIf"],["class","audio-item short-audio",3,"ngClass","width",4,"ngIf"],[1,"audio-item","short-audio",3,"ngClass"],[1,"scenes-marker"],["class","scene-line",3,"width","ngClass",4,"ngFor","ngForOf"],[1,"scene-line",3,"ngClass"],[1,"inner"],[1,""],[1,"mx-auto","col-sm-6","col-xl-7","p-0"],[1,"row"],[1,"col-sm-12","col-xl-4","ps-0","text-center","d-none","d-lg-block"],["src","https://static.lightxeditor.com/assets/images/no-music.png",1,"img-fluid"],[1,"col-sm-12","col-xl-8","p-0","align-self-center"],[1,"grey-300","text-xxxl","text-bold"],[1,"grey-300","text-normal","text-semi"]],template:function(t,i){1&t&&(e.j41(0,"div",5,0)(2,"div",6)(3,"div",7,1)(5,"div",8,2),e.DNE(7,Po,4,3,"div",9)(8,Xo,3,2,"div",10),e.k0s()()()()),2&t&&(e.R7$(7),e.Y8G("ngIf","scene"===i.view),e.R7$(),e.Y8G("ngIf","music"===i.view))},dependencies:[m.YU,m.Sq,m.bT,m.B3,X.q,_.md,Ue.b,Fe.v,M.b,$.EX,$.J_],styles:[".timeline-wrapper[_ngcontent-%COMP%]{width:100%;overflow-x:auto}.thumb-scene[_ngcontent-%COMP%]{width:300px;border:2px solid #626ADF;border-radius:12px;background-size:contain;background-repeat:no-repeat;background-position:center}.thumb-scene[_ngcontent-%COMP%]   .move-scene-svg[_ngcontent-%COMP%]{visibility:visible}.thumb-scene.sm[_ngcontent-%COMP%]   .move-scene-svg[_ngcontent-%COMP%]{visibility:hidden}.thumb-scene.sm[_ngcontent-%COMP%]   .scene-action-btn-container[_ngcontent-%COMP%]{right:calc(50% - 16px)}.scene-header-wrapper[_ngcontent-%COMP%]{height:28px;width:100%;display:flex;align-items:center;border-radius:6px}.scene-header[_ngcontent-%COMP%]{height:100%;width:100%;background:#e2e3e9 0% 0% no-repeat padding-box;display:flex;align-items:center;border-radius:6px}.timeline-base[_ngcontent-%COMP%]{width:100%}.timeline-header[_ngcontent-%COMP%]{height:28px;width:100%;background:#f8f8fb 0% 0% no-repeat padding-box;border:1px solid #707070;display:flex;align-items:center}.timeline-container[_ngcontent-%COMP%]{width:100%;display:flex}.thumbline[_ngcontent-%COMP%]{height:100%;display:inline-flex}.musicline[_ngcontent-%COMP%]{height:100%;width:100%;background:#fff 0% 0% no-repeat padding-box;border-radius:8px}.music-top[_ngcontent-%COMP%]{height:2.5rem;width:100%}.music-bottom[_ngcontent-%COMP%]   .drag-boundary[_ngcontent-%COMP%]{width:100%;height:80%;position:relative;overflow:hidden}.music-bottom[_ngcontent-%COMP%]   .trim-info[_ngcontent-%COMP%]{height:1.5rem;width:50px;position:relative}.music-bottom[_ngcontent-%COMP%]   .audio-item[_ngcontent-%COMP%]{width:100%;background:url(https://static.lightxeditor.com/assets/images/waveform.png);background-repeat:no-repeat;background-repeat:repeat-x;opacity:.7;padding:6px 0;background-position-y:center}.music-bottom[_ngcontent-%COMP%]   .video-thumb[_ngcontent-%COMP%]{position:absolute;width:500px;top:0;left:40px;height:100%;outline:4px solid #626ADF;transform:translate(0);padding:6px 0}.music-bottom[_ngcontent-%COMP%]   .short-audio[_ngcontent-%COMP%]{left:40px;position:absolute}.play-cursor[_ngcontent-%COMP%]{transform:translate(5px);background:#626adf;width:1px;height:100%;position:absolute}.thumbline-wrapper[_ngcontent-%COMP%]{position:relative;margin:0;overflow:hidden;display:block;overflow-x:auto}.thumb-scene[_ngcontent-%COMP%]{flex:0 0 auto;position:relative;will-change:width,transform;transform-origin:0 0;-webkit-backface-visibility:hidden;backface-visibility:hidden;-ms-perspective:1000;perspective:1000;border:2px solid transparent}.timeline-icon[_ngcontent-%COMP%]{height:5.5rem}.scene-wrapper[_ngcontent-%COMP%]   .active[_ngcontent-%COMP%]{border:2px solid #626ADF!important}.design-item[_ngcontent-%COMP%]{height:100%;background:#c3a6ff 0% 0% no-repeat padding-box;border-radius:6px;text-align:center;color:#4a4f5e;overflow:hidden}.scene-index[_ngcontent-%COMP%]{position:absolute;bottom:10px}.scene-index[_ngcontent-%COMP%]   span[_ngcontent-%COMP%]{background:#606765;color:#fff;padding:2px 10px;border-radius:8px;font-size:12px;margin-left:10px}.btn-add-scene[_ngcontent-%COMP%]{position:relative;width:60px;height:60px;top:32px;font-size:24px;background:#e2e3e966;border-radius:12px;border:0px!important}.btn-add-scene[_ngcontent-%COMP%]:hover, .btn-add-scene[_ngcontent-%COMP%]:focus, .btn-add-scene[_ngcontent-%COMP%]:active, .btn-add-scene[_ngcontent-%COMP%]:visited{background-color:#e2e3e980!important}.design-item-content[_ngcontent-%COMP%]{text-align:center;padding:3px 14px;display:flex;overflow:hidden}.scene-menu[_ngcontent-%COMP%]{background:#272b34;opacity:.6;border-radius:4px;
1height:16px;width:24px}.scene-menu[_ngcontent-%COMP%]:hover{opacity:1}.scene-action-btn-container[_ngcontent-%COMP%]{position:absolute;right:45px;padding:2px}.btn-scene[_ngcontent-%COMP%]{height:20px;width:20px;border-radius:4px;background-color:#fff;opacity:.6;margin:0 4px;border:none;padding:0 4px;color:#475ae7}.btn-scene[disabled][_ngcontent-%COMP%]{opacity:.6!important;color:#aaa}.btn-scene[_ngcontent-%COMP%]:hover{opacity:1}.scene-action-btn-container[_ngcontent-%COMP%]   .trash-scene-icon[_ngcontent-%COMP%], .copy-scene-icon[_ngcontent-%COMP%], .add-scene-icon[_ngcontent-%COMP%]{background-size:12px 14px;background-repeat:no-repeat;background-position:center}.scenes-marker[_ngcontent-%COMP%]{height:10px;left:40px;position:relative;display:flex;align-items:baseline;margin-top:8px;width:fit-content}.scenes-marker[_ngcontent-%COMP%]   .scene-line[_ngcontent-%COMP%]   .inner[_ngcontent-%COMP%]{background:#9eabff;height:4px;margin:0 2px;border-radius:2px}.scenes-marker[_ngcontent-%COMP%]   .scene-line.active[_ngcontent-%COMP%]   .inner[_ngcontent-%COMP%]{height:6px;background:#626adf}.di-time[_ngcontent-%COMP%]{line-height:24px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;margin:0 8px;font-size:11px}.timeline-scroll[_ngcontent-%COMP%]   .thumb-scene[_ngcontent-%COMP%]{background-repeat:repeat-x;border:2px solid #ebeaf9}.move-scene-svg[_ngcontent-%COMP%]{color:#272b34}.move-scene-svg[_ngcontent-%COMP%]:hover{color:#000}.btn-prev-next-hidden[_ngcontent-%COMP%]{visibility:collapse}.img-thumb[_ngcontent-%COMP%]{position:absolute;width:500px;top:0;left:40px;height:100%;transform:translate(0);padding:6px 0}.photo-music[_ngcontent-%COMP%]   .timeline-icon[_ngcontent-%COMP%]{height:6rem!important}.photo-music[_ngcontent-%COMP%]   .timeline-icon[_ngcontent-%COMP%]   .only-music[_ngcontent-%COMP%], .photo-music[_ngcontent-%COMP%]   .drag-boundary[_ngcontent-%COMP%]{height:100%!important}.photo-music[_ngcontent-%COMP%]   .drag-boundary[_ngcontent-%COMP%]   .img-thumb[_ngcontent-%COMP%]{padding:0}.photo-music[_ngcontent-%COMP%]   .scene-w[_ngcontent-%COMP%]{width:94%!important}"]}),r})();var Ze=d(40605),be=d(55918),zo=d(82635);const Yo=["canvas"];function Lo(o,r){1&o&&e.nrm(0,"app-loading",5)}function Wo(o,r){if(1&o){const n=e.RV6();e.j41(0,"a",8),e.bIt("click",function(){e.eBV(n);const i=e.XpG(2);return e.Njj(i.play())}),e.nrm(1,"pi",9),e.k0s()}}function Ho(o,r){if(1&o){const n=e.RV6();e.j41(0,"a",8),e.bIt("click",function(){e.eBV(n);const i=e.XpG(2);return e.Njj(i.pause())}),e.nrm(1,"pi",10),e.k0s()}}function Zo(o,r){if(1&o&&(e.j41(0,"div",6),e.DNE(1,Wo,2,0,"a",7)(2,Ho,2,0,"a",7),e.k0s()),2&o){const n=e.XpG();e.R7$(),e.Y8G("ngIf",!n.isPlaying),e.R7$(),e.Y8G("ngIf",n.isPlaying)}}let Ko=(()=>{var o;class r{constructor(t,i,s,a){this.scenePraser=t,this.zone=i,this.activeModal=s,this.authService=a,this.isPlaying=!0,this.inProgress=!0}ngAfterViewInit(){setTimeout(()=>{this.render()},500)}ngOnInit(){const t=this.authService.currentUser();this.isSubscribed=!!t&&t.subscribed>0}render(){this.fabricCanvas=new E.fabric.StaticCanvas(this.canvas.nativeElement);const t=this.sceneController.getUpdatedProjectJson();this.projectJson=t;const i=this.sceneController.getAudioObject();i&&i.length>0&&(this.audioObject=i[0]),document.getElementById("project-preview");let a=80*window.innerWidth/100,l=80*window.innerHeight/100,c=this.projectJson.hRatio/this.projectJson.wRatio,p=a,u=a*c;u>l&&(u=l,p=u/c),this.fabricCanvas.setWidth(p),this.fabricCanvas.setHeight(u),this._timeline=be.os.timeline({paused:!0}),this._timeline.vars.onComplete=()=>{this.isPlaying=!1,this.activeModal.close(),this.audioObject&&this.audioObject.pause()},this.scenePraser.parseProject(t,this.fabricCanvas,!1).then(g=>{this.scenes=g,this.inProgress=!1;const h=[];g.forEach((b,z)=>{b.addToCanvas(this.fabricCanvas),this.isPlaying=!0,this.scenePraser.parseAnimation(b),h[z]=b.getSceneAnimation().configureTimeline(this.fabricCanvas)}),Promise.all(h).then(()=>{g.forEach((b,z)=>{const Y=b.getSceneAnimation().getTimeLine();Y.vars.onStart=()=>{this.fabricCanvas.clear(),b.getSceneAnimation().addToCanvas(this.fabricCanvas),this.markWaterMakedRequired()&&this.addWatermarkOverlay(this.fabricCanvas)},Y.play(),this._timeline.add(Y,"+=0")})}),this.startPlay()}),this.zone.runOutsideAngular(()=>this.animationRenderAll(this.fabricCanvas))}animationRenderAll(t){const i=()=>
1{t.renderAll(),this.req=E.fabric.util.requestAnimFrame(i)};E.fabric.util.requestAnimFrame(i)}startPlay(){this.audioObject&&this.audioObject.playAllSceneAudio(),this._timeline.play()}play(){!this._timeline.isActive()&&this._timeline.progress()<1?(this._timeline.play(),this.playVideoAfterPause(),this.isPlaying=!0,this.audioObject&&this.audioObject.play()):this.replay()}pause(){this._timeline.isActive()&&(this.pauseVideoMedia(),this._timeline.pause(),this.isPlaying=!1,this.audioObject&&this.audioObject.pause())}replay(){this._timeline.isActive()||(this._timeline.progress(0),this._timeline.play(),this.audioObject&&this.audioObject.playAllSceneAudio())}ngOnDestroy(){E.fabric.util.cancelAnimFrame(this.req),this.pause(),this.audioObject&&this.audioObject.stop()}pauseVideoMedia(){this.scenes.forEach(t=>t.pauseVideoMedia())}playVideoAfterPause(){this.scenes.forEach(t=>t.playVideoAfterPause())}markWaterMakedRequired(){return!this.isSubscribed&&(this.projectJson.sceneItems.some(i=>{if(i.bgImageObj&&i.bgImageObj.ispro){const s=i.bgImageObj?.ispro||i.designItems.some(a=>a.isPro);this.sceneController.design.properties.pro=+s,this.sceneController.design.properties.hasProElements=+s}}),this.sceneController.design.properties.pro||this.sceneController.design.properties.hasProElements)}addWatermarkOverlay(t){let i=t.height,s=t.width,a=0;a=i>s?i/2e3:s/2e3,t.setOverlayImage("https://static.lightxeditor.com/assets/images/Watermark.png",t.renderAll.bind(t),{scaleX:a,scaleY:a})}}return(o=r).\u0275fac=function(t){return new(t||o)(e.rXU(ne.q),e.rXU(e.SKi),e.rXU(_.Lw),e.rXU(R.u))},o.\u0275cmp=e.VBU({type:o,selectors:[["app-preview"]],viewQuery:function(t,i){if(1&t&&e.GBs(Yo,7),2&t){let s;e.mGM(s=e.lsd())&&(i.canvas=s.first)}},inputs:{sceneController:"sceneController"},decls:5,vars:2,consts:[["canvas",""],["id","project-preview",1,"container-fluid"],[2,"display","inline"],["style","position: absolute;\n    top: 50%;\n    left: 50%;",4,"ngIf"],["class","btn-play","style","",4,"ngIf"],[2,"position","absolute","top","50%","left","50%"],[1,"btn-play"],["class","pointer",3,"click",4,"ngIf"],[1,"pointer",3,"click"],["name","playexportvideo",1,"f-120"],["name","pauseexportvideo",1,"f-120"]],template:function(t,i){1&t&&(e.j41(0,"div",1),e.nrm(1,"canvas",2,0),e.DNE(3,Lo,1,0,"app-loading",3)(4,Zo,3,2,"div",4),e.k0s()),2&t&&(e.R7$(3),e.Y8G("ngIf",i.inProgress),e.R7$(),e.Y8G("ngIf",!i.inProgress))},dependencies:[m.bT,zo.e,M.b],styles:["#project-preview[_ngcontent-%COMP%]   .btn-play[_ngcontent-%COMP%]{transition:.8s ease;opacity:0;transform:translate(-50%,-50%);-ms-transform:translate(-50%,-50%);text-align:center;position:absolute;top:50%;left:50%}#project-preview[_ngcontent-%COMP%]   .btn-play[_ngcontent-%COMP%]   button[_ngcontent-%COMP%]{border-radius:50%}#project-preview[_ngcontent-%COMP%]:hover   .btn-play[_ngcontent-%COMP%]{opacity:1}"]}),r})();var Jo=d(75779),Ce=d(80197),Qo=d(46767),x=d(65677);class qo{constructor(r,n,t,i){this.sceneController=r,this.resolution=n,this.scenePraser=t,this.zone=i,this.fps=1e3/30,this.progress=1,this.isCompleted=!1,this.canceled=!1,this.paused=!1}pause(){"recording"===this.rec.state&&(this.paused=!0,this.rec.pause(),this.audioObject&&this.audioObject.pause(),this.pauseVideoMedia(),this.timeline.pause())}pauseVideoMedia(){this.scenes.forEach(r=>r.pauseVideoMedia(!0))}playVideoAfterPause(){this.scenes.forEach(r=>r.playVideoAfterPause(!0))}resume(){"paused"===this.rec.state&&(this.paused=!1,this.animationRenderAll(null,this.timeline),this.rec.resume(),this.playVideoAfterPause(),this.audioObject&&this.audioObject.play(),this.timeline.resume())}initFabricCanvas(r){let n=0,t=0;r.wRatio>r.hRatio?(t=this.resolution,n=Math.floor(this.resolution*r.wRatio/r.hRatio)):(n=this.resolution,t=Math.floor(this.resolution*r.hRatio/r.wRatio)),n=Math.floor(n/window.devicePixelRatio),t=Math.floor(t/window.devicePixelRatio),n%2!=0&&(n+=1),t%2!=0&&(t+=1);const i=E.fabric.util.createCanvasElement();return i.width=n,i.height=t,new E.fabric.StaticCanvas(i)}createTimeLine(){return be.os.timeline({paused:!0})}audioRender(){var r=this;const n=this.sceneController.getUpdatedProjectJson(),t=this.sceneController.getAudioObject();t&&t.length>0&&(this.audioObject=t[0]);const i=this.initFabricCanvas(n),s=this.createTimeLine();this.timeline=s,s.vars.onComplete=()=>{this.onTimelineComplete()},this.scenePraser.parseProject(n,i,!0).then(a=>{this.scenes=a;const l=[];a.forEach((c,p)=>{c.addToCanvas(i);const u=!1;this.scenePraser.parseAnimation(c,u),l[p]=c.getSceneAnimation().configureTimeline(i,!1,u)}),Promise.all(l).then((0,f.A)(function*(){a.forEach((g,h)=>
1{const b=g.getSceneAnimation().getTimeLine();b.vars.onStart=()=>{i.clear(),g.getSceneAnimation().addToCanvas(i)},b.play(),s.add(b,"+=0")});const c=s.duration(),p=i.getElement();r.configRecording(c,p)?(r.zone.runOutsideAngular(()=>r.animationRenderAll(i,s)),r.audioAvailableCallback(!0),r.startPlay(s)):(r.audioAvailableCallback(!1),r.setCompleted())}))})}startPlay(r){this.rec.start(),setTimeout(()=>{r.play(),this.audioObject&&this.audioObject.playAudioAtExport()},100)}animationRenderAll(r,n){const t=()=>{this.req=setTimeout(t,this.fps);let i=n.progress();i*=100,this.progress=i};!this.canceled&&!this.paused&&(this.req=setTimeout(t,this.fps))}createStream(r,n){let t=[];const i=new Set;this.scenes.forEach(l=>{for(const c of l.getDesignItemList())if("mediacontainer"===c.type&&c._mediaObjects&&c._mediaObjects.length>0){let u=c._mediaObjects[0].getElement();u instanceof HTMLVideoElement&&!i.has(u.src)&&(t.push(u),i.add(u.src))}l.getBackgroundMedia()&&l.getBackgroundMedia().getVideo()&&t.push(l.getBackgroundMedia().getVideo())});const s=[];this.audioObject||(x.Howler.ctx?x.Howler.ctx.resume():(x.Howler.mute(!1),x.Howler.volume(1)));const a=x.Howler.ctx.createMediaStreamDestination();if(t.length>0&&t.forEach(l=>{let c=x.Howler.ctx.createMediaElementSource(l),p=x.Howler.ctx.createGain();p.gain.value=l.volume,c.connect(p).connect(a)}),this.audioObject){if(x.Howler.masterGain.disconnect(),x.Howler.masterGain.connect(a),this.audioObject.audioElementDuration/1e3<r){this.dummySound=x.Howler.ctx.createOscillator(),this.dummySound.type="sine",this.dummySound.frequency.value=440,this.dummySound.start(0);let p=x.Howler.ctx.createGain();p.gain.value=0,this.dummySound.connect(p).connect(a)}const c=a.stream.getAudioTracks();c&&c.length>0&&c.forEach(p=>s.push(p))}else if(t.length>0){const c=a.stream.getAudioTracks();c&&c.length>0&&c.forEach(p=>s.push(p))}return this.audioObject&&this.audioObject.stop(),0==s.length?null:new MediaStream(s)}configRecording(r,n){const t=[];this.dummySound=null;const i=this.createStream(r,n);return!!i&&(this.rec=new MediaRecorder(i),this.rec.ondataavailable=s=>{t.push(s.data)},this.rec.onstop=s=>this.exportVid(new Blob(t)),!0)}exportVid(r){this.exportedBlob=r,this.src=URL.createObjectURL(r),this.setCompleted()}setCompleted(){this.progress=100,this.audioCompleteCallback()}onTimelineComplete(){this.audioObject?this.audioObject.stop():x.Howler.ctx.suspend(),this.stopRecording(),clearTimeout(this.req)}stopRecording(){x.Howler.masterGain.connect(x.Howler.ctx.destination),null!==this.dummySound&&this.dummySound.stop(),"inactive"!=this.rec.state&&this.rec.stop()}}var es=d(20741),ts=d(71804),is=d(73356),Ke=d(345),Je=d(65800);const ns=["videoElem"];function os(o,r){if(1&o){const n=e.RV6();e.j41(0,"div",15),e.nrm(1,"div",16),e.j41(2,"div",17)(3,"circle-progress",18,1),e.bIt("click",function(){e.eBV(n);const i=e.sdS(4);return e.Njj(i.animate())}),e.k0s(),e.j41(5,"div",19),e.EFF(6),e.k0s()()()}if(2&o){const n=e.XpG(2);e.R7$(3),e.Y8G("percent",n.progressAvg)("boxSize",107)("radius",40)("lowColor","#475AE7")("middleColor","#475AE7")("interColor","#475AE7")("highColor","#475AE7")("border",10)("time",0)("innerFill","#e5e7fe")("backgroundColor","#EFEFF4"),e.R7$(3),e.SpI(" ",n.generateVideoText,"")}}function ss(o,r){if(1&o&&e.nrm(0,"source",20),2&o){const n=e.XpG(2);e.Y8G("src",n.exportedSrc,e.B4B)}}function rs(o,r){if(1&o){const n=e.RV6();e.j41(0,"div")(1,"div",3)(2,"button",4),e.bIt("click",function(){e.eBV(n);const i=e.XpG();return e.Njj(i.activeModal.dismiss("Cross click"))}),e.nrm(3,"pi",5),e.k0s()(),e.j41(4,"div",6)(5,"div",7),e.EFF(6),e.k0s(),e.j41(7,"div",8),e.DNE(8,os,7,12,"div",9),e.j41(9,"div",10)(10,"video",11,0),e.DNE(12,ss,1,1,"source",12),e.k0s()(),e.j41(13,"div",13)(14,"button",14),e.bIt("click",function(){e.eBV(n);const i=e.XpG();return e.Njj(i.download())}),e.EFF(15,"Download Video"),e.k0s()()()()()}if(2&o){const n=e.XpG();e.R7$(6),e.JRh(n.exportTitle),e.R7$(2),e.Y8G("ngIf",!n.isCompleted),e.R7$(),e.Y8G("hidden",!n.isCompleted),e.R7$(3),e.Y8G("ngIf",n.isCompleted),e.R7$(2),e.Y8G("disabled",!n.isCompleted)}}function as(o,r){if(1&o){const n=e.RV6();e.j41(0,"div")(1,"div",6)(2,"div",21),e.EFF(3,"Your video is almost ready!"),e.k0s(),e.j41(4,"div",22),e.EFF(5,"You can download your video once it is rendered. You will also receive an email with a download link shortly."),e.k0s(),e.j41(6,"div",23)(7,"div",24)(8,"button",25),e.bIt("click",function(){e.eBV(n);const i=e.XpG();return e.Njj(i.export())}),e.EFF(9,"Got it"),e.k0s()()()()()}}let ls=(()=>{var o;
1class r{constructor(t,i,s,a,l,c,p,u,g){this.toastService=t,this.scenePraser=i,this.zone=s,this.activeModal=a,this.exportService=l,this.authService=c,this.domSanitizer=p,this.videoExportService=u,this.document=g,this.audioAvailable=!1,this.webmSupport=!1,this.webCodecSupport=!1,this.isPlaying=!0,this.inProgress=!0,this.isCompleted=!1,this.exportTitle=k.b.message.exportTitle,this.exportSubtitle="",this.sendMailButtonText="Send mp4 video link",this.progress=1,this.supportedExt="mp4",this.progressAvg=1,this.type={type:"video/webm"},this.inProgressExport=!1,this.generateVideoText=k.b.message.generateVideoText,this.isVideoPlaying=!1,this.canceled=!1,this.videoDone=!1,this.audioDone=!1,this.user=this.authService.currentUser()}ngOnInit(){this.sceneController.getState().stopAnimation();const t=this.sceneController.getSelectedScene();this.lottieWerePlaying=t.lottiePlaying,this.lottieWerePlaying&&t.allLottieTypePause(),this.webCodecSupport=typeof VideoEncoder<"u",this.webmSupport=!!MediaRecorder.isTypeSupported("video/webm")}visibilitychange(t){this.document.hidden?this.mediaRecorderExport.pause():this.mediaRecorderExport.resume()}prepareExportModule(t){Promise.all([this.loadFile("mp4box",F.c.wasmAssetsPath+"/mp4box.all.min.js?v="+F.c.videoEditorWasmVersion),,this.loadFile("ffmpeg",F.c.wasmAssetsPath+"/ffmpeg-mp4.js?v="+F.c.videoEditorWasmVersion)]).then((0,f.A)(function*(){t&&t()}))}loadFile(t,i){return(0,es.uJ)(t,i)}ngAfterViewInit(){this.prepareExportModule(t=>{this.mediaRecorderExport=new qo(this.sceneController,this.resolution,this.scenePraser,this.zone),this.mediaRecorderExport.audioAvailableCallback=s=>{this.audioAvailable=s},this.mediaRecorderExport.audioCompleteCallback=()=>{this.audioDone=!0,this.setCompleted()},this.videoRender(),this.mediaRecorderExport.audioRender(),this.videoElem.nativeElement.onended=s=>{this.isVideoPlaying=!1,this.videoElem.nativeElement.currentTime=0};const i=()=>{this.progressAvg=this.audioAvailable?Math.round((this.progress+this.mediaRecorderExport.progress)/2*.95):Math.round(.95*this.progress),this.progressAvg<95&&!this.canceled&&setTimeout(i,300)};i()})}videoRender(){var t=this;const i=this.sceneController.getUpdatedProjectJson(),s=this.mediaRecorderExport.initFabricCanvas(i),a=this.mediaRecorderExport.createTimeLine();this.scenePraser.parseProject(i,s,!0).then(l=>{this.inProgress=!1;const c=[];l.forEach((p,u)=>{p.addToCanvas(s),this.isPlaying=!0;const g=!0;this.scenePraser.parseAnimation(p,g),c[u]=p.getSceneAnimation().configureTimeline(s,!1,g)}),Promise.all(c).then((0,f.A)(function*(){t.manageLottieFrames=new is.X(l),t.manageVideoService=new ts.u(l),yield t.manageVideoService.init(),l.forEach((u,g)=>{const h=u.getSceneAnimation().getTimeLine();h.vars.onStart=()=>{s.clear(),u.getSceneAnimation().addToCanvas(s)},h.play(),a.add(h,"+=0")});const p=a.duration();yield t.configEncoder(s),t.zone.runOutsideAngular(()=>t.animationRenderAll(p,a,s))}))})}animationRenderAll(t,i,s){var a=this;const l=t*k.b.exportVideoFPS;let c=0;const p=function(){var u=(0,f.A)(function*(){a.manageLottieFrames.render(c),yield a.manageVideoService.render(c),i.progress(c/l),s.renderAll();const g=yield createImageBitmap(s.getElement());yield a.encoder.addFrame(g);let h=i.progress();if(h*=100,a.progress=h,c++,c>l){const b=yield a.encoder.end();a.exportVid(new Blob([b],{type:"video/mp4"}))}else a.canceled||p()});return function(){return u.apply(this,arguments)}}();this.canceled||p()}configEncoder(t){var i=this;return(0,f.A)(function*(){i.videoExportService.mp4Wasm=yield Qo.Ay();let s=Math.floor(t.width*window.devicePixelRatio);s=s%2==0?s:s-1;let a=Math.floor(t.height*window.devicePixelRatio);a=a%2==0?a:a-1,i.encoder=i.videoExportService.mp4Wasm.createWebCodecsEncoder({width:s,height:a,fps:30,encoderOptions:{framerate:30},codec:"avc1.420028",format:"avc"})})()}ngOnDestroy(){this.sceneController.getState().startAnimation(),this.canceled=!0,this.manageVideoService.releaseResources(),!(this.webCodecSupport&&this.webmSupport)&&this.result&&(this.activeModal.close(this.result),this.activeModal.dismiss(this.result)),this.release()}release(){this.mediaRecorderExport&&this.mediaRecorderExport.scenes.length>0&&this.releaseScenes(this.mediaRecorderExport.scenes),this.manageLottieFrames&&this.manageLottieFrames.scenes&&this.releaseScenes(this.manageLottieFrames.scenes)}releaseScenes(t){for(let i=0;i<t.length;i++){let s=t[i];for(let a=0;a<s.designItemList.length;a++){let l=s.designItemList[a];if("andorLottie"===l.type)lottie.destroy(l.lottieItem.name);else if("mediacontainer"===l.type)for(let c=0;c<l._mediaObjects.length;c++){let p=l._mediaObjects[c];p._element&&p._element.nodeName&&"VIDEO"===p._element.nodeName.toUpperCase()&&(p._element.src="",p._element.load(),p._element.remove(),p._element=null),p._originalElement&&p._originalElement.nodeName&&"VIDEO"===p._originalElement.nodeName.toUpperCase()&&(p._originalElement.src="",p._originalElement.load(),p._originalElement.remove(),p._originalElement=null)}}}}exportVid(t){this.exportedBlob=t,this.src=URL.createObjectURL(t),this.videoDone=!0,this.setCompleted()}download(){(0,Ce.saveAs)(this.finalexportedBlob,this.sceneController.design.name?this.sceneController.design.name+"."+this.supportedExt:k.b.label.blankProjectName+"."+this.supportedExt)}export(){if(this.webCodecSupport&&this.webmSupport){let t=this.exportedBlob,i=this.type;this.inProgressExport=!0;const s=this.prepareData(t,i),a=this.sceneController.getDesign().assetId,l=this.sceneController.design.name?this.sceneController.design.name:k.b.label.blankProjectName;this.toastService.showSuccess(k.b.message.uploadingVideo),this.exportService.createJobId(a,this.resolution,l,this.user.systemRefKey,c=>{s.jobId=c.body.exportVideoJob.jobId,this.exportService.generatePresignedUrlForExport(s,p=>{p&&p.body&&p.body.preSignedVideoUrl?this.exportService.upload(t,p.body.preSignedVideoUrl).then(()=>{this.toastService.removeAll(),this.toastService.showSuccess(k.b.message.exportSubTitle),this.inProgressExport=!1,this.sendMailButtonText="Resend Link"}).catch(()=>{this.inProgressExport=!1}):this.inProgressExport=!1},p=>{this.inProgressExport=!1})},()=>{})}else this.activeModal.close()}prepareData(t,i){const s=new cs;return s.contentType=i.type,s.systemRefKey=this.user.systemRefKey,s.sizeInBytes=t.size,s.designName=this.sceneController.design.name,s}setCompleted(){this.audioDone&&this.videoDone&&(this.audioAvailable?this.ffmpeg():(this.finalexportedBlob=this.exportedBlob,this.exportedSrc=this.domSanitizer.bypassSecurityTrustUrl(URL.createObjectURL(this.exportedBlob)),this.isCompleted=!0,this.exportTitle=k.b.message.exportDownloadTitle))}ffmpeg(){let t=window.ffmpeg.exports,i="",s="";this.getUint8Arr(this.src,a=>{this.getUint8Arr(this.mediaRecorderExport.src,l=>{var c=t({MEMFS:[{name:"test.mp4",data:a},{name:"Vista",data:l}],arguments:["-i","test.mp4","-i","Vista","-c:v","copy","-c:a","aac","output.mp4"],print:g=>
1{i+=g+"\n"},printErr:g=>{s+=g+"\n"},onExit:g=>{}});const u=new Blob([c.MEMFS[0].data],{type:"video/mp4"});this.finalexportedBlob=u,this.exportedSrc=this.domSanitizer.bypassSecurityTrustUrl(URL.createObjectURL(u)),this.isCompleted=!0,this.exportTitle=k.b.message.exportDownloadTitle})})}getUint8Arr(t,i){fetch(t).then(a=>{a.blob().then(l=>{var c=new FileReader;c.onload=p=>{i(p.target.result)},c.readAsArrayBuffer(l)})})}}return(o=r).\u0275fac=function(t){return new(t||o)(e.rXU(oe.f),e.rXU(ne.q),e.rXU(e.SKi),e.rXU(_.Lw),e.rXU(A._),e.rXU(R.u),e.rXU(Ke.up),e.rXU(O.d),e.rXU(m.qQ))},o.\u0275cmp=e.VBU({type:o,selectors:[["app-export-music"]],viewQuery:function(t,i){if(1&t&&e.GBs(ns,5),2&t){let s;e.mGM(s=e.lsd())&&(i.videoElem=s.first)}},hostBindings:function(t,i){1&t&&e.bIt("visibilitychange",function(a){return i.visibilitychange(a)},!1,e.EBC)},inputs:{sceneController:"sceneController",resolution:"resolution"},decls:2,vars:2,consts:[["videoElem",""],["circleProg1",""],[4,"ngIf"],[1,"modal-header","border-0","p-0"],["type","button","aria-hidden","close",1,"close",3,"click"],["name","close",1,"f-30"],[1,"modal-body","h-100","p-12"],[1,"export-title","text-bold"],[1,"mx-auto","mt-10","wp-100","text-center"],["style","position:relative",4,"ngIf"],[1,"video-preview",3,"hidden"],["controls","","noloop","","name","media",1,"vid-area","w-100",2,"min-width","300px"],["type","video/mp4",3,"src",4,"ngIf"],[1,"mx-auto","mt-10",2,"max-width","185px"],["id","gtm_video_temp_editor_dw",1,"btn","btn-outline-primary","btn-h48","btn-primary-disabled","active",3,"click","disabled"],[2,"position","relative"],[1,"vid-area"],[1,"circle-progress"],[3,"click","percent","boxSize","radius","lowColor","middleColor","interColor","highColor","border","time","innerFill","backgroundColor"],[1,"wp-100","text-center",2,"font-size","14px"],["type","video/mp4",3,"src"],[1,"export-title-s","text-semi"],[1,"export-subtitle-s","text-center","mt-3"],[1,"wp-100","mt-4"],[1,"d-flex","justify-content-center"],["id","gtm_video_temp_editor_dw",1,"btn","btn-primary","btn-h40","ps-4","pe-4",3,"click"]],template:function(t,i){1&t&&e.DNE(0,rs,16,5,"div",2)(1,as,10,0,"div",2),2&t&&(e.Y8G("ngIf",i.webCodecSupport),e.R7$(),e.Y8G("ngIf",!i.webCodecSupport))},dependencies:[m.bT,Je.V,M.b],styles:[".slider[_ngcontent-%COMP%]{height:100px}.min-vh-65[_ngcontent-%COMP%]{min-height:65vh!important}.space-progress[_ngcontent-%COMP%]{margin:8px 0;border:1px solid #475AE7;border-radius:1.2rem}.progress-bar[_ngcontent-%COMP%]{display:flex;flex-direction:column;justify-content:center;overflow:hidden;color:#fff;text-align:center;white-space:nowrap;background-color:#475ae7;transition:width .6s ease}.full-dialog-footer[_ngcontent-%COMP%]{padding:3rem;background:#e5e7fe;display:flex;align-items:center;justify-content:center;position:fixed;bottom:0}.export-title[_ngcontent-%COMP%]{font-size:24px;color:#272b34;text-align:center}.export-subtitle[_ngcontent-%COMP%]{font-size:14px;font-weight:600;color:#626adf}.vid-area[_ngcontent-%COMP%]{background:#eeedf3;max-height:461px;height:400px}.circle-progress[_ngcontent-%COMP%]{position:absolute;top:0;bottom:0;display:flex;flex-direction:column;justify-content:center;left:0;right:0}.video-preview[_ngcontent-%COMP%]{position:relative}.video-preview[_ngcontent-%COMP%]   .btn-play[_ngcontent-%COMP%]{transition:.8s ease;opacity:0;transform:translate(-50%,-50%);-ms-transform:translate(-50%,-50%);text-align:center;position:absolute;top:50%;left:50%}.video-preview[_ngcontent-%COMP%]   .btn-play[_ngcontent-%COMP%]   button[_ngcontent-%COMP%]{border-radius:50%}.video-preview[_ngcontent-%COMP%]:hover   .btn-play[_ngcontent-%COMP%]{opacity:1!important}.export-title-s[_ngcontent-%COMP%]{font-weight:700;font-size:24px;color:#4a4f5e;text-align:center;line-height:32.68px}.export-subtitle-s[_ngcontent-%COMP%]{font-size:16px;font-weight:400;color:#4a4f5e;line-height:21.79px}.rendering[_ngcontent-%COMP%]{font-size:14px;color:#272b34;line-height:25.2px}"]}),r})();class cs{constructor(){this.assetType="video"}}const ds=["canvas"],ps=["videoElem"];function ms(o,r){if(1&o&&(e.j41(0,"span"),e.EFF(1),e.k0s()),2&o){const n=e.XpG(2);e.R7$(),e.SpI("as ",n.supportedExt,"")}}function us(o,r){if(1&o){const n=e.RV6();e.j41(0,"div",21),e.nrm(1,"div",22),e.j41(2,"div",23)(3,"circle-progress",24,2),e.bIt("click",function(){e.eBV(n);const i=e.sdS(4);return e.Njj(i.animate())}),e.k0s(),e.j41(5,"div",25),e.EFF(6),e.k0s()()()}if(2&o){const n=e.XpG(2);e.R7$(3),e.Y8G("percent",n.progress)("boxSize",107)("radius",40)("lowColor","#475AE7")("middleColor","#475AE7")("interColor","#475AE7")("highColor","#475AE7")("border",10)("time",0)("innerFill","#e5e7fe")("backgroundColor","#EFEFF4"),e.R7$(3),e.SpI(" ",n.generateVideoText,"")}}function gs(o,r){if(1&o){const n=e.RV6();e.j41(0,"a",26),e.bIt("click",function(){e.eBV(n);const i=e.XpG(2);return e.Njj(i.playVideo())}),e.nrm(1,"pi",27),e.k0s()}}function hs(o,r){if(1&o){const n=e.RV6();e.j41(0,"a",26),e.bIt("click",function(){e.eBV(n);const i=e.XpG(2);return e.Njj(i.pauseVideo())}),e.nrm(1,"pi",28),e.k0s()}}function _s(o,r){if(1&o){const n=e.RV6();e.j41(0,"div")(1,"div",5)(2,"button",6),e.bIt("click",function(){e.eBV(n);const i=e.XpG();return e.Njj(i.activeModal.dismiss("Cross click"))}),e.nrm(3,"pi",7),e.k0s()(),e.j41(4,"div",8)(5,"div",9),e.EFF(6),e.k0s(),e.j41(7,"div",10),e.EFF(8),e.k0s(),e.j41(9,"div",11)(10,"div",12)(11,"button",13),e.bIt("click",function(){e.eBV(n);const i=e.XpG();return e.Njj(i.download())}),e.EFF(12,"Download "),e.DNE(13,ms,2,1,"span",4),e.k0s(),e.j41(14,"button",14),e.bIt("click",function(){e.eBV(n);const i=e.XpG();return e.Njj(i.export())}),e.EFF(15),e.k0s()()(),e.j41(16,"div",15),e.DNE(17,us,7,12,"div",16),e.j41(18,"div",17),e.nrm(19,"video",18,1),e.j41(21,"div",19),e.DNE(22,gs,2,0,"a",20)(23,hs,2,0,"a",20),e.k0s()()()()()}if(2&o){const n=e.XpG();e.R7$(6),e.JRh(n.exportTitle),e.R7$(2),e.JRh(n.exportSubtitle),e.R7$(3),e.Y8G("disabled",!n.isCompleted),e.R7$(2),e.Y8G("ngIf",n.supportedExt),e.R7$(),e.Y8G("disabled",!n.isCompleted||n.inProgressExport),e.R7$(),e.JRh(n.sendMailButtonText),e.R7$(2),e.Y8G("ngIf",!n.isCompleted),e.R7$(),e.Y8G("hidden",!n.isCompleted),e.R7$(),e.Y8G("src",n.exportedSrc,e.B4B),e.R7$(2),e.xc7("opacity",n.isVideoPlaying?0:1),e.R7$(),e.Y8G("ngIf",!n.isVideoPlaying),e.R7$(),e.Y8G("ngIf",n.isVideoPlaying)}}function vs(o,r){if(1&o){const n=e.RV6();e.j41(0,"div")(1,"div",8)(2,"div",29),e.EFF(3,"Your video is almost ready!"),e.k0s(),e.j41(4,"div",30),e.EFF(5,"You can download your video once it is rendered. You will also receive an email with a download link shortly."),e.k0s(),e.j41(6,"div",31)(7,"div",32)(8,"button",33),e.bIt("click",function(){e.eBV(n);const i=e.XpG();return e.Njj(i.export())}),e.EFF(9,"Got it"),e.k0s()()()()()}}let fs=(()=>{var o;
1class r{constructor(t,i,s,a,l,c,p){this.toastService=t,this.scenePraser=i,this.zone=s,this.activeModal=a,this.exportService=l,this.authService=c,this.domSanitizer=p,this.webmSupport=!1,this.fps=1e3/30,this.isPlaying=!0,this.inProgress=!0,this.isCompleted=!1,this.exportTitle=k.b.message.exportTitle,this.exportSubtitle="",this.sendMailButtonText="Send mp4 video link",this.progress=1,this.type={type:"video/webm"},this.inProgressExport=!1,this.generateVideoText=k.b.message.generateVideoText,this.isVideoPlaying=!1,this.user=this.authService.currentUser()}ngAfterViewInit(){this.webmSupport&&(this.render(),this.videoElem.nativeElement.onended=t=>{this.isVideoPlaying=!1,this.videoElem.nativeElement.currentTime=0})}ngOnInit(){this.webmSupport=!!MediaRecorder.isTypeSupported("video/webm")}onTimelineComplete(){this.isPlaying=!1,this.audioObject?this.audioObject.stop():x.Howler.ctx.suspend(),this.stopRecording(),clearTimeout(this.req)}render(){this.fabricCanvas=new E.fabric.StaticCanvas(this.canvas.nativeElement);const t=this.sceneController.getUpdatedProjectJson(),i=this.sceneController.getAudioObject();i&&i.length>0&&(this.audioObject=i[0]),document.getElementById("project-preview");let a=0,l=0;t.wRatio>t.hRatio?(l=this.resolution,a=Math.floor(this.resolution*t.wRatio/t.hRatio)):(a=this.resolution,l=Math.floor(this.resolution*t.hRatio/t.wRatio)),a%2!=0&&(a+=1),l%2!=0&&(l+=1),this.fabricCanvas.setWidth(a/window.devicePixelRatio),this.fabricCanvas.setHeight(l/window.devicePixelRatio),this._timeline=be.os.timeline({paused:!0}),this._timeline.vars.onComplete=()=>{this.onTimelineComplete()},this.scenePraser.parseProject(t,this.fabricCanvas,!0).then(c=>{this.scenes=c,this.inProgress=!1;const p=[];c.forEach((u,g)=>{u.addToCanvas(this.fabricCanvas),this.isPlaying=!0,this.scenePraser.parseAnimation(u),p[g]=u.getSceneAnimation().configureTimeline(this.fabricCanvas)}),Promise.all(p).then(()=>{c.forEach((g,h)=>{const b=g.getSceneAnimation().getTimeLine();b.vars.onStart=()=>{this.fabricCanvas.clear(),g.getSceneAnimation().addToCanvas(this.fabricCanvas)},b.play(),this._timeline.add(b,"+=0")});const u=this._timeline.duration();this.configRecording(u),this.startPlay()})}),this.zone.runOutsideAngular(()=>this.animationRenderAll(this.fabricCanvas))}animationRenderAll(t){const i=()=>{t.requestRenderAll(),this.req=setTimeout(i,this.fps);let s=this._timeline.progress();s*=100;let a=Math.round(s);this.progress=a};this.req=setTimeout(i,this.fps)}startPlay(){this.rec.start(3e3),setTimeout(()=>{this._timeline.play()},50),this.audioObject&&this.audioObject.playAllSceneAudio()}pause(){this._timeline.isActive()&&(this._timeline.pause(),this.isPlaying=!1,this.audioObject&&this.audioObject.pause())}ngDoCheck(){}ngAfterContentInit(){}ngOnDestroy(){}configRecording(t){var i=null,s={type:"video/webm"},a="webm";MediaRecorder.isTypeSupported("video/webm")?(i=MediaRecorder.isTypeSupported("video/webm;codecs=vp9")?{mimeType:"video/webm;codecs=vp9"}:{mimeType:"video/webm"},s={type:"video/webm"},a="webm",this.type={type:"video/webm"},this.supportedExt="webm",this.webmSupport=!0):MediaRecorder.isTypeSupported("video/mp4;codecs:h264")&&(i={mimeType:"video/mp4;codecs:h264"},s={type:"video/mp4"},a="mp4",this.type={type:"video/mp4"},this.supportedExt="mp4",this.webmSupport=!1);const l=[];this.dummySound=null;const c=this.createStream(t);i.audioBitsPerSecond=128e3,i.videoBitsPerSecond=1080===this.resolution?35e5:720===this.resolution?25e5:15e5,this.rec=new MediaRecorder(c,i),this.rec.ondataavailable=p=>{l.push(p.data)},this.rec.onstop=p=>this.exportVid(new Blob(l,s),a)}stopRecording(){x.Howler.masterGain.connect(x.Howler.ctx.destination),null!==this.dummySound&&this.dummySound.stop(),"inactive"!=this.rec.state&&setTimeout(()=>{this.rec.stop()},2e3)}createStream(t){let i=[];const s=new Set;this.scenes.forEach(u=>{for(const g of u.getDesignItemList())if("mediacontainer"===g.type&&g._mediaObjects&&g._mediaObjects.length>0){let b=g._mediaObjects[0].getElement();b instanceof HTMLVideoElement&&!s.has(b.src)&&(i.push(b),s.add(b.src))}u.getBackgroundMedia()&&u.getBackgroundMedia().getVideo()&&i.push(u.getBackgroun
1dMedia().getVideo())});const a=this.canvas.nativeElement.captureStream(30),l=[],c=a.getTracks();c&&c.length>0&&c.forEach(u=>l.push(u)),this.audioObject||(x.Howler.ctx?x.Howler.ctx.resume():(x.Howler.mute(!1),x.Howler.volume(1)));const p=x.Howler.ctx.createMediaStreamDestination();if(i.length>0&&i.forEach(u=>{let g=x.Howler.ctx.createMediaElementSource(u),h=x.Howler.ctx.createGain();h.gain.value=u.volume,g.connect(h).connect(p)}),this.audioObject){if(x.Howler.masterGain.disconnect(),x.Howler.masterGain.connect(p),this.audioObject.audioElementDuration/1e3<t){this.dummySound=x.Howler.ctx.createOscillator(),this.dummySound.type="sine",this.dummySound.frequency.value=440,this.dummySound.start(0);let h=x.Howler.ctx.createGain();h.gain.value=0,this.dummySound.connect(h).connect(p)}const g=p.stream.getAudioTracks();g&&g.length>0&&g.forEach(h=>l.push(h))}else if(i.length>0){const g=p.stream.getAudioTracks();g&&g.length>0&&g.forEach(h=>l.push(h))}return this.audioObject&&(this.audioObject.stop(),this.audioObject.play()),new MediaStream(l)}exportVid(t,i){document.createElement("video"),this.exportedBlob=t,this.exportedSrc=this.domSanitizer.bypassSecurityTrustUrl(URL.createObjectURL(t)),this.setCompleted()}download(){(0,Ce.saveAs)(this.exportedBlob,this.sceneController.design.name?this.sceneController.design.name+"."+this.supportedExt:k.b.label.blankProjectName+"."+this.supportedExt)}export(){if(this.webmSupport){let t=this.exportedBlob,i=this.type;this.inProgressExport=!0;const s=this.prepareData(t,i),a=this.sceneController.getDesign().assetId,l=this.sceneController.design.name?this.sceneController.design.name:k.b.label.blankProjectName;this.toastService.showSuccess(k.b.message.uploadingVideo),this.exportService.createJobId(a,this.resolution,l,this.user.systemRefKey,c=>{s.jobId=c.body.exportVideoJob.jobId,this.exportService.generatePresignedUrlForExport(s,p=>{p&&p.body&&p.body.preSignedVideoUrl?this.exportService.upload(t,p.body.preSignedVideoUrl).then(()=>{this.toastService.removeAll(),this.toastService.showSuccess(k.b.message.exportSubTitle),this.inProgressExport=!1,this.sendMailButtonText="Resend Link"}).catch(()=>{this.inProgressExport=!1}):this.inProgressExport=!1},p=>{this.inProgressExport=!1})},()=>{})}else this.activeModal.close()}invokeCreateVideo(){const t=this.sceneController.getDesign().assetId;this.exportService.invokeCreateVideo(t,this.resolution,this.sceneController.design.name?this.sceneController.design.name:k.b.label.blankProjectName,this.user.systemRefKey,s=>{s&&s.body.exportVideoJob.jobId&&(this.result={invokeCreateVideo:!0,jobId:s.body.exportVideoJob.jobId}),this.toastService.removeAll(),this.inProgressExport=!1,this.sendMailButtonText="Resend Link"},()=>{this.inProgressExport=!1})}backToEdit(){this.activeModal.dismiss()}prepareData(t,i){const s=new bs;return s.contentType=i.type,s.systemRefKey=this.user.systemRefKey,s.sizeInBytes=t.size,s.designName=this.sceneController.design.name,s}cancel(){this.activeModal.dismiss()}setCompleted(){this.progress=100,this.isCompleted=!0,this.exportTitle=k.b.message.exportDownloadTitle}playVideo(){this.isVideoPlaying||(this.isVideoPlaying=!0,this.videoElem.nativeElement.play())}pauseVideo(){this.isVideoPlaying&&(this.isVideoPlaying=!1,this.videoElem.nativeElement.pause())}}return(o=r).\u0275fac=function(t){return new(t||o)(e.rXU(oe.f),e.rXU(ne.q),e.rXU(e.SKi),e.rXU(_.Lw),e.rXU(A._),e.rXU(R.u),e.rXU(Ke.up))},o.\u0275cmp=e.VBU({type:o,selectors:[["app-export-new"]],viewQuery:function(t,i){if(1&t&&(e.GBs(ds,7),e.GBs(ps,5)),2&t){let s;e.mGM(s=e.lsd())&&(i.canvas=s.first),e.mGM(s=e.lsd())&&(i.videoElem=s.first)}},inputs:{sceneController:"sceneController",resolution:"resolution"},decls:4,vars:2,consts:[["canvas",""],["videoElem",""],["circleProg1",""],[2,"display","none"],[4,"ngIf"],[1,"modal-header","border-0","p-0"],["type","button","aria-hidden","close",1,"close",3,"click"],["name","close",1,"f-30"],[1,"modal-body","h-100","p-12"],[1,"export-title","text-bold"],[1,"export-subtitle","text-semi","text-center","mt-1"],[1,"wp-100","mt-11"],[1,"d-flex","justify-content-between","m-auto",2,"max-width","412px"],[1,"btn","btn-outline-primary","btn-auto","btn-h48","text-normal","mr-8","btn-primary-disabled","active",3,"click","disabled"],[1,"btn","btn-outline-primary","btn-auto","btn-h48","text-normal","btn-primary-disabled",3,"click","disabled"],[1,"mx-auto","mt-12","wp-100","text-center"],["style","position:relative",4,"ngIf"],[1,"video-preview",3,"hidden"],["noloop","",1,"vid-area",3,"src"],[1,"btn-play"],["class","pointer",3,"click",4,"ngIf"],[2,"position","relative"],[1,"vid-area"],[1,"circle-progress"],[3,"click","percent","boxSize","radius","lowColor","middleColor","interColor","highColor","border","time","innerFill","backgroundColor"],[1,"wp-100","text-center",2,"font-size","14px"],[1,"pointer",3,"click"],["name","playexportvideo",1,"f-120"],["name","pauseexp
1ortvideo",1,"f-120"],[1,"export-title-s","text-semi"],[1,"export-subtitle-s","text-center","mt-3"],[1,"wp-100","mt-4"],[1,"d-flex","justify-content-center"],[1,"btn","btn-primary","btn-h40","ps-4","pe-4",3,"click"]],template:function(t,i){1&t&&(e.nrm(0,"canvas",3,0),e.DNE(2,_s,24,13,"div",4)(3,vs,10,0,"div",4)),2&t&&(e.R7$(2),e.Y8G("ngIf",i.webmSupport),e.R7$(),e.Y8G("ngIf",!i.webmSupport))},dependencies:[m.bT,Je.V,M.b],styles:[".slider[_ngcontent-%COMP%]{height:100px}.min-vh-65[_ngcontent-%COMP%]{min-height:65vh!important}.space-progress[_ngcontent-%COMP%]{margin:8px 0;border:1px solid #475AE7;border-radius:1.2rem}.progress-bar[_ngcontent-%COMP%]{display:flex;flex-direction:column;justify-content:center;overflow:hidden;color:#fff;text-align:center;white-space:nowrap;background-color:#475ae7;transition:width .6s ease}.full-dialog-footer[_ngcontent-%COMP%]{padding:3rem;background:#e5e7fe;display:flex;align-items:center;justify-content:center;position:fixed;bottom:0}.export-title[_ngcontent-%COMP%]{font-weight:700;font-size:24px;color:#272b34;text-align:center}.export-subtitle[_ngcontent-%COMP%]{font-size:14px;font-weight:600;color:#626adf}.vid-area[_ngcontent-%COMP%]{background:#e2e3e94d 0% 0% no-repeat padding-box;max-height:461px;height:400px;width:100%}.circle-progress[_ngcontent-%COMP%]{position:absolute;top:0;bottom:0;display:flex;flex-direction:column;justify-content:center;left:0;right:0}.video-preview[_ngcontent-%COMP%]{position:relative}.video-preview[_ngcontent-%COMP%]   .btn-play[_ngcontent-%COMP%]{transition:.8s ease;opacity:0;transform:translate(-50%,-50%);-ms-transform:translate(-50%,-50%);text-align:center;position:absolute;top:50%;left:50%}.video-preview[_ngcontent-%COMP%]   .btn-play[_ngcontent-%COMP%]   button[_ngcontent-%COMP%]{border-radius:50%}.video-preview[_ngcontent-%COMP%]:hover   .btn-play[_ngcontent-%COMP%]{opacity:1!important}.export-title-s[_ngcontent-%COMP%]{font-weight:700;font-size:24px;color:#4a4f5e;text-align:center;line-height:32.68px}.export-subtitle-s[_ngcontent-%COMP%]{font-size:16px;font-weight:400;color:#4a4f5e;line-height:21.79px}"]}),r})();class bs{constructor(){this.assetType="video"}}var Cs=d(10634);const xs=["export-settings",""],xe=(o,r)=>({"active-res-info":o,"resolution-info":r});function ks(o,r){if(1&o&&(e.j41(0,"button",17),e.EFF(1),e.k0s()),2&o){const n=e.XpG(2);e.R7$(),e.JRh(n.exportBtnTxt)}}function Ts(o,r){if(1&o){const n=e.RV6();e.j41(0,"button",18),e.bIt("click",function(){e.eBV(n);const i=e.XpG(2);return e.Njj(i.exportvedio(i.exportdata))}),e.EFF(1),e.k0s()}if(2&o){const n=e.XpG(2);e.R7$(),e.JRh(n.exportBtnTxt)}}function js(o,r){if(1&o){const n=e.RV6();e.j41(0,"div",1)(1,"div",2)(2,"div",3)(3,"div",4)(4,"div",5)(5,"div",6)(6,"div",7),e.EFF(7," Rendering... "),e.k0s(),e.j41(8,"div",8),e.bIt("click",function(){e.eBV(n);const i=e.XpG();return e.Njj(i.activeModal.dismiss("Cross click"))}),e.nrm(9,"pi",9),e.k0s()(),e.j41(10,"div",10)(11,"div",11)(12,"div",12),e.EFF(13,"Your video is getting ready!"),e.k0s(),e.j41(14,"div",13),e.EFF(15,"You can start the export process again when your video is rendered."),e.k0s()()(),e.j41(16,"div",14),e.DNE(17,ks,2,1,"button",15)(18,Ts,2,1,"button",16),e.k0s()()()()()()}if(2&o){const n=e.XpG();e.R7$(17),e.Y8G("ngIf",!n.exportdata),e.R7$(),e.Y8G("ngIf",n.exportdata)}}function Ps(o,r){1&o&&(e.j41(0,"div"),e.nrm(1,"pi",29),e.k0s())}function Ss(o,r){1&o&&(e.j41(0,"div"),e.nrm(1,"pi",29),e.k0s())}function ws(o,r){1&o&&(e.j41(0,"div"),e.nrm(1,"pi",29),e.k0s())}function ys(o,r){1&o&&(e.j41(0,"button",30)(1,"div",31)(2,"span",32),e.EFF(3,"Loading..."),e.k0s()()())}function Is(o,r){if(1&o){const n=e.RV6();e.j41(0,"button",33),e.bIt("click",function(){e.eBV(n);const i=e.XpG(2);return e.Njj(i.upgradeAndDownload())}),e.EFF(1),e.k0s()}if(2&o){const n=e.XpG(2);e.R7$(),e.JRh(n.upgradeBtnText)}}function Es(o,r){if(1&o){const n=e.RV6();e.j41(0,"button",34),e.bIt("click",function(){e.eBV(n);const i=e.XpG(2);return e.Njj(i.export())}),e.EFF(1),e.k0s()}if(2&o){const n=e.XpG(2);e.R7$(),e.JRh(n.exportBtnTxt)}}function Ms(o,r){if(1&o){const n=e.RV6();e.j41(0,"button",34),e.bIt("click",function(){e.eBV(n);const i=e.XpG(2);return e.Njj(i.verifyEmail())}),e.EFF(1,"Verify Email to Export"),e.k0s()}}function Os(o,r){if(1&o){const n=e.RV6();e.j41(0,"div",1)(1,"div",2)(2,"div",3)(3,"div",4)(4,"div",5)(5,"div",6)(6,"div",19),e.EFF(7," Resolution "),e.k0s(),e.j41(8,"div",8),e.bIt("click",function(){e.eBV(n);const i=e.XpG();return e.Njj(i.activeModal.dismiss("Cross click"))}),e.nrm(9,"pi",9),e.k0s()(),e.j41(10,"div",20)(11,"div",21),e.bIt("click",function(){e.eBV(n);const i=e.XpG();return e.Njj(i.resolutionChange(480))}
1),e.DNE(12,Ps,2,0,"div",22),e.j41(13,"div",23),e.EFF(14,"Low Quality "),e.k0s(),e.j41(15,"div",24),e.EFF(16,"480p - Ok for demos"),e.k0s()(),e.j41(17,"div",21),e.bIt("click",function(){e.eBV(n);const i=e.XpG();return e.Njj(i.resolutionChange(720))}),e.DNE(18,Ss,2,0,"div",22),e.j41(19,"div",23),e.EFF(20,"Medium Quality "),e.k0s(),e.j41(21,"div",24),e.EFF(22,"720p - Good for social media"),e.k0s()(),e.j41(23,"div",21),e.bIt("click",function(){e.eBV(n);const i=e.XpG();return e.Njj(i.resolutionChange(1080))}),e.DNE(24,ws,2,0,"div",22),e.j41(25,"div",23),e.EFF(26,"High Quality "),e.k0s(),e.j41(27,"div",24),e.EFF(28,"1080p - Best for video streaming"),e.k0s()()(),e.j41(29,"div",25),e.DNE(30,ys,4,0,"button",26)(31,Is,2,1,"button",27)(32,Es,2,1,"button",28)(33,Ms,2,0,"button",28),e.k0s()()()()()()}if(2&o){const n=e.XpG();e.R7$(11),e.Y8G("ngClass",e.l_i(10,xe,480===n.resolution,480!==n.resolution)),e.R7$(),e.Y8G("ngIf",n.showProIcon(480)),e.R7$(5),e.Y8G("ngClass",e.l_i(13,xe,720===n.resolution,720!==n.resolution)),e.R7$(),e.Y8G("ngIf",n.showProIcon(720)),e.R7$(5),e.Y8G("ngClass",e.l_i(16,xe,1080===n.resolution,1080!==n.resolution)),e.R7$(),e.Y8G("ngIf",n.showProIcon(1080)),e.R7$(6),e.Y8G("ngIf",n.isProgress),e.R7$(),e.Y8G("ngIf",!n.isProgress&&n.isNeedUpgrade&&n.user.email),e.R7$(),e.Y8G("ngIf",!n.isProgress&&!n.isNeedUpgrade&&n.user.email&&!n.rendering),e.R7$(),e.Y8G("ngIf",!n.isProgress&&!n.user.email)}}let Qe=(()=>{var o;class r{constructor(t,i,s,a,l,c){this.document=t,this.activeModal=i,this.authService=s,this.modalService=a,this.exportService=l,this.paymentService=c,this.projectName="",this.thumbUrl="",this.submit=!1,this.resolution=720,this.isNeedUpgrade=!1,this.isRendering=!1,this.isexportstatus=!1,this.upgradeBtnText="Upgrade Plan",this.outputFromChild=new e.bkB,this.isDesignLoaded=!1,this.imageWidth=100,this.isProgress=!0,this.webmSupport=!1,this.webCodecSupport=!1,this.sizepopup="xl",this.exportBtnTxt="Export Video",this.rendering=!1,this.supportedExt="webm",this.imagename="",this.isProgress=!0,this.checkUser(p=>{this.isProgress=!1,!this.user.subscribed&&!this.isNeedUpgrade&&(this.resolution=480),this.setTrialPeriod()})}setTrialPeriod(){let t=this.paymentService.getTrialUi();this.upgradeBtnText=t.upgradeBtnText}showProIcon(t){return!(!this.isNeedUpgrade||!this.proTemplate)||!this.user.subscribed&&(720===t||1080===t)}checkUser(t){this.authService.checkLoginLocal(),this.user=this.authService.currentUser(),this.user.email?t():this.authService.getUserDetails(this.user.systemRefKey,i=>{i&&(this.user=this.authService.currentUser(),t())},i=>{t()})}ngOnInit(){this.webCodecSupport=typeof VideoEncoder<"u",this.webmSupport=!!MediaRecorder.isTypeSupported("video/webm"),this.projectName=this.sceneController.design.name,this.thumbUrl=this.sceneController.design.thumbUrl,this.isNeedUpgrade&&(this.resolution=1080)}resolutionChange(t){this.resolution=t,this.proTemplate||(this.isNeedUpgrade=!(720!==this.resolution&&1080!==this.resolution||this.user.subscribed))}cancel(){this.activeModal.dismiss()}export(){if(!this.isNeedUpgrade||!this.proTemplate)if(this.sceneController.getExportedVideoUrl(this.resolution))this.exportdata={exportCached:!0,resolution:this.resolution},this.exportService.setExportApiResponse(this.exportdata),this.activeModal.close();else{let i,t="MD mozila";this.webmSupport&&this.webCodecSupport?t="xl":(t="MD mozila",this.webmSupport||this.invokeCreateVideo()),this.activeModal.close(),this.submit=!0,i=this.modalService.open(this.webCodecSupport&&this.webmSupport?ls:fs,{centered:!0,size:t,backdrop:"static",windowClass:"export-final-dialog",backdropClass:"preview-bd"}),i.componentInstance.resolution=this.resolution,i.componentInstance.sceneController=this.sceneController}}invokeCreateVideo(){var t=this;return(0,f.A)(function*(){const i=t.sceneController.design.name?t.sceneController.design.name:k.b.label.blankProjectName;t.sceneController.getUpdatedProjectJson(),t.sceneController.save(t.user.systemRefKey,()=>{const s=t.sceneController.getDesign().assetId;t.exportService.invokeCreateVideo(s,t.resolution,i,t.user.systemRefKey,a=>{localStorage.setItem("safariexportVideo",JSON.stringify({assetId:s,jobId:a.body.exportVideoJob.jobId})),a&&a.body.exportVideoJob.jobId?(t.exportdata={invokeCreateVideo:!0,jobId:a.body.exportVideoJob.jobId,resolution:t.resolution},t.exportService.setExportApiResponse(t.exportdata)):console.log("error in invode create vedio on export-setting component")},()=>{})})})()}verifyEmail(){this.submit=!0,this.activeModal.dismiss(),this.modalService.open(Jo.EmailVerifyComponent,{centered:!0,size:"MD",backdropClass:"preview-bd"})}upgradeAndDownload(){this.activeModal.close("upgrade")}toggleMenubar(){this.document.getElementById("export-template-content").classList.toggle("show")}toggleMenubarclose(){this.document.getElementById("export-template-content").classList.remove("show")}exportvedio(t){t&&(this.toggleMenubar(),this.activeModal.close("ok"))}}return(o=r).\u0275fac=function(t){return new(t||o)(e.rXU(m.qQ),e.rXU(_.Lw),e.rXU(R.u),e.rXU(_.Bq),e.rXU(A._),e.rXU(Cs.W))}
1,o.\u0275cmp=e.VBU({type:o,selectors:[["","export-settings",""]],inputs:{sceneController:"sceneController",isNeedUpgrade:"isNeedUpgrade",isRendering:"isRendering",isexportstatus:"isexportstatus",vedioexportdata:"vedioexportdata",exportdata:"exportdata",proTemplate:"proTemplate"},outputs:{outputFromChild:"outputFromChild"},attrs:xs,decls:2,vars:2,consts:[["class","popup_wrapper",4,"ngIf"],[1,"popup_wrapper"],[1,"modal-body"],[1,"row","no-margin"],[1,"col-sm-12","col-md-12","col-lg-12","col-xl-12","p-0"],[1,"pt-0","h-100"],[1,"d-flex"],[1,"wp-100","project-title","mb-3","text-bold"],[1,"pointer",3,"click"],["name","closeexport",1,"f-24"],[1,""],[1,"mt-2","text-center"],[1,"wp-100","render-popup-heading","p-5"],[1,"render-popup-p","p-2"],[1,"wp-100","text-center","mt-5"],["class","btn btn-primary btn-h40 text-normal","disabled","",4,"ngIf"],["id","gtm_video_export","class","btn btn-primary btn-h40 text-normal",3,"click",4,"ngIf"],["disabled","",1,"btn","btn-primary","btn-h40","text-normal"],["id","gtm_video_export",1,"btn","btn-primary","btn-h40","text-normal",3,"click"],[1,"wp-100","project-title","text-bold"],[1,"p-1"],[1,"position-relative","mt-2",3,"click","ngClass"],[4,"ngIf"],[1,"text-heading","text-semi"],[1,"grey-300","text-semi","mt-1"],[1,"wp-100","text-center","mt-4"],["type","button","class","btn btn-primary btn-full btn-block text-white btn-h40 mt-3",4,"ngIf"],["type","button","class","btn btn-primary btn-upgrade text-13 btn-h40 w-100",3,"click",4,"ngIf"],["class","btn btn-primary btn-h40 text-13 w-100",3,"click",4,"ngIf"],["name","proicon",1,"position-absolute","pro-icon-export"],["type","button",1,"btn","btn-primary","btn-full","btn-block","text-white","btn-h40","mt-3"],["role","status",1,"spinner-border"],[1,"sr-only","text-nowrap","border-0","position-absolute","overflow-hidden"],["type","button",1,"btn","btn-primary","btn-upgrade","text-13","btn-h40","w-100",3,"click"],[1,"btn","btn-primary","btn-h40","text-13","w-100",3,"click"]],template:function(t,i){1&t&&e.DNE(0,js,19,2,"div",0)(1,Os,34,19,"div",0),2&t&&(e.Y8G("ngIf",i.isRendering),e.R7$(),e.Y8G("ngIf",!i.isRendering&&!i.isexportstatus))},dependencies:[m.YU,m.bT,M.b],styles:[".popup_wrapper[_ngcontent-%COMP%]{width:300px}.project-title[_ngcontent-%COMP%]{font-size:16px;color:#272b34}.preview-canvas-wrapper[_ngcontent-%COMP%]{height:100%;width:100%;min-height:250px}.blank-preview[_ngcontent-%COMP%], .preview-section[_ngcontent-%COMP%]{height:100%;width:100%;display:flex;justify-content:center;align-items:center}.resolution-info[_ngcontent-%COMP%]{width:260px;height:71px;background:#626adf0d;border-radius:8px;border:1px solid transparent;display:flex;align-self:center;align-items:flex-start;flex-direction:column;justify-content:center;cursor:pointer;padding:0 20px}.resolution-info[_ngcontent-%COMP%]   .text-heading[_ngcontent-%COMP%]{font-size:16px;color:#272b34;line-height:22.4px}.resolution-info[_ngcontent-%COMP%]   .grey-300[_ngcontent-%COMP%]{font-size:11px;color:#606576;line-height:13.39px}.resolution-info[_ngcontent-%COMP%]:hover{background:#626adf1a;border:1px solid transparent}.resolution-info[_ngcontent-%COMP%]:hover   .text-heading[_ngcontent-%COMP%]{font-size:16px;color:#272b34;font-weight:600}.active-res-info[_ngcontent-%COMP%]{width:260px;height:71px;border-radius:8px;display:flex;align-self:center;align-items:flex-start;flex-direction:column;justify-content:center;cursor:pointer;padding:0 20px;background:#626adf1a;border:1px solid #626ADF}.active-res-info[_ngcontent-%COMP%]   .text-heading[_ngcontent-%COMP%]{font-size:16px;color:#626adf;line-height:22.4px}.active-res-info[_ngcontent-%COMP%]   .grey-300[_ngcontent-%COMP%]{font-size:11px;color:#606576;line-height:13.39px}.btn-small[_ngcontent-%COMP%]{width:40px;height:40px;padding:0;border-radius:8px;line-height:0}.render-popup-heading[_ngcontent-%COMP%]{font-size:24px;font-weight:600;color:#4a4f5e;line-height:32.68px}.render-popup-p[_ngcontent-%COMP%]{font-size:16px;font-weight:400;color:#4a4f5e;line-height:21.79px}.complete-bg[_ngcontent-%COMP%]{background:#626adf0d;height:48px;border-radius:10px}.error-bg[_ngcontent-%COMP%]{background:#fcc;height:48px;border-radius:10px}.bg-error[_ngcontent-%COMP%]{background:#f25555!important}.pro-icon-export[_ngcontent-%COMP%]{top:1px;right:3px}"]}),r})();var Vs=d(61275),Rs=d(23021),Gs=d(49449),Bs=d(41300),Ds=d(68887),Ns=d(33674);const As=["maskDiv"],Us=["inputRef"],Fs=o=>[o],Xs=o=>({"d-none":o}),$s=o=>({"no-credit-item":o}),zs=o=>({"text-eclipse":o}),Ys=o=>({"text-danger":o});function Ls(o,r){1&o&&(e.j41(0,"button",33),e.EFF(1,"My Projects"),e.k0s())}function Ws(o,r){if(1&o&&(e.j41(0,"span",37),e.EFF(1),e.k0s()),2&o){const n=e.XpG(2);e.R7$(),e.JRh(n.user.remainingCoins)}}function Hs(o,r){1&o&&(e.j41(0,"span",37),e.EFF(1,"00"),e.k0s())}function Zs(o,r){if(1&o){const n=e.RV6();e.j41(0,"div",34),e.bIt("click",function(){e.eBV(n);const i=e.XpG();return e.Njj(i.getCredits())}),e.nrm(1,"img",35),e.DNE(2,Ws,2,1,"span",36)(3,Hs,2,0,"span",36),e.k0s()}if(2&o){const n=e.XpG();e.Y8G("ngClass",e.eq3(3,$s,!n.user.remainingCoins)),e.R7$(2),e.Y8G("ngIf",n.user.remainingCoins>0),e.R7$(),e.Y8G("ngIf",!n.user.remainingCoins)}}function Ks(o,r){if(1&o){const n=e.RV6();e.j41(0,"div",38),e.bIt("click",function(){e.eBV(n);const i=e.XpG();return e.Njj(i.upgradePlan())}),e.nrm(1,"pi",39),e.EFF(2,"\xa0 Try Lightx Pro "),e.k0s()}}function Js(o,r){if(1&o){const n=e.RV6();e.j41(0,"div",38),e.bIt("click",function(){e.eBV(n);const i=e.XpG();return e.Njj(i.upgradePlan())}),e.nrm(1,"pi",39),e.EFF(2,"\xa0 Try Lightx Pro "),e.k0s()}}function Qs(o,r){if(1&o){const n=e.RV6();e.j41(0,"input",43,3),e.mxI("ngModelChange",function(i){e.eBV(n);const s=e.XpG(2);return e.DH7(s.projectName,i)||(s.projectName=i),e.Njj(i)}),e.bIt("focusout",function(){e.eBV(n);const i=e.XpG(2);return e.Njj(i.renameProjectName())})("focus",function(){e.eBV(n);const i=e.XpG(2);return e.Njj(i.inFocus())})("input",function(){e.eBV(n);const i=e.XpG(2);return e.Njj(i.onInput())}),e.k0s()}if(2&o){const n=e.XpG(2);
1e.xc7("width",n.inputWidth,"px"),e.R50("ngModel",n.projectName),e.Y8G("ngClass",e.eq3(4,zs,n.inputWidth>200))}}function qs(o,r){if(1&o&&(e.j41(0,"div",40),e.DNE(1,Qs,2,6,"input",41),e.j41(2,"div",42,2),e.EFF(4),e.k0s()()),2&o){const n=e.XpG();e.xc7("width",n.inputWidth,"px"),e.R7$(),e.Y8G("ngIf",n.user),e.R7$(3),e.JRh(n.projectName)}}function er(o,r){if(1&o){const n=e.RV6();e.j41(0,"ei",48),e.bIt("click",function(){e.eBV(n);const i=e.XpG(3);return e.Njj(i.save())}),e.k0s()}if(2&o){const n=e.XpG(3);e.Y8G("ngClass",e.eq3(1,Ys,!n.sceneController.isSaved()))}}function tr(o,r){if(1&o&&(e.j41(0,"button",46),e.DNE(1,er,1,3,"ei",47),e.k0s()),2&o){const n=e.XpG(2);e.R7$(),e.Y8G("ngIf",n.user)}}function ir(o,r){if(1&o&&(e.j41(0,"div",44),e.DNE(1,tr,2,1,"button",45),e.k0s()),2&o){const n=e.XpG();e.R7$(),e.Y8G("ngIf",!n.isTyping)}}function nr(o,r){if(1&o){const n=e.RV6();e.j41(0,"button",49),e.bIt("click",function(){e.eBV(n);const i=e.XpG();return e.Njj(i.loginToSave())}),e.EFF(1,"Login to Save"),e.k0s()}}function or(o,r){if(1&o){const n=e.RV6();e.j41(0,"button",50),e.bIt("click",function(){e.eBV(n);const i=e.XpG();return e.Njj(i.export())}),e.nrm(1,"pi",51),e.EFF(2,"Export "),e.k0s()}}function sr(o,r){if(1&o){const n=e.RV6();e.j41(0,"button",52),e.bIt("click",function(){e.eBV(n);const i=e.XpG();return e.Njj(i.exportRender())}),e.nrm(1,"pi",53),e.EFF(2,"Rendering... "),e.k0s()}}function rr(o,r){if(1&o){const n=e.RV6();e.j41(0,"div",54)(1,"div",55)(2,"div",56),e.EFF(3," Video export complete "),e.k0s(),e.j41(4,"div",57),e.bIt("click",function(){e.eBV(n);const i=e.XpG();return e.Njj(i.toggleMenubarclose())}),e.nrm(5,"pi",58),e.k0s()(),e.j41(6,"div",59)(7,"div",60),e.EFF(8),e.k0s(),e.j41(9,"div",61)(10,"button",62)(11,"pi",63),e.bIt("click",function(){e.eBV(n);const i=e.XpG();return e.Njj(i.RenderingExport())}),e.k0s()()()()()}if(2&o){const n=e.XpG();e.R7$(8),e.SpI(" ",n.imagename," ")}}function ar(o,r){if(1&o){const n=e.RV6();e.j41(0,"div",54)(1,"div",55)(2,"div",56),e.EFF(3," Error while exporting "),e.k0s(),e.j41(4,"div",57),e.bIt("click",function(){e.eBV(n);const i=e.XpG();return e.Njj(i.toggleMenubarclose())}),e.nrm(5,"pi",58),e.k0s()(),e.j41(6,"div",64)(7,"div",60),e.EFF(8),e.k0s(),e.j41(9,"div",61)(10,"button",65),e.nrm(11,"pi",66),e.k0s()()()()}if(2&o){const n=e.XpG();e.R7$(8),e.SpI(" ",n.imagename," ")}}let lr=(()=>{var o;class r{constructor(t,i,s,a,l,c,p,u,g,h,b,z,Y,ke,Te,je){this.document=t,this.route=i,this.sceneController=s,this.toastService=a,this.modalService=l,this.authService=c,this.subsService=p,this.dialogService=u,this.projectSyncService=g,this.projectSaveService=h,this.exportService=b,this.canvasZoomService=z,this.canvasStateService=Y,this.loginService=ke,this.renderer=Te,this.aiService=je,this.ntfInProgress=!1,this.markAsRead=new e.bkB,this.isexportbtn=!1,this.projectName="",this.projectId="",this.actionIcon="editdone",this.maxWidth=200,this.inputWidth=75,this.isTyping=!1,this.isNeedUpgrade=!1,this.isexportstatus=!1,this.supportedExt="webm",this.imagename="",this.istost=!1,this.webmSupport=!1,this.jobId="",this.homeURL="/",this.user=this.authService.currentUser(),this.setHomeUrl(),this.loggedInObserver=this.authService.loggedIn.subscribe(Pe=>{this.user=this.authService.currentUser(),this.setHomeUrl()}),this.usrPropChangedObserver=this.authService.usrPropChanged.subscribe(Pe=>{this.user=this.authService.currentUser(),this.setHomeUrl()})}setHomeUrl(){this.homeURL=this.user?k.b.AFTER_LOGIN_REDIRATION_URI:"/"}setimagename(){this.imagename=this.sceneController.design.name?this.sceneController.design.name+"."+this.supportedExt:k.b.label.blankProjectName+"."+this.supportedExt}preview(){const t=this.modalService.open(Ko,{centered:!0,size:"preview",backdropClass:"bg-dark-blur"});t.componentInstance.sceneController=this.sceneController,t.result.then(i=>{},i=>{})}saveProject(t,i){this.projectSaveService.saveProject(this.user,s=>{t&&t()},this.sceneController,i)}save(){this.saveProject(()=>{})}logout(){}ngOnDestroy(){this.loggedInObserver&&this.loggedInObserver.unsubscribe(),this.onExportApiResponse.unsubscribe(),this.myval&&this.myval.unsubscribe(),this.usrPropChangedObserver&&this.usrPropChangedObserver.unsubscribe()}
1ngOnInit(){MediaRecorder.isTypeSupported("video/webm")?(this.supportedExt="webm",this.webmSupport=!0):MediaRecorder.isTypeSupported("video/mp4;codecs:h264")&&(this.supportedExt="mp4",this.webmSupport=!1),this.onExportApiResponse=this.exportService.onExportApiResponse.subscribe(s=>{if(s&&s.exportCached)this.exportdata=this.sceneController.getExportedVideoUrl(s.resolution),this.isexportstatus=!0,this.toggleMenubar();else if(s&&s.invokeCreateVideo){let a=s.jobId;this.isexportbtn=!0;let l=0;this.myval=(0,Ze.Y)(5e3).subscribe(()=>{this.exportService.getUploadedVideoStatusExport(a,c=>{l>250?(this.myval.unsubscribe(),this.myval=null):l++,c&&c.body.jobId&&"active"==c.body.status&&(this.exportdata=c.body,this.sceneController.setExportedVideoUrl(s.resolution,this.exportdata),this.isexportstatus=!0,this.toggleMenubar(),this.myval.unsubscribe(),this.myval=null)},c=>{console.log("error in getUploadedVideoStatusExport")})})}else this.isexportbtn=!1}),this.setlocastorage()}setlocastorage(){let t=JSON.parse(localStorage.getItem("safariexportVideo"));t&&this.projectId==t.assetId&&(this.isexportbtn=!0,this.myval=(0,Ze.Y)(5e3).subscribe(()=>{this.exportService.getUploadedVideoStatusExport(t.jobId,i=>{i&&i.body.jobId&&"active"==i.body.status&&(this.exportdata=i.body,this.sceneController.setExportedVideoUrl(1,this.exportdata),this.isexportstatus=!0,this.toggleMenubar(),this.myval.unsubscribe(),this.myval=null,localStorage.removeItem("safariexportVideo"))},i=>{console.log("error in getUploadedVideoStatusExport"),localStorage.removeItem("safariexportVideo")})}))}loadVideo(t){return new Promise((i,s)=>{const a=new XMLHttpRequest;a.open("GET",t,!0),a.responseType="blob",a.onload=function(){200===this.status&&i(this.response)},a.addEventListener("progress",c=>{c&&c.lengthComputable&&this.sceneController&&-1!=this.sceneController.inProgressCount&&(this.sceneController.inProgressCount=Math.ceil(c.loaded/c.total*100))},!1),a.onerror=c=>{s()},a.onabort=c=>{s(),console.log(c)},a.send()})}loginToSave(){this.loginService.openLoginDialog(t=>{this.user=this.authService.currentUser(),this.checkUserSubscription(this.user),this.user&&this.save()})}RenderingExport(){this.loadVideo(this.exportdata.videoUrl).then(t=>{(0,Ce.saveAs)(t,this.sceneController.design.name?this.sceneController.design.name+".mp4":k.b.label.blankProjectName+".mp4"),this.toggleMenubarclose()})}exportRender(){const t=this.modalService.open(Qe,{centered:!1,size:"sm",backdrop:!0,windowClass:"export-project-dialog",backdropClass:"show-header-backdrop"});t.componentInstance.isRendering=this.isexportbtn,t.componentInstance.exportdata=this.exportdata,t.componentInstance.sceneController=this.sceneController,t.result.then(i=>{}).catch(()=>{})}export(){this.authService.checkLoginLocal()?this.__export():this.loginService.openLoginDialog(i=>{this.user=this.authService.currentUser(),this.checkUserSubscription(this.user),this.user&&this.__export()})}__export(){const t=this.browserSupport();this.authService.checkSubscription(()=>{if(this.user=this.authService.currentUser(),this.user.subscribed)"yes"===t?this.openExportSettings():this.openExportNotSupport(t);else{let i=this.checkPremiumItems();i.length>0?this.openExportDialog(i):"yes"===t?this.openExportSettings():this.openExportNotSupport(t)}})}openExportSettings(){this.isexportstatus=!1,this.isexportbtn=!1,this.exportdata="",this.isNeedUpgrade=!(!this.sceneController.design||!this.sceneController.design.properties||!this.sceneController.design.properties.pro&&!this.sceneController.design.properties.hasProElements||this.user.subscribed),this.modalRef=this.modalService.open(Qe,{centered:!1,size:"sm",backdrop:!0,windowClass:"export-project-dialog",backdropClass:"show-header-backdrop"}),this.modalRef.componentInstance.isNeedUpgrade=this.isNeedUpgrade,this.modalRef.componentInstance.proTemplate=this.sceneController.design.properties.pro,this.modalRef.componentInstance.sceneController=this.sceneController,this.modalRef.result.then(t=>{if("upgrade"===t){this.toastService.removeAll();let i="",s=location.pathname;s.includes("/dev/")&&(s=s.replace("/dev/","/")),s.includes("/qa/")&&(s=s.replace("/qa/","/")),i=s,this.route.
1snapshot.queryParamMap.keys.forEach((a,l)=>{i=i+(l?"&":"?")+a+"="+this.route.snapshot.queryParamMap.get(a)}),this.subsService.upgradePlanCheckout(i,"","Upgrade_"+this.activeTool,a=>{this.user=this.authService.currentUser(),this.checkUserSubscription(this.user),"close"==a&&this.markSaved()})}else this.webmSupport||(this.isexportbtn=!0)}).catch(()=>{})}toggleMenubarclose(){this.document.getElementById("export-template-content").classList.remove("show")}toggleMenubar(){const t=this.document.getElementById("export-template-content");this.setimagename(),t.classList.toggle("show")}openExportNotSupport(t){this.dialogService.open({okButtonText:"Okay",title:"Browser support issue",message:`This version is not have support for making video, please switch to at least version: ${t}`},()=>{},()=>{})}openExportDialog(t){const i=this.modalService.open(Rs.u,{size:"sm",windowClass:"export-project-dialog",backdropClass:"show-header-backdrop"});i.componentInstance.proItems=t,i.result.then(s=>{if("ok"===s){this.toastService.removeAll();let a="",l=location.pathname;l.includes("/dev/")&&(l=l.replace("/dev/","/")),l.includes("/qa/")&&(l=l.replace("/qa/","/")),a=l,this.route.snapshot.queryParamMap.keys.forEach((c,p)=>{a=a+(p?"&":"?")+c+"="+this.route.snapshot.queryParamMap.get(c)}),this.subsService.upgradePlanCheckout(a,"","Upgrade_Export_"+this.activeTool,c=>{this.user=this.authService.currentUser(),this.checkUserSubscription(this.user),"close"==c&&this.markSaved()})}}).catch(()=>{})}checkPremiumItems(){let t=[],s=this.sceneController.getUpdatedProjectJson().sceneItems;for(let a=0;a<s.length;a++){let l=s[a];for(let c=0;c<l.designItems.length;c++){let p=l.designItems[c];p.isPro&&t.push({type:this.getItemType(p),categoryName:p.categoryName,imgUrl:this.getfirstOrDefaultItemUrl(p)})}l.bgImageObj&&l.bgImageObj.ispro&&t.push({type:"Background",categoryName:null,imgUrl:l.bgImageObj.imgName})}return t}getItemType(t){if(!t.canvas)return t.lottie?"Animated":"";switch(t.canvas.itemType){case D.Q.STICKERS:return"Sticker";case D.Q.ILLUSTRATIONS:return"Illustration";case D.Q.TEXT:return"Text";case D.Q.SHAPE:return"Shape"}}getfirstOrDefaultItemUrl(t){if(t.canvas){if(t.canvas.assetArray.length>0)return t.canvas.assetArray[0];if(t.previewThumb)return t.previewThumb}else if(t.lottie)return t.lottie.lottieJSONUrl;return null}upgradePlan(){this.user?this.subsService.upgradePlanCheckout("","","Try_LightX_Pro_"+this.activeTool,t=>{this.user=this.authService.currentUser(),this.checkUserSubscription(this.user),"close"==t&&this.markSaved()}):this.loginService.openLoginDialog(t=>{this.user=this.authService.currentUser(),this.checkUserSubscription(this.user),this.user&&!this.user.subscribed&&this.subsService.upgradePlanCheckout("","","Try_LightX_Pro_"+this.activeTool,i=>{this.user=this.authService.currentUser(),this.checkUserSubscription(this.user),"close"==i&&this.markSaved()})})}browserSupport(){if(typeof window.MediaRecorder<"u")return"yes";{let t="";const i=(0,ye.o0)();if(i)return i.name&&(t=i.name.includes("chrome")?"47":i.name.includes("edge")?"79":i.name.includes("firefox")?"58":i.name.includes("opera")?"36":i.name.includes("safari")?"14":null),t}}renameProjectName(){if(this.isTyping=!1,!this.projectName.trim()||this.sceneController.design.name===this.projectName.trim()||this.sceneController.design.assetId)if(this.projectName.trim()&&this.sceneController.design.name!==this.projectName.trim()){let t={assetId:this.sceneController.design.assetId,name:this.projectName.trim()};this.projectSyncService.updateDesign(t,i=>{this.toastService.showSuccess(k.b.message.projectRenameSuccess),this.sceneController.design.name=this.projectName.trim()},i=>{this.toastService.showError(i.description||i.message)})}else this.sceneController.design.name!==this.projectName.trim()&&this.toastService.showSuccess(k.b.message.invali
1dProjectName);else this.sceneController.design.name=this.projectName.trim()}resize(){const t=this.modalService.open(Vs.n,{size:"sm",backdrop:!0,windowClass:"resize-dialog",backdropClass:"transparent-backdrop",container:"#editor-view"});t.componentInstance.canvasZoomService=this.canvasZoomService,t.componentInstance.canvasStateService=this.canvasStateService,t.componentInstance.sceneController=this.sceneController,t.componentInstance.mode="blank",t.componentInstance.isNew=!0,t.componentInstance.productImageId=null,t.result.then(i=>{}).catch(i=>{})}inFocus(){this.actionIcon="editinprogress",this.isTyping=!0}checkUserSubscription(t){t&&t.subscribed&&this.sceneController.setUserSubscribed()}markSaved(){for(const t of this.sceneController.scenes)t.dirty=!1}handleKeyboardEventDown(t){if(!(this.sceneController&&this.sceneController.getSelectedScene().selectedDesignItem&&this.sceneController.getSelectedScene().selectedDesignItem.isEditing()))if((t.metaKey||t.ctrlKey)&&"e"===t.key)this.modalRef&&this.modalRef.dismiss(),this.export(),t.preventDefault();else if(this.sceneController.getSelectedScene().selectedDesignItem&&"BODY"!==(t.target||t.srcElement).tagName)return}onInput(){this.isTyping=!0,this.maskDiv&&(this.renderer.setProperty(this.maskDiv.nativeElement,"textContent",this.projectName),this.inputWidth=Math.max(22,this.maskDiv.nativeElement.offsetWidth),this.inputWidth=this.inputWidth+24)}getCredits(){this.aiService.openAICreditPopup()}}return(o=r).\u0275fac=function(t){return new(t||o)(e.rXU(m.qQ),e.rXU(C.nX),e.rXU(I.Z),e.rXU(oe.f),e.rXU(_.Bq),e.rXU(R.u),e.rXU(Gs.n),e.rXU(Bs.g),e.rXU(Ds.A),e.rXU(Oe._),e.rXU(A._),e.rXU(G.n),e.rXU(w.X),e.rXU(Ve.H),e.rXU(e.sFG),e.rXU(Ns.U))},o.\u0275cmp=e.VBU({type:o,selectors:[["editor-header"]],viewQuery:function(t,i){if(1&t&&(e.GBs(As,5),e.GBs(Us,5)),2&t){let s;e.mGM(s=e.lsd())&&(i.maskDiv=s.first),e.mGM(s=e.lsd())&&(i.inputElement=s.first)}},hostBindings:function(t,i){1&t&&e.bIt("keydown",function(a){return i.handleKeyboardEventDown(a)},!1,e.tSv)},inputs:{alerts:"alerts",alertCount:"alertCount",projectName:"projectName",projectId:"projectId",activeTool:"activeTool"},outputs:{markAsRead:"markAsRead"},decls:37,vars:17,consts:[["tooltip1","ngbTooltip"],["tooltip","ngbTooltip"],["maskDiv",""],["inputRef",""],[1,"header","navbar-fixed-top"],["role","banner",1,"editor-header","d-flex","align-items-center","justify-content-between","w-100","position-relative","bg-white","pl-10","pr-10",2,"height","56px"],[1,"navbar-brand-box","text-start","p-0","align-items-center",2,"display","inline-flex"],[1,"logo","link","lh-normal",3,"routerLink"],[1,"logo-sm"],["src","https://static.lightxeditor.com/assets/images/new-logo-editor.png","alt","Lightxeditor Logo","width","40px","height","40px"],[1,"logo-lg"],["class","btn btn-grey text-13 btn-h40 ml-10 border-0 text-primary ps-3 pe-3","color","primary","routerLink","/my/projects","placement","bottom",4,"ngIf"],[1,"ms-2","me-2",3,"ngClass"],["name","sapraterline"],["class","credit-btn-outer d-flex align-items-center justify-content-center","placement","bottom","ngbTooltip","AI Credits","tooltipClass","tooltip-custom-all","container","body",3,"ngClass","click",4,"ngIf"],["class","btn border-btn-gradiant text-normal d-flex align-items-center  border-0 text-semi ms-2 h-40",3,"click",4,"ngIf"],[1,"projectTitle","text-semi","d-flex","align-items-center","justify-content-center"],["class","projectfiled me-1 d-flex align-items-center",3,"width",4,"ngIf"],["class","hw-40 d-flex align-items-center justify-content-center",4,"ngIf"],["class","btn-all btn-outline-primary text-13 btn-h40","color","primary","placement","bottom",3,"click",4,"ngIf"],[1,"d-flex","pe-0"],["color","primary","placement","bottom","ngbTooltip","Preview","tooltipClass","tooltip-custom-all","triggers","manual",1,"btn","btn-grey","hw-40","border-0","text-primary","p-0","me-2",3,"click","mouseenter","mouseleave"],["name","previewactive",1,"icon","hw-24"],["color","primary","placement","bottom","ngbTooltip","Re
1size","tooltipClass","tooltip-custom-all","triggers","manual",1,"btn","btn-grey","hw-40","border-0","text-primary","p-0","me-2",3,"click","mouseenter","mouseleave"],["name","resizeactive",1,"icon","f-24"],["class","btn btn-primary btn-h40 ps-3 pe-3 d-flex align-items-center text-13 text-semi","color","primary",3,"click",4,"ngIf"],["class","btn btn-primary btn-download btn-auto text-normal ml-8","color","primary",3,"click",4,"ngIf"],["id","export-template-content",1,"navbar-expand-lg","topnav-menu","active","p-0","collapse","navbar-collapse","active","bg-white","position-absolute","complete-download","mt-2"],[1,"nav-small-device"],[1,"align-items-center","p-3","pt-0"],[1,"row","g-0"],[1,"wp-100","mx-auto","mb-2"],["class","pt-0 h-100",4,"ngIf"],["color","primary","routerLink","/my/projects","placement","bottom",1,"btn","btn-grey","text-13","btn-h40","ml-10","border-0","text-primary","ps-3","pe-3"],["placement","bottom","ngbTooltip","AI Credits","tooltipClass","tooltip-custom-all","container","body",1,"credit-btn-outer","d-flex","align-items-center","justify-content-center",3,"click","ngClass"],["src","https://static.lightxeditor.com/assets/images/coin-lottie-s-anim.gif","alt","Credit Coin","width","24px","height","24px",1,"me-1"],["class","text-semi text-lg mr-6",4,"ngIf"],[1,"text-semi","text-lg","mr-6"],[1,"btn","border-btn-gradiant","text-normal","d-flex","align-items-center","border-0","text-semi","ms-2","h-40",3,"click"],["name","prousernew",1,"f-24"],[1,"projectfiled","me-1","d-flex","align-items-center"],["type","text","maxlength","40",3,"ngModel","width","ngClass","ngModelChange","focusout","focus","input",4,"ngIf"],[1,"mask"],["type","text","maxlength","40",3,"ngModelChange","focusout","focus","input","ngModel","ngClass"],[1,"hw-40","d-flex","align-items-center","justify-content-center"],["class","btn-all btn-bottom","placement","bottom","ngbTooltip","Save to Cloud","tooltipClass","tooltip-custom-all","container","body",4,"ngIf"],["placement","bottom","ngbTooltip","Save to Cloud","tooltipClass","tooltip-custom-all","container","body",1,"btn-all","btn-bottom"],["name","cloudsave","class","text-success","style","cursor: pointer;",3,"ngClass","click",4,"ngIf"],["name","cloudsave",1,"text-success",2,"cursor","pointer",3,"click","ngClass"],["color","primary","placement","bottom",1,"btn-all","btn-outline-primary","text-13","btn-h40",3,"click"],["color","primary",1,"btn","btn-primary","btn-h40","ps-3","pe-3","d-flex","align-items-center","text-13","text-semi",3,"click"],["name","export",1,"f-24","me-2"],["color","primary",1,"btn","btn-primary","btn-download","btn-auto","text-normal","ml-8",3,"click"],["name","rendering",1,"icon","f-24","me-2","text-white"],[1,"pt-0","h-100"],[1,"d-flex","align-items-center"],[1,"wp-100","project-title","text-bold"],[1,"pointer",3,"click"],["name","closeexport",1,"f-24"],[1,"d-flex","align-items-center","complete-bg","mt-3"],[1,"wp-100","ms-4"],[1,""],[1,"btn","btn-primary","btn-small","me-1","border-0"],["name","downloadwhite",1,"icon",3,"click"],[1,"d-flex","align-items-center","error-bg","mt-3"],[1,"btn","btn-primary","btn-small","bg-error","me-1","border-0"],["name","replacedownload",1,"icon","f-24"]],template:function(t,i){if(1&t){const s=e.RV6();e.j41(0,"nav",4)(1,"div",5)(2,"div",6)(3,"a",7)(4,"span",8),e.nrm(5,"img",9),e.k0s(),e.j41(6,"span",10),e.nrm(7,"img",9),e.k0s()(),e.DNE(8,Ls,2,0,"button",11),e.j41(9,"div",12),e.nrm(10,"pi",13),e.k0s(),e.DNE(11,Zs,4,5,"div",14)(12,Ks,3,0,"div",15)(13,Js,3,0,"div",15),e.k0s(),e.j41(14,"div",16),e.DNE(15,qs,5,4,"div",17)(16,ir,2,1,"div",18)(17,nr,2,0,"button",19),e.k0s(),e.j41(18,"div",20)(19,"div")(20,"button",21,0),e.bIt("click",function(){return e.eBV(s),e.Njj(i.preview())})("mouseenter",function(){e.eBV(s);const l=e.sdS(21);return e.Njj(l.open())})("mouseleave",function(){e.eBV(s);const l=e.sdS(21);return e.Njj(l.close())}),e.nrm(22,"ei",22),e.k0s()(),e.j41(23,"div")(24,"button",23,1),e.bIt("click",function(){return e.eBV(s),e.Njj(i.resize())})("mouseenter",function(){e.eBV(s);const l=e.sdS(25);return e.Njj(l.open())})("mouseleave",function(){e.eBV(s);const l=e.sdS(25);return e.Njj(l.close())}),e.nrm(26,"ei",24),e.k0s()(),e.j41(27,"div"),e.DNE(28,or,3,0,"button",25)(29,sr,3,0,"button",26),e.k0s()()()(),e.j41(30,"nav",27)(31,"div",28)(32,"div",29)(33,"div",30)(34,"div",31),e.DNE(35,rr,12,1,"div",32)(36,ar,12,1,"div",32),e.k0s()()()()()}2&t&&(e.R7$(3),e.Y8G("routerLink",e.eq3(13,Fs,i.homeURL)),e.R7$(5),e.Y8G("ngIf",i.user),e.R7$(),e.Y8G("ngClass",e.eq3(15,Xs,!i.user)),e.R7$(2),e.Y8G("ngIf",i.user),e.R7$(),e.Y8G("ngIf",!i.user),e.R7$(),e.Y8G("ngIf",i.user&&!i.user.subscribed),e.R7$(2),e.Y8G("ngIf",i.user),e.R7$(),e.Y8G("ngIf",i.user),e.R7$(),e.Y8G("ngIf",!i.user),e.R7$(11),e.Y8G("ngIf",!i.isexportbtn||i.isexportstatus),e.R7$(),e.Y8G("ngIf",i.isexportbtn&&!i.isexportstatus&&!i.webmSupport),e.R7$(6),e.Y8G("ngIf",i.exportdata),e.R7$(),e.Y8G("ngIf",!i.exportdata))},dependencies:[m.YU,m.bT,_.md,S.me,S.BC,S.tU,S.vS,C.Wk,M.b,K.KK],styles:[".project-heading[_ngcontent-%COMP%]{font-size:1.375rem;color:#111113}.btn-edit-icon[_ngcontent-%COMP%]{color:#959aa7;
1cursor:pointer}.btn-edit-icon[_ngcontent-%COMP%]:hover{color:#475ae7}.editMenuLinks[_ngcontent-%COMP%]{color:#626adf;display:inline-flex;cursor:pointer;align-items:center;white-space:nowrap}.projectTitle[_ngcontent-%COMP%]{margin:auto;position:relative;min-width:240px}.projectTitle[_ngcontent-%COMP%]   input[_ngcontent-%COMP%]{height:40px;border:1px solid transparent;background:none;text-align:center;border-radius:12px;padding:12px;font-size:13px;outline:none;font-weight:400;color:#606576;max-width:200px;min-width:22px;-webkit-appearance:none;appearance:none;background:transparent;box-sizing:border-box;font-variant-ligatures:none;left:auto;margin:0;outline:0 none;position:absolute;top:0;width:100%}.projectTitle[_ngcontent-%COMP%]   input[_ngcontent-%COMP%]:focus, .projectTitle[_ngcontent-%COMP%]   input[_ngcontent-%COMP%]:hover{background:#626adf0d;color:#272b34}.projectTitle[_ngcontent-%COMP%]   input[_ngcontent-%COMP%]:hover{border:1px solid transparent}.projectTitle[_ngcontent-%COMP%]   input[_ngcontent-%COMP%]:focus{border:1px solid #626ADF}.projectTitle[_ngcontent-%COMP%]   input[_ngcontent-%COMP%]:focus:hover{background:#626adf1a;color:#272b34}.header[_ngcontent-%COMP%]{background:linear-gradient(90deg,#eea8ff -4%,#83e1ff) bottom/100% 1px no-repeat;height:57px}.header[_ngcontent-%COMP%]   .btnHeight[_ngcontent-%COMP%]{height:40px;align-self:center;white-space:nowrap}.btn-download[_ngcontent-%COMP%]{min-width:149px;font-size:14px!important;display:flex;align-items:center}.btn-small[_ngcontent-%COMP%]{width:40px;height:40px;padding:0;border-radius:8px;line-height:0}.complete-bg[_ngcontent-%COMP%]{background:#626adf0d;height:48px;border-radius:10px}.error-bg[_ngcontent-%COMP%]{background:#fcc;height:48px;border-radius:10px}.bg-error[_ngcontent-%COMP%]{background:#f25555!important}.complete-download[_ngcontent-%COMP%]{z-index:999;width:359px;right:20px;box-shadow:0 -2px 12px #00000026;border-radius:16px}.projectfiled[_ngcontent-%COMP%]{position:relative;max-width:200px}.projectfiled[_ngcontent-%COMP%]   .mask[_ngcontent-%COMP%]{opacity:0;pointer-events:none;position:relative;white-space:pre;-webkit-appearance:none;appearance:none;background:transparent;box-sizing:border-box;font-variant-ligatures:none;left:0;margin:0;outline:0 none;text-overflow:ellipsis;top:0;height:40px;max-width:200px}.btn-bottom[_ngcontent-%COMP%]{width:40px;height:40px;padding:0rem;border-radius:12px;background:transparent}.btn-bottom[_ngcontent-%COMP%]:hover{background:#626adf0d}.btn-bottom[_ngcontent-%COMP%]:focus-visible{outline:none}.text-eclipse[_ngcontent-%COMP%]{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.credit-btn-outer[_ngcontent-%COMP%]{height:40px;padding:0 4px 0 8px;border-radius:12px;background:linear-gradient(90deg,#fc5cff1a,#2520f61a);cursor:pointer}.credit-btn-outer[_ngcontent-%COMP%]   span[_ngcontent-%COMP%]{font-size:16px;color:#626adf;line-height:24px}.credit-btn-outer[_ngcontent-%COMP%]   button[_ngcontent-%COMP%]:before{border-radius:8px!important}"]}),r})();const qe=o=>({"btn-bottom-active":o});let cr=(()=>{var o;class r{constructor(t){this.zoomService=t,this.files=[],this.viewZoom="Fit",this.changeZoom=new e.bkB,this.isButtonFocusedzoomOut=!1,this.isButtonFocusedzoomIn=!1,this.baseSizeOptionList=[{val:3,name:"300%"},{val:2,name:"200%"},{val:1,name:"100%"},{val:.75,name:"75%"},{val:.5,name:"50%"},{val:.25,name:"25%"},{val:.1,name:"10%"},{val:0,name:"Fit"},{val:-1,name:"Fill"}],this.baseZoomVals=[10,20,25,35,50,65,75,90,100,125,150,175,200,250,300],this.sizeOptionList=[...this.baseSizeOptionList],this.zoomVals=[...this.baseZoomVals],this.maxZoomPercent=300,this.zoomVal=this.zoomService.viewZoom}ngOnInit(){this.zoomService.zoomDropdownReset.subscribe(t=>{t&&(this.recomputeZoomOptions(),this.resetZoomSelect())}),this.zoomValueSub=this.zoomService.zoomValue$.subscribe(()=>{this.selectZoomVal=-2}),this.maxScaleSub=this.zoomService.maxScaleChanged.subscribe(()=>{this.recomputeZoomOptions()}),this.recomputeZoomOptions()}ngOnDestroy(){this.zoomValueSub?.unsubscribe(),this.maxScaleSub?.unsubscribe()}onZoomSizeChange(){this.changeZoom.emit(this.selectZoomVal)}zoomIn(){this.selectZoomVal=-2,this.zoomVal=this.zoomService.viewZoom;let t=this.getNextZoomVal(this.zoomVal);this.changeZoom.emit(t/100)}zoomOut(){this.selectZoomVal=-2,this.zoomVal=this.zoomService.viewZoom;let t=this.getPrevZoomVal(this.zoomVal);this.changeZoom.emit(t/100)}getPrevZoomVal(t){let i;for(let s=this.zoomVals.length;s>-1;s--)if(t>this.zoomVals[s]){i=this.zoomVals[s];break}
1return i||(i=this.zoomVals[0]),i}getNextZoomVal(t){let i;for(let s=0;s<this.zoomVals.length;s++)if(t<this.zoomVals[s]){i=this.zoomVals[s];break}return i||(i=this.zoomVals[this.zoomVals.length]),i}mouseupzoomOut(){setTimeout(()=>{this.isButtonFocusedzoomOut=!1})}mouseupzoomIn(){setTimeout(()=>{this.isButtonFocusedzoomIn=!1})}resetZoomSelect(){this.selectZoomVal=0}recomputeZoomOptions(){const t=this.zoomService&&this.zoomService.maxScale?this.zoomService.maxScale:3,i=Math.floor(100*t);this.maxZoomPercent=i,this.sizeOptionList=this.baseSizeOptionList.filter(s=>s.val<=0||s.val<=t+1e-6),this.zoomVals=this.baseZoomVals.filter(s=>s<=i),0===this.zoomVals.length&&(this.zoomVals=[10]),"number"==typeof this.selectZoomVal&&this.selectZoomVal>0&&100*this.selectZoomVal>i&&this.resetZoomSelect()}}return(o=r).\u0275fac=function(t){return new(t||o)(e.rXU(G.n))},o.\u0275cmp=e.VBU({type:o,selectors:[["zoom-select"]],inputs:{accept:"accept"},outputs:{changeZoom:"changeZoom"},decls:8,vars:13,consts:[[1,"zoom-ctrl"],["color","primary","placement","top","ngbTooltip","Zoom Out","tooltipClass","tooltip-custom-all","triggers","mouseenter:mouseleave",1,"btn-all","btn-bottom","mr-8",3,"click","mousedown","mouseup","disabled","ngClass"],["name","zoomoutnew",1,"f-24"],[1,"zoom-size"],["type","text","disabled","","suffix","%","mask","9999",1,"zoom-input",3,"ngModelChange","ngModel"],["bindLabel","name","bindValue","val",1,"select-menu",3,"ngModelChange","change","items","ngModel","searchable","clearable"],["color","primary","placement","top","ngbTooltip","Zoom In","tooltipClass","tooltip-custom-all","triggers","mouseenter:mouseleave",1,"btn-all","btn-bottom","ml-8",3,"click","mousedown","mouseup","disabled","ngClass"],["name","zoominnew",1,"f-24"]],template:function(t,i){1&t&&(e.j41(0,"div",0)(1,"button",1),e.bIt("click",function(){return i.zoomOut()})("mousedown",function(){return i.isButtonFocusedzoomOut=!0})("mouseup",function(){return i.mouseupzoomOut()}),e.nrm(2,"pi",2),e.k0s(),e.j41(3,"div",3)(4,"input",4),e.mxI("ngModelChange",function(a){return e.DH7(i.zoomService.viewZoom,a)||(i.zoomService.viewZoom=a),a}),e.k0s(),e.j41(5,"ng-select",5),e.mxI("ngModelChange",function(a){return e.DH7(i.selectZoomVal,a)||(i.selectZoomVal=a),a}),e.bIt("change",function(){return i.onZoomSizeChange()}),e.k0s()(),e.j41(6,"button",6),e.bIt("click",function(){return i.zoomIn()})("mousedown",function(){return i.isButtonFocusedzoomIn=!0})("mouseup",function(){return i.mouseupzoomIn()}),e.nrm(7,"pi",7),e.k0s()()),2&t&&(e.R7$(),e.Y8G("disabled",10===i.zoomService.viewZoom)("ngClass",e.eq3(9,qe,i.isButtonFocusedzoomOut)),e.R7$(3),e.R50("ngModel",i.zoomService.viewZoom),e.R7$(),e.Y8G("items",i.sizeOptionList),e.R50("ngModel",i.selectZoomVal),e.Y8G("searchable",!1)("clearable",!1),e.R7$(),e.Y8G("disabled",i.zoomService.viewZoom===i.maxZoomPercent)("ngClass",e.eq3(11,qe,i.isButtonFocusedzoomIn)))},dependencies:[m.YU,_.md,S.me,S.BC,S.vS,B.vr,N.Zr,M.b],styles:[".zoom-input[_ngcontent-%COMP%]{width:70%;position:absolute;height:80%;border:none;padding-left:15px;background:#f8f8fb;margin:3px;border-radius:4px;font-size:13px}.zoom-size[_ngcontent-%COMP%]{position:relative}.zoom-ctrl[_ngcontent-%COMP%]{display:flex}.btn-bottom[_ngcontent-%COMP%]{width:40px;height:40px;padding:0rem;border-radius:12px;background:transparent}.btn-bottom[_ngcontent-%COMP%]:hover{background:#626adf0d}.btn-bottom[_ngcontent-%COMP%]:focus-visible{outline:none}.btn-bottom-active[_ngcontent-%COMP%]{background:#626adf1a!important}.btn-bottom[_ngcontent-%COMP%]:disabled{background:transparent!important;color:#b0b3bf;opacity:.3;cursor:text}.btn-bottom[_ngcontent-%COMP%]:disabled:hover{background:transparent!important}"]}),r})();const dr=["canvasWrapper"],pr=["canvasMaskWrapper"],mr=["mainCanvas"],ur=["canvasMaskWrapperLoaded"],gr=["canvasBackground"],hr=["canvasPreview"],_r=["page"],vr=["videoheader"],fr=["scrollContent"],br=["editNavInner"],Cr=["editNavUpper"],xr=o=>({"timeline-collapse":o}),kr=o=>({"layers-on":o}),J=o=>({"pe-none":o}),et=o=>({"grey-300 pe-none":o}),Tr=(o,r)=>({"active-grid":o,"pe-none disabled":r}),W=o=>({"drawer-active":o}),jr=o=>({"ul-bottom-pd":o}),Pr=o=>({"max-height":o}),Sr=o=>({"text-primary":o}),wr=(o,r)=>({active:o,opacityactive:r}),tt=o=>({collapse:o});function yr(o,r){if(1&o){const n=e.RV6();e.j41(0,"media-drawer",96),e.bIt("progressChanged",function(i){e.eBV(n);const s=e.XpG(2);return e.Njj(s.progressChanged(i))}),e.k0s()}if(2&o){const n=e.XpG(2);e.Y8G("editorType",n.editorType)}}function Ir(o,r){1&o&&e.nrm(0,"text-drawer")}function Er(o,r){if(1&o&&e.nrm(0,"animated-drawer",97),2&o){const n=e.XpG(2);e.Y8G("activePane",n.animateActivePanel)}}function Mr(o,r){if(1&o){const n=e.RV6();e.j41(0,"music-drawer",98),e.bIt("sceneAudio",function(i){e.eBV(n);const s=e.XpG(2);return e.Njj(s.sceneAudio(i))})("sceneResized",function(i){e.eBV(n);const s=e.XpG(2);return e.Njj(s.sceneResizedAtAbsu(i))}),e.k0s()}2&o&&e.Y8G("isHistory","ture")}function Or(o,r){if(1&o){const n=e.RV6();e.j41(0,"background-drawer",99),e.bIt("executeAction",function(i){e.eBV(n);const s=e.XpG(2);return e.Njj(s.executeAction(i))})("generatedImage",function(i){e.eBV(n);const s=e.XpG(2);return e.Njj(s.generatedImage(i))}),e.k0s()}if(2&o){const n=e.XpG(2);
1e.Y8G("inBackgroundAdjustMode",n.inBackgroundAdjustMode)("createScratch",n.createScratch)}}function Vr(o,r){if(1&o){const n=e.RV6();e.j41(0,"element-drawer",100),e.mxI("activePaneChange",function(i){e.eBV(n);const s=e.XpG(2);return e.DH7(s.elementactiveSubPane,i)||(s.elementactiveSubPane=i),e.Njj(i)}),e.k0s()}if(2&o){const n=e.XpG(2);e.R50("activePane",n.elementactiveSubPane)}}function Rr(o,r){if(1&o){const n=e.RV6();e.j41(0,"background-edit-tools",101),e.bIt("executeAction",function(i){e.eBV(n);const s=e.XpG(2);return e.Njj(s.executeAction(i))}),e.k0s()}if(2&o){const n=e.XpG(2);e.Y8G("inBackgroundAdjustMode",n.inBackgroundAdjustMode)("activePane",n.activeEditSubPane)("activeObject",n.activeObject)}}function Gr(o,r){if(1&o){const n=e.RV6();e.j41(0,"video-edit-tools",102),e.bIt("executeAction",function(i){e.eBV(n);const s=e.XpG(2);return e.Njj(s.executeAction(i))})("videoEditMute",function(){e.eBV(n);const i=e.XpG(2);return e.Njj(i.toggleMute())})("sceneResized",function(i){e.eBV(n);const s=e.XpG(2);return e.Njj(s.sceneResized(i))})("videoEditScaledOrPanned",function(i){e.eBV(n);const s=e.XpG(2);return e.Njj(s.videoEditScaledOrPanned(i))}),e.k0s()}if(2&o){const n=e.XpG(2);e.Y8G("inBackgroundAdjustMode",n.inBackgroundAdjustMode)}}function Br(o,r){if(1&o&&e.nrm(0,"illustration-edit-tools",103),2&o){const n=e.XpG(2);e.Y8G("activePane",n.activeEditSubPane)("activeObject",n.activeObject)}}function Dr(o,r){if(1&o&&e.nrm(0,"sticker-edit-tools",103),2&o){const n=e.XpG(2);e.Y8G("activePane",n.activeEditSubPane)("activeObject",n.activeObject)}}function Nr(o,r){if(1&o&&e.nrm(0,"text-edit-tools",103),2&o){const n=e.XpG(2);e.Y8G("activePane",n.activeEditSubPane)("activeObject",n.activeObject)}}function Ar(o,r){if(1&o&&e.nrm(0,"remove-bg-edit-tool",104),2&o){const n=e.XpG(2);e.Y8G("activeObject",n.activeObject)}}function Ur(o,r){if(1&o&&e.nrm(0,"shape-edit-tools",103),2&o){const n=e.XpG(2);e.Y8G("activePane",n.activeEditSubPane)("activeObject",n.activeObject)}}function Fr(o,r){if(1&o&&e.nrm(0,"image-edit-tools",103),2&o){const n=e.XpG(2);e.Y8G("activePane",n.activeEditSubPane)("activeObject",n.activeObject)}}function Xr(o,r){if(1&o&&e.nrm(0,"lottie_illustration-edit-tools",103),2&o){const n=e.XpG(2);e.Y8G("activePane",n.activeEditSubPane)("activeObject",n.activeObject)}}function $r(o,r){if(1&o){const n=e.RV6();e.j41(0,"div",84),e.bIt("click",function(i){e.eBV(n);const s=e.XpG();return e.Njj(s.editToolsWrapperClick(i))}),e.j41(1,"div",85),e.DNE(2,yr,1,1,"media-drawer",86),e.k0s(),e.j41(3,"div",85),e.DNE(4,Ir,1,0,"text-drawer",87),e.k0s(),e.j41(5,"div",85),e.DNE(6,Er,1,1,"animated-drawer",88),e.k0s(),e.j41(7,"div",85),e.DNE(8,Mr,1,1,"music-drawer",89),e.k0s(),e.j41(9,"div",85),e.DNE(10,Or,1,2,"background-drawer",90),e.k0s(),e.j41(11,"div",85),e.DNE(12,Vr,1,1,"element-drawer",91),e.k0s(),e.DNE(13,Rr,1,3,"background-edit-tools",92)(14,Gr,1,1,"video-edit-tools",93)(15,Br,1,2,"illustration-edit-tools",94)(16,Dr,1,2,"sticker-edit-tools",94)(17,Nr,1,2,"text-edit-tools",94)(18,Ar,1,1,"remove-bg-edit-tool",95)(19,Ur,1,2,"shape-edit-tools",94)(20,Fr,1,2,"image-edit-tools",94)(21,Xr,1,2,"lottie_illustration-edit-tools",94),e.k0s()}if(2&o){const n=e.XpG();e.Y8G("ngSwitch",n.activeToolPanel),e.R7$(),e.HbH(n.drawerClassArray.media),e.Y8G("ngClass",e.eq3(34,W,"media"==n.activeToolPanel)),e.R7$(),e.Y8G("ngSwitchCase","media"),e.R7$(),e.HbH(n.drawerClassArray.text),e.Y8G("ngClass",e.eq3(36,W,"text"==n.activeToolPanel)),e.R7$(),e.Y8G("ngSwitchCase","text"),e.R7$(),e.HbH(n.drawerClassArray.animated),e.Y8G("ngClass",e.eq3(38,W,"animated"==n.activeToolPanel)),e.R7$(),e.Y8G("ngSwitchCase","animated"),e.R7$(),e.HbH(n.drawerClassArray.music),e.Y8G("ngClass",e.eq3(40,W,"music"==n.activeToolPanel)),e.R7$(),e.Y8G("ngSwitchCase","music"),e.R7$(),e.HbH(n.drawerClassArray.background),e.Y8G("ngClass",e.eq3(42,W,"background"==n.activeToolPanel)),e.R7$(),e.Y8G("ngSwitchCase","background"),e.R7$(),e.HbH(n.drawerClassArray.element),e.Y8G("ngClass",e.eq3(44,W,"element"==n.activeToolPanel)),e.R7$(),e.Y8G("ngSwitchCase","element"),e.R7$(),e.Y8G("ngSwitchCase","background_edit"),e.R7$(),e.Y8G("ngSwitchCase","video_edit"),e.R7$(),e.Y8G("ngSwitchCase","illustration_edit"),e.R7$(),e.Y8G("ngSwitchCase","sticker_edit"),e.R7$(),e.Y8G("ngSwitchCase","text_edit"),e.R7$(),e.Y8G("ngSwitchCase","remove_bg"),e.R7$(),e.Y8G("ngSwitchCase","shape_edit"),e.R7$(),e.Y8G("ngSwitchCase","image_edit"),e.R7$(),e.Y8G("ngSwitchCase","lottie_illustration_edit")}}function zr(o,r){if(1&o){const n=e.RV6();e.j41(0,"div",114),e.bIt("click",function(){e.eBV(n);const i=e.XpG(2);return e.Njj(i.topScroll())}),e.nrm(1,"pi",115),e.k0s()}}function Yr(o,r){if(1&o){const n=e.RV6();e.j41(0,"li",116),e.bIt("click",function(){const i=e.eBV(n).$implicit,s=e.XpG(2);return e.Njj(s.activateEditTool(i))}),e.j41(1,"a",117),e.nrm(2,"pi",118),e.k0s(),e.EFF(3),e.k0s()}if(2&o){const n=r.$implicit,t=e.XpG(2);e.ZvI("mt-3 mb-3 ",n.name,""),e.Y8G("ngClass",e.eq3(7,Sr,t.activeEditSubPane==n.name||n.name==t.opacityPane&&t.Showopacity||n.name==t.blurPane&&t.Showblur)),e.R7$(),e.Y8G("ngClass",e.l_i(9,wr,t.activeEditSubPane==n.name,n.name==t.opacityPane&&t.Showopacity||n.name==t.blurPane&&t.Showblur)),e.R7$(),e.Y8G("name",n.icon),e.R7$(),e.SpI(" ",n.title," ")}}function Lr(o,r){if(1&o){const n=e.RV6();e.j41(0,"div",119),e.bIt("click",function(){e.eBV(n);const i=e.XpG(2);return e.Njj(i.buttomScroll())}),e.nrm(1,"pi",120),e.k0s()}}function Wr(o,r){if(1&o){const n=e.RV6();e.j41(0,"div",121),e.bIt("mousedown",function(){e.eBV(n);const i=e.XpG(2);return e.Njj(i.editNavDown())}),e.nrm(1,"opacity-tool",122),e.k0s()}if(2&o){const n=e.XpG(2);e.R7$(),e.Y8G("activeObject",n.activeObject)("verticalOrientation",!0)}}function Hr(o,r){if(1&o&&(e.j41(0,"div",123),e.nrm(1,"blur-tool",124),e.k0s()),2&o){const n=e.XpG(2);e.R7$(),e.Y8G("verticalOrientation",!0)("imageFilterUtil",null==n.selectedBgMedia?null:n.selectedBgMedia.imageFilterUtil)}}function Zr(o,r){if(1&o&&(e.j41(0,"div",105,8)(2,"div",106,9),e.DNE(4,zr,2,0,"div",107),e.j41(5,"div",108)(6,"div",null,10)(8,"ul",109,11),e.DNE(10,Yr,4,12,"li",110),e.k0s()()(),e.DNE(11,Lr,2,0,"div",111)(12,Wr,2,2,"div",112)(13,Hr,2,2,"div",113),e.k0s()()),2&o){const n=e.sdS(1),t=e.sdS(7),i=e.XpG();e.R7$(4),e.Y8G("ngIf",n.clientHeight<t.clientHeight),e.R7$(4),e.Y8G("ngClass",e.eq3(7,jr,n.clientHeight<t.clientHeight||i.editNavs.length>4&&i.windowHeight>685&&i.windowHeight<720))("ngStyle",e.eq3(9,Pr,n.clientHeight+1+"px")),e.R7$(2),e.Y8G("ngForOf",i.editNavs),e.R7$(),e.Y8G("ngIf",n.clientHeight<t.clientHeight),e.R7$(),e.Y8G("ngIf",i.Showopacity),e.R7$(),e.Y8G("ngIf",i.Showblur)}}function Kr(o,r){1&o&&(e.j41(0,"div",125)(1,"div",126),e.nrm(2,"pi",127),e.EFF(3,"Drag Image to pan "),e.k0s()())}function Jr(o,r){1&o&&(e.j41(0,"div",128),e.EFF(1," Loading... "),e.k0s())}function Qr(o,r){1&o&&(e.j41(0,"div",129)(1,"div",130)(2,"div",131)(3,"span",132),e.EFF(4,"Loading..."),e.k0s()()()())}function qr(o,r){if(1&o){const n=e.RV6();e.j41(0,"div",133),e.nrm(1,"div",134),e.j41(2,"div",135)(3,"p"),e.nrm(4,"ngb-progressbar",136),e.k0s(),e.j41(5,"span",137),e.EFF(6,"Loading media... "),e.k0s(),e.j41(7,"button",138),e.bIt("click",function(){e.eBV(n);const i=e.XpG();return e.Njj(i.sceneController.cancelDownloading())}),e.EFF(8,"Cancel"),e.k0s()()()}if(2&o){const n=e.XpG();e.R7$(4),e.Y8G("value",n.sceneController.inProgressCount)("showValue",!0)}}function ea(o,r){1&o&&(e.j41(0,"div",139),e.nrm(1,"div",140)(2,"div",141),e.k0s())}function ta(o,r){1&o&&(e.j41(0,"div",142),e.nrm(1,"pi",143),e.k0s())}function ia(o,r){1&o&&(e.j41(0,"div",144),e.nrm(1,"pi",145),e.k0s())}function na(o,r){if(1&o){const n=e.RV6();e.j41(0,"button",146),e.bIt("click",function(){e.eBV(n);const i=e.XpG();return e.Njj(i.animate())}),e.nrm(1,"pi",147),e.k0s()}if(2&o){const n=e.XpG();e.Y8G("disabled",n.inProgress)}}function oa(o,r){if(1&o){const n=e.RV6();e.j41(0,"button",148),e.bIt("click",function(){e.eBV(n);const i=e.XpG();return e.Njj(i.stopAnimate())}),e.nrm(1,"pi",149),e.k0s()}}function sa(o,r){1&o&&(e.j41(0,"div",153),e.nrm(1,"pi",154),e.k0s())}function ra(o,r){1&o&&(e.j41(0,"div",155),e.nrm(1,"pi",156),e.k0s())}function aa(o,r){if(1&o){const n=e.RV6();e.j41(0,"button",150),e.bIt("click",function(){e.eBV(n);const i=e.XpG();return e.Njj(i.toggleMute())}),e.DNE(1,sa,2,0,"div",151)(2,ra,2,0,"div",152),e.k0s()}if(2&o){const n=e.XpG();e.R7$(),e.Y8G("ngIf",n.editorVolume),e.R7$(),e.Y8G("ngIf",!n.editorVolume)}}function la(o,r){if(1&o&&(e.j41(0,"span",161),e.EFF(1),e.k0s()),2&o){const n=e.XpG(2);e.R7$(),e.SpI(" ",n.audioDisplayNmae," ")}}function ca(o,r){if(1&o&&(e.j41(0,"span",162),e.EFF(1),e.nI1(2,"mstominuteSeconds"),e.k0s()),2&o){const n=e.XpG(2);e.R7$(),e.SpI(" ",e.bMT(2,1,null==n.sceneController||null==n.sceneController.audioObj?null:n.sceneController.audioObj.audioElementDuration)," ")}}function da(o,r){1&o&&(e.j41(0,"span",163),e.EFF(1," Your audio is too short for trimming "),e.k0s())}function pa(o,r){if(1&o&&(e.j41(0,"div",157),e.DNE(1,la,2,1,"span",158)(2,ca,3,3,"span",159)(3,da,2,0,"span",160),e.k0s()),2&o){const n=e.XpG();e.R7$(),e.Y8G("ngIf",0==n.mediaType&&n.sceneController.audioObj),e.R7$(),e.Y8G("ngIf",0==n.mediaType&&n.sceneController.audioObj),e.R7$(),e.Y8G("ngIf",0!=n.mediaType&&n.sceneController.audioObj&&n.videoDuration>(null==n.sceneController||null==n.sceneController.audioObj?null:n.sceneController.audioObj.audioElementDuration))}}function ma(o,r){1&o&&(e.j41(0,"div",175),e.nrm(1,"pi",176),e.k0s())}function ua(o,r){1&o&&(e.j41(0,"div",177),e.nrm(1,"pi",178),e.k0s())}function ga(o,r){if(1&o){const n=e.RV6();e.j41(0,"div",164)(1,"div",165)(2,"span",166),e.EFF(3),e.k0s(),e.EFF(4),e.j41(5,"span",167),e.EFF(6,"\u25cf"),e.k0s(),e.j41(7,"span",168),e.EFF(8),e.nI1(9,"mstoseconds"),e.k0s(),e.j41(10,"span",169),e.EFF(11),e.nI1(12,"mstoseconds"),e.k0s()(),e.j41(13,"button",170),e.bIt("click",function(){e.eBV(n);const i=e.XpG();return e.Njj(i.deleteScene(i.selectedSceneIndex))}),e.nrm(14,"pi",171),e.k0s(),e.j41(15,"div",172),e.bIt("click",function(){e.eBV(n);const i=e.XpG();return e.Njj(i.toogleCollapse())}),e.DNE(16,ma,2,0,"div",173)(17,ua,2,0,"div",174),e.k0s()()}if(2&o){const n=e.XpG();e.R7$(3),e.SpI("Scene ",n.selectedSceneIndex+1,""),e.R7$(),e.SpI(" of ",null==n.sceneController.scenes?null:n.sceneController.scenes.length,""),e.R7$(4),e.JRh(e.bMT(9,8,n.selectedSceneDuration)),e.R7$(3),e.SpI(" / ",e.bMT(12,10,n.videoDuration),""),e.R7$(2),e.Y8G("ngClass",e.eq3(12,J,n.sceneController.scenes&&1===n.sceneController.scenes.length))("disabled",n.sceneController.scenes&&1===n.sceneController.scenes.length),e.R7$(3),e.Y8G("ngIf",!n.timelineCollapse),e.R7$(),e.Y8G("ngIf",n.timelineCollapse)}}function ha(o,r){1&o&&(e.j41(0,"div",175),e.nrm(1,"pi",176),e.k0s())}function _a(o,r){1&o&&(e.j41(0,"div",177),e.nrm(1,"pi",178),e.k0s())}function va(o,r){if(1&o){const n=e.RV6();e.j41(0,"div",164)(1,"div",165)(2,"span",168),e.EFF(3,"Video Duration: "),e.k0s(),e.j41(4,"span",169),e.EFF(5),e.nI1(6,"mstoseconds"),e.k0s()(),e.j41(7,"div",172),e.bIt("click",function(){e.eBV(n);const i=e.XpG();return e.Njj(i.toogleCollapse())}),e.DNE(8,ha,2,0,"div",173)(9,_a,2,0,"div",174),e.k0s()()}if(2&o){const n=e.XpG();e.R7$(5),e.SpI(" ",e.bMT(6,3,n.videoDuration),""),e.R7$(3),e.Y8G("ngIf",!n.timelineCollapse),e.R7$(),e.Y8G("ngIf",n.timelineCollapse)}}function fa(o,r){if(1&o){const n=e.RV6();e.j41(0,"div",183),e.nrm(1,"pi",184),e.j41(2,"mv-slider",185),e.bIt("change",function(i){e.eBV(n);const s=e.XpG(2);return e.Njj(s.inputVolumeFromSlider(i))}),e.k0s()()}if(2&o){const n=e.XpG(2);e.R7$(2),e.Y8G("value",100*(null==n.sceneController||null==n.sceneController.audioObj?null:n.sceneController.audioObj.volume))("min",1)("max",100)}}function ba(o,r){if(1&o){const n=e.RV6();e.j41(0,"div",186)(1,"input",187),e.mxI("ngModelChange",function(i){e.eBV(n);const s=e.XpG(2);return e.DH7(s.musicVolume,i)||(s.musicVolume=i),e.Njj(i)}),e.bIt("ngModelChange",function(){e.eBV(n);const i=e.XpG(2);return e.Njj(i.inputVolume())}),e.k0s()()}if(2&o){const n=e.XpG(2);e.R7$(),e.R50("ngModel",n.musicVolume)}}function Ca(o,r){1&o&&(e.j41(0,"div",175),e.nrm(1,"pi",176),e.k0s())}function xa(o,r){1&o&&(e.j41(0,"div",177),e.nrm(1,"pi",178),e.k0s())}function ka(o,r){if(1&o){const n=e.RV6();e.j41(0,"div",188),e.bIt("click",function(){e.eBV(n);const i=e.XpG(2);return e.Njj(i.toogleCollapse())}),e.DNE(1,Ca,2,0,"div",173)(2,xa,2,0,"div",174),e.k0s()}if(2&o){const n=e.XpG(2);e.R7$(),e.Y8G("ngIf",!n.timelineCollapse),e.R7$(),e.Y8G("ngIf",n.timelineCollapse)}}function Ta(o,r){if(1&o&&(e.j41(0,"div",164)(1,"div",179),e.DNE(2,fa,3,3,"div",180)(3,ba,2,1,"div",181)(4,ka,3,2,"div",182),e.k0s()()),2&o){const n=e.XpG();e.R7$(2),e.Y8G("ngIf",n.sceneController.audioObj),e.R7$(),e.Y8G("ngIf",n.sceneController.audioObj),e.R7$(),e.Y8G("ngIf",0!=n.mediaType)}}function ja(o,r){if(1&o&&(e.j41(0,"div",189),e.nrm(1,"timeline",190),e.k0s()),2&o){const n=e.XpG();e.R7$(),e.Y8G("selectedSceneIndex",n.selectedSceneIndex)("changing",n.changingV
1alue)("timelineView",n.timelineView)("ngClass",e.eq3(4,tt,n.timelineCollapse))}}function Pa(o,r){if(1&o){const n=e.RV6();e.j41(0,"div",189)(1,"timeline-veditor",191),e.bIt("openEditTool",function(){e.eBV(n);const i=e.XpG();return e.Njj(i.selectBackground())}),e.k0s()()}if(2&o){const n=e.XpG();e.R7$(),e.Y8G("selectedSceneIndex",n.selectedSceneIndex)("changing",n.changingValue)("timelineView",n.timelineView)("mediaType",n.mediaType)("sldBtn",n.sldBtn)("ngClass",e.eq3(6,tt,n.timelineCollapse))}}const Sa=[{path:"",redirectTo:"edit",pathMatch:"full"},{path:"edit",component:(()=>{var o;class r extends lt.l{onvisibilitychange(t){this.document.hidden||this.stateService&&this.stateService.mainCanvas&&this.stateService.mainCanvas.renderAll()}constructor(t,i,s,a,l,c,p,u,g,h,b,z,Y,ke,Te,je,Pe,Ma,Oa,Va,Ra,Ga,Ba,Da,Na,Aa,Ua,Fa){super(Y,ke,Te,je,Z._Y.VideoTemplate,s,Ma,i,u,z),this.toolhistoryservice=t,this.editorUIService=a,this.route=l,this.sceneParser=c,this.zone=p,this.videoRepository=g,this.createProjectService=h,this.templateService=b,this.sceneController=z,this._location=Pe,this.illustrationToolService=Oa,this.stickerToolService=Va,this.lottieToolService=Ra,this.uploadService=Ga,this.aiGenService=Ba,this.router=Da,this.envService=Na,this.document=Aa,this.touchpadCanvasGestureService=Ua,this.renderer=Fa,this.editorType=Z._Y.VideoTemplate,this.projectType=null,this.ProjectTypeNum=ge.gM,this.activeEditSubPane="edit",this.elementactiveSubPane=j.s.STICKERS,this.opacityPane="opacity",this.blurPane="Blur",this.changingV
1alue=new st.B,this.createScratch=!1,this.activeEditToolPanel="",this.inProgress=!1,this.stopAnimation=!0,this.isCanvasLoading=!1,this.isScenePlaying=!1,this.inMediaAdjustMode=!1,this.isLoaded=!1,this.editorVolume=!0,this.sldBtn=!0,this.Showopacity=!1,this.Showblur=!1,this.editNavs=[],this.lastSelectedEditSubPane="",this.showBgEditTools=!1,this.isLayersVisible=!1,this.BackgroundEdittools=!1,this.mediaType=1,this.animateActivePanel="animated-illustration",this.isSaving=!1,this.audioDisplayNmae="",this.socialPlatformId=26,this.selectedBgColor="#000000",this.completeCb=H=>{this.canvasPreview.nativeElement.removeChild(this.canvasPreview.nativeElement.childNodes[0]),this.stopAnimation=!0,this.isScenePlaying=!1},this.gridActive=!1,this.drawerClassArray=[],this.isLastEditNavDown=!1,this.windowHeight=window.innerHeight,this.aiImages=[],this.navTools=[],this.editorService.getEditorUiConfig(this.editorService.videoTemplateUIJsonUrl,H=>{H&&(this.editorService.uiConfig=Object.assign({},{videoTemplate:H}),this.navTools=this.editorService.uiConfig.videoTemplate.toolbar.nav.items,this.toolbar=this.editorService.uiConfig.videoTemplate.toolbar)}),this.getCategoryListing(),this.sceneController.onFormate=()=>{this.isGrid=!1,this.gridLines=[]},this.setDirtySubscription=this.setDirty.subscribe(()=>{this.sceneController.getSelectedScene().setDirty()}),this.browser=(0,ye.o0)(),this.aiGenService.aiGenImagesBehavior.subscribe(H=>{this.sceneController.inProgress=!0,this.sceneController.getSelectedScene().setBackGroundMedia(H.urls[0],0,H.urls[0],!1).promise.then(it=>{this.selectedBgMedia=this.sceneController.getSelectedScene().getBackgroundMedia(),this.sceneController.checkAndUpdateBgImageWatermark()}).finally(()=>this.sceneController.inProgress=!1)})}generatedImage(t){t&&t.aiImageResult&&this.aiImages.unshift(t.aiImageResult)}ngOnInit(){this.inProgress=!0,this.isLoaded=!1,this.user=this.authService.currentUser(),this.route.snapshot.queryParams?.tp&&(this.aiGenService.textPrompt=this.route.snapshot.queryParams?.tp,this.router.navigate([],{relativeTo:this.route,queryParams:{tp:""},queryParamsHandling:"merge",replaceUrl:!0})),setTimeout(()=>{this.onInit(),this.reset();const i=this.route.snapshot.queryParamMap.get("project_type");this.projectType=i?Number(i):null,this.loadProject()},300),document.body.classList.add("overflow-hidden");const t=navigator.userAgent;t.includes("Mac")&&(t.includes("Safari")||t.includes("Chrome"))&&this.renderer.addClass(document.body,"for-mac-safari-chrome"),t.includes("Mac")&&t.includes("Firefox")&&this.renderer.addClass(document.body,"for-mac-firefox")}loadProject(){var t=this;this.load(function(){var i=(0,f.A)(function*(s,a=!1){let l;l=!!t.user&&t.user.subscribed>0,""==t.projectId&&(t.createScratch=!0),t.stateService.init(t.canvasWrapper,t.canvasMaskWrapper,t.mainCanvas,t.canvasPreview,null,!0,null,null,t.canvasMaskWrapperLoaded),s.properties.socialPlatformId||(s.properties.socialPlatformId=26);let p=0,u=0;if(s.properties.format===k.b.customVideoFormatId||s.properties.width&&s.properties.height)p=s.properties.width,u=s.properties.height,yield t.zoomService.init(s.properties.socialPlatformId,p,u),t.detachGesture=t.touchpadCanvasGestureService.attachPinchPanHandlers(t.canvasWrapper.nativeElement,t.zoomService);else{yield t.configService.waitForSettings();let b=t.configService.settings?.[Z.jn.Formats]?.[s.properties.format];p=b?.width||1920,u=b?.height||1080,yield t.zoomService.init(s.properties.socialPlatformId,p,u),t.detachGesture=t.touchpadCanvasGestureService.attachPinchPanHandlers(t.canvasWrapper.nativeElement,t.zoomService)}let g=t.route.snapshot.queryParamMap.get("tab");t.editorService.setActiveToolPanel(g&&"resize"!=g&&"trim"!=g&&"mute"!=g?{panel:g,from:"default"}:{panel:j.s.MEDIA,from:"default"}),t.videoRepository.setSceneController(t.sceneController);const h=t.route.snapshot.queryParamMap.get("action");t.sceneController.init(s,t.stateService.mainCanvas,t.editorService,b=>t.adjustMediaContainer(b),l,h,t.stateService,t.zoomService).then(()=>{t.projectType=t.sceneController.getProjectType(),t.zoomService.fitToScreen(),t.stateService.disableCanvasRightClick(),t.templateService.removeBgEditObject=null,t.templateService.imgBlobUrl=null,t.activeEditToolPanelSubscription=t.sceneController.activeEditToolPanel.subscribe(b=>{t.openEditTool(b),t.timelineView="scene"}),setTimeout(()=>
1{t.changingValue.next("video-duration")},0),"resize"===g?t.videoheader.resize():("trim"===g||"mute"===g)&&(t.selectBackground(),"mute"===g&&(t.editorVolume=!1,t.sceneController.editorVolume=!1)),setTimeout(()=>{initAligningGuidelines(t.stateService.mainCanvas)},500),"default_elements"===h&&t.addElementToProject()}).catch(()=>{t._location.back()}),t.inProgress=!1,t.isLoaded=!0,a&&t.authService.__afterLoggedIn()});return function(s){return i.apply(this,arguments)}}())}load(t){let i="",s="",a="";this.projectId=i=this.route.snapshot.queryParamMap.get("project_id"),a=this.route.snapshot.queryParamMap.get("tab"),this.editorService.setActiveToolPanel(a?{panel:a,from:"default"}:{panel:j.s.MEDIA,from:"default"});let l=this.route.snapshot.queryParamMap.get("afterlogin"),c=!1;if("Y"==l&&(c=!0),s=this.route.snapshot.queryParamMap.get("action"),i)this.templateService.imgBlobUrl=null,this.__loadProjectFromId().then(p=>{t(p,c)});else if("default_project"===s){const p=this.route.snapshot.queryParamMap.get("template_id"),u=this.route.snapshot.queryParamMap.get("product_id");p?this.createProjectService.makeProject(p,at.If.VIDEO,u,g=>{t(g,c)}):this.editorUIService.__getImgObj().then(g=>{this.mediaType=g.mediaType,this.makeProjectFromScratch(g,h=>{t(h,c)})})}else if("default_elements"===s)this.editorUIService.__getImgObj().then(p=>{this.makeProjectFromScratch(p,u=>{t(u,c)})});else if("create_project"===s){let p=this.route.snapshot.queryParamMap.get("image_alias");p&&this.createProjectService.openProjectWithCreateProgress({ImageAlias:p},2,null,null,g=>{this.__loadProjectFromId().then(h=>{t(h,c)})})}}addElementToProject(){let t=this.route.snapshot.queryParams;if(t&&t.url){const i={imgUrl:t.url,aspect:t.aspect,pro:Number(t.pro)};switch(Number(t.pcid)){case U.KK.Illustration:this.illustrationToolService.addIllustration(i,null,this.sceneController);break;case U.KK.Sticker:this.stickerToolService.addSticker(i.imgUrl,i.pro,this.sceneController,null);break;case U.KK.lotiIllustration:this.lottieToolService.addLottie(i,null,this.sceneController);break;case U.KK.lotiSticker:this.lottieToolService.addLottieSticker(i,null,this.sceneController)}}}__loadProjectFromId(){return new Promise((t,i)=>{let s=this.route.snapshot.queryParamMap.get("project_id");this.projectId=s,this.editorService.loadProject(s,a=>{t(a)},a=>{})})}makeProjectFromScratch(t,i){let l,s=this.user,c=this.route.snapshot.queryParamMap.get("action"),p=!1;c&&"default_elements"===c&&(p=!0),l=this.createProjectService.getTemplateProject(t,2,s?s.systemRefKey:null,"",this.projectType,Z._Y.VideoTemplate,p),l.then(u=>{i(u)})}ngOnDestroy(){this.templateService.imgBlobUrl=null,this.aiGenService.aiGenImages=[],this.aiGenService.textPrompt="",this.aiImages=[],this.onDestroy(),this.activeEditToolPanelSubscription&&this.activeEditToolPanelSubscription.unsubscribe(),this.setDirtySubscription&&this.setDirtySubscription.unsubscribe(),this.sceneController.reset(),this.stateService.onDestory(),this.sceneController.tabselection=!1,this.uploadService.localFiles=[],this.sceneController.destroyAllLottie(),this.templateService.removeBgEditObject=new we.MO,document.body.classList.remove("overflow-hidden"),this.detachGesture.destroy()}editNavDown(){this.isLastEditNavDown=!0}canvasWrapperClick(t){this.isLastEditNavDown?this.isLastEditNavDown=!1:(this.isLastEditNavDown=!1,(t.target===this.canvasWrapper.nativeElement||(t.target===this.canvasMaskWrapperLoaded.nativeElement||t.target===this.canvasMaskWrapper.nativeElement||this.editNavUpper.last&&t.target===this.editNavUpper.last.nativeElement||this.editNavInner.last&&t.target===this.editNavInner.last.nativeElement)&&this.sceneController.selectedScene.selectedDesignItem)&&(this.sceneController.deselectAll(),this.activeObject=null,this.editNavs=[],this.editorService.setActiveToolPanel({panel:this.lastSelectedToolPanel,from:""})))}setBgEditTools(){let t;this.editNavs=[],this.selectedBgMedia=this.sceneController.getSelectedScene().getBackgroundMedia(),t=this.selectedBgMedia&&0===this.selectedBgMedia?.getMediaType()?this.toolbar.editNavs.background:this.toolbar.editNavs.bgVideo,t&&(this.editNavs=t.items),this.showBgEditTools=!0}
1executeAction(t){"show_adjust"===t.name?this.adjustBackground():"apply_adjust"===t.name?this.applayAdjustBackground&&this.applayAdjustBackground():"show_edit_tools"===t.name?(this.Showblur=!1,t.val?this.setBgEditTools():(this.showBgEditTools=!1,this.editNavs=[])):"cancel_adjust"===t.name&&this.applayAdjustBackground&&(this.cancleAdjust=!0,this.applayAdjustBackground())}openDrawers(t){let i=!1;for(const s of this.toolbar.nav.items)s.name===t.panel?(this.drawerClassArray[s.name]="",i=!0):this.drawerClassArray[s.name]=i?"up-state":"down-state";this.activeToolPanel=t.panel,this.lastSelectedToolPanel=t.panel,"nav"===t.from&&(this.sldBtn=!0),(!t||"canvas"!==t.from)&&(this.timelineView="music"===this.activeToolPanel?"music":"scene",this.sceneController&&!this.editorService.replace&&(this.sceneController.deselectAll(),this.activeObject=null,this.editNavs=[]),"background"==t.panel?(this.setActiveEditSubPane(null),this.sceneController.getSelectedScene()&&(this.selectedBgMedia=this.sceneController.getSelectedScene().getBackgroundMedia(),this.selectedBgMedia?this.setBgEditTools():this.showBgEditTools=!1)):(this.BackgroundEdittools=!1,this.showBgEditTools=!1))}selectBackground(){this.sceneController.deselectAll(),this.openEditTool(null)}openEditTool(t){this.activeToolPanel="",this.activeObject=t,this.Showopacity=!1,this.Showblur=!1;let i=null,s="",a=!1;if(t)if(t instanceof ot.$)switch(t.getDesignItem().canvas.itemType){case D.Q.ILLUSTRATIONS:i=this.toolbar.editNavs.illustration,this.activeToolPanel=this.editorService.replaceEdit?j.s.ELEMENT:j.s.ILLUSTRATION_EDIT,this.lastSelectedToolPanel=j.s.ELEMENT,this.elementactiveSubPane=j.s.ILLUSTRATION,s="edit";break;case D.Q.STICKERS:i=this.toolbar.editNavs.stickers,this.activeToolPanel=this.editorService.replaceEdit?j.s.ELEMENT:j.s.STICKERS_EDIT,this.lastSelectedToolPanel=j.s.ELEMENT,this.elementactiveSubPane=j.s.STICKERS,s="transform";break;case D.Q.TEXT:i=JSON.parse(JSON.stringify(this.toolbar.editNavs.text)),this.activeObject.isSimpleText()?i.items.shift():i.items.pop(),this.activeToolPanel=this.editorService.replaceEdit?j.s.TEXT:j.s.TEXT_EDIT,this.lastSelectedToolPanel=j.s.TEXT,s="text";break;case D.Q.SHAPE:i=this.toolbar.editNavs.shape,1===this.activeObject.getShapeType()?(i.items.shift(),s="transform"):s="color",this.activeToolPanel=j.s.SHAPE_EDIT}else t.getDesignItem().box?.entityType&&3===t.getDesignItem().box.entityType?(i=this.toolbar.editNavs.shapeMedia,this.activeToolPanel=j.s.SHAPE_MEDIA_EDIT,s="color"):t.getDesignItem().lottie?(i=this.toolbar.editNavs.lottie_Illustration,this.activeToolPanel=j.s.LOTTI_ILLUSTRATION_EDIT,s="transform",a=!0,this.animateActivePanel=t.getDesignItem().lottie.itemType==we.zs.LOTTIE_STICKER?"animated-sticker":"animated-illustration"):(0==this.activeObject.getDesignItem().box.imgArray[this.activeObject.selectedMediaItemIndex].imageType?i=this.activeObject.getIsUserAdded()?JSON.parse(JSON.stringify(this.toolbar.editNavs.image)):JSON.parse(JSON.stringify(this.toolbar.editNavs.templateImage)):(i=JSON.parse(JSON.stringify(this.toolbar.editNavs.video)),this.activeObject.getIsUserAdded()||(i.items.pop(),i.items.splice(2,1))),this.editorService.replaceEdit?(this.activeToolPanel=j.s.MEDIA,s="replace",this.lastSelectedToolPanel=j.s.MEDIA):(this.activeToolPanel=j.s.IMAGE_EDIT,this.editorService.removebgEdit?(this.activeToolPanel=j.s.REMOVE_BG,s="remove_bg",this.lastSelectedToolPanel=j.s.REMOVE_BG):s=0==this.activeObject.getDesignItem().box.imgArray[this.activeObject.selectedMediaItemIndex].imageType?"enhance":"edit",this.lastSelectedToolPanel=j.s.IMAGE_EDIT));else this.projectType!=ge.gM.VideoEditor?this.editorService.setActiveToolPanel({panel:j.s.BACKGROUND,from:"nav"}):0===this.sceneController.selectedScene.getBackgroundMedia().getMediaType()?(this.activeToolPanel=j.s.BACKGROUND_EDIT,i=this.toolbar.editNavs.background,s="Transform",this.selectedBgMedia=this.sceneController.getSelectedScene().getBackgroundMedia(),this.lastSelectedToolPanel||(this.lastSelectedToolPanel=Se.lx.MUSIC)):(this.activeToolPanel=j.s.VIDEO_EDIT,i=[],s="transform");i&&(this.editNavs=i.items),this.editorService.zOrderEdit?(this.editorService.zOrderEdit=!1,s="transform"):this.editorService.replaceEdit?(this.editorService.replaceEdit=!1,a?(a=!1,s="transform"):s="replace"):this.editorService.removebgEdit&&(this.editorService.removebgEdit=!1,s="remove_bg"),this.setActiveEditSubPane(s)}unloadNotification(t){this.canDeactivate()||(t.returnValue=!0)}setActiveEditSubPane(t){this.activeEditSubPane=t,t&&(this.lastSelectedEditSubPane=t),this.editorService.setActiveEditToolSubPanel(t)}activateEditTool(t){"opacity"==t.name?(this.Showopacity=!this.Showopacity,this.Showblur=!1):"Blur"==t.name?(this.Showblur=!this.Showblur,this.Showopacity=!1):(this.activeToolPanel=t.toolPanel,this.setActiveEditSubPane(t.name),this.Showopacity=!1,this.Showblur=!1,this.lastSelectedToolPanel=t.toolPanel),this.sldBtn=!0}sceneResized(t){let i=this.sceneController.getSelectedScene(),s=i.getDuration()+t;
1i.chageDuration(s),this.changingValue.next("scene-duration")}sceneAudio(t){t&&(this.audioDisplayNmae=t?.displayName?t.displayName:t?.name?t.name:"",this.setAudio(t))}setAudio(t){this.sceneController.design.metadata.data.music=t&&this.sceneController.audioObjs&&this.sceneController.audioObjs.length>0?this.sceneController.getAudioJson()[0]:{},this.sceneController.setDirty()}sceneResizedAtAbsu(t){this.sceneController.getSelectedScene().chageDuration(t),this.changingValue.next("scene-duration")}progressChanged(t){this.inProgress=t}deleteDesignItem(){this.sceneController.deleteSeletedDesignItem()}duplicate(){this.sceneController.duplicate()}moveDown(){this.sceneController.getSelectedScene().moveDownwards()}moveUp(){this.sceneController.getSelectedScene().moveUpwards()}animate(){let t=this.sceneController.getSelectedScene();if(t){let i=t.toJson();this.isCanvasLoading=!0,this.isScenePlaying=!0;const s=this.mainCanvas.nativeElement.cloneNode(!0);this.canvasPreview.nativeElement.append(s);const a=new E.fabric.StaticCanvas(s);a.setHeight(this.stateService.mainCanvas.clipPath.height*this.stateService.mainCanvas.getZoom()),a.setWidth(this.stateService.mainCanvas.clipPath.width*this.stateService.mainCanvas.getZoom());const c=this.stateService.mainCanvas.viewportTransform[5];s.style.left=this.stateService.mainCanvas.viewportTransform[4]+"px",s.style.top=c+"px",this.sceneParser.parseScene(i,a).then(p=>{p.addToCanvas(a),this.sceneController.markWaterMakedRequired()&&this.addWatermarkOverlay(a),a.renderAll(),this.stopAnimation=!1,this.isCanvasLoading=!1,this.sceneController.playScene(p,a,this.completeCb,!this.editorVolume),this.stopAnimation=!1,this.currentPlayingSceen=p,this.zone.runOutsideAngular(()=>this.animationRenderAll(a))})}}stopAnimate(){this.currentPlayingSceen.getSceneAnimation().stop(),this.sceneController.pauseSceneAudio(),this.sceneController.isPlaying=!1,this.currentPlayingSceen=null,this.stopAnimation=!0,this.isScenePlaying=!1,this.completeCb.call(null)}animationRenderAll(t){const i=()=>{t.renderAll();const s=E.fabric.util.requestAnimFrame(i);this.stopAnimation&&E.fabric.util.cancelAnimFrame(s)};E.fabric.util.requestAnimFrame(i)}get videoDuration(){let t=0;for(let i=0;i<this.sceneController.scenes.length;i++)t+=this.sceneController.scenes[i].getDuration();return t}get selectedSceneDuration(){let t=this.sceneController.getSelectedScene();return t?t.getDuration():0}adjustBackground(){const t=this.sceneController.getSelectedScene().getBackgroundMedia();if(t&&t.toJson()&&t.toJson().imgName){const i=s=>{this.timelineCollapse=!0;const a=this.stateService.mainCanvas;setTimeout(()=>{const l=this.stateService.maskWrapperEl.getBoundingClientRect(),c=this.stateService.wrapperEl.getBoundingClientRect(),p=c.width/2-l.width/2,u=c.height/2-l.height/2,g=new E.fabric.Rect({width:a.clipPath.width,height:a.clipPath.height,left:p/a.getZoom(),top:u/a.getZoom()});this.adjustMedia(s,g,t.toJson(),t.oImg,g,p,u,null,t),this.inBackgroundAdjustMode=!0},0),this.sceneController.getSelectedScene()&&(this.selectedBgMedia=this.sceneController.getSelectedScene().getBackgroundMedia())};this.previousScale=t.oImg.scaleX,this.cancleAdjust=!1,0===t.getMediaType()?t.oImg.clone(i):this.cloneVideoImage(t.getVideo(),t.oImg,i)}}inputVolume(){let t=null;const i=this.sceneController.getAudioObject();i&&i.length>0&&(t=i[0]),t&&(this.musicVolume&&!Number.isNaN(this.musicVolume)?this.musicVolume>100?setTimeout(()=>{this.musicVolume=100,t.updateVolume(this.musicVolume/100)},0):this.musicVolume<0?setTimeout(()=>{this.musicVolume=0,t.updateVolume(this.musicVolume/100)},0):setTimeout(()=>{t.updateVolume(this.musicVolume/100)},0):setTimeout(()=>{this.musicVolume=100,t.updateVolume(this.musicVolume/100)},0))}inputVolumeFromSlider(t){let i=null;const s=this.sceneController.getAudioObject();s&&s.length>0&&(i=s[0]),i&&(this.musicVolume=t.newValue,i.updateVolume(this.musicVolume/100))}toggleMute(){this.editorVolume=!this.editorVolume,this.sceneController.editorVolume=this.editorVolume}toggleSliderOpen(t){this.sldBtn=t,this.setActiveEditSubPane(this.lastSelectedEditSubPane),setTimeout(()=>{this.zoomService.fitToScreen()},100)}toggleSliderClose(t){this.sldBtn=t,this.setActiveEditSubPane(null),setTimeout(()=>{this.zoomService.fitToScreen()},100)}editToolsWrapperClick(t){this.Showopacity=!1}deleteScene(t){this.sceneController.delete(t)}scrollDiv(t,i){t.scrollTop+=i}buttomScroll(){this.scrollContent.nativeElement.scrollTo({top:this.scrollContent.nativeElement.scrollTop+57,behavior:"smooth"})}topScroll(){this.scrollContent.nativeElement.scrollTo({top:this.scrollContent.nativeElement.scrollTop-57,behavior:"smooth"})}reset(){let t;const i=this.sceneController.getAudioObject();i&&i.length>0&&(t=i[0]),t&&(i[0]=null)}getCategoryListing(){this.templateService.getProductCategoryListing(U.KK.VideoTemplates,0,t=>{let i=t.storeCategories[0].subCategoryList;for(let s=0;s<i.length;s++)this.templateService.getProductListing(i[s].categoryId,0,a=>{},a=>{},0,he.i.Main)},t=>{},0,he.i.NUll)}handleKeyboardEventDown(t){if(!(this.sceneController&&this.sceneController.getSelectedScene().selectedDesignItem&&this.sceneController.getSelectedScene().selectedDesignItem.isEditing()))if((t.metaKey||t.ctrlKey)&&"s"===t.key)this.isSaving||(this.isSaving=!0,this.saveProject(()=>{this.isSaving=!1})),t.preventDefault();else if(t.metaKey&&t.shiftKey&&"z"===t.key)this.sceneController.redo(),t.preventDefault();else if((t.metaKey||t.ctrlKey)&&"z"===t.key)this.sceneController.undo(),t.preventDefault();else if(t.ctrlKey&&"y"===t.key)this.sceneController.redo(),t.preventDefault();else if(this.sceneController.getSelectedScene().selectedDesignItem){if("BODY"!==(t.target||t.srcElement).tagName)return;if((t.metaKey||t.ctrlKey)&&"d"===t.key)this.activeObject&&this.sceneController.duplicate(),t.preventDefault();else if(t.key.toLowerCase().includes("esc"))this.sceneController.deselectAll(),this.activeObject=null,this.editNavs=[],this.editorService.setActiveToolPanel({panel:this.lastSelectedToolPanel,from:""});else{const s=t.shiftKey?50:5;switch(t.key){case"ArrowRight":this.sceneController.getSelectedScene().selectedDesignItem.arrow(ie.i3.RIGHT,!1,s);break;case"ArrowDown":this.sceneController.getSelectedScene().selectedDesignItem.arrow(ie.i3.DOWN,!1,s);break;case"ArrowUp":this.sceneController.getSelectedScene().selectedDesignItem.arrow(ie.i3.UP,!1,s);break;case"ArrowLeft":this.sceneController.getSelectedScene().selectedDesignItem.arrow(ie.i3.LEFT,!1,s);break;case"Backspace":case"Delete":this.deleteDesignItem()}}}else t.target&&"INPUT"!=t.target.nodeName&&"TEXTAREA"!=t.target.nodeName&&"Space"===t.code?this.sceneController.isPlaying?this.stopAnimate():this.animate():t.shiftKey&&"m"===t.key.toLowerCase()?(this.toggleMute(),this.sceneController.isPlaying&&(this.sceneController.editorVolume?this.sceneController.playSceneAudio():this.sceneController.pauseSceneAudio()),t.preventDefault()):(t.metaKey||t.shiftKey)&&"+"===t.key?(t.preventDefault(),this.zoomIn()):!t.metaKey&&!t.shiftKey||"_"!==t.key&&"-"!==t.key?((t.metaKey||t.shiftKey)&&")"===t.key||"Insert"===t.key)&&(t.preventDefault(),this.changeZoom(0)):(t.preventDefault(),this.zoomOut())}undo(){this.templateService.undoRedoInprogress||(this.templateService.undoRedoInprogress=!0,this.sceneController.undo().then(()=>{this.socialPlatformId=this.sceneController.getDesign().properties.socialPlatformId,this.selectedBgColor=this.sceneController.selectedScene.getBackGroundColor(),this.templateService.undoRedoInprogress=!1}))}redo(){this.templateService.undoRedoInprogress||(this.templateService.undoRedoInprogress=!0,this.sceneController.redo().then(()=>{this.socialPlatformId=this.sceneController.getDesign().properties.socialPlatformId,this.selectedBgColor=this.sceneController.selectedScene.getBackGroundColor(),this.templateService.undoRedoInprogress=!1}))}showGrid(){this.isGrid=!this.isGrid,this.grid(this.isGrid)}get undoable(){return!this.templateService.undoRedoInprogress&&this.sceneController&&this.sceneController.getHistoryPointer()>0}get redoable(){return!this.templateService.undoRedoInprogress&&this.sceneController&&this.sceneController.getHistory().length-1>this.sceneController.getHistoryPointer()}changeZoom(t=100){0===t?(this.zoomService.defaultZoom=!0,this.zoomService.fitToScreen()):-1===t||(this.zoomService.defaultZoom=!1,this.zoomService.set(t,!0))}zoomIn(){let t=300;
1if(this.browser&&this.browser.name.includes("safari")&&(t=150),this.zoomService.viewZoom<t){let i=this.getNextZoomVal();i&&this.changeZoom(i/100)}}zoomOut(){if(this.zoomService.viewZoom>10){let t=this.getPrevZoomVal();t&&this.changeZoom(t/100)}}getPrevZoomVal(){let t=[10,20,25,35,50,65,75,90,100,125,150,175,200,250,300];this.browser&&this.browser.name.includes("safari")&&(t=[10,20,25,35,50,65,75,90,100,125,150]);for(let i=t.length;i>-1;i--)if(this.zoomService.viewZoom>t[i])return t[i];return null}getNextZoomVal(){let t=[10,20,25,35,50,65,75,90,100,125,150,175,200,250,300];this.browser&&this.browser.name.includes("safari")&&(t=[10,20,25,35,50,65,75,90,100,125,150]);for(let i=0;i<t.length;i++)if(this.zoomService.viewZoom<t[i])return t[i];return null}}return(o=r).\u0275fac=function(t){return new(t||o)(e.rXU(ct.k),e.rXU(G.n),e.rXU(P.x),e.rXU(Ee.f),e.rXU(C.nX),e.rXU(ne.q),e.rXU(e.SKi),e.rXU(oe.f),e.rXU(dt.I),e.rXU(_e.Zg),e.rXU(Me.I),e.rXU(I.Z),e.rXU(R.u),e.rXU(Oe._),e.rXU(Ve.H),e.rXU(w.X),e.rXU(m.aZ),e.rXU(pt.w),e.rXU(mt.g),e.rXU(ut.r),e.rXU(gt.D),e.rXU(ht.B),e.rXU(_t.K),e.rXU(C.Ix),e.rXU(vt.L),e.rXU(m.qQ),e.rXU(Ie.J),e.rXU(e.sFG))},o.\u0275cmp=e.VBU({type:o,selectors:[["app-video-template-editor-ui"]],viewQuery:function(t,i){if(1&t&&(e.GBs(dr,7),e.GBs(pr,7),e.GBs(mr,7),e.GBs(ur,7),e.GBs(gr,7),e.GBs(hr,7),e.GBs(_r,7),e.GBs(vr,7),e.GBs(fr,5),e.GBs(br,5),e.GBs(Cr,5)),2&t){let s;e.mGM(s=e.lsd())&&(i.canvasWrapper=s.first),e.mGM(s=e.lsd())&&(i.canvasMaskWrapper=s.first),e.mGM(s=e.lsd())&&(i.mainCanvas=s.first),e.mGM(s=e.lsd())&&(i.canvasMaskWrapperLoaded=s.first),e.mGM(s=e.lsd())&&(i.canvasBackground=s.first),e.mGM(s=e.lsd())&&(i.canvasPreview=s.first),e.mGM(s=e.lsd())&&(i.page=s.first),e.mGM(s=e.lsd())&&(i.videoheader=s.first),e.mGM(s=e.lsd())&&(i.scrollContent=s.first),e.mGM(s=e.lsd())&&(i.editNavInner=s),e.mGM(s=e.lsd())&&(i.editNavUpper=s)}},hostBindings:function(t,i){1&t&&e.bIt("visibilitychange",function(a){return i.onvisibilitychange(a)},!1,e.EBC)("beforeunload",function(a){return i.unloadNotification(a)},!1,e.tSv)("keydown",function(a){return i.handleKeyboardEventDown(a)},!1,e.tSv)},features:[e.Jv_([I.Z,P.x,w.X,{provide:G.n,useClass:G.B},rt.D,Ie.J]),e.Vt3],decls:94,vars:61,consts:[["page",""],["videoheader",""],["canvasWrapper",""],["canvasMaskWrapperLoaded",""],["canvasMaskWrapper",""],["mainCanvas",""],["canvasPreview",""],["canvasBackground",""],["editNavUpper",""],["editNavInner",""],["editNavContent",""],["scrollContent",""],[1,"page","video-editor"],[1,"position-relative"],[3,"projectId","projectName","activeTool"],["id","editor-view",1,"editor-view",3,"ngClass"],[1,"row","m-0","h-100","g-0",3,"ngClass"],[1,"col-i","left-panel",3,"ngClass"],[1,"row","m-0","h-100","g-0"],[1,"col-i","navs","h-100","d-flex","justify-content-center"],[1,"w-100",3,"toggleSliderEvent","activeTool","sldBtn","projectType","tools"],[1,"col-i","navs-drawer","h-100","overflow-hidden",3,"hidden"],["class","drawer-container h-100 col-animate",3,"ngSwitch","click",4,"ngIf"],[1,"col-i","wrapper-for-timeline",2,"position","relative",3,"click","ngClass"],["style","position:absolute;z-index:99;\n              margin-top: 16px;height:calc(100% - 14rem)","class","d-flex flex-column text-center justify-content-center ps-2",4,"ngIf"],[1,"row","no-margin","main-content","position-relative",2,"display","inline-flex","width","100%"],[1,"canvas-wrapper","ps-0","pe-0"],[1,"canvas-mask-wrapper","not-loaded"],[2,"width","fit-content","margin","auto","position","relative","height","auto","max-height","100%"],["class","position-absolute w-100","style","bottom: 20px; z-index: 99;",4,"ngIf"],["id","vmx-canvas"],["class","text-normal text-semi","style","position: absolute;\n                    top: 45%;\n                    left: 45%;",4,"ngIf"],[1,"canvas-loader",3,"click","hidden"],[2,"z-index","999","position","absolute","top","0"],["class","canvas-progress",4,"ngIf"],["class","canvas-progress ","style","background:transparent;opacity: 1;display: flex;",4,"ngIf"],["class","loader",4,"ngIf"],[1,"d-flex","flex-column","canvas-action-right","ps-0","pe-0",2,"width","auto","top","calc((100% - 0rem - 220px) / 2)"],[1,"canvas-action-btn"],[1,"mt-1"],["placement","left","ngbTooltip","Bring Forward","tooltipClass","tooltip-custom-all min-97",1,"btn-blank","pointer","hw-40",3,"click","disabled","ngClass"],["name","layerup",1,"f-24"],["placement","left","ngbTooltip","Send Backward","tooltipClass","tooltip-custom-all min-100",1,"btn-blank","pointer","hw-40",3,"click","disabled","ngClass"],["name","layerdown",1,"f-24"],["placement","left","ngbTooltip","Duplicate","tooltipClass","tooltip-custom-all",1,"btn-blank","pointer","hw-40",3,"click","disabled","ngClass"],["name","duplicatenew",1,"f-24"],[1,"mt-1","mb-1"],["placement","left","ngbTooltip","Delete","tooltipClass","tooltip-custom-all",1,"btn-blank","pointer","hw-40",3,"click","disabled","ngClass"],["name","deletecommon",1,"f-24"],[1,"bottom-panel-wrapper",2,"margin-left","3.2px"],["ngbDropdown","",1,"d-flex","flex-column","canvas-action-right","v-action-editor","dropdown"],["ngbDropdownMenu","","aria-labelledby","dropdownBasic1",1,"zoom-inner","me-2"],[1,"d-flex","align-items-center","p-1","h-48"],[1,"master-slider","d-flex","align-items-center"],[1,"zoom-v-editor",3,"changeZoom"],["placement","top","ngbTooltip","Fit to timeline","tooltipClass","tooltip-custom-all",1,"btn-blank","hw-40","ms-2",3,"click"],["name","fillfit",1,"f-24"],[1,"canvas-action-btn","me-2"],[1,"list-unstyled"],["placement","top","ngbTooltip","Undo","tooltipClass","tooltip-custom-all",1,"btn-blank","hw-40","me-1",3,"click","ngClass"],["name","undo",1,"f-24"],["placement","top","ngbTooltip","Redo","tooltipClass","tooltip-custom-all",1,"btn-blank","hw-40","ms-1",3,"click","ngClass"],["name","redo",1,"f-24"],[1,"btn-blank","hw-40",3,"click","ngClass"],["class","hw-40 d-flex align-items-center justify-content-center","placement","top","ngbTooltip","Show Grid","tooltipClass","tooltip-custom-all",4,"ngIf"],["class","hw-40 d-flex align-items-center justify-content-center","placement","top","ngbTooltip","Hide Grid","tooltipClass","tooltip-custom-all",4,"ngIf"],[1,"canvas-action-btn","bg-hide"],[1,"d-flex","align-items-center","justify-content-center","hw-40"],["id","dropdownBasic1","ngbDropdownToggle","",1,"btn-blank","hw-40"],["name","zoominout",1,"f-24"],["placement","top","ngbTooltip","Close","tooltipClass","tooltip-custom-all",1,"btn-blank","close",2,"display","none"],["name","offerclose",1,"f-24"],[1,"collapse-header"],[1,"d-flex"],[1,"col-xs-6","col-sm-6","col-md-6","col-lg-6","col-xl-6","d-flex","align-items-center","p-0"],[1,"btn-scene-container"],["class","btn-all p-0 btn-icon text-primary","style","border-radius: 50%;","placement","top","ngbTooltip","Play Scene","tooltipClass","tooltip-custom-all","container","body",3,"disabled","click",4,"ngIf"],["class","btn-all p-0 btn-icon text-primary","placement","top","ngbTooltip","Pause Scene","tooltipClass","tooltip-custom-all","container","body",3,"click",4,"ngIf"],["class","btn-all icon mutebtn ml-9 p-0",3,"click",4,"ngIf"],["class","ms-2 audio-des",4,"ngIf"],[1,"col-xs-6","col-sm-6","col-md-6","col-lg-6","col-xl-6","p-0",2,"display","grid"],["class","d-flex align-items-center justify-content-end",4,"ngIf"],[1,"row","bottom-panel","no-margin"],["class","timeline full ps-0 pe-0",4,"ngIf"],[1,"drawer-container","h-100","col-animate",3,"click","ngSwitch"],[1,"child-drawer",3,"ngClass"],[3,"editorType","progressChanged",4,"ngSwitchCase"],[4,"ngSwitchCase"],[3,"activePane",4,"ngSwitchCase"],[3,"isHistory","sceneAudio","sceneResized",4,"ngSwitchCase"],[3,"inBackgroun
1dAdjustMode","createScratch","executeAction","generatedImage",4,"ngSwitchCase"],[3,"activePane","activePaneChange",4,"ngSwitchCase"],[3,"inBackgroundAdjustMode","activePane","activeObject","executeAction",4,"ngSwitchCase"],[3,"inBackgroundAdjustMode","executeAction","videoEditMute","sceneResized","videoEditScaledOrPanned",4,"ngSwitchCase"],[3,"activePane","activeObject",4,"ngSwitchCase"],[3,"activeObject",4,"ngSwitchCase"],[3,"progressChanged","editorType"],[3,"activePane"],[3,"sceneAudio","sceneResized","isHistory"],[3,"executeAction","generatedImage","inBackgroundAdjustMode","createScratch"],[3,"activePaneChange","activePane"],[3,"executeAction","inBackgroundAdjustMode","activePane","activeObject"],[3,"executeAction","videoEditMute","sceneResized","videoEditScaledOrPanned","inBackgroundAdjustMode"],[3,"activePane","activeObject"],[3,"activeObject"],[1,"d-flex","flex-column","text-center","justify-content-center","ps-2",2,"position","absolute","z-index","99","margin-top","16px","height","calc(100% - 14rem)"],[1,"d-flex","flex-column","text-center","justify-content-center","verticle-scroll","editNavInner",2,"align-self","start","position","relative","width","100%","max-height","100%"],["class","btn-up",3,"click",4,"ngIf"],["track","all",1,"canvas-action-left-tools","text-semi"],[3,"ngClass","ngStyle"],[3,"class","ngClass","click",4,"ngFor","ngForOf"],["class","btn-down",3,"click",4,"ngIf"],["class","canvas-action-left-tools sub-panel",3,"mousedown",4,"ngIf"],["class","canvas-action-left-tools sub-panel",4,"ngIf"],[1,"btn-up",3,"click"],["name","arrownext",1,"f-16"],[3,"click","ngClass"],["placement","top",1,"mt-3",3,"ngClass"],[1,"f-24",3,"name"],[1,"btn-down",3,"click"],["name","arrowprev",1,"f-16"],[1,"canvas-action-left-tools","sub-panel",3,"mousedown"],[3,"activeObject","verticalOrientation"],[1,"canvas-action-left-tools","sub-panel"],[3,"verticalOrientation","imageFilterUtil"],[1,"position-absolute","w-100",2,"bottom","20px","z-index","99"],[1,"btn","btn-primary","btn-h40","align-items-center","text-13",2,"border-radius","20px","padding","0.35rem 1rem","display","inline-flex"],["name","dragImageOpen",1,"f-28","me-1"],[1,"text-normal","text-semi",2,"position","absolute","top","45%","left","45%"],[1,"canvas-progress"],[1,"inner"],["role","status",1,"spinner-border","spinner-border-lg"],[1,"sr-only","text-nowrap","border-0","position-absolute","overflow-hidden"],[1,"canvas-progress",2,"background","transparent","opacity","1","display","flex"],[1,"pi-overlay-backdrop"],[1,"dl-progress","p-12"],["type","primary","textType","white",3,"value","showValue"],[1,"d-block","text-normal","text-bold"],[1,"btn","btn-outline-primary","h-40","mt-10","text-normal",2,"width","150px",3,"click"],[1,"loader"],[1,"cdk-overlay-backdrop","cdk-overlay-dark-backdrop","cdk-overlay-backdrop-showing"],[1,"loader-inner"],["placement","top","ngbTooltip","Show Grid","tooltipClass","tooltip-custom-all",1,"hw-40","d-flex","align-items-center","justify-content-center"],["name","gridiconnew",1,"f-24",2,"color","#272B34"],["placement","top","ngbTooltip","Hide Grid","tooltipClass","tooltip-custom-all",1,"hw-40","d-flex","align-items-center","justify-content-center"],["name","gridiconnew",1,"f-24",2,"color","#626ADF !important"],["placement","top","ngbTooltip","Play Scene","tooltipClass","tooltip-custom-all","container","body",1,"btn-all","p-0","btn-icon","text-primary",2,"border-radius","50%",3,"click","disabled"],["name","playscene",1,"icon","f-32"],["placement","top","ngbTooltip","Pause Scene","tooltipClass","tooltip-custom-all","container","body",1,"btn-all","p-0","btn-icon","text-primary",3,"click"],["name","pausescene",1,"icon","f-32"],[1,"btn-all","icon","mutebtn","ml-9","p-0",3,"click"],["placement","top","ngbTooltip","Unmute","tooltipClass","tooltip-custom-all","container","body",4,"ngIf"],["placement","top","ngbTooltip","Mute","tooltipClass","tooltip-custom-all","container","body",4,"ngIf"],["placement","top","ngbTooltip","Unmute","tooltipClass","tooltip-custom-all","container","body"],["name","unmute",1,"f-24"],["placement","top","ngbTooltip","Mute","tooltipClass","tooltip-custom-all","container","body"],["name","mute",1,"f-24"],[1,"ms-2","audio-des"],["class","audio-n text-semi text-primary me-3",4,"ngIf"],["class","audio-t",4,"ngIf"],["class","text-normal ml-9 grey-300",4,"ngIf"],[1,"audio-n","text-semi","text-primary","me-3"],[1,"audio-t"],[1,"text-normal","ml-9","grey-300"],[1,"d-flex","align-items-center","justify-content-end"],[1,"scene-number","text-normal","scene-number","text-normal","grey-300"],[1,"text-primary","font-weight-bold"],[1,"ms-2","me-2"],[1,"text-dark"],[1,"text-dark","font-weight-bold"],["placement","top","ngbTooltip","Delete Scene","tooltipClass","tooltip-custom-all",1,"ms-3","border-0","p-0","bg-transparent","pointer",3,"click","ngClass","disabled"],["name","deletecommon",1,"stroke-color","f-24"],[1,"pointer","ms-3",3,"click"],["placement","left","ngbTooltip","Collapse","tooltipClass","tooltip-custom-all","container","body",4,"ngIf"],["placement","left","ngbTooltip","Expand","tooltipClass","tooltip-custom-all","container","body",4,"ngIf"],["placement","left","ngbTooltip","Collapse","tooltipClass","tooltip-custom-all","container","body"],["name","collapse",1,"f-32"],["placement","left","ngbTooltip","Expand","tooltipClass","tooltip-custom-all","container","body"],["name","expand",1,"f-32"],[1,"row","no-margin"],["class","d-flex align-items-center w-auto ps-0 pe-0",4,"ngIf"],["class","d-flex align-items-center ps-0 ms-3 w-auto pe-0",4,"ngIf"],["class","pointer ms-3 w-auto ps-0 pe-0",3,"click",4,"ngIf"],[1,"d-flex","align-items-center","w-auto","ps-0","pe-0"],["name","unmute",1,"f-24","me-3"],[1,"opacity-slider",2,"width","58px",3,"change","value","min","max"],[1,"d-flex","align-items-center","ps-0","ms-3","w-auto","pe-0"],["type","text","suffix","%","mask","000",1,"form-control","form-control-sm","text-center","text-normal","text-black","form-input-sm",2,"width","44px",3,"ngModelChange","ngModel"],[1,"pointer","ms-3","w-auto","ps-0","pe-0",3,"click"],[1,"timeline","full","ps-0","pe-0"],[3,"selectedSceneIndex","changing","timelineView","ngClass"],[3,"openEditTool","selectedSceneIndex","changing","timelineView","mediaType","sldBtn","ngClass"]],template:function(t,i){if(1&t){const s=e.RV6();e.j41(0,"div",12,0),e.nrm(2,"app-top-strip",13)(3,"editor-header",14,1),e.j41(5,"div",15)(6,"div",16)(7,"aside",17)(8,"div",18)(9,"div",19)(10,"toolbar-navigation",20),e.bIt("toggleSliderEvent",function(l){return e.eBV(s),e.Njj(i.toggleSliderOpen(l))}),e.k0s()(),e.j41(11,"div",21),e.DNE(12,$r,22,46,"div",22),e.k0s()()(),e.j41(13,"div",23),e.bIt("click",function(l){return e.eBV(s),e.Njj(i.canvasWrapperClick(l))}),e.DNE(14,Zr,14,11,"div",24),e.j41(15,"div",25)(16,"div",26,2)(18,"div",27,3)(20,"div",28,4)(22,"div"),e.DNE(23,Kr,4,0,"div",29),e.j41(24,"canvas",30,5),e.EFF(26," Your browser does not support the HTML5 canvas tag. "),e.k0s(),e.DNE(27,Jr,2,0,"div",31),e.k0s(),e.j41(28,"div",32),e.bIt("click",function(){return e.eBV(s),e.Njj(i.stopAnimate())}),e.nrm(29,"div",33,6),e.k0s(),e.DNE(31,Qr,5,0,"div",34),e.k0s()(),e.DNE(32,qr,9,2,"div",35)(33,ea,3,0,"div",36),e.nrm(34,"div",33,7),e.k0s(),e.j41(36,"div",37)(37,"div",38)(38,"ul")(39,"li",39)(40,"button",40),e.bIt("click",function(){return e.eBV(s),e.Njj(i.moveUp())}),e.nrm(41,"ei",41),e.k0s()(),e.j41(42,"li",39)(43,"button",42),e.bIt("click",function(){return e.eBV(s),e.Njj(i.moveDown())}),e.nrm(44,"ei",43),e.k0s()(),e.j41(45,"li",39)(46,"button",44),e.bIt("click",function(){return e.eBV(s),e.Njj(i.duplicate())}),e.nrm(47,"ei",45),e.k0s()(),e.j41(48,"li",46)(49,"button",47),e.bIt("click",function(){return e.eBV(s),e.Njj(i.deleteDesignItem())}),e.nrm(50,"pi",48),e.k0s()()()()()(),e.j41(51,"div",49)(52,"div",50)(53,"div",51)(54,"div",52)(55,"div",53)(56,"zoom-select",54),e.bIt("changeZoom",function(l){return e.eBV(s),e.Njj(i.changeZoom(l))}),e.k0s()(),e.j41(57,"button",55),e.bIt("click",function(){return e.eBV(s),e.Njj(i.changeZoom(0))}),e.nrm(58,"pi",56),e.k0s()()(),e.j41(59,"div",57)(60,"ul",58)(61,"li")(62,"button",59),e.bIt("click",function(){return e.eBV(s),e.Njj(i.undo())}),e.nrm(63,"pi",60),e.k0s(),e.j41(64,"button",61),e.bIt("click",function(){return e.eBV(s),e.Njj(i.redo())}),e.nrm(65,"pi",62),e.k0s()()()(),e.j41(66,"div",57)(67,"ul")(68,"li")(69,"button",63),e.bIt("click",function(){return e.eBV(s),e.Njj(i.showGrid())}),e.DNE(70,ta,2,0,"div",64)(71,ia,2,0,"div",65),e.k0s()()()(),e.j41(72,"div",66)(73,"ul")(74,"li",67)(75,"button",68),e.nrm(76,"ei",69),e.k0s(),e.j41(77,"button",70),e.nrm(78,"pi",71),e.k0s()()()()(),e.j41(79,"div",72)(80,"div",73)(81,"div",74)(82,"div",75),e.DNE(83,na,2,1,"button",76)(84,oa,2,0,"button",77)(85,aa,3,2,"button",78),e.k0s(),e.DNE(86,pa,4,3,"div",79),e.k0s(),e.j41(87,"div",80),e.DNE(88,ga,18,14,"div",81)(89,va,10,5,"div",81)(90,Ta,5,3,"div",81),e.k0s()()(),e.j41(91,"div",82),e.DNE(92,ja,2,6,"div",83)(93,Pa,2,8,"div",83),e.k0s()()()()()()}2&t&&(e.R7$(3),e.Y8G("projectId",i.projectId)("projectName",null==i.sceneController.design?null:i.sceneController.design.name)("activeTool",i.activeToolPanel),e.R7$(2),e.Y8G("ngClass",e.eq3(42,xr,i.timelineCollapse)),e.R7$(),e.Y8G("ngClass",e.eq3(44,kr,i.isLayersVisible)),e.R7$(),e.Y8G("ngClass",i.sldBtn?"":"widthAdded"),e.R7$(3),e.Y8G("activeTool",i.activeToolPanel)("sldBtn",i.sldBtn)("projectType",i.projectType)("tools",i.navTools),e.R7$(),e.Y8G("hidden",!i.sldBtn),e.R7$(),e.Y8G("ngIf",i.activeToolPanel),e.R7$(),e.Y8G("ngClass",i.sldBtn?"":"widthRemoved"),e.R7$(),e.Y8G("ngIf",i.editNavs&&i.editNavs.length>0),e.R7$(9),e.Y8G("ngIf",i.dragImageOpenFlag),e.R7$(4),e.Y8G("ngIf",!i.isLoaded),e.R7$(),e.Y8G("hidden",!i.isScenePlaying),e.R7$(3),e.Y8G("ngIf",i.sceneController.inProgress),e.R7$(),e.Y8G("ngIf",i.sceneController.inProgressCount>-1),e.R7$(),e.Y8G("ngIf",i.inProgress),e.R7$(7),e.Y8G("disabled",!i.activeObject||!i.activeObject.isZorderEditable())("ngClass",e.eq3(46,J,!i.activeObject)),e.R7$(3),e.Y8G("disabled",!i.activeObject||!i.activeObject.isZorderEditable())("ngClass",e.eq3(48,J,!i.activeObject)),e.R7$(3),e.Y8G("disabled",!i.activeObject||!i.activeObject.isDuplicatable())("ngClass",e.eq3(50,J,!i.activeObject)),e.R7$(3),e.Y8G("disabled",!i.activeObject||!i.activeObject.isDeletable())("ngClass",e.eq3(52,J,!i.activeObject)),e.R7$(13),e.Y8G("ngClass",e.eq3(54,et,!i.undoable)),e.R7$(2),e.Y8G("ngClass",e.eq3(56,et,!i.redoable)),e.R7$(5),e.Y8G("ngClass",e.l_i(58,Tr,i.isGrid,!i.showGrid)),e.R7$(),e.Y8G("ngIf",!i.isGrid),e.R7$(),e.Y8G("ngIf",i.isGrid),e.R7$(12),e.Y8G("ngIf",i.stopAnimation),e.R7$(),e.Y8G("ngIf",!i.stopAnimation),e.R7$(),e.Y8G("ngIf","scene"===i.timelineView),e.R7$(),e.Y8G("ngIf","music"===i.timelineView),e.R7$(2),e.Y8G("ngIf","scene"===i.timelineView&&i.projectType!=i.ProjectTypeNum.VideoEditor),e.R7$(),e.Y8G("ngIf","scene"===i.timelineView&&i.projectType===i.ProjectTypeNum.VideoEditor),e.R7$(),e.Y8G("ngIf","music"===i.timelineView),e.R7$(2),e.Y8G("ngIf",i.projectType!=i.ProjectTypeNum.VideoEditor),e.R7$(),e.Y8G("ngIf",i.projectType==i.ProjectTypeNum.VideoEditor))},dependencies:[m.YU,m.Sq,m.bT,m.B3,m.ux,m.e1,_.tg,_.do,_.U0,_.EH,_.md,S.me,S.BC,S.vS,V.d1,N.Zr,ft.y,bt.V,Ct.u,M.b,xt.T,kt.i,Tt.y,jt.G,Pt.g,St.h,Ai,tn,nn.C,Ne.N,on.P,sn.R,rn.I,an.U,ln.Z,K.KK,_n,co,$o,lr,cr,$.EX,$.J_],styles:[".loaded[_ngcontent-%COMP%]{box-shadow:0 0 12px #0000001a}.editor-view[_ngcontent-%COMP%]{min-width:920px}.btn-play[_ngcontent-%COMP%]{border-radius:50%;padding:10px;background:url(https://static.lightxeditor.com/assets/icons/play.svg) no-repeat}.canvas-loader[_ngcontent-%COMP%], .scene-preview-back[_ngcontent-%COMP%]{position:fixed;width:100%;height:100%;top:0;left:0;background:#000c;z-index:10000}.collapse-header[_ngcontent-%COMP%]{padding:1rem;border-bottom:solid 2px #e2e2e6}.canvas-wrapper[_ngcontent-%COMP%]{text-align:center;justify-content:center;display:flex}.timeline[_ngcontent-%COMP%]{width:100%}
1.canvas-mask-wrapper[_ngcontent-%COMP%]{display:flex;width:100%;height:100%;min-width:0;min-height:0;box-sizing:border-box;scrollbar-gutter:stable}.layer-text[_ngcontent-%COMP%]{position:absolute;margin-top:64px}.scene-preview-back[_ngcontent-%COMP%]{position:fixed;width:100%;height:100%;top:0;left:0;background:#000c;z-index:10000}.bottom-panel-wrapper[_ngcontent-%COMP%]{background:#fff;border-radius:12px 12px 0 0;box-shadow:0 0 12px #0000001a}.collapse-header[_ngcontent-%COMP%]{padding:11px;border-bottom:1px solid #E2E3E9}.timeline-canvas-wrapper[_ngcontent-%COMP%]{width:calc(100% - 51px);height:200px;overflow-x:auto}.bottom-panel[_ngcontent-%COMP%]{width:100%;display:block;background:#fff;overflow:hidden}.canvas-mask-wrapper[_ngcontent-%COMP%]{display:flex;width:100%;height:100%;min-width:0;min-height:0;overflow:auto;box-sizing:border-box;scrollbar-gutter:stable}.time-duration-container[_ngcontent-%COMP%]{border-radius:6px;width:118px;height:40px;background-color:#fff;border:solid 2px #475ae7}.time-duration-container[_ngcontent-%COMP%]   .btn[_ngcontent-%COMP%]{padding:0rem .5rem}.time-duration-container[_ngcontent-%COMP%]   .btn.textblue[_ngcontent-%COMP%]{color:#475ae7}.widthAdded[_ngcontent-%COMP%]{width:7rem}.widthRemoved[_ngcontent-%COMP%]{width:calc(100% - 8rem)}.layers-on[_ngcontent-%COMP%]   .widthRemoved[_ngcontent-%COMP%]{width:calc(100% - 14.5rem)}.active[_ngcontent-%COMP%]{background:#626adf!important;border-radius:16px!important;color:#fff!important}.opacityactive[_ngcontent-%COMP%]{background:#626adf1a!important;color:#626adf!important;border-radius:16px!important}.opacitytext[_ngcontent-%COMP%], .nav-title-text[_ngcontent-%COMP%]{color:#626adf!important}.btn-bottom[_ngcontent-%COMP%]{width:40px;height:40px;padding:0rem;border-radius:12px;background:transparent}.canvas-progress[_ngcontent-%COMP%]{z-index:999;position:absolute;top:0;height:100%;width:100%;background:#fff;opacity:.7}.canvas-progress[_ngcontent-%COMP%]   .inner[_ngcontent-%COMP%]{color:#898b8a;position:absolute;top:45%;left:45%}.dl-progress[_ngcontent-%COMP%]{width:320px;margin:auto;position:relative;background:#fff;opacity:.95}.pi-overlay-backdrop[_ngcontent-%COMP%]{position:fixed;height:100%;width:100%;top:0;left:0;background:#000c}.canvas-wrapper[_ngcontent-%COMP%]{position:relative}.audio-des[_ngcontent-%COMP%]   .audio-n[_ngcontent-%COMP%]{font-size:16px;line-height:22px}.audio-des[_ngcontent-%COMP%]   .audio-t[_ngcontent-%COMP%]{font-size:14px;line-height:19px;color:#000}.v-action-editor[_ngcontent-%COMP%]{bottom:208px;flex-direction:row!important;height:auto;top:auto;right:13px;z-index:5}.v-action-editor[_ngcontent-%COMP%]   .canvas-action-btn[_ngcontent-%COMP%]{width:auto;background:#fffc;box-shadow:none}.v-action-editor[_ngcontent-%COMP%]   .zoom-inner[_ngcontent-%COMP%]{position:absolute!important;z-index:9999;width:auto;border-radius:12px;background:#fff;box-shadow:0 4px 8px #0000000d;transform:none!important;height:auto!important;padding:0!important;inset:auto!important;right:40px!important;top:-4px!important;border:0px;min-width:148px}.v-action-editor[_ngcontent-%COMP%]   .zoom-inner[_ngcontent-%COMP%]   .master-slider[_ngcontent-%COMP%]{background:#626adf0d;border-radius:12px}.v-action-editor[_ngcontent-%COMP%]   .zoom-inner[_ngcontent-%COMP%]   .master-slider[_ngcontent-%COMP%]   .range-slide[_ngcontent-%COMP%]{width:136px}.v-action-editor[_ngcontent-%COMP%]   .close[_ngcontent-%COMP%]{background:#272b34cc;border-radius:50%;width:32px;height:32px;background-size:contain;padding:0;border:0px;transition:all .3s ease}.v-action-editor[_ngcontent-%COMP%]   .close[_ngcontent-%COMP%]:hover{background:#272b34;transition:all .3s ease}#vmx-canvas[_ngcontent-%COMP%]{filter:drop-shadow(0px 0px 12px rgba(0,0,0,.1))}.show.dropdown[_ngcontent-%COMP%]   .bg-hide[_ngcontent-%COMP%]{background-color:transparent}.show.dropdown[_ngcontent-%COMP%]   button.dropdown-toggle[_ngcontent-%COMP%]{display:none}.show.dropdown[_ngcontent-%COMP%]   .close[_ngcontent-%COMP%]{display:block!important}"]}),r})(),canDeactivate:[v.M]}];let wa=(()=>{var o;class r{}return(o=r).\u0275fac=function(t){return new(t||o)}
1,o.\u0275mod=e.$C({type:o}),o.\u0275inj=e.G2t({imports:[C.iI.forChild(Sa),C.iI]}),r})();var ya=d(77183),Ia=d(30832);let Ea=(()=>{var o;class r{}return(o=r).\u0275fac=function(t){return new(t||o)},o.\u0275mod=e.$C({type:o}),o.\u0275inj=e.G2t({providers:[{provide:L.a7,useClass:re.z,multi:!0},A._,ce._,O.d,_e.Zg,(0,L.$R)((0,L.Sx)())],imports:[m.MD,q.G,_.UN,S.YN,S.X1,wa,ae.s,ee.RI,B.MQ,V.di,N.mB.forRoot(),le.YG,te.y,de.R,pe.r,me.K,ue.S,T.K,ya.f,_.zH,Ia._,K.v9]}),r})()},73744:(nt,Q,d)=>{d.d(Q,{S:()=>ue});var m=d(54438),S=d(92452),q=d(24886),ee=d(68465),L=d(32764),re=d(68010),_=d(74710),ae=d(87052),B=d(60177),V=d(33391),N=d(68064);const le=T=>[T],te=T=>({menuItemSelected:T});function A(T,O){if(1&T){const C=m.RV6();m.j41(0,"a",19),m.bIt("click",function(f){m.eBV(C);const P=m.XpG().$implicit,w=m.XpG(2).$implicit,I=m.XpG();return m.Njj(I.btnClick(P,w.categoryId,f))}),m.j41(1,"span",20),m.EFF(2),m.k0s()()}if(2&T){const C=m.XpG().$implicit,v=m.XpG(3);m.Y8G("routerLink",m.eq3(3,le,v.urlPart+C.productAlias))("ngClass",m.eq3(5,te,C.displayName==v.displayName)),m.R7$(2),m.JRh(C.displayName)}}function ce(T,O){if(1&T){const C=m.RV6();m.j41(0,"a",21),m.bIt("click",function(){m.eBV(C);const f=m.XpG().$implicit,P=m.XpG(2).$implicit,w=m.XpG();return m.Njj(w.btnClick(f,P.categoryId,""))}),m.j41(1,"span",20),m.EFF(2),m.k0s()()}if(2&T){const C=m.XpG().$implicit,v=m.XpG(3);m.Y8G("ngClass",m.eq3(2,te,C.displayName==v.displayName)),m.R7$(2),m.JRh(C.displayName)}}function de(T,O){if(1&T&&(m.j41(0,"div",16),m.DNE(1,A,3,7,"a",17)(2,ce,3,4,"a",18),m.k0s()),2&T){const C=O.$implicit,v=m.XpG(3);m.Y8G("id",C.productId),m.R7$(),m.Y8G("ngIf",v.addRouterLink),m.R7$(),m.Y8G("ngIf",!v.addRouterLink)}}function pe(T,O){if(1&T&&(m.j41(0,"div",14),m.DNE(1,de,3,3,"div",15),m.k0s()),2&T){const C=m.XpG().$implicit;m.R7$(),m.Y8G("ngForOf",C.subMenus)}}function me(T,O){if(1&T&&(m.j41(0,"div",2)(1,"div",3)(2,"div",4)(3,"button",5)(4,"div",6),m.EFF(5),m.k0s()(),m.j41(6,"button",7)(7,"span",8),m.nrm(8,"pi",9),m.k0s(),m.j41(9,"span",10),m.nrm(10,"pi",11),m.k0s()()()(),m.j41(11,"div",12)(12,"div",13),m.DNE(13,pe,2,1,"ng-template"),m.k0s()()()),2&T){const C=O.$implicit,v=m.XpG();m.Mz_("ngbAccordionItem","text-panel-",C.categoryId,""),m.Y8G("collapsed",v.ActiveId!==C.categoryId),m.R7$(5),m.JRh(C.gaName)}}let ue=(()=>{var T;class O{set productId(v){this._productId=v,this.setActiveId()}get productId(){return this._productId}constructor(v,f,P,w){this.templateService=v,this.authService=f,this.router=P,this.webService=w,this.menu=[],this.items=[],this.subItems=[],this.mainSelectedFormat=1,this.panelExpanded=!0,this.templateType=1,this.addRouterLink=!0,this.changeProduct=new m.bkB,this.isFormatedStrict=!1,this.urlPart="/",this.user=this.authService.currentUser()}ngOnInit(){this.templateType===q.If.DESIGN?(this.urlPart="/design-templates/",this.getDropDownListing(ee.KK.Product)):this.templateType===q.If.VIDEO&&(this.urlPart="/video-templates/",this.getDropDownListing(ee.KK.VideoTemplates))}login(){this.router.navigate(["/login"])}selectFirstOrDefault(){this.items.length>0?this.setFirst():setTimeout(()=>{this.setFirst()},1e3)}setFirst(){let f=this.items[0].subMenus;f.length>0&&this.btnClick(f[0],null,null)}btnClick(v,f=null,P){P&&P.stopPropagation(),this.categoryId=f,this.productId=v.productId,this.changeProduct.emit(v)}getDropDownListing(v){this.templateService.getCategoryDetails(v,0,f=>{this.items=this.webService.getCategoryDetailMenu(f.storeCategory.subCategoryList,this.isFormatedStrict,this.mainSelectedFormat),this.ActiveId||(this.setActiveId(),setTimeout(()=>{var P=document.getElementById(this.productId);P&&P.scrollIntoView()},200))},f=>{},0,S.i.Main)}setActiveId(){let v,f;if(this.productId)for(let P=0;P<this.items.length;P++){v=this.items[P],f=v.subMenus;for(let w=0;w<f.length;w++){let I=f[w].varients||[];if(I&&I.length>0){for(let G=0;G<I.length;G++)if(this.categoryId){if(I[G].productId.toString()==this.productId&&this.categoryId==v.categoryId)return this.ActiveId=v.categoryId,void(this.displayName=f[w].displayName)}else if(I[G].productId.toString()==this.productId)return this.ActiveId=v.categoryId,void(this.displayName=f[w].displayName)}else if(this.categoryId){if(f[w].productId.toString()==this.productId&&this.categoryId==v.categoryId)return this.displayName=f[w].displayName,void(this.ActiveId=v.categoryId)}else if(f[w].productId.toString()==this.productId)return this.displayName=f[w].displayName,void(this.ActiveId=v.categoryId)}}else this.displayName=""}}return(T=O).\u0275fac=function(v){return new(v||T)(m.rXU(L.I),m.rXU(re.u),m.rXU(_.Ix),m.rXU(ae.e))},T.\u0275cmp=m.VBU({type:T,selectors:[["drop-down-menu"]],inputs:{items:"items",mainSelectedFormat:"mainSelectedFormat",templateType:"templateType",addRouterLink:"addRouterLink",isFormatedStrict:"isFormatedStrict",productId:"productId"},outputs:{changeProduct:"changeProduct"},decls:2,vars:2,consts:[["ngbAccordion","",3,"closeOthers"],[3,"ngbAccordionItem","collapsed",4,"ngFor","ngForOf"],[3,"ngbAccordionItem","collapsed"],["ngbAccordionHeader",""],[1,"d-flex","align-items-center","justify-content-between","sub-item","w-100"],["type","button","ngbAccordionButton","",1,"btn-acc-title","w-100"],[1,"dropdown-toggle","toggle-link","text-lg","text-black","text-semi"],["type","button","ngbAccordionButton","",1,"btn-link","btn-collapse","p-0"],[1,"text-sm","collapse-text"],["name","dropdownArrowDown",1,"f-24","text-dark"],[1,"text-sm","expand-text"],["name","dropdownArrowUp",1,"f-24","text-dark"],["ngbAccordionCollapse",""],["ngbAccordionBody",""],[1,"content"],["class","mt-1",3,"id",4,"ngFor","ngForOf"],[1,"mt-1",3,"id"],["class","btn-dropdown text-normal text-black border-radius-12 w-100 text-start border-0 btn-h48 inner pointer d-flex align-items-center",3,"routerLink","ngClass","click",4,"ngIf"],["class","btn-dropdown text-normal text-black border-radius-12 w-100 text-start border-0 btn-h48 inner pointer d-flex align-items-center",3,"ngClass","click",4,"ngIf"],[1,"btn-dropdown","text-normal","text-black","border-radius-12","w-100","text-start","border-0","btn-h48","inner","pointer","d-flex","align-items-center",3,"click","routerLink","ngClass"],[1,"ms-4"],[1,"btn-dropdown","text-normal","text-black","border-radius-12","w-100","text-start","border-0","btn-h48","inner","pointer","d-flex","align-items-center",3,"click","ngClass"]],template:function(v,f){1&v&&(m.j41(0,"div",0),m.DNE(1,me,14,4,"div",1),m.k0s()),2&v&&(m.Y8G("closeOthers",!0),m.R7$(),m.Y8G("ngForOf",f.items))},dependencies:[B.YU,B.Sq,B.bT,V.WP,V.r6,V.tW,V.x7,V.UA,V.$R,N.b,_.Wk],styles:[".btn-dropdown[_ngcontent-%COMP%]{background:none}.btn-dropdown[_ngcontent-%COMP%]:hover{background:#626adf0d;color:#000}.btn-h48[_ngcontent-%COMP%]{white-space:nowrap;padding:0!important;height:48px!important}.menuItemSelected[_ngcontent-%COMP%]{background-color:#626adf1a!important;color:#626adf!important}"]}),O})()}}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.