1"use strict";(self.webpackChunklightx=self.webpackChunklightx||[]).push([[6901],{6901:(nt,G,p)=>{p.r(G),p.d(G,{BatchEditorUiModule:()=>Xe});var O=p(60177),R=p(74710),S=p(94329),T=p(10467),U=p(36883),F=p(16478),D=p(84412),A=p(43695),j=p(75243),t=p(54438);let y=(()=>{var s;class g{createFromCanvas(e){return(0,T.A)(function*(n,i=512,o="image/jpeg",a=.9){const c=n.width,m=n.height;if(!c||!m)throw new Error("Invalid canvas size");const h=Math.min(i/c,i/m,1),l=Math.max(1,Math.round(c*h)),d=Math.max(1,Math.round(m*h));let u=null;try{if(typeof OffscreenCanvas<"u"){const v=new OffscreenCanvas(l,d);v.getContext("2d")?.drawImage(n,0,0,c,m,0,0,l,d),u=yield v.convertToBlob?.({type:o,quality:a})}}catch{}if(!u){const v=document.createElement("canvas");v.width=l,v.height=d;const w=v.getContext("2d");w.imageSmoothingEnabled=!0,w.imageSmoothingQuality="high",w.drawImage(n,0,0,c,m,0,0,l,d),u=yield new Promise(x=>v.toBlob(x,o,a))}return{blob:u,url:URL.createObjectURL(u),width:l,height:d}}).apply(this,arguments)}}return(s=g).\u0275fac=function(e){return new(e||s)},s.\u0275prov=t.jDH({token:s,factory:s.\u0275fac}),g})();var P=p(630);let I=(()=>{var s;class g{set inProgress(e){console.log("inProgress",e),this.inProgress$.next(e)}get images(){return this._images}set images(e){this._images=e||[],this.imagesChanged$.next(this._images.length)}constructor(e,n){this.thumbnailService=e,this.createPopupService=n,this.inProgress$=new D.t(!1),this.maxUploadImages=50,this.tileSize=300,this.allowedMimeTypesList=["image/png","image/jpeg","image/pjpeg","image/webp","image/bmp"],this.allowedMimeTypes=new Set(this.allowedMimeTypesList),this.acceptedInputTypesAttr=this.allowedMimeTypesList.join(","),this._images=[],this.imagesChanged$=new D.t(0),this.activeMode=""}disposeItemResources(e){if(e){try{e.previewUrl&&URL.revokeObjectURL(e.previewUrl)}catch{}try{e.objectUrl&&URL.revokeObjectURL(e.objectUrl)}catch{}try{e.preview?.bitmap?.close?.()}catch{}e.preview&&(e.preview=void 0),e.blob&&(e.blob=void 0)}}clearAll(){try{for(const e of this._images)this.disposeItemResources(e)}finally{this.images=[]}}addFiles(e){var n=this;return(0,T.A)(function*(){const i=Array.from(e||[]),o=[],a=[],c=[];for(const h of i)if(h){if(!n.isAllowedImageFile(h)){o.push(h);continue}c.push(h)}const m=yield Promise.all(c.map(function(){var h=(0,T.A)(function*(l){try{return yield n.ensureMaxResolutionFile(l)}catch{return l}});return function(l){return h.apply(this,arguments)}}()));for(const h of m){const l=(0,U.A)(),d=URL.createObjectURL(h);a.push({id:l,file:h,objectUrl:d,name:h.name,size:h.size,crop:{x:0,y:0,w:1,h:1},status:"idle"})}if(a.length){const h=[...a,...n.images];if(h.length>n.maxUploadImages){const l=h.slice(0,n.maxUploadImages),d=h.slice(n.maxUploadImages);try{for(const u of d)n.disposeItemResources(u)}catch{}n.images=l,n.createPopupService.openWarningDialog("",F.b.message.maxUploadImagesWarningMessage,"Got it"," batch-edit-error")}else n.images=h}if(o.length){o.map(u=>u.name).slice(0,3).join(", ");const d="ERROR: Unsupported file format. Try JPG, PNG, WEBP, BMP files only.";try{n.createPopupService.openWarningDialog("",d,"Got it"," batch-edit-error")}catch{}}return a})()}ensureMaxResolutionFile(e){const n=j.lL,i=j.iB;return new Promise(o=>{const a=URL.createObjectURL(e),c=new Image;c.crossOrigin="anonymous",c.onload=()=>{A.k.checkAndResizeImage(c,(m,h,l)=>{try{URL.revokeObjectURL(a)}catch{}if(!l)return void o(e);const u=new File([l],e.name,{type:e.type||"image/jpeg"});o(u)},n,i,e.type||void 0)},c.onerror=()=>{try{URL.revokeObjectURL(a)}catch{}o(e)},c.src=a})}isAllowedImageFile(e){const n=e&&e.type?e.type.toLowerCase():"";if(n&&this.allowedMimeTypes.has(n))return!0;switch((e&&e.name?e.name:"").toLowerCase().split(".").pop()||""){case"png":case"jpg":case"jpeg":case"webp":case"bmp":return!0;default:return!1}}generatePreviewBitmaps(e){return Promise.all(e.map(n=>this.generatePreviewBitmap(n)))}generatePreviewBitmap(e){var n=this;const i=this.tileSize;return new Promise((o,a)=>{try{const c=new Image;c.crossOrigin="anonymous",c.decoding="async",c.src=e.objectUrl;const m=function(){var h=(0,T.A)(function*(){try{try{yield c.decode?.()}catch{}
1const l=c.naturalWidth||c.width,d=c.naturalHeight||c.height;if(!l||!d)return a(new Error("Failed to load image dimensions"));if(e.width=l,e.height=d,e.targetHeight=d,e.targetWidth=l,!e.frameAspectW||!e.frameAspectH){const _=(C,B)=>0===B?C:_(B,C%B),b=_(l,d)||1;e.frameAspectW=Math.max(1,Math.round(l/b)),e.frameAspectH=Math.max(1,Math.round(d/b))}void 0===e.panX&&(e.panX=0),void 0===e.panY&&(e.panY=0),void 0===e.scale&&(e.scale=1);const u=Math.min(i/l,i/d,1),f=Math.max(1,Math.round(l*u)),v=Math.max(1,Math.round(d*u));let w=null;try{w=yield createImageBitmap(c,{resizeWidth:f,resizeHeight:v,resizeQuality:"high"})}catch{const _=document.createElement("canvas");_.width=f,_.height=v;const b=_.getContext("2d");if(!b)return a(new Error("Failed to get 2D context"));b.imageSmoothingEnabled=!0,b.imageSmoothingQuality="high",b.drawImage(c,0,0,l,d,0,0,f,v),w=yield createImageBitmap(_)}const x={bitmap:w,displayWidth:f,displayHeight:v,naturalWidth:l,naturalHeight:d};try{e.preview?.bitmap?.close?.()}catch{}e.preview=x;try{const _=document.createElement("canvas");_.width=f,_.height=v;const b=_.getContext("2d");b.imageSmoothingEnabled=!0,b.imageSmoothingQuality="high",b.drawImage(w,0,0);const C=(e.file?.type||"").toLowerCase(),k=C.includes("png")||C.includes("webp")||C.includes("tif")?"image/png":"image/jpeg",E=yield n.thumbnailService.createFromCanvas(_,Math.max(f,v),k,.9);try{e.previewUrl&&URL.revokeObjectURL(e.previewUrl)}catch{}e.previewUrl=E.url}catch{}o(x)}catch(l){a(l)}});return function(){return h.apply(this,arguments)}}();c.complete?m():(c.onload=()=>m(),c.onerror=h=>a(h||new Error("Image load error")))}catch(c){a(c)}})}deleteImage(e){try{this.disposeItemResources(e)}catch{}this.images=this.images.filter(n=>n.id!==e.id)}}return(s=g).\u0275fac=function(e){return new(e||s)(t.KVO(y),t.KVO(P.A))},s.\u0275prov=t.jDH({token:s,factory:s.\u0275fac}),g})();const z=["frame"];function Y(s,g){if(1&s&&t.nrm(0,"img",4),2&s){const r=t.XpG();t.xc7("filter","blur("+r.getBlurPx()+")")("transform","scale(1.1)"),t.Y8G("src",(null==r.workingItem?null:r.workingItem.previewUrl)||(null==r.workingItem?null:r.workingItem.objectUrl),t.B4B)}}let Z=(()=>{var s;class g{constructor(){this._lastFrameWidth=0,this._lastFrameHeight=0,this._lastMaxPanXPercent=0,this._lastMaxPanYPercent=0,this.workingItem=null,this.backupItem=null,this.cssHeight="auto",this.cssWidth="auto",this.init=!1,this.isDragging=!1,this.dragStartX=0,this.dragStartY=0,this.startPanX=0,this.startPanY=0,this.allowPanX=!0,this.allowPanY=!0}ngOnInit(){this.init=!0,this.cloneWorkingItem(),this.checkAspect(),this.inferModeIfNeeded(),this.calculatePanLimits()}calculatePanLimits(){const e=this.workingItem;if(!(e&&e.width&&e.height&&e.frameAspectW&&e.frameAspectH&&this.containerWidth))return;let n=0,i=0;const o=e.frameAspectW/e.frameAspectH;e.frameAspectW>=e.frameAspectH?(n=this.containerWidth,i=this.containerWidth*e.frameAspectH/e.frameAspectW):(n=this.containerWidth*e.frameAspectW/e.frameAspectH,i=this.containerWidth);const a=e.width/e.height;let c=0,m=0;a>o?(c=n,m=n/a):a<o?(m=i,c=i*a):(c=n,m=i);const l=m*e.scale,d=Math.max(0,(c*e.scale-n)/(2*n)*100),u=Math.max(0,(l-i)/(2*i)*100);this._lastFrameWidth=n,this._lastFrameHeight=i,this._lastMaxPanXPercent=d,this._lastMaxPanYPercent=u}ngOnChanges(e){this.init&&this.item&&(e.item?(this.cloneWorkingItem(),this.inferModeIfNeeded()):e.size?(this.workingItem.targetWidth=this.size.width,this.workingItem.targetHeight=this.size.height,this.workingItem.frameAspectW=this.size.width,this.workingItem.frameAspectH=this.size.height,this.checkAspect(),this.mode||this.inferModeIfNeeded(),"fill"===this.mode?this.calForFill():(this.workingItem.scale=1,this.workingItem.panX=0,this.workingItem.panY=0,this.allowPanX=!1,this.allowPanY=!1)):e.mode?(this.mode=e.mode.currentValue,"fill"===this.mode?this.calForFill():(this.workingItem.scale=1,this.workingItem.panX=0,this.workingItem.panY=0,this.allowPanX=!1,this.allowPanY=!1)):e.backgroundColor&&(this.workingItem.backgroundColor=e.backgroundColor.currentValue??null))}computeTransform(){const e=this.workingItem?.scale??1;return`translate(${this.workingItem?.panX??0}%, ${this.workingItem?.panY??0}%) scale(${e})`}clamp(e,n,i){return Math.min(i,Math.max(n,e))}calForFill(){if(!(this.workingItem?.width&&this.workingItem?.height&&this.workingItem?.frameAspectW&&this.workingItem?.frameAspectH&&this.containerWidth))return;const e=this.workingItem.width/this.workingItem.height,n=this.workingItem.frameAspectW/this.workingItem.frameAspectH;let a,c,i=0,o=0;this.workingItem.frameAspectW>=this.workingItem.frameAspectH?(i=this.containerWidth,o=this.containerWidth*this.workingItem.frameAspectH/this.workingItem.frameAspectW):(i=this.containerWidth*this.workingItem.frameAspectW/this.workingItem.frameAspectH,o=this.containerWidth),e>n?(a=i,c=i/e):e<n?(c=o,a=o*e):(a=i,c=o),e>n?(this.workingItem.scale=o/c*1.02,this.allowPanX=!0,this.allowPanY=!1,this.workingItem.panY=0):e<n?(this.workingItem.scale=i/a*1.02,this.allowPanX=!1,this.allowPanY=!0,this.workingItem.panX=0):(this.workingItem.scale=1.02,this.allowPanX=!1,this.allowPanY=!1,this.workingItem.panX=0,this.workingItem.panY=0);const h=c*this.workingItem.scale,l=Math.max(0,(a*this.workingItem.scale-i)/(2*i)*100),d=Math.max(0,(h-o)/(2*o)*100);this.workingItem.panX=this.clamp(this.workingItem.panX??0,-l,l),this.workingItem.panY=this.clamp(this.workingItem.panY??0,-d,d),this._lastFrameWidth=i,this._lastFrameHeight=o,this._lastMaxPanXPercent=l,this._lastMaxPanYPercent=d}onPanMove(e){if(!this.isDragging)return;
1const n=this.frameRef?.nativeElement,i=n?.clientWidth||1,d=this.startPanY+(e.clientY-this.dragStartY)/(n?.clientHeight||1)*100,u=this._lastMaxPanXPercent??0,f=this._lastMaxPanYPercent??0;this.workingItem.panX=this.allowPanX?this.clamp(this.startPanX+(e.clientX-this.dragStartX)/i*100,-u,u):0,this.workingItem.panY=this.allowPanY?this.clamp(d,-f,f):0}calForFillOld(){if(!(this.workingItem?.width&&this.workingItem?.height&&this.workingItem?.frameAspectW&&this.workingItem?.frameAspectH&&this.containerWidth))return;const e=this.workingItem.width/this.workingItem.height,n=this.workingItem.frameAspectW/this.workingItem.frameAspectH;let i=0,o=0;this.workingItem.frameAspectW>=this.workingItem.frameAspectH?(i=this.containerWidth,o=this.containerWidth*this.workingItem.frameAspectH/this.workingItem.frameAspectW):(i=this.containerWidth*this.workingItem.frameAspectW/this.workingItem.frameAspectH,o=this.containerWidth),e>n?(this.workingItem.scale=o/(i/e)*1.02,this.allowPanX=!0,this.allowPanY=!1,this.workingItem.panY=0):(this.workingItem.scale=i/(o*e)*1.02,this.allowPanX=!1,this.allowPanY=!0,this.workingItem.panX=0),Math.abs(e-n)<1e-6&&(this.allowPanX=!1,this.allowPanY=!1,this.workingItem.panX=0,this.workingItem.panY=0)}onPanStart(e){"fill"===this.mode&&0===e.button&&(this.isDragging=!0,this.dragStartX=e.clientX,this.dragStartY=e.clientY,this.startPanX=this.workingItem?.panX??0,this.startPanY=this.workingItem?.panY??0,e.preventDefault(),e.stopPropagation())}onPanEnd(){this.isDragging&&(this.isDragging=!1)}checkAspect(){this.workingItem?.frameAspectW<this.workingItem?.frameAspectH?(this.cssHeight="var(--colWidth)",this.cssWidth="auto"):(this.cssHeight="auto",this.cssWidth="var(--colWidth)")}getBackgroundImage(){return this.isBlurBackground()?"none":this.workingItem.backgroundImageUrl?`url('${this.workingItem.backgroundImageUrl}')`:this.workingItem.backgroundColor?"none":"linear-gradient(45deg, #E1E1E5 25%, transparent 25%), \nlinear-gradient(-45deg, #E1E1E5 25%, transparent 25%),\nlinear-gradient(45deg, transparent 75%, #E1E1E5 75%),\nlinear-gradient(-45deg, transparent 75%, #E1E1E5 75%)"}getBackgroundColor(){return this.isBlurBackground()?null:this.workingItem.backgroundImageUrl?this.workingItem.backgroundColor||null:this.workingItem.backgroundColor||"#fff"}getBackgroundSize(){return this.workingItem.backgroundImageUrl?"cover":"16px 16px"}getBackgroundPosition(){return this.workingItem.backgroundImageUrl||this.isBlurBackground()?"center":"0 0, 0 8px, 8px -8px, -8px 0px"}isBlurBackground(){const e=this.parseNumeric(this.workingItem.backgroundColor);return 50===e||100===e}getBlurPx(){return(this.parseNumeric(this.workingItem.backgroundColor)||0)/8+"px"}parseNumeric(e){if(null==e)return null;const n="number"==typeof e?e:parseFloat(e);return Number.isFinite(n)?n:null}inferModeIfNeeded(){if(this.mode||!this.workingItem?.width||!this.workingItem?.height||!this.workingItem?.frameAspectW||!this.workingItem?.frameAspectH||!this.containerWidth)return;const e=this.workingItem.width/this.workingItem.height;let i=0,o=0;this.workingItem.frameAspectW>=this.workingItem.frameAspectH?(i=this.containerWidth,o=this.containerWidth*this.workingItem.frameAspectH/this.workingItem.frameAspectW):(i=this.containerWidth*this.workingItem.frameAspectW/this.workingItem.frameAspectH,o=this.containerWidth);let a=1;a=e>this.workingItem.frameAspectW/this.workingItem.frameAspectH?o/(i/e):i/(o*e),this.mode=(this.workingItem?.scale??1)+.02>=a?"fill":"fit"}cloneWorkingItem(){this.item?(this.backupItem=JSON.parse(JSON.stringify(this.item)),this.workingItem=this.item):(this.backupItem=null,this.workingItem={})}commitToItem(){if(!this.item||!this.workingItem)return;const e=["scale","panX","panY","frameAspectW","frameAspectH","targetWidth","targetHeight","backgroundColor","backgroundImageUrl"];for(const n of e)this.item[n]=this.workingItem[n]}restoreFromBackup(){if(!this.item||!this.backupItem)return;const e=["scale","panX","panY","frameAspectW","frameAspectH","targetWidth","targetHeight","backgroundColor","backgroundImageUrl"];for(const n of e)this.item[n]=this.backupItem[n];this.checkAspect(),this.inferModeIfNeeded(),this.calculatePanLimits()}hasChanges(){if(!this.item||!this.backupItem)return!1;const e=["scale","panX","panY","frameAspectW","frameAspectH","targetWidth","targetHeight","backgroundColor","backgroundImageUrl"];for(const i of e){const o=this.item[i],a=this.backupItem[i];if("number"==typeof o||"number"==typeof a){if(Math.abs((o??0)-(a??0))>1e-4)return!0}else if((o??null)!==(a??null))return!0}return!1}}return(s=g).\u0275fac=function(e){return new(e||s)},s.\u0275cmp=t.VBU({type:s,selectors:[["app-resize-tile"]],viewQuery:function(e,n){if(1&e&&t.GBs(z,5),2&e){let i;t.mGM(i=t.lsd())&&(n.frameRef=i.first)}},hostBindings:function(e,n){1&e&&t.bIt("mousemove",function(o){return n.onPanMove(o)},!1,t.EBC)("mouseup",function(){return n.onPanEnd()},!1,t.EBC)},inputs:{item:"item",size:"size",mode:"mode",containerWidth:"containerWidth",backgroundColor:"backgroundColor"},features:[t.OA$],decls:4,vars:20,consts:[["frame",""],[1,"resize-frame","position-relative",3,"mousedown"],["alt","","style","position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 0;",3,"src","filter","transform",4,"ngIf"],["decoding","async","loading","lazy","alt","",2,"position","relative","z-index","1","width","100%","height","100%","transform-origin","50% 50%","object-fit","contain",3,"src"],["alt","",2,"position","absolute","
1inset","0","width","100%","height","100%","object-fit","cover","z-index","0",3,"src"]],template:function(e,n){if(1&e){const i=t.RV6();t.j41(0,"div",1,0),t.bIt("mousedown",function(a){return t.eBV(i),t.Njj(n.onPanStart(a))}),t.DNE(2,Y,1,5,"img",2),t.nrm(3,"img",3),t.k0s()}2&e&&(t.tcI("overflow: hidden; width: ",n.cssWidth,"; height: ",n.cssHeight,"; max-width: 100%; margin: 0 auto;"),t.xc7("aspect-ratio",((null==n.workingItem?null:n.workingItem.frameAspectW)||1)+" / "+((null==n.workingItem?null:n.workingItem.frameAspectH)||1))("background-image",n.getBackgroundImage())("background-color",n.getBackgroundColor())("background-size",n.getBackgroundSize())("background-position",n.getBackgroundPosition())("cursor","fill"===n.mode?n.isDragging?"grabbing":n.allowPanX&&!n.allowPanY?"ew-resize":!n.allowPanX&&n.allowPanY?"ns-resize":"grab":"default"),t.R7$(2),t.Y8G("ngIf",n.isBlurBackground()),t.R7$(),t.xc7("transform",n.computeTransform()),t.Y8G("src",(null==n.workingItem?null:n.workingItem.previewUrl)||(null==n.workingItem?null:n.workingItem.objectUrl),t.B4B))},dependencies:[O.bT],encapsulation:2,changeDetection:0}),g})();function st(s,g){if(1&s&&t.nrm(0,"img",21),2&s){const r=t.XpG();t.xc7("filter","blur("+r.getBlurPx()+")")("transform","scale(1.1)"),t.Y8G("src",(null==r.item?null:r.item.previewUrl)||(null==r.item?null:r.item.objectUrl),t.B4B)}}let q=(()=>{var s;class g{constructor(e){this.cdr=e,this.cssHieght="auto",this.cssWidth="auto",this.working={x:.1,y:.1,w:.8,h:.8},this.backupCrop=null,this.drag=null}ngOnInit(){if(this.item?.frameAspectW<this.item?.frameAspectH?(this.cssHieght="var(--colWidth)",this.cssWidth="auto"):(this.cssHieght="auto",this.cssWidth="var(--colWidth)"),this.item?.crop){const{x:e,y:n,w:i,h:o}=this.item.crop;this.working={x:this.clamp(e,0,1),y:this.clamp(n,0,1),w:this.clamp(i,0,1),h:this.clamp(o,0,1)},this.normalizeWorking()}this.backupCrop=this.item?.crop?{...this.item.crop}:null}computeTransform(){const e=this.item?.scale??1;return`translate(${this.item?.panX??0}%, ${this.item?.panY??0}%) scale(${e})`}getBackgroundImage(){if(this.isBlurBackground())return"none";const e=this.item?.backgroundImageUrl;return e?`url('${e}')`:this.item?.backgroundColor?"none":"linear-gradient(45deg, #E1E1E5 25%, transparent 25%), \nlinear-gradient(-45deg, #E1E1E5 25%, transparent 25%),\nlinear-gradient(45deg, transparent 75%, #E1E1E5 75%),\nlinear-gradient(-45deg, transparent 75%, #E1E1E5 75%)"}getBackgroundColor(){if(this.isBlurBackground())return null;const e=this.item?.backgroundImageUrl,n=this.item?.backgroundColor;return e?n||null:n||"#fff"}getBackgroundSize(){return this.item?.backgroundImageUrl?"cover":"16px 16px"}getBackgroundPosition(){return this.item?.backgroundImageUrl||this.isBlurBackground()?"center":"0 0, 0 8px, 8px -8px, -8px 0px"}isBlurBackground(){const e=this.item?.backgroundColor,n=this.parseNumeric(e);return 50===n||100===n}getBlurPx(){const e=this.item?.backgroundColor;return(this.parseNumeric(e)||0)/8+"px"}parseNumeric(e){if(null==e)return null;const n="number"==typeof e?e:parseFloat(e);return Number.isFinite(n)?n:null}selectionStyle(){return{left:100*this.working.x+"%",top:100*this.working.y+"%",width:100*this.working.w+"%",height:100*this.working.h+"%"}}overlayTopStyle(){return{top:"0%",height:100*this.working.y+"%",width:"100%"}}overlayBottomStyle(){const e=100*(this.working.y+this.working.h);return{top:e+"%",height:Math.max(0,100-e)+"%",width:"100%"}}overlayLeftStyle(){return{left:"0%",width:100*this.working.x+"%",top:100*this.working.y+"%",height:100*this.working.h+"%"}}overlayRightStyle(){const e=100*(this.working.x+this.working.w);return{left:e+"%",width:Math.max(0,100-e)+"%",top:100*this.working.y+"%",height:100*this.working.h+"%"}}handleStyle(e){let i=14,o=14;"n"===e||"s"===e?(i=9,o=5):("w"===e||"e"===e)&&(i=5,o=9);const a={};return"nw"===e?(a.left=`calc(${100*this.working.x}% + 1px)`,a.top=`calc(${100*this.working.y}% + 1px)`):"ne"===e?(a.left=`calc(${100*(this.working.x+this.working.w)}% - ${i+1}px)`,a.top=`calc(${100*this.working.y}% + 1px)`):"sw"===e?(a.left=`calc(${100*this.working.x}% + 1px)`,a.top=`calc(${100*(this.working.y+this.working.h)}% - ${o+1}px)`):"se"===e?(a.left=`calc(${100*(this.working.x+this.working.w)}% - ${i+1}px)`,a.top=`calc(${100*(this.working.y+this.working.h)}% - ${o+1}px)`):"n"===e?(a.left=`calc(${100*(this.working.x+this.working.w/2)}% - ${i/2}px)`,a.top=`calc(${100*this.working.y}% + 1px)`):"s"===e?(a.left=`calc(${100*(this.working.x+this.working.w/2)}% - ${i/2}px)`,a.top=`calc(${100*(this.working.y+this.working.h)}% - ${o+1}px)`):"w"===e?(a.left=`calc(${100*this.working.x}% + 1px)`,a.top=`calc(${100*(this.working.y+this.working.h/2)}% - ${o/2}
1px)`):"e"===e&&(a.left=`calc(${100*(this.working.x+this.working.w)}% - ${i+1}px)`,a.top=`calc(${100*(this.working.y+this.working.h/2)}% - ${o/2}px)`),a}onHandleDown(e,n){let i,o;e.preventDefault(),e.stopPropagation();const a=e.target.closest(".crop-tile");if(a){const c=a.getBoundingClientRect(),m=this.clamp((e.clientX-c.left)/c.width,0,1),h=this.clamp((e.clientY-c.top)/c.height,0,1),l=this.working;let d=l.x,u=l.y;return"se"===n?(d=l.x+l.w,u=l.y+l.h):"ne"===n?(d=l.x+l.w,u=l.y):"sw"===n?(d=l.x,u=l.y+l.h):"nw"===n?(d=l.x,u=l.y):"n"===n?(d=l.x+l.w/2,u=l.y):"s"===n?(d=l.x+l.w/2,u=l.y+l.h):"w"===n?(d=l.x,u=l.y+l.h/2):"e"===n&&(d=l.x+l.w,u=l.y+l.h/2),i=m-d,o=h-u,void(this.drag={type:n,startX:e.clientX,startY:e.clientY,start:{...this.working},offsetX:i,offsetY:o,containerRect:{left:c.left,top:c.top,width:c.width,height:c.height}})}this.drag={type:n,startX:e.clientX,startY:e.clientY,start:{...this.working},offsetX:i,offsetY:o}}onSelectionDown(e){e.preventDefault(),e.stopPropagation(),this.drag={type:"move",startX:e.clientX,startY:e.clientY,start:{...this.working}}}onDocMove(e){if(!this.drag)return;const n=this.drag.containerRect;let i;if(n)i=n;
1else{const k=e.target.closest(".crop-tile");if(!k)return;const E=k.getBoundingClientRect();i={left:E.left,top:E.top,width:E.width,height:E.height}}const o=(e.clientX-this.drag.startX)/i.width,a=(e.clientY-this.drag.startY)/i.height,c=this.clamp((e.clientX-i.left)/i.width,0,1),m=this.clamp((e.clientY-i.top)/i.height,0,1),h=void 0!==this.drag.offsetX?this.clamp(c-this.drag.offsetX,0,1):c,l=void 0!==this.drag.offsetY?this.clamp(m-this.drag.offsetY,0,1):m,w=Math.max(.02,30/i.width),x=Math.max(.02,30/i.height);let{x:_,y:b,w:C,h:B}=this.drag.start;if("move"===this.drag.type){const E=this.drag.start.y+a;_=this.clamp(this.drag.start.x+o,0,1-C),b=this.clamp(E,0,1-B)}else if("nw"===this.drag.type||"ne"===this.drag.type||"sw"===this.drag.type||"se"===this.drag.type){const k=this.drag.start.h>0?this.drag.start.w/this.drag.start.h:1;let E=0,M=0;"se"===this.drag.type&&(E=_,M=b),"ne"===this.drag.type&&(E=_,M=b+B),"sw"===this.drag.type&&(E=_+C,M=b),"nw"===this.drag.type&&(E=_+C,M=b+B);const H=l-M,X=Math.abs(h-E),_t=Math.abs(H);let N,ot=1,rt=1;"se"===this.drag.type&&(ot=1-E,rt=1-M),"ne"===this.drag.type&&(ot=1-E,rt=M),"sw"===this.drag.type&&(ot=E,rt=1-M),"nw"===this.drag.type&&(ot=E,rt=M),N=_t<=1e-6?X:X/_t>=k?_t*k:X;const Ke=Math.min(ot,rt*k),Qe=Math.max(w,x*k);N=this.clamp(N,Qe,Ke);const et=N/k;"se"===this.drag.type?(_=E,b=M,C=N,B=et):"ne"===this.drag.type?(_=E,b=M-et,C=N,B=et):"sw"===this.drag.type?(_=E-N,b=M,C=N,B=et):(_=E-N,b=M-et,C=N,B=et)}else if("n"===this.drag.type){const k=this.clamp(b+a,0,b+B-x);B=this.clamp(B-(k-b),x,1),b=k}else if("s"===this.drag.type){const k=this.clamp(b+B+a,b+x,1);B=this.clamp(k-b,x,1)}else if("w"===this.drag.type){const k=this.clamp(_+o,0,_+C-w);C=this.clamp(C-(k-_),w,1),_=k}else if("e"===this.drag.type){const k=this.clamp(_+C+o,_+w,1);C=this.clamp(k-_,w,1)}_=this.clamp(_,0,1-w),b=this.clamp(b,0,1-x),C=this.clamp(C,w,1-_),B=this.clamp(B,x,1-b),this.working={x:_,y:b,w:C,h:B},this.cdr.markForCheck()}onDocUp(){this.drag&&(this.drag=null,this.item&&(this.item.crop={...this.working}))}clamp(e,n,i){return Math.min(i,Math.max(n,e))}normalizeWorking(){this.working.x=this.clamp(this.working.x,0,1),this.working.y=this.clamp(this.working.y,0,1),this.working.w=this.clamp(this.working.w,.02,1-this.working.x),this.working.h=this.clamp(this.working.h,.02,1-this.working.y)}hasChanges(){const n=this.backupCrop||{x:0,y:0,w:1,h:1},i=this.working;return Math.abs((i?.x??0)-(n?.x??0))>1e-4||Math.abs((i?.y??0)-(n?.y??0))>1e-4||Math.abs((i?.w??1)-(n?.w??1))>1e-4||Math.abs((i?.h??1)-(n?.h??1))>1e-4}setWorkingFrameAspect(e,n){if(!e||!n||e<=0||n<=0)return;const m=e/n/((this.item?.frameAspectW||1)/(this.item?.frameAspectH||1));let h,l;m>=1?(h=1,l=h/m):(l=1,h=l*m),h=this.clamp(h,.02,1),l=this.clamp(l,.02,1),this.working={x:(1-h)/2,y:(1-l)/2,w:h,h:l},this.item&&(this.item.crop={...this.working}),this.cdr.markForCheck()}setWorkingFrameAlignment(e){const n=this.working.w,i=this.working.h;let o=this.working.x,a=this.working.y;e.endsWith("l")?o=0:e.endsWith("c")?o=(1-n)/2:e.endsWith("r")&&(o=1-n),e.startsWith("t")?a=0:e.startsWith("c")?a=(1-i)/2:e.startsWith("b")&&(a=1-i),this.working.x=this.clamp(o,0,1-n),this.working.y=this.clamp(a,0,1-i),this.item&&(this.item.crop={...this.working}),this.cdr.markForCheck()}snapshotBackup(){this.backupCrop=this.item?.crop?{...this.item.crop}:null}restoreFromBackup(){this.item&&(this.backupCrop?(this.item.crop={...this.backupCrop},this.working={...this.backupCrop},this.normalizeWorking()):(this.item.crop=null,this.working={x:0,y:0,w:1,h:1}),this.cdr.markForCheck())}commitToItem(){if(!this.item)return;this.item.crop={...this.working};const o=(this.item?.frameAspectW||1)/(this.item?.frameAspectH||1)*(this.working.h>0?this.working.w/this.working.h:1);if(isFinite(o)&&o>0){let c=Math.max(1,Math.round(1e3*o)),m=1e3;const h=(d,u)=>0===u?d:h(u,d%u),l=h(c,m);c=Math.max(1,Math.round(c/l)),m=Math.max(1,Math.round(m/l)),this.item.frameAspectW=c,this.item.frameAspectH=m}}}return(s=g).\u0275fac=function(e){return new(e||s)(t.rXU(t.gRc))},s.\u0275cmp=t.VBU({type:s,selectors:[["app-crop-tile"]],hostBindings:function(e,n){1&e&&t.bIt("mousemove",function(o){return n.onDocMove(o)},!1,t.EBC)("mouseup",function(){return n.onDocUp()},!1,t.EBC)},inputs:{item:"item"},decls:21,vars:31,consts:[[1,"crop-tile","position-relative",2,"overflow","hidden","max-width","100%","margin","0 auto"],["alt","","style","position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 0;",3,"src","filter","transform",4,"ngIf"],["decoding","async","loading","lazy","alt","",2,"position","relative","z-index","1","width","100%","height","100%","transform-origin","50% 50%","object-fit","contain",3,"src"],[1,"crop-selection",2,"position","absolute","z-index","2","border","1p
1x solid #FFF","box-shadow","inset 0 0 0 1px #000","cursor","move",3,"mousedown","ngStyle"],["aria-hidden","true",2,"position","absolute","inset","0","pointer-events","none"],[2,"position","absolute","top","0","bottom","0","left","calc(33.3333% - 0.5px)","width","1px","background","repeating-linear-gradient(to bottom, #E2E3E9 0 6px, transparent 6px 12px)"],[2,"position","absolute","top","0","bottom","0","left","calc(66.6667% - 0.5px)","width","1px","background","repeating-linear-gradient(to bottom, #E2E3E9 0 6px, transparent 6px 12px)"],[2,"position","absolute","left","0","right","0","top","calc(33.3333% - 0.5px)","height","1px","background","repeating-linear-gradient(to right, #E2E3E9 0 6px, transparent 6px 12px)"],[2,"position","absolute","left","0","right","0","top","calc(66.6667% - 0.5px)","height","1px","background","repeating-linear-gradient(to right, #E2E3E9 0 6px, transparent 6px 12px)"],[1,"overlay","top",2,"position","absolute","left","0","background","rgba(0,0,0,.45)","z-index","1",3,"ngStyle"],[1,"overlay","bottom",2,"position","absolute","left","0","background","rgba(0,0,0,.45)","z-index","1",3,"ngStyle"],[1,"overlay","left",2,"position","absolute","background","rgba(0,0,0,.45)","z-index","1",3,"ngStyle"],[1,"overlay","right",2,"position","absolute","background","rgba(0,0,0,.45)","z-index","1",3,"ngStyle"],[1,"handle","nw",2,"position","absolute","width","14px","height","14px","z-index","3","cursor","nwse-resize","background-image","url('assets/svg/crop/crop_handle_top_left_new.svg')","background-repeat","no-repeat","background-size","contain","background-position","center",3,"mousedown","ngStyle"],[1,"handle","ne",2,"position","absolute","width","14px","height","14px","z-index","3","cursor","nesw-resize","background-image","url('assets/svg/crop/crop_handle_top_right_new.svg')","background-repeat","no-repeat","background-size","contain","background-position","center",3,"mousedown","ngStyle"],[1,"handle","sw",2,"position","absolute","width","14px","height","14px","z-index","3","cursor","nesw-resize","background-image","url('assets/svg/crop/crop_handle_bottom_left_new.svg')","background-repeat","no-repeat","background-size","contain","background-position","center",3,"mousedown","ngStyle"],[1,"handle","se",2,"position","absolute","width","14px","height","14px","z-index","3","cursor","nwse-resize","background-image","url('assets/svg/crop/crop_handle_bottom_right_new.svg')","background-repeat","no-repeat","background-size","contain","background-position","center",3,"mousedown","ngStyle"],[1,"handle","n",2,"position","absolute","width","9px","height","5px","z-index","3","cursor","ns-resize","background-image","url('assets/svg/crop/crop_handle_top_bottom_new.svg')","background-repeat","no-repeat","background-size","contain","background-position","top center",3,"mousedown","ngStyle"],[1,"handle","s",2,"position","absolute","width","9px","height","5px","z-index","3","cursor","ns-resize","background-image","url('assets/svg/crop/crop_handle_top_bottom_new.svg')","background-repeat","no-repeat","background-size","contain","background-position","bottom center",3,"mousedown","ngStyle"],[1,"handle","w",2,"position","absolute","width","5px","height","9px","z-index","3","cursor","ew-resize","background-image","url('assets/svg/crop/crop_handle_left_right_new.svg')","background-repeat","no-repeat","background-size","contain","background-position","left center",3,"mousedown","ngStyle"],[1,"handle","e",2,"position","absolute","width","5px","height","9px","z-index","3","cursor","ew-resize","background-image","url('assets/svg/crop/crop_handle_left_right_new.svg')","background-repeat","no-repeat","background-size","contain","background-position","right center",3,"mousedown","ngStyle"],["alt","",2,"position","absolute","inset","0","width","100%","height","100%","object-fit","cover","z-index","0",3,"src"]],template:function(e,n){1&e&&(t.j41(0,"div",0),t.DNE(1,st,1,5,"img",1),t.nrm(2,"img",2),t.j41(3,"div",3),t.bIt("mousedown",function(o){return n.onSelectionDown(o)}),t.j41(4,"div",4),t.nrm(5,"div",5)(6,"div",6)(7,"div",7)(8,"div",8),t.k0s()(),t.nrm(9,"div",9)(10,"div",10)(11,"div",11)(12,"div",12),t.j41(13,"div",13),t.bIt("mousedown",function(o){return n.onHandleDown(o,"nw")}),t.k0s(),t.j41(14,"div",14),t.bIt("mousedown",function(o){return n.onHandleDown(o,"ne")}),t.k0s(),t.j41(15,"div",15),t.bIt("mousedown",function(o){return n.onHandleDown(o,"sw")}),t.k0s(),t.j41(16,"div",16),t.bIt("mousedown",function(o){return n.onHandleDown(o,"se")}),t.k0s(),t.j41(17,"div",17),t.bIt("mousedown",function(o){return n.onHandleDown(o,"n")}),t.k0s(),t.j41(18,"div",18),t.bIt("mousedown",function(o){return n.onHandleDown(o,"s")}),t.k0s(),t.j41(19,"div",19),t.bIt("mousedown",function(o){return n.onHandleDown(o,"w")}),t.k0s(),t.j41(20,"div",20),t.bIt("mousedown",function(o){return n.onHandleDown(o,"e")}),t.k0s()()),2&e&&(t.xc7("aspect-ratio",((null==n.item?null:n.item.frameAspectW)||1)+" / "+((null==n.item?null:n.item.frameAspectH)||1))("width",n.cssWidth)("height",n.cssHieght)("background-image",n.getBackgroun
1dImage())("background-color",n.getBackgroundColor())("background-size",n.getBackgroundSize())("background-position",n.getBackgroundPosition()),t.R7$(),t.Y8G("ngIf",n.isBlurBackground()),t.R7$(),t.xc7("transform",n.computeTransform()),t.Y8G("src",(null==n.item?null:n.item.previewUrl)||(null==n.item?null:n.item.objectUrl),t.B4B),t.R7$(),t.Y8G("ngStyle",n.selectionStyle()),t.R7$(6),t.Y8G("ngStyle",n.overlayTopStyle()),t.R7$(),t.Y8G("ngStyle",n.overlayBottomStyle()),t.R7$(),t.Y8G("ngStyle",n.overlayLeftStyle()),t.R7$(),t.Y8G("ngStyle",n.overlayRightStyle()),t.R7$(),t.Y8G("ngStyle",n.handleStyle("nw")),t.R7$(),t.Y8G("ngStyle",n.handleStyle("ne")),t.R7$(),t.Y8G("ngStyle",n.handleStyle("sw")),t.R7$(),t.Y8G("ngStyle",n.handleStyle("se")),t.R7$(),t.Y8G("ngStyle",n.handleStyle("n")),t.R7$(),t.Y8G("ngStyle",n.handleStyle("s")),t.R7$(),t.Y8G("ngStyle",n.handleStyle("w")),t.R7$(),t.Y8G("ngStyle",n.handleStyle("e")))},dependencies:[O.bT,O.B3],encapsulation:2,changeDetection:0}),g})();var at=p(41300),ct=p(16471),pt=p(77247),lt=p.n(pt);let it=(()=>{var s;class g{constructor(e){this.document=e}makeUniqueFilename(e,n){let i=e;if(!n.has(i))return n.add(i),i;const o=e.lastIndexOf("."),a=o>0,c=a?e.slice(0,o):e,m=a?e.slice(o):"";let h=1;for(;n.has(i);)i=`${c} (${h})${m}`,h++;return n.add(i),i}exportImage(e,n){var i=this;return(0,T.A)(function*(o,a,c="image/png",m=.92){const{width:l,height:d}="naturalWidth"in(k=o)&&"naturalHeight"in k?{width:k.naturalWidth||k.videoWidth||k.width,height:k.naturalHeight||k.videoHeight||k.height}:{width:k.width,height:k.height};var k;let u=0,f=0,v=l,w=d;a?.crop&&(u=Math.max(0,Math.round(a.crop.x*l)),f=Math.max(0,Math.round(a.crop.y*d)),v=Math.max(1,Math.round(a.crop.w*l)),w=Math.max(1,Math.round(a.crop.h*d)),u+v>l&&(v=l-u),f+w>d&&(w=d-f));const x=Math.max(1,Math.round(a?.targetWidth??v)),_=Math.max(1,Math.round(a?.targetHeight??w)),b=i.document.createElement("canvas");b.width=x,b.height=_;const C=b.getContext("2d");if(!C)throw new Error("2D context not available");return null!=a?.backgroundColor&&(C.save(),C.fillStyle=String(a.backgroundColor),C.fillRect(0,0,x,_),C.restore()),C.imageSmoothingEnabled=!0,C.imageSmoothingQuality="high",C.drawImage(o,u,f,v,w,0,0,x,_),yield new Promise((k,E)=>{const M=[c];"image/jpeg"===c&&M.push(m),b.toBlob($=>{$?k($):E(new Error("toBlob failed"))},...M)})}).apply(this,arguments)}exportItemsToZipAndDownload(e){var n=this;return(0,T.A)(function*(i,o="image/png",a=.92,c="batch-images.zip"){const m=(i||[]).filter(v=>v?.file);if(!m.length)return;const h=new(lt()),l=new Set;for(const v of m){const w=yield n.exportFromFile(v.file,v,o,a),b=`${(v?.name||v?.file?.name||"image").replace(/\.[a-z0-9]+$/i,"")}${"image/jpeg"===o?".jpg":".png"}`,C=n.makeUniqueFilename(b,l);h.file(C,w)}const d=yield h.generateAsync({type:"blob"}),u=URL.createObjectURL(d),f=n.document.createElement("a");f.href=u,f.download=c,n.document.body.appendChild(f),f.click(),n.document.body.removeChild(f),URL.revokeObjectURL(u)}).apply(this,arguments)}exportItemsToZipAndDownloadOptimized(e,n){var i=this;return(0,T.A)(function*(o,a,c="image/png",m=.92,h="batch-images.zip"){const l=o||[];if(!l.length)return;const d=!a||""===a;if(1===l.length){const _=l[0];return void(yield i.downloadSingleItemOptimized(_,a,d,c,m))}const u=new(lt()),f=new Set;for(const _ of l){if(d){if(_.file){const L=i.makeUniqueFilename(_.file.name||_?.name||"image",f);u.file(L,_.file)}else if(_.objectUrl){const L=yield(yield fetch(_.objectUrl)).blob(),X=i.makeUniqueFilename(_?.name||"image",f);u.file(X,L)}continue}let b,C;b=_.file?yield createImageBitmap(_.file):yield new Promise((W,L)=>{const H=new Image;H.crossOrigin="anonymous",H.decoding="async",H.onload=()=>W(H),H.onerror=X=>L(X||new Error("image load error")),H.src=_.previewUrl||_.objectUrl}),C="crop"===a?i.createCroppedCanvas(b,_?.crop||{x:0,y:0,w:1,h:1}):i.createTransformedCanvas(b,_);const B=yield new Promise((W,L)=>{const H=[c];"image/jpeg"===c&&H.push(m),C.toBlob(X=>X?W(X):L(new Error("toBlob failed")),...H)});try{b?.close?.()}catch{}const M=`${(_?.name||_?.file?.name||"image").replace(/\.[a-z0-9]+$/i,"")}${"image/jpeg"===c?".jpg":".png"}`,$=i.makeUniqueFilename(M,f);u.file($,B)}const v=yield u.generateAsync({type:"blob"}),w=URL.createObjectURL(v),x=i.document.createElement("a");x.href=w,x.download=h,i.document.body.appendChild(x),x.click(),i.document.body.removeChild(x),URL.revokeObjectURL(w)}).apply(this,arguments)}downloadSingleItemOptimized(e,n,i,o,a){var c=this;return(0,T.A)(function*(){let m,h;const l="image/jpeg"===o?".jpg":".png";if(i)if(e.file)m=e.file,h=e.file.name||e?.name||"image";else{if(!e.objectUrl)return;m=yield(yield fetch(e.objectUrl)).blob(),h=e?.name||"image"}else{let f,v;f=e.file?yield createImageBitmap(e.file):yield new Promise((x,_)=>{const b=new Image;b.crossOrigin="anonymous",b.decoding="async",b.onload=()=>x(b),b.onerror=C=>_(C||new Error("image load error")),b.src=e.previewUrl||e.objectUrl}),v="crop"===n?c.createCroppedCanvas(f,e?.crop||{x:0,y:0,w:1,h:1}):c.createTransformedCanvas(f,e),m=yield new Promise((x,_)=>{const b=[o];"image/jpeg"===o&&b.push(a),v.toBlob(C=>C?x(C):_(new Error("toBlob failed")),...b)});try{f?.close?.()}catch{}h=`${(e?.name||e?.file?.name||"image").replace(/\.[a-z0-9]+$/i,"")}${l}`}const d=URL.createObjectURL(m),u=c.document.createElement("a");u.href=d,u.download=h,c.document.body.appendChild(u),u.click(),c.document.body.removeChild(u),URL.revokeObjectURL(d)})()}exportAndDownload(e,n){var i=this;return(0,T.A)(function*(o,a,c="image/png",m=.92){const h=yield i.exportTransformedImage(
1o,a,c,m),l=URL.createObjectURL(h),d=i.document.createElement("a"),u=(a?.name||"image").replace(/\.[a-z0-9]+$/i,""),f="image/jpeg"===c?".jpg":".png";d.href=l,d.download=`${u}${f}`,i.document.body.appendChild(d),d.click(),i.document.body.removeChild(d),URL.revokeObjectURL(l)}).apply(this,arguments)}exportFromFile(e,n){var i=this;return(0,T.A)(function*(o,a,c="image/png",m=.92){const h=yield createImageBitmap(o);try{return yield i.exportTransformedImage(h,a,c,m)}finally{try{h?.close?.()}catch{}}}).apply(this,arguments)}exportFromFileAndDownload(e,n){var i=this;return(0,T.A)(function*(o,a,c="image/png",m=.92){const h=yield i.exportFromFile(o,a,c,m),l=URL.createObjectURL(h),d=i.document.createElement("a"),u=(a?.name||o?.name||"image").replace(/\.[a-z0-9]+$/i,""),f="image/jpeg"===c?".jpg":".png";d.href=l,d.download=`${u}${f}`,i.document.body.appendChild(d),d.click(),i.document.body.removeChild(d),URL.revokeObjectURL(l)}).apply(this,arguments)}createCroppedCanvas(e,n){const{width:o,height:a}="naturalWidth"in(f=e)&&"naturalHeight"in f?{width:f.naturalWidth||f.videoWidth||f.width,height:f.naturalHeight||f.videoHeight||f.height}:{width:f.width,height:f.height},c=Math.max(0,Math.round((n?.x??0)*o)),m=Math.max(0,Math.round((n?.y??0)*a));var f;let h=Math.max(1,Math.round((n?.w??1)*o)),l=Math.max(1,Math.round((n?.h??1)*a));c+h>o&&(h=o-c),m+l>a&&(l=a-m);const d=this.document.createElement("canvas");d.width=h,d.height=l;const u=d.getContext("2d");if(!u)throw new Error("2D context not available");return u.imageSmoothingEnabled=!0,u.imageSmoothingQuality="high",u.drawImage(e,c,m,h,l,0,0,h,l),d}createTransformedCanvas(e,n){const{width:o,height:a}="naturalWidth"in(M=e)&&"naturalHeight"in M?{width:M.naturalWidth||M.videoWidth||M.width,height:M.naturalHeight||M.videoHeight||M.height}:{width:M.width,height:M.height},c=Math.max(1,Math.round(n?.targetWidth??o)),m=Math.max(1,Math.round(n?.targetHeight??a)),h=this.document.createElement("canvas");var M;h.width=c,h.height=m;const l=h.getContext("2d");if(!l)throw new Error("2D context not available");l.imageSmoothingEnabled=!0,l.imageSmoothingQuality="high";let d=!1,u=0;if(null!=n?.backgroundColor){const M=Number(n.backgroundColor);Number.isFinite(M)&&(50===M||100===M)&&(d=!0,u=M)}const f=o/a,v=c/m;let w,x;f>v?(w=c,x=c/f):f<v?(x=m,w=m*f):(w=c,x=m);const _=n?.scale??1,B=(n?.panX??0)/100*c,k=(n?.panY??0)/100*m;if(d){l.save(),l.filter=`blur(${u}px)`;const M=1.1;let $,W;f>v?(W=m*M,$=W*f):($=c*M,W=$/f),l.drawImage(e,0,0,o,a,(c-$)/2,(m-W)/2,$,W),l.restore()}l.save(),l.translate(c/2+B,m/2+k),l.scale(_,_),l.drawImage(e,0,0,o,a,-w/2,-x/2,w,x),l.restore();const E=n?.backgroundColor;return!d&&null!=E&&String(E).length>0&&(l.save(),l.globalCompositeOperation="destination-over",l.fillStyle=String(E),l.fillRect(0,0,c,m),l.restore()),h}exportTransformedImage(e,n){var i=this;return(0,T.A)(function*(o,a,c="image/png",m=.92){const h=a?.crop?i.createCroppedCanvas(o,a.crop):o,l=i.createTransformedCanvas(h,a);return yield new Promise((u,f)=>{const v=[c];"image/jpeg"===c&&v.push(m),l.toBlob(w=>{w?u(w):f(new Error("toBlob failed"))},...v)})}).apply(this,arguments)}}return(s=g).\u0275fac=function(e){return new(e||s)(t.KVO(O.qQ))},s.\u0275prov=t.jDH({token:s,factory:s.\u0275fac}),g})();var dt=p(68010),gt=p(32594),ht=p(49449),Q=p(64141),J=p(68064),mt=p(549),V=p(33391),ut=p(48928),kt=p(33645),Pt=p(91367),xt=p(68287),Mt=p(66518);const Ot=s=>({"pe-none":s});function yt(s,g){if(1&s){const r=t.RV6();t.j41(0,"button",19),t.bIt("click",function(){t.eBV(r);const n=t.XpG();return t.Njj(n.goToMyProjects())}),t.EFF(1,"My Projects"),t.k0s()}}function Et(s,g){1&s&&(t.j41(0,"div",20),t.nrm(1,"pi",21),t.k0s())}function Tt(s,g){if(1&s){const r=t.RV6();t.j41(0,"div",22),t.bIt("click",function(){t.eBV(r);const n=t.XpG();return t.Njj(n.upgradePlan())}),t.nrm(1,"pi",23),t.EFF(2,"Try Lightx Pro "),t.k0s()}}function It(s,g){1&s&&t.nrm(0,"pi",24)}function Bt(s,g){1&s&&t.nrm(0,"pi",25)}let jt=(()=>{var s;class g{constructor(e,n,i,o,a,c,m,h,l,d){this.state=e,this.route=n,this.authService=i,this.router=o,this.loginService=a,this.subsService=c,this.cdr=m,this.exportService=h,this.envService=l,this.toolHistoryService=d,this.homeURL="/",this.toolType="photo-all-tools",this.mainSection=[],this.megaMenuItem=!1,this.queryParams=this.route.
1snapshot.queryParams,this.user=this.authService.currentUser(),this.setHomeUrl(),this.loggedInObserver=this.authService.loggedIn.subscribe(u=>{this.user=this.authService.currentUser(),this.setHomeUrl(),this.cdr.markForCheck()}),this.usrPropChangedObserver=this.authService.usrPropChanged.subscribe(u=>{this.user=this.authService.currentUser(),this.setHomeUrl(),this.cdr.markForCheck()}),this.imagesChangedSub=this.state.imagesChanged$.subscribe(u=>{this.cdr.markForCheck()})}handler(){this.router.navigate(this.envService.isMobileView?["/"]:[this.homeURL])}ngOnDestroy(){this.loggedInObserver&&this.loggedInObserver.unsubscribe(),this.usrPropChangedObserver&&this.usrPropChangedObserver.unsubscribe(),this.imagesChangedSub&&this.imagesChangedSub.unsubscribe()}setHomeUrl(){this.homeURL=this.user?F.b.AFTER_LOGIN_REDIRATION_URI:"/"}goToMyProjects(){this.user&&this.router.navigate(["./my/projects"])}upgradePlan(){this.subsService.loginWithUpgrade(()=>{this.user=this.authService.currentUser()})}export(){var e=this;return(0,T.A)(function*(){if(e.user&&e.user.subscribed){const i=e.state.images||[];if(!i.length)return;const o=e.state.activeMode||"";e.state.inProgress=!0,e.cdr.markForCheck();try{yield e.exportService.exportItemsToZipAndDownloadOptimized(i,o,"image/png",.92,"batch-images.zip")}finally{e.state.inProgress=!1,e.cdr.markForCheck()}}else e.subsService.loginWithUpgrade(()=>{e.user=e.authService.currentUser(),e.user&&e.user.subscribed&&e.export()});e.toolHistoryService.addToHistory({title:"Batch Editor",toolName:"batch-editor",editorType:ct._Y.BatchEditor,subTool:""})})()}addImages(e){e.click()}onFilesSelected(e){var n=this;return(0,T.A)(function*(){const i=Array.from(e.files||[]);if(i.length){n.state.inProgress=!0;const o=yield n.state.addFiles(i);try{yield n.state.generatePreviewBitmaps(o)}catch{}finally{n.state.inProgress=!1,n.cdr.markForCheck()}}e.value=""})()}}return(s=g).\u0275fac=function(e){return new(e||s)(t.rXU(I),t.rXU(R.nX),t.rXU(dt.u),t.rXU(R.Ix),t.rXU(Pt.H),t.rXU(ht.n),t.rXU(t.gRc),t.rXU(it),t.rXU(xt.L),t.rXU(Mt.k))},s.\u0275cmp=t.VBU({type:s,selectors:[["editor-header"]],inputs:{mode:"mode"},decls:25,vars:19,consts:[["fileInput",""],[1,"header","navbar-fixed-top","position-relative",2,"z-index","1054",3,"ngClass"],["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","mr-10","lh-normal",3,"click"],[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 border-0 text-primary ps-3 pe-3","color","primary","placement","bottom",3,"click",4,"ngIf"],["class","d-flex align-items-center ms-2 me-2 justify-content-center hw-24",4,"ngIf"],["id","photo-editor_try_lightx_pro","class","btn border-btn-gradiant text-13 btn-h40 d-flex align-items-center border-0 text-semi pl-9 pr-9",3,"click",4,"ngIf"],[1,"projectTitle","text-semi","d-flex","align-items-center","justify-content-center"],[1,"btn","btn-outline-primary","btn-h40","text-13","d-inline-flex","align-items-center","justify-content-center","pl-9","pe-3",3,"click","disabled"],["name","addguide",1,"f-24","me-2","text-primary"],[1,"d-flex","pe-0","ms-2"],[1,"btn","btn-primary","btn-h40","pl-9","pr-9","d-flex","align-items-center","text-semi","text-13","justify-content-center",3,"click","disabled"],["class","icon f-24 me-2","name","downloadwhite",4,"ngIf"],["class","icon f-24 me-2","name","prousernew",4,"ngIf"],["type","file","multiple","","hidden","",3,"change"],["color","primary","placement","bottom",1,"btn","btn-grey","text-13","btn-h40","border-0","text-primary","ps-3","pe-3",3,"click"],[1,"d-flex","align-items-center","ms-2","me-2","justify-content-center","hw-24"],["name","separator",1,""],["id","photo-editor_try_lightx_pro",1,"btn","border-btn-gradiant","text-13","btn-h40","d-flex","align-items-center","border-0","text-semi","pl-9","pr-9",3,"click"],["name","prousernew",1,"f-24","me-2"],["name","downloadwhite",1,"icon","f-24","me-2"],["name","prousernew",1,"icon","f-24","me-2"]],template:function(e,n){if(1&e){const i=t.RV6();t.j41(0,"nav",1),t.nI1(1,"async"),t.j41(2,"div",2)(3,"div",3)(4,"a",4),t.bIt("click",function(){return t.eBV(i),t.Njj(n.handler())}),t.j41(5,"span",5),t.nrm(6,"img",6),t.k0s(),t.j41(7,"span",7),t.nrm(8,"img",6),t.k0s()(),t.DNE(9,yt,2,0,"button",8)(10,Et,2,0,"div",9)(11,Tt,3,0,"div",10),t.k0s(),t.j41(12,"div",11)(13,"button",12),t.nI1(14,"async"),t.bIt("click",function(){t.eBV(i);const a=t.sdS(24);return t.Njj(n.addImages(a))}),t.nrm(15,"pi",13),t.EFF(16),t.k0s()(),t.j41(17,"div",14)(18,"button",15),t.nI1(19,"async"),t.bIt("click",function(){return t.eBV(i),t.Njj(n.export())}),t.DNE(20,It,1,0,"pi",16)(21,Bt,1,0,"pi",17),t.EFF(22," Download All "),t.k0s()()()(),t.j41(23,"input",18,0),t.bIt("change",function(a){return t.eBV(i),t.Njj(n.onFilesSelected(a.target))}),t.k0s()}2&e&&(t.Y8G("ngClass",t.eq3(17,Ot,t.bMT(1,11,null==n.state?null:n.state.inProgress$))),t.R7$(9),t.Y8G("ngIf",n.user),t.R7$(),t.Y8G("ngIf",n.user&&!n.user.subscribed),t.R7$(),t.Y8G("ngIf",!n.user||n.user&&!n.user.subscribed),t.R7$(2),t.Y8G("disabled",t.bMT(14,13,null==n.state?null:n.state.inProgress$)||"file"!==n.mode||(null==n.state||null==n.state.images?null:n.state.images.length)>=50),t.R7$(3),t.Lme("Add Image (",null==n.state||null==n.state.images?null:n.state.images.length,"/",null==n.state?null:n.state.maxUploadImages,") "),t.R7$(2),t.Y8G("disabled",t.bMT(19,15,null==n.state?null:n.state.inProgress$)||(null==n.state||null==n.state.images?null:n.state.images.length)<1),t.R7$(2),t.Y8G("ngIf",n.user&&n.user.subscribed),t.R7$(),t.Y8G("ngIf",!n.user||n.user&&!n.user.subscribed),t.R7$(2),t.BMQ("accept",null==n.state?null:n.state.acceptedInputTypesAttr))},dependencies:[O.YU,O.bT,J.b,O.Jj],styles:[".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 10px;font-size:13px;outline:none;font-weight:400;color:#606576;
1max-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}.logo[_ngcontent-%COMP%]{line-height:unset}.pop-setting[_ngcontent-%COMP%]{right:0;margin-top:1rem}.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}.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)}.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}.btn-h32[_ngcontent-%COMP%]{height:32px;padding:0 12px}.border-btn-gradiant[_ngcontent-%COMP%]{background:linear-gradient(90deg,#fc5cff0d,#2520f60d)!important}.border-btn-gradiant[_ngcontent-%COMP%]:hover{background:linear-gradient(90deg,#fc5cff1a,#2520f61a)!important}.new_item[_ngcontent-%COMP%]:after{top:5px!important}.swap-page[_ngcontent-%COMP%] .order-lg-1[_ngcontent-%COMP%]:nth-child(1) h3.mt-2[_ngcontent-%COMP%]{margin-top:0!important}.btn-outline-primary[disabled][_ngcontent-%COMP%]{color:#d9d9d9;background:#5e6aef0d!important;border-color:#d9d9d9!important;opacity:1}.btn-outline-primary[disabled][_ngcontent-%COMP%] pi[_ngcontent-%COMP%]{color:#d9d9d9!important}.btn-outline-primary[disabled][_ngcontent-%COMP%]:hover{background-color:#5e6aef0d!important;border-color:#d9d9d9!important}"],changeDetection:0}),g})();const Rt=["fileInput"];let St=(()=>{var s;class g{constructor(e){this.state=e}onFilesSelected(e){var n=this;return(0,T.A)(function*(){const i=Array.from(e.files||[]);if(i.length){n.state.inProgress=!0;const o=yield n.state.addFiles(i);try{yield n.state.generatePreviewBitmaps(o)}catch{}finally{n.state.inProgress=!1}}e.value=""})()}open(){this.fileInputRef?.nativeElement?.click()}}return(s=g).\u0275fac=function(e){return new(e||s)(t.rXU(I))},s.\u0275cmp=t.VBU({type:s,selectors:[["app-be-file-input"]],viewQuery:function(e,n){if(1&e&&t.GBs(Rt,7),2&e){let i;t.mGM(i=t.lsd())&&(n.fileInputRef=i.first)}},decls:2,vars:1,consts:[["fileInput",""],["type","file","multiple","","hidden","",3,"change"]],template:function(e,n){if(1&e){const i=t.RV6();t.j41(0,"input",1,0),t.bIt("change",function(a){return t.eBV(i),t.Njj(n.onFilesSelected(a.target))}),t.k0s()}2&e&&t.BMQ("accept",null==n.state?null:n.state.acceptedInputTypesAttr)},encapsulation:2,changeDetection:0}),g})();var ft=p(89818),tt=p(84341),Ut=p(2820);const Ft=["widthInput"],At=["heightInput"],K=s=>({"active-align":s}),bt=s=>({"cus-error":s}),Ct=s=>({widthHeightTextN:s});function zt(s,g){if(1&s&&(t.j41(0,"div",50),t.EFF(1),t.k0s()),2&s){const r=t.XpG(2);t.R7$(),t.SpI(" ",r.errorsmsg," ")}}function Wt(s,g){if(1&s){const r=t.RV6();t.j41(0,"div")(1,"div",40)(2,"div",41)(3,"input",42,9),t.mxI("ngModelChange",function(n){t.eBV(r);const i=t.XpG();return t.DH7(i.customWidth,n)||(i.customWidth=n),t.Njj(n)}),t.bIt("ngModelChange",function(n){t.eBV(r);const i=t.XpG();return t.Njj(i.onCustomInput(n,"w"))})("click",function(){t.eBV(r);const n=t.XpG();return t.Njj(n.focusCustomField("w"))})("focusout",function(){t.eBV(r);const n=t.XpG();return t.Njj(n.onWidthBlur())}),t.k0s(),t.j41(5,"div",43)(6,"span",44),t.EFF(7,"W"),t.k0s(),t.j41(8,"div",45),t.nrm(9,"pi",46),t.k0s()()(),t.nrm(10,"pi",47),t.j41(11,"div",41)(12,"input",48,10),t.mxI("ngModelChange",function(n){t.eBV(r);const i=t.XpG();return t.DH7(i.customHeight,n)||(i.customHeight=n),t.Njj(n)}),t.bIt("ngModelChange",function(n){t.eBV(r);const i=t.XpG();return t.Njj(i.onCustomInput(n,"h"))})("click",function(){t.eBV(r);const n=t.XpG();return t.Njj(n.focusCustomField("h"))})("focusout",function(){t.eBV(r);const n=t.XpG();return t.Njj(n.onHeightBlur())}),t.k0s(),t.j41(14,"div",43)(15,"span",44),t.EFF(16,"H"),t.k0s(),t.j41(17,"div",45),t.nrm(18,"pi",46),t.k0s()()()(),t.DNE(19,zt,2,1,"div",49),t.k0s()}if(2&s){const r=t.XpG();t.R7$(2),t.Y8G("ngClass",t.eq3(7,bt,(r.customWidth||0)<1||(r.customWidth||0)>4e3)),t.R7$(),t.R50("ngModel",r.customWidth),t.R7$(3),t.Y8G("ngClass",t.eq3(9,Ct,1==r.inputWidthClicked)),t.R7$(5),t.Y8G("ngClass",t.eq3(11,bt,(r.customHeight||0)<1||(r.customHeight||0)>4e3)),t.R7$(),t.R50("ngModel",r.customHeight),t.R7$(3),t.Y8G("ngClass",t.eq3(13,Ct,1==r.inputHeightClicked)),t.R7$(4),t.Y8G("ngIf",""!=r.errorsmsg)}}let Dt=(()=>{var s;
1class g{constructor(){this.cancel=new t.bkB,this.aspectSelected=new t.bkB,this.markerSelected=new t.bkB,this.customError=new t.bkB,this.errorsmsg="",this.inputWidthClicked=!1,this.inputHeightClicked=!1,this.width=0,this.height=0,this.isdisabled=!0,this.originalWidth=0,this.originalHeight=0,this.lockedAspectRatio=!1,this.aspectOptions=[{label:"Original",value:"Original"},{label:"Custom",value:"Custom"},{label:"9:16",value:"9:16"},{label:"2:3",value:"2:3"},{label:"3:4",value:"3:4"},{label:"4:5",value:"4:5"},{label:"1:1",value:"1:1"},{label:"5:4",value:"5:4"},{label:"4:3",value:"4:3"},{label:"3:2",value:"3:2"},{label:"16:9",value:"16:9"}],this.selectedAspect=null,this.showCustomBox=!1,this.selectedMarker="cc",this.customWidth=null,this.customHeight=null,this.simplifiedAspectRatio={aspectWidth:0,aspectHeight:0}}onChange(e){const n="string"==typeof e?e:e?.value??e?.label??"";if(this.selectedAspect=n,this.showCustomBox="Custom"===n,"Custom"!==n&&(this.inputWidthClicked=!1,this.inputHeightClicked=!1),"Original"===n)return this.simplifiedAspectRatio=this.getSimplifiedAspectRatio(this.width,this.height),void this.aspectSelected.emit(null);if(n&&"string"==typeof n&&n.indexOf(":")>-1){const[i,o]=n.split(":"),a=parseFloat(i),c=parseFloat(o);if(Number.isFinite(a)&&Number.isFinite(c)&&a>0&&c>0)return void this.aspectSelected.emit({w:a,h:c})}if(this.simplifiedAspectRatio=this.getSimplifiedAspectRatio(this.width,this.height),this.customWidth=this.simplifiedAspectRatio.aspectWidth||null,this.customHeight=this.simplifiedAspectRatio.aspectHeight||null,this.customWidth&&this.customHeight&&this.validateCustomRatio(this.customWidth,this.customHeight)){const i=this.getSimplifiedAspectRatio(this.customWidth,this.customHeight);this.aspectSelected.emit({w:i.aspectWidth,h:i.aspectHeight})}setTimeout(()=>{this.inputWidthClicked=!0,this.inputHeightClicked=!1,this.widthInput?.nativeElement&&this.widthInput.nativeElement.focus()},0)}onSelectMarker(e){this.isOriginalAspect||(this.selectedMarker=e,this.markerSelected.emit(e))}onCustomBoxChange(){const e=Number(this.customWidth),n=Number(this.customHeight);if(!Number.isFinite(e)||!Number.isFinite(n)||!this.validateCustomRatio(e,n))return;const i=this.getSimplifiedAspectRatio(e,n);this.simplifiedAspectRatio=i,this.aspectSelected.emit({w:i.aspectWidth,h:i.aspectHeight})}onCustomInput(e,n){const i=Number(e);"w"===n?this.customWidth=Number.isFinite(i)&&i>0?i:null:this.customHeight=Number.isFinite(i)&&i>0?i:null,this.onCustomBoxChange()}ngOnInit(){this.selectedAspect=this.aspectOptions[0].value,this.markerSelected.emit(this.selectedMarker),this.lockedWidth=Number(this.width),this.lockedHeight=Number(this.height),this.simplifiedAspectRatio=this.getSimplifiedAspectRatio(this.width,this.height)}onCancel(){this.cancel.emit()}focusCustomField(e){"w"===e?(this.inputWidthClicked=!0,this.inputHeightClicked=!1,setTimeout(()=>{this.widthInput?.nativeElement&&this.widthInput.nativeElement.focus()},0)):(this.inputWidthClicked=!1,this.inputHeightClicked=!0,setTimeout(()=>{this.heightInput?.nativeElement&&this.heightInput.nativeElement.focus()},0))}onWidthBlur(){this.inputWidthClicked=!1}onHeightBlur(){this.inputHeightClicked=!1}keyEnter(){this.inputWidthClicked=!1,this.inputHeightClicked=!1,this.setCustomValue(),this.widthInput&&this.heightInput&&(this.widthInput.nativeElement.blur(),this.heightInput.nativeElement.blur())}isValidate(){let e=this.width,n=this.height,i=!1,o="";return this.errorsmsg="",(null!=e&&(e<40||e>4e3)||null!=n&&(n<40||n>4e3))&&(i=!0),e<40||n<40?o="Size cannot be smaller than 40x40":(e>4e3||n>4e3)&&(o="Size cannot be bigger than 4000x4000"),i?(this.isdisabled=!0,this.errorsmsg=o):null!=e&&null!=n&&(this.isdisabled=!1),!i}setCustomValue(){this.aspectSelected.emit({w:this.width,h:this.height})}onFocusOut(){(this.width>this.originalWidth||this.height>this.originalHeight)&&(this.width=this.originalWidth,this.height=this.originalHeight),this.keyEnter()}getGreatestCommonDivisor(e,n){let i=Math.abs(Math.floor(Number(e))),o=Math.abs(Math.floor(Number(n)));if(!Number.isFinite(i)||!Number.isFinite(o)||0===i&&0===o)return 1;if(0===i||0===o)return i||o||1;for(;0!==o;){const a=i%o;i=o,o=a}return i}getSimplifiedAspectRatio(e,n){const i=Number(e??this.width),o=Number(n??this.height);if(!Number.isFinite(i)||!Number.isFinite(o)||i<=0||o<=0)return{aspectWidth:0,aspectHeight:0};const a=this.getGreatestCommonDivisor(i,o);return{aspectWidth:Math.round(i/a),aspectHeight:Math.round(o/a)}}validateCustomRatio(e,n){this.errorsmsg="";let a=!1;return Number.isInteger(e)&&Number.isInteger(n)?e<1||n<1?(a=!0,this.errorsmsg="Aspect cannot be smaller than 1:1"):(e>4e3||n>4e3)&&(a=!0,this.errorsmsg="Aspect cannot be larger than 4000:4000"):(a=!0,this.errorsmsg="Aspect ratio must use whole numbers (e.g., 16:9)"),this.isdisabled=a,this.customError.emit(this.isdisabled),!a}ngOnDestroy(){this.customError.emit(!1)}get isOriginalAspect(){return"Original"===this.selectedAspect}}return(s=g).\u0275fac=function(e){return new(e||s)},s.\u0275cmp=t.VBU({type:s,selectors:[["app-crop-edit-tool"]],viewQuery:function(e,n){if(1&e&&(t.GBs(Ft,5),t.GBs(At,5)),2&e){let i;t.mGM(i=t.lsd())&&(n.widthInput=i.first),t.mGM(i=t.lsd())&&(n.heightInput=i.first)}},inputs:{width:"width",height:"height"},outputs:{cancel:"cancel",aspectSelected:"aspectSelected",markerSelected:"markerSelected",customError:"customError"},decls:65,vars:38,consts:[["childEl","","childTooltip1","ngbTooltip"],["childEl","","childTooltip2","ngbTooltip"],["childEl","","childTooltip3","ngbTooltip"],["childEl","","childTooltip4","ngbTooltip"],["childEl","","childTooltip5","ngbTooltip"],["childEl","","childTooltip6","ngbTooltip"],["childEl","","childTooltip7","ngbTooltip"],["childEl","","childTooltip8","ngbTooltip"],["childEl","","childTooltip9","ngbTooltip"],["widthInput",""],["heightInput",""],[1,"d-flex","align-items-start","justify-content-start","flex-column","w-100"],[1,"d-flex","align-items-center","justify-content-start","w-100",2,"min-height","56px"],["name","leftarrow",1,"back-icon","f-24","d-flex","align-items-center","justify-content-center","pointer","border-radius-8",3,"click"],[1,"text-lg","text-semi","text-dark","lh-125","ms-2"],[1,"d-flex","align-items-start","justify-content-start","w-100","flex-column"],["bindLabel","label","bindValue","value",1,"select-menu","resize-popup","w-100","batch-select-menu",3,"ngModelChange","change","items","ngModel","clearable","searchable"],[4,"ngIf"],[1,"d-inline-flex","align-items-center","text-14","grey-800","text-semi","h-40","w-100","mt-9","mb-9"],[1,"w-100","crop-maker-list","mb-3"],[1,"d-inline-flex","align-items-center","justify-content-center","crop-maker-item","border-radius-12","overflow-hidden",3,"click","mouseenter","mouseleave","ngClass"],["ngbTooltip","Top Left","placement","top","tooltipClass","tooltip-custom-all",1,"border-radius-8"],["fill","none","height","1em","width","1em",1,"f-24"],[0,"xlink","href","assets/svg/batch-editor.svg#topleftalign"],["ngbTooltip","Top","placement","top","tooltipClass","tooltip-custom-all",1,"border-radius-8"],[0,"xlink","href","assets/svg/batch-editor.svg#topce
1nteralign"],["ngbTooltip","Top Right","placement","top","tooltipClass","tooltip-custom-all",1,"border-radius-8"],[0,"xlink","href","assets/svg/batch-editor.svg#toprightalign"],["ngbTooltip","Left","placement","top","tooltipClass","tooltip-custom-all",1,"border-radius-8"],[0,"xlink","href","assets/svg/batch-editor.svg#centerleftalign"],["ngbTooltip","Center","placement","top","tooltipClass","tooltip-custom-all",1,"border-radius-8"],[0,"xlink","href","assets/svg/batch-editor.svg#centermidalign"],["ngbTooltip","Right","placement","top","tooltipClass","tooltip-custom-all",1,"border-radius-8"],[0,"xlink","href","assets/svg/batch-editor.svg#centerrightalign"],["ngbTooltip","Bottom Left","placement","top","tooltipClass","tooltip-custom-all",1,"border-radius-8"],[0,"xlink","href","assets/svg/batch-editor.svg#bottomleftalign"],["ngbTooltip","Bottom","placement","top","tooltipClass","tooltip-custom-all",1,"border-radius-8"],[0,"xlink","href","assets/svg/batch-editor.svg#bottomcenteralign"],["ngbTooltip","Bottom Right","placement","top","tooltipClass","tooltip-custom-all",1,"border-radius-8"],[0,"xlink","href","assets/svg/batch-editor.svg#bottomrightalign"],[1,"scratch-slider","mt-2"],[1,"d-flex","align-items-center","position-relative",3,"ngClass"],["type","text","id","width","autocomplete","off","minlength","1","maxlength","2","numbersOnly","",1,"form-control","textBoxText","text-semi","textBoxCustom",3,"ngModelChange","click","focusout","ngModel"],[1,"position-absolute","d-flex"],[1,"widthHeightText","text-semi","ml-9","mr-9",3,"ngClass"],[1,"me-4"],["name","dividerCustom"],["name","resizecross",1,"hw-24","align-self-center","ms-2","me-2","grey-600"],["type","text","id","height","autocomplete","off","minlength","1","maxlength","2","numbersOnly","",1,"form-control","textBoxText","text-semi","textBoxCustom",3,"ngModelChange","click","focusout","ngModel"],["class","scratch-slider mt-1","style","color: #F25555; line-height: 14.98px;",4,"ngIf"],[1,"scratch-slider","mt-1",2,"color","#F25555","line-height","14.98px"]],template:function(e,n){if(1&e){const i=t.RV6();t.j41(0,"div",11)(1,"div",12)(2,"pi",13),t.bIt("click",function(){return t.eBV(i),t.Njj(n.onCancel())}),t.k0s(),t.j41(3,"span",14),t.EFF(4,"Crop Photos"),t.k0s()(),t.j41(5,"div",15)(6,"ng-select",16),t.mxI("ngModelChange",function(a){return t.eBV(i),t.DH7(n.selectedAspect,a)||(n.selectedAspect=a),t.Njj(a)}),t.bIt("change",function(a){return t.eBV(i),t.Njj(n.onChange(a))}),t.k0s(),t.DNE(7,Wt,20,15,"div",17),t.j41(8,"span",18),t.EFF(9," Crop Marker "),t.k0s(),t.j41(10,"div",19)(11,"div",20),t.bIt("click",function(){return t.eBV(i),t.Njj(n.onSelectMarker("tl"))})("mouseenter",function(){t.eBV(i);const a=t.sdS(14);return t.Njj(a.open())})("mouseleave",function(){t.eBV(i);const a=t.sdS(14);return t.Njj(a.close())}),t.j41(12,"span",21,0),t.qSk(),t.j41(15,"svg",22),t.nrm(16,"use",23),t.k0s()()(),t.joV(),t.j41(17,"div",20),t.bIt("click",function(){return t.eBV(i),t.Njj(n.onSelectMarker("tc"))})("mouseenter",function(){t.eBV(i);const a=t.sdS(20);return t.Njj(a.open())})("mouseleave",function(){t.eBV(i);const a=t.sdS(20);return t.Njj(a.close())}),t.j41(18,"span",24,1),t.qSk(),t.j41(21,"svg",22),t.nrm(22,"use",25),t.k0s()()(),t.joV(),t.j41(23,"div",20),t.bIt("click",function(){return t.eBV(i),t.Njj(n.onSelectMarker("tr"))})("mouseenter",function(){t.eBV(i);const a=t.sdS(26);return t.Njj(a.open())})("mouseleave",function(){t.eBV(i);const a=t.sdS(26);return t.Njj(a.close())}),t.j41(24,"span",26,2),t.qSk(),t.j41(27,"svg",22),t.nrm(28,"use",27),t.k0s()()(),t.joV(),t.j41(29,"div",20),t.bIt("click",function(){return t.eBV(i),t.Njj(n.onSelectMarker("cl"))})("mouseenter",function(){t.eBV(i);const a=t.sdS(32);return t.Njj(a.open())})("mouseleave",function(){t.eBV(i);const a=t.sdS(32);return t.Njj(a.close())}),t.j41(30,"span",28,3),t.qSk(),t.j41(33,"svg",22),t.nrm(34,"use",29),t.k0s()()(),t.joV(),t.j41(35,"div",20),t.bIt("click",function(){return t.eBV(i),t.Njj(n.onSelectMarker("cc"))})("mouseenter",function(){t.eBV(i);const a=t.sdS(38);return t.Njj(a.open())})("mouseleave",function(){t.eBV(i);const a=t.sdS(38);return t.Njj(a.close())}),t.j41(36,"span",30,4),t.qSk(),t.j41(39,"svg",22),t.nrm(40,"use",31),t.k0s()()(),t.joV(),t.j41(41,"div",20),t.bIt("click",function(){return t.eBV(i),t.Njj(n.onSelectMarker("cr"))})("mouseenter",function(){t.eBV(i);const a=t.sdS(44);return t.Njj(a.open())})("mouseleave",function(){t.eBV(i);const a=t.sdS(44);return t.Njj(a.close())}),t.j41(42,"span",32,5),t.qSk(),t.j41(45,"svg",22),t.nrm(46,"use",33),t.k0s()()(),t.joV(),t.j41(47,"div",20),t.bIt("click",function(){return t.eBV(i),t.Njj(n.onSelectMarker("bl"))})("mouseenter",function(){t.eBV(i);const a=t.sdS(50);return t.Njj(a.open())})("mouseleave",function(){t.eBV(i);const a=t.sdS(50);return t.Njj(a.close())}),t.j41(48,"span",34,6),t.qSk(),t.j41(51,"svg",22),t.nrm(52,"use",35),t.k0s()()(),t.joV(),t.j41(53,"div",20),t.bIt("click",function(){return t.eBV(i),t.Njj(n.onSelectMarker("bc"))})("mouseenter",function(){t.eBV(i);const a=t.sdS(56);return t.Njj(a.open())})("mouseleave",function(){t.eBV(i);const a=t.sdS(56);return t.Njj(a.close())}),t.j41(54,"span",36,7),t.qSk(),t.j41(57,"svg",22),t.nrm(58,"use",37),t.k0s()()(),t.joV(),t.j41(59,"div",20),t.bIt("click",function(){return t.eBV(i),t.Njj(n.onSelectMarker("br"))})("mouseenter",function(){t.eBV(i);const a=t.sdS(62);return t.Njj(a.open())})("mouseleave",function(){t.eBV(i);const a=t.sdS(62);return t.Njj(a.close())}),t.j41(60,"span",38,8),t.qSk(),t.j41(63,"svg",22),t.nrm(64,"use",39),t.k0s()()()()()()}2&e&&(t.R7$(6),t.Y8G("items",n.aspectOptions),t.R50("ngModel",n.selectedAspect),t.Y8G("clearable",!1)("searchable",!1)("clearable",!1),t.R7$(),t.Y8G("ngIf",n.showCustomBox),t.R7$(3),t.xc7("pointer-events",n.isOriginalAspect?"none":"auto")("opacity",n.isOriginalAspect?.5:1),t.BMQ("aria-disabled",n.isOriginalAspect),t.R7$(),t.Y8G("ngClass",t.eq3(20,K,!n.isOriginalAspect&&"tl"===n.selectedMarker)),t.R7$(6),t.Y8G("ngClass",t.eq3(22,K,!n.isOriginalAspect&&"tc"===n.selectedMarker)),t.R7$(6),t.Y8G("ngClass",t.eq3(24,K,!n.isOriginalAspect&&"tr"===n.selectedMarker)),t.R7$(6),t.Y8G("ngClass",t.eq3(26,K,!n.isOriginalAspect&&"cl"===n.selectedMarker)),t.R7$(6),t.Y8G("ngClass",t.eq3(28,K,!n.isOriginalAspect&&"cc"===n.selectedMarker)),t.R7$(6),t.Y8G("ngClass",t.eq3(30,K,!n.isOriginalAspect&&"cr"===n.selectedMarker)),t.R7$(6),t.Y8G("ngClass",t.eq3(32,K,!n.isOriginalAspect&&"bl"===n.selectedMarker)),t.R7$(6),t.Y8G("ngClass",t.eq3(34,K,!n.isOriginalAspect&&"bc"===n.selectedMarker)),t.R7$(6),t.Y8G("ngClass",t.eq3(36,K,!n.isOriginalAspect&&"br"===n.selectedMarker)))},dependencies:[O.YU,O.bT,J.b,ft.vr,V.md,tt.me,tt.BC,tt.xh,tt.tU,tt.vS,Ut.Z],styles:[".crop-maker-list[_ngcontent-%COMP%]{display:grid;grid-template-columns:repeat(3,1fr);gap:4px}.crop-maker-list[_ngcontent-%COMP%] .crop-maker-item[_ngcontent-%COMP%]{width:86px;height:86px;min-width:86px;min-height:86px;background:#5e6aef0d;cursor:pointer}.crop-maker-list[_ngcontent-%COMP%] .crop-maker-item[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{width:32px;height:32px;background:#5e6aef0d;display:flex;align-items:center;justify-content:center}.crop-maker-list[_ngcontent-%COMP%] .crop-maker-item[_ngcontent-%COMP%] span[_ngcontent-%COMP%] pi[_ngcontent-%COMP%]{color:#272b34}.crop-maker-list[_ngcontent-%COMP%] .crop-maker-item[_ngcontent-%COMP%]:hover, .crop-maker-list[_ngcontent-%COMP%] .crop-maker-item.active-align[_ngcontent-%COMP%]{background:#5e6aef1a}.crop-maker-list[_ngcontent-%COMP%] .crop-maker-item.active-align[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{background:#5e6aef!important}.crop-maker-list[_ngcontent-%COMP%] .crop-maker-item.active-align[_ngcontent-%COMP%] span[_ngcontent-%COMP%] svg[_ngcontent-%COMP%]{color:#fff!important}.crop-maker-list[_ngcontent-%COMP%] .crop-maker-item.active-align[_ngcontent-%COMP%]:hover{background:#5e6aef1a!important}.scratch-slider[_ngcontent-%COMP%]{display:flex;font-size:12px;color:#e20e33}.scratch-slider[_ngcontent-%COMP%] .textBoxCustom[_ngcontent-%COMP%]{width:114px;
1height:40px;background-color:#fff;border:1px solid #E2E3E9;border-radius:12px}.scratch-slider[_ngcontent-%COMP%] .form-control[_ngcontent-%COMP%]{display:inline;height:38px;padding:0 7px 0 50px;font-size:.875rem;line-height:1.5;color:#000;background-color:#fff;border:1px solid #E2E3E9;border-radius:12px;text-align:center}.scratch-slider[_ngcontent-%COMP%] .form-control[_ngcontent-%COMP%]:hover{border:1px solid #4A4F5E}.scratch-slider[_ngcontent-%COMP%] .form-control[_ngcontent-%COMP%]:focus{border:1px solid #626ADF}.scratch-slider[_ngcontent-%COMP%] .form-control[_ngcontent-%COMP%]:focus .widthHeightText[_ngcontent-%COMP%]{color:#626adf!important}.scratch-slider[_ngcontent-%COMP%] .cus-error[_ngcontent-%COMP%] .form-control[_ngcontent-%COMP%]{border-color:#f25555!important}.scratch-slider[_ngcontent-%COMP%] .cus-error[_ngcontent-%COMP%] .widthHeightText[_ngcontent-%COMP%]{color:#f25555!important}.scratch-slider[_ngcontent-%COMP%] .widthHeightText[_ngcontent-%COMP%]{font-size:13px;color:#272b34;line-height:17.7px}.scratch-slider[_ngcontent-%COMP%] .widthHeightTextN[_ngcontent-%COMP%]{color:#626adf!important}"]}),g})();var Ht=p(27707),Gt=p(68465),$t=p(25119),Nt=p(62261),Yt=p(93391),Vt=p(60004);const Lt=["acc"],vt=s=>({"active-btn-tab":s}),wt=s=>({"tab-child-active":s});function Xt(s,g){if(1&s){const r=t.RV6();t.j41(0,"button",44),t.bIt("click",function(){const n=t.eBV(r).$implicit,i=t.XpG(3);return t.Njj(i.changeColor(n))}),t.k0s()}2&s&&t.xc7("background",g.$implicit)}function Kt(s,g){if(1&s&&(t.j41(0,"div")(1,"div",31)(2,"div",32)(3,"span",33),t.EFF(4,"Custom"),t.k0s()(),t.j41(5,"div",34),t.nrm(6,"p",35),t.j41(7,"div",36)(8,"div",37),t.nrm(9,"button",38),t.k0s()()(),t.j41(10,"div",39)(11,"span",33),t.EFF(12,"Presets"),t.k0s()(),t.j41(13,"div",40)(14,"div",41)(15,"div",42),t.DNE(16,Xt,1,2,"button",43),t.k0s()()()()()),2&s){const r=t.XpG(2);t.R7$(16),t.Y8G("ngForOf",r.colorsBgPresets)}}function Qt(s,g){if(1&s){const r=t.RV6();t.j41(0,"div",63),t.bIt("click",function(){const n=t.eBV(r).$implicit,i=t.XpG(4);return t.Njj(i.addPattern(n))}),t.j41(1,"div",64),t.nrm(2,"img",65),t.k0s()()}if(2&s){const r=g.$implicit;t.R7$(2),t.Y8G("src",r.thumbUrl,t.B4B)}}function Zt(s,g){if(1&s){const r=t.RV6();t.j41(0,"div",68),t.bIt("click",function(){const n=t.eBV(r).$implicit,i=t.XpG(5);return t.Njj(i.addPattern(n))}),t.j41(1,"div",69),t.nrm(2,"img",65),t.k0s()()}if(2&s){const r=g.$implicit;t.R7$(2),t.Y8G("src",r.thumbUrl,t.B4B)}}function Jt(s,g){if(1&s&&(t.j41(0,"div",66),t.DNE(1,Zt,3,1,"div",67),t.k0s()),2&s){const r=t.XpG().$implicit;t.R7$(),t.Y8G("ngForOf",r.storeProductImages.slice(4))}}function qt(s,g){if(1&s){const r=t.RV6();t.j41(0,"div",55)(1,"div",9)(2,"div",56)(3,"button",57)(4,"h5",58),t.EFF(5),t.k0s()(),t.j41(6,"button",59)(7,"span",60),t.EFF(8,"See less"),t.k0s(),t.j41(9,"span",61),t.bIt("click",function(n){const i=t.eBV(r).index,o=t.XpG(3);return t.Njj(o.resetProduct(i,n))}),t.EFF(10,"See all"),t.k0s()()(),t.DNE(11,Qt,3,1,"div",62),t.k0s(),t.j41(12,"div",18)(13,"div",19),t.DNE(14,Jt,2,1,"ng-template"),t.k0s()()()}if(2&s){const r=g.$implicit;t.Mz_("ngbAccordionItem","sticker-panel-",g.index,""),t.R7$(5),t.JRh(r.displayName),t.R7$(6),t.Y8G("ngForOf",r.storeProductImages.slice(0,4))}}function te(s,g){if(1&s&&(t.j41(0,"div")(1,"div",31)(2,"div",45)(3,"div",46),t.nrm(4,"div",47),t.j41(5,"div",48),t.nrm(6,"pi",49),t.j41(7,"span",50),t.EFF(8,"Upload"),t.k0s()(),t.j41(9,"div",51),t.nrm(10,"img",52),t.k0s()(),t.j41(11,"div",53,1),t.DNE(13,qt,15,4,"div",54),t.k0s()()()()),2&s){const r=t.XpG(2);t.R7$(11),t.Y8G("closeOthers",!0)("destroyOnHide",!0),t.R7$(2),t.Y8G("ngForOf",r.storePatternProducts)}}function ee(s,g){if(1&s){const r=t.RV6();t.j41(0,"div",23)(1,"div",24)(2,"div",25)(3,"button",26),t.bIt("click",function(){t.eBV(r);const n=t.XpG();return t.Njj(n.activatePane("color"))}),t.EFF(4,"Color"),t.k0s(),t.j41(5,"button",26),t.bIt("click",function(){t.eBV(r);const n=t.XpG();return t.Njj(n.activatePane("image"))}),t.EFF(6,"Image"),t.k0s()()(),t.j41(7,"div",27)(8,"div",28),t.DNE(9,Kt,17,1,"div",29),t.k0s(),t.j41(10,"div",30),t.DNE(11,te,14,3,"div",29),t.k0s()()()}if(2&s){const r=t.XpG();t.R7$(3),t.Y8G("ngClass",t.eq3(6,vt,"color"==r.activePane)),t.R7$(2),t.Y8G("ngClass",t.eq3(8,vt,"image"==r.activePane)),t.R7$(3),t.Y8G("ngClass",t.eq3(10,wt,"color"===r.activePane)),t.R7$(),t.Y8G("ngIf","color"===r.activePane),t.R7$(),t.Y8G("ngClass",t.eq3(12,wt,"image"===r.activePane)),t.R7$(),t.Y8G("ngIf","image"===r.activePane)}}function ne(s,g){1&s&&t.EFF(0," jai jai ram ")}let ie=(()=>{var s;class g extends $t._{constructor(e){super(),this.mediaContentService=e,this.shadowApplied=!1,this.activePane="color",this.cancel=ne
1w t.bkB,this.colorsBgPresets=Ht.PV.ui.colorBgPresets.items,this.storePatternProducts=[],this.isPatternLoadProgress=!1,this.pagenumber=0,this.patternPageEnd=!1,this.isImageProgress=!1,this.contentPageEnd=!1,this.contentpageNumber=1}ngOnInit(){this.pagenumber<=0&&this.getBackgroundPatterns(()=>{})}addRemoveShadow(e){this.shadowApplied=e,this.acc&&(e?this.acc.expand("remove-bg-2"):this.acc.collapse("remove-bg-2"))}activatePane(e){this.activePane=e}changeColor(e){console.log(e)}getBackgroundPatterns(e=null){this.isPatternLoadProgress=!0,this.pagenumber++,this.mediaContentService.getProductDetails(Gt.KK.Pattern,this.pagenumber-1,n=>{n&&n.body&&n.body.storeProducts.length>0?this.storePatternProducts=this.pagenumber>0?this.storePatternProducts.concat(n.body.storeProducts):n.body.storeProducts:this.patternPageEnd=!0,this.isPatternLoadProgress=!1,this.isImageProgress=!1,e&&e()},n=>{this.isImageProgress=!1})}resetProduct(e,n){if(this.storePatternProducts[e].storeProductImages.length>20?this.contentPageEnd=!0:(this.storePatternProducts[e].storeProductImages=this.storePatternProducts[e].storeProductImages.slice(0,20),this.contentpageNumber=1,this.contentPageEnd=this.storePatternProducts[e].storeProductImages.length<20),n){let i=document.getElementById("scroll-adjuster");i&&n.target&&this.setActiveScrollPos(i.firstChild,n.target.parentElement)}}addPattern(e){console.log(e)}scrollContentEnd(e,n){this.contentPageEnd||this.getEditorProductContent(e,n)}getEditorProductContent(e,n){this.isImageProgress=!0,setTimeout(()=>{this.contentPageEnd||(this.contentpageNumber++,this.mediaContentService.getTemplateByProductId(e.productId,this.contentpageNumber-1,i=>{i&&i.storeProductImages&&i.storeProductImages.length>0?this.contentpageNumber>0?(i.storeProductImages.length<19&&(this.contentPageEnd=!0,this.contentpageNumber--),this.storePatternProducts[n].storeProductImages=this.storePatternProducts[n].storeProductImages.concat(i.storeProductImages)):this.storePatternProducts[n].storeProductImages=i.body.storeProductImages:this.contentPageEnd=!0,this.isImageProgress=!1},i=>{this.isImageProgress=!1}))},200)}onCancel(){this.cancel.emit()}}return(s=g).\u0275fac=function(e){return new(e||s)(t.rXU(Nt.Z))},s.\u0275cmp=t.VBU({type:s,selectors:[["app-removeBg-edit-tool"]],viewQuery:function(e,n){if(1&e&&t.GBs(Lt,5),2&e){let i;t.mGM(i=t.lsd())&&(n.acc=i.first)}},outputs:{cancel:"cancel"},features:[t.Vt3],decls:38,vars:3,consts:[["acc","ngbAccordion"],["patternAcc","ngbAccordion"],[1,"d-flex","align-items-start","justify-content-start","flex-column","w-100","ps-3","pe-3","remove-bg-edit-tool","editor-tool-panel"],[1,"d-flex","align-items-center","justify-content-start","w-100","mb-1",2,"min-height","56px"],["name","leftarrow",1,"back-icon","f-24","d-flex","align-items-center","justify-content-center","pointer","border-radius-8",3,"click"],[1,"text-lg","text-semi","text-dark","lh-125"],[1,"d-flex","align-items-start","justify-content-start","w-100","flex-column","ngb-btn"],["ngbAccordion","",1,"w-100",3,"closeOthers","destroyOnHide"],["ngbAccordionItem","remove-bg-1"],["ngbAccordionHeader",""],[1,"d-flex","align-items-center","wp-100"],["type","button","ngbAccordionButton","",1,"btn-acc-title"],[1,"m-0","btn","btn-link","card-title","ms-3"],["type","button","ngbAccordionButton","",1,"btn-collapse","p-0"],[1,"collapse-text","btn-link"],["name","collapseAcc",1,"f-24"],[1,"expand-text"],["name","expandAcc",1,"f-24"],["ngbAccordionCollapse",""],["ngbAccordionBody",""],["ngbAccordionItem","remove-bg-2"],[1,"editor-toggle",2,"height","26px"],[1,"d-flex","align-items-center","mb-0",3,"changeT","selected"],[1,"d-flex","align-items-start","justify-content-center","w-100","flex-column","ps-3","pe-3","pb-2","mt-1"],[1,"wp-100","btn-tabs-editor","border-radius-12"],[1,"d-flex","align-items-center","h-100"],[1,"btn","btn-tab-inner",3,"click","ngClass"],[1,"inner-strip-h"],[1,"tab-child-item",3,"ngClass"],[4,"ngIf"],[1,"tab-child-item","backgound-content",3,"ngClass"],[1,"pane-section",2,"position","initial !important"],[1,"d-flex","align-items-center","justify-content-start","w-100","h-40","mt-10"],[1,"grey-800","text-semi","text-14"],[1,"d-flex","align-items-center","justify-content-start","w-100","custom-colors"],[1,"border-radius-12","me-2","pointer"],[1,"colors-bg",2,"z-index","1"],[1,"custom","color","control","p-0","border-radius-12","position-relative","me-2","d-flex","align-items-center","justify-content-center"],[1,"no-style","
1innerstyle","d-flex","align-items-center","justify-content-center",2,"background-color","black"],[1,"d-flex","align-items-center","justify-content-start","w-100","h-40","mt-9"],[1,"content","presets-colors"],[1,"colors-bg"],[1,"colors","color-thumb","presets"],["class","no-style color control p-0 color-box",3,"background","click",4,"ngFor","ngForOf"],[1,"no-style","color","control","p-0","color-box",3,"click"],[1,"drawer-content","backgound-patterns"],[1,"d-flex","align-items-center","justify-content-start","w-100","mt-10","mb-9"],[1,"d-inline-flex","align-items-center","justify-content-center","transparent-item-box","border-radius-12","me-2","pointer"],[1,"d-inline-flex","align-items-center","justify-content-center","upload-item-box","border-radius-12","flex-column","me-2","pointer"],["name","uploadmediaNew",1,"f-28","grey-600"],[1,"grey-800","text-semi","text-12"],[1,"d-inline-flex","align-items-center","justify-content-center","uploaded-items","border-radius-12","pointer"],["src","https://d3b6owgxiy1z3s.cloudfront.net/6b08ecb1e8f844038db52181c42eed3a/0b864f8abe7442d58e811a001a2d7c1a"],["ngbAccordion","",3,"closeOthers","destroyOnHide"],["class","tab-div",3,"ngbAccordionItem",4,"ngFor","ngForOf"],[1,"tab-div",3,"ngbAccordionItem"],[1,"d-flex","align-items-center","mt-2","justify-content-between"],["type","button","ngbAccordionButton","",1,"btn-acc-title","w-auto",2,"width","auto !important"],[1,"m-0","btn","btn-link","text-normal","text-semi","grey-800"],["type","button","ngbAccordionButton","",1,"btn-collapse-expand","d-flex","align-items-center","border-radius-8","p-1","border-0","h-24","me-2"],[1,"collapse-text","text-11","grey-600"],[1,"collapse-text","text-11","grey-600",3,"click"],["class","sticker-thumb mt-9",3,"click",4,"ngFor","ngForOf"],[1,"sticker-thumb","mt-9",3,"click"],[1,"inner","position-relative"],["disableRC","",3,"src"],[1,"content"],["class","sticker-thumb",3,"click",4,"ngFor","ngForOf"],[1,"sticker-thumb",3,"click"],[1,"inner"]],template:function(e,n){if(1&e){const i=t.RV6();t.j41(0,"div",2)(1,"div",3)(2,"pi",4),t.bIt("click",function(){return t.eBV(i),t.Njj(n.onCancel())}
1),t.k0s(),t.j41(3,"span",5),t.EFF(4,"Remove Background"),t.k0s()(),t.j41(5,"div",6)(6,"div",7,0)(8,"div",8)(9,"div",9)(10,"div",10)(11,"button",11)(12,"div",12),t.EFF(13,"Background"),t.k0s()(),t.j41(14,"button",13)(15,"span",14),t.nrm(16,"pi",15),t.k0s(),t.j41(17,"span",16),t.nrm(18,"pi",17),t.k0s()()()(),t.j41(19,"div",18)(20,"div",19),t.DNE(21,ee,12,14,"ng-template"),t.k0s()()(),t.j41(22,"div",20)(23,"div",9)(24,"div",10)(25,"button",11)(26,"div",12),t.EFF(27,"Shadow"),t.k0s()(),t.j41(28,"div",21)(29,"toggle-switch",22),t.bIt("changeT",function(a){return t.eBV(i),t.Njj(n.addRemoveShadow(a))}),t.k0s()(),t.j41(30,"button",13)(31,"span",14),t.nrm(32,"pi",15),t.k0s(),t.j41(33,"span",16),t.nrm(34,"pi",17),t.k0s()()()(),t.j41(35,"div",18)(36,"div",19),t.DNE(37,ne,1,0,"ng-template"),t.k0s()()()()()()}2&e&&(t.R7$(6),t.Y8G("closeOthers",!0)("destroyOnHide",!1),t.R7$(23),t.Y8G("selected",n.shadowApplied))},dependencies:[O.YU,O.Sq,O.bT,J.b,V.WP,V.r6,V.tW,V.x7,V.UA,V.$R,Yt.C,Vt.G],styles:[".btn-tabs-editor[_ngcontent-%COMP%]{background:#e2e3ea66;height:40px;border:0px;padding:4px}.btn-tabs-editor[_ngcontent-%COMP%] .btn-tab-inner[_ngcontent-%COMP%]{height:32px;border-radius:10px;color:#272b34}.btn-tabs-editor[_ngcontent-%COMP%] .btn-tab-inner[_ngcontent-%COMP%]:hover{background-color:transparent!important;color:#272b34!important}.btn-tabs-editor[_ngcontent-%COMP%] .active-btn-tab[_ngcontent-%COMP%], .btn-tabs-editor[_ngcontent-%COMP%] .active-btn-tab[_ngcontent-%COMP%]:hover{background:#626adf!important;color:#fff!important}.sticker-thumb[_ngcontent-%COMP%]{height:auto;width:25%;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)}.presets-colors[_ngcontent-%COMP%] .colors[_ngcontent-%COMP%]{display:flex;justify-content:left}.presets-colors[_ngcontent-%COMP%] .color-thumb[_ngcontent-%COMP%]{display:block!important}.presets-colors[_ngcontent-%COMP%] .color-thumb[_ngcontent-%COMP%] .color-box[_ngcontent-%COMP%]{margin:0 8px 8px 0!important}.presets-colors[_ngcontent-%COMP%] .color-thumb[_ngcontent-%COMP%] .color-box[_ngcontent-%COMP%]:nth-child(6n){margin:0 0 8px!important}.presets-colors[_ngcontent-%COMP%] .presets[_ngcontent-%COMP%] button.color[_ngcontent-%COMP%], .presets-colors[_ngcontent-%COMP%] .presets[_ngcontent-%COMP%] .colors-bg[_ngcontent-%COMP%] button.color[_ngcontent-%COMP%]{margin:0;width:32.6px!important;height:32.6px!important;box-shadow:none}.custom-colors[_ngcontent-%COMP%]{padding:2px 0}.custom-colors[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{height:32px;width:32px;background:url(https://static.lightxeditor.com/assets/images/color-wheel.png) center center no-repeat;background-size:cover}.custom-colors[_ngcontent-%COMP%] .colors-bg[_ngcontent-%COMP%] .custom.color[_ngcontent-%COMP%]{width:36px;height:36px}.custom-colors[_ngcontent-%COMP%] .colors-bg[_ngcontent-%COMP%] .custom.color[_ngcontent-%COMP%] button.innerstyle[_ngcontent-%COMP%]{width:36px;height:36px;border:1px solid #E2E3E9;border-radius:12px}.upload-item-box[_ngcontent-%COMP%]{border:1px solid #E2E3EB;background:#5e6aef0d;width:73px;height:73px;overflow:hidden}.transparent-item-box[_ngcontent-%COMP%]{border:1px solid #E2E3EB;background:url(https://static.lightxeditor.com/assets/images/tranparent.png) center center repeat;background-size:12px 12px;width:73px;height:73px;overflow:hidden}.uploaded-items[_ngcontent-%COMP%]{border:1px solid #E2E3EB;background:#5e6aef0d;width:73px;height:73px;overflow:hidden}.uploaded-items[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{height:100%;width:100%;object-fit:cover}"]}),g})();function oe(s,g){if(1&s&&t.nrm(0,"img",3),2&s){const r=t.XpG();t.xc7("filter","blur("+r.getBlurPx()+")")("transform","scale(1.1)"),t.Y8G("src",(null==r.item?null:r.item.previewUrl)||(null==r.item?null:r.item.objectUrl),t.B4B)}}let re=(()=>{var s;class g{constructor(){this.cssHieght="auto",this.cssWidth="auto"}ngOnInit(){this.item?.frameAspectW<this.item?.frameAspectH?(this.cssHieght="var(--colWidth)",this.cssWidth="auto"):(this.cssHieght="auto",this.cssWidth="var(--colWidth)")}computeTransform(e){const n=e?.scale??1;return`translate(${e?.panX??0}%, ${e?.panY??0}%) scale(${n})`}
1getBackgroundImage(){if(this.isBlurBackground())return"none";const e=this.item?.backgroundImageUrl;return e?`url('${e}')`:this.item?.backgroundColor?"none":"linear-gradient(45deg, #E1E1E5 25%, transparent 25%), \nlinear-gradient(-45deg, #E1E1E5 25%, transparent 25%),\nlinear-gradient(45deg, transparent 75%, #E1E1E5 75%),\nlinear-gradient(-45deg, transparent 75%, #E1E1E5 75%)"}getBackgroundColor(){if(this.isBlurBackground())return null;const e=this.item?.backgroundImageUrl,n=this.item?.backgroundColor;return e?n||null:n||"#fff"}getBackgroundSize(){return this.item?.backgroundImageUrl?"cover":"16px 16px"}getBackgroundPosition(){return this.item?.backgroundImageUrl||this.isBlurBackground()?"center":"0 0, 0 8px, 8px -8px, -8px 0px"}isBlurBackground(){const e=this.item?.backgroundColor,n=this.parseNumeric(e);return 50===n||100===n}getBlurPx(){const e=this.item?.backgroundColor;return(this.parseNumeric(e)||0)/8+"px"}parseNumeric(e){if(null==e)return null;const n="number"==typeof e?e:parseFloat(e);return Number.isFinite(n)?n:null}}return(s=g).\u0275fac=function(e){return new(e||s)},s.\u0275cmp=t.VBU({type:s,selectors:[["app-image-frame-tile"]],inputs:{item:"item"},decls:3,vars:18,consts:[[1,"frame-tile","position-relative"],["alt","","style","position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 0;",3,"src","filter","transform",4,"ngIf"],["decoding","async","loading","lazy","alt","",2,"position","relative","z-index","1","width","100%","height","100%","transform-origin","50% 50%","object-fit","contain",3,"src"],["alt","",2,"position","absolute","inset","0","width","100%","height","100%","object-fit","cover","z-index","0",3,"src"]],template:function(e,n){1&e&&(t.j41(0,"div",0),t.DNE(1,oe,1,5,"img",1),t.nrm(2,"img",2),t.k0s()),2&e&&(t.tcI("overflow: hidden; width: ",n.cssWidth,"; height: ",n.cssHieght,"; max-width: 100%; margin: 0 auto;"),t.xc7("aspect-ratio",((null==n.item?null:n.item.frameAspectW)||1)+" / "+((null==n.item?null:n.item.frameAspectH)||1))("background-image",n.getBackgroundImage())("background-color",n.getBackgroundColor())("background-size",n.getBackgroundSize())("background-position",n.getBackgroundPosition()),t.R7$(),t.Y8G("ngIf",n.isBlurBackground()),t.R7$(),t.xc7("transform",n.computeTransform(n.item)),t.Y8G("src",(null==n.item?null:n.item.previewUrl)||(null==n.item?null:n.item.objectUrl),t.B4B))},dependencies:[O.bT],encapsulation:2,changeDetection:0}),g})();const se=["batchItemListsGroup"],ae=(s,g)=>({visibleads:s,"hideads-col":g}),ce=s=>({"mb-2":s}),le=s=>({"add-padding":s}),de=s=>({visible:s});function ge(s,g){if(1&s){const r=t.RV6();t.j41(0,"button",35),t.bIt("click",function(){const n=t.eBV(r).$implicit;t.XpG(3);const i=t.sdS(5);return t.Njj(n.onClick(i))}),t.j41(1,"div",36),t.nrm(2,"pi",37),t.j41(3,"span",38),t.EFF(4),t.k0s()(),t.nrm(5,"pi",39),t.k0s()}if(2&s){const r=g.$implicit;t.Y8G("ngClass",t.eq3(3,ce,!g.last)),t.R7$(2),t.Y8G("name",r.icon),t.R7$(2),t.JRh(r.label)}}function he(s,g){if(1&s&&(t.qex(0),t.j41(1,"div",33),t.DNE(2,ge,6,5,"button",34),t.k0s(),t.bVm()),2&s){const r=t.XpG(2);t.R7$(2),t.Y8G("ngForOf",r.toolActions)("ngForTrackBy",r.trackByActionLabel)}}function pe(s,g){if(1&s){const r=t.RV6();t.j41(0,"app-crop-edit-tool",40),t.bIt("customError",function(n){t.eBV(r);const i=t.XpG(2);return t.Njj(i.customError(n))})("cancel",function(){t.eBV(r);const n=t.XpG(2);return t.Njj(n.onCancelCrop())})("aspectSelected",function(n){t.eBV(r);const i=t.XpG(2);return t.Njj(i.onCropAspectChange(n))})("markerSelected",function(n){t.eBV(r);const i=t.XpG(2);return t.Njj(i.onCropMarkerChange(n))}),t.EFF(1," >"),t.k0s()}if(2&s){const r=t.XpG(2);t.Y8G("width",(null==r.state.images||null==r.state.images[0]?null:r.state.images[0].width)||1)("height",(null==r.state.images||null==r.state.images[0]?null:r.state.images[0].height)||1)}}function me(s,g){if(1&s){const r=t.RV6();t.j41(0,"resize-edit-tools",41),t.bIt("changeSize",function(n){t.eBV(r);const i=t.XpG(2);return t.Njj(i.onChangeSizeResize(n))})("bgColorChanged",function(n){t.eBV(r);const i=t.XpG(2);return t.Njj(i.onBgColorChangedResize(n))})("cancel",function(){t.eBV(r);const n=t.XpG(2);return t.Njj(n.onCancelResize())})("customError",function(n){t.eBV(r);const i=t.XpG(2);return t.Njj(i.customError(n))}),t.k0s()}if(2&s){const r=t.XpG(2);t.ZvI("batch-tool-",r.activeToolPanel,""),t.Y8G("CreateFromScratch",r.CreateFromScratch)("showBackArrow",!0)("showScale",!1)("width",(null==r.state.images||null==r.state.images[0]?null:r.state.images[0].width)||100)("height",(null==r.state.images||null==r.state.images[0]?null:r.state.images[0].height)||100)("batchResize",!0)}}function ue(s,g){if(1&s){const r=t.RV6();t.j41(0,"app-removeBg-edit-tool",42),t.bIt("cancel",function(){t.eBV(r);const n=t.XpG(2);return t.Njj(n.onCancelRemoveBg())}),t.k0s()}}function _e(s,g){1&s&&(t.j41(0,"div",48)(1,"span",46),t.EFF(2,"1 generation ="),t.k0s(),t.j41(3,"span",49),t.nrm(4,"img",50),t.k0s(),t.j41(5,"span",46),t.EFF(6,"1 credits"),t.k0s()())}function fe(s,g){if(1&s){const r=t.RV6();t.j41(0,"div",43)(1,"div",44)(2,"button",45),t.bIt("click",function(){t.eBV(r);const n=t.XpG(2);return t.Njj(n.applyChanges())}),t.j41(3,"span",46),t.EFF(4,"Apply Changes"),t.k0s()()(),t.DNE(5,_e,7,0,"div",47),t.k0s()}if(2&s){const r=t.XpG(2);t.R7$(2),t.Y8G("disabled",r.disabled),t.R7$(3),t.Y8G("ngIf","removeBg"===r.activeToolPanel)}}function be(s,g){if(1&s){const r=t.RV6();t.qex(0),t.j41(1,"div",51)(2,"div",52)(3,"video",53),t.nrm(4,"source",54),t.EFF(5," Your browser does not support the video tag. "),t.k0s()(),t.j41(6,"span",55),t.EFF(7,"Edit up to 50 images at once"),t.k0s(),t.j41(8,"span",56),t.EFF(9,"Drag and drop the images anywhere on this page"),t.k0s(),t.j41(10,"span",57),t.EFF(11,"JPEG, PNG, WEBP, BMP only"),t.k0s(),t.j41(12,"span",58)(13,"button",59),t.bIt("click",function(){t.eBV(r);const n=t.XpG(2);return t.sdS(5).open(),t.Njj(n.openPenel="")}),t.EFF(14,"Upload Image"),t.k0s()()(),t.bVm()}2&s&&(t.R7$(3),t.Y8G("muted","muted"))}function Ce(s,g){if(1&s&&(t.qex(0),t.nrm(1,"app-resize-tile",66),t.bVm()),2&s){const r=t.XpG().$implicit,e=t.XpG(4);t.R7$(),t.Y8G("item",r)("mode",e.resizeMode)("size",e.resizeSize)("containerWidth",e.imageWidth.replace("px",""))("backgroundColor",e.resizeBgColor)}}function ve(s,g){if(1&s&&(t.qex(0),t.j41(1,"div",67)(2,"span",68),t.EFF(3),t.nrm(4,"pi",69),t.EFF(5),t.k0s()(),t.bVm()),2&s){const r=t.XpG().$implicit,e=t.XpG(4);t.R7$(3),t.Lme("",r.width,"x",r.height,"px"),t.R7$(2),t.Lme("",null==e.resizeSize?null:e.resizeSize.width,"x",null==e.resizeSize?null:e.resizeSize.height,"px")}}function we(s,g){if(1&s&&(t.qex(0),t.j41(1,"div",70)(2,"div",71),t.nrm(3,"pi",72),t.EFF(4,"Drag image to pan "),t.k0s()(),t.bVm()),2&s){const r=t.XpG(5);t.R7$(),t.Y8G("ngClass",t.eq3(1,de,r.dragHintVisible))}}function ke(s,g){if(1&s&&(t.j41(0,"div",73)(1,"span",68),t.EFF(2),t.k0s()()),2&s){const r=t.XpG().$implicit;t.R7$(2),t.Lme("",r.width,"x",r.height,"px")}}function Pe(s,g){1&s&&(t.j41(0,"div",74)(1,"div",75)(2,"span",76),t.EFF(3,"Loading..."),t.k0s()()())}function xe(s,g){if(1&s&&(t.j41(0,"div",63),t.DNE(1,Ce,2,5,"ng-container",20)(2,ve,6,4,"ng-container",64)(3,we,5,3,"ng-container",20)(4,ke,3,2,"ng-template",null,5,t.C5r)(6,Pe,4,0,"div",65),t.nI1(7,"async"),t.k0s()),2&s){const r=g.$implicit,e=g.index,n=t.sdS(5),i=t.XpG(4);t.R7$(),t.Y8G("ngIf",r.frameAspectW&&r.frameAspectH),t.R7$(),t.Y8G("ngIf",(null==i.resizeSize?null:i.resizeSize.width)&&(null==i.resizeSize?null:i.resizeSize.height))("ngIfElse",n),t.R7$(),t.Y8G("ngIf",0===e),t.R7$(3),t.Y8G("ngIf",t.bMT(7,5,i.state.inProgress$))}}function Me(s,g){if(1&s&&(t.qex(0),t.DNE(1,xe,8,7,"div",62),t.bVm()),2&s){const r=t.XpG(3);t.R7$(),t.Y8G("ngForOf",r.state.images)("ngForTrackBy",r.trackById)}}function Oe(s,g){if(1&s&&(t.qex(0),t.nrm(1,"app-crop-tile",77),t.bVm()),2&s){const r=t.XpG().$implicit;t.R7$(),t.Y8G("item",r)}}function ye(s,g){1&s&&t.nrm(0,"div",78)}function Ee(s,g){1&s&&(t.j41(0,"div",74)(1,"div",75)(2,"span",76),t.EFF(3,"Loading..."),t.k0s()()())}function Te(s,g){if(1&s&&(t.j41(0,"div",63),t.DNE(1,Oe,2,1,"ng-container",64)(2,ye,1,0,"ng-template",null,6,t.C5r)(4,Ee,4,0,"div",65),t.nI1(5,"async"),t.k0s()),2&s){const r=g.$implicit,e=t.sdS(3),n=t.XpG(4);t.R7$(),t.Y8G("ngIf",r.frameAspectW&&r.frameAspectH)("ngIfElse",e),t.R7$(3),t.Y8G("ngIf",t.bMT(5,3,n.state.inProgress$))}}function Ie(s,g){if(1&s&&(t.qex(0),t.DNE(1,Te,6,5,"div",62),t.bVm()),2&s){const r=t.XpG(3);t.R7$(),t.Y8G("ngForOf",r.state.images)("ngForTrackBy",r.trackById)}}function Be(s,g){if(1&s&&(t.qex(0),t.nrm(1,"app-image-frame-tile",77),t.bVm()),2&s){const r=t.XpG().$implicit;t.R7$(),t.Y8G("item",r)}}function je(s,g){1&s&&t.nrm(0,"div",78)}function Re(s,g){1&s&&(t.j41(0,"div",74)(1,"div",75)(2,"span",76),t.EFF(3,"Loading..."),t.k0s()()())}function Se(s,g){if(1&s){const r=t.RV6();t.j41(0,"div",63),t.DNE(1,Be,2,1,"ng-container",64)(2,je,1,0,"ng-template",null,7,t.C5r),t.j41(4,"div",79)(5,"span",68),t.EFF(6),t.k0s()(),t.j41(7,"div",80),t.bIt("click",function(){const n=t.eBV(r).$implicit,i=t.XpG(4);return t.Njj(i.deleteImage(n))}),t.nrm(8,"pi",81),t.k0s(),t.DNE(9,Re,4,0,"div",65),t.nI1(10,"async"),t.k0s()}if(2&s){const r=g.$implicit,e=t.sdS(3),n=t.XpG(4);t.R7$(),t.Y8G("ngIf",r.frameAspectW&&r.frameAspectH)("ngIfElse",e),t.R7$(5),t.Lme("",r.width,"x",r.height,"px"),t.R7$(3),t.Y8G("ngIf",t.bMT(10,5,n.state.inProgress$))}}function Ue(s,g){if(1&s&&(t.qex(0),t.DNE(1,Se,11,7,"div",62),t.bVm()),2&s){const r=t.XpG(3);t.R7$(),t.Y8G("ngForOf",r.state.images)("ngForTrackBy",r.trackById)}}function Fe(s,g){if(1&s&&(t.j41(0,"div",60)(1,"div",61),t.DNE(2,Me,2,2,"ng-container",20)(3,Ie,2,2,"ng-container",20)(4,Ue,2,2,"ng-container",20),t.k0s()()),2&s){const r=t.XpG(2);t.R7$(),t.xc7("--colWidth",r.imageWidth),t.Y8G("ngClass",t.eq3(6,le,"resize"!==r.mode&&((null==r.state.images?null:r.state.images.length)||0)>0)),t.R7$(),t.Y8G("ngIf","resize"===r.mode),t.R7$(),t.Y8G("ngIf","crop"===r.mode),t.R7$(),t.Y8G("ngIf","file"===r.mode&&((null==r.state.images?null:r.state.images.length)||0)>0)}}function Ae(s,g){if(1&s){const r=t.RV6();t.qex(0),t.j41(1,"div",82)(2,"span",83),t.EFF(3," Looking to begin a new batch of images? "),t.k0s(),t.j41(4,"button",84),t.bIt("click",function(){t.eBV(r);const n=t.XpG(2),i=t.sdS(5);return t.Njj(n.startOver(i))}),t.EFF(5," Start Over "),t.k0s()(),t.bVm()}}function ze(s,g){if(1&s){const r=t.RV6();t.qex(0),t.j41(1,"div",85)(2,"div",86)(3,"video",87),t.nrm(4,"source",88),t.EFF(5," Your browser does not support the video tag. "),t.k0s()(),t.j41(6,"span",89),t.EFF(7,"Easily remove and change the background from multiple images with just one click."),t.k0s(),t.j41(8,"button",90),t.bIt("click",function(){t.eBV(r);const n=t.XpG(2);return t.Njj(n.upgradeToPro())}),t.EFF(9,"Upgrade to Pro"),t.k0s()(),t.bVm()}2&s&&(t.R7$(3),t.Y8G("muted","muted"))}function We(s,g){if(1&s){const r=t.RV6();t.j41(0,"div",12,1),t.nrm(2,"app-top-strip",13)(3,"editor-header",14,2),t.j41(5,"div",15)(6,"div",16)(7,"aside",17)(8,"div",16)(9,"div",18),t.nI1(10,"async"),t.nI1(11,"async"),t.nI1(12,"async"),t.j41(13,"div",19),t.DNE(14,he,3,2,"ng-container",20),t.qex(15,21),t.j41(16,"div",22)(17,"div",23,3)(19,"div",24),t.DNE(20,pe,2,2,"app-crop-edit-tool",25)(21,me,1,9,"resize-edit-tools",26)(22,ue,1,0,"app-removeBg-edit-tool",27),t.k0s()()(),t.bVm(),t.k0s(),t.DNE(23,fe,6,2,"div",28),t.k0s()()(),t.j41(24,"div",29)(25,"div",30,4),t.bIt("contextmenu",function(n){return t.eBV(r),t.Njj(n.preventDefault())}),t.j41(27,"div",31),t.DNE(28,be,15,1,"ng-container",20)(29,Fe,5,8,"div",32)(30,Ae,6,0,"ng-container",20)(31,ze,10,1,"ng-container",20),t.k0s()()()()()()}if(2&s){const r=t.XpG();t.Y8G("ngClass",t.l_i(23,ae,!r.user||!r.user.subscribed,!r.showAds)),t.R7$(3),t.Y8G("mode",r.mode),t.R7$(6),t.xc7("pointer-events",t.bMT(10,17,r.state.inProgress$)?"none":null)("opacity",t.bMT(11,19,r.state.inProgress$)?.5:1),t.BMQ("aria-disabled",!!t.bMT(12,21,r.state.inProgress$)||null),t.R7$(5),t.Y8G("ngIf",!r.activeToolPanel),t.R7$(),t.Y8G("ngSwitch",r.activeToolPanel),t.R7$(5),t.Y8G("ngSwitchCase","crop"),t.R7$(),t.Y8G("ngSwitchCase","resize"),t.R7$(),t.Y8G("ngSwitchCase","removeBg"),t.R7$(),t.Y8G("ngIf",r.activeToolPanel),t.R7$(5),t.Y8G("ngIf",0===((null==r.state.images?null:r.state.images.length)||0)),t.R7$(),t.Y8G("ngIf",r.mode&&((null==r.state.images?null:r.state.images.length)||0)>0),t.R7$(),t.Y8G("ngIf","file"===r.mode&&((null==r.state.images?null:r.state.images.length)||0)>0),t.R7$(),t.Y8G("ngIf","removeBg"===r.activeToolPanel&&!(r.user&&r.user.subscribed))}}function De(s,g){if(1&s&&(t.j41(0,"div",94),t.EFF(1),t.k0s()),2&s){const r=t.XpG(2);t.R7$(),t.SpI(" Upload upto ",r.uploadType," at a time ")}}function He(s,g){if(1&s&&(t.j41(0,"div",91)(1,"div",92),t.EFF(2," Drop images anywhere to upload "),t.DNE(3,De,2,1,"div",93),t.k0s()()),2&s){const r=t.XpG();t.Y8G("ngClass",r.isShown?"show":"d-none"),t.R7$(3),t.Y8G("ngIf",!(null!=r.state.images&&r.state.images.length))}}const Ge=[{path:"",redirectTo:"edit",pathMatch:"full"},{path:"edit",component:(()=>{var s;class g{constructor(e,n,i,o,a,c,m,h,l){this.cdr=e,this.state=n,this.exportService=i,this.thumbnailService=o,this.authService=a,this.resizeContentService=c,this.confirmDialogService=m,this.subsService=h,this.renderer=l,this.showAds=!1,this.mode="file",this.tileSize=280,this.activeToolPanel="",this.resizeSize=null,this.resizeMode="fit",this.resizeScale=100,this.resizeBgColor=null,this.columnCount=4,this.imageWidth="184px",this.imageMargin=12,this.isShown=!1,this.uploadType="50 images",this.openPenel="",this.disabled=!1,this.currentCropMarker="cc",this.dragHintVisible=!1,this.dragHintShownThisSession=!1,this.lastImageCount=0,this.toolActions=[{label:"Crop",icon:"crop",onClick:d=>this.enterCropMode(d)},{label:"Resize",icon:"resizenew",onClick:d=>this.enterResizeMode(d)}]}ngOnInit(){this.user=this.authService.currentUser(),this.lastImageCount=this.state.images?.length||0,this.imagesSub=this.state.imagesChanged$.subscribe(e=>{e>0&&0===this.lastImageCount&&this.activateCropPanelAfterUpload(),this.lastImageCount=e}),this.fileUploadAccept=this.state.acceptedInputTypesAttr,this.resizeContentService.getResizeContent(e=>{this.CreateFromScratch=e,this.cdr.markForCheck()}),document.body.classList.add("overflow-hidden")}trackById(e,n){return n.id}trackByActionLabel(e,n){return n.label}get noImages(){return 0===(this.state.images?.length||0)}customError(e){this.disabled=e}enterCropMode(e){this.openPenel="crop",this.noImages?e.open():(this.mode="crop",this.state.activeMode="crop",this.activeToolPanel="crop",this.hideDragHint(),this.cropTiles&&this.cropTiles.forEac
1h(n=>n.snapshotBackup()))}enterResizeMode(e){this.openPenel="resize",this.noImages?e.open():(this.mode="resize",this.state.activeMode="resize",this.activeToolPanel="resize")}enterRemoveBgMode(){this.mode="removeBg",this.state.activeMode="removeBg",this.activeToolPanel="removeBg"}onChangeSizeResize(e){if(e.width&&e.height&&e.isValid&&e?.isApply){const n=this.resizeMode;this.resizeSize={width:e.width,height:e.height},this.resizeMode=e.fillCanvas?"fill":"fit","fill"===n&&"fit"===this.resizeMode&&this.scrollToResizeColorTool(),"fit"===this.resizeMode?this.hideDragHint():"resize"===this.mode&&"fill"===this.resizeMode&&!this.dragHintShownThisSession&&(this.cancelDragHintTimer(),this.dragHintTimerId=setTimeout(()=>{"resize"===this.mode&&"fill"===this.resizeMode&&this.resizeSize&&(this.dragHintVisible=!0,this.dragHintShownThisSession=!0,this.cdr.markForCheck())},2e3))}}scrollToResizeColorTool(){setTimeout(()=>{let e=null;if(e=document.querySelector("#resizeColorTool"),!e)return;const n=e.closest(".ps");if(n){const i=n.getBoundingClientRect(),o=e.getBoundingClientRect();n.scrollTo({top:o.top-i.top+(n.scrollTop||0)-20,behavior:"smooth"})}else e.scrollIntoView({behavior:"smooth",block:"nearest",inline:"nearest"})},150)}onBgColorChangedResize(e){console.log(e),this.resizeBgColor=e?.color??null,this.cdr.markForCheck()}onChangeScaleResize(e){console.log(e)}onCancelResize(){if(!this.resizeTiles?.some(i=>i?.hasChanges?.()))return this.resizeTiles&&this.resizeTiles.forEach(i=>i.restoreFromBackup()),this.mode="file",this.state.activeMode="",this.activeToolPanel=null,this.resetResizeParam(),this.hideDragHint(),void this.cdr.markForCheck();this.confirmDialogService.confirmDialog({title:F.b.message.warningMessage,okButtonText:"Okay",cancelButtonText:"Cancel",class:"batch-edit-modal"}).result.then(i=>{"ok"==i&&(this.resizeTiles&&this.resizeTiles.forEach(o=>o.restoreFromBackup()),this.mode="file",this.state.activeMode="",this.activeToolPanel=null,this.resetResizeParam(),this.hideDragHint(),this.cdr.markForCheck())})}onCancelCrop(){if(!this.cropTiles?.some(i=>i?.hasChanges?.()))return this.cropTiles&&this.cropTiles.forEach(i=>i.restoreFromBackup()),this.mode="file",this.state.activeMode="",this.activeToolPanel=null,void this.cdr.markForCheck();this.confirmDialogService.confirmDialog({title:F.b.message.warningMessage,okButtonText:"Okay",cancelButtonText:"Cancel",class:"batch-edit-modal"}).result.then(i=>{"ok"==i&&(this.cropTiles&&this.cropTiles.forEach(o=>o.restoreFromBackup()),this.mode="file",this.state.activeMode="",this.activeToolPanel=null,this.cdr.markForCheck())})}onCropAspectChange(e){if(console.log(e),!this.cropTiles)return;if(null===e)return this.cropTiles.forEach(o=>{const a=o?.item?.frameAspectW||1,c=o?.item?.frameAspectH||1;o?.setWorkingFrameAspect(a,c),o?.setWorkingFrameAlignment(this.currentCropMarker)}),void this.cdr.markForCheck();const{w:n,h:i}=e;this.cropTiles.forEach(o=>{o?.setWorkingFrameAspect(n,i),o?.setWorkingFrameAlignment(this.currentCropMarker)}),this.cdr.markForCheck()}onCropMarkerChange(e){this.cropTiles&&(this.currentCropMarker=e||"cc",this.cropTiles.forEach(n=>n?.setWorkingFrameAlignment(this.currentCropMarker)),this.cdr.markForCheck())}onCancelRemoveBg(){this.mode="file",this.state.activeMode="",this.activeToolPanel=null,this.hideDragHint(),this.cdr.markForCheck()}ngAfterViewInit(){this.updateColumnCount()}updateColumnCount(){if(!this.batchItemListsGroup?.nativeElement)return;let e=this.batchItemListsGroup.nativeElement;const n=e?e.offsetWidth:0,i=window.getComputedStyle(e);i.getPropertyValue("padding-right"),i.getPropertyValue("padding-left"),this.columnCount=n<=480?2:n<=768?3:n<=1024?4:n<=1280||n<=1600?5:7,this.imageWidth=(n-24*(this.columnCount+1))/this.columnCount+"px",console.log(n),console.log(this.columnCount),console.log(this.imageWidth)}resetResizeParam(){this.resizeSize=null,this.resizeMode=null,this.resizeScale=100,this.resizeBgColor=null,this.cdr.markForCheck()}applyChanges(){var e=this;return(0,T.A)(function*(){try{e.resizeTiles&&e.resizeTiles.forEach(c=>c.commitToItem())}catch{}
1try{e.cropTiles&&e.cropTiles.forEach(c=>c.commitToItem())}catch{}e.state.inProgress=!0,e.cdr.markForCheck();const n=e.state.images||[],i=function(){var c=(0,T.A)(function*(m){if(m.file)try{return yield createImageBitmap(m.file)}catch{}if(m.blob)try{return yield createImageBitmap(m.blob)}catch{}return yield new Promise((h,l)=>{const d=new Image;d.crossOrigin="anonymous",d.decoding="async",d.onload=()=>h(d),d.onerror=u=>l(u||new Error("image load error")),d.src=m.previewUrl||m.objectUrl})});return function(h){return c.apply(this,arguments)}}(),o=c=>{try{c.previewUrl&&URL.revokeObjectURL(c.previewUrl)}catch{}try{c.objectUrl&&URL.revokeObjectURL(c.objectUrl)}catch{}try{c.preview?.bitmap?.close?.()}catch{}try{c.preview=void 0}catch{}},a=[];for(const c of n)try{const m=yield i(c);let h;h="crop"===e.mode?e.exportService.createCroppedCanvas(m,c?.crop||{x:0,y:0,w:1,h:1}):e.exportService.createTransformedCanvas(m,c);const l="image/jpeg"===c.file?.type||"image/png"===c.file?.type?c.file.type:"image/png",d=yield new Promise((b,C)=>{const B=[l];"image/jpeg"===l&&B.push(.92),h.toBlob(k=>k?b(k):C(new Error("toBlob failed")),...B)}),u="image/png"===l?"image/png":"image/jpeg",f=yield e.thumbnailService.createFromCanvas(h,512,u,.9),w=new File([d],(c.name||c.file?.name||"image").replace(/\.[a-z0-9]+$/i,"")+("image/jpeg"===l?".jpg":".png"),{type:l}),x=URL.createObjectURL(d);a.push({id:c.id,file:w,objectUrl:x,name:w.name,size:d.size,width:h.width,height:h.height,crop:{x:0,y:0,w:1,h:1},status:"idle",frameAspectW:c.frameAspectW,frameAspectH:c.frameAspectH,panX:0,panY:0,scale:1,previewUrl:f.url,backgroundColor:null,backgroundImageUrl:null,targetWidth:h.width,targetHeight:h.height}),o(c)}catch{a.push(c)}e.state.images=a,e.mode="file",e.state.activeMode="",e.activeToolPanel=null,e.resetResizeParam(),e.state.inProgress=!1,e.hideDragHint(),e.cdr.markForCheck()})()}startOver(e){this.confirmDialogService.confirmDialog({title:F.b.message.startOverBatch,okButtonText:"Okay",cancelButtonText:"Cancel",class:"batch-edit-modal"}).result.then(i=>{"ok"==i&&(this.state.clearAll(),this.mode="file",this.state.activeMode="",this.activeToolPanel=null,this.openPenel="",this.resetResizeParam(),this.hideDragHint(),this.cdr.markForCheck(),e.open())})}upgradeToPro(){this.subsService.loginWithUpgrade(()=>{this.cdr.markForCheck(),this.user=this.authService.currentUser()})}unloadNotification(e){this.canDeactivate()||(e.returnValue=!0)}canDeactivate(){return!this.state?.images?.length}getEditorType(){return ct._Y.BatchEditor}deleteImage(e){this.state.deleteImage(e),this.cdr.markForCheck()}ngOnDestroy(){document.body.classList.remove("overflow-hidden"),this.cancelDragHintTimer();try{document.documentElement.style.overflow="auto"}catch{}try{this.state?.clearAll()}catch{}this.renderer.removeClass(document.body,"resize-drop");try{this.imagesSub?.unsubscribe()}catch{}}dropped(e){e.length>0&&(this.isShown=!1,this.onFileUploadedDrop(e))}fileOver(e){this.isShown=!this.activeToolPanel,document.documentElement.style.overflow="hidden"}fileLeave(e){this.isShown=!1,document.documentElement.style.overflow="scroll"}droppedFile(e){document.documentElement.style.overflow="auto",this.onFileUploadedDrop(e),this.isShown=!1}onFileUploadedDrop(e){var n=this;document.documentElement.style.overflow="auto";const i=e.filter(o=>o.fileEntry.isFile).map(o=>o.fileEntry).map(o=>new Promise(a=>o.file(c=>{a(c)})));Promise.all(i).then(function(){var o=(0,T.A)(function*(a){n.state.inProgress=!0;try{const c=yield n.state.addFiles(a);yield n.state.generatePreviewBitmaps(c)}catch{}finally{n.state.inProgress=!1,n.cdr.markForCheck(),n.isShown=!1}});return function(a){return o.apply(this,arguments)}}()).catch(o=>{console.error(o),this.isShown=!1})}onDocumentClick(e){this.dragHintVisible&&(this.dragHintVisible=!1,this.cdr.markForCheck())}cancelDragHintTimer(){this.dragHintTimerId&&(clearTimeout(this.dragHintTimerId),this.dragHintTimerId=null)}hideDragHint(){this.dragHintVisible=!1,this.cancelDragHintTimer()}activateCropPanelAfterUpload(){const e="resize"===this.openPenel||"crop"===this.openPenel?this.openPenel:"";"resize"===e?(this.mode="resize",this.state.activeMode="resize",this.activeToolPanel="resize",this.hideDragHint()):"crop"===e&&(this.mode="crop",this.state.activeMode="crop",this.activeToolPanel="crop",this.hideDragHint(),setTimeout(()=>
1{this.cropTiles&&this.cropTiles.forEach(n=>n.snapshotBackup())})),this.cdr.markForCheck()}onSelectOpen(){this.renderer.addClass(document.body,"resize-drop")}onSelectClose(){this.renderer.removeClass(document.body,"resize-drop")}}return(s=g).\u0275fac=function(e){return new(e||s)(t.rXU(t.gRc),t.rXU(I),t.rXU(it),t.rXU(y),t.rXU(dt.u),t.rXU(gt.d),t.rXU(at.g),t.rXU(ht.n),t.rXU(t.sFG))},s.\u0275cmp=t.VBU({type:s,selectors:[["app-batch-editor-ui"]],viewQuery:function(e,n){if(1&e&&(t.GBs(se,5),t.GBs(Z,5),t.GBs(q,5)),2&e){let i;t.mGM(i=t.lsd())&&(n.batchItemListsGroup=i.first),t.mGM(i=t.lsd())&&(n.resizeTiles=i),t.mGM(i=t.lsd())&&(n.cropTiles=i)}},hostBindings:function(e,n){1&e&&t.bIt("beforeunload",function(o){return n.unloadNotification(o)},!1,t.tSv)("click",function(o){return n.onDocumentClick(o)},!1,t.EBC)},features:[t.Jv_([I,at.g])],decls:6,vars:2,consts:[["beFileInput",""],["page",""],["designheader",""],["scrollContent",""],["batchItemListsGroup",""],["dimensionGrip",""],["cropSkeleton",""],["frameSkeleton",""],["dropZoneLabel","Drop files here","multiple","true","dropZoneClassName","","contentClassName","",3,"onFileOver","accept"],["ngx-file-drop-content-tmp","",1,""],["dropZoneLabel","Drop files here","multiple","true","dropZoneClassName","","contentClassName","",3,"onFileDrop","onFileLeave","accept"],[2,"height","0px","display","none"],[1,"page","video-editor","editor-tool-panel",3,"ngClass"],[1,"position-relative"],[3,"mode"],["id","editor-view",1,"editor-view","ai-editor-view"],[1,"row","m-0","h-100","g-0"],[1,"col-i","left-panel"],[1,"col-i","navs-drawer","h-100","bg-white"],[1,"row","m-0","h-100","g-0",2,"height","calc(100% - 58px) !important"],[4,"ngIf"],[3,"ngSwitch"],[1,"drawer-content","position-relative"],[1,"scroll-content"],["customScrollDir","",1,"scroll-container"],[3,"width","height","customError","cancel","aspectSelected","markerSelected",4,"ngSwitchCase"],[3,"CreateFromScratch","showBackArrow","showScale","width","height","batchResize","class","changeSize","bgColorChanged","cancel","customError",4,"ngSwitchCase"],[3,"cancel",4,"ngSwitchCase"],["class","position-absolute fixed-bottom pb-1 pt-8 ps-3 pe-3 bg-white",4,"ngIf"],[1,"col-i","wrapper-for-timeline"],[1,"row","no-margin","main-content","g-0","overflow-hidden","pe-1",3,"contextmenu"],["customScrollDir","",1,"is-popover-tb-n","darkscroll","scroll-container","ps-0","pe-0","me-0"],["class","pl-9 pe-1",4,"ngIf"],[1,"d-flex","align-items-center","justify-content-start","w-100","flex-column","p-3","pt-10","left-navigation"],["class","d-flex align-items-center justify-content-between w-100 border-radius-12 pl-9 pe-2",3,"ngClass","click",4,"ngFor","ngForOf","ngForTrackBy"],[1,"d-flex","align-items-center","justify-content-between","w-100","border-radius-12","pl-9","pe-2",3,"click","ngClass"],[1,"d-inline-flex","align-items-center"],[1,"f-24","grey-600","mr-9",3,"name"],[1,"text-13","text-semi","grey-800"],["name","arrowdashbaord",1,"f-24","grey-800"],[3,"customError","cancel","aspectSelected","markerSelected","width","height"],[3,"changeSize","bgColorChanged","cancel","customError","CreateFromScratch","showBackArrow","showScale","width","height","batchResize"],[3,"cancel"],[1,"position-absolute","fixed-bottom","pb-1","pt-8","ps-3","pe-3","bg-white"],[1,"d-flex","align-items-center","justify-content-center","w-100","mb-1"],["id","gtm-generate",1,"btn","btn-primary","text-13","btn-h40","w-100","d-flex","align-items-center","justify-content-center",3,"click","disabled"],[1,"text-13"],["class","credit-description d-flex align-items-center justify-content-center w-100",4,"ngIf"],[1,"credit-description","d-flex","align-items-center","justify-content-center","w-100"],["_ngcontent-ng-c3826101613","",1,"ms-2","me-2"],["src","https://static.lightxeditor.com/assets/images/coin-lottie-s-anim.gif","width","24px","height","24px","alt","Coin Lottie"],[1,"blank-section","d-flex","align-items-center","justify-content-center","flex-column","h-100"],[1,"d-flex","flex-column","text-center"],["autoplay","","loop","",1,"border-radius-12",2,"width","180px","height","180px",3,"muted"],["src","https://static.lightxeditor.com/assets/tutorials/batch-common-video.mp4","type","video/mp4"],[1,"text-24","grey-800","mt-4","mb-4","text-semi","lh-125"],[1,"text-xxl","grey-600","mb-2","text-semi","lh-125"],[1,"text-13","grey-500"],[1,"mt-4"],[1,"btn","btn-primary","btn-h48","ps-3","pe-3",3,"click"],[1,"pl-9","pe-1"],[1,"d-flex","align-items-start","justify-content-start","w-100","pt-9","pb-9","batch-item-lists-group",3,"ngClass"],["class","d-flex align-items-center justify-content-start batch-list-item border-radius-12 ml-9 mr-9 mt-9 mb-9 overflow-hidden position-relative",4,"ngFor","ngForOf","ngForTrackBy"],[1,"d-flex","align-items-center","justify-content-start","batch-list-item","border-radius-12","ml-9","mr-9","mt-9","mb-9","overflow-hidden","position-relative"],[4,"ngIf","ngIfElse"],["class","d-flex align-items-center justify-content-center overlay-in position-absolute w-100 h-100",4,"ngIf"],[1,"d-flex","align-items-center","justify-content-center","w-100","h-100",3,"item","mode","size","containerWidth","backgroundColor","backgroundImageUrl"],[1,"position-absolute","dimension-grip","d-flex","align-items-center","justify-content-center","ps-2","pe-2","border-radius-8","with-dual-dimenaion"],[1,"f-11","text-white"],["name","dimesionarrow",1,"f-16","text-white"],[1,"drag-hint","position-absolute","d-flex","align-items-center","justify-content-center","border-radius-12","drag-pan","w-100","h-100","overflow-hidden",3,"ngClass"],[1,"btn-h40","align-items-center","text-12","text-semi","d-inline-flex","justify-content-center","text-white","border-radius-20","pl-9","pe-3","pointer"],["name","dragImageOpen",1,"f-24","me-1"],[1,"position-absolute","dimension-grip","d-flex","align-items-center","justify-content-center","ps-2","pe-2","border-radius-8"],[1,"d-flex","align-items-center","justify-content-center","overlay-in","position-absolute","w-100","h-100"],["role","status",1,"spinner-border","spinner-border-lg"],[1,"sr-only","text-nowrap","border-0","position-absolute","overflow-hidden"],[1,"d-flex","align-items-center","justify-content-center","w-100","h-100",3,"item"],[1,"position-relative",2,"height","100%","width","100%","background","#EDECF8"],[1,"position-absolute","dimension-grip","d-none","align-items-center","justify-content-center","ps-2","pe-2","border-radius-8"],["placement","top","ngbTooltip","Remove","tooltipClass","tooltip-custom-all","container","body",1,"position-absolute","delete-item","d-flex","align-items-center","justify-content-center","border-radius-8",3,"click"],["name","resizecross",1,"text-white"],[1,"position-fixed","d-flex","align-items-center","justify-content-center","start-over-batch"],[1,"d-inline-flex","align-items-center","justify-content-center","text-14","grey-900","lh-160","me-3"],[1,"btn","btn-outline-primary","btn-h40","text-13","d-inline-flex","align-items-center","justify-content-center","ps-4","pe-4",3,"click"],[1,"d-flex","align-items-center","justify-content-center","flex-column","h-100","remove-bg-blank","border-radius-24","position-absolute",2,"top","0px"],[1,"d-inline-flex","align-items-center","justify-content-center","mx-auto","video-col"],["autoplay","","loop","",2,"border-radius","12px","width","100%",3,"muted"],["src","https://static.lightxeditor.com/assets/tutorials/promotion-remove-bg.mp4","type","video/mp4"],[1,"text-xxl","grey-600","mt-4","mb-4","text-semi","lh-125"],[1,"btn","btn-primary","d-flex","align-items-center","btn-h48","pe-3","ps-3",3,"click"],["id","divshow",1,"row","g-0","centered","position-fixed","w-100",3,"ngClass"],[1,"d-flex","flex-column","align-items-center","justify-content-center","w-100","drag-drop-text","text-center","text-32","text-bold","grey-800",2,"height","100vh"],["style","z-index:-99","class","secondary-text text-semi mt-10 text-xxl grey-800",4,"ngIf"],[1,"secondary-text","text-semi","mt-10","text-xxl","grey-800",2,"z-index","-99"]],template:function(e,n){if(1&e){const i=t.RV6();t.j41(0,"ngx-file-drop",8),t.bIt("onFileOver",function(a){return t.eBV(i),t.Njj(n.fileOver(a))}),t.DNE(1,We,32,26,"ng-template",9),t.k0s(),t.j41(2,"ngx-file-drop",10),t.bIt("onFileDrop",function(a){return t.eBV(i),t.Njj(n.dropped(a))})("onFileLeave",function(a){return t.eBV(i),t.Njj(n.fileLeave(a))}),t.DNE(3,He,4,2,"ng-template",9),t.k0s(),t.nrm(4,"app-be-file-input",11,0)}2&e&&(t.FS9("accept",n.fileUploadAccept),t.R7$(2),t.FS9("accept",n.fileUploadAccept))},dependencies:[O.YU,O.Sq,O.bT,O.ux,O.e1,Q.Z,J.b,mt.Z,V.md,ut.M$,ut.vL,kt.q,jt,St,Dt,ie,re,Z,q,O.Jj],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}.bottom-panel-wrapper[_ngcontent-%COMP%]{background:#fff;border-radius:12px 12px 0 0;box-shadow:0 0 12px #0000001a}.collapse-header[_ngcontent-%COMP%]{padding:1rem;border-bottom:solid 2px #e2e2e6}.timeline-canvas-wrapper[_ngcontent-%COMP%]{width:calc(100% - 51px);height:200px;overflow-x:auto}.timeline[_ngcontent-%COMP%]{width:100%}.bottom-panel[_ngcontent-%COMP%]{width:100%;display:block;background:#fff;overflow:hidden}.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}.layer-text[_ngcontent-%COMP%]{position:absolute;margin-top:64px}.collapse-header[_ngcontent-%COMP%]{padding:11px;border-bottom:1px solid #E2E3E9}.canvas-mask-wrapper[_ngcontent-%COMP%]{display:inline-flex;overflow:auto}.widthAdded[_ngcontent-%COMP%]{width:5.4rem}.widthRemoved[_ngcontent-%COMP%]{width:calc(100% - 5.4rem)}.widthRemoved.ps-0[_ngcontent-%COMP%]{padding-left:0!important}.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}.ai-editor-view[_ngcontent-%COMP%]{background:#f4f3f9}.ai-editor-view[_ngcontent-%COMP%] .left-panel[_ngcontent-%COMP%]{width:18.7
15rem;background:#fff;border-radius:0 16px 0 0;padding:0}.ai-editor-view[_ngcontent-%COMP%] .left-panel[_ngcontent-%COMP%] .top-section[_ngcontent-%COMP%]{height:56px;z-index:99;-webkit-user-select:none;user-select:none}.ai-editor-view[_ngcontent-%COMP%] .left-panel[_ngcontent-%COMP%] .top-section[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{font-size:14px!important;color:#272b34;line-height:19.07px}.ai-editor-view[_ngcontent-%COMP%] .left-panel[_ngcontent-%COMP%] .middle-drawer[_ngcontent-%COMP%]{padding-top:56px;user-select:none;-webkit-user-select:none;height:calc(100% - 80px)}.ai-editor-view[_ngcontent-%COMP%] .left-panel[_ngcontent-%COMP%] .middle-drawer[_ngcontent-%COMP%] .ai-thumb-view[_ngcontent-%COMP%]{border-radius:12px;background:#eeedf3;height:134px;position:relative;overflow:hidden;-webkit-user-select:none;user-select:none}.ai-editor-view[_ngcontent-%COMP%] .left-panel[_ngcontent-%COMP%] .middle-drawer[_ngcontent-%COMP%] .ai-thumb-view[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{height:100%;width:auto;object-fit:contain;overflow:hidden}.ai-editor-view[_ngcontent-%COMP%] .left-panel[_ngcontent-%COMP%] .middle-drawer[_ngcontent-%COMP%] .ai-thumb-view[_ngcontent-%COMP%]:hover .replace-btn[_ngcontent-%COMP%]{display:flex;z-index:99;position:absolute;background:#0006;align-items:center;justify-content:center;height:100%;width:100%;border-radius:12px;flex-direction:column}.ai-editor-view[_ngcontent-%COMP%] .left-panel[_ngcontent-%COMP%] .middle-drawer[_ngcontent-%COMP%] .ai-thumb-view[_ngcontent-%COMP%] .replace-btn[_ngcontent-%COMP%]{display:none}.ai-editor-view[_ngcontent-%COMP%] .left-panel[_ngcontent-%COMP%] .middle-drawer[_ngcontent-%COMP%] .ai-thumb-view[_ngcontent-%COMP%] .replace-btn[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{background:#fff!important;border:0px!important;color:#272b34!important;min-width:124px}.ai-editor-view[_ngcontent-%COMP%] .left-panel[_ngcontent-%COMP%] .middle-drawer[_ngcontent-%COMP%] .ai-thumb-view[_ngcontent-%COMP%] .replace-btn[_ngcontent-%COMP%] button[_ngcontent-%COMP%]:hover{background:linear-gradient(0deg,#626adf0d 0% 100%),#fff!important;color:#272b34}.ai-editor-view[_ngcontent-%COMP%] .left-panel[_ngcontent-%COMP%] .middle-drawer[_ngcontent-%COMP%] .ai-thumb-view[_ngcontent-%COMP%] .add-on-404[_ngcontent-%COMP%]{display:flex;z-index:99;position:absolute;background:#0000001a;align-items:center;justify-content:center;height:100%;width:100%;border-radius:12px;flex-direction:column}.ai-editor-view[_ngcontent-%COMP%] .left-panel[_ngcontent-%COMP%] .middle-drawer[_ngcontent-%COMP%] .dual-thumb-view[_ngcontent-%COMP%]{border-radius:12px;background:#efeef2;height:134px;position:relative;overflow:hidden;-webkit-user-select:none;user-select:none}.ai-editor-view[_ngcontent-%COMP%] .left-panel[_ngcontent-%COMP%] .middle-drawer[_ngcontent-%COMP%] .dual-thumb-view[_ngcontent-%COMP%] .dual-child-left[_ngcontent-%COMP%], .ai-editor-view[_ngcontent-%COMP%] .left-panel[_ngcontent-%COMP%] .middle-drawer[_ngcontent-%COMP%] .dual-thumb-view[_ngcontent-%COMP%] .dual-child-right[_ngcontent-%COMP%]{width:132px;height:134px;overflow:hidden;cursor:pointer}.ai-editor-view[_ngcontent-%COMP%] .left-panel[_ngcontent-%COMP%] .middle-drawer[_ngcontent-%COMP%] .dual-thumb-view[_ngcontent-%COMP%] .dual-child-left[_ngcontent-%COMP%] img[_ngcontent-%COMP%], .ai-editor-view[_ngcontent-%COMP%] .left-panel[_ngcontent-%COMP%] .middle-drawer[_ngcontent-%COMP%] .dual-thumb-view[_ngcontent-%COMP%] .dual-child-right[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{width:100%;height:100%;object-fit:contain}.ai-editor-view[_ngcontent-%COMP%] .left-panel[_ngcontent-%COMP%] .middle-drawer[_ngcontent-%COMP%] .dual-thumb-view[_ngcontent-%COMP%] .dual-child-left[_ngcontent-%COMP%] .replace-btn[_ngcontent-%COMP%], .ai-editor-view[_ngcontent-%COMP%] .left-panel[_ngcontent-%COMP%] .middle-drawer[_ngcontent-%COMP%] .dual-thumb-view[_ngcontent-%COMP%] .dual-child-right[_ngcontent-%COMP%] .replace-btn[_ngcontent-%COMP%]{display:none}.ai-editor-view[_ngcontent-%COMP%] .left-panel[_ngcontent-%COMP%] .middle-drawer[_ngcontent-%COMP%] .dual-thumb-view[_ngcontent-%COMP%] .dual-child-left[_ngcontent-%COMP%] .replace-btn[_ngcontent-%COMP%] button[_ngcontent-%COMP%], .ai-editor-view[_ngcontent-%COMP%] .left-panel[_ngcontent-%COMP%] .middle-drawer[_ngcontent-%COMP%] .dual-thumb-view[_ngcontent-%COMP%] .dual-child-right[_ngcontent-%COMP%] .replace-btn[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{background:#fff!important;border:0px!important;color:#272b34!important;min-width:120px}.ai-editor-view[_ngcontent-%COMP%] .left-panel[_ngcontent-%COMP%] .middle-drawer[_ngcontent-%COMP%] .dual-thumb-view[_ngcontent-%COMP%] .dual-child-left[_ngcontent-%COMP%] .replace-btn[_ngcontent-%COMP%] button[_ngcontent-%COMP%]:hover, .ai-editor-view[_ngcontent-%COMP%] .left-panel[_ngcontent-%COMP%] .middle-drawer[_ngcontent-%COMP%] .dual-thumb-view[_ngcontent-%COMP%] .dual-child-right[_ngcontent-%COMP%] .replace-btn[_ngcontent-%COMP%] button[_ngcontent-%COMP%]:hover{background:linear-gradient(0deg,#626adf0d 0% 100%),#fff!important;color:#272b34}.ai-editor-view[_ngcontent-%COMP%] .left-panel[_ngcontent-%COMP%] .middle-drawer[_ngcontent-%COMP%] .dual-thumb-view[_ngcontent-%COMP%] .dual-child-left[_ngcontent-%COMP%] .add-on-404[_ngcontent-%COMP%], .ai-editor-view[_ngcontent-%COMP%] .left-panel[_ngcontent-%COMP%] .middle-drawer[_ngcontent-%COMP%] .dual-thumb-view[_ngcontent-%COMP%] .dual-child-right[_ngcontent-%COMP%] .add-on-404[_ngcontent-%COMP%]{display:flex;z-index:99;position:absolute;background:#0000001a;align-items:center;justify-content:center;height:100%;width:100%;flex-direction:column}.ai-editor-view[_ngcontent-%COMP%] .left-panel[_ngcontent-%COMP%] .middle-drawer[_ngcontent-%COMP%] .dual-thumb-view[_ngcontent-%COMP%] .dual-child-left[_ngcontent-%COMP%]:hover pi[_ngcontent-%COMP%], .ai-editor-view[_ngcontent-%COMP%] .left-panel[_ngcontent-%COMP%] .middle-drawer[_ngcontent-%COMP%] .dual-thumb-view[_ngcontent-%COMP%] .dual-child-left[_ngcontent-%COMP%]:hover span[_ngcontent-%COMP%], .ai-editor-view[_ngcontent-%COMP%] .left-panel[_ngcontent-%COMP%] .middle-drawer[_ngcontent-%COMP%] .dual-thumb-view[_ngcontent-%COMP%] .dual-child-right[_ngcontent-%COMP%]:hover pi[_ngcontent-%COMP%], .ai-editor-view[_ngcontent-%COMP%] .left-panel[_ngcontent-%COMP%] .middle-drawer[_ngcontent-%COMP%] .dual-thumb-view[_ngcontent-%COMP%] .dual-child-right[_ngcontent-%COMP%]:hover span[_ngcontent-%COMP%]{color:#272b34!important}.ai-editor-view[_ngcontent-%COMP%] .left-panel[_ngcontent-%COMP%] .middle-drawer[_ngcontent-%COMP%] .dual-thumb-view[_ngcontent-%COMP%] .dual-child-left[_ngcontent-%COMP%]:hover .replace-btn[_ngcontent-%COMP%], .ai-editor-view[_ngcontent-%COMP%] .left-panel[_ngcontent-%COMP%] .middle-drawer[_ngcontent-%COMP%] .dual-thumb-view[_ngcontent-%COMP%] .dual-child-right[_ngcontent-%COMP%]:hover .replace-btn[_ngcontent-%COMP%]{display:flex;z-index:99;position:absolute;background:#0006;align-items:center;justify-content:center;height:100%;width:100%;flex-direction:column}.ai-editor-view[_ngcontent-%COMP%] .left-panel[_ngcontent-%COMP%] .middle-drawer[_ngcontent-%COMP%] .dual-thumb-view[_ngcontent-%COMP%] .dual-child-left[_ngcontent-%COMP%]{width:131px;border-radius:12px 0 0 12px}.ai-editor-view[_ngcontent-%COMP%] .left-panel[_ngcontent-%COMP%] .middle-drawer[_ngcontent-%COMP%] .dual-thumb-view[_ngcontent-%COMP%] .dual-child-left[_ngcontent-%COMP%]:hover{background:linear-gradient(90deg,#626adf00,#626adf1a),#efeef2}.ai-editor-view[_ngcontent-%COMP%] .left-panel[_ngcontent-%COMP%] .middle-drawer[_ngcontent-%COMP%] .dual-thumb-view[_ngcontent-%COMP%] .dual-child-right[_ngcontent-%COMP%]{width:131px;border-radius:0 12px 12px 0}.ai-editor-view[_ngcontent-%COMP%] .left-panel[_ngcontent-%COMP%] .middle-drawer[_ngcontent-%COMP%] .dual-thumb-view[_ngcontent-%COMP%] .dual-child-right[_ngcontent-%COMP%]:hover{background:linear-gradient(270deg,#626adf00,#626adf1a),#efeef2}.ai-editor-view[_ngcontent-%COMP%] .left-panel[_ngcontent-%COMP%] .middle-drawer[_ngcontent-%COMP%] .bg-white[_ngcontent-%COMP%]{background:#fff!important}.ai-editor-view[_ngcontent-%COMP%] .left-panel[_ngcontent-%COMP%] .middle-drawer.photoshoot-drawer[_ngcontent-%COMP%]{padding-top:112px!important}.ai-editor-view[_ngcontent-%COMP%] .left-panel[_ngcontent-%COMP%] .credit-description[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{display:inline-flex;color:#272b34;font-size:12px}.ai-editor-view[_ngcontent-%COMP%] .wrapper-for-timeline[_ngcontent-%COMP%] .main-content[_ngcontent-%COMP%] .blank-section[_ngcontent-%COMP%]{flex-direction:column;-webkit-user-select:none;user-select:none}.ai-editor-view[_ngcontent-%COMP%] .wrapper-for-timeline[_ngcontent-%COMP%] .main-content[_ngcontent-%COMP%] .blank-section[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{font-size:14px;color:#272b34}.bottom-btn[_ngcontent-%COMP%] .middle-drawer[_ngcontent-%COMP%]{padding-bottom:0!important}.bottom-btn[_ngcontent-%COMP%] .position-absolute.fixed-bottom[_ngcontent-%COMP%]{display:none}.bottom-btn[_ngcontent-%COMP%] .refine-btn[_ngcontent-%COMP%]{display:block!important}.bottom-btn.bottom-fil[_ngcontent-%COMP%] .refine-btn[_ngcontent-%COMP%]{display:none!important}.ai-editor-view[_ngcontent-%COMP%] .left-panel[_ngcontent-%COMP%] .filter-drawer[_ngcontent-%COMP%] .middle-drawer[_ngcontent-%COMP%]{padding-top:112px!important;height:calc(100% - 80px)}@media (max-width: 1599.98px){.ai-editor-view[_ngcontent-%COMP%] .wrapper-for-timeline[_ngcontent-%COMP%]{width:calc(100% - 18.75rem)}.ai-editor-view[_ngcontent-%COMP%] .wrapper-for-timeline[_ngcontent-%COMP%] .main-content[_ngcontent-%COMP%]{height:100%}}@media (max-width: 2600px){.ai-editor-view[_ngcontent-%COMP%] .wrapper-for-timeline[_ngcontent-%COMP%]{width:calc(100% - 18.75rem)}.ai-editor-view[_ngcontent-%COMP%] .wrapper-for-timeline[_ngcontent-%COMP%] .main-content[_ngcontent-%COMP%]{height:100%}}.bg-f-refine[_ngcontent-%COMP%]{background:transparent url(https://static.lightxeditor.com/assets/images/tranparent.png) left top repeat!important}.display-ads-section[_ngcontent-%COMP%]{border-top:1px solid #EEEDF3;background:#fff;padding-top:5px;justify-content:space-evenly}.display-ads-section[_ngcontent-%COMP%] .leaderboard-area[_ngcontent-%COMP%]{width:730px;height:90px;background:#d9d9d9;margin-left:16.5%}.display-ads-section[_ngcontent-%COMP%] .button-col[_ngcontent-%COMP%] .btn-h32[_ngcontent-%COMP%]{height:32px;background:transparent!important}.display-ads-section[_ngcontent-%COMP%] .button-col[_ngcontent-%COMP%] .btn-h32[_ngcontent-%COMP%]:hover{background:#626adf0d!important}.left-navigation[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{border:0px!important;outline:none;background:#5e6aef0d;height:48px}.left-navigation[_ngcontent-%COMP%] button[_ngcontent-%COMP%]:hover{background:#5e6aef1a}.batch-item-lists-group[_ngcontent-%COMP%]{flex-wrap:wrap}.batch-item-lists-group[_ngcontent-%COMP%] .batch-list-item[_ngcontent-%COMP%]{width:var(--colWidth);height:var(--colWidth);min-width:var(--colWidth);min-height:var(--colWidth);background:#edecf8}.batch-item-lists-group[_ngcontent-%COMP%] .batch-list-item[_ngcontent-%COMP%] div.frame-tile[_ngcontent-%COMP%]{height:100%;width:100%;object-fit:contain}.batch-item-lists-group[_ngcontent-%COMP%] .batch-list-item[_ngcontent-%COMP%] .dimension-grip[_ngcontent-%COMP%]{border-radius:8px;background:#494f5fb3;-webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px);height:28px;min-width:88px;bottom:8px;left:calc(50% - 44px);z-index:2}.batch-item-lists-group[_ngcontent-%COMP%] .batch-list-item[_ngcontent-%COMP%] .with-dual-dimenaion[_ngcontent-%COMP%]{inset-inline:0;margin-inline:auto;width:fit-content}.batch-item-lists-group[_ngcontent-%COMP%] .batch-list-item[_ngcontent-%COMP%] .overlay-in[_ngcontent-%COMP%]{top:0;left:0;border-radius:12px;background:#ffffffb3;-webkit-backdrop-filter:blur(20px);backdrop-filter:blur(20px);z-index:3}.batch-item-lists-group[_ngcontent-%COMP%] .batch-list-item[_ngcontent-%COMP%] .overlay-in[_ngcontent-%COMP%] .spinner-border[_ngcontent-%COMP%]{width:24px;height:24px;border:2px solid #252B36;border-right-color:transparent}.batch-item-lists-group[_ngcontent-%COMP%] .batch-list-item[_ngcontent-%COMP%] .delete-item[_ngcontent-%COMP%]{display:none!important;width:30px;height:30px;background:#494f5f66;top:8px;right:8px;
1cursor:pointer}.batch-item-lists-group[_ngcontent-%COMP%] .batch-list-item[_ngcontent-%COMP%] .delete-item[_ngcontent-%COMP%]:hover{background:#494f5fb3}.batch-item-lists-group[_ngcontent-%COMP%] .batch-list-item[_ngcontent-%COMP%]:hover .delete-item[_ngcontent-%COMP%]{display:flex!important;z-index:2}.start-over-batch[_ngcontent-%COMP%]{height:50px;background:linear-gradient(0deg,#fffc 0% 100%),linear-gradient(90deg,#ff4bff66 -4%,#2620ff66);-webkit-backdrop-filter:blur(20px);backdrop-filter:blur(20px);bottom:0;width:calc(100% - 300px);left:300px;z-index:9}.remove-bg-blank[_ngcontent-%COMP%]{background:#ffffffe6;-webkit-backdrop-filter:blur(20px);backdrop-filter:blur(20px)}.remove-bg-blank[_ngcontent-%COMP%] .video-col[_ngcontent-%COMP%]{width:180px;height:180px}.add-padding[_ngcontent-%COMP%]{padding-bottom:50px!important}.centered[_ngcontent-%COMP%]{background:#f8f9f9cc;-webkit-backdrop-filter:blur(20px);backdrop-filter:blur(20px);top:0;z-index:9999}.centered[_ngcontent-%COMP%] .secondary-text[_ngcontent-%COMP%]{line-height:36px}.drag-drop-text[_ngcontent-%COMP%]{line-height:43.58px;margin-bottom:0}.close[_ngcontent-%COMP%]{cursor:pointer;position:absolute;top:20px;right:20px;background:#272b3466;border-radius:50%;width:40px;height:40px;background-size:contain;padding:0;opacity:1!important;z-index:1003;font-size:0}.close[_ngcontent-%COMP%]:hover{background:#272b34}.drag-pan[_ngcontent-%COMP%]{background:#ffffffb3;-webkit-backdrop-filter:blur(20px);backdrop-filter:blur(20px);top:0;left:0;z-index:9}.drag-pan[_ngcontent-%COMP%] div[_ngcontent-%COMP%]{background:#484f60}.drag-hint[_ngcontent-%COMP%]{opacity:0;transition:opacity .3s ease;pointer-events:none;z-index:999}.drag-hint.visible[_ngcontent-%COMP%]{opacity:1;pointer-events:auto}.drag-hint[_ngcontent-%COMP%] .btn-h40[_ngcontent-%COMP%]{transition:transform .2s ease}.drag-hint.visible[_ngcontent-%COMP%] .btn-h40[_ngcontent-%COMP%]{transform:translateY(0)}"],changeDetection:0}),g})(),canDeactivate:[S.p]}];let $e=(()=>{var s;class g{}return(s=g).\u0275fac=function(e){return new(e||s)},s.\u0275mod=t.$C({type:s}),s.\u0275inj=t.G2t({imports:[R.iI.forChild(Ge),R.iI]}),g})();var Ne=p(30832),Ye=p(79421),Ve=p(90866),Le=p(83339);let Xe=(()=>{var s;class g{}return(s=g).\u0275fac=function(e){return new(e||s)},s.\u0275mod=t.$C({type:s}),s.\u0275inj=t.G2t({providers:[it,y],imports:[O.MD,Ne._,$e,Ye.r,Ve.R,ft.MQ,V.UN,tt.YN,ut.RI,Le.G]}),g})()},94329:(nt,G,p)=>{p.d(G,{M:()=>D,p:()=>A});var O=p(21413),R=p(43836),S=p(16478),T=p(16471),U=p(54438),F=p(33391);let D=(()=>{var j;class t{constructor(P){this.modalService=P}canDeactivate(P){if(P?.canDeactivate())return!0;{let I=this.openCanActivateConfirmDialog();return I.subscribe(z=>{z||P.saveProject()}),I}}openCanActivateConfirmDialog(){const P=new O.B,I=this.modalService.open(R.wR,{centered:!0,windowClass:"confirm-modal"});return I.componentInstance.title=S.b.message.unsavedTitle,I.componentInstance.message=S.b.message.unsavedMessages,I.componentInstance.subject=P,P.asObservable()}}return(j=t).\u0275fac=function(P){return new(P||j)(U.KVO(F.Bq))},j.\u0275prov=U.jDH({token:j,factory:j.\u0275fac,providedIn:"root"}),t})(),A=(()=>{var j;class t{constructor(P){this.modalService=P}canDeactivate(P){if(P?.canDeactivate())return!0;{let I=this.openCanActivatePhotoEditor(P?.getEditorType());return I.subscribe(z=>{}),I}}openCanActivatePhotoEditor(P=null){const I=new O.B,z=this.modalService.open(R.nb,{centered:!0,windowClass:"confirm-modal"});let Y="";return Y=P&&P==T._Y.AIPhoto?S.b.message.warningAiLostMessage:S.b.message.warningMessage,z.componentInstance.title=Y,z.componentInstance.subject=I,I.asObservable()}}return(j=t).\u0275fac=function(P){return new(P||j)(U.KVO(F.Bq))},j.\u0275prov=U.jDH({token:j,factory:j.\u0275fac,providedIn:"root"}),t})()},32594:(nt,G,p)=>{p.d(G,{d:()=>T});var O=p(16471),R=p(54438),S=p(32764);let T=(()=>{var U;class F{constructor(A){this.templateService=A,this.templateType=1}getResizeContent(A=null){this.templateService.getCreateFromScratchData(this.templateType,!0,j=>{const y=(j.body.socialPlatformsList||[]).concat(this.getCustomLayouts());
1y&&y.forEach(P=>{P.title=P.socialLabelType.replace(" ","").toLowerCase();let I=[];P.title===O.zu.SocialMedia&&(P.socialPlatformFormats.forEach((z,Y)=>{const Z=z.socialPlatform.split(" ")[0];-1===I.findIndex(q=>q.title===Z.toLowerCase())&&I.push({id:++Y,title:Z.toLowerCase(),socialPlatform:z.socialPlatform,iconName:z.iconName})}),P.socialMediaLayout=I)}),this.setBoxWidthHeight(y),A&&A(y)},j=>{console.log(j)})}getCustomLayouts(){return[{socialLabelType:"Custom",parentMediaType:"1",socialPlatformFormats:[{title:"custom",shortName:"Custom",format:0,wRatio:0,hRatio:0,width:0,height:0,socialPlatformId:26,thumbUrl:"https://d2v5dzhdg4zhx3.cloudfront.net/provideo-web-banner/travel.png"}]}]}setBoxWidthHeight(A){let j=1;A&&A.forEach(t=>{t.socialPlatformFormats.forEach(y=>{y.id=j++,y.width>y.height?(y.boxHeight=Math.round(70*y.height/y.width),y.boxWidth=70):(y.boxWidth=Math.round(70*y.width/y.height),y.boxHeight=70)})})}}return(U=F).\u0275fac=function(A){return new(A||U)(R.KVO(S.I))},U.\u0275prov=R.jDH({token:U,factory:U.\u0275fac}),F})()},74343:(nt,G,p)=>{p.d(G,{_:()=>F});var O=p(16478),R=p(54438),S=p(74710),T=p(74983),U=p(55349);let F=(()=>{var D;class A{constructor(t,y,P,I){this._router=t,this.route=y,this.toastService=P,this.editoruiservice=I}saveProject(t,y,P,I=null){P.isSaving||this.toastService.showProcess("Saving...",{});let z=!P.design.assetId;P.isUserQuotaFull=!1,P.save(t.systemRefKey,Y=>{this.toastService.removeAll(),this.toastService.showSuccess(O.b.message.saveSuccess),z&&P.design.assetId&&this._router.navigate([],{replaceUrl:!0,relativeTo:this.route,queryParams:{action:"",project_id:P.design.assetId},queryParamsHandling:""}),y&&y()},Y=>{this.toastService.removeAll(),P.isUserQuotaFull&&this.editoruiservice.showStorageLimitError(),I&&I()})}isSaved(t){return t.isSaved()}}return(D=A).\u0275fac=function(t){return new(t||D)(R.KVO(S.Ix),R.KVO(S.nX),R.KVO(T.f),R.KVO(U.f))},D.\u0275prov=R.jDH({token:D,factory:D.\u0275fac}),A})()},90866:(nt,G,p)=>{p.d(G,{R:()=>ht});var O=p(60177),R=p(84341),S=p(83339),T=p(48928),U=p(21626),F=p(33391),D=p(72913),A=p(89818),j=p(19338),t=p(85188),y=p(21652),P=p(43387),I=p(55349),z=p(74710),Y=p(74343),Z=p(79421),st=p(24269),q=p(90521),at=p(8708),ct=p(23486),pt=p(23679),lt=p(7060),it=p(32594),dt=p(86820),gt=p(54438);let ht=(()=>{var Q;class J{}return(Q=J).\u0275fac=function(V){return new(V||Q)},Q.\u0275mod=gt.$C({type:Q}),Q.\u0275inj=gt.G2t({providers:[I.f,Y._,q.K,it.d,(0,U.$R)((0,U.Sx)())],imports:[O.MD,S.G,F.UN,F._f,R.YN,z.iI,R.X1,D.s,T.RI,A.MQ,j.di,t.mB.forRoot(),y.YG,P.y,at.vo,Z.r,st.S,ct.v9,pt.Y,lt.U,dt.e]}),J})()},43387:(nt,G,p)=>{p.d(G,{y:()=>R});var O=p(54438);let R=(()=>{var S;class T{}return(S=T).\u0275fac=function(F){return new(F||S)},S.\u0275mod=O.$C({type:S}),S.\u0275inj=O.G2t({}),T})()}}]);
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.