1"use strict";(self.webpackChunkmain=self.webpackChunkmain||[]).push([[4266],{1198:(L,C,d)=>{d.d(C,{Hv:()=>B,TV:()=>y,qW:()=>v});var e=d(177),o=d(3953),b=d(9417);const f=["*"];let v=(()=>{class h{config;afterChange=(0,o.CGW)();beforeChange=(0,o.CGW)();breakpoint=(0,o.CGW)();destroy=(0,o.CGW)();init=(0,o.CGW)();$instance;currentIndex=0;slides=[];initialized=!1;_removedSlides=[];_addedSlides=[];el=(0,o.WQX)(o.aKT);zone=(0,o.WQX)(o.SKi);isServer=(0,e.Vy)((0,o.WQX)(o.Agw));ngOnDestroy(){this.unslick()}ngAfterViewInit(){this.ngAfterViewChecked()}ngAfterViewChecked(){if(!this.isServer&&(this._addedSlides.length>0||this._removedSlides.length>0)){const g=this.slides.length-this._removedSlides.length+this._addedSlides.length;this.initialized?0===g?this.unslick():(this._addedSlides.forEach(l=>{this.slides.push(l),this.$instance.slick("slickAdd",l.el.nativeElement)}),this._addedSlides=[],this._removedSlides.forEach(l=>{const m=this.slides.indexOf(l);this.slides=this.slides.filter(i=>i!==l),this.$instance.slick("slickRemove",m)}),this._removedSlides=[]):g>0&&this.initSlick()}}initSlick(){this.slides=this._addedSlides,this._addedSlides=[],this._removedSlides=[],this.$instance=jQuery(this.el.nativeElement),this.$instance.on("init",(g,l)=>{this.zone.run(()=>{this.init.emit({event:g,slick:l})})}),this.$instance.slick(this.config),this.zone.run(()=>{this.initialized=!0,this.currentIndex=this.config?.initialSlide||0}),this.$instance.on("afterChange",(g,l,m)=>{this.zone.run(()=>{this.afterChange.emit({event:g,slick:l,currentSlide:m,first:0===m,last:l.$slides.length===m+l.options.slidesToScroll}),this.currentIndex=m})}),this.$instance.on("beforeChange",(g,l,m,i)=>{this.zone.run(()=>{this.beforeChange.emit({event:g,slick:l,currentSlide:m,nextSlide:i}),this.currentIndex=i})}),this.$instance.on("breakpoint",(g,l,m)=>{this.zone.run(()=>{this.breakpoint.emit({event:g,slick:l,breakpoint:m})})}),this.$instance.on("destroy",(g,l)=>{this.zone.run(()=>{this.destroy.emit({event:g,slick:l}),this.initialized=!1})})}addSlide(g){this._addedSlides.push(g)}removeSlide(g){this._removedSlides.push(g)}slickGoTo(g){this.$instance.slick("slickGoTo",g)}slickNext(){this.$instance.slick("slickNext")}slickPrev(){this.$instance.slick("slickPrev")}slickPause(){this.$instance.slick("slickPause")}slickPlay(){this.$instance.slick("slickPlay")}unslick(){this.$instance&&(this.$instance.slick("unslick"),this.$instance=void 0),this.initialized=!1}ngOnChanges(g){if(this.initialized){const l=g.config;if(l.previousValue!==l.currentValue&&void 0!==l.currentValue){const m=l.currentValue.refresh,i=Object.assign({},l.currentValue);delete i.refresh,this.$instance.slick("slickSetOption",i,m)}}}static \u0275fac=function(l){return new(l||h)};static \u0275cmp=o.VBU({type:h,selectors:[["ngx-slick-carousel"]],inputs:{config:"config"},outputs:{afterChange:"afterChange",beforeChange:"beforeChange",breakpoint:"breakpoint",destroy:"destroy",init:"init"},exportAs:["slick-carousel"],standalone:!1,features:[o.Jv_([{provide:b.kq,useExisting:(0,o.Rfq)(()=>h),multi:!0}]),o.OA$],ngContentSelectors:f,decls:1,vars:0,template:function(l,m){1&l&&(o.NAR(),o.SdG(0))},encapsulation:2})}return h})(),B=(()=>{class h{carousel=(0,o.WQX)(v,{host:!0});renderer=(0,o.WQX)(o.sFG);el=(0,o.WQX)(o.aKT);isServer=(0,e.Vy)((0,o.WQX)(o.Agw));ngOnInit(){this.carousel.addSlide(this),this.isServer&&this.carousel.slides.length>0&&this.renderer.setStyle(this.el,"display","none")}ngOnDestroy(){this.carousel.removeSlide(this)}static \u0275fac=function(l){return new(l||h)};static \u0275dir=o.FsC({type:h,selectors:[["","ngxSlickItem",""]],standalone:!1})}return h})(),y=(()=>{class h{static \u0275fac=function(l){return new(l||h)};static \u0275mod=o.$C({type:h});static \u0275inj=o.G2t({imports:[e.MD]})}return h})()},2810:(L,C,d)=>{d.d(C,{a:()=>g});var e=d(3953),o=d(177),b=d(345),f=d(1918),v=d(6349);function B(l,m){if(1&l&&(e.j41(0,"h1",9),e.EFF(1),e.k0s()),2&l){const i=e.XpG(2);e.AVh("text-right",i.isArabic)("text-left",!i.isArabic),e.R7$(),e.SpI(" ",i.title," ")}}function y(l,m){if(1&l&&e.nrm(0,"div",10),2&l){const i=e.XpG(2);e.AVh("text-right",i.isArabic)("text-left",!i.isArabic),e.Y8G("innerHTML",i.fullContentHtml,e.npT)}}function h(l,m){if(1&l&&(e.j41(0,"p",11),e.EFF(1),e.k0s()),2&l){const i=e.XpG(2);e.AVh("text-right",i.isArabic)("text-left",!i.isArabic),e.R7$(),e.SpI(" ",i.preview," ")}}function P(l,m){if(1&l){const i=e.RV6();e.j41(0,"section",0)(1,"div",1),e.DNE(2,B,2,5,"h1",2),e.j41(3,"button",3),e.bIt("click",function(){e.eBV(i);const x=e.XpG();return e.Njj(x.toggleExpanded())}),e.qSk(),e.j41(4,"svg",4),e.nrm(5,"path",5),e.k0s(),e.joV(),e.j41(6,"span"),e.EFF(7),e.k0s()()(),e.j41(8,"div",6),e.DNE(9,y,1,5,"div",7)(10,h,2,5,"p",8),e.k0s()()}if(2&l){const i=e.XpG();e.BMQ("dir",i.isArabic?"rtl":"ltr"),e.R7$(2),e.vxM(i.title?2:-1),e.R7$(),e.AVh("flex-row-reverse",i.isArabic),e.BMQ("aria-expanded",i.isExpanded),e.R7$(),e.AVh("rotate-180",i.isExpanded),e.R7$(3),e.JRh(i.isExpanded?i.showLessLabel:i.showMoreLabel),e.R7$(2),e.vxM(i.isExpanded?9:i.preview?10:-1)}}let g=(()=>{class l{constructor(){this.languageService=(0,e.WQX)(f.gw),this.sanitizer=(0,e.WQX)(b.up),this._generalSeoDetails=null,this.contentCacheKey="",this.isExpanded=!1,this.fullContentHtml=""}set generalSeoDetails(i){this._generalSeoDetails=i,this.updateContentHtml()}get generalSeoDetails(){return this._generalSeoDetails}get isArabic(){return"ar"===this.languageService.currentLanguage}get showMoreLabel(){return this.isArabic?"\u0639\u0631\u0636 \u0627\u0644\u0645\u0632\u064a\u062f":"SHOW MORE"}get showLessLabel(){return this.isArabic?"\u0639\u0631\u0636 \u0623\u0642\u0644":"SHOW LESS"}get hasVisibleContent(){if(!this._generalSeoDetails?.is_active)return!1;const{heading:i,bodyHtml:u}=this.parsedInPageContent;return!(!i&&!u.trim())}get title(){const{heading:i}=this.parsedInPageContent;return i||this.activeTranslation?.seo_title?.trim()||""}get preview(){const i=this.stripHtml(this.parsedInPageContent.bodyHtml);return i?i.length<=200?i:`${i.slice(0,200).trim()}...`:""}ngOnInit(){this.languageSubscription=this.languageService.languageChange$.subscribe(()=>{this.updateContentHtml()})}ngOnDestroy(){this.languageSubscription?.unsubscribe()}toggleExpanded(){this.isExpanded=!this.isExpanded}updateContentHtml(){const i=this.parsedInPageContent.bodyHtml,u=`${this.isArabic}|${i}`;u!==this.contentCacheKey&&(this.contentCacheKey=u,this.fullContentHtml=this.sanitizer.bypassSecurityTrustHtml((0,f.fA)(i)))}get parsedInPageContent(){return this.splitHeadingFromContent(this.activeTranslation?.in_page_content??"")}splitHeadingFromContent(i){if(!i.trim())return{heading:"",bodyHtml:""};if(typeof document<"u"){const w=document.createElement("div");w.innerHTML=i;const k=w.querySelector("h1"),j=(k?.textContent||"").replace(/\s+/g," ").trim();return k&&k.remove(),{heading:j,bodyHtml:w.innerHTML.trim()}}const u=i.match(/<h1[^>]*>([\s\S]*?)<\/h1>/i);return{heading:u?this.stripHtml(u[1]):"",bodyHtml:u?i.replace(u[0],"").trim():i.trim()}}get activeTranslation(){return(0,v.PZ)(this._generalSeoDetails?.general_seo_setting_translations,this.isArabic)}stripHtml(i){if(!i)return"";if(typeof document<"u"){const u=document.createElement("div");return u.innerHTML=i,(u.textContent||u.innerText||"").replace(/\s+/g," ").trim()}return i.replace(/<[^>]*>/g," ").replace(/ /gi," ").replace(/\s+/g," ").trim()}static{this.\u0275fac=function(u){return new(u||l)}}static{this.\u0275cmp=e.VBU({type:l,selectors:[["app-general-seo-settings"]],inputs:{generalSeoDetails:"generalSeoDetails"},decls:1,vars:1,consts:[[1,"container","2xl:max-w-[1440px]","mx-auto","px-4","pt-6","pb-8"],[1,"flex","items-start","justify-between","gap-4"],[1,"text-xl","font-bold","leading-tight","text-[#101720]","sm:text-[32px]","sm:leading-[1.2]",3,"text-right","text-left"],["type","button",1,"inline-flex","h-10","
1shrink-0","items-center","gap-2","rounded-xl","border","border-sgm-primary-base","px-4","text-xs","font-semibold","uppercase","tracking-wide","text-sgm-primary-base","transition-colors","hover:bg-[#0DAC570D]","sm:text-sm",3,"click"],["xmlns","http://www.w3.org/2000/svg","width","16","height","16","viewBox","0 0 24 24","fill","none","aria-hidden","true",1,"transition-transform"],["d","M6 9l6 6 6-6","stroke","currentColor","stroke-width","2","stroke-linecap","round","stroke-linejoin","round"],[1,"mt-4"],[1,"seo-content","text-sm","leading-6","text-[#64748B]","sm:text-base",3,"text-right","text-left","innerHTML"],[1,"text-sm","leading-6","text-[#64748B]","sm:text-base",3,"text-right","text-left"],[1,"text-xl","font-bold","leading-tight","text-[#101720]","sm:text-[32px]","sm:leading-[1.2]"],[1,"seo-content","text-sm","leading-6","text-[#64748B]","sm:text-base",3,"innerHTML"],[1,"text-sm","leading-6","text-[#64748B]","sm:text-base"]],template:function(u,x){1&u&&e.DNE(0,P,11,9,"section",0),2&u&&e.vxM(x.hasVisibleContent?0:-1)},dependencies:[o.MD],styles:["[_nghost-%COMP%]{display:block}[_nghost-%COMP%] .seo-content[_ngcontent-%COMP%]{white-space:normal;word-break:normal;overflow-wrap:break-word;word-wrap:break-word;hyphens:none;-webkit-hyphens:none}[_nghost-%COMP%] .seo-content[_ngcontent-%COMP%] .ql-align-justify{text-align:start}[_nghost-%COMP%] .seo-content[_ngcontent-%COMP%] *{box-sizing:border-box;max-width:100%}[_nghost-%COMP%] .seo-content[_ngcontent-%COMP%] h1, [_nghost-%COMP%] .seo-content[_ngcontent-%COMP%] h2, [_nghost-%COMP%] .seo-content[_ngcontent-%COMP%] h3, [_nghost-%COMP%] .seo-content[_ngcontent-%COMP%] h4, [_nghost-%COMP%] .seo-content[_ngcontent-%COMP%] h5, [_nghost-%COMP%] .seo-content[_ngcontent-%COMP%] h6, [_nghost-%COMP%] .seo-content[_ngcontent-%COMP%] p, [_nghost-%COMP%] .seo-content[_ngcontent-%COMP%] div, [_nghost-%COMP%] .seo-content[_ngcontent-%COMP%] span, [_nghost-%COMP%] .seo-content[_ngcontent-%COMP%] ul, [_nghost-%COMP%] .seo-content[_ngcontent-%COMP%] ol, [_nghost-%COMP%] .seo-content[_ngcontent-%COMP%] li{overflow-wrap:break-word;word-wrap:break-word;word-break:normal;hyphens:none;-webkit-hyphens:none;white-space:normal!important}[_nghost-%COMP%] .seo-content[_ngcontent-%COMP%] h1, [_nghost-%COMP%] .seo-content[_ngcontent-%COMP%] h2, [_nghost-%COMP%] .seo-content[_ngcontent-%COMP%] h3, [_nghost-%COMP%] .seo-content[_ngcontent-%COMP%] h4, [_nghost-%COMP%] .seo-content[_ngcontent-%COMP%] h5, [_nghost-%COMP%] .seo-content[_ngcontent-%COMP%] h6{margin-top:1.25em;margin-bottom:.5em;font-weight:700;line-height:1.3;color:#101720}[_nghost-%COMP%] .seo-content[_ngcontent-%COMP%] h1{font-size:2rem}[_nghost-%COMP%] .seo-content[_ngcontent-%COMP%] h2{font-size:1.5rem}[_nghost-%COMP%] .seo-content[_ngcontent-%COMP%] h3{font-size:1.25rem}[_nghost-%COMP%] .seo-content[_ngcontent-%COMP%] h4{font-size:1.125rem}[_nghost-%COMP%] .seo-content[_ngcontent-%COMP%] h5{font-size:1rem}[_nghost-%COMP%] .seo-content[_ngcontent-%COMP%] h6{font-size:.875rem}[_nghost-%COMP%] .seo-content[_ngcontent-%COMP%] p{margin:0 0 .75rem;color:#64748b;line-height:1.6}[_nghost-%COMP%] .seo-content[_ngcontent-%COMP%] ul{list-style-type:disc;padding-inline-start:1.5em;margin:0 0 .75rem}[_nghost-%COMP%] .seo-content[_ngcontent-%COMP%] ol{list-style-type:decimal;padding-inline-start:1.5em;margin:0 0 .75rem}[_nghost-%COMP%] .seo-content[_ngcontent-%COMP%] li{display:list-item;margin-bottom:.35rem;color:#64748b;line-height:1.6}[_nghost-%COMP%] .seo-content[_ngcontent-%COMP%] li[data-list=bullet]{list-style-type:disc}[_nghost-%COMP%] .seo-content[_ngcontent-%COMP%] li[data-list=ordered]{list-style-type:decimal}[_nghost-%COMP%] .seo-content[_ngcontent-%COMP%] strong, [_nghost-%COMP%] .seo-content[_ngcontent-%COMP%] b{font-weight:700;color:#101720}[_nghost-%COMP%] .seo-content[_ngcontent-%COMP%] em, [_nghost-%COMP%] .seo-content[_ngcontent-%COMP%] i{font-style:italic}[_nghost-%COMP%] .seo-content[_ngcontent-%COMP%] u{text-decoration:underline}[_nghost-%COMP%] .seo-content[_ngcontent-%COMP%] a{color:#0dac57;text-decoration:underline;cursor:pointer;word-break:break-word;overflow-wrap:break-word}[_nghost-%COMP%] .seo-content[_ngcontent-%COMP%] a:hover{color:#099a4d}[_nghost-%COMP%] .seo-content[_ngcontent-%COMP%] img{display:block;max-width:100%;height:auto;border-radius:8px}[_nghost-%COMP%] .seo-content[_ngcontent-%COMP%] blockquote{border-inline-start:3px solid #0dac57;padding-inline-start:1rem;margin:1em 0;color:#64748b}"]})}}return l})()},5245:(L,C,d)=>{d.d(C,{i:()=>o});var e=d(5964);function o(b){return(0,e.p)((f,v)=>b<=v)}},8485:(L,C,d)=>{d.r(C),d.d(C,{brandsRoutes:()=>Ae});var e=d(3953),o=d(177),b=d(8018),f=d(1918),v=d(4988),B=d(1413),y=d(5245),h=d(6977),P=d(6354),g=d(8141),l=d(253),m=d(7673),i=d(9172),u=d(9446),x=d(3804),$=d(6629),k=(d(5095),d(6107)),j=d(5521),S=d(9192);const M=n=>["/brand",n],H=n=>({background:n}),V=n=>[n];function F(n,a){if(1&n&&e.nrm(0,"img",5),2&n){const t=e.XpG();e.Y8G("src",null==t.brand||null==t.brand.translation?null:t.brand.translation.desktop_section_banner_url,e.B4B)("alt",null==t.brand||null==t.brand.translation?null:t.brand.translation.name)}}function Y(n,a){if(1&n&&e.nrm(0,"img",5),2&n){const t=e.XpG();e.Y8G("src",null==t.brand||null==t.brand.translation?null:t.brand.translation.desktop_section_banner_url,e.B4B)("alt",null==t.brand||null==t.brand.translation?null:t.brand.translation.name)}}function A(n,a){if(1&n&&e.nrm(0,"img",7),2&n){const t=e.XpG();e.Y8G("src",null==t.brand||null==t.brand.translation?null:t.brand.translation.desktop_section_banner_url,e.B4B)("alt",null==t.brand||null==t.brand.translation?null:t.brand.translation.name)}}function X(n,a){if(1&n&&e.nrm(0,"img",7),2&n){const t=e.XpG();e.Y8G("src",null==t.brand||null==t.brand.translation?null:t.brand.translation.desktop_section_banner_url,e.B4B)("alt",null==t.brand||null==t.brand.translation?null:t.brand.translation.name)}}
1function W(n,a){if(1&n&&(e.qex(0),e.nrm(1,"app-product-carousel",14),e.bVm()),2&n){const t=e.XpG();e.R7$(),e.Y8G("type","brand")("value",null==t.brand?null:t.brand.slug)}}function z(n,a){if(1&n&&e.nrm(0,"app-product-slide-horizontal",14),2&n){const t=e.XpG();e.Y8G("type","brand")("value",null==t.brand?null:t.brand.slug)}}let U=(()=>{class n{constructor(){this.languageService=(0,e.WQX)(f.gw),this.router=(0,e.WQX)(S.Ix),this._showHorizontal=!0,this.products=[],this.loading=!1}set showHorizontal(t){this._showHorizontal=""===t||!0===t||"true"===t||"string"==typeof t&&"true"===t.toLowerCase()}get showHorizontal(){return this._showHorizontal}ngOnChanges(t){t.brand&&this.processBrand(this.brand)}processBrand(t){}get brandHref(){return this.router.serializeUrl(this.router.createUrlTree(["/brand",this.brand.slug||"apple"]))}static{this.\u0275fac=function(s){return new(s||n)}}static{this.\u0275cmp=e.VBU({type:n,selectors:[["app-brand-products"]],inputs:{brand:"brand"},features:[e.OA$],decls:23,vars:42,consts:[["slideTpl",""],[1,"container","2xl:max-w-[1440px]","mx-auto","sm:px-4","my-10"],["rel","noopener",3,"routerLink","href"],[1,"w-full","sm:hidden","block",3,"src","alt"],[1,"relative","sm:rounded-xl","home-shadow",3,"ngStyle"],[1,"w-full","hidden","sm:block","lg:hidden","sm:rounded-tl-xl","sm:rounded-tr-xl",3,"src","alt"],[1,"w-full","h-[149px]","relative","lg:block","hidden","sm:rounded-tl-xl","sm:rounded-tr-xl"],[1,"w-full","sm:rounded-tl-xl","sm:rounded-tr-xl",3,"src","alt"],[1,"lg:px-4","pb-4"],[3,"ngClass"],[4,"ngIf","ngIfElse"],[1,"lg:px-0","px-4"],["rel","noopener",1,"sm:inline-flex","mt-4","hidden","items-center","gap-2","w-full","bg-white","rounded-lg","sm:text-md","text-sm","font-medium","py-2","px-4","justify-center","min-h-[48px]",3,"routerLink","href"],["rel","noopener",1,"inline-flex","mt-4","sm:hidden","items-center","gap-2","w-full","bg-white","border","rounded-lg","sm:text-md","text-sm","font-medium","py-2","px-4","justify-center","min-h-[48px]",3,"routerLink","href"],[3,"type","value"]],template:function(s,r){if(1&s&&(e.j41(0,"div",1)(1,"a",2),e.nrm(2,"img",3),e.k0s(),e.j41(3,"div",4)(4,"a",2),e.DNE(5,F,1,2,"img",5)(6,Y,1,2,"img",5),e.k0s(),e.j41(7,"div",6)(8,"a",2),e.DNE(9,A,1,2,"img",7)(10,X,1,2,"img",7),e.k0s()(),e.j41(11,"div",8)(12,"div",9),e.DNE(13,W,2,2,"ng-container",10)(14,z,1,2,"ng-template",null,0,e.C5r),e.k0s(),e.j41(16,"div",11)(17,"a",12),e.EFF(18),e.nI1(19,"translate"),e.k0s(),e.j41(20,"a",13),e.EFF(21),e.nI1(22,"translate"),e.k0s()()()()()),2&s){const c=e.sdS(15);e.R7$(),e.Y8G("routerLink",e.eq3(28,M,r.brand.slug))("href",r.brandHref,e.B4B),e.R7$(),e.Y8G("src",null==r.brand||null==r.brand.translation?null:r.brand.translation.mobile_section_banner_url,e.B4B)("alt",null==r.brand||null==r.brand.translation?null:r.brand.translation.name),e.R7$(),e.Y8G("ngStyle",e.eq3(30,H,"linear-gradient(180deg, "+(null==r.brand?null:r.brand.gradient_color_1)+" 50%, "+(null==r.brand?null:r.brand.gradient_color_2)+" 100%)")),e.R7$(),e.Y8G("routerLink",e.eq3(32,M,r.brand.slug))("href",r.brandHref,e.B4B),e.R7$(),e.vxM("ar"===r.languageService.getCurrentLanguage()?5:6),e.R7$(3),e.Y8G("routerLink",e.eq3(34,M,r.brand.slug))("href",r.brandHref,e.B4B),e.R7$(),e.vxM("ar"===r.languageService.getCurrentLanguage()?9:10),e.R7$(3),e.Y8G("ngClass",e.eq3(36,V,"ar"===r.languageService.getCurrentLanguage()?"lg:pr-0 pr-4 sm:pl-4 lg:pl-0 pl-0":"lg:pl-0 pl-4 sm:pr-4 lg:pr-0 pr-0")),e.R7$(),e.Y8G("ngIf",r.showHorizontal)("ngIfElse",c),e.R7$(4),e.xc7("color",(null==r.brand?null:r.brand.gradient_color_2)||"#000000"),e.Y8G("routerLink",e.eq3(38,M,r.brand.slug))("href",r.brandHref,e.B4B),e.R7$(),e.SpI(" ",e.bMT(19,24,"VIEW_ALL")," "),e.R7$(2),e.xc7("color",(null==r.brand?null:r.brand.gradient_color_2)||"#000000"),e.Y8G("routerLink",e.eq3(40,M,r.brand.slug))("href",r.brandHref,e.B4B),e.R7$(),e.SpI(" ",e.bMT(22,26,"VIEW_ALL")," ")}},dependencies:[o.MD,o.YU,o.bT,o.B3,k.H,j.G,S.iI,S.Wk,b.h,b.D9],encapsulation:2})}}return n})();var D=d(6743),K=d(5779);const Q=["carousel"],R=n=>({banners:n}),J=(n,a)=>({"left-0":n,"right-0":a}),Z=(n,a)=>({"right-0":n,"left-0":a});function q(n,a){if(1&n&&(e.j41(0,"div",11)(1,"a",12),e.nrm(2,"img",13),e.k0s()()),2&n){const t=a.$implicit;e.R7$(),e.Y8G("routerLink",t.routerLink)("queryParams",t.queryParams),e.R7$(),e.Y8G("src",t.media_url,e.B4B)}}function ee(n,a){if(1&n&&(e.j41(0,"p-carousel",9,3),e.DNE(2,q,3,3,"ng-template",10),e.k0s()),2&n){const t=a.banners,s=e.XpG(2);e.Y8G("value",t)("numVisible",1)("numScroll",1)("circular",!0)("autoplayInterval",(null==t?null:t.length)>1?s.autoplayInterval:0)("circular",(null==t?null:t.length)>1)("showNavigators",!1)("showIndicators",(null==t?null:t.length)>1)}}function te(n,a){if(1&n&&(e.j41(0,"div",11)(1,"a",14),e.nrm(2,"img",13),e.k0s()()),2&n){const t=a.$implicit;e.R7$(),e.Y8G("href",t.media_link,e.B4B),e.R7$(),e.Y8G("src",t.media_url,e.B4B)}}function ne(n,a){if(1&n&&(e.j41(0,"p-carousel",9,3),e.DNE(2,te,3,2,"ng-template",10),e.k0s()),2&n){const t=a.banners,s=e.XpG(2);e.Y8G("value",t)("numVisible",1)("numScroll",1)("circular",!0)("autoplayInterval",(null==t?null:t.length)>1?s.autoplayInterval:0)("circular",(null==t?null:t.length)>1)("showNavigators",!1)("showIndicators",(null==t?null:t.length)>1)}}function re(n,a){1&n&&e.eu8(0)}function se(n,a){1&n&&e.eu8(0)}function ie(n,a){1&n&&e.nrm(0,"img",23)}function ae(n,a){1&n&&e.nrm(0,"img",24)}function oe(n,a){if(1&n){const t=e.RV6();e.j41(0,"button",20),e.bIt("click",function(r){e.eBV(t);const c=e.XpG(3);return e.Njj(c.onPrevClick(r))}),e.DNE(1,ie,1,0,"img",21)(2,ae,1,0,"img",22),e.k0s()}if(2&n){const t=e.XpG(3);e.Y8G("ngClass",e.l_i(3,J,"ar"!==t.languageService.currentLanguage,"ar"===t.languageService.currentLanguage)),e.R7$(),e.Y8G("ngIf","ar"===t.languageService.currentLanguage),e.R7$(),e.Y8G("ngIf","ar"!==t.languageService.currentLanguage)}}function le(n,a){1&n&&e.nrm(0,"img",28)}function de(n,a){1&n&&e.nrm(0,"img",29)}function ce(n,a){if(1&n){const t=e.RV6();e.j41(0,"button",25),e.bIt("click",function(r){e.eBV(t);const c=e.XpG(3);return e.Njj(c.onNextClick(r))}),e.DNE(1,le,1,0,"img",26)(2,de,1,0,"img",27),e.k0s()}if(2&n){const t=e.XpG(3);e.Y8G("ngClass",e.l_i(3,Z,"ar"!==t.languageService.currentLanguage,"ar"===t.languageService.currentLanguage)),e.R7$(),e.Y8G("ngIf","ar"===t.languageService.currentLanguage),e.R7$(),e.Y8G("ngIf","ar"!==t.languageService.currentLanguage)}}function ge(n,a){if(1&n&&(e.qex(0)(1),e.j41(2,"div",15),e.DNE(3,re,1,0,"ng-container",16),e.k0s(),e.j41(4,"div",17),e.DNE(5,se,1,0,"ng-container",16),e.k0s(),e.bVm(),e.DNE(6,oe,3,6,"button",18)(7,ce,3,6,"button",19),e.bVm()),2&n){e.XpG();const t=e.sdS(2),s=e.sdS(4),r=e.XpG();e.R7$(3),e.Y8G("ngTemplateOutlet",t)("ngTemplateOutletContext",e.eq3(6,R,r.heroBanners.desktop)),e.R7$(2),e.Y8G("ngTemplateOutlet",s)("ngTemplateOutletContext",e.eq3(8,R,r.heroBanners.mobile)),e.R7$(),e.Y8G("ngIf",r.heroBanners.desktop.length>1),e.R7$(),e.Y8G("ngIf",r.heroBanners.desktop.length>1)}}function ue(n,a){if(1&n&&(e.j41(0,"div",15)(1,"div",11)(2,"a",12),e.nrm(3,"img",13),e.k0s()()()),2&n){const t=e.XpG(3);e.R7$(2),e.Y8G("routerLink",t.heroBanners.desktop[0].routerLink)("queryParams",t.heroBanners.desktop[0].queryParams),e.R7$(),e.Y8G("src",t.heroBanners.desktop[0].media_url,e.B4B)}}function he(n,a){if(1&n&&(e.j41(0,"div",17)(1,"div",11)(2,"a",12),e.nrm(3,"img",13),e.k0s()()()),2&n){const t=e.XpG(3);e.R7$(2),e.Y8G("routerLink",t.heroBanners.mobile[0].routerLink)("queryParams",t.heroBanners.mobile[0].queryParams),e.R7$(),e.Y8G("src",t.heroBanners.mobile[0].media_url,e.B4B)}}function me(n,a){if(1&n&&e.DNE(0,ue,4,3,"div",30)(1,he,4,3,"div",31),2&n){const t=e.XpG(2);e.Y8G("ngIf",t.heroBanners.desktop.length>0),e.R7$(),e.Y8G("ngIf",t.heroBanners.mobile.length>0)}}function pe(n,a){if(1&n&&(e.j41(0,"div",7),e.DNE(1,ee,3,8,"ng-template",null,0,e.C5r)(3,ne,3,8,"ng-template",null,1,e.C5r)(5,ge,8,10,"ng-container",8)(6,me,2,2,"ng-template",null,2,e.C5r),e.k0s()),2&n){const t=e.sdS(7),s=e.XpG();e.R7$(5),e.Y8G("ngIf",s.isBrowser)("ngIfElse",t)}}let _e=(()=>{class n{constructor(){this.homeService=(0,e.WQX)(f.XD),this.languageService=(0,e.WQX)(f.gw),this.platformId=(0,e.WQX)(e.Agw),this.isBrowser=(0,o.UE)(this.platformId),this.brandsBanners=[],this.autoplayInterval=f.po,this.loading=!0,this.showNavigators=!0,this.bannerDesktop=[],this.bannerMobile=[],this.heroBanners={desktop:[],mobile:[]}}ngOnInit(){this.languageService.languageChange$.subscribe(()=>{this.brandsBanners?.length&&this.buildHeroBanners()})}ngOnChanges(t){t.brandsBanners&&this.brandsBanners?.length&&this.buildHeroBanners()}buildHeroBanners(){this.heroBanners={desktop:this.brandsBanners.map(t=>{const s=this.getBannerLink(t);return{media_url:t.translation.view_type.desktop.image_url,routerLink:s.routerLink,queryParams:s.queryParams}}),mobile:this.brandsBanners.map(t=>{const s=this.getBannerLink(t);return{media_url:t.translation.view_type.mobile.image_url,routerLink:s.routerLink,queryParams:s.queryParams}})}}getBannerLink(t){return"Brand"===t.banner_type?t.brand?.is_premium?{routerLink:`/brand/${t.brand.slug}`}:{routerLink:"/products",queryParams:{brands:t.brand?.slug}}:{routerLink:"/brand"}}onPrevClick(t){this.carousel.navBackward(t)}onNextClick(t){this.carousel.navForward(t)}static{this.\u0275fac=function(s){return new(s||n)}}static{this.\u0275cmp=e.VBU({type:n,selectors:[["app-heroslider"]],viewQuery:function(s,r){if(1&s&&e.GBs(Q,5),2&s){let c;e.mGM(c=e.lsd())&&(r.carousel=c.first)}},inputs:{brand:"brand",brandsBanners:"brandsBanners"}
1,features:[e.OA$],decls:3,vars:1,consts:[["desktopCarousel",""],["mobileCarousel",""],["staticFirstBanner",""],["carousel",""],[1,"container","2xl:max-w-[1440px]","mx-auto","px-4"],[1,"lg:my-10","lg:mb-0","mb-4","container","2xl:max-w-[1440px]","mx-auto"],["class","hero-slider relative",4,"ngIf"],[1,"hero-slider","relative"],[4,"ngIf","ngIfElse"],["styleClass","custom-carousel",3,"value","numVisible","numScroll","circular","autoplayInterval","showNavigators","showIndicators"],["pTemplate","item"],[1,"banner-container","rounded-xl","overflow-hidden","composite-layer"],[1,"block",3,"routerLink","queryParams"],["draggable","false","decoding","async","alt","Banner Image",1,"bg-gray-100","banner-image","w-full","select-none","sm:h-auto","object-cover",3,"src"],[1,"block",3,"href"],[1,"sm:block","mt-4","lg:mt-0","hidden"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],[1,"block","mt-4","sm:mt-0","sm:hidden"],["class","nav-arrow-prev 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 transition-all duration-200","aria-label","Previous slide",3,"ngClass","click",4,"ngIf"],["class","nav-arrow-next 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 transition-all duration-200","aria-label","Next slide",3,"ngClass","click",4,"ngIf"],["aria-label","Previous slide",1,"nav-arrow-prev","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","transition-all","duration-200",3,"click","ngClass"],["src","/assets/sgm-icons/arrow-right-grey.svg","alt","Previous","class","w-6 h-6",4,"ngIf"],["src","/assets/sgm-icons/arrow-left-grey.svg","alt","Previous","class","w-6 h-6",4,"ngIf"],["src","/assets/sgm-icons/arrow-right-grey.svg","alt","Previous",1,"w-6","h-6"],["src","/assets/sgm-icons/arrow-left-grey.svg","alt","Previous",1,"w-6","h-6"],["aria-label","Next slide",1,"nav-arrow-next","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","transition-all","duration-200",3,"click","ngClass"],["src","/assets/sgm-icons/arrow-left-grey.svg","alt","Next","class","w-6 h-6",4,"ngIf"],["src","/assets/sgm-icons/arrow-right-grey.svg","alt","Next","class","w-6 h-6",4,"ngIf"],["src","/assets/sgm-icons/arrow-left-grey.svg","alt","Next",1,"w-6","h-6"],["src","/assets/sgm-icons/arrow-right-grey.svg","alt","Next",1,"w-6","h-6"],["class","sm:block mt-4 lg:mt-0 hidden",4,"ngIf"],["class","block mt-4 sm:mt-0 sm:hidden",4,"ngIf"]],template:function(s,r){1&s&&(e.j41(0,"div",4)(1,"div",5),e.DNE(2,pe,8,2,"div",6),e.k0s()()),2&s&&(e.R7$(2),e.Y8G("ngIf",r.heroBanners.desktop.length>0||r.heroBanners.mobile.length>0))},dependencies:[o.MD,o.YU,o.bT,o.T3,D.Rl,D.FN,K.Ei,S.iI,S.Wk],styles:[".hero-slider{position:relative} .hero-slider .p-carousel-indicator-list{position:absolute;left:0;right:0;bottom:0}@media (max-width: 640px){ .hero-slider .p-carousel-indicator-list{display:none}} .hero-slider .p-carousel-indicator-active button{width:32px;height:3px;border-radius:0} .hero-slider .p-carousel-indicator-button{width:22px;height:3px;border-radius:0} .hero-slider .nav-arrow-prev, .hero-slider .nav-arrow-next{opacity:0;transition:left .3s ease,right .3s ease,opacity .3s ease} .hero-slider .nav-arrow-prev.left-0{left:0} .hero-slider .nav-arrow-prev.right-0{right:0} .hero-slider .nav-arrow-next.right-0{right:0} .hero-slider .nav-arrow-next.left-0{left:0} .hero-slider:hover .nav-arrow-prev{opacity:1} .hero-slider:hover .nav-arrow-prev.left-0{left:-24px} .hero-slider:hover .nav-arrow-prev.right-0{right:-24px} .hero-slider:hover .nav-arrow-next{opacity:1} .hero-slider:hover .nav-arrow-next.right-0{right:-24px} .hero-slider:hover .nav-arrow-next.left-0{left:-24px}"]})}}return n})();var O=d(9417),fe=d(6247),be=d(2810);const Ce=["brandsCarousel"],ve=["moveToWishListModal"],xe=()=>[Promise.resolve().then(d.bind(d,5622)).then(n=>n.FooterCategoriesComponent),Promise.resolve().then(d.bind(d,6724)).then(n=>n.FooterComponent)],Pe=(n,a)=>({"border-gray-300":n,"border-sgm-primary-base":a}),Se=()=>[1,2,3,4,5,6],N=()=>[1,2,3,4,5];function Be(n,a){if(1&n&&(e.qex(0),e.nrm(1,"app-heroslider",20),e.bVm()),2&n){const t=e.XpG().ngIf,s=e.XpG();e.R7$(),e.Y8G("brand",t)("brandsBanners",s.brandsBanners)}}function ye(n,a){if(1&n&&(e.qex(0),e.DNE(1,Be,2,2,"ng-container",6),e.bVm()),2&n){const t=a.ngIf;e.XpG();const s=e.sdS(3);e.R7$(),e.Y8G("ngIf",t.length>0)("ngIfElse",s)}}function ke(n,a){1&n&&(e.j41(0,"div",35),e.nrm(1,"div",36)(2,"div",37),e.k0s())}function Me(n,a){1&n&&(e.j41(0,"div",38),e.nrm(1,"app-producthome-card",39),e.k0s()),2&n&&(e.R7$(),e.Y8G("isSkeleton",!0))}function we(n,a){1&n&&(e.j41(0,"div",38),e.nrm(1,"app-producthome-card",39),e.k0s()),2&n&&(e.R7$(),e.Y8G("isSkeleton",!0))}function Oe(n,a){1&n&&(e.j41(0,"div",21)(1,"div",22)(2,"div",23),e.nrm(3,"div",24),e.k0s()(),e.j41(4,"div",25)(5,"div",26),e.DNE(6,ke,3,0,"div",27),e.k0s()(),e.j41(7,"div",28)(8,"div",29),e.nrm(9,"div",30)(10,"div",31),e.k0s(),e.j41(11,"div",32),e.DNE(12,Me,2,1,"div",33),e.k0s()(),e.j41(13,"div",28)(14,"div",29),e.nrm(15,"div",34)(16,"div",31),e.k0s(),e.j41(17,"div",32),e.DNE(18,we,2,1,"div",33),e.k0s()()()),2&n&&(e.R7$(6),e.Y8G("ngForOf",e.lJ4(3,Se)),e.R7$(6),e.Y8G("ngForOf",e.lJ4(4,N)),e.R7$(6),e.Y8G("ngForOf",e.lJ4(5,N)))}function Ie(n,a){1&n&&(e.j41(0,"div",40)(1,"div",41)(2,"div",42),e.nrm(3,"div",43),e.k0s()()())}function Te(n,a){if(1&n&&e.nrm(0,"img",51),2&n){const t=e.XpG().$implicit;e.Y8G("src",t.icon,e.B4B)}}function Ge(n,a){if(1&n&&(e.j41(0,"div",49),e.DNE(1,Te,1,1,"img",50),e.j41(2,"span"),e.EFF(3),e.k0s()()),2&n){const t=a.$implicit;e.R7$(),e.Y8G("ngIf",t.icon),e.R7$(2),e.JRh(t.text)}}function Ee(n,a){if(1&n){const t=e.RV6();e.j41(0,"div",44),e.bIt("click",function(){e.eBV(t),e.XpG();const r=e.sdS(13);return e.Njj(r.focus())}),e.j41(1,"span",45),e.EFF(2),e.nI1(3,"translate"),e.k0s(),e.j41(4,"div",46)(5,"div",47),e.DNE(6,Ge,4,2,"div",48),e.k0s()()()}if(2&n){const t=e.XpG();e.AVh("left-4","ar"!==t.languageService.currentLanguage)("right-4","ar"===t.languageService.currentLanguage),e.R7$(2),e.JRh(e.bMT(3,8,"WHAT_YOU_LOOKING")),e.R7$(3),e.xc7("transform","translateY(-"+t.tickerIndex*t.tickerHeight+"px)"),e.R7$(),e.Y8G("ngForOf",t.tickerItems)}}function Le(n,a){if(1&n){const t=e.RV6();e.j41(0,"span",52),e.bIt("click",function(){e.eBV(t);const r=e.XpG();return r.searchField="",e.Njj(r.filteredBrands=[])}),e.qSk(),e.j41(1,"svg",53),e.nrm(2,"rect",54)(3,"path",55),e.k0s()()}if(2&n){const t=e.XpG();e.AVh("right-3","ar"!==t.languageService.currentLanguage)("left-3","ar"===t.languageService.currentLanguage)}}function $e(n,a){if(1&n){const t=e.RV6();e.j41(0,"div",57),e.bIt("click",function(){const r=e.eBV(t).$implicit,c=e.XpG(2);return e.Njj(c.selectBrand(r))}),e.EFF(1),e.nI1(2,"slice"),e.k0s()}if(2&n){const t=a.$implicit;e.R7$(),e.SpI(" ",null!=t&&null!=t.translation&&t.translation.name?t.translation.name.length>30?e.brH(2,1,t.translation.name,0,30)+"...":t.translation.name:""," ")}}function je(n,a){if(1&n&&(e.j41(0,"div"),e.DNE(1,$e,3,5,"div",56),e.k0s()),2&n){const t=e.XpG();e.R7$(),e.Y8G("ngForOf",t.filteredBrands)}}function De(n,a){if(1&n&&(e.j41(0,"div"),e.nrm(1,"app-brand-products",59),e.k0s()),2&n){const t=a.$implicit;e.R7$(),e.Y8G("brand",t)}}function Re(n,a){if(1&n&&(e.qex(0),e.DNE(1,De,2,1,"div",58),e.bVm()),2&n){const t=e.XpG().ngIf;e.R7$(),e.Y8G("ngForOf",t)}}function Ne(n,a){if(1&n&&(e.qex(0),e.DNE(1,Re,2,1,"ng-container",6),e.bVm()),2&n){const t=a.ngIf;e.XpG();const s=e.sdS(26);e.R7$(),e.Y8G("ngIf",t.length>0)("ngIfElse",s)}}function He(n,a){1&n&&(e.j41(0,"div",40)(1,"div",41)(2,"div",42),e.nrm(3,"div",43),e.k0s()()())}function Ve(n,a){1&n&&(e.j41(0,"div",40)(1,"div",41)(2,"div",42),e.nrm(3,"div",43),e.k0s()()())}function Fe(n,a){1&n&&e.nrm(0,"app-footer-categories")(1,"app-footer")}function Ye(n,a){1&n&&(e.j41(0,"div",40)(1,"div",41)(2,"div",42),e.nrm(3,"div",43),e.k0s()()())}const I=(0,e.zw6)("ssr_premium_brands"),T=(0,e.zw6)("ssr_brand_banners"),G=(0,e.zw6)("ssr_home_brands_page1"),E=(0,e.zw6)("ssr_brand_general_seo"),Ae=[{path:"",component:(()=>{class n{constructor(t,s){if(this.router=t,this.cdr=s,this.platformId=(0,e.WQX)(e.Agw),this.brandService=(0,e.WQX)(f.jD),this.languageNavService=(0,e.WQX)(x.g),this.languageService=(0,e.WQX)(f.gw),this.transferState=(0,e.WQX)(e.pJN),this.generalSeoService=(0,e.WQX)(fe.z),this.seoService=(0,e.WQX)(v.B),this.totalPages=0,this.currentPage=1,this.limit=200,this.brandsProducts=[],this.brandsPremium=[],this.isLoading=!1,this.autoplaySpeed=3e3,this.progressPercent=0,this.visibleSlides=1,this.currentSlideIndex=0,this.totalSlidesCount=1,this.isFocused=!1,this.tickerItems=[],this.tickerIndex=0,this.tickerHeight=20,this.tickerTimer=null,this.brandsBanners=[],this.destroyed$=new B.B,this.searchField="",this.filteredBrands=[],!(0,o.UE)(this.platformId))return this.loadPremiumBrands(),void this.loadBrandsBanners();this.loadPremiumBrands(),this.loadBrandsBanners(),this.loadBrands()}ngOnInit(){this.loadGeneralSeoDetails(),(0,o.UE)(this.platformId)&&this.languageService.languageChange$.pipe((0,y.i)(1),(0,h.Q)(this.destroyed$)).subscribe(()=>{this.loadGeneralSeoDetails()})}loadBrands(){if(!(0,o.UE)(this.platformId))return this.isLoading=!0,void this.brandService.getHomeBrands(this.currentPage,this.limit).pipe((0,P.T)(t=>(this.brandsCache=t,this.brandsProducts=[...this.brandsProducts,...t.records],this.totalPages=t.pagination.total_pages,t.records))).subscribe({next:()=>{this.isLoading=!1,this.transferState.set(G,{records:this.brandsProducts,totalPages:this.totalPages}),this.currentPage++,this.computeThumbMetrics()},error:()=>{this.isLoading=!1}});if(this.transferState.hasKey(G)){const t=this.transferState.get(G,{records:[],totalPages:1});this.transferState.remove(G),this.brandsProducts=t.records,this.totalPages=t.totalPages,this.currentPage++,this.isLoading=!1,this.computeThumbMetrics();try{this.tickerItems=this.brandsProducts.slice(0,10).map(s=>({text:s.name??s.title??s.display_name??s.slug??"",icon:s.logo??s.logo_url??s.image??""})),this.tickerItems.length>0&&this.startTicker()}catch{}try{this.currentPage<=this.totalPages&&Promise.resolve().then(()=>this.loadBrands())}catch{}}else this.isLoading=!0,this.brandService.getHomeBrands(this.currentPage,this.limit).pipe((0,P.T)(t=>(this.brandsCache=t,this.brandsProducts=[...this.brandsProducts,...t.records],this.totalPages=t.pagination.total_pages,t.records))).subscribe({next:t=>{this.isLoading=!1,this.currentPage++,this.computeThumbMetrics();try{this.tickerItems=this.brandsProducts.slice(0,10).map(s=>({text:s.name??s.title??s.display_name??s.slug??"",icon:s.logo??s.logo_url??s.image??""})),this.tickerItems.length>0&&this.startTicker()}catch{}try{this.currentPage<=this.totalPages&&Promise.resolve().then(()=>this.loadBrands())}catch{}},error:()=>this.isLoading=!1})}loadPremiumBrands(){if(!(0,o.UE)(this.platformId)){const t=this.brandService.getPremiumBrands().pipe((0,P.T)(s=>s.records),(0,g.M)(s=>this.transferState.set(I,s)),(0,l.t)(1));return this.brandsPremium$=t,void t.subscribe()}if(this.transferState.hasKey(I)){const t=this.transferState.get(I,[]);return this.transferState.remove(I),void(this.brandsPremium$=(0,m.of)(t).pipe((0,l.t)(1)))}this.brandsPremium$=this.brandService.getPremiumBrands().pipe((0,P.T)(t=>t.records),(0,i.Z)([]),(0,l.t)(1))}loadBrandsBanners(){if((0,o.UE)(this.platformId))return this.transferState.hasKey(T)?(this.brandsBanners=this.transferState.get(T,[]),this.transferState.remove(T),void(this.isLoading=!1)):(this.isLoading=!0,void this.brandService.getBrandBanners(this.currentPage,this.limit).subscribe({next:t=>{this.brandsBanners=t.records,this.isLoading=!1},error:t=>{this.isLoading=!1}}));this.brandService.getBrandBanners(1,10).subscribe({next:t=>{this.brandsBanners=t.records,this.transferState.set(T,t.records)},error:()=>{}})}brandDetailpage(t){this.languageNavService.navigate(["products"],{queryParams:{brands:t.slug}})}prev(){try{this.brandsCarousel?.prev?.()}catch{}}
1next(){try{this.brandsCarousel?.next?.()}catch{}}loadGeneralSeoDetails(){if((0,o.UE)(this.platformId))return this.transferState.hasKey(E)?(this.generalSeoDetails=this.transferState.get(E,null),this.transferState.remove(E),this.seoService.setGeneralSeoPageSeo(this.generalSeoDetails),void this.cdr.markForCheck()):void this.generalSeoService.getSeoDetailsByPageKey("brand").subscribe({next:t=>{this.generalSeoDetails=Array.isArray(t)?t[0]:t,this.seoService.setGeneralSeoPageSeo(this.generalSeoDetails),this.cdr.markForCheck()},error:t=>{console.error("Failed to load general SEO details",t)}});this.generalSeoService.getSeoDetailsByPageKey("brand").subscribe({next:t=>{this.generalSeoDetails=Array.isArray(t)?t[0]:t,this.seoService.setGeneralSeoPageSeo(this.generalSeoDetails),this.transferState.set(E,this.generalSeoDetails)},error:()=>{}})}onInit(t){this.currentSlideIndex=0,this.computeProgressMetrics(),this.progressPercent=Math.min(100,(this.currentSlideIndex+this.visibleSlides)/Math.max(1,this.totalSlidesCount)*100)}onBeforeChange(t){const s=this.extractNextIndexFromEvent(t);if("number"==typeof s){const r=Math.max(1,this.brandsProducts?.length||this.totalSlidesCount),c=this.childVisibleSlides??this.getVisibleSlidesCount();this.progressPercent=Math.min(100,(s+c)/r*100)}}onAfterChange(t){const s=this.extractIndexFromEvent(t);"number"==typeof s&&(this.currentSlideIndex=s),this.totalSlidesCount=Math.max(1,this.brandsProducts?.length||this.totalSlidesCount),this.visibleSlides=this.childVisibleSlides??this.getVisibleSlidesCount(),this.progressPercent=Math.min(100,(this.currentSlideIndex+this.visibleSlides)/this.totalSlidesCount*100)}computeThumbMetrics(){this.computeProgressMetrics()}computeProgressMetrics(){this.totalSlidesCount=Math.max(1,this.brandsProducts?.length||1),this.visibleSlides=this.childVisibleSlides??this.getVisibleSlidesCount()}onVisibleSlidesChange(t){const s="number"==typeof t?t:Number(t?.detail??t);this.childVisibleSlides=isNaN(s)?this.getVisibleSlidesCount():s,this.visibleSlides=this.childVisibleSlides,this.computeProgressMetrics(),this.progressPercent=Math.min(100,(this.currentSlideIndex+this.visibleSlides)/Math.max(1,this.totalSlidesCount)*100)}onMouseEnter(){try{this.brandsCarousel?.pause?.()}catch{}}onMouseLeave(){try{this.brandsCarousel?.play?.()}catch{}}onFocus(){this.isFocused=!0}onBlur(){this.isFocused=!1}startTicker(){this.stopTicker(),this.tickerItems&&!(this.tickerItems.length<=1)&&(0,o.UE)(this.platformId)&&(this.tickerTimer=setInterval(()=>{this.tickerIndex=(this.tickerIndex+1)%this.tickerItems.length},2500))}stopTicker(){this.tickerTimer&&(clearInterval(this.tickerTimer),this.tickerTimer=null)}ngOnDestroy(){this.destroyed$.next(),this.destroyed$.complete(),this.stopTicker()}extractIndexFromEvent(t){if(null==t)return null;if("number"==typeof t)return t;if("object"==typeof t){if(null!=t.currentSlide)return t.currentSlide;if(null!=t.slickCurrentSlide)return t.slickCurrentSlide;if(t.detail&&"object"==typeof t.detail&&null!=t.detail.currentSlide)return t.detail.currentSlide}return null}extractNextIndexFromEvent(t){if(null==t)return null;if(Array.isArray(t)&&t.length>=4)return t[3];if("object"==typeof t){if(null!=t.nextSlide)return t.nextSlide;if(null!=t.slickNext)return t.slickNext;if(t.detail&&"object"==typeof t.detail&&null!=t.detail.nextSlide)return t.detail.nextSlide}return null}getVisibleSlidesCount(){const t=(0,o.UE)(this.platformId)?window.innerWidth:1024;return t>1024?4:t>600?3:t>480?2:1}removeFromWishlist(t){"remove"===t.mode&&this.moveToWishListModal.open("remove",t)}onSearchInput(){const t=this.searchField.trim();t.length<2?this.filteredBrands=[]:this.getBrands(t)}getBrands(t){this.brandService.searchBrands({page:1,limit:5,filters:{and:[["brand_translations.name","ILIKE",`%${t}%`]]}}).subscribe(r=>{this.filteredBrands=r.records})}selectBrand(t){t&&(this.filteredBrands=[],this.searchField="",t.is_premium?this.languageNavService.navigate(["brand",t.slug]):this.languageNavService.navigate(["products"],{queryParams:{brands:t.slug}}))}trackByBrand(t,s){return s.slug}static{this.\u0275fac=function(s){return new(s||n)(e.rXU(S.Ix),e.rXU(e.gRc))}}static{this.\u0275cmp=e.VBU({type:n,selectors:[["app-brands-page"]],viewQuery:function(s,r){if(1&s&&(e.GBs(Ce,5),e.GBs(ve,5)),2&s){let c;e.mGM(c=e.lsd())&&(r.brandsCarousel=c.first),e.mGM(c=e.lsd())&&(r.moveToWishListModal=c.first)}},decls:32,vars:35,consts:[["noBannerData",""],["heroLoading",""],["brandsCarousel",""],["brandSearch",""],["loading",""],["noData",""],[4,"ngIf","ngIfElse"],[1,"container","2xl:max-w-[1440px]","mx-auto","px-3","sm:px-4","py-4","relative"],[3,"init","beforeChange","afterChange","mouseenter","mouseleave","brandClick","visibleSlidesChange","brandsProducts","progressPercent","isLoading"],[1,"container","mx-auto","2xl:max-w-[1440px]","px-4","sm:pt-6","pt-6"],[1,"relative","flex","border","rounded-xl","overflow-hidden",3,"ngClass"],[1,"flex-1","relative"],["type","text",1,"nav-search","w-full","sm:p-3","p-3","sm:h-auto","h-[46px]","!text-base","focus:outline-none","focus:ring-none","focus:ring-[transparent]",3,"focus","blur","ngModelChange","input","ngModel","placeholder"],["class","absolute top-1/2 -translate-y-1/2 flex items-center gap-2 cursor-text",3,"left-4","right-4","click",4,"ngIf"],["class","absolute top-1/2 -translate-y-1/2 cursor-pointer",3,"right-3","left-3","click",4,"ngIf"],[1,"bg-sgm-primary-base","inline-flex","items-center","justify-center","p-1","cursor-pointer","w-[50px]","sm:h-[44px]","h-[42px]","mt-[2px]"],["xmlns","http://www.w3.org/2000/svg","width","22","height","22","viewBox","0 0 22 22","fill","none"],["d","M15.2103 13.6361C16.2996 12.1495 16.7874 10.3063 16.5763 8.47538C16.3652 6.64443 15.4706 4.96073 14.0715 3.76112C12.6725 2.56151 10.8721 1.93446 9.03069 2.00543C7.18923 2.07639 5.44246 2.84013 4.13986 4.14386C2.83725 5.44758 2.07486 7.19514 2.00523 9.0369C1.93559 10.8787 2.56384 12.6788 3.76428 14.0772C4.96472 15.4756 6.64882 16.3691 8.47966 16.579C10.3105 16.7888 12.1531 16.2995 13.6387 15.209H13.6376C13.6706 15.254 13.7073 15.2972 13.7478 15.3384L18.0789 19.6701C18.2898 19.8812 18.576 19.9999 18.8744 20C19.1728 20.0001 19.4591 19.8816 19.6702 19.6707C19.8812 19.4597 19.9999 19.1735 20 18.8751C20.0001 18.5766 19.8817 18.2903 19.6707 18.0792L15.3396 13.7475C15.2994 13.7068 15.2562 13.6703 15.2103 13.6361ZM15.5005 9.31117C15.5005 10.1238 15.3405 10.9285 15.0295 11.6793C14.7186 12.43 14.2628 13.1122 13.6883 13.6868C13.1138 14.2615 12.4317 14.7173 11.681 15.0283C10.9303
115.3392 10.1258 15.4993 9.31324 15.4993C8.50071 15.4993 7.69615 15.3392 6.94547 15.0283C6.1948 14.7173 5.51272 14.2615 4.93818 13.6868C4.36364 13.1122 3.90788 12.43 3.59695 11.6793C3.28601 10.9285 3.12597 10.1238 3.12597 9.31117C3.12597 7.66997 3.77784 6.096 4.93818 4.9355C6.09851 3.77499 7.67227 3.12303 9.31324 3.12303C10.9542 3.12303 12.528 3.77499 13.6883 4.9355C14.8486 6.096 15.5005 7.66997 15.5005 9.31117Z","fill","white"],[4,"ngIf"],[3,"generalSeoDetails"],[3,"brand","brandsBanners"],[1,"container","xl:max-w-[1440px]","mx-auto","sm:px-4"],[1,"lg:pt-6","lg:pb-3","sm:px-0","px-4"],[1,"rounded-xl","overflow-hidden","bg-white"],[1,"h-[160px]","sm:h-[260px]","bg-gray-200","animate-pulse","rounded-xl"],[1,"sm:px-0","px-4","mt-4"],[1,"flex","gap-4","overflow-hidden"],["class","min-w-[90px] sm:min-w-[110px]",4,"ngFor","ngForOf"],[1,"sm:rounded-xl","sm:py-4","py-4","my-8","sm:border","bg-white","shadow-sm","sm:px-4","px-4"],[1,"flex","items-center","justify-between","sm:mb-4","mb-2"],[1,"h-8","w-48","rounded","bg-gray-200","animate-pulse"],[1,"h-5","w-24","rounded","bg-gray-200","animate-pulse"],[1,"grid","justify-items-center","gap-2","sm:gap-4","grid-cols-2","sm:grid-cols-2","md:grid-cols-3","xl:grid-cols-5"],["class","w-full",4,"ngFor","ngForOf"],[1,"h-8","w-40","rounded","bg-gray-200","animate-pulse"],[1,"min-w-[90px]","sm:min-w-[110px]"],[1,"mx-auto","w-[72px]","h-[72px]","sm:w-[96px]","sm:h-[96px]","rounded-full","bg-gray-200","animate-pulse"],[1,"mt-3","h-4","w-20","mx-auto","rounded","bg-gray-200","animate-pulse"],[1,"w-full"],[3,"isSkeleton"],[1,"lg:my-10","my-6"],[1,"container","2xl:!max-w-[1440px]","mx-auto","sm:px-4","!w-full"],[1,"hero-skeleton-wrapper"],[1,"skeleton","skeleton-image","w-full","h-[542px]","rounded-lg"],[1,"absolute","top-1/2","-translate-y-1/2","flex","items-center","gap-2","cursor-text",3,"click"],[1,"opacity-70","sm:text-base","text-xs"],[1,"overflow-hidden","h-[20px]","relative"],[1,"transition-transform","duration-500","ease-in-out"],["class","flex items-center gap-x-1 sm:text-base text-xs font-medium h-[20px]",4,"ngFor","ngForOf"],[1,"flex","items-center","gap-x-1","sm:text-base","text-xs","font-medium","h-[20px]"],["class","w-[20px] h-[20px]","alt","","loading","lazy","decoding","async",3,"src",4,"ngIf"],["alt","","loading","lazy","decoding","async",1,"w-[20px]","h-[20px]",3,"src"],[1,"absolute","top-1/2","-translate-y-1/2","cursor-pointer",3,"click"],["xmlns","http://www.w3.org/2000/svg","width","18","height","18","viewBox","0 0 18 18","fill","none"],["width","18","height","18","rx","9","fill","#C9C9C9"],["d","M12.9135 13.3643C12.711 13.5668 12.4363 13.6806 12.1499 13.6806C11.8635 13.6806 11.5888 13.5668 11.3862 13.3643L9.00034 10.6373L6.61444 13.3634C6.51445 13.4651 6.39534 13.5459 6.26396 13.6012C6.13258 13.6566 5.99154 13.6854 5.84897 13.686C5.7064 13.6866 5.56513 13.6589 5.43331 13.6046C5.30148 13.5503 5.18171 13.4705 5.0809 13.3697C4.98009 13.2689 4.90023 13.1491 4.84594 13.0173C4.79165 12.8854 4.764 12.7442 4.76458 12.6016C4.76516 12.459 4.79396 12.318 4.84932 12.1866C4.90469 12.0552 4.98551 11.9361 5.08714 11.8361L7.56934 9.00112L5.08624 6.16432C4.98461 6.06434 4.90379 5.94522 4.84842 5.81384C4.79306 5.68246 4.76426 5.54142 4.76368 5.39885C4.7631 5.25628 4.79075 5.11501 4.84504 4.98319C4.89933 4.85136 4.97919 4.73159 5.08 4.63078C5.18081 4.52997 5.30058 4.45011 5.43241 4.39582C5.56423 4.34153 5.7055 4.31388 5.84807 4.31446C5.99064 4.31504 6.13168 4.34384 6.26306 4.39921C6.39444 4.45457 6.51355 4.53539 6.61354 4.63702L9.00034 7.36492L11.3862 4.63702C11.4862 4.53539 11.6053 4.45457 11.7367 4.39921C11.8681 4.34384 12.0091 4.31504 12.1517 4.3
11446C12.2943 4.31388 12.4355 4.34153 12.5674 4.39582C12.6992 4.45011 12.819 4.52997 12.9198 4.63078C13.0206 4.73159 13.1004 4.85136 13.1547 4.98319C13.209 5.11501 13.2367 5.25628 13.2361 5.39885C13.2355 5.54142 13.2067 5.68246 13.1514 5.81384C13.096 5.94522 13.0152 6.06434 12.9135 6.16432L10.4313 9.00112L12.9135 11.8361C13.014 11.9364 13.0936 12.0555 13.148 12.1866C13.2023 12.3178 13.2303 12.4583 13.2303 12.6002C13.2303 12.7422 13.2023 12.8827 13.148 13.0138C13.0936 13.1449 13.014 13.264 12.9135 13.3643Z","fill","white"],["class","px-4 py-2 hover:bg-gray-100 cursor-pointer",3,"click",4,"ngFor","ngForOf"],[1,"px-4","py-2","hover:bg-gray-100","cursor-pointer",3,"click"],[4,"ngFor","ngForOf"],[3,"brand"]],template:function(s,r){if(1&s){const c=e.RV6();e.DNE(0,ye,2,2,"ng-container",6),e.nI1(1,"async"),e.DNE(2,Oe,19,6,"ng-template",null,0,e.C5r)(4,Ie,4,0,"ng-template",null,1,e.C5r),e.j41(6,"div",7)(7,"app-brands-carousel",8,2),e.bIt("init",function(p){return e.eBV(c),e.Njj(r.onInit(p))})("beforeChange",function(p){return e.eBV(c),e.Njj(r.onBeforeChange(p))})("afterChange",function(p){return e.eBV(c),e.Njj(r.onAfterChange(p))})("mouseenter",function(){return e.eBV(c),e.Njj(r.onMouseEnter())})("mouseleave",function(){return e.eBV(c),e.Njj(r.onMouseLeave())})("brandClick",function(p){return e.eBV(c),e.Njj(r.brandDetailpage(p))})("visibleSlidesChange",function(p){return e.eBV(c),e.Njj(r.onVisibleSlidesChange(p))}),e.k0s()(),e.j41(9,"div",9)(10,"div",10)(11,"div",11)(12,"input",12,3),e.nI1(14,"translate"),e.bIt("focus",function(){return e.eBV(c),e.Njj(r.onFocus())})("blur",function(){return e.eBV(c),e.Njj(r.onBlur())}),e.mxI("ngModelChange",function(p){return e.eBV(c),e.DH7(r.searchField,p)||(r.searchField=p),e.Njj(p)}),e.bIt("input",function(){return e.eBV(c),e.Njj(r.onSearchInput())}),e.k0s(),e.DNE(15,Ee,7,10,"div",13)(16,Le,4,4,"span",14),e.k0s(),e.j41(17,"div",15),e.qSk(),e.j41(18,"svg",16),e.nrm(19,"path",17),e.k0s()()(),e.DNE(20,je,2,1,"div",18),e.k0s(),e.DNE(21,Ne,2,2,"ng-container",6),e.nI1(22,"async"),e.DNE(23,He,4,0,"ng-template",null,4,e.C5r)(25,Ve,4,0,"ng-template",null,5,e.C5r),e.joV(),e.nrm(27,"app-general-seo-settings",19),e.DNE(28,Fe,2,0)(29,Ye,4,0),e.nv$(30,28,xe,null,29),e.qhs(0,-1)}if(2&s){const c=e.sdS(5),_=e.sdS(13),p=e.sdS(24);e.Y8G("ngIf",e.bMT(1,26,r.brandsPremium$))("ngIfElse",c),e.R7$(7),e.Y8G("brandsProducts",r.brandsProducts)("progressPercent",r.progressPercent)("isLoading",r.isLoading),e.R7$(3),e.Y8G("ngClass",e.l_i(32,Pe,!r.isFocused,r.isFocused)),e.R7$(2),e.R50("ngModel",r.searchField),e.Y8G("placeholder",r.isFocused?e.bMT(14,28,"WHAT_YOU_LOOKING"):""),e.R7$(3),e.Y8G("ngIf",!_.value&&!r.isFocused),e.R7$(),e.Y8G("ngIf",_.value),e.R7$(),e.AVh("mr-0","ar"===r.languageService.currentLanguage)("ml-[2px]","ar"===r.languageService.currentLanguage)("mr-[2px]","ar"!==r.languageService.currentLanguage)("ml-0","ar"!==r.languageService.currentLanguage)("rounded-[0_10px_10px_0]","ar"!==r.languageService.currentLanguage)("rounded-[10px_0_0_10px]","ar"===r.languageService.currentLanguage),e.R7$(3),e.Y8G("ngIf",(null==r.filteredBrands?null:r.filteredBrands.length)>0),e.R7$(),e.Y8G("ngIf",e.bMT(22,30,r.brandsPremium$))("ngIfElse",p),e.R7$(6),e.Y8G("generalSeoDetails",r.generalSeoDetails)}},dependencies:[o.MD,o.YU,o.Sq,o.bT,o.Jj,o.P9,b.h,b.D9,O.YN,O.me,O.BC,O.vS,_e,U,u.y,$.q,be.a],styles:[".brands-carousel-wrapper[_ngcontent-%COMP%]{position:relative}.brands-carousel-wrapper[_ngcontent-%COMP%] .brands-carousel[_ngcontent-%COMP%] .slick-list{overflow:visible}.brands-carousel-wrapper[_ngcontent-%COMP%] .slick-list::-webkit-scrollbar{height:12px}.brands-carousel-wrapper[_ngcontent-%COMP%] .slick-list::-webkit-scrollbar-track{background:#0000000a;border-radius:9999px}.brands-carousel-wrapper[_ngcontent-%COMP%] .slick-list::-webkit-scrollbar-thumb{background:linear-gradient(90deg,#06b6d4,#2563eb);border-radius:9999px}.carousel-arrow[_ngcontent-%COMP%]{width:48px;height:48px;background:#fff;display:inline-flex;align-items:center;justify-content:center;border-radius:9999px;box-shadow:0 4px 8px #00000014;cursor:pointer;z-index:40}@media (max-width: 1034px){.carousel-arrow[_ngcontent-%COMP%]{display:none}}"]})}}return n})()},{path:":slug",loadComponent:()=>Promise.all([d.e(7456),d.e(6888)]).then(d.bind(d,6888)).then(n=>n.BrandsProfileComponent),title:"Brands Profile"}]}}]);
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.