@letscooee/web-sdk 14.10.3 → 14.10.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{debugger.component-D-xAXaDD-BEru75hO.js → debugger.component-ByuR7lKZ-CX1QroL5.js} +1 -1
- package/dist/main.min.js +11 -11
- package/dist/{share-dialog.component-CTzGzCQA-DQWKRVcQ.js → share-dialog.component-fH5Qs4Fn-DmD413M2.js} +2 -2
- package/dist/{video-detail-dialog.component-mEZSD0E_-DFSLgpj0.js → video-detail-dialog.component-BZkituF3-Bf8usjgM.js} +4 -4
- package/dist/{widgets-Cbu5gFrQ-Cdd1nKZZ.js → widgets-Bd2Nyb3V-Bs8LJfyO.js} +4 -4
- package/package.json +1 -1
- /package/dist/{renderer-CiZAnI0a-CJM3zCWA.js → renderer-C12tE1_m-CJM3zCWA.js} +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import './main.min.js';
|
|
2
|
-
import { h as g, W, G as Ge, K as Ke, g as gf, y as ye, i as nc, b as Sv, r as rc, L as Lf, j as bf } from './widgets-
|
|
3
|
-
import { l, f } from './video-detail-dialog.component-
|
|
2
|
+
import { h as g, W, G as Ge, K as Ke, g as gf, y as ye, i as nc, b as Sv, r as rc, L as Lf, j as bf } from './widgets-Bd2Nyb3V-Bs8LJfyO.js';
|
|
3
|
+
import { l, f } from './video-detail-dialog.component-BZkituF3-Bf8usjgM.js';
|
|
4
4
|
|
|
5
5
|
var _=class d{dialogRef=g(W);eventData=g(Ge);triggerData=g(Ke)().triggerData;onShareAndClose(p,o){p.stopPropagation();let{url:t,text:a}=l(this.triggerData,this.eventData.video,o!==`Clipboard`);switch(o){case `Whatsapp`:window.open(`https://wa.me/?text=${a}%20${t}`,`_blank`,`noopener,noreferrer`);break;case `X(Twitter)`:window.open(`https://x.com/intent/post?text=${a}&url=${t}`,`_blank`,`noopener,noreferrer`);break;case `Clipboard`:navigator.clipboard.writeText(t).catch(()=>{let e=document.createElement(`textarea`);e.value=t,document.body.appendChild(e),e.select(),document.execCommand(`copy`),document.body.removeChild(e);});break;}o&&f(this.triggerData,this.eventData.video,this.eventData.index,o),this.dialogRef.close();}static ɵfac=function(o){return new(o||d)};static ɵcmp=gf({type:d,selectors:[[`cooee-share-dialog`]],decls:19,vars:0,consts:[[1,`share-dialog`],[1,`share-dialog-header`],[`type`,`button`,`aria-label`,`Close`,1,`close-button`,3,`click`],[`name`,`close`,`aria-hidden`,`true`],[1,`share-options`],[`type`,`button`,`aria-label`,`Share on WhatsApp`,1,`share-option`,3,`click`],[`name`,`whatsapp`,`aria-hidden`,`true`],[`type`,`button`,`aria-label`,`Share on X`,1,`share-option`,3,`click`],[`name`,`x-twitter`,`aria-hidden`,`true`],[`type`,`button`,`aria-label`,`Copy link`,1,`share-option`,3,`click`],[`name`,`copy`,`aria-hidden`,`true`]],template:function(o,t){o&1&&(nc(0,`div`,0)(1,`div`,1)(2,`h3`),Sv(3,`Share`),rc(),nc(4,`button`,2),Lf(`click`,function(e){return t.onShareAndClose(e)}),bf(5,`cooee-icon`,3),rc()(),nc(6,`div`,4)(7,`button`,5),Lf(`click`,function(e){return t.onShareAndClose(e,`Whatsapp`)}),bf(8,`cooee-icon`,6),nc(9,`span`),Sv(10,`Whatsapp`),rc()(),nc(11,`button`,7),Lf(`click`,function(e){return t.onShareAndClose(e,`X(Twitter)`)}),bf(12,`cooee-icon`,8),nc(13,`span`),Sv(14,`X`),rc()(),nc(15,`button`,9),Lf(`click`,function(e){return t.onShareAndClose(e,`Clipboard`)}),bf(16,`cooee-icon`,10),nc(17,`span`),Sv(18,`Copy link`),rc()()()());},dependencies:[ye],styles:[`@keyframes _ngcontent-%COMP%_slideInScale{0%{opacity:0;transform:scale(.9) translateY(8px)}to{opacity:1;transform:scale(1) translateY(0)}}.share-dialog[_ngcontent-%COMP%]{background:#fff;border-radius:12px;padding:20px;min-width:280px;box-shadow:0 8px 32px #00000026;color:#333;animation:_ngcontent-%COMP%_slideInScale .25s ease-out}.share-dialog-header[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center;margin-bottom:20px}.share-dialog-header[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{font-family:var(--lc-heading-family),serif;margin:0;font-size:18px;font-weight:600}.share-options[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:12px;font-family:var(--lc-text-family),serif}.share-option[_ngcontent-%COMP%]{display:flex;align-items:center;gap:12px;padding:12px 16px;background:#0002;border:1px solid #e9ecef;border-radius:8px;color:#333;font-size:16px;font-weight:500;cursor:pointer;transition:all .2s ease}.share-option[_ngcontent-%COMP%]:hover{background:#0004;border-color:#dee2e6;transform:translateY(-1px)}.share-option[_ngcontent-%COMP%]:active{transform:translateY(0)}.share-option[_ngcontent-%COMP%] cooee-icon[_ngcontent-%COMP%]{width:24px;height:24px}.share-option[_ngcontent-%COMP%] cooee-icon[name=whatsapp][_ngcontent-%COMP%]{color:#25d366}.share-option[_ngcontent-%COMP%] cooee-icon[name=x-twitter][_ngcontent-%COMP%], .share-option[_ngcontent-%COMP%] cooee-icon[name=copy][_ngcontent-%COMP%]{color:#000}.share-option[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{flex:1;text-align:left}button.close-button[_ngcontent-%COMP%]{background-color:transparent;border:none}button.close-button[_ngcontent-%COMP%] cooee-icon[name=close][_ngcontent-%COMP%]{border-radius:100%;color:#000}`]})};
|
|
6
6
|
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { d as dr, V as Ve, H as He, s as se, M, t, D as Dr, l as l$1, y, a as Hi, c as ce, U, b as V } from './main.min.js';
|
|
2
|
-
import { l as jt, h as g, m as Ye, p as be, G as Ge, W, g as gf, q as Kt, z as zt, s as qt, t as KE, u as YE, w as Wt, x as $t, y as ye, i as nc, L as Lf, A as ic, V as VD, C as Ko, r as rc, E as Ef, D as tv, M as Mf, v as vd, H as HD, F as ac, J as Hf, N as $f, T as TN, R as Ro, K as Ke, O as Wt$1, j as bf, S as SN, U as Ss, Y as Yo, o as oc, Q as Qo, Z as cc, _ as Sf, a0 as WD, a1 as LD, a2 as Iu, a3 as wu, a4 as KD, a5 as PD, a6 as Af, a7 as xv, a8 as op, a9 as rp, aa as Nv, ab as Uv, ac as hm } from './widgets-
|
|
2
|
+
import { l as jt, h as g, m as Ye, p as be, G as Ge, W, g as gf, q as Kt, z as zt, s as qt, t as KE, u as YE, w as Wt, x as $t, y as ye, i as nc, L as Lf, A as ic, V as VD, C as Ko, r as rc, E as Ef, D as tv, M as Mf, v as vd, H as HD, F as ac, J as Hf, N as $f, T as TN, R as Ro, K as Ke, O as Wt$1, j as bf, S as SN, U as Ss, Y as Yo, o as oc, Q as Qo, Z as cc, _ as Sf, a0 as WD, a1 as LD, a2 as Iu, a3 as wu, a4 as KD, a5 as PD, a6 as Af, a7 as xv, a8 as op, a9 as rp, aa as Nv, ab as Uv, ac as hm } from './widgets-Bd2Nyb3V-Bs8LJfyO.js';
|
|
3
3
|
|
|
4
4
|
var f=(t,e,o,r)=>{if(!e)return;let i=new dr(`CE Video Shared`,{current:{videoID:e.id,videoIndex:o},platform:r},t);window.CooeeSDK.sendEvent(i);},l=(t,e,o=true)=>{let r=o?encodeURIComponent(m(t,e)):m(t,e),n=`Hey! Check out this video for an amazing product -`;return {url:r,text:o?encodeURIComponent(n):n}},m=(t,e)=>{return Ve(He(window.location.href,t),e)};
|
|
5
5
|
|
|
6
|
-
var S=class n{video=SN.required();progress=jt(0);constructor(){Ss(t=>{let e=this.video(),o=()=>{this.progress.set(e.currentTime/e.duration*100);};e.addEventListener(`timeupdate`,o),t(()=>{e.removeEventListener(`timeupdate`,o);});});}static ɵfac=function(e){return new(e||n)};static ɵcmp=gf({type:n,selectors:[[`cooee-video-progress-bar`]],inputs:{video:[1,`video`]},decls:3,vars:3,consts:[[1,`video-untracked-path`],[`role`,`progressbar`,1,`video-tracked-path`]],template:function(e,o){e&1&&(Yo(0,`div`,0)(1,`div`,1),oc(2,`div`),Qo()()),e&2&&(vd(),cc(`width`,o.progress(),`%`),Sf(`aria-valuenow`,o.progress()));},styles:[`[_nghost-%COMP%]{display:block;width:100%;position:absolute;z-index:10;top:4px;padding-inline:8px;box-sizing:border-box}.video-untracked-path[_ngcontent-%COMP%], .video-tracked-path[_ngcontent-%COMP%]{height:4px;border-radius:var(--lc-video-progress-bar-radius)}.video-untracked-path[_ngcontent-%COMP%]{background-color:rgba(var(--lc-video-progress-bar-bg-color));width:100%;margin-bottom:2px}.video-tracked-path[_ngcontent-%COMP%]{background-color:rgba(var(--lc-video-progress-bar-color));transition:width .5s ease-in-out}@media(prefers-reduced-motion:reduce){.video-tracked-path[_ngcontent-%COMP%]{transition:none}}`]})};var P=class n{dialogState=TN();dialog=g(Ro);triggerData=g(Ke)().triggerData;eventData=g(Ge);containerRef=g(Wt$1);async share(t){t.stopPropagation(),t.preventDefault(),M()&&V()?await this.shareNative():await this.shareWithDialog();}async shareNative(){let t=l(this.triggerData,this.eventData.video,false);await navigator.share(t),f(this.triggerData,this.eventData.video,this.eventData.index,`Native`);}async shareWithDialog(){let t=await import('./share-dialog.component-CTzGzCQA-DQWKRVcQ.js');this.dialogState.emit(true),this.dialog.open(t.ShareDialogComponent,{viewContainerRef:this.containerRef}).closed.subscribe(()=>this.dialogState.emit(false));}static ɵfac=function(e){return new(e||n)};static ɵcmp=gf({type:n,selectors:[[`cooee-share-button`]],outputs:{dialogState:`dialogState`},decls:2,vars:0,consts:[[`type`,`button`,`aria-label`,`Share video`,3,`click`],[`name`,`share`]],template:function(e,o){e&1&&(nc(0,`button`,0),Lf(`click`,function(r){return o.share(r)}),bf(1,`cooee-icon`,1),rc());},dependencies:[ye],styles:[`button[_ngcontent-%COMP%]{width:var(--lc-icon-button-size, 44px);height:var(--lc-icon-button-size, 44px);display:flex;justify-content:center;align-items:center;border:none;border-radius:100%;background:#00000080;background:color-mix(in oklab,#000 50%,transparent)}button[_ngcontent-%COMP%] cooee-icon[name=share][_ngcontent-%COMP%]{color:#fff}`]})};var Te=[`swiperComp`],Ie=[`videoEl`],Se=(n,t)=>t.video.id,Pe=(n,t)=>t.url;function ke(n,t){n&1&&(nc(0,`div`,11),bf(1,`div`,15),rc());}function Me(n,t){if(n&1&&bf(0,`source`,13),n&2){let e=t.$implicit;Mf(`type`,xv(e.mimeType))(`src`,e.url);}}function Oe(n,t){n&1&&Af(0);}function Ne(n,t){if(n&1){let e=WD();nc(0,`cooee-video-promoted-items`,24),Lf(`cardClick`,function(i){Iu(e);let r=KD(2).$implicit;return wu(KD().productCardClicked(i,r.video))})(`atcSuccess`,function(){Iu(e);return wu(KD(3).onAtcSuccess())}),rc();}if(n&2){let e=KD(2).$implicit;Mf(`items`,e.video.items)(`video`,e.video);}}function Fe(n,t){if(n&1&&bf(0,`cooee-video-card`,23),n&2){let e=KD(2).$implicit;Mf(`card`,e.video.card);}}function ze(n,t){if(n&1){let e=WD();bf(0,`cooee-video-progress-bar`,16),nc(1,`div`,17)(2,`cooee-mute-toggle`,18),op(`mutedChange`,function(i){Iu(e);let r=KD(2);return Nv(r.muted,i)||(r.muted=i),wu(i)}),Lf(`toggled`,function(){Iu(e);return wu(KD(2).muteToggled())}),rc(),Ef(3,Oe,1,0,`ng-container`,8),rc(),nc(4,`div`,19)(5,`cooee-share-button`,20),Lf(`dialogState`,function(i){Iu(e);return wu(KD(2).shareDialogOpen.set(i))}),rc()(),nc(6,`div`,21),LD(7,Ne,1,2,`cooee-video-promoted-items`,22)(8,Fe,1,1,`cooee-video-card`,23),rc();}if(n&2){let e=KD().$implicit,o=tv(5),i=KD(),r=tv(9);Mf(`video`,o),vd(2),rp(`muted`,i.muted),Mf(`videoEl`,o),vd(),Mf(`ngTemplateOutlet`,r),vd(4),PD(e.video.items.length&&i.videoConfig.showItems()?7:e.video.card&&i.videoConfig.footerContent===i.VideoConfigFooterContent.CARD?8:-1);}}function Le(n,t){if(n&1){let e=WD();nc(0,`cooee-item-detail`,25),Lf(`closeClick`,function(){Iu(e);return wu(KD(2).productModalClosed())})(`atcSuccess`,function(){Iu(e);return wu(KD(2).onAtcSuccess())}),rc();}if(n&2){let e=KD(2);Mf(`item`,e.selectedItem)(`video`,e.selectedVideo)(`similarItems`,e.selectedVideo.items)(`template`,e.videoConfig.itemDetailConfig.template);}}function Ae(n,t){if(n&1){let e=WD();nc(0,`div`,6)(1,`div`,9)(2,`div`,10),LD(3,ke,2,0,`div`,11),nc(4,`video`,12,2),Lf(`click`,function(){let i=Iu(e).$index,r=KD();return wu(r.currentIndex===i&&r.toggleMute())})(`ended`,function(){Iu(e);let i=tv(5);return wu(KD().onVideoEnded(i))})(`loadstart`,function(){let i=Iu(e).$index;return wu(KD().onVideoLoadStart(i))})(`canplay`,function(){let i=Iu(e).$index;return wu(KD().onVideoCanPlay(i))}),VD(6,Me,1,3,`source`,13,Pe),rc(),LD(8,ze,9,5),rc(),LD(9,Le,1,4,`cooee-item-detail`,14),rc()();}if(n&2){let e=t.$implicit,o=t.$index,i=KD();vd(2),cc(`background-image`,e.video.thumbnail?`url(`+e.video.thumbnail+`)`:null),vd(),PD(i.shouldShowVideoSpinner(o)?3:-1),vd(),Mf(`ngClass`,i.viewTemplateClassName)(`muted`,true),Sf(`preload`,i.isVideoVisible(o)?`metadata`:`none`)(`data-video-id`,e.video.id)(`autoplay`,null),vd(2),HD(e.video.sources),vd(2),PD(i.currentIndex===o?8:-1),vd(),PD(i.selectedItem&&i.currentIndex===o?9:-1);}}function Re(n,t){n&1&&Af(0);}function Be(n,t){if(n&1){let e=WD();nc(0,`button`,26),Lf(`click`,function(){Iu(e);return wu(KD().close())}),bf(1,`cooee-icon`,27),rc();}}var Ee=class n{swiperComponent;videoElements;VideoConfigFooterContent=se;currentIndex=0;muted=jt(false);selectedItem=null;selectedVideo;detailPopupTemplate;viewTemplateClassName=`lc-video-only-view`;shareDialogOpen=jt(false);data=g(Ye);elementRef=g(be);eventData=g(Ge);dialogRef=g(W);swiperInitialized=jt(false);swiperOptions=jt(null);videoEntries=[];videoConfig;triggerContext;engagementTrigger;isMobile=M();navigationConfig;cssLoadedPromise;resizeDebouncer=new t(this.onResize.bind(this));videoLoadingStates=new Map;constructor(){this.videoEntries=this.data.videoEntries,this.currentIndex=this.data.currentIndex,this.selectedItem=this.data.selectedItem??null,this.selectedVideo=this.videoEntries[this.currentIndex]?.video,this.triggerContext=this.data.triggerContext,this.engagementTrigger=this.triggerContext.triggerData,this.videoConfig=this.engagementTrigger?.content?.videoConfig??new Dr,this.navigationConfig=new l$1({enabled:true,size:50,color:new y({h:`#000000`})}),this.cssLoadedPromise=Hi(this.elementRef.nativeElement.shadowRoot);}onKeyDown(t){t.preventDefault(),t.stopPropagation(),this.close();}async ngOnInit(){switch(this.muted.set(await ce.get(`muted`,false)),this.videoConfig.detailPopup.template){case `PRODUCT_DETAIL_VIEW`:this.selectItemForDetailView(),this.viewTemplateClassName=`lc-product-detail-view`;break;case `VIDEO_ONLY_VIEW`:this.viewTemplateClassName=`lc-video-only-view`;break}}ngAfterViewInit(){this.initializeSwiperWithVideoDimensions();}ngOnDestroy(){this.resizeDebouncer?.destroy();}initializeSwiperWithVideoDimensions(){this.applyOptimalVideoDimensions(),this.initSwiperOptions(),this.playActiveVideo(false);}close(){let t=this.getCurrentVideoElement();this.dialogRef.close({lastVideo:this.videoEntries[this.currentIndex].video,lastVideoIndex:this.currentIndex,lastVideoDuration:t?.currentTime});}getCurrentVideoElement(){return this.videoElements.get(this.currentIndex)?.nativeElement}moveToNextVideo(){this.swiperComponent.swiper.slideTo(this.currentIndex+1);}productModalClosed(){this.selectedItem=null;}onAtcSuccess(){this.videoConfig.detailPopup.closeDialogOnAtc&&this.close();}pauseAll(){this.videoElements.forEach(t=>t.nativeElement.pause());}toggleMute(){this.muted.update(t=>!t);}async muteToggled(){await ce.set(`muted`,this.muted());let e=[this.muted()?`CE Video Muted`:`CE Video Unmuted`,{current:this.currentVideoProps()},{triggerData:this.engagementTrigger}];window.CooeeSDK.events.push(e);}playActiveVideo(t=true){t&&this.pauseAll();let e=this.getCurrentVideoElement();e&&this.playVideo(e);}playVideo(t){t.currentTime=0,t.play().catch(e=>U.error(e));}onVideoEnded(t){if(this.currentIndex<this.videoEntries.length-1)this.selectedItem||this.shareDialogOpen()?this.playVideo(t):this.moveToNextVideo();else {let o=[`CE Last Video Ended`,{previous:this.getPreviousVideoDataForEvent()},{triggerData:this.engagementTrigger}];window.CooeeSDK.events.push(o),this.playVideo(t);}}onSlideChange(t){let e=this.getPreviousVideoDataForEvent();this.currentIndex=t.realIndex,this.selectedVideo=this.videoEntries[this.currentIndex].video,this.eventData.video=this.selectedVideo,this.eventData.index=this.currentIndex,this.playActiveVideo(),this.isProductDetailView()?this.selectItemForDetailView():this.selectedItem=null;let r=new dr(`CE Video Changed`,{previous:e,current:this.currentVideoProps()},this.engagementTrigger);r.setVideos(this.videoEntries[this.currentIndex].video),window.CooeeSDK.sendEvent(r);}productCardClicked(t,e){let i=new dr(`CE More Item Info Clicked`,{current:{videoID:e.id,videoIndex:this.currentIndex}},this.engagementTrigger);i.setVideos(e),window.CooeeSDK.sendEvent(i),this.selectedItem=t;}onVideoLoadStart(t){this.videoLoadingStates.set(t,true);}onVideoCanPlay(t){this.videoLoadingStates.set(t,false);}shouldShowVideoSpinner(t){return this.swiperInitialized()?this.videoLoadingStates.get(t)===true&&this.isVideoVisible(t):this.isVideoVisible(t)}isVideoVisible(t){let e=this.currentIndex-1,o=this.currentIndex+1;return t===this.currentIndex||t===e||t===o}async initSwiperOptions(){await this.cssLoadedPromise;let t=this.isMobile?1:`auto`,e=0;this.isProductDetailView()&&(t=`auto`,e=10),this.swiperOptions.set({direction:this.isMobile?`vertical`:`horizontal`,effect:this.isMobile?`slide`:`coverflow`,slidesPerView:t,initialSlide:this.currentIndex,centeredSlides:true,spaceBetween:e,coverflowEffect:{rotate:0,stretch:0,depth:400,modifier:1,slideShadows:false},on:{init:o=>{this.swiperInitialized.set(true),setTimeout(()=>{o.update();},100);}},mousewheel:{enabled:!this.isMobile,invert:false,thresholdDelta:20}});}isProductDetailView(){return this.videoConfig.detailPopup.template===`PRODUCT_DETAIL_VIEW`}currentVideoProps(){return {videoID:this.videoEntries[this.currentIndex].video.id,videoIndex:this.currentIndex}}getPreviousVideoDataForEvent(){let t=this.currentVideoProps(),e=this.videoElements.find(i=>i.nativeElement.dataset.videoId===this.videoEntries[this.currentIndex].video.id)?.nativeElement;t.playedTillMS=Math.ceil(e?.currentTime*1e3);let o=e?.duration*1e3;return t.playedTillPercent=+(t.playedTillMS/o).toFixed(4),t}selectItemForDetailView(){this.selectedItem=this.isMobile?null:this.selectedVideo?.items?.[0]??null;}applyOptimalVideoDimensions(){if(this.isMobile||this.isProductDetailView())return;let t=this.calculateOptimalVideoDimensions();t&&this.setVideoContainerDimensions(t.width,t.height);}calculateOptimalVideoDimensions(){let t=this.videoEntries.map(g=>g.video.sources?.[0]).filter(g=>g?.width&&g?.height).map(g=>({width:g.width,height:g.height,aspectRatio:g.width/g.height}));if(t.length===0)return null;let e=t[0],o=window.innerWidth*.9,i=window.innerHeight*.9,r=o/e.width,k=i/e.height,R=Math.min(r,k);return {width:Math.floor(e.width*R),height:Math.floor(e.height*R)}}setVideoContainerDimensions(t,e){let o=this.elementRef.nativeElement;o.style.setProperty(`--video-container-width`,`${t}px`),o.style.setProperty(`--video-container-height`,`${e}px`);}onResize(){this.applyOptimalVideoDimensions();}static ɵfac=function(e){return new(e||n)};static ɵcmp=gf({type:n,selectors:[[`cooee-video-detail-dialog`]],viewQuery:function(e,o){if(e&1&&ac(Te,7)(Ie,5),e&2){let i;Hf(i=$f())&&(o.swiperComponent=i.first),Hf(i=$f())&&(o.videoElements=i);}},hostAttrs:[1,`letscooee-widget`],hostBindings:function(e,o){e&1&&Lf(`keydown.escape`,function(r){return o.onKeyDown(r)},hm);},decls:10,vars:4,consts:[[`swiperComp`,``],[`closeButtonTemplate`,``],[`videoEl`,``],[1,`lc-shadow-inner`,3,`ngClass`],[1,`video-swiper`,3,`slideChange`,`options`,`navigationConfig`],[`ngProjectAs`,`swiper-slides`,5,[`swiper-slides`]],[1,`swiper-slide`,`video-slide`],[1,`lc-desktop-controls`],[4,`ngTemplateOutlet`],[1,`lc-video-modal-row`],[1,`lc-video-container`],[1,`video-loading-overlay`],[`playsinline`,``,1,`lc-video-el`,3,`click`,`ended`,`loadstart`,`canplay`,`ngClass`,`muted`],[3,`src`,`type`],[1,`swiper-no-swiping`,`swiper-no-mousewheel`,3,`item`,`video`,`similarItems`,`template`],[1,`loading-spinner`],[3,`video`],[1,`lc-video-controls`],[3,`mutedChange`,`toggled`,`muted`,`videoEl`],[1,`share-controls`],[3,`dialogState`],[1,`lc-card-container`],[3,`items`,`video`],[3,`card`],[3,`cardClick`,`atcSuccess`,`items`,`video`],[1,`swiper-no-swiping`,`swiper-no-mousewheel`,3,`closeClick`,`atcSuccess`,`item`,`video`,`similarItems`,`template`],[`type`,`button`,`aria-label`,`Close`,1,`lc-close-button`,3,`click`],[`name`,`close`,`aria-hidden`,`true`]],template:function(e,o){if(e&1&&(nc(0,`div`,3)(1,`cooee-swiper`,4,0),Lf(`slideChange`,function(r){return o.onSlideChange(r)}),ic(3,5),VD(4,Ae,10,10,`div`,6,Se),Ko(),rc(),nc(6,`div`,7),Ef(7,Re,1,0,`ng-container`,8),rc()(),Ef(8,Be,2,0,`ng-template`,null,1,Uv)),e&2){let i=tv(9);Mf(`ngClass`,o.viewTemplateClassName),vd(),Mf(`options`,o.swiperOptions())(`navigationConfig`,o.navigationConfig),vd(3),HD(o.videoEntries),vd(3),Mf(`ngTemplateOutlet`,i);}},dependencies:[Kt,zt,qt,P,S,KE,YE,Wt,$t,ye],styles:[`:host{display:flex}.lc-shadow-inner{position:relative;width:100vw;height:100vh;display:flex}@media(min-width:768px){.lc-shadow-inner{background-color:color-mix(in oklab,#000 70%,transparent);justify-content:center;align-items:center}}.video-swiper{--swiper-navigation-size: 50px;--swiper-navigation-color: white;width:100dvw;height:100dvh}.lc-product-detail-view .video-swiper{align-items:center}@media(min-width:768px){.video-swiper{width:100%;height:100%;max-width:90vw;max-height:90vh}}.video-swiper>.swiper-wrapper{max-height:100%;pointer-events:none}.lc-product-detail-view .video-swiper>.swiper-wrapper{align-items:center}@media(max-width:768px){.video-swiper>.swiper-button-prev{display:none!important}}@media(max-width:768px){.video-swiper>.swiper-button-next{display:var(--lc-next-video-button-display)!important;width:var(--lc-icon-button-size, 44px);height:var(--lc-icon-button-size, 44px);display:flex;justify-content:center;align-items:center;border:none;border-radius:100%;background:#00000080;background:color-mix(in oklab,#000 50%,transparent);color:#fff;inset:auto auto 12px 50%;transform:translate(-50%) rotate(90deg)}.video-swiper>.swiper-button-next:after{color:#fff;font-weight:900}}.video-swiper:has(cooee-item-detail)>.swiper-button-next{display:none!important}.video-slide{position:relative;display:flex;align-items:center;visibility:hidden;pointer-events:auto}.lc-product-detail-view .video-slide{width:40vw!important;height:70vh!important}@media(min-width:768px){.lc-product-detail-view .video-slide{min-width:650px!important}}@media(max-width:768px){.lc-product-detail-view .video-slide{width:100%!important;height:100%!important}}@media(min-width:768px){.lc-video-only-view .video-slide{width:fit-content!important}}@media(min-width:768px){.video-slide{border-radius:var(--lc-media-radius);overflow:hidden}}.video-slide.swiper-slide-active,.video-slide.swiper-slide-prev,.video-slide.swiper-slide-next{visibility:visible}video{width:100%;height:100%;object-fit:cover;position:relative;z-index:3}.lc-desktop-controls{position:absolute;top:2rem;right:4rem;z-index:10;display:flex;gap:.5rem}@media(max-width:768px){.lc-desktop-controls{display:none}}.lc-video-controls{position:absolute;top:1rem;z-index:10;right:.5rem;display:flex;gap:.25rem}@media(min-width:768px){.lc-video-controls .lc-close-button{display:none}}.share-controls{position:absolute;bottom:30%;right:.5rem;z-index:10;display:flex;gap:.25rem;flex-direction:column;justify-content:center;align-items:center}.lc-close-button{width:var(--lc-icon-button-size, 44px);height:var(--lc-icon-button-size, 44px);display:flex;justify-content:center;align-items:center;border:none;border-radius:100%;background:#00000080;background:color-mix(in oklab,#000 50%,transparent)}.lc-video-container{position:relative;height:100%;width:100%;background:#000000b3 no-repeat center;background-size:cover}@media(min-width:768px){.lc-product-detail-view .lc-video-container{width:50%}}@media(min-width:768px){.lc-video-only-view .lc-video-container{width:var(--video-container-width, 100%);height:var(--video-container-height, 100%)}}.lc-card-container{position:absolute;bottom:12px;z-index:10;width:100%;padding-inline:12px;box-sizing:border-box}.lc-product-detail-view .lc-card-container{display:none}@media(max-width:768px){.lc-product-detail-view .lc-card-container{display:block}}.lc-product-detail-view .lc-video-modal-row{display:flex;justify-content:center;height:100%;width:100%}.lc-video-only-view .lc-video-modal-row{display:block;height:100%}.lc-product-detail-view cooee-item-detail{--header-display: none;width:50%;flex:1}@media(max-width:768px){.lc-product-detail-view cooee-item-detail{--header-display: flex;width:100%;height:70dvh;position:absolute;bottom:0;z-index:2147483646}}.lc-video-only-view cooee-item-detail{width:100%;height:70dvh;z-index:2147483646;bottom:0;position:absolute;border-radius:var(--lc-card-radius) var(--lc-card-radius) 0 0}@keyframes spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.video-loading-overlay{position:absolute;top:0;left:0;width:100%;height:100%;display:flex;align-items:center;justify-content:center;background-color:#0000004d;z-index:2}.video-loading-overlay .loading-spinner{width:30px;height:30px;border:3px solid rgba(255,255,255,.3);border-top:3px solid #fff;border-radius:50%;animation:spin 1s linear infinite}
|
|
6
|
+
var S=class n{video=SN.required();progress=jt(0);constructor(){Ss(t=>{let e=this.video(),o=()=>{this.progress.set(e.currentTime/e.duration*100);};e.addEventListener(`timeupdate`,o),t(()=>{e.removeEventListener(`timeupdate`,o);});});}static ɵfac=function(e){return new(e||n)};static ɵcmp=gf({type:n,selectors:[[`cooee-video-progress-bar`]],inputs:{video:[1,`video`]},decls:3,vars:3,consts:[[1,`video-untracked-path`],[`role`,`progressbar`,1,`video-tracked-path`]],template:function(e,o){e&1&&(Yo(0,`div`,0)(1,`div`,1),oc(2,`div`),Qo()()),e&2&&(vd(),cc(`width`,o.progress(),`%`),Sf(`aria-valuenow`,o.progress()));},styles:[`[_nghost-%COMP%]{display:block;width:100%;position:absolute;z-index:10;top:4px;padding-inline:8px;box-sizing:border-box}.video-untracked-path[_ngcontent-%COMP%], .video-tracked-path[_ngcontent-%COMP%]{height:4px;border-radius:var(--lc-video-progress-bar-radius)}.video-untracked-path[_ngcontent-%COMP%]{background-color:rgba(var(--lc-video-progress-bar-bg-color));width:100%;margin-bottom:2px}.video-tracked-path[_ngcontent-%COMP%]{background-color:rgba(var(--lc-video-progress-bar-color));transition:width .5s ease-in-out}@media(prefers-reduced-motion:reduce){.video-tracked-path[_ngcontent-%COMP%]{transition:none}}`]})};var P=class n{dialogState=TN();dialog=g(Ro);triggerData=g(Ke)().triggerData;eventData=g(Ge);containerRef=g(Wt$1);async share(t){t.stopPropagation(),t.preventDefault(),M()&&V()?await this.shareNative():await this.shareWithDialog();}async shareNative(){let t=l(this.triggerData,this.eventData.video,false);await navigator.share(t),f(this.triggerData,this.eventData.video,this.eventData.index,`Native`);}async shareWithDialog(){let t=await import('./share-dialog.component-fH5Qs4Fn-DmD413M2.js');this.dialogState.emit(true),this.dialog.open(t.ShareDialogComponent,{viewContainerRef:this.containerRef}).closed.subscribe(()=>this.dialogState.emit(false));}static ɵfac=function(e){return new(e||n)};static ɵcmp=gf({type:n,selectors:[[`cooee-share-button`]],outputs:{dialogState:`dialogState`},decls:2,vars:0,consts:[[`type`,`button`,`aria-label`,`Share video`,3,`click`],[`name`,`share`]],template:function(e,o){e&1&&(nc(0,`button`,0),Lf(`click`,function(r){return o.share(r)}),bf(1,`cooee-icon`,1),rc());},dependencies:[ye],styles:[`button[_ngcontent-%COMP%]{width:var(--lc-icon-button-size, 44px);height:var(--lc-icon-button-size, 44px);display:flex;justify-content:center;align-items:center;border:none;border-radius:100%;background:#00000080;background:color-mix(in oklab,#000 50%,transparent)}button[_ngcontent-%COMP%] cooee-icon[name=share][_ngcontent-%COMP%]{color:#fff}`]})};var Te=[`swiperComp`],Ie=[`videoEl`],Se=(n,t)=>t.video.id,Pe=(n,t)=>t.url;function ke(n,t){n&1&&(nc(0,`div`,11),bf(1,`div`,15),rc());}function Me(n,t){if(n&1&&bf(0,`source`,13),n&2){let e=t.$implicit;Mf(`type`,xv(e.mimeType))(`src`,e.url);}}function Oe(n,t){n&1&&Af(0);}function Ne(n,t){if(n&1){let e=WD();nc(0,`cooee-video-promoted-items`,24),Lf(`cardClick`,function(i){Iu(e);let r=KD(2).$implicit;return wu(KD().productCardClicked(i,r.video))})(`atcSuccess`,function(){Iu(e);return wu(KD(3).onAtcSuccess())}),rc();}if(n&2){let e=KD(2).$implicit;Mf(`items`,e.video.items)(`video`,e.video);}}function Fe(n,t){if(n&1&&bf(0,`cooee-video-card`,23),n&2){let e=KD(2).$implicit;Mf(`card`,e.video.card);}}function ze(n,t){if(n&1){let e=WD();bf(0,`cooee-video-progress-bar`,16),nc(1,`div`,17)(2,`cooee-mute-toggle`,18),op(`mutedChange`,function(i){Iu(e);let r=KD(2);return Nv(r.muted,i)||(r.muted=i),wu(i)}),Lf(`toggled`,function(){Iu(e);return wu(KD(2).muteToggled())}),rc(),Ef(3,Oe,1,0,`ng-container`,8),rc(),nc(4,`div`,19)(5,`cooee-share-button`,20),Lf(`dialogState`,function(i){Iu(e);return wu(KD(2).shareDialogOpen.set(i))}),rc()(),nc(6,`div`,21),LD(7,Ne,1,2,`cooee-video-promoted-items`,22)(8,Fe,1,1,`cooee-video-card`,23),rc();}if(n&2){let e=KD().$implicit,o=tv(5),i=KD(),r=tv(9);Mf(`video`,o),vd(2),rp(`muted`,i.muted),Mf(`videoEl`,o),vd(),Mf(`ngTemplateOutlet`,r),vd(4),PD(e.video.items.length&&i.videoConfig.showItems()?7:e.video.card&&i.videoConfig.footerContent===i.VideoConfigFooterContent.CARD?8:-1);}}function Le(n,t){if(n&1){let e=WD();nc(0,`cooee-item-detail`,25),Lf(`closeClick`,function(){Iu(e);return wu(KD(2).productModalClosed())})(`atcSuccess`,function(){Iu(e);return wu(KD(2).onAtcSuccess())}),rc();}if(n&2){let e=KD(2);Mf(`item`,e.selectedItem)(`video`,e.selectedVideo)(`similarItems`,e.selectedVideo.items)(`template`,e.videoConfig.itemDetailConfig.template);}}function Ae(n,t){if(n&1){let e=WD();nc(0,`div`,6)(1,`div`,9)(2,`div`,10),LD(3,ke,2,0,`div`,11),nc(4,`video`,12,2),Lf(`click`,function(){let i=Iu(e).$index,r=KD();return wu(r.currentIndex===i&&r.toggleMute())})(`ended`,function(){Iu(e);let i=tv(5);return wu(KD().onVideoEnded(i))})(`loadstart`,function(){let i=Iu(e).$index;return wu(KD().onVideoLoadStart(i))})(`canplay`,function(){let i=Iu(e).$index;return wu(KD().onVideoCanPlay(i))}),VD(6,Me,1,3,`source`,13,Pe),rc(),LD(8,ze,9,5),rc(),LD(9,Le,1,4,`cooee-item-detail`,14),rc()();}if(n&2){let e=t.$implicit,o=t.$index,i=KD();vd(2),cc(`background-image`,e.video.thumbnail?`url(`+e.video.thumbnail+`)`:null),vd(),PD(i.shouldShowVideoSpinner(o)?3:-1),vd(),Mf(`ngClass`,i.viewTemplateClassName)(`muted`,true),Sf(`preload`,i.isVideoVisible(o)?`metadata`:`none`)(`data-video-id`,e.video.id)(`autoplay`,null),vd(2),HD(e.video.sources),vd(2),PD(i.currentIndex===o?8:-1),vd(),PD(i.selectedItem&&i.currentIndex===o?9:-1);}}function Re(n,t){n&1&&Af(0);}function Be(n,t){if(n&1){let e=WD();nc(0,`button`,26),Lf(`click`,function(){Iu(e);return wu(KD().close())}),bf(1,`cooee-icon`,27),rc();}}var Ee=class n{swiperComponent;videoElements;VideoConfigFooterContent=se;currentIndex=0;muted=jt(false);selectedItem=null;selectedVideo;detailPopupTemplate;viewTemplateClassName=`lc-video-only-view`;shareDialogOpen=jt(false);data=g(Ye);elementRef=g(be);eventData=g(Ge);dialogRef=g(W);swiperInitialized=jt(false);swiperOptions=jt(null);videoEntries=[];videoConfig;triggerContext;engagementTrigger;isMobile=M();navigationConfig;cssLoadedPromise;resizeDebouncer=new t(this.onResize.bind(this));videoLoadingStates=new Map;constructor(){this.videoEntries=this.data.videoEntries,this.currentIndex=this.data.currentIndex,this.selectedItem=this.data.selectedItem??null,this.selectedVideo=this.videoEntries[this.currentIndex]?.video,this.triggerContext=this.data.triggerContext,this.engagementTrigger=this.triggerContext.triggerData,this.videoConfig=this.engagementTrigger?.content?.videoConfig??new Dr,this.navigationConfig=new l$1({enabled:true,size:50,color:new y({h:`#000000`})}),this.cssLoadedPromise=Hi(this.elementRef.nativeElement.shadowRoot);}onKeyDown(t){t.preventDefault(),t.stopPropagation(),this.close();}async ngOnInit(){switch(this.muted.set(await ce.get(`muted`,false)),this.videoConfig.detailPopup.template){case `PRODUCT_DETAIL_VIEW`:this.selectItemForDetailView(),this.viewTemplateClassName=`lc-product-detail-view`;break;case `VIDEO_ONLY_VIEW`:this.viewTemplateClassName=`lc-video-only-view`;break}}ngAfterViewInit(){this.initializeSwiperWithVideoDimensions();}ngOnDestroy(){this.resizeDebouncer?.destroy();}initializeSwiperWithVideoDimensions(){this.applyOptimalVideoDimensions(),this.initSwiperOptions(),this.playActiveVideo(false);}close(){let t=this.getCurrentVideoElement();this.dialogRef.close({lastVideo:this.videoEntries[this.currentIndex].video,lastVideoIndex:this.currentIndex,lastVideoDuration:t?.currentTime});}getCurrentVideoElement(){return this.videoElements.get(this.currentIndex)?.nativeElement}moveToNextVideo(){this.swiperComponent.swiper.slideTo(this.currentIndex+1);}productModalClosed(){this.selectedItem=null;}onAtcSuccess(){this.videoConfig.detailPopup.closeDialogOnAtc&&this.close();}pauseAll(){this.videoElements.forEach(t=>t.nativeElement.pause());}toggleMute(){this.muted.update(t=>!t);}async muteToggled(){await ce.set(`muted`,this.muted());let e=[this.muted()?`CE Video Muted`:`CE Video Unmuted`,{current:this.currentVideoProps()},{triggerData:this.engagementTrigger}];window.CooeeSDK.events.push(e);}playActiveVideo(t=true){t&&this.pauseAll();let e=this.getCurrentVideoElement();e&&this.playVideo(e);}playVideo(t){t.currentTime=0,t.play().catch(e=>U.error(e));}onVideoEnded(t){if(this.currentIndex<this.videoEntries.length-1)this.selectedItem||this.shareDialogOpen()?this.playVideo(t):this.moveToNextVideo();else {let o=[`CE Last Video Ended`,{previous:this.getPreviousVideoDataForEvent()},{triggerData:this.engagementTrigger}];window.CooeeSDK.events.push(o),this.playVideo(t);}}onSlideChange(t){let e=this.getPreviousVideoDataForEvent();this.currentIndex=t.realIndex,this.selectedVideo=this.videoEntries[this.currentIndex].video,this.eventData.video=this.selectedVideo,this.eventData.index=this.currentIndex,this.playActiveVideo(),this.isProductDetailView()?this.selectItemForDetailView():this.selectedItem=null;let r=new dr(`CE Video Changed`,{previous:e,current:this.currentVideoProps()},this.engagementTrigger);r.setVideos(this.videoEntries[this.currentIndex].video),window.CooeeSDK.sendEvent(r);}productCardClicked(t,e){let i=new dr(`CE More Item Info Clicked`,{current:{videoID:e.id,videoIndex:this.currentIndex}},this.engagementTrigger);i.setVideos(e),window.CooeeSDK.sendEvent(i),this.selectedItem=t;}onVideoLoadStart(t){this.videoLoadingStates.set(t,true);}onVideoCanPlay(t){this.videoLoadingStates.set(t,false);}shouldShowVideoSpinner(t){return this.swiperInitialized()?this.videoLoadingStates.get(t)===true&&this.isVideoVisible(t):this.isVideoVisible(t)}isVideoVisible(t){let e=this.currentIndex-1,o=this.currentIndex+1;return t===this.currentIndex||t===e||t===o}async initSwiperOptions(){await this.cssLoadedPromise;let t=this.isMobile?1:`auto`,e=0;this.isProductDetailView()&&(t=`auto`,e=10),this.swiperOptions.set({direction:this.isMobile?`vertical`:`horizontal`,effect:this.isMobile?`slide`:`coverflow`,slidesPerView:t,initialSlide:this.currentIndex,centeredSlides:true,spaceBetween:e,coverflowEffect:{rotate:0,stretch:0,depth:400,modifier:1,slideShadows:false},on:{init:o=>{this.swiperInitialized.set(true),setTimeout(()=>{o.update();},100);}},mousewheel:{enabled:!this.isMobile,invert:false,thresholdDelta:20}});}isProductDetailView(){return this.videoConfig.detailPopup.template===`PRODUCT_DETAIL_VIEW`}currentVideoProps(){return {videoID:this.videoEntries[this.currentIndex].video.id,videoIndex:this.currentIndex}}getPreviousVideoDataForEvent(){let t=this.currentVideoProps(),e=this.videoElements.find(i=>i.nativeElement.dataset.videoId===this.videoEntries[this.currentIndex].video.id)?.nativeElement;t.playedTillMS=Math.ceil(e?.currentTime*1e3);let o=e?.duration*1e3;return t.playedTillPercent=+(t.playedTillMS/o).toFixed(4),t}selectItemForDetailView(){this.selectedItem=this.isMobile?null:this.selectedVideo?.items?.[0]??null;}applyOptimalVideoDimensions(){if(this.isMobile||this.isProductDetailView())return;let t=this.calculateOptimalVideoDimensions();t&&this.setVideoContainerDimensions(t.width,t.height);}calculateOptimalVideoDimensions(){let t=this.videoEntries.map(g=>g.video.sources?.[0]).filter(g=>g?.width&&g?.height).map(g=>({width:g.width,height:g.height,aspectRatio:g.width/g.height}));if(t.length===0)return null;let e=t[0],o=window.innerWidth*.9,i=window.innerHeight*.9,r=o/e.width,k=i/e.height,R=Math.min(r,k);return {width:Math.floor(e.width*R),height:Math.floor(e.height*R)}}setVideoContainerDimensions(t,e){let o=this.elementRef.nativeElement;o.style.setProperty(`--video-container-width`,`${t}px`),o.style.setProperty(`--video-container-height`,`${e}px`);}onResize(){this.applyOptimalVideoDimensions();}static ɵfac=function(e){return new(e||n)};static ɵcmp=gf({type:n,selectors:[[`cooee-video-detail-dialog`]],viewQuery:function(e,o){if(e&1&&ac(Te,7)(Ie,5),e&2){let i;Hf(i=$f())&&(o.swiperComponent=i.first),Hf(i=$f())&&(o.videoElements=i);}},hostAttrs:[1,`letscooee-widget`],hostBindings:function(e,o){e&1&&Lf(`keydown.escape`,function(r){return o.onKeyDown(r)},hm);},decls:10,vars:4,consts:[[`swiperComp`,``],[`closeButtonTemplate`,``],[`videoEl`,``],[1,`lc-shadow-inner`,3,`ngClass`],[1,`video-swiper`,3,`slideChange`,`options`,`navigationConfig`],[`ngProjectAs`,`swiper-slides`,5,[`swiper-slides`]],[1,`swiper-slide`,`video-slide`],[1,`lc-desktop-controls`],[4,`ngTemplateOutlet`],[1,`lc-video-modal-row`],[1,`lc-video-container`],[1,`video-loading-overlay`],[`playsinline`,``,1,`lc-video-el`,3,`click`,`ended`,`loadstart`,`canplay`,`ngClass`,`muted`],[3,`src`,`type`],[1,`swiper-no-swiping`,`swiper-no-mousewheel`,3,`item`,`video`,`similarItems`,`template`],[1,`loading-spinner`],[3,`video`],[1,`lc-video-controls`],[3,`mutedChange`,`toggled`,`muted`,`videoEl`],[1,`share-controls`],[3,`dialogState`],[1,`lc-card-container`],[3,`items`,`video`],[3,`card`],[3,`cardClick`,`atcSuccess`,`items`,`video`],[1,`swiper-no-swiping`,`swiper-no-mousewheel`,3,`closeClick`,`atcSuccess`,`item`,`video`,`similarItems`,`template`],[`type`,`button`,`aria-label`,`Close`,1,`lc-close-button`,3,`click`],[`name`,`close`,`aria-hidden`,`true`]],template:function(e,o){if(e&1&&(nc(0,`div`,3)(1,`cooee-swiper`,4,0),Lf(`slideChange`,function(r){return o.onSlideChange(r)}),ic(3,5),VD(4,Ae,10,10,`div`,6,Se),Ko(),rc(),nc(6,`div`,7),Ef(7,Re,1,0,`ng-container`,8),rc()(),Ef(8,Be,2,0,`ng-template`,null,1,Uv)),e&2){let i=tv(9);Mf(`ngClass`,o.viewTemplateClassName),vd(),Mf(`options`,o.swiperOptions())(`navigationConfig`,o.navigationConfig),vd(3),HD(o.videoEntries),vd(3),Mf(`ngTemplateOutlet`,i);}},dependencies:[Kt,zt,qt,P,S,KE,YE,Wt,$t,ye],styles:[`:host{display:flex}.lc-shadow-inner{position:relative;width:100vw;height:100vh;display:flex}@media(min-width:768px){.lc-shadow-inner{background-color:color-mix(in oklab,#000 70%,transparent);justify-content:center;align-items:center}}.video-swiper{--swiper-navigation-size: 50px;--swiper-navigation-color: white;width:100dvw;height:100dvh}.lc-product-detail-view .video-swiper{align-items:center}@media(min-width:768px){.video-swiper{width:100%;height:100%;max-width:90vw;max-height:90vh}}.video-swiper>.swiper-wrapper{max-height:100%;pointer-events:none}.lc-product-detail-view .video-swiper>.swiper-wrapper{align-items:center}@media(max-width:768px){.video-swiper>.swiper-button-prev{display:none!important}}@media(max-width:768px){.video-swiper>.swiper-button-next{display:var(--lc-next-video-button-display)!important;width:var(--lc-icon-button-size, 44px);height:var(--lc-icon-button-size, 44px);display:flex;justify-content:center;align-items:center;border:none;border-radius:100%;background:#00000080;background:color-mix(in oklab,#000 50%,transparent);color:#fff;inset:auto auto 12px 50%;transform:translate(-50%) rotate(90deg)}.video-swiper>.swiper-button-next:after{color:#fff;font-weight:900}}.video-swiper:has(cooee-item-detail)>.swiper-button-next{display:none!important}.video-slide{position:relative;display:flex;align-items:center;visibility:hidden;pointer-events:auto}.lc-product-detail-view .video-slide{width:40vw!important;height:70vh!important}@media(min-width:768px){.lc-product-detail-view .video-slide{min-width:650px!important}}@media(max-width:768px){.lc-product-detail-view .video-slide{width:100%!important;height:100%!important}}@media(min-width:768px){.lc-video-only-view .video-slide{width:fit-content!important}}@media(min-width:768px){.video-slide{border-radius:var(--lc-media-radius);overflow:hidden}}.video-slide.swiper-slide-active,.video-slide.swiper-slide-prev,.video-slide.swiper-slide-next{visibility:visible}video{width:100%;height:100%;object-fit:cover;position:relative;z-index:3}.lc-desktop-controls{position:absolute;top:2rem;right:4rem;z-index:10;display:flex;gap:.5rem}@media(max-width:768px){.lc-desktop-controls{display:none}}.lc-video-controls{position:absolute;top:1rem;z-index:10;right:.5rem;display:flex;gap:.25rem}@media(min-width:768px){.lc-video-controls .lc-close-button{display:none}}.share-controls{position:absolute;bottom:30%;right:.5rem;z-index:10;display:flex;gap:.25rem;flex-direction:column;justify-content:center;align-items:center}.lc-close-button{width:var(--lc-icon-button-size, 44px);height:var(--lc-icon-button-size, 44px);display:flex;justify-content:center;align-items:center;border:none;border-radius:100%;background:#00000080;background:color-mix(in oklab,#000 50%,transparent)}.lc-video-container{position:relative;height:100%;width:100%;background:#000000b3 no-repeat center;background-size:cover}@media(min-width:768px){.lc-product-detail-view .lc-video-container{width:50%}}@media(min-width:768px){.lc-video-only-view .lc-video-container{width:var(--video-container-width, 100%);height:var(--video-container-height, 100%)}}.lc-card-container{position:absolute;bottom:12px;z-index:10;width:100%;padding-inline:12px;box-sizing:border-box}.lc-product-detail-view .lc-card-container{display:none}@media(max-width:768px){.lc-product-detail-view .lc-card-container{display:block}}.lc-product-detail-view .lc-video-modal-row{display:flex;justify-content:center;height:100%;width:100%}.lc-video-only-view .lc-video-modal-row{display:block;height:100%}.lc-product-detail-view cooee-item-detail{--header-display: none;width:50%;flex:1}@media(max-width:768px){.lc-product-detail-view cooee-item-detail{--header-display: flex;width:100%;height:70dvh;position:absolute;bottom:0;z-index:2147483646}}.lc-video-only-view cooee-item-detail{width:100%;height:70dvh;z-index:2147483646;bottom:0;position:absolute;border-radius:var(--lc-card-radius) var(--lc-card-radius) 0 0}@keyframes spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.video-loading-overlay{position:absolute;top:0;left:0;width:100%;height:100%;display:flex;align-items:center;justify-content:center;background-color:#0000004d;z-index:2}.video-loading-overlay .loading-spinner{width:30px;height:30px;border:3px solid rgba(255,255,255,.3);border-top:3px solid #fff;border-radius:50%;animation:spin 1s linear infinite}
|
|
7
7
|
`],encapsulation:3})};
|
|
8
8
|
|
|
9
|
-
var
|
|
9
|
+
var videoDetailDialog_componentBZkituF3 = /*#__PURE__*/Object.freeze({
|
|
10
10
|
__proto__: null,
|
|
11
11
|
VideoDetailDialogComponent: Ee
|
|
12
12
|
});
|
|
13
13
|
|
|
14
|
-
export { f, l,
|
|
14
|
+
export { f, l, videoDetailDialog_componentBZkituF3 as v };
|
|
@@ -32,14 +32,14 @@ var rn={schedule(n,t){let e=setTimeout(n,t);return ()=>clearTimeout(e)}};functio
|
|
|
32
32
|
`],encapsulation:3})};var Je=class n{dialog=g(Ro);dialogRef;constructor(){}showItemQuickView(t,e){this.dialogRef=this.dialog.open(Ye,{width:`100vw`,height:`100dvh`,backdropClass:[`letscooee-backdrop`],data:{item:e,triggerContext:t}});}static ɵfac=function(e){return new(e||n)};static ɵprov=C({token:n,factory:n.ɵfac,providedIn:`root`})};var Xe=(i=>(i.SINGLE_DROPDOWN=`SINGLE_DROPDOWN`,i.MULTIPLE_DROPDOWNS=`MULTIPLE_DROPDOWNS`,i.CHIPS=`CHIPS`,i))(Xe||{});var En=n=>({row:n}),yt=(n,t)=>t.id,Pn=(n,t)=>t.mID;function In(n,t){if(n&1&&(nc(0,`option`,7),Sv(1),rc()),n&2){let e=t.$implicit,i=t.$index,o=KD().$implicit,a=KD(2);Mf(`value`,i)(`selected`,a.selectedOptions()[o.name]===e.name)(`disabled`,!!e.disabled),vd(),lc(` `,e.name,` `);}}function kn(n,t){if(n&1){let e=WD();nc(0,`select`,6,0),Lf(`change`,function(){let o=Iu(e).$implicit,a=tv(1);return wu(KD(2).onDropdownChange(o,a.value))}),VD(2,In,2,4,`option`,7,BD),rc();}if(n&2){let e=t.$implicit;Mf(`name`,e.name),Sf(`aria-label`,e.name),vd(2),HD(e.optionValues);}}function Dn(n,t){if(n&1&&(nc(0,`div`,2),VD(1,kn,4,2,`select`,5,yt),rc()),n&2){let e=KD();Mf(`ngClass`,Pv(1,En,e.horizontal())),vd(),HD(e.options());}}function Mn(n,t){if(n&1&&(nc(0,`option`,7),Sv(1),rc()),n&2){let e=t.$implicit,i=KD(2);Mf(`value`,e.mID)(`selected`,i.item().selectedOrFirstVariant.value.mID===e.mID)(`disabled`,!e.isAvailable),vd(),lc(` `,e.name,` `);}}function Fn(n,t){if(n&1){let e=WD();nc(0,`div`,3)(1,`select`,8,1),Lf(`change`,function(){Iu(e);let o=tv(2);return wu(KD().onVariantChange(o.value))}),VD(3,Mn,2,4,`option`,7,Pn),rc()();}if(n&2){let e=KD();vd(),Sf(`aria-label`,`Select variant`),vd(2),HD(e.item().vars);}}function On(n,t){if(n&1&&(nc(0,`div`,11),Sv(1),nc(2,`span`,14),Sv(3),rc()()),n&2){let e=KD().$implicit,i=KD(2);vd(),lc(` `,e.name),vd(2),lc(`: `,i.selectedOptions()[e.name]);}}function An(n,t){if(n&1&&(nc(0,`span`,16),Sv(1),rc()),n&2){KD();let e=Rv(0);vd(),np(e);}}function Ln(n,t){if(n&1){let e=WD();sp(0),nc(1,`button`,15),Lf(`click`,function(){let o=Iu(e).$implicit,a=KD().$implicit;return wu(KD(2).onOptionSelect(a,o))}),LD(2,An,2,1,`span`,16),rc();}if(n&2){let e=t.$implicit,i=KD().$implicit,o=Rv(0),a=KD(2),l=e.name,p=Av(e.displayName||e.name),f=e.swatch,M=o?e.hexColor??l:``,Z=a.selectedOptions()[i.name]===l;vd(),uc(`option-value--swatch`,o)(`option-value--selected`,Z)(`option-value--disabled`,e.disabled),Mf(`title`,p)(`ngStyle`,a.getSwatchStyles(f,M)),Sf(`aria-checked`,Z)(`aria-label`,p)(`aria-disabled`,e.disabled||null),vd(),PD(o?-1:2);}}function Rn(n,t){if(n&1&&(sp(0),nc(1,`div`,10),LD(2,On,4,2,`div`,11),nc(3,`div`,12),VD(4,Ln,3,13,`button`,13,yt),rc()()),n&2){let e=t.$implicit,i=KD(2);Av(i.isColorSwatch(e)),vd(2),PD(i.hideOptionNames()?-1:2),vd(),Sf(`aria-label`,e.name),vd(),HD(e.optionValues);}}function Nn(n,t){if(n&1&&(nc(0,`div`,9),VD(1,Rn,6,3,`div`,10,yt),rc()),n&2){let e=KD();uc(`options-list--horizontal`,e.horizontal()),vd(),HD(e.options());}}var Ae=n=>n.trim().toLowerCase(),et=class n{item=SN.required();selectorType=SN();horizontal=SN(false);hideOptionNames=SN(false);variantSelected=TN();selectedOptions=Zv(()=>{let t=this.item(),e=t.vars.find(o=>o.isAvailable)??t.vars[0],i={};return t.options?.forEach(o=>{let a=e?.selectedOptions.find(l=>l.name===o.name)?.value;a&&(i[o.name]=a);}),i});availabilityIndex=Wv(()=>{let t=this.item(),e=new Map;return t?.vars?.length&&t.vars.forEach((i,o)=>{if(i.isAvailable)for(let a of i.selectedOptions){let l=Ae(a.name),p=e.get(l);p||e.set(l,p=new Map);let f=p.get(a.value);f||p.set(a.value,f=new Set),f.add(o);}}),e});options=Wv(()=>{let t=this.item();return !t.options||t.vars.length===1?[]:(t.options.forEach(e=>{e.optionValues.forEach(i=>{i.disabled=this.isOptionValueDisabledFast(e,i);});}),t.options)});matchedVariant=Wv(()=>{let t=this.item(),e=this.selectedOptions();return t.vars.find(i=>t.options.every(o=>{let a=i.selectedOptions.find(l=>l.name===o.name)?.value;return e[o.name]===a}))});constructor(){Ss(()=>{let t=this.matchedVariant();t&&(this.item().setSelectedVariant(t),this.variantSelected.emit(t));}),Ss(()=>{let t=this.item();if(!t.options)return;try{window.cooeeManipulateProduct&&window.cooeeManipulateProduct(t);}catch(a){U$1.error(a);}let e=We$3(),o=(e?.currentItem?.vID?this.item().vars.find(a=>a.mID===e.currentItem.vID):void 0)||t.vars.find(a=>a.isAvailable)||t.vars[0];o&&this.syncSelectedOptions(o);});}onPDPVariantChange(t){if(this.item()){this.item().setSelectedVariantByID(t.detail.variantID);let e=this.item().selectedOrFirstVariant.value;this.syncSelectedOptions(e);}}onOptionSelect(t,e){if(e.disabled)return;this.selectedOptions.set(s(r({},this.selectedOptions()),{[t.name]:e.name}));let i=this.matchedVariant();i&&(this.item().setSelectedVariant(i),this.notifyProductChange({product:this.item(),variant:i}));}onDropdownChange(t,e){let i=t.optionValues[Number(e)];i&&this.onOptionSelect(t,i);}isColorSwatch(t){return t.optionValues.some(e=>!!e.swatch||/#[a-f0-9]{6}\b/i.test(e.name))}getSwatchStyles(t,e){return !t&&e?{"--swatch-color":e}:t?.image?.url?{"background-image":`url("${t.image.url}")`}:t?.color?{"--swatch-color":t.color}:{}}showSingleDropdown(){return this.item().vars?.length<=1?false:!this.selectorType()||this.selectorType()===`SINGLE_DROPDOWN`}showMultipleDropdowns(){return this.item().vars?.length<=1?false:this.selectorType()===`MULTIPLE_DROPDOWNS`}showChips(){return this.item().vars?.length<=1?false:this.selectorType()===`CHIPS`}onVariantChange(t){let e=this.item().vars.find(i=>i.mID===t);e&&(this.item().setSelectedVariant(e),this.notifyProductChange({product:this.item(),variant:e}),this.variantSelected.emit(e));}notifyProductChange(t){document.dispatchEvent(new CustomEvent(`letscooee:outbound:variant-change`,{detail:t}));}syncSelectedOptions(t){let e={};t.selectedOptions.forEach(i=>{e[i.name]=i.value;}),this.selectedOptions.set(e);}getCandidateVariantsExcluding(t){let e=this.item(),i=this.availabilityIndex(),o=new Set;e.vars.forEach((l,p)=>{l.isAvailable&&o.add(p);});let a=o;for(let[l,p]of Object.entries(this.selectedOptions())){if(Ae(l)===Ae(t))continue;let f=i.get(Ae(l));if(!f)return new Set;let M=f.get(String(p));if(!M)return new Set;if(a=new Set([...a].filter(Z=>M.has(Z))),a.size===0)return a}return a}isOptionValueDisabledFast(t,e){let o=this.availabilityIndex().get(Ae(t.name));if(!o)return true;let a=e.name,l=o.get(a);if(!l||l.size===0)return true;let p=this.getCandidateVariantsExcluding(t.name);if(p.size===0)return true;for(let f of p)if(l.has(f))return false;return true}static ɵfac=function(e){return new(e||n)};static ɵcmp=gf({type:n,selectors:[[`cooee-product-variant-selector`]],hostBindings:function(e,i){e&1&&Lf(`letscooee:variant-change`,function(a){return i.onPDPVariantChange(a)},gm);},inputs:{item:[1,`item`],selectorType:[1,`selectorType`],horizontal:[1,`horizontal`],hideOptionNames:[1,`hideOptionNames`]},outputs:{variantSelected:`variantSelected`},decls:3,vars:1,consts:[[`sel`,``],[`variantSelect`,``],[1,`dropdowns-wrapper`,3,`ngClass`],[1,`dropdown-wrapper`],[1,`options-list`,3,`options-list--horizontal`],[1,`option-selector`,3,`name`],[1,`option-selector`,3,`change`,`name`],[3,`value`,`selected`,`disabled`],[1,`option-selector`,3,`change`],[1,`options-list`],[1,`option-group`],[1,`option-label`],[`role`,`radiogroup`,1,`option-values`],[`type`,`button`,`role`,`radio`,1,`option-value`,3,`option-value--swatch`,`option-value--selected`,`option-value--disabled`,`title`,`ngStyle`],[1,`option-selected-name`],[`type`,`button`,`role`,`radio`,1,`option-value`,3,`click`,`title`,`ngStyle`],[1,`option-value__label`]],template:function(e,i){e&1&&LD(0,Dn,3,3,`div`,2)(1,Fn,5,1,`div`,3)(2,Nn,3,2,`div`,4),e&2&&PD(i.showMultipleDropdowns()?0:i.showSingleDropdown()?1:i.showChips()?2:-1);},dependencies:[YE,QE],styles:[`:host{display:block}.options-list{display:flex;flex-direction:column;gap:var(--lc-spacing-sm, 8px)}.options-list--horizontal{flex-direction:row;flex-wrap:wrap;align-items:flex-start}.option-group{display:flex;flex-direction:column;gap:var(--lc-spacing-xs, 4px)}.option-label{font-family:var(--lc-text-family, inherit);font-size:var(--lc-text-size, 14px);color:rgb(var(--lc-text-color, 0 0 0));line-height:1.4}.option-selected-name{font-weight:500}.option-values{display:flex;flex-wrap:wrap;gap:var(--lc-spacing-xs, 4px)}.option-value{display:inline-flex;align-items:center;justify-content:center;padding:4px var(--lc-spacing-sm, 8px);min-width:36px;min-height:32px;border:1px solid rgb(var(--lc-text-color, 0 0 0)/.2);border-radius:var(--lc-button-radius, 4px);background:transparent;color:rgb(var(--lc-text-color, 0 0 0));font-family:var(--lc-text-family, inherit);font-size:var(--lc-text-size, 14px);line-height:1;cursor:pointer;transition:background .15s,color .15s,border-color .15s}.option-value--selected{background:rgb(var(--lc-primary-color));color:rgb(var(--lc-primary-button-color, 255 255 255));border-color:rgb(var(--lc-primary-color))}.option-value--disabled{opacity:.4;cursor:not-allowed;pointer-events:none}.option-value--disabled .option-value__label{text-decoration:line-through}.option-value--swatch{width:var(--lc-swatch-size, 28px);height:var(--lc-swatch-size, 28px);min-width:unset;min-height:unset;padding:0;border-radius:var(--lc-swatch-radius, 50%);border:2px solid transparent;outline:2px solid transparent;outline-offset:0;background-color:var(--swatch-color, transparent);background-size:cover;background-position:center;transition:outline-color .15s,outline-offset .15s}.option-value--swatch.option-value--selected{border-color:rgb(var(--lc-card-bg-color, 255 255 255));outline-color:rgb(var(--lc-primary-color));outline-offset:2px}.option-value--swatch.option-value--disabled{position:relative;overflow:hidden}.option-value--swatch.option-value--disabled:after{content:"";position:absolute;inset:0;background:linear-gradient(to bottom right,transparent calc(50% - .5px),rgba(0,0,0,.4) calc(50% - .5px) calc(50% + .5px),transparent calc(50% + .5px));border-radius:inherit}.dropdowns-wrapper,.dropdown-wrapper{display:flex;gap:8px;width:100%}.option-selector{width:100%;padding:8px 24px 8px 8px;border:1px solid black;border-radius:var(--lc-button-radius);font-size:var(--lc-text-size)}@media(min-width:768px){.option-selector:hover{border-color:rgba(var(--lc-primary-color))}}.option-selector:focus{outline:none}.option-selector{flex:0 0 130px}@media(max-width:768px){.option-selector{flex:1 1 0;min-width:0}}
|
|
33
33
|
`],encapsulation:2})};var Bn=(n,t)=>({enter:n,exit:t}),zn=(n,t)=>t.id;function Hn(n,t){if(n&1&&(nc(0,`div`,3),bf(1,`img`,10),rc()),n&2){let e,i,o=KD();vd(),Mf(`src`,((e=o.selectedVariant())==null?null:e.getOneImage())||o.currentItem.firstImageURL,pm),Sf(`alt`,((i=o.selectedVariant())==null?null:i.name)||o.currentItem.name||`Product image`);}}function jn(n,t){if(n&1&&(nc(0,`div`,13),Sv(1),rc(),nc(2,`div`,14),Sv(3),rc()),n&2){let e=KD(2);vd(),lc(` `,e.getCurrency(e.selectedVariant().price.cmp),` `),vd(2),lc(` `,e.getDiscountPercentage(e.selectedVariant().price),`% off `);}}function $n(n,t){if(n&1&&(nc(0,`div`,12),Sv(1),rc()),n&2){let e=KD(2);vd(),lc(` `,e.stickyATCConfig.leftText,` `);}}function Un(n,t){if(n&1&&(nc(0,`div`,4)(1,`div`,11),Sv(2),rc(),LD(3,jn,4,2),LD(4,$n,2,1,`div`,12),rc()),n&2){let e=KD();vd(2),lc(` `,e.getCurrency(e.selectedVariant().price.d),` `),vd(),PD(e.selectedVariant().price.cmp?3:-1),vd(),PD(e.stickyATCConfig.leftText?4:-1);}}function Qn(n,t){n&1&&Af(0);}function qn(n,t){if(n&1&&(nc(0,`div`,15),Sv(1),rc()),n&2){let e=t.$implicit,i=t.$index;KD(2);let o=Rv(9);Mf(`ngClass`,jv(2,Bn,i===o.currentIndex,i===o.previousIndex)),vd(),lc(` `,e,` `);}}function Wn(n,t){if(n&1&&(nc(0,`div`,9),VD(1,qn,2,5,`div`,15,BD),rc()),n&2){KD();let e=Rv(9);vd(),HD(e.features);}}function Zn(n,t){if(n&1&&bf(0,`cooee-product-variant-selector`,16),n&2){let e=KD(2);Mf(`item`,e.currentItem)(`horizontal`,true)(`hideOptionNames`,true)(`selectorType`,e.stickyATCConfig.variantSelectorConfig==null?null:e.stickyATCConfig.variantSelectorConfig.type);}}function Gn(n,t){if(n&1&&(nc(0,`option`,21),Sv(1),rc()),n&2){let e,i=t.$implicit,o=KD(3);Mf(`value`,i.id)(`selected`,((e=o.selectedVariant())==null||e.selectedSellingPlan==null||e.selectedSellingPlan.value==null?null:e.selectedSellingPlan.value.id)===i.id),vd(),lc(` `,i.name,` `);}}function Kn(n,t){if(n&1){let e=WD();nc(0,`div`,17)(1,`select`,19,1),Lf(`change`,function(){Iu(e);let o=tv(2);return wu(KD(2).onSubscriptionChange(o.value))}),nc(3,`option`,20),Sv(4,`Select Subscription`),rc(),VD(5,Gn,2,3,`option`,21,zn),rc()();}if(n&2){let e=KD(2);vd(5),HD(e.selectedVariant().sellingPlans);}}function Yn(n,t){if(n&1){let e=WD();nc(0,`div`,18)(1,`button`,22),Lf(`click`,function(){Iu(e);return wu(KD(2).onQuantityDecrement())}),Sv(2,`− `),rc(),nc(3,`span`,23),Sv(4),rc(),nc(5,`button`,24),Lf(`click`,function(){Iu(e);return wu(KD(2).onQuantityIncrement())}),Sv(6,`+ `),rc()();}if(n&2){let e=KD(2);vd(4),np(e.currentItem.selectedQty.value);}}function Jn(n,t){if(n&1&&(LD(0,Zn,1,4,`cooee-product-variant-selector`,16),LD(1,Kn,7,0,`div`,17),LD(2,Yn,7,1,`div`,18)),n&2){let e,i=KD();PD(i.currentItem.options.length&&i.stickyATCConfig.variantSelectorConfig!=null&&i.stickyATCConfig.variantSelectorConfig.show?0:-1),vd(),PD(!((e=i.selectedVariant())==null||e.sellingPlans==null)&&e.sellingPlans.length&&i.stickyATCConfig.showSubscriptionSelector?1:-1),vd(),PD(i.stickyATCConfig.showQuantitySelector?2:-1);}}var tt=class n extends ke{currentItem;stickyATCConfig;selectedVariant=jt$1(void 0);featureSlider=jt$1({features:[],currentIndex:0});VariantSelectorType=Xe;constructor(){super();}onVariantChange(t){this.currentItem&&(this.currentItem.setSelectedVariantByID(t.detail.variantID),this.selectedVariant.set(this.currentItem.selectedOrFirstVariant.value));}engagementTriggerReceived(t){this.stickyATCConfig=t.stickyATCConfig??{},this.currentItem=t.items[0];let e=We$3(),i=this.currentItem.vars.find(o=>o.mID===e.currentItem.vID);i&&this.currentItem.setSelectedVariantByID(i.mID),this.selectedVariant.set(this.currentItem.selectedOrFirstVariant.value),this.stickyATCConfig.leftText=this.replaceVariables(this.stickyATCConfig.leftText),this.stickyATCConfig.rightText=this.replaceVariables(this.stickyATCConfig.rightText),this.startFeatureRotation();}update(){}getCurrency(t){return Br$1(t)}getDiscountPercentage(t){return ((t.cmp-t.d)/t.cmp*100).toFixed(0)}onSubscriptionChange(t){if(!t)return;let e=this.selectedVariant()?.sellingPlans?.find(i=>i.id===t);e&&(this.selectedVariant()?.changeSellingPlan(e),this.notifyProductChange({product:this.currentItem,sellingPlan:e}));}shouldShowImage(){return !!(this.stickyATCConfig.showImage&&(this.selectedVariant()?.getOneImage()||this.currentItem.firstImageURL))}onQuantityIncrement(){this.updateQuantity(this.currentItem.selectedQty.value+1);}onQuantityDecrement(){this.updateQuantity(Math.max(1,this.currentItem.selectedQty.value-1));}updateQuantity(t){this.currentItem.selectedQuantity=t,this.notifyProductChange({product:this.currentItem,quantity:t});}addToCart(){this.engagementService.executeCTA(he$2.ADD_TO_CART,{item:this.currentItem});}notifyProductChange(t){document.dispatchEvent(new CustomEvent(`letscooee:outbound:variant-change`,{detail:t}));}startFeatureRotation(){if(!this.stickyATCConfig.rightText)return;let t=this.stickyATCConfig.rightText.split(`
|
|
34
34
|
`),e=t.length===1?null:setInterval(()=>{this.featureSlider.update(i=>s(r({},i),{previousIndex:i.currentIndex,currentIndex:(i.currentIndex+1)%i.features.length}));},3e3);this.featureSlider.set({intervalRef:e,currentIndex:0,features:t});}replaceVariables(t){return t?Fe$2(t,this.currentItem.getTemplateVariables(),this.triggerContext):``}static ɵfac=function(e){return new(e||n)};static ɵcmp=gf({type:n,selectors:[[`cooee-sticky-atc`]],hostBindings:function(e,i){e&1&&Lf(`letscooee:variant-change`,function(a){return i.onVariantChange(a)},gm);},features:[up(Gt()),Ya],decls:13,vars:6,consts:[[`selectorsTemplate`,``],[`subscriptionSelect`,``],[1,`lc-wrapper`],[1,`image-wrapper`],[1,`lc-prices`],[4,`ngTemplateOutlet`],[1,`lc-button-wrapper`],[`type`,`button`,1,`lc-button`,`lc-button-atc`,3,`click`],[1,`atc-sale-price`],[1,`lc-features`],[`loading`,`lazy`,3,`src`],[1,`lc-sale-price`],[1,`lc-additional-text`],[1,`lc-compare-price`],[1,`lc-discount-label`],[1,`lc-feature`,3,`ngClass`],[3,`item`,`horizontal`,`hideOptionNames`,`selectorType`],[1,`subscription-selector-wrapper`],[1,`quantity-selector`],[`aria-label`,`Subscription`,1,`subscription-selector`,3,`change`],[`value`,``],[3,`value`,`selected`],[`type`,`button`,`aria-label`,`Decrease quantity`,1,`qty-btn`,3,`click`],[1,`qty-value`],[`type`,`button`,`aria-label`,`Increase quantity`,1,`qty-btn`,3,`click`]],template:function(e,i){if(e&1&&(nc(0,`div`,2),LD(1,Hn,2,2,`div`,3),LD(2,Un,5,3,`div`,4),Ef(3,Qn,1,0,`ng-container`,5),nc(4,`div`,6)(5,`button`,7),Lf(`click`,function(){return i.addToCart()}),Sv(6,` Add To Cart `),nc(7,`span`,8),Sv(8),rc()(),sp(9),LD(10,Wn,3,0,`div`,9),rc()(),Ef(11,Jn,3,3,`ng-template`,null,0,Uv)),e&2){let o=tv(12);vd(),PD(i.shouldShowImage()?1:-1),vd(),PD(i.selectedVariant()&&i.stickyATCConfig.showProductInfo?2:-1),vd(),Mf(`ngTemplateOutlet`,o),vd(5),lc(` `,i.getCurrency(i.selectedVariant().price.d*i.currentItem.selectedQty.value),` `),vd();let a=Av(i.featureSlider());vd(),PD(a.features.length?10:-1);}},dependencies:[YE,KE,et],styles:[`:host{display:flex;justify-content:center;padding:10px;background-color:#fff;width:100%;box-shadow:4px 0 10px #0006;line-height:normal}.lc-wrapper{display:flex;justify-content:space-between;align-items:center;gap:8px;max-width:1100px;width:100%;margin:0 auto}.lc-prices{flex:1 1 100%;display:flex;flex-wrap:wrap;align-items:center;gap:6px}@media(min-width:768px){.lc-prices{gap:8px}}.lc-sale-price{font-size:24px;font-weight:600}.lc-compare-price{font-size:18px;font-weight:600;color:red;text-decoration:line-through}.lc-discount-label{font-size:12px;font-weight:500;color:green}.lc-button-wrapper{flex:1 1 100%;display:flex;flex-direction:column;gap:4px;align-items:center}.lc-button{background-color:rgba(var(--lc-primary-button-bg-color));color:rgba(var(--lc-primary-button-color));font-weight:var(--lc-primary-button-weight);text-transform:var(--lc-primary-button-transform);border-radius:var(--lc-button-radius);font-size:var(--lc-button-size);font-family:var(--lc-button-family),serif;height:var(--lc-button-height);letter-spacing:var(--lc-button-letter-spacing);transition:filter .12s ease,background-color .2s ease,color .2s ease;border-width:1px;border-style:solid;border-color:rgba(var(--lc-primary-button-border-color));display:flex;align-items:center;justify-content:center;gap:8px}.lc-button cooee-icon,.lc-button>svg,.lc-button>img{width:var(--lc-button-icon-size);height:var(--lc-button-icon-size);color:inherit}.lc-button:hover{filter:brightness(.95)}.lc-button:active{filter:brightness(.9)}.lc-button:focus-visible{outline:2px solid rgba(var(--lc-primary-color, 0, 0, 0));outline-offset:2px}.lc-button{min-width:150px;width:100%;padding:8px}.lc-button .atc-sale-price{display:none}.lc-additional-text,.lc-feature{font-size:12px;color:#666}.lc-features{position:relative;overflow:hidden;height:16px;text-align:center;width:100%}.lc-features .lc-feature{position:absolute;width:100%;opacity:0;transform:translateY(100%);transition:transform .5s ease,opacity .5s ease}.lc-features .lc-feature.enter{opacity:1;transform:translateY(0);z-index:2}.lc-features .lc-feature.exit{opacity:0;transform:translateY(-100%);z-index:1}.image-wrapper{display:flex;align-items:center;justify-content:center;flex:0 0 auto;width:70px;height:70px;border-radius:4px}.image-wrapper img{width:100%;height:100%;object-fit:cover;border-radius:4px}.selectors-wrapper{display:flex;gap:8px;flex:1 1 100%;min-width:0}cooee-product-variant-selector{flex:0 1 auto}@media(max-width:768px){cooee-product-variant-selector{flex:1 1 0}}.subscription-selector-wrapper{flex:0 0 130px;display:flex}@media(max-width:768px){.subscription-selector-wrapper{flex:1 1 auto;min-width:0}}.subscription-selector-wrapper .subscription-selector{width:100%;padding:8px 24px 8px 8px;border:1px solid black;border-radius:var(--lc-button-radius);font-size:var(--lc-text-size)}@media(min-width:768px){.subscription-selector-wrapper .subscription-selector:hover{border-color:rgba(var(--lc-primary-color))}}.subscription-selector-wrapper .subscription-selector:focus{outline:none}.quantity-selector{flex:0 0 auto;display:flex;align-items:stretch;border:1px solid black;border-radius:var(--lc-button-radius)}.quantity-selector .qty-btn{display:flex;align-items:center;justify-content:center;flex:0 0 28px;border:none;cursor:pointer;font-size:18px;font-weight:600;padding:4px;border-radius:var(--lc-button-radius)}.quantity-selector .qty-btn:active{background-color:#f0f0f0}@media(min-width:768px){.quantity-selector .qty-btn:hover{background-color:#f5f5f5}}.quantity-selector .qty-value{display:flex;place-content:center;justify-content:center;flex:0 0 28px;padding:8px 0;text-align:center;font-size:14px;font-weight:500}@media(max-width:768px){.lc-wrapper{flex-wrap:wrap;align-items:start}.lc-prices,.lc-button-wrapper{flex-basis:auto;flex-grow:1}cooee-product-variant-selector{order:1;flex-basis:100%}.quantity-selector{order:4}.lc-button-wrapper{order:5}}
|
|
35
|
-
`],encapsulation:3})};var Xn=[`videoEl`];async function Di(){return (await import('./video-detail-dialog.component-mEZSD0E_-DFSLgpj0.js').then(function (n) { return n.v; })).VideoDetailDialogComponent}var ye=class n extends ke{videoElements;videoEntries;videoConfig;dialogRef=null;dialog=g(Ro);isMobile=M$3();pausedVideos=[];videoLoadingStates=new Map;intersectionObserver;visibleVideos=new Set;constructor(){super(),Di();}ngAfterViewInit(){this.checkAndOpenVideoFromUrl();}ngOnDestroy(){super.ngOnDestroy(),this.intersectionObserver?.disconnect();}engagementTriggerReceived(t){this.videoConfig=t.content?.videoConfig,this.videoEntries=this.videoConfig.videoEntries;}onMuteToggled(t,e){t||this.videoElements.forEach(i=>{i.nativeElement!==e&&(i.nativeElement.muted=true,i.nativeElement.pause());});}sendTriggerClicked(t,e){this.sendEvent(`CE Trigger Clicked`,{from:`video`},t,e);}async onVideoTap(t,e,i,o,a){t?.stopPropagation(),t?.preventDefault();let l=e.items?.[0];if(this.sendTriggerClicked(e,l),this.videoConfig.footerContent===`NONE`){o&&(o.muted=false,o.play(),this.onMuteToggled(false,o));return}await this.openDialog(e,i,a);}sendEvent(t,e,i,o){let a=new dr$1(t,e,this.engagementTrigger);a.setVideos(i),o&&(a.items=[o.toEmbed()]),window.CooeeSDK.sendEvent(a);}onDialogClosed(){this.resumePlaylistVideos();}isVideoLoading(t){return this.videoLoadingStates.get(t)??true}onVideoLoadStart(t){this.videoLoadingStates.set(t,true);}onVideoCanPlay(t){this.videoLoadingStates.set(t,false);}playVideo(t){t.play().catch(e=>{U$1.error(`Failed to play video:`,e);});}setupIntersectionObserver(t=.5,e=`50px`){this.intersectionObserver=new IntersectionObserver(i=>{i.forEach(o=>{let a=o.target,l=a.dataset.videoId;l&&(o.isIntersecting?(this.visibleVideos.add(l),this.handleVideoVisibilityChange(a,true)):(this.visibleVideos.delete(l),this.handleVideoVisibilityChange(a,false)));});},{threshold:t,rootMargin:e}),setTimeout(()=>{this.videoElements.forEach(i=>{this.intersectionObserver?.observe(i.nativeElement);});},100);}handleVideoVisibilityChange(t,e){e?this.onVideoBecameVisible(t):t.pause();}onVideoBecameVisible(t){this.playVideo(t);}pauseAllPlaylistVideos(){this.pausedVideos=[],this.videoElements.forEach(t=>{let e=t.nativeElement;e.paused||(this.pausedVideos.push(e),e.pause());});}resumePlaylistVideos(){this.pausedVideos.forEach(t=>{t.play().catch(()=>{});}),this.pausedVideos=[];}async checkAndOpenVideoFromUrl(){let t=We$4();if(!t||!this.videoEntries)return;let e=Je$2();if(e.utm_campaign?.toLowerCase()!==`shoppable_video`||e.utm_source?.toLowerCase()!==Ae$2)return;let i=this.videoEntries.findIndex(o=>o.video.shortID===+t);if(i!==-1){let o=this.videoEntries[i].video;await ce$2.set(`muted`,true),await this.openDialog(o,i);}}async openDialog(t,e,i){await Vi$1();let o={videoEntries:this.videoEntries,currentIndex:e,triggerContext:this.triggerContext,selectedItem:i};this.dialogRef&&this.dialogRef.close(),this.pauseAllPlaylistVideos();let a=await Di();this.dialogRef=this.dialog.open(a,{width:`100vw`,height:`100vh`,data:o,providers:an$1(this.triggerContext,{video:t,index:e}),disableClose:true});let l={videoID:t.id,videoIndex:e};this.sendEvent(`CE Video Dialog Opened`,{current:l},t),this.dialogRef.closed.subscribe(p=>{if(this.dialogRef=null,!p)return;let f=p.lastVideoDuration*1e3,M={videoID:p.lastVideo.id,videoIndex:p.lastVideoIndex,playedTillMS:f,playedTillPercent:f/p.lastVideo.durationMS};this.sendEvent(`CE Video Dialog Closed`,{current:M},p.lastVideo),this.onDialogClosed();});}static ɵfac=function(e){return new(e||n)};static ɵcmp=gf({type:n,selectors:[[`cooee-abstract-video`]],viewQuery:function(e,i){if(e&1&&ac(Xn,5),e&2){let o;Hf(o=$f())&&(i.videoElements=o);}},features:[Ya],decls:0,vars:0,template:function(e,i){},encapsulation:2})};var _e=class n{video=SN.required({alias:`cooeeVideoSources`});prioritySource=SN(`high`);elementRef=g(be$1);constructor(){Ss(()=>{this.updateSources();});}updateSources(){let t=this.elementRef.nativeElement,e=this.video(),i=this.prioritySource();t.querySelectorAll(`source`).forEach(a=>a.remove()),i===`best`?(this.addSource(e.bestSource),this.addSource(e.highSource),this.addSource(e.lowSource)):i===`low`?(this.addSource(e.lowSource),this.addSource(e.highSource),this.addSource(e.bestSource)):(this.addSource(e.highSource),this.addSource(e.bestSource),this.addSource(e.lowSource)),this.addSource(e.m3u8Source),t.load();}addSource(t){if(!t)return;let e=document.createElement(`source`);e.src=t.url,e.type=t.mimeType,this.elementRef.nativeElement.appendChild(e);}static ɵfac=function(e){return new(e||n)};static ɵdir=wn$2({type:n,selectors:[[`video`,`cooeeVideoSources`,``]],inputs:{video:[1,`cooeeVideoSources`,`video`],prioritySource:[1,`prioritySource`]}})};var eo=(n,t)=>t.video.id;function to(n,t){if(n&1&&(bf(0,`div`,1),Bv(1,`safeHtml`)),n&2)Mf(`innerHTML`,Hv(1,1,KD().videoConfig.heading),fm);}function io(n,t){n&1&&(nc(0,`div`,6),bf(1,`div`,12),rc());}function no(n,t){if(n&1){let e=WD();nc(0,`cooee-mute-toggle`,13),Lf(`toggled`,function(o){Iu(e),KD();let a=tv(7);return wu(KD().onMuteToggled(o,a))}),rc();}if(n&2){KD();let e=tv(7);Mf(`muted`,e.muted)(`videoEl`,e);}}function oo(n,t){if(n&1){let e=WD();nc(0,`cooee-video-promoted-items`,16),Lf(`cardClick`,function(o){Iu(e);let a=KD(2).$index,l=tv(7),p=Rv(0);return wu(KD().onItemCardClick(o,p,a,l))}),rc();}if(n&2){KD(2);Mf(`items`,Rv(0).items)(`centeredSlides`,false);}}function ro(n,t){if(n&1){let e=WD();nc(0,`cooee-item-card`,17),Lf(`buttonClick`,function(){Iu(e);let o=KD(2).$index,a=tv(7),l=Rv(0);return wu(KD().addToCartClicked(null,l,o,a))})(`click`,function(){Iu(e);let o=KD(2).$index,a=tv(7),l=Rv(0),p=Rv(1);return wu(KD().onItemCardClick(p,l,o,a))}),rc();}if(n&2){KD(2);Mf(`item`,Rv(1));}}function ao(n,t){if(n&1&&LD(0,oo,1,2,`cooee-video-promoted-items`,14)(1,ro,1,1,`cooee-item-card`,15),n&2){KD();let e=Rv(0),i=KD();PD(Rv(2)===i.VideoConfigFooterContent.ITEM_SWIPER&&e.items.length>1?0:e.items.length?1:-1);}}function so(n,t){if(n&1){let e=WD();nc(0,`cooee-video-card`,18),Lf(`linkClicked`,function(){Iu(e),KD();let o=Rv(0);return wu(KD().sendTriggerClicked(o))}),rc();}if(n&2){KD();Mf(`card`,Rv(2));}}function lo(n,t){if(n&1){let e=WD();sp(0)(1)(2),nc(3,`div`,4)(4,`div`,5),Lf(`click`,function(o){let a=Iu(e).$index,l=tv(7),p=Rv(0);return wu(KD().onVideoTap(o,p,a,l))})(`keydown.enter`,function(o){let a=Iu(e).$index,l=tv(7),p=Rv(0);return wu(KD().onVideoTap(o,p,a,l))})(`keydown.space`,function(o){let a=Iu(e).$index,l=tv(7),p=Rv(0);return wu(KD().onVideoTap(o,p,a,l))}),LD(5,io,2,0,`div`,6),nc(6,`video`,7,0),Lf(`mouseenter`,function(){Iu(e);let o=tv(7);KD();return wu(Rv(1)&&o.play())})(`mouseleave`,function(){Iu(e);let o=tv(7);KD();return wu(Rv(1)&&o.pause())})(`loadstart`,function(){Iu(e);let o=Rv(0);return wu(KD().onVideoLoadStart(o.id))})(`canplay`,function(){Iu(e);let o=Rv(0);return wu(KD().onVideoCanPlay(o.id))}),rc(),nc(8,`div`,8),LD(9,no,1,2,`cooee-mute-toggle`,9),rc()(),nc(10,`div`,10),LD(11,ao,2,1)(12,so,1,1,`cooee-video-card`,11),rc()();}if(n&2){let e=t.$implicit,i=KD(),o=Rv(0),a=Rv(2),l=Av(e.video);vd(),Av(l.items[0]),vd();let f=Av(l.card)&&a===i.VideoConfigFooterContent.CARD;vd(2),cc(`background-image`,l.thumbnail?`url(`+l.thumbnail+`)`:null),vd(),PD(i.isVideoLoading(l.id)?5:-1),vd(),Mf(`cooeeVideoSources`,l)(`muted`,true),Sf(`poster`,l.thumbnail)(`preload`,o?`metadata`:`none`)(`autoplay`,null)(`data-video-id`,l.id),vd(3),PD(i.videoConfig.showMuteButton?9:-1),vd(2),PD(i.videoConfig.showItems()?11:f?12:-1);}}var it=class n extends ye{VideoConfigFooterContent=se$2;VideoConfigAutoPlay=oe$2;swiperOptions=null;constructor(){super(),this.hasSwiper=true;}ngAfterViewInit(){super.ngAfterViewInit();let t=this.videoConfig.playlistConfig.videoSwiper,e=t?(this.isMobile?t.gapSm:t.gap)+`px`:window.cooeePlaylistGap??24,i=t?this.isMobile?t.maxInRowSm:t.maxInRow:`auto`;this.swiperOptions={direction:`horizontal`,effect:`slide`,loop:t?.loop,freeMode:true,spaceBetween:e,slidesPerView:i,mousewheel:{enabled:true,forceToAxis:true},autoplay:t?.autoplay?.enabled?{delay:t?.autoplay?.delay,disableOnInteraction:false}:false},this.setupIntersectionObserver(),this.playFirstVideo();}ngOnDestroy(){super.ngOnDestroy();}addToCartClicked(t,e,i,o){let a=e.items?.[0],l=le$3.get().website?.canChangeVariantInCart;if(e.items?.length>1||a?.hasVariants()&&!l){this.onItemCardClick(a,e,i,o);return}this.engagementService.executeCTA(he$2.ADD_TO_CART,{item:a,video:e});}goToPDP(t,e){t?.stopPropagation(),t?.preventDefault();let i=e.items?.[0];this.engagementService.executeCTA(he$2.GO_TO_PRODUCT,{item:i,video:e});}onItemCardClick(t,e,i,o){this.videoConfig.playlistConfig.itemCardClickBehavior===`OPEN_ITEM_DETAIL`?this.onVideoTap(null,e,i,o,t):this.onVideoTap(null,e,i,o);}update(){}onVideoCanPlay(t){if(super.onVideoCanPlay(t),!this.shouldAutoPlay()||this.dialogRef||!this.visibleVideos.has(t))return;let e=this.videoElements.find(i=>i.nativeElement.dataset.videoId===t)?.nativeElement;e&&this.playVideo(e);}onVideoBecameVisible(t){this.shouldAutoPlay()&&(this.dialogRef?this.pausedVideos.push(t):this.playVideo(t));}shouldAutoPlay(){return this.videoConfig.autoPlay===`ON`||this.videoConfig.autoPlay===`ON_HOVER`&&this.isMobile}playFirstVideo(){}static ɵfac=function(e){return new(e||n)};static ɵcmp=gf({type:n,selectors:[[`cooee-video-playlist`]],features:[up(Gt()),Ya],decls:8,vars:7,consts:[[`videoEl`,``],[1,`heading-text`,3,`innerHTML`],[3,`options`,`navigationConfig`,`paginationConfig`],[`ngProjectAs`,`swiper-slides`,5,[`swiper-slides`]],[1,`swiper-slide`,`video-card`],[`role`,`button`,`tabindex`,`0`,`aria-label`,`Play video`,`aria-haspopup`,`dialog`,1,`video-wrapper`,3,`click`,`keydown.enter`,`keydown.space`],[1,`video-loading-overlay`],[`width`,`100%`,`playsinline`,``,`loop`,``,3,`mouseenter`,`mouseleave`,`loadstart`,`canplay`,`cooeeVideoSources`,`muted`],[1,`video-controls`],[3,`muted`,`videoEl`],[`role`,`region`,`aria-label`,`Video details`,1,`video-footer`],[3,`card`],[1,`loading-spinner`],[3,`toggled`,`muted`,`videoEl`],[3,`items`,`centeredSlides`],[`role`,`button`,`tabindex`,`0`,`aria-label`,`Product detail`,3,`item`],[3,`cardClick`,`items`,`centeredSlides`],[`role`,`button`,`tabindex`,`0`,`aria-label`,`Product detail`,3,`buttonClick`,`click`,`item`],[3,`linkClicked`,`card`]],template:function(e,i){if(e&1&&(sp(0)(1)(2),LD(3,to,2,3,`div`,1),nc(4,`cooee-swiper`,2),ic(5,3),VD(6,lo,13,14,`div`,4,eo),Ko(),rc()),e&2){Av(!i.videoConfig.autoPlay||i.videoConfig.autoPlay===i.VideoConfigAutoPlay.ON),vd(),Av(i.videoConfig.autoPlay===i.VideoConfigAutoPlay.ON_HOVER),vd(),Av(i.videoConfig.footerContent),vd(),PD(i.videoConfig.heading?3:-1);let o=i.videoConfig.playlistConfig.videoSwiper;vd(),Mf(`options`,i.swiperOptions)(`navigationConfig`,o==null?null:o.navigation)(`paginationConfig`,o==null?null:o.pagination),vd(2),HD(i.videoEntries);}},dependencies:[qt,Wt,$t,fe,_e,Kt,a],styles:[`:host{display:block}cooee-swiper.swiper{margin:8px;padding-top:25px;padding-bottom:25px}.video-wrapper{position:relative;cursor:pointer;outline:none;border-radius:var(--lc-media-radius, 8px);background-size:cover;background-position:center;background-repeat:no-repeat}.video-wrapper video{width:100%;height:var(--lc-video-card-height);object-fit:cover;border-radius:var(--lc-media-radius, 8px);position:relative}.video-card.swiper-slide{width:var(--lc-video-card-width);transition:transform .3s ease}.video-card.swiper-slide:hover{transform:scale(1.05)}@media(max-width:768px),(prefers-reduced-motion:reduce){.video-card.swiper-slide{transition:none}.video-card.swiper-slide:hover{transform:none}}.video-controls{position:absolute;bottom:8px;z-index:10;right:8px;display:flex;gap:8px}.video-footer{overflow-x:hidden}cooee-item-card{cursor:pointer;padding-left:0!important;padding-right:0!important}cooee-item-card .item-image{width:50px;height:50px;display:none}cooee-item-card .item-detail-button{display:none!important}cooee-item-card .item-info{font-size:14px;line-height:normal;margin-right:unset!important}cooee-item-card .item-info .item-name{-webkit-line-clamp:1;overflow:hidden}.video-loading-overlay{border-radius:var(--lc-media-radius, 8px)}
|
|
35
|
+
`],encapsulation:3})};var Xn=[`videoEl`];async function Di(){return (await import('./video-detail-dialog.component-BZkituF3-Bf8usjgM.js').then(function (n) { return n.v; })).VideoDetailDialogComponent}var ye=class n extends ke{videoElements;videoEntries;videoConfig;dialogRef=null;dialog=g(Ro);isMobile=M$3();pausedVideos=[];videoLoadingStates=new Map;intersectionObserver;visibleVideos=new Set;constructor(){super(),Di();}ngAfterViewInit(){this.checkAndOpenVideoFromUrl();}ngOnDestroy(){super.ngOnDestroy(),this.intersectionObserver?.disconnect();}engagementTriggerReceived(t){this.videoConfig=t.content?.videoConfig,this.videoEntries=this.videoConfig.videoEntries;}onMuteToggled(t,e){t||this.videoElements.forEach(i=>{i.nativeElement!==e&&(i.nativeElement.muted=true,i.nativeElement.pause());});}sendTriggerClicked(t,e){this.sendEvent(`CE Trigger Clicked`,{from:`video`},t,e);}async onVideoTap(t,e,i,o,a){t?.stopPropagation(),t?.preventDefault();let l=e.items?.[0];if(this.sendTriggerClicked(e,l),this.videoConfig.footerContent===`NONE`){o&&(o.muted=false,o.play(),this.onMuteToggled(false,o));return}await this.openDialog(e,i,a);}sendEvent(t,e,i,o){let a=new dr$1(t,e,this.engagementTrigger);a.setVideos(i),o&&(a.items=[o.toEmbed()]),window.CooeeSDK.sendEvent(a);}onDialogClosed(){this.resumePlaylistVideos();}isVideoLoading(t){return this.videoLoadingStates.get(t)??true}onVideoLoadStart(t){this.videoLoadingStates.set(t,true);}onVideoCanPlay(t){this.videoLoadingStates.set(t,false);}playVideo(t){t.play().catch(e=>{U$1.error(`Failed to play video:`,e);});}setupIntersectionObserver(t=.5,e=`50px`){this.intersectionObserver=new IntersectionObserver(i=>{i.forEach(o=>{let a=o.target,l=a.dataset.videoId;l&&(o.isIntersecting?(this.visibleVideos.add(l),this.handleVideoVisibilityChange(a,true)):(this.visibleVideos.delete(l),this.handleVideoVisibilityChange(a,false)));});},{threshold:t,rootMargin:e}),setTimeout(()=>{this.videoElements.forEach(i=>{this.intersectionObserver?.observe(i.nativeElement);});},100);}handleVideoVisibilityChange(t,e){e?this.onVideoBecameVisible(t):t.pause();}onVideoBecameVisible(t){this.playVideo(t);}pauseAllPlaylistVideos(){this.pausedVideos=[],this.videoElements.forEach(t=>{let e=t.nativeElement;e.paused||(this.pausedVideos.push(e),e.pause());});}resumePlaylistVideos(){this.pausedVideos.forEach(t=>{t.play().catch(()=>{});}),this.pausedVideos=[];}async checkAndOpenVideoFromUrl(){let t=We$4();if(!t||!this.videoEntries)return;let e=Je$2();if(e.utm_campaign?.toLowerCase()!==`shoppable_video`||e.utm_source?.toLowerCase()!==Ae$2)return;let i=this.videoEntries.findIndex(o=>o.video.shortID===+t);if(i!==-1){let o=this.videoEntries[i].video;await ce$2.set(`muted`,true),await this.openDialog(o,i);}}async openDialog(t,e,i){await Vi$1();let o={videoEntries:this.videoEntries,currentIndex:e,triggerContext:this.triggerContext,selectedItem:i};this.dialogRef&&this.dialogRef.close(),this.pauseAllPlaylistVideos();let a=await Di();this.dialogRef=this.dialog.open(a,{width:`100vw`,height:`100vh`,data:o,providers:an$1(this.triggerContext,{video:t,index:e}),disableClose:true});let l={videoID:t.id,videoIndex:e};this.sendEvent(`CE Video Dialog Opened`,{current:l},t),this.dialogRef.closed.subscribe(p=>{if(this.dialogRef=null,!p)return;let f=p.lastVideoDuration*1e3,M={videoID:p.lastVideo.id,videoIndex:p.lastVideoIndex,playedTillMS:f,playedTillPercent:f/p.lastVideo.durationMS};this.sendEvent(`CE Video Dialog Closed`,{current:M},p.lastVideo),this.onDialogClosed();});}static ɵfac=function(e){return new(e||n)};static ɵcmp=gf({type:n,selectors:[[`cooee-abstract-video`]],viewQuery:function(e,i){if(e&1&&ac(Xn,5),e&2){let o;Hf(o=$f())&&(i.videoElements=o);}},features:[Ya],decls:0,vars:0,template:function(e,i){},encapsulation:2})};var _e=class n{video=SN.required({alias:`cooeeVideoSources`});prioritySource=SN(`high`);elementRef=g(be$1);constructor(){Ss(()=>{this.updateSources();});}updateSources(){let t=this.elementRef.nativeElement,e=this.video(),i=this.prioritySource();t.querySelectorAll(`source`).forEach(a=>a.remove()),i===`best`?(this.addSource(e.bestSource),this.addSource(e.highSource),this.addSource(e.lowSource)):i===`low`?(this.addSource(e.lowSource),this.addSource(e.highSource),this.addSource(e.bestSource)):(this.addSource(e.highSource),this.addSource(e.bestSource),this.addSource(e.lowSource)),this.addSource(e.m3u8Source),t.load();}addSource(t){if(!t)return;let e=document.createElement(`source`);e.src=t.url,e.type=t.mimeType,this.elementRef.nativeElement.appendChild(e);}static ɵfac=function(e){return new(e||n)};static ɵdir=wn$2({type:n,selectors:[[`video`,`cooeeVideoSources`,``]],inputs:{video:[1,`cooeeVideoSources`,`video`],prioritySource:[1,`prioritySource`]}})};var eo=(n,t)=>t.video.id;function to(n,t){if(n&1&&(bf(0,`div`,1),Bv(1,`safeHtml`)),n&2)Mf(`innerHTML`,Hv(1,1,KD().videoConfig.heading),fm);}function io(n,t){n&1&&(nc(0,`div`,6),bf(1,`div`,12),rc());}function no(n,t){if(n&1){let e=WD();nc(0,`cooee-mute-toggle`,13),Lf(`toggled`,function(o){Iu(e),KD();let a=tv(7);return wu(KD().onMuteToggled(o,a))}),rc();}if(n&2){KD();let e=tv(7);Mf(`muted`,e.muted)(`videoEl`,e);}}function oo(n,t){if(n&1){let e=WD();nc(0,`cooee-video-promoted-items`,16),Lf(`cardClick`,function(o){Iu(e);let a=KD(2).$index,l=tv(7),p=Rv(0);return wu(KD().onItemCardClick(o,p,a,l))}),rc();}if(n&2){KD(2);Mf(`items`,Rv(0).items)(`centeredSlides`,false);}}function ro(n,t){if(n&1){let e=WD();nc(0,`cooee-item-card`,17),Lf(`buttonClick`,function(){Iu(e);let o=KD(2).$index,a=tv(7),l=Rv(0);return wu(KD().addToCartClicked(null,l,o,a))})(`click`,function(){Iu(e);let o=KD(2).$index,a=tv(7),l=Rv(0),p=Rv(1);return wu(KD().onItemCardClick(p,l,o,a))}),rc();}if(n&2){KD(2);Mf(`item`,Rv(1));}}function ao(n,t){if(n&1&&LD(0,oo,1,2,`cooee-video-promoted-items`,14)(1,ro,1,1,`cooee-item-card`,15),n&2){KD();let e=Rv(0),i=KD();PD(Rv(2)===i.VideoConfigFooterContent.ITEM_SWIPER&&e.items.length>1?0:e.items.length?1:-1);}}function so(n,t){if(n&1){let e=WD();nc(0,`cooee-video-card`,18),Lf(`linkClicked`,function(){Iu(e),KD();let o=Rv(0);return wu(KD().sendTriggerClicked(o))}),rc();}if(n&2){KD();Mf(`card`,Rv(2));}}function lo(n,t){if(n&1){let e=WD();sp(0)(1)(2),nc(3,`div`,4)(4,`div`,5),Lf(`click`,function(o){let a=Iu(e).$index,l=tv(7),p=Rv(0);return wu(KD().onVideoTap(o,p,a,l))})(`keydown.enter`,function(o){let a=Iu(e).$index,l=tv(7),p=Rv(0);return wu(KD().onVideoTap(o,p,a,l))})(`keydown.space`,function(o){let a=Iu(e).$index,l=tv(7),p=Rv(0);return wu(KD().onVideoTap(o,p,a,l))}),LD(5,io,2,0,`div`,6),nc(6,`video`,7,0),Lf(`mouseenter`,function(){Iu(e);let o=tv(7);KD();return wu(Rv(1)&&o.play())})(`mouseleave`,function(){Iu(e);let o=tv(7);KD();return wu(Rv(1)&&o.pause())})(`loadstart`,function(){Iu(e);let o=Rv(0);return wu(KD().onVideoLoadStart(o.id))})(`canplay`,function(){Iu(e);let o=Rv(0);return wu(KD().onVideoCanPlay(o.id))}),rc(),nc(8,`div`,8),LD(9,no,1,2,`cooee-mute-toggle`,9),rc()(),nc(10,`div`,10),LD(11,ao,2,1)(12,so,1,1,`cooee-video-card`,11),rc()();}if(n&2){let e=t.$implicit,i=KD(),o=Rv(0),a=Rv(2),l=Av(e.video);vd(),Av(l.items[0]),vd();let f=Av(l.card)&&a===i.VideoConfigFooterContent.CARD;vd(2),cc(`background-image`,l.thumbnail?`url(`+l.thumbnail+`)`:null),vd(),PD(i.isVideoLoading(l.id)?5:-1),vd(),Mf(`cooeeVideoSources`,l)(`muted`,true),Sf(`poster`,l.thumbnail)(`preload`,o?`metadata`:`none`)(`autoplay`,null)(`data-video-id`,l.id),vd(3),PD(i.videoConfig.showMuteButton?9:-1),vd(2),PD(i.videoConfig.showItems()?11:f?12:-1);}}var it=class n extends ye{VideoConfigFooterContent=se$2;VideoConfigAutoPlay=oe$2;swiperOptions=null;constructor(){super(),this.hasSwiper=true;}ngAfterViewInit(){super.ngAfterViewInit();let t=this.videoConfig.playlistConfig.videoSwiper,e=t?(this.isMobile?t.gapSm:t.gap)+`px`:window.cooeePlaylistGap??24,i=t?this.isMobile?t.maxInRowSm:t.maxInRow:`auto`;this.swiperOptions={direction:`horizontal`,effect:`slide`,loop:t?.loop,freeMode:true,spaceBetween:e,slidesPerView:i,mousewheel:{enabled:true,forceToAxis:true},autoplay:t?.autoplay?.enabled?{delay:t?.autoplay?.delay,disableOnInteraction:false}:false},this.setupIntersectionObserver(),this.playFirstVideo();}ngOnDestroy(){super.ngOnDestroy();}addToCartClicked(t,e,i,o){let a=e.items?.[0],l=le$3.get().website?.canChangeVariantInCart;if(e.items?.length>1||a?.hasVariants()&&!l){this.onItemCardClick(a,e,i,o);return}this.engagementService.executeCTA(he$2.ADD_TO_CART,{item:a,video:e});}goToPDP(t,e){t?.stopPropagation(),t?.preventDefault();let i=e.items?.[0];this.engagementService.executeCTA(he$2.GO_TO_PRODUCT,{item:i,video:e});}onItemCardClick(t,e,i,o){this.videoConfig.playlistConfig.itemCardClickBehavior===`OPEN_ITEM_DETAIL`?this.onVideoTap(null,e,i,o,t):this.onVideoTap(null,e,i,o);}update(){}onVideoCanPlay(t){if(super.onVideoCanPlay(t),!this.shouldAutoPlay()||this.dialogRef||!this.visibleVideos.has(t))return;let e=this.videoElements.find(i=>i.nativeElement.dataset.videoId===t)?.nativeElement;e&&this.playVideo(e);}onVideoBecameVisible(t){this.shouldAutoPlay()&&(this.dialogRef?this.pausedVideos.push(t):this.playVideo(t));}shouldAutoPlay(){return this.videoConfig.autoPlay===`ON`||this.videoConfig.autoPlay===`ON_HOVER`&&this.isMobile}playFirstVideo(){}static ɵfac=function(e){return new(e||n)};static ɵcmp=gf({type:n,selectors:[[`cooee-video-playlist`]],features:[up(Gt()),Ya],decls:8,vars:7,consts:[[`videoEl`,``],[1,`heading-text`,3,`innerHTML`],[3,`options`,`navigationConfig`,`paginationConfig`],[`ngProjectAs`,`swiper-slides`,5,[`swiper-slides`]],[1,`swiper-slide`,`video-card`],[`role`,`button`,`tabindex`,`0`,`aria-label`,`Play video`,`aria-haspopup`,`dialog`,1,`video-wrapper`,3,`click`,`keydown.enter`,`keydown.space`],[1,`video-loading-overlay`],[`width`,`100%`,`playsinline`,``,`loop`,``,3,`mouseenter`,`mouseleave`,`loadstart`,`canplay`,`cooeeVideoSources`,`muted`],[1,`video-controls`],[3,`muted`,`videoEl`],[`role`,`region`,`aria-label`,`Video details`,1,`video-footer`],[3,`card`],[1,`loading-spinner`],[3,`toggled`,`muted`,`videoEl`],[3,`items`,`centeredSlides`],[`role`,`button`,`tabindex`,`0`,`aria-label`,`Product detail`,3,`item`],[3,`cardClick`,`items`,`centeredSlides`],[`role`,`button`,`tabindex`,`0`,`aria-label`,`Product detail`,3,`buttonClick`,`click`,`item`],[3,`linkClicked`,`card`]],template:function(e,i){if(e&1&&(sp(0)(1)(2),LD(3,to,2,3,`div`,1),nc(4,`cooee-swiper`,2),ic(5,3),VD(6,lo,13,14,`div`,4,eo),Ko(),rc()),e&2){Av(!i.videoConfig.autoPlay||i.videoConfig.autoPlay===i.VideoConfigAutoPlay.ON),vd(),Av(i.videoConfig.autoPlay===i.VideoConfigAutoPlay.ON_HOVER),vd(),Av(i.videoConfig.footerContent),vd(),PD(i.videoConfig.heading?3:-1);let o=i.videoConfig.playlistConfig.videoSwiper;vd(),Mf(`options`,i.swiperOptions)(`navigationConfig`,o==null?null:o.navigation)(`paginationConfig`,o==null?null:o.pagination),vd(2),HD(i.videoEntries);}},dependencies:[qt,Wt,$t,fe,_e,Kt,a],styles:[`:host{display:block}cooee-swiper.swiper{margin:8px;padding-top:25px;padding-bottom:25px}.video-wrapper{position:relative;cursor:pointer;outline:none;border-radius:var(--lc-media-radius, 8px);background-size:cover;background-position:center;background-repeat:no-repeat}.video-wrapper video{width:100%;height:var(--lc-video-card-height);object-fit:cover;border-radius:var(--lc-media-radius, 8px);position:relative}.video-card.swiper-slide{width:var(--lc-video-card-width);transition:transform .3s ease}.video-card.swiper-slide:hover{transform:scale(1.05)}@media(max-width:768px),(prefers-reduced-motion:reduce){.video-card.swiper-slide{transition:none}.video-card.swiper-slide:hover{transform:none}}.video-controls{position:absolute;bottom:8px;z-index:10;right:8px;display:flex;gap:8px}.video-footer{overflow-x:hidden}cooee-item-card{cursor:pointer;padding-left:0!important;padding-right:0!important}cooee-item-card .item-image{width:50px;height:50px;display:none}cooee-item-card .item-detail-button{display:none!important}cooee-item-card .item-info{font-size:14px;line-height:normal;margin-right:unset!important}cooee-item-card .item-info .item-name{-webkit-line-clamp:1;overflow:hidden}.video-loading-overlay{border-radius:var(--lc-media-radius, 8px)}
|
|
36
36
|
`],encapsulation:3})};var co=[`videoElement`],po=n=>({"cursor-grab":n}),nt=class n extends ye{videoElement;video;isDragging=false;hidden=false;cdkDrag=g(ge$1,{self:true});untilDestroyed=Ut();constructor(){super();}get popupClasses(){return this.hidden?[`hidden`]:[`visible`]}onClick(t){t.stopPropagation(),t.preventDefault(),this.onVideoClick();}ngOnInit(){super.ngOnInit();let t=this.elementRef.nativeElement.closest(`.letscooee-engagement`);t&&(t.style.zIndex=`10000`),this.cdkDrag.moved.pipe(this.untilDestroyed).subscribe(()=>this.isDragging=true);}ngAfterViewInit(){super.ngAfterViewInit(),setTimeout(()=>{this.autoPlay();},100);}onVideoClick(){if(this.isDragging){this.isDragging=false;return}this.hidden=true,this.onVideoTap(null,this.video,0);}close(){this.hidden=true;let t=(new Date().getTime()-this.triggerContext.startTime.getTime())/1e3;this.sendEvent(`CE Trigger Closed`,{duration:t});}engagementTriggerReceived(t){super.engagementTriggerReceived(t),this.video=this.videoEntries[0].video;}update(){}onDialogClosed(){this.hidden=false;}autoPlay(){let t=this.videoElement.nativeElement;this.hidden||this.playVideo(t);}static ɵfac=function(e){return new(e||n)};static ɵcmp=gf({type:n,selectors:[[`cooee-video-popup`]],viewQuery:function(e,i){if(e&1&&ac(co,5),e&2){let o;Hf(o=$f())&&(i.videoElement=o.first);}},hostAttrs:[`role`,`button`,`tabindex`,`0`,`aria-label`,`Open video popup `,`cdkDragBoundary`,`body`],hostVars:2,hostBindings:function(e,i){e&1&&Lf(`keydown.enter`,function(a){return i.onClick(a)})(`keydown.space`,function(a){return i.onClick(a)})(`click`,function(a){return i.onClick(a)}),e&2&&mv(i.popupClasses);},features:[up(Gt()),ID([{directive:ge$1,inputs:[`cdkDragBoundary`,`cdkDragBoundary`]}]),Ya],decls:9,vars:6,consts:[[`videoElement`,``],[1,`popup-inner`,3,`ngClass`],[`type`,`button`,`aria-label`,`Close video popup`,1,`close-button`,3,`click`],[`name`,`close`,`aria-hidden`,`true`],[1,`play-button`],[`name`,`unmute`,`aria-hidden`,`true`],[1,`text`],[`loop`,``,`preload`,`metadata`,`playsinline`,``,3,`muted`,`cooeeVideoSources`,`prioritySource`]],template:function(e,i){if(e&1){let o=WD();nc(0,`div`,1)(1,`button`,2),Lf(`click`,function(l){return Iu(o),l.stopPropagation(),wu(i.close())}),bf(2,`cooee-icon`,3),rc(),nc(3,`div`,4),bf(4,`cooee-icon`,5),nc(5,`div`,6),Sv(6,`Tap to unmute`),rc()(),bf(7,`video`,7,0),rc();}e&2&&(Mf(`ngClass`,Pv(4,po,i.isDragging)),vd(7),Mf(`muted`,true)(`cooeeVideoSources`,i.video)(`prioritySource`,`low`));},dependencies:[YE,ye$2,_e],styles:[`:host{position:fixed;display:block;right:24px;bottom:24px;min-height:150px;max-width:150px;box-shadow:0 25px 50px -12px #00000040}:host(.hidden){display:none}.popup-inner{display:flex;justify-content:center;align-items:center;position:relative}video{width:100%;border-radius:8px;background-color:#fff}.close-button{position:absolute;top:-14px;right:-14px;background-color:#00000080;border-radius:9999px;width:32px;height:32px;border:none;z-index:10;display:flex;justify-content:center;align-items:center}.play-button{display:flex;justify-content:center;align-items:center;position:absolute;top:50%;left:50%;transform:translate(-50%,-50%) scale(1);transition:all .1s ease-in-out;z-index:999;flex-wrap:wrap;width:100%;max-width:130px;border-radius:5px;padding:5px 10px;background-color:#97979761;-webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px)}.play-button cooee-icon{width:14px;height:14px}.play-button .text{font-size:11px;line-height:1;color:#fff;font-weight:400;margin-left:5px;text-align:center}
|
|
37
37
|
`],encapsulation:3})};var mo=(n,t)=>t.video.id;function uo(n,t){if(n&1&&(bf(0,`div`,1),Bv(1,`safeHtml`)),n&2)Mf(`innerHTML`,Hv(1,1,KD().videoConfig.heading),fm);}function fo(n,t){n&1&&(nc(0,`div`,9),bf(1,`div`,12),rc());}function go(n,t){if(n&1&&(nc(0,`div`,11),Sv(1),rc()),n&2){let e=KD().$implicit;vd(),np(e.title);}}function vo(n,t){if(n&1){let e=WD();nc(0,`div`,4),Lf(`click`,function(o){let a=Iu(e),l=a.$implicit,p=a.$index;return wu(KD().onVideoTap(o,l.video,p))})(`keydown.enter`,function(o){let a=Iu(e),l=a.$implicit,p=a.$index;return wu(KD().onVideoTap(o,l.video,p))})(`keydown.space`,function(o){let a=Iu(e),l=a.$implicit,p=a.$index;return wu(KD().onVideoTap(o,l.video,p))}),ku(),nc(1,`svg`,5),bf(2,`circle`,6)(3,`circle`,7),rc(),Fu(),nc(4,`div`,8),LD(5,fo,2,0,`div`,9),nc(6,`video`,10,0),Lf(`loadstart`,function(){let o=Iu(e).$implicit;return wu(KD().onVideoLoadStart(o.video.id))})(`canplay`,function(){let o=Iu(e).$implicit;return wu(KD().onVideoCanPlay(o.video.id))}),rc()(),LD(8,go,2,1,`div`,11),rc();}if(n&2){let e=t.$implicit,i=t.$index,o=KD();Sf(`aria-label`,`Open video story `+(i+1)),vd(5),PD(o.isVideoLoading(e.video.id)?5:-1),vd(),Mf(`poster`,e.video.thumbnail)(`cooeeVideoSources`,e.video)(`prioritySource`,`low`)(`muted`,true),Sf(`data-video-id`,e.video.id),vd(2),PD(e.title?8:-1);}}var ot=class n extends ye{constructor(){super();}ngAfterViewInit(){super.ngAfterViewInit(),this.setupIntersectionObserver();}ngOnDestroy(){super.ngOnDestroy();}update(){}static ɵfac=function(e){return new(e||n)};static ɵcmp=gf({type:n,selectors:[[`cooee-video-stories`]],features:[up(Gt()),Ya],decls:4,vars:1,consts:[[`videoEl`,``],[1,`heading-text`,3,`innerHTML`],[1,`video-stories`],[`role`,`button`,`tabindex`,`0`,1,`video-story`],[`role`,`button`,`tabindex`,`0`,1,`video-story`,3,`click`,`keydown.enter`,`keydown.space`],[`viewBox`,`0 0 100 100`],[`cx`,`50`,`cy`,`50`,`r`,`48`,`fill`,`none`,`stroke-width`,`4`],[`cx`,`50`,`cy`,`50`,`r`,`48`,`fill`,`none`,`stroke-width`,`4`,`stroke-linecap`,`round`,`stroke-dasharray`,`301.6`,`stroke-dashoffset`,`301.6`,1,`video-story-circle`],[1,`video-wrapper`],[1,`video-loading-overlay`],[`loop`,``,`playsinline`,``,`preload`,`metadata`,3,`loadstart`,`canplay`,`poster`,`cooeeVideoSources`,`prioritySource`,`muted`],[1,`video-story-title`],[1,`loading-spinner`]],template:function(e,i){e&1&&(LD(0,uo,2,3,`div`,1),nc(1,`div`,2),VD(2,vo,9,8,`div`,3,mo),rc()),e&2&&(PD(i.videoConfig.heading?0:-1),vd(2),HD(i.videoEntries));},dependencies:[_e,a],styles:[`:host{display:block}.video-stories{display:flex;overflow:auto;margin:.75rem;gap:.75rem;justify-content:center;align-items:center;scrollbar-width:none}.video-stories::-webkit-scrollbar{display:none}@media(max-width:768px){.video-stories{justify-content:start!important}}.video-story{position:relative;width:5rem;cursor:pointer;flex-shrink:0}.video-story .video-story-title{margin-top:.25rem;font-size:.7rem;line-height:1.1;text-align:center;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.video-story svg{position:absolute;top:0;left:0;width:100%;height:100%}.video-story svg circle:first-child{stroke:#d1d5db}.video-story svg circle:last-child{stroke:#3b82f6}.video-story .video-wrapper{position:relative;width:100%;height:100%;border-radius:9999px;overflow:hidden}.video-story .video-wrapper video{width:100%;height:100%;object-fit:cover;border-radius:9999px;position:relative;z-index:1}.video-story .video-wrapper .video-loading-overlay{border-radius:9999px}
|
|
38
|
-
`],encapsulation:3})};async function Rs(){let n=await yC(Ii),t=(e,i)=>{let o=Pi(e,{injector:n.injector});customElements.get(i)||customElements.define(i,o);};t(tt,`cooee-sticky-atc`),t(Ke,`cooee-savings-bar`),t(Ge,`cooee-progressbar`),t(it,`cooee-video-playlist`),t(nt,`cooee-video-popup`),t(ot,`cooee-video-stories`),t(Ne,`cooee-product-options-picker`),t(Qe,`cooee-collection-filter`),sessionStorage.cooeeDebug&&import('./debugger.component-
|
|
38
|
+
`],encapsulation:3})};async function Rs(){let n=await yC(Ii),t=(e,i)=>{let o=Pi(e,{injector:n.injector});customElements.get(i)||customElements.define(i,o);};t(tt,`cooee-sticky-atc`),t(Ke,`cooee-savings-bar`),t(Ge,`cooee-progressbar`),t(it,`cooee-video-playlist`),t(nt,`cooee-video-popup`),t(ot,`cooee-video-stories`),t(Ne,`cooee-product-options-picker`),t(Qe,`cooee-collection-filter`),sessionStorage.cooeeDebug&&import('./debugger.component-ByuR7lKZ-CX1QroL5.js').then(e=>{t(e.DebuggerComponent,`cooee-debugger`);}),window.cooeeShowQuickItem=(e,i)=>{n.injector.get(Je).showItemQuickView(e,i);};}
|
|
39
39
|
|
|
40
|
-
var
|
|
40
|
+
var widgetsBd2Nyb3V = /*#__PURE__*/Object.freeze({
|
|
41
41
|
__proto__: null,
|
|
42
42
|
loadAngularWidgets: Rs
|
|
43
43
|
});
|
|
44
44
|
|
|
45
|
-
export { $v as $, ic as A, BD as B, Ko as C, tv as D, Ef as E, ac as F, Ge$2 as G, HD as H, ID as I, Hf as J, Ke$1 as K, Lf as L, Mf as M, $f as N, Wt$1 as O, Pf as P, Qo as Q, Ro as R, SN as S, TN as T, Ss as U, VD as V, W, XE as X, Yo as Y, cc as Z, Sf as _, a, WD as a0, LD as a1, Iu as a2, wu as a3, KD as a4, PD as a5, Af as a6, xv as a7, op as a8, rp as a9, Nv as aa, Uv as ab, hm as ac,
|
|
45
|
+
export { $v as $, ic as A, BD as B, Ko as C, tv as D, Ef as E, ac as F, Ge$2 as G, HD as H, ID as I, Hf as J, Ke$1 as K, Lf as L, Mf as M, $f as N, Wt$1 as O, Pf as P, Qo as Q, Ro as R, SN as S, TN as T, Ss as U, VD as V, W, XE as X, Yo as Y, cc as Z, Sf as _, a, WD as a0, LD as a1, Iu as a2, wu as a3, KD as a4, PD as a5, Af as a6, xv as a7, op as a8, rp as a9, Nv as aa, Uv as ab, hm as ac, widgetsBd2Nyb3V as ad, Sv as b, ge$1 as c, Bv as d, Hv as e, fm as f, gf as g, g as h, nc as i, bf as j, kf as k, jt$1 as l, Ye$1 as m, np as n, oc as o, be$1 as p, Kt as q, rc as r, qt as s, KE as t, YE as u, vd as v, Wt as w, $t as x, ye$2 as y, zt as z };
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@letscooee/web-sdk",
|
|
3
3
|
"description": "Engage uniquely and boost conversions with AI-powered customer journeys driven by real-time intent",
|
|
4
|
-
"version": "14.10.
|
|
4
|
+
"version": "14.10.4",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"postinstall": "bash .dev/setup.sh",
|
|
7
7
|
"lint": "ng lint",
|
|
File without changes
|