PageSourceSearch

https://stargallery.ae/5227.8e30cc74f8176808.js

js stargallery.ae collected 2026-10-01 16:16:58 UTC 29,236 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunkmain=self.webpackChunkmain||[]).push([[5227],{1235:(j,O,r)=>{r.d(O,{v:()=>S});var t=r(3953),e=r(177),_=r(1918),R=r(7869),w=r(8018),m=r(3980),y=r(9192);const x=["videoRef"];function C(a,f){1&a&&(t.j41(0,"div",4),t.nrm(1,"div",5),t.j41(2,"div",6),t.nrm(3,"div",7)(4,"div",8),t.j41(5,"div",9),t.nrm(6,"div",10)(7,"div",11),t.k0s()()())}function b(a,f){if(1&a&&(t.j41(0,"span",26),t.EFF(1),t.nI1(2,"number"),t.k0s()),2&a){const o=t.XpG(2);t.R7$(),t.SpI(" ",t.i5U(2,1,o.product.originalPrice,"1.0-2"),"")}}function h(a,f){if(1&a&&(t.j41(0,"span",27),t.EFF(1),t.nI1(2,"number"),t.nI1(3,"translate"),t.k0s()),2&a){const o=t.XpG(2);t.R7$(),t.Lme("",t.i5U(2,2,o.product.discount,"1.0-0"),"% ",t.bMT(3,5,"OFF"),"")}}function I(a,f){if(1&a){const o=t.RV6();t.j41(0,"div",12)(1,"div",13),t.nrm(2,"img",14),t.j41(3,"div",15),t.bIt("click",function(){t.eBV(o);const d=t.XpG();return t.Njj(d.openVideo())}),t.nrm(4,"img",16),t.k0s()(),t.j41(5,"div",17)(6,"div",18)(7,"div",19)(8,"div",20),t.EFF(9),t.k0s(),t.j41(10,"div",21)(11,"span",22),t.nrm(12,"i",23),t.EFF(13),t.nI1(14,"number"),t.k0s(),t.DNE(15,b,3,4,"span",24)(16,h,4,7,"span",25),t.k0s()()()()()}if(2&a){const o=t.XpG();t.R7$(2),t.Y8G("src",o.backgroundUrl,t.B4B),t.R7$(7),t.SpI("",o.product.name," "),t.R7$(2),t.Y8G("ngClass","ar"===o.languageService.getCurrentLanguage()?"items-baseline":"items-center"),t.R7$(2),t.SpI(" ",t.i5U(14,6,o.product.salePrice>0&&o.product.salePrice<o.product.originalPrice?o.product.salePrice:o.product.originalPrice,"1.0-2")," "),t.R7$(2),t.Y8G("ngIf",o.product.salePrice>0&&o.product.salePrice<o.product.originalPrice),t.R7$(),t.Y8G("ngIf",o.product.discount>0)}}function M(a,f){1&a&&(t.j41(0,"div",28),t.nrm(1,"div",29),t.j41(2,"div",30)(3,"div",31)(4,"div",32),t.nrm(5,"div",33),t.j41(6,"div",34),t.nrm(7,"div",35)(8,"div",7)(9,"div",8)(10,"div",36),t.k0s()(),t.nrm(11,"div",37),t.k0s()()())}function k(a,f){if(1&a&&(t.j41(0,"span",56),t.EFF(1),t.nI1(2,"number"),t.k0s()),2&a){const o=t.XpG(2);t.R7$(),t.JRh(t.i5U(2,1,o.product.originalPrice,"1.0-2"))}}function P(a,f){if(1&a&&(t.j41(0,"span",57),t.EFF(1),t.nI1(2,"number"),t.nI1(3,"translate"),t.k0s()),2&a){const o=t.XpG(2);t.R7$(),t.Lme("",t.i5U(2,2,o.product.discount,"1.0-0"),"% ",t.bMT(3,5,"OFF"),"")}}function g(a,f){if(1&a){const o=t.RV6();t.j41(0,"div",38),t.nrm(1,"img",39),t.j41(2,"div",40)(3,"div",41),t.bIt("click",function(){t.eBV(o);const d=t.XpG();return t.Njj(d.openVideo())}),t.nrm(4,"img",42),t.k0s(),t.j41(5,"div",43)(6,"div",44)(7,"div",45)(8,"div",46),t.nrm(9,"img",47),t.k0s(),t.j41(10,"div",19)(11,"div",48),t.EFF(12),t.k0s(),t.j41(13,"div",49),t.EFF(14),t.k0s(),t.j41(15,"div",50)(16,"span",51),t.nrm(17,"i",52),t.EFF(18),t.nI1(19,"number"),t.k0s(),t.DNE(20,k,3,4,"span",53)(21,P,4,7,"span",54),t.k0s()()(),t.j41(22,"a",55),t.EFF(23),t.nI1(24,"translate"),t.k0s()()()()()}if(2&a){const o=t.XpG();t.R7$(),t.Y8G("src",o.backgroundUrl,t.B4B),t.R7$(8),t.Y8G("src",o.imageUrl,t.B4B),t.R7$(3),t.JRh(o.product.brand),t.R7$(2),t.JRh(o.product.name),t.R7$(2),t.Y8G("ngClass","ar"===o.languageService.getCurrentLanguage()?"items-baseline":"items-center"),t.R7$(2),t.SpI(" ",t.i5U(19,11,o.product.salePrice>0&&o.product.salePrice<o.product.originalPrice?o.product.salePrice:o.product.originalPrice,"1.0-2")," "),t.R7$(2),t.Y8G("ngIf",o.product.salePrice>0&&o.product.salePrice<o.product.originalPrice),t.R7$(),t.Y8G("ngIf",o.product.discount>0),t.R7$(),t.Y8G("routerLink",o.productDetailLink.length?o.productDetailLink:null)("href",o.productHref||null,t.B4B),t.R7$(),t.SpI(" ",t.bMT(24,14,"VIEW_MORE")," ")}}let S=(()=>{class a{constructor(o){this.mediaPopupService=o,this.languageService=(0,t.WQX)(_.gw),this.currentVideoTime=0,this.showTimestamp=!1,this.isSkeleton=!1,this.videoClick=new t.bkB}openVideo(){this.videoClick.emit()}formatTime(o){const u=Math.max(0,Math.floor(o??0)),d=Math.floor(u/3600),$=u%60,B=Math.floor(u%3600/60).toString().padStart(2,"0"),D=$.toString().padStart(2,"0");return d>0?`${d}:${B}:${D}`:`${B}:${D}`}get productHref(){const o=this.resolvedSlug;if(!o)return"";const u=this.languageService.getCurrentLanguage?.()??this.languageService.currentLanguage??"en";return(0,m.eG)(u,o,this.product.id)}get productDetailLink(){const o=this.resolvedSlug;if(!o)return[];const u=this.languageService.getCurrentLanguage?.()??this.languageService.currentLanguage??"en";return(0,m.Y8)(u,o,this.product.id)}get resolvedSlug(){const o=this.product.slug?.trim()??"";return o&&!(0,m.GL)(o)?o:""}static{this.\u0275fac=function(u){return new(u||a)(t.rXU(R.U))}}static{this.\u0275cmp=t.VBU({type:a,selectors:[["app-social-media-card"]],viewQuery:function(u,d){if(1&u&&t.GBs(x,5),2&u){let T;t.mGM(T=t.lsd())&&(d.videoElementRef=T.first)}},inputs:{product:"product",backgroundUrl:"backgroundUrl",imageUrl:"imageUrl",currentVideoTime:"currentVideoTime",showTimestamp:"showTimestamp",isSkeleton:"isSkeleton"},outputs:{videoClick:"videoClick"},decls:4,vars:4,consts:[["class","w-full relative rounded-xl overflow-hidden sm:hidden media-skeleton-card media-skeleton-card-mobile",4,"ngIf"],["class","w-full relative rounded-xl overflow-hidden sm:hidden",4,"ngIf"],["class","social-media-card w-full h-full relative rounded-xl shadow-sm overflow-hidden sm:block hidden media-skeleton-card",4,"ngIf"],["class","social-media-card w-full h-full relative rounded-xl shadow-sm overflow-hidden sm:block hidden",4,"ngIf"],[1,"w-full","relative","rounded-xl","overflow-hidden","sm:hidden","media-skeleton-card","media-skeleton-card-mobile"],[1,"media-skeleton-block","media-skeleton-hero","h-[220px]","rounded-xl"],[1,"py-2","space-y-2"],[1,"media-skeleton-block","h-4","w-full","rounded-md"],[1,"media-skeleton-block","h-4","w-4/5","rounded-md"],[1,"flex","items-center","gap-2","pt-1"],[1,"media-skeleton-block","h-6","w-20","rounded-md"],[1,"media-skeleton-block","h-4","w-12","rounded-md"],[1,"w-full","relative","rounded-xl","overflow-hidden","sm:hidden"],[1,"relative"],["alt","",1,"w-full","object-cover","rounded-xl","h-[220px]",2,"filter","brightness(70%)",3,"src"],[1,"play-area","absolute","top-1/2","-translate-x-1/2","left-1/2","flex","items-center","justify-center","z-10","cursor-pointer",3,"click"],["src","/assets/sgm-icons/social-play.svg","alt","",1,"sm:w-auto","sm:h-auto","w-8","h-8"],[1,"w-full","py-2","relative","flex","flex-col","justify-between"],[1,"overflow-hidden"],[1,"flex-1"],[1,"sm:text-base","text-xs","font-medium","text-[#333]","line-clamp-2","whitespace-break-spaces"],[1,"mt-1","flex","items-center","sm:gap-x-2","gap-x-0.5","gap-y-1"],["dir","ltr",1,"inline-flex","gap-1","text-xl","text-[#222029]","leading-none","font-bold",3,"ngClass"],[1,"icon-AED","inline-flex","
1sm:!text-base","!text-[15px]","!leading-none"],["class","inline-block text-[10px] text-sgm-neutral-500 line-through",4,"ngIf"],["class","inline-block rounded-full text-[9pt] text-sgm-success-500 uppercase font-medium bg-sgm-success-50 px-[10px] py-[2px]",4,"ngIf"],[1,"inline-block","text-[10px]","text-sgm-neutral-500","line-through"],[1,"inline-block","rounded-full","text-[9pt]","text-sgm-success-500","uppercase","font-medium","bg-sgm-success-50","px-[10px]","py-[2px]"],[1,"social-media-card","w-full","h-full","relative","rounded-xl","shadow-sm","overflow-hidden","sm:block","hidden","media-skeleton-card"],[1,"media-skeleton-block","absolute","inset-0"],[1,"w-full","h-full","relative","flex","flex-col","justify-end","p-3"],[1,"bg-white","rounded-xl","p-2","space-y-3"],[1,"flex","gap-3"],[1,"media-skeleton-block","w-[91px]","h-[91px]","rounded-lg","flex-none"],[1,"flex-1","space-y-2"],[1,"media-skeleton-block","h-3","w-20","rounded-md"],[1,"media-skeleton-block","h-5","w-24","rounded-md"],[1,"media-skeleton-block","h-8","w-full","rounded-xl"],[1,"social-media-card","w-full","h-full","relative","rounded-xl","shadow-sm","overflow-hidden","sm:block","hidden"],["alt","",1,"absolute","top-0","left-0","w-full","h-full","object-cover",2,"filter","brightness(70%)",3,"src"],[1,"w-full","h-full","relative","flex","flex-col","justify-between"],[1,"play-area","flex-1","flex","items-center","justify-center",3,"click"],["src","/assets/sgm-icons/social-play.svg","alt","",1,"block","play-button"],[1,"space-y-4","p-3"],[1,"bg-white","rounded-xl","p-2","overflow-hidden"],[1,"flex","mb-2","gap-1"],[1,"w-[91px]","h-[91px]","flex-none","flex","items-center","justify-center"],["alt","",3,"src"],[1,"text-[10px]","text-sgm-neutral-500"],[1,"text-[12px]","text-[#333]","font-medium","line-clamp-2"],[1,"mt-1","inline-flex","flex-wrap","items-center","gap-x-2","gap-y-1"],["dir","ltr",1,"inline-flex","gap-1","text-sm","text-[#222029]","font-bold",3,"ngClass"],[1,"icon-AED","inline-flex","sm:!text-base","!leading-none"],["class","inline-block text-xs text-sgm-neutral-500 line-through",4,"ngIf"],["class","inline-block rounded-full text-[7pt] text-sgm-success-500 uppercase font-medium bg-sgm-success-50 px-[6px] py-[2px]",4,"ngIf"],["rel","noopener",1,"block","rounded-xl","text-xs","w-full","bg-sgm-primary-base","px-3","py-2","text-white","text-center",3,"routerLink","href"],[1,"inline-block","text-xs","text-sgm-neutral-500","line-through"],[1,"inline-block","rounded-full","text-[7pt]","text-sgm-success-500","uppercase","font-medium","bg-sgm-success-50","px-[6px]","py-[2px]"]],template:function(u,d){1&u&&t.DNE(0,C,8,0,"div",0)(1,I,17,9,"div",1)(2,M,12,0,"div",2)(3,g,25,16,"div",3),2&u&&(t.Y8G("ngIf",d.isSkeleton),t.R7$(),t.Y8G("ngIf",!d.isSkeleton),t.R7$(),t.Y8G("ngIf",d.isSkeleton),t.R7$(),t.Y8G("ngIf",!d.isSkeleton))},dependencies:[e.MD,e.YU,e.bT,e.QX,w.h,w.D9,y.iI,y.Wk],styles:['.social-media-card[_ngcontent-%COMP%]{cursor:pointer;overflow:hidden}.media-skeleton-card[_ngcontent-%COMP%]{background:#fff}.media-skeleton-block[_ngcontent-%COMP%]{position:relative;overflow:hidden;background:#eceff3}.media-skeleton-block[_ngcontent-%COMP%]:after{content:"";position:absolute;top:0;left:-120%;width:120%;height:100%;background:linear-gradient(90deg,#fff0,#ffffffb3,#fff0);animation:_ngcontent-%COMP%_media-card-shimmer 2.2s linear infinite}.media-skeleton-card-mobile[_ngcontent-%COMP%]{min-height:308px}@keyframes _ngcontent-%COMP%_media-card-shimmer{0%{left:-140%}to{left:140%}}@media (prefers-reduced-motion: reduce){.media-skeleton-block[_ngcontent-%COMP%]:after{animation:none}}.play-area[_ngcontent-%COMP%]:hover   .play-button[_ngcontent-%COMP%]{transform:scale(1.2);transition:all .3s}']})}}return a})()},3386:(j,O,r)=>{r.d(O,{c:()=>y});var t=r(3236),e=r(9974),_=r(4360),R=r(8750),m=r(1807);function y(x,C=t.E,b){const h=(0,m.O)(x,C);return function w(x,C){return(0,e.N)((b,h)=>{const{leading:I=!0,trailing:M=!1}=C??{};let k=!1,P=null,g=null,S=!1;const a=()=>{g?.unsubscribe(),g=null,M&&(u(),S&&h.complete())},f=()=>{g=null,S&&h.complete()},o=d=>g=(0,R.Tg)(x(d)).subscribe((0,_._)(h,a,f)),u=()=>{if(k){k=!1;const d=P;P=null,h.next(d),!S&&o(d)}};b.subscribe((0,_._)(h,d=>{k=!0,P=d,(!g||g.closed)&&(I?u():o(d))},()=>{S=!0,(!(M&&k&&g)||g.closed)&&h.complete()}
1))})}(()=>h,b)}},5227:(j,O,r)=>{r.d(O,{X:()=>te});var t=r(467),e=r(3953),_=r(177),R=r(1198),w=r(1235),m=r(1918),y=r(3980),x=r(1413),C=r(4412),b=r(5964),h=r(786),I=r(8141),M=r(6977),k=r(6697),P=r(3726),g=r(3386),S=r(6354),a=r(152),f=r(4843),o=r(2119),u=r(8018),d=r(6454),T=r(7869);const $=["scrollContainer"],B=["slickModal"],D=(s,p,i,n,l,c,v,E)=>({id:s,brand:p,name:i,slug:n,currency:l,salePrice:c,originalPrice:v,discount:E});function W(s,p){if(1&s){const i=e.RV6();e.j41(0,"div",17)(1,"app-social-media-card",18),e.bIt("videoClick",function(){const l=e.eBV(i).$implicit,c=e.XpG(4);return e.Njj(c.openVideoPopup(l))}),e.k0s()()}if(2&s){const i=p.$implicit;e.R7$(),e.Y8G("product",e.lV(3,D,i.id,i.brand,i.name,i.slug,i.currency,i.salePrice,i.originalPrice,i.discount))("imageUrl",i.imageUrl)("backgroundUrl",i.videoThumbnailUrl)}}function U(s,p){if(1&s&&(e.j41(0,"div",17),e.nrm(1,"app-social-media-card",19),e.k0s()),2&s){const i=e.XpG(4);e.xc7("display",i.loading?"":"none"),e.R7$(),e.Y8G("isSkeleton",!0)}}function V(s,p){1&s&&(e.j41(0,"span",22),e.EFF(1,"You have reached the end of this catalog."),e.k0s())}function A(s,p){if(1&s&&(e.j41(0,"div",20),e.DNE(1,V,2,0,"span",21),e.k0s()),2&s){const i=e.XpG(4);e.R7$(),e.Y8G("ngIf",i.totalRecords>0)}}function F(s,p){if(1&s&&(e.qex(0),e.DNE(1,W,2,12,"div",14)(2,U,2,3,"div",15)(3,A,2,1,"div",16),e.bVm()),2&s){const i=e.XpG().ngIf,n=e.XpG(2);e.R7$(),e.Y8G("ngForOf",i),e.R7$(),e.Y8G("ngForOf",n.skeletonItemsDesktop),e.R7$(),e.Y8G("ngIf",!n.loading&&n.page>=n.totalPages)}}function Y(s,p){if(1&s&&(e.qex(0),e.DNE(1,F,4,3,"ng-container",13),e.bVm()),2&s){const i=p.ngIf;e.XpG();const n=e.sdS(13);e.R7$(),e.Y8G("ngIf",i.length)("ngIfElse",n)}}function X(s,p){1&s&&(e.j41(0,"div",17),e.nrm(1,"app-social-media-card",19),e.k0s()),2&s&&(e.R7$(),e.Y8G("isSkeleton",!0))}function N(s,p){if(1&s&&e.DNE(0,X,2,1,"div",14),2&s){const i=e.XpG(2);e.Y8G("ngForOf",i.skeletonItemsDesktop)}}function K(s,p){if(1&s){const i=e.RV6();e.j41(0,"div",6)(1,"div",7)(2,"button",8),e.nI1(3,"translate"),e.bIt("click",function(){e.eBV(i);const l=e.XpG();return e.Njj(l.handlePrevClick())}),e.nrm(4,"img",9),e.k0s(),e.j41(5,"button",8),e.nI1(6,"translate"),e.bIt("click",function(){e.eBV(i);const l=e.XpG();return e.Njj(l.handleNextClick())}),e.nrm(7,"img",10),e.k0s()(),e.j41(8,"div",11,0),e.DNE(10,Y,2,2,"ng-container",12),e.nI1(11,"async"),e.DNE(12,N,1,1,"ng-template",null,1,e.C5r),e.k0s()()}if(2&s){const i=e.XpG();e.R7$(2),e.xc7("display",i.hideleftScrollButton?"none":"inline-flex"),e.Y8G("disabled",i.hideleftScrollButton)("ngClass",i.getPrevButtonClasses()),e.BMQ("aria-label",e.bMT(3,13,"PREVIOUS_PRODUCTS")),e.R7$(2),e.Y8G("src",i.getPrevArrowIcon(),e.B4B),e.R7$(),e.xc7("display",i.hideRightScrollButton?"none":"inline-flex"),e.Y8G("disabled",i.hideRightScrollButton)("ngClass",i.getNextButtonClasses()),e.BMQ("aria-label",e.bMT(6,15,"NEXT_PRODUCTS")),e.R7$(2),e.Y8G("src",i.getNextArrowIcon(),e.B4B),e.R7$(3),e.Y8G("ngIf",e.bMT(11,17,i.products$))}}function Q(s,p){if(1&s){const i=e.RV6();e.j41(0,"div",26)(1,"app-social-media-card",18),e.bIt("videoClick",function(){const l=e.eBV(i).$implicit,c=e.XpG(4);return e.Njj(c.openVideoPopup(l))}),e.k0s()()}if(2&s){const i=p.$implicit;e.R7$(),e.Y8G("product",e.lV(3,D,i.id,i.brand,i.name,i.slug,i.currency,i.salePrice,i.originalPrice,i.discount))("imageUrl",i.imageUrl)("backgroundUrl",i.videoThumbnailUrl)}}function z(s,p){if(1&s&&(e.j41(0,"div",26),e.nrm(1,"app-social-media-card",19),e.k0s()),2&s){const i=e.XpG(4);e.xc7("display",i.loading?"":"none"),e.R7$(),e.Y8G("isSkeleton",!0)}}function J(s,p){if(1&s&&(e.qex(0),e.DNE(1,Q,2,12,"div",24)(2,z,2,3,"div",25),e.bVm()),2&s){const i=e.XpG().ngIf,n=e.XpG(2);e.R7$(),e.Y8G("ngForOf",i),e.R7$(),e.Y8G("ngForOf",n.skeletonItemsMobile)}}function H(s,p){if(1&s&&(e.qex(0),e.DNE(1,J,3,2,"ng-container",13),e.bVm()),2&s){const i=p.ngIf;e.XpG();const n=e.sdS(5);e.R7$(),e.Y8G("ngIf",i.length)("ngIfElse",n)}}function Z(s,p){1&s&&(e.j41(0,"div",26),e.nrm(1,"app-social-media-card",19),e.k0s()),2&s&&(e.R7$(),e.Y8G("isSkeleton",!0))}function q(s,p){if(1&s&&e.DNE(0,Z,2,1,"div",24),2&s){const i=e.XpG(2);e.Y8G("ngForOf",i.skeletonItemsMobile)}}function ee(s,p){if(1&s&&(e.j41(0,"div",23,0),e.DNE(2,H,2,2,"ng-container",12),e.nI1(3,"async"),e.DNE(4,q,1,1,"ng-template",null,2,e.C5r),e.k0s()),2&s){const i=e.XpG();e.R7$(2),e.Y8G("ngIf",e.bMT(3,1,i.products$))}}let te=(()=>{class s{constructor(){this.homeService=(0,e.WQX)(m.XD),this.productService=(0,e.WQX)(m.bk),this.categoryService=(0,e.WQX)(m.M$),this.brandService=(0,e.WQX)(m.jD),this.languageService=(0,e.WQX)(m.gw),this.mediaPopupService=(0,e.WQX)(T.U),this.cdr=(0,e.WQX)(e.gRc),this.platformId=(0,e.WQX)(e.Agw),this.hideSubCategory=new e.bkB,this.hideVideoSlider=new e.bkB,this.hasEmitted=!1,this.cardWidth=4
116,this.loading=!0,this.page=1,this.totalPages=1,this.totalRecords=0,this.skeletonItemsDesktop=Array.from({length:4}),this.skeletonItemsMobile=Array.from({length:2}),this.destroyed$=new x.B,this.loadMoreTrigger$=new x.B,this.loadComplete$=new x.B,this.products$=new C.t([]),this.scrollInitialized=!1,this.slideWidth=194,this.slideWidthCached="194px",this.hideleftScrollButton=!0,this.hideRightScrollButton=!1,this.isRTL=!1,this.swiper=null,this.totalProducts=0,this.step=6}isBrowser(){return(0,_.UE)(this.platformId)}ngOnInit(){if(!this.isBrowser())return this.loading=!1,void this.products$.next([]);this.isRTL=this.checkRTLDirection(),this.computeSlideWidthCached(),this.loadMoreTrigger$.pipe((0,b.p)(()=>this.page<=this.totalPages),(0,h.p)(()=>{let i;switch(this.loading=!0,this.type){case"category":case"category-explore":i=this.categoryService.getVideoVariants(this.page,this.value);break;case"brand":i=this.brandService.getVideoVariants(this.page,this.brandName);break;default:i=this.productService.getVideoVariants(this.page)}return i.pipe((0,I.M)(n=>{const l=this.mapProducts(n.records);this.products$.next([...this.products$.value,...l]),this.totalPages=n.pagination.total_pages,this.page++,this.loading=!1,this.totalRecords=n.pagination.total_records,this.totalRecords<3&&!this.hasEmitted&&"category"===this.type?(this.hasEmitted=!0,this.hideSubCategory.emit({slug:this.value,hide:!0})):this.hideSubCategory.emit({slug:this.value,hide:!1}),this.hideVideoSlider.emit(0===this.totalRecords?{slug:"brand",hide:!0}:{slug:"brand",hide:!1}),this.loadComplete$.next(l.length),this.mediaPopupService.setProducts(this.products$.value),setTimeout(()=>this.updateScrollButtonVisibility(),100),setTimeout(()=>{this.scrollInitialized||(this.initializeScrollEvent(),this.scrollInitialized=!0)},0)}))}),(0,M.Q)(this.destroyed$)).subscribe(),this.loadMoreTrigger$.next(),this.languageService.languageChange$.pipe((0,M.Q)(this.destroyed$)).subscribe(()=>{this.onLanguageChange(),this.page=1,this.products$.next([]),this.loadMoreTrigger$.next()})}loadItems(i){var n=this;return(0,t.A)(function*(){let l=i;for(;l>0&&n.page<=n.totalPages;
1){n.loadMoreTrigger$.next();try{const c=yield(0,f._)(n.loadComplete$.pipe((0,k.s)(1)));if(!c)break;l-=c}catch{break}}})()}onPrevArrowClicked(){this.slickModal?.slickPrev(),this.loadItems(10)}onNextArrowClicked(){this.slickModal?.slickNext(),this.loadItems(10)}ngAfterViewInit(){this.isBrowser()&&(this.hideleftScrollButton=!0,this.hideRightScrollButton=!1,this.initializeScrollEvent(),this.initializeResizeEvent(),setTimeout(()=>this.updateScrollButtonVisibility(),50))}mapProducts(i){return i.map(n=>{let l=n.product.brand?.translation?.name+" "+n.translation.name;n.translation.variant_name&&(l+=" "+n.translation.variant_name);let c=0;n.regular_price>0&&n.final_sale_price>0&&n.final_sale_price<n.regular_price&&(c=Math.round((n.regular_price-n.final_sale_price)/n.regular_price*100));const v=(0,y.b9)(n.translation);return{id:n.id,brand:n.product.brand.translation.name,name:l,currency:"AED",salePrice:n.final_sale_price,originalPrice:n.regular_price,discount:c,slug:v,inWishlist:!1,videoUrl:n.product_variant_gallery?.video_gallery?.[0]?.url||null,videoThumbnailUrl:n.product_variant_gallery?.video_gallery?.[0]?.thumbnail_url||(0,d.W4)(n.product_variant_gallery?.image_thumbnail_url,d.nG.MEDIUM)||null,imageUrl:(0,d.W4)(n.product_variant_gallery.image_thumbnail_url,d.nG.SMALL)}})}onScrollIndexChange(i){}ngOnDestroy(){this.destroyed$.next(),this.destroyed$.complete()}clearAll(){this.page=1,this.totalPages=1,this.products$.next([]),this.loadMoreTrigger$.next()}initializeScrollEvent(){if(!this.isBrowser())return;let i;if(this.scrollContainer&&this.scrollContainer.nativeElement)i=this.scrollContainer.nativeElement;else{const l=document.querySelector(".social-media-scroll-container");l&&(i=l)}if(!i)return void console.warn("SocialMediaCarousel: scroll container not found; skipping scroll listener setup");const n=(0,P.R)(i,"scroll").pipe((0,M.Q)(this.destroyed$));n.pipe((0,g.c)(16)).subscribe(()=>{this.updateScrollButtonVisibility()}),n.pipe((0,g.c)(200),(0,S.T)(()=>i.scrollLeft+i.clientWidth>=i.scrollWidth-300),(0,b.p)(l=>l&&!this.loading)).subscribe(()=>{this.loadMoreTrigger$.next()})}initializeResizeEvent(){this.isBrowser()&&(0,P.R)(window,"resize").pipe((0,a.B)(200)).subscribe(()=>{this.computeSlideWidthCached(),this.onResize()})}onResize(){setTimeout(()=>{this.updateScrollButtonVisibility()},100)}ngOnChanges(i){i.slideWidth&&(this.computeSlideWidthCached(),setTimeout(()=>this.updateScrollButtonVisibility(),50))}computeSlideWidthCached(){if("number"==typeof this.slideWidth)return void(this.slideWidthCached=`${this.slideWidth}px`);const i=(this.slideWidth||"").toString().trim();this.slideWidthCached=i||"194px"}onLanguageChange(){const i=this.checkRTLDirection();this.isRTL!==i&&(this.isRTL=i,this.cdr.detectChanges(),setTimeout(()=>{this.updateScrollButtonVisibility()},50),setTimeout(()=>{try{const n=this.slickModal;if(!n)return;if("function"==typeof n.slickSetOption)return void n.slickSetOption("rtl",this.isRTL,!0);if("function"==typeof n.reInit)return void n.reInit();"function"==typeof n.unslick&&(n.unslick(),setTimeout(()=>{if("function"==typeof n.initSlick)try{n.initSlick()}catch{}},50))}catch{}},120))}scrollBy(i){const n=this.scrollContainer.nativeElement,v=(this.checkRTLDirection()?-i:i)*this.cardWidth*3,E=n.scrollLeft+v,ie=n.scrollWidth-n.clientWidth,ne=Math.abs(E)<=2,G=Math.abs(E)>=ie-2,L=n.scrollWidth>n.clientWidth;this.hideleftScrollButton=ne||!L,this.hideRightScrollButton=G||!L,G&&L&&this.loadMoreTrigger$.next(),this.cdr.detectChanges(),n.scrollBy({left:v,behavior:"smooth"}),setTimeout(()=>this.updateScrollButtonVisibility(),350)}handlePrevClick(){this.isBrowser()&&this.scrollBy(-1)}handleNextClick(){this.isBrowser()&&this.scrollBy(1)}checkRTLDirection(){return this.isBrowser()&&("rtl"===document.documentElement.dir||"ar"===document.documentElement.getAttribute("lang")||"rtl"===getComputedStyle(document.documentElement).direction)||"ar"===this.languageService.currentLanguage}updateScrollButtonVisibility(){if(!this.isBrowser()||!this.scrollContainer?.nativeElement)return void console.warn("Scroll container not found");const i=this.scrollContainer.nativeElement,n=Math.abs(i.scrollLeft),v=n>=i.scrollWidth-i.clientWidth-2,E=i.scrollWidth>i.clientWidth;this.hideleftScrollButton=n<=2||!E,this.hideRightScrollButton=v||!E,this.cdr.detectChanges()}getProductsRecordsLength(){this.products$.subscribe(i=>{this.totalProducts=i?.length})}openVideoPopup(i){const n=this.products$.getValue(),l=n.findIndex(c=>c.id===i.id);-1!==l&&(this.mediaPopupService.setProducts(n),this.mediaPopupService.open(l),this.mediaPopupService.onEndReached=()=>{this.loading||this.loadMoreTrigger$.next()})}get sliderConfig(){return{rtl:this.isRTL,infinite:!1,variableWidth:!1,slidesToShow:7,slidesToScroll:7,arrows:!1,responsive:[{breakpoint:1024,settings:{slidesToShow:3}},{breakpoint:768,settings:{slidesToShow:2}},{breakpoint:480,settings:{slidesToShow:1}}]}}onSlickAfterChange(i){const n="number"==typeof i?i:i?.currentSlide??0;(this.products$.getValue()||[]).length-(n+1)<=3&&!this.loading&&this.page<=this.totalPages&&this.loadMoreTrigger$.next()}
1getPrevButtonClasses(){return("absolute top-1/2 -translate-y-1/2 z-10 hidden lg:inline-flex items-center justify-center w-[48px] h-[48px] bg-white shadow-md rounded-full p-2 hover:bg-gray-100 disabled:opacity-50 disabled:cursor-not-allowed disabled:hover:bg-white transition-all duration-200 "+(this.checkRTLDirection()?"right-[-24px]":"left-[-24px]")).trim()}getNextButtonClasses(){return("absolute top-1/2 -translate-y-1/2 z-10 hidden lg:inline-flex items-center justify-center w-[48px] h-[48px] bg-white shadow-md rounded-full p-2 hover:bg-gray-100 disabled:opacity-50 disabled:cursor-not-allowed disabled:hover:bg-white transition-all duration-200 "+(this.checkRTLDirection()?"left-[-24px]":"right-[-24px]")).trim()}getPrevArrowIcon(){return this.checkRTLDirection()?"/assets/sgm-icons/arrow-right-grey.svg":"/assets/sgm-icons/arrow-left-grey.svg"}getNextArrowIcon(){return this.checkRTLDirection()?"/assets/sgm-icons/arrow-left-grey.svg":"/assets/sgm-icons/arrow-right-grey.svg"}static{this.\u0275fac=function(n){return new(n||s)}}static{this.\u0275cmp=e.VBU({type:s,selectors:[["app-social-media-carousel"]],viewQuery:function(n,l){if(1&n&&(e.GBs($,5),e.GBs(B,5)),2&n){let c;
1e.mGM(c=e.lsd())&&(l.scrollContainer=c.first),e.mGM(c=e.lsd())&&(l.slickModal=c.first)}},inputs:{type:"type",value:"value",brandName:"brandName",section:"section",products:"products",wrapperClass:"wrapperClass",slideWidth:"slideWidth"},outputs:{hideSubCategory:"hideSubCategory",hideVideoSlider:"hideVideoSlider"},features:[e.OA$],decls:5,vars:6,consts:[["scrollContainer",""],["desktopInitialSkeletons",""],["mobileInitialSkeletons",""],[1,"relative"],["class","relative sm:block hidden",4,"ngIf"],["class","flex sm:hidden overflow-x-auto overflow-y-hidden scroll-smooth gap-2 px-4 -mx-4 hide-scrollbar relative",4,"ngIf"],[1,"relative","sm:block","hidden"],[1,""],[3,"click","disabled","ngClass"],["alt","Previous",1,"w-4","h-4",3,"src"],["alt","Next",1,"w-4","h-4",3,"src"],[1,"flex","items-stretch","overflow-x-auto","hide-scrollbar","gap-x-4","snap-x","scroll-smooth","relative"],[4,"ngIf"],[4,"ngIf","ngIfElse"],["class","shrink-0 w-[250px] lg:w-[300px] aspect-[300/494]",4,"ngFor","ngForOf"],["class","shrink-0 w-[250px] lg:w-[300px] aspect-[300/494]",3,"display",4,"ngFor","ngForOf"],["class","shrink-0 w-[215px] p-[24px] flex items-center justify-center text-center",4,"ngIf"],[1,"shrink-0","w-[250px]","lg:w-[300px]","aspect-[300/494]"],[3,"videoClick","product","imageUrl","backgroundUrl"],[3,"isSkeleton"],[1,"shrink-0","w-[215px]","p-[24px]","flex","items-center","justify-center","text-center"],["class","text-gray-400",4,"ngIf"],[1,"text-gray-400"],[1,"flex","sm:hidden","overflow-x-auto","overflow-y-hidden","scroll-smooth","gap-2","px-4","-mx-4","hide-scrollbar","relative"],["class","shrink-0 sm:w-[194px] w-[164px]",4,"ngFor","ngForOf"],["class","shrink-0 sm:w-[194px] w-[164px]",3,"display",4,"ngFor","ngForOf"],[1,"shrink-0","sm:w-[194px]","w-[164px]"]],template:function(n,l){if(1&n&&(e.j41(0,"div",3),e.DNE(1,K,14,19,"div",4),e.nI1(2,"async"),e.DNE(3,ee,6,3,"div",5),e.nI1(4,"async"),e.k0s()),2&n){let c,v;e.R7$(),e.Y8G("ngIf",l.loading||(null==(c=e.bMT(2,2,l.products$))?null:c.length)),e.R7$(2),e.Y8G("ngIf",l.loading||(null==(v=e.bMT(4,4,l.products$))?null:v.length))}},dependencies:[_.MD,_.YU,_.Sq,_.bT,_.Jj,w.v,o.E9,u.h,u.D9,R.TV],styles:["[_nghost-%COMP%]     .slick-track{display:flex!important;gap:16px!important;margin:0 -16px}.social-media-carousel-wrapper[_ngcontent-%COMP%]{position:relative}.social-media-carousel-wrapper[_ngcontent-%COMP%]   .slide-nav[_ngcontent-%COMP%]{display:inline-flex!important;align-items:center;justify-content:center;width:48px;height:48px;background:#fff;border-radius:9999px;box-shadow:0 6px 18px #00000014;border:1px solid rgba(34,36,38,.06);z-index:30;position:absolute;top:50%;transform:translateY(-50%)}.social-media-carousel-wrapper[_ngcontent-%COMP%]   .slide-prev[_ngcontent-%COMP%]{left:-17px}.social-media-carousel-wrapper[_ngcontent-%COMP%]   .slide-next[_ngcontent-%COMP%]{right:-17px}@media (max-width: 1023px){.social-media-carousel-wrapper[_ngcontent-%COMP%]   .slide-nav[_ngcontent-%COMP%]{display:none}}.social-media-carousel-wrapper[_ngcontent-%COMP%]     .slick-list{-ms-overflow-style:none!important;scrollbar-width:none!important}.social-media-carousel-wrapper[_ngcontent-%COMP%]     .slick-list::-webkit-scrollbar{height:0!important;width:0!important;background:transparent!important}.social-media-carousel-wrapper[_ngcontent-%COMP%]     .slick-list::-webkit-scrollbar-thumb, .social-media-carousel-wrapper[_ngcontent-%COMP%]     .slick-list::-webkit-scrollbar-track{background:transparent!important;border:none!important;box-shadow:none!important;-webkit-appearance:none!important}html[dir=rtl][_nghost-%COMP%]   .social-media-carousel-wrapper[_ngcontent-%COMP%]   .slide-prev[_ngcontent-%COMP%], html[dir=rtl]   [_nghost-%COMP%]   .social-media-carousel-wrapper[_ngcontent-%COMP%]   .slide-prev[_ngcontent-%COMP%], .rtl[_nghost-%COMP%]   .social-media-carousel-wrapper[_ngcontent-%COMP%]   .slide-prev[_ngcontent-%COMP%], .rtl   [_nghost-%COMP%]   .social-media-carousel-wrapper[_ngcontent-%COMP%]   .slide-prev[_ngcontent-%COMP%]{left:auto;right:-17px}html[dir=rtl][_nghost-%COMP%]   .social-media-carousel-wrapper[_ngcontent-%COMP%]   .slide-next[_ngcontent-%COMP%], html[dir=rtl]   [_nghost-%COMP%]   .social-media-carousel-wrapper[_ngcontent-%COMP%]   .slide-next[_ngcontent-%COMP%], .rtl[_nghost-%COMP%]   .social-media-carousel-wrapper[_ngcontent-%COMP%]   .slide-next[_ngcontent-%COMP%], .rtl   [_nghost-%COMP%]   .social-media-carousel-wrapper[_ngcontent-%COMP%]   .slide-next[_ngcontent-%COMP%]{right:auto;left:-17px}.scrollbar-hide[_ngcontent-%COMP%]{scrollbar-width:none;-ms-overflow-style:none}.scrollbar-hide[_ngcontent-%COMP%]::-webkit-scrollbar{display:none}.scrollbar-hide[_ngcontent-%COMP%]{-ms-overflow-style:none;scrollbar-width:none}.scrollbar-hide[_ngcontent-%COMP%]::-webkit-scrollbar{height:0;width:0;background:transparent}.scrollbar-hide[_ngcontent-%COMP%]::-webkit-scrollbar-thumb, .scrollbar-hide[_ngcontent-%COMP%]::-webkit-scrollbar-track{background:transparent!important;border:none!important;box-shadow:none!important;-webkit-appearance:none!important}"]})}}return s})()}}]);

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.