@letscooee/web-sdk 14.2.1 → 14.2.3
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-CsgzKo0Z-C-9ROrXI.js → debugger.component-f4r_AGlF-Bzhbfrtf.js} +1 -1
- package/dist/main.min.js +10 -10
- package/dist/{share-dialog.component-DD9iwCV3-CNUe6AKH.js → share-dialog.component-Hqd1r1i5-vgYzk-7x.js} +2 -2
- package/dist/{video-detail-dialog.component-CYKja1k0-CVKmp82J.js → video-detail-dialog.component-LxhnmfX6-DWRv7oCM.js} +4 -4
- package/dist/{widgets-CUxJhNr_-BRQuS2zV.js → widgets-DKSCYY7I-DPj-3zy4.js} +5 -5
- package/package.json +1 -1
- /package/dist/{renderer-CQkxdl7D-BEtrIfjE.js → renderer-CPG_uW1d-BEtrIfjE.js} +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import './main.min.js';
|
|
2
|
-
import { h as g, j as W, G as Ge, K as Ke, o as of, y as ye, k as Ka, u as uv, J as Ja, S as Sf, D as Df } from './widgets-
|
|
3
|
-
import { l, f } from './video-detail-dialog.component-
|
|
2
|
+
import { h as g, j as W, G as Ge, K as Ke, o as of, y as ye, k as Ka, u as uv, J as Ja, S as Sf, D as Df } from './widgets-DKSCYY7I-DPj-3zy4.js';
|
|
3
|
+
import { l, f } from './video-detail-dialog.component-LxhnmfX6-DWRv7oCM.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=of({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&&(Ka(0,`div`,0)(1,`div`,1)(2,`h3`),uv(3,`Share`),Ja(),Ka(4,`button`,2),Sf(`click`,function(e){return t.onShareAndClose(e)}),Df(5,`cooee-icon`,3),Ja()(),Ka(6,`div`,4)(7,`button`,5),Sf(`click`,function(e){return t.onShareAndClose(e,`Whatsapp`)}),Df(8,`cooee-icon`,6),Ka(9,`span`),uv(10,`Whatsapp`),Ja()(),Ka(11,`button`,7),Sf(`click`,function(e){return t.onShareAndClose(e,`X(Twitter)`)}),Df(12,`cooee-icon`,8),Ka(13,`span`),uv(14,`X`),Ja()(),Ka(15,`button`,9),Sf(`click`,function(e){return t.onShareAndClose(e,`Clipboard`)}),Df(16,`cooee-icon`,10),Ka(17,`span`),uv(18,`Copy link`),Ja()()()());},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 { I as Ir, V as Ve, H as He, s as se, M, t, T as Tr, l as l$1, O, k as ki, c as ce, Y, a as V } from './main.min.js';
|
|
2
|
-
import { l as Mt, h as g, m as Ye, n as Se$1, G as Ge, j as W, o as of, L as Lt, N as Nt, B as Bt, p as TE, q as wE, r as jt, R as Rt, y as ye, k as Ka, S as Sf, s as ec, w as wD, $ as $o, J as Ja, t as lf, v as jD, x as yf, c as ud, _ as _D, z as nc, A as Rf, C as xf, E as $b, F as Ro, K as Ke, O as Ft, D as Df, U as Ub, P as Cs, V as Vo, X as Xa, H as Ho, Q as rc, Z as mf, a0 as ND, a1 as vD, a2 as fu, a3 as pu, a4 as kD, a5 as ED, a6 as Ef, a7 as gv, a8 as Zf, a9 as qf, aa as fv, ab as Sv, ac as Kg } from './widgets-
|
|
2
|
+
import { l as Mt, h as g, m as Ye, n as Se$1, G as Ge, j as W, o as of, L as Lt, N as Nt, B as Bt, p as TE, q as wE, r as jt, R as Rt, y as ye, k as Ka, S as Sf, s as ec, w as wD, $ as $o, J as Ja, t as lf, v as jD, x as yf, c as ud, _ as _D, z as nc, A as Rf, C as xf, E as $b, F as Ro, K as Ke, O as Ft, D as Df, U as Ub, P as Cs, V as Vo, X as Xa, H as Ho, Q as rc, Z as mf, a0 as ND, a1 as vD, a2 as fu, a3 as pu, a4 as kD, a5 as ED, a6 as Ef, a7 as gv, a8 as Zf, a9 as qf, aa as fv, ab as Sv, ac as Kg } from './widgets-DKSCYY7I-DPj-3zy4.js';
|
|
3
3
|
|
|
4
4
|
var f=(t,e,o,r)=>{if(!e)return;let i=new Ir(`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=Ub.required();progress=Mt(0);constructor(){Cs(t=>{let e=this.video(),i=()=>{this.progress.set(e.currentTime/e.duration*100);};e.addEventListener(`timeupdate`,i),t(()=>{e.removeEventListener(`timeupdate`,i);});});}static ɵfac=function(e){return new(e||n)};static ɵcmp=of({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,i){e&1&&(Vo(0,`div`,0)(1,`div`,1),Xa(2,`div`),Ho()()),e&2&&(ud(),rc(`width`,i.progress(),`%`),mf(`aria-valuenow`,i.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=$b();dialog=g(Ro);triggerData=g(Ke)().triggerData;eventData=g(Ge);containerRef=g(Ft);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-DD9iwCV3-CNUe6AKH.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=of({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,i){e&1&&(Ka(0,`button`,0),Sf(`click`,function(r){return i.share(r)}),Df(1,`cooee-icon`,1),Ja());},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&&(Ka(0,`div`,11),Df(1,`div`,15),Ja());}function Me(n,t){if(n&1&&Df(0,`source`,13),n&2){let e=t.$implicit;yf(`type`,gv(e.mimeType))(`src`,e.url);}}function Oe(n,t){n&1&&Ef(0);}function Ne(n,t){if(n&1){let e=ND();Ka(0,`cooee-video-promoted-items`,24),Sf(`cardClick`,function(o){fu(e);let r=kD(2).$implicit;return pu(kD().productCardClicked(o,r.video))}),Ja();}if(n&2){let e=kD(2).$implicit;yf(`items`,e.video.items);}}function ze(n,t){if(n&1&&Df(0,`cooee-video-card`,23),n&2){let e=kD(2).$implicit;yf(`card`,e.video.card);}}function Fe(n,t){if(n&1){let e=ND();Df(0,`cooee-video-progress-bar`,16),Ka(1,`div`,17)(2,`cooee-mute-toggle`,18),Zf(`mutedChange`,function(o){fu(e);let r=kD(2);return fv(r.muted,o)||(r.muted=o),pu(o)}),Sf(`toggled`,function(){fu(e);return pu(kD(2).muteToggled())}),Ja(),lf(3,Oe,1,0,`ng-container`,8),Ja(),Ka(4,`div`,19)(5,`cooee-share-button`,20),Sf(`dialogState`,function(o){fu(e);return pu(kD(2).shareDialogOpen.set(o))}),Ja()(),Ka(6,`div`,21),vD(7,Ne,1,1,`cooee-video-promoted-items`,22)(8,ze,1,1,`cooee-video-card`,23),Ja();}if(n&2){let e=kD().$implicit,i=jD(5),o=kD(),r=jD(9);yf(`video`,i),ud(2),qf(`muted`,o.muted),yf(`videoEl`,i),ud(),yf(`ngTemplateOutlet`,r),ud(4),ED(e.video.items.length&&o.videoConfig.showItems()?7:e.video.card&&o.videoConfig.footerContent===o.VideoConfigFooterContent.CARD?8:-1);}}function Le(n,t){if(n&1){let e=ND();Ka(0,`cooee-item-detail`,25),Sf(`closeClick`,function(){fu(e);return pu(kD(2).productModalClosed())}),Ja();}if(n&2){let e=kD(2);yf(`item`,e.selectedItem)(`similarItems`,e.selectedVideo.items)(`template`,e.videoConfig.itemDetailConfig.template);}}function Re(n,t){if(n&1){let e=ND();Ka(0,`div`,6)(1,`div`,9)(2,`div`,10),vD(3,ke,2,0,`div`,11),Ka(4,`video`,12,2),Sf(`click`,function(){let o=fu(e).$index,r=kD();return pu(r.currentIndex===o&&r.toggleMute())})(`ended`,function(){fu(e);let o=jD(5);return pu(kD().onVideoEnded(o))})(`loadstart`,function(){let o=fu(e).$index;return pu(kD().onVideoLoadStart(o))})(`canplay`,function(){let o=fu(e).$index;return pu(kD().onVideoCanPlay(o))}),wD(6,Me,1,3,`source`,13,Pe),Ja(),vD(8,Fe,9,5),Ja(),vD(9,Le,1,3,`cooee-item-detail`,14),Ja()();}if(n&2){let e=t.$implicit,i=t.$index,o=kD();ud(2),rc(`background-image`,e.video.thumbnail?`url(`+e.video.thumbnail+`)`:null),ud(),ED(o.shouldShowVideoSpinner(i)?3:-1),ud(),yf(`ngClass`,o.viewTemplateClassName)(`muted`,true),mf(`preload`,o.isVideoVisible(i)?`metadata`:`none`)(`data-video-id`,e.video.id)(`autoplay`,null),ud(2),_D(e.video.sources),ud(2),ED(o.currentIndex===i?8:-1),ud(),ED(o.selectedItem&&o.currentIndex===i?9:-1);}}function Ae(n,t){n&1&&Ef(0);}function Be(n,t){if(n&1){let e=ND();Ka(0,`button`,26),Sf(`click`,function(){fu(e);return pu(kD().close())}),Df(1,`cooee-icon`,27),Ja();}}var Ee=class n{swiperComponent;videoElements;VideoConfigFooterContent=se;currentIndex=0;muted=Mt(false);selectedItem=null;selectedVideo;detailPopupTemplate;viewTemplateClassName=`lc-video-only-view`;shareDialogOpen=Mt(false);data=g(Ye);elementRef=g(Se$1);eventData=g(Ge);dialogRef=g(W);swiperInitialized=Mt(false);swiperOptions=Mt(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 Tr,this.navigationConfig=new l$1({enabled:true,size:50,color:new O({h:`#000000`})}),this.cssLoadedPromise=ki(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;}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=>Y.error(e));}onVideoEnded(t){if(this.currentIndex<this.videoEntries.length-1)this.selectedItem||this.shareDialogOpen()?this.playVideo(t):this.moveToNextVideo();else {let i=[`CE Last Video Ended`,{previous:this.getPreviousVideoDataForEvent()},{triggerData:this.engagementTrigger}];window.CooeeSDK.events.push(i),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 Ir(`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 o=new Ir(`CE More Item Info Clicked`,{current:{videoID:e.id,videoIndex:this.currentIndex}},this.engagementTrigger);o.setVideos(e),window.CooeeSDK.sendEvent(o),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,i=this.currentIndex+1;return t===this.currentIndex||t===e||t===i}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:i=>{this.swiperInitialized.set(true),setTimeout(()=>{i.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(o=>o.nativeElement.dataset.videoId===this.videoEntries[this.currentIndex].video.id)?.nativeElement;t.playedTillMS=Math.ceil(e?.currentTime*1e3);let i=e?.duration*1e3;return t.playedTillPercent=+(t.playedTillMS/i).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(u=>u.video.sources?.[0]).filter(u=>u?.width&&u?.height).map(u=>({width:u.width,height:u.height,aspectRatio:u.width/u.height}));if(t.length===0)return null;let e=t[0],i=window.innerWidth*.9,o=window.innerHeight*.9,r=i/e.width,k=o/e.height,A=Math.min(r,k);return {width:Math.floor(e.width*A),height:Math.floor(e.height*A)}}setVideoContainerDimensions(t,e){let i=this.elementRef.nativeElement;i.style.setProperty(`--video-container-width`,`${t}px`),i.style.setProperty(`--video-container-height`,`${e}px`);}onResize(){this.applyOptimalVideoDimensions();}static ɵfac=function(e){return new(e||n)};static ɵcmp=of({type:n,selectors:[[`cooee-video-detail-dialog`]],viewQuery:function(e,i){if(e&1&&nc(Te,7)(Ie,5),e&2){let o;Rf(o=xf())&&(i.swiperComponent=o.first),Rf(o=xf())&&(i.videoElements=o);}},hostAttrs:[1,`letscooee-widget`],hostBindings:function(e,i){e&1&&Sf(`keydown.escape`,function(r){return i.onKeyDown(r)},Kg);},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`,`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`],[3,`card`],[3,`cardClick`,`items`],[1,`swiper-no-swiping`,`swiper-no-mousewheel`,3,`closeClick`,`item`,`similarItems`,`template`],[`type`,`button`,`aria-label`,`Close`,1,`lc-close-button`,3,`click`],[`name`,`close`,`aria-hidden`,`true`]],template:function(e,i){if(e&1&&(Ka(0,`div`,3)(1,`cooee-swiper`,4,0),Sf(`slideChange`,function(r){return i.onSlideChange(r)}),ec(3,5),wD(4,Re,10,10,`div`,6,Se),$o(),Ja(),Ka(6,`div`,7),lf(7,Ae,1,0,`ng-container`,8),Ja()(),lf(8,Be,2,0,`ng-template`,null,1,Sv)),e&2){let o=jD(9);yf(`ngClass`,i.viewTemplateClassName),ud(),yf(`options`,i.swiperOptions())(`navigationConfig`,i.navigationConfig),ud(3),_D(i.videoEntries),ud(3),yf(`ngTemplateOutlet`,o);}},dependencies:[Lt,Nt,Bt,P,S,TE,wE,jt,Rt,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=Ub.required();progress=Mt(0);constructor(){Cs(t=>{let e=this.video(),i=()=>{this.progress.set(e.currentTime/e.duration*100);};e.addEventListener(`timeupdate`,i),t(()=>{e.removeEventListener(`timeupdate`,i);});});}static ɵfac=function(e){return new(e||n)};static ɵcmp=of({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,i){e&1&&(Vo(0,`div`,0)(1,`div`,1),Xa(2,`div`),Ho()()),e&2&&(ud(),rc(`width`,i.progress(),`%`),mf(`aria-valuenow`,i.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=$b();dialog=g(Ro);triggerData=g(Ke)().triggerData;eventData=g(Ge);containerRef=g(Ft);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-Hqd1r1i5-vgYzk-7x.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=of({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,i){e&1&&(Ka(0,`button`,0),Sf(`click`,function(r){return i.share(r)}),Df(1,`cooee-icon`,1),Ja());},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&&(Ka(0,`div`,11),Df(1,`div`,15),Ja());}function Me(n,t){if(n&1&&Df(0,`source`,13),n&2){let e=t.$implicit;yf(`type`,gv(e.mimeType))(`src`,e.url);}}function Oe(n,t){n&1&&Ef(0);}function Ne(n,t){if(n&1){let e=ND();Ka(0,`cooee-video-promoted-items`,24),Sf(`cardClick`,function(o){fu(e);let r=kD(2).$implicit;return pu(kD().productCardClicked(o,r.video))}),Ja();}if(n&2){let e=kD(2).$implicit;yf(`items`,e.video.items);}}function ze(n,t){if(n&1&&Df(0,`cooee-video-card`,23),n&2){let e=kD(2).$implicit;yf(`card`,e.video.card);}}function Fe(n,t){if(n&1){let e=ND();Df(0,`cooee-video-progress-bar`,16),Ka(1,`div`,17)(2,`cooee-mute-toggle`,18),Zf(`mutedChange`,function(o){fu(e);let r=kD(2);return fv(r.muted,o)||(r.muted=o),pu(o)}),Sf(`toggled`,function(){fu(e);return pu(kD(2).muteToggled())}),Ja(),lf(3,Oe,1,0,`ng-container`,8),Ja(),Ka(4,`div`,19)(5,`cooee-share-button`,20),Sf(`dialogState`,function(o){fu(e);return pu(kD(2).shareDialogOpen.set(o))}),Ja()(),Ka(6,`div`,21),vD(7,Ne,1,1,`cooee-video-promoted-items`,22)(8,ze,1,1,`cooee-video-card`,23),Ja();}if(n&2){let e=kD().$implicit,i=jD(5),o=kD(),r=jD(9);yf(`video`,i),ud(2),qf(`muted`,o.muted),yf(`videoEl`,i),ud(),yf(`ngTemplateOutlet`,r),ud(4),ED(e.video.items.length&&o.videoConfig.showItems()?7:e.video.card&&o.videoConfig.footerContent===o.VideoConfigFooterContent.CARD?8:-1);}}function Le(n,t){if(n&1){let e=ND();Ka(0,`cooee-item-detail`,25),Sf(`closeClick`,function(){fu(e);return pu(kD(2).productModalClosed())}),Ja();}if(n&2){let e=kD(2);yf(`item`,e.selectedItem)(`similarItems`,e.selectedVideo.items)(`template`,e.videoConfig.itemDetailConfig.template);}}function Re(n,t){if(n&1){let e=ND();Ka(0,`div`,6)(1,`div`,9)(2,`div`,10),vD(3,ke,2,0,`div`,11),Ka(4,`video`,12,2),Sf(`click`,function(){let o=fu(e).$index,r=kD();return pu(r.currentIndex===o&&r.toggleMute())})(`ended`,function(){fu(e);let o=jD(5);return pu(kD().onVideoEnded(o))})(`loadstart`,function(){let o=fu(e).$index;return pu(kD().onVideoLoadStart(o))})(`canplay`,function(){let o=fu(e).$index;return pu(kD().onVideoCanPlay(o))}),wD(6,Me,1,3,`source`,13,Pe),Ja(),vD(8,Fe,9,5),Ja(),vD(9,Le,1,3,`cooee-item-detail`,14),Ja()();}if(n&2){let e=t.$implicit,i=t.$index,o=kD();ud(2),rc(`background-image`,e.video.thumbnail?`url(`+e.video.thumbnail+`)`:null),ud(),ED(o.shouldShowVideoSpinner(i)?3:-1),ud(),yf(`ngClass`,o.viewTemplateClassName)(`muted`,true),mf(`preload`,o.isVideoVisible(i)?`metadata`:`none`)(`data-video-id`,e.video.id)(`autoplay`,null),ud(2),_D(e.video.sources),ud(2),ED(o.currentIndex===i?8:-1),ud(),ED(o.selectedItem&&o.currentIndex===i?9:-1);}}function Ae(n,t){n&1&&Ef(0);}function Be(n,t){if(n&1){let e=ND();Ka(0,`button`,26),Sf(`click`,function(){fu(e);return pu(kD().close())}),Df(1,`cooee-icon`,27),Ja();}}var Ee=class n{swiperComponent;videoElements;VideoConfigFooterContent=se;currentIndex=0;muted=Mt(false);selectedItem=null;selectedVideo;detailPopupTemplate;viewTemplateClassName=`lc-video-only-view`;shareDialogOpen=Mt(false);data=g(Ye);elementRef=g(Se$1);eventData=g(Ge);dialogRef=g(W);swiperInitialized=Mt(false);swiperOptions=Mt(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 Tr,this.navigationConfig=new l$1({enabled:true,size:50,color:new O({h:`#000000`})}),this.cssLoadedPromise=ki(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;}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=>Y.error(e));}onVideoEnded(t){if(this.currentIndex<this.videoEntries.length-1)this.selectedItem||this.shareDialogOpen()?this.playVideo(t):this.moveToNextVideo();else {let i=[`CE Last Video Ended`,{previous:this.getPreviousVideoDataForEvent()},{triggerData:this.engagementTrigger}];window.CooeeSDK.events.push(i),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 Ir(`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 o=new Ir(`CE More Item Info Clicked`,{current:{videoID:e.id,videoIndex:this.currentIndex}},this.engagementTrigger);o.setVideos(e),window.CooeeSDK.sendEvent(o),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,i=this.currentIndex+1;return t===this.currentIndex||t===e||t===i}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:i=>{this.swiperInitialized.set(true),setTimeout(()=>{i.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(o=>o.nativeElement.dataset.videoId===this.videoEntries[this.currentIndex].video.id)?.nativeElement;t.playedTillMS=Math.ceil(e?.currentTime*1e3);let i=e?.duration*1e3;return t.playedTillPercent=+(t.playedTillMS/i).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(u=>u.video.sources?.[0]).filter(u=>u?.width&&u?.height).map(u=>({width:u.width,height:u.height,aspectRatio:u.width/u.height}));if(t.length===0)return null;let e=t[0],i=window.innerWidth*.9,o=window.innerHeight*.9,r=i/e.width,k=o/e.height,A=Math.min(r,k);return {width:Math.floor(e.width*A),height:Math.floor(e.height*A)}}setVideoContainerDimensions(t,e){let i=this.elementRef.nativeElement;i.style.setProperty(`--video-container-width`,`${t}px`),i.style.setProperty(`--video-container-height`,`${e}px`);}onResize(){this.applyOptimalVideoDimensions();}static ɵfac=function(e){return new(e||n)};static ɵcmp=of({type:n,selectors:[[`cooee-video-detail-dialog`]],viewQuery:function(e,i){if(e&1&&nc(Te,7)(Ie,5),e&2){let o;Rf(o=xf())&&(i.swiperComponent=o.first),Rf(o=xf())&&(i.videoElements=o);}},hostAttrs:[1,`letscooee-widget`],hostBindings:function(e,i){e&1&&Sf(`keydown.escape`,function(r){return i.onKeyDown(r)},Kg);},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`,`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`],[3,`card`],[3,`cardClick`,`items`],[1,`swiper-no-swiping`,`swiper-no-mousewheel`,3,`closeClick`,`item`,`similarItems`,`template`],[`type`,`button`,`aria-label`,`Close`,1,`lc-close-button`,3,`click`],[`name`,`close`,`aria-hidden`,`true`]],template:function(e,i){if(e&1&&(Ka(0,`div`,3)(1,`cooee-swiper`,4,0),Sf(`slideChange`,function(r){return i.onSlideChange(r)}),ec(3,5),wD(4,Re,10,10,`div`,6,Se),$o(),Ja(),Ka(6,`div`,7),lf(7,Ae,1,0,`ng-container`,8),Ja()(),lf(8,Be,2,0,`ng-template`,null,1,Sv)),e&2){let o=jD(9);yf(`ngClass`,i.viewTemplateClassName),ud(),yf(`options`,i.swiperOptions())(`navigationConfig`,i.navigationConfig),ud(3),_D(i.videoEntries),ud(3),yf(`ngTemplateOutlet`,o);}},dependencies:[Lt,Nt,Bt,P,S,TE,wE,jt,Rt,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_componentLxhnmfX6 = /*#__PURE__*/Object.freeze({
|
|
10
10
|
__proto__: null,
|
|
11
11
|
VideoDetailDialogComponent: Ee
|
|
12
12
|
});
|
|
13
13
|
|
|
14
|
-
export { f, l,
|
|
14
|
+
export { f, l, videoDetailDialog_componentLxhnmfX6 as v };
|
|
@@ -27,18 +27,18 @@ var Ut=(()=>{class t{_renderer;_elementRef;onChange=e=>{};onTouched=()=>{};const
|
|
|
27
27
|
var Ui={schedule(n,t){let e=setTimeout(n,t);return ()=>clearTimeout(e)}};function Qi(n){return n.replace(/[A-Z]/g,t=>`-${t.toLowerCase()}`)}function Zi(n){return !!n&&n.nodeType===Node.ELEMENT_NODE}var it;function Wi(n,t){if(!it){let e=Element.prototype;it=e.matches||e.matchesSelector||e.mozMatchesSelector||e.msMatchesSelector||e.oMatchesSelector||e.webkitMatchesSelector;}return n.nodeType===Node.ELEMENT_NODE?it.call(n,t):false}function qi(n){let t={};return n.forEach(({propName:e,templateName:i,transform:a})=>{t[Qi(i)]=[e,a];}),t}function Gi(n,t){return t.get(Po$1).resolveComponentFactory(n).inputs}function Ki(n,t){let e=n.childNodes,i=t.map(()=>[]),a=-1;t.some((s,l)=>s===`*`?(a=l,true):false);for(let s=0,l=e.length;s<l;++s){let d=e[s],f=Yi(d,t,a);f!==-1&&i[f].push(d);}return i}function Yi(n,t,e){let i=e;return Zi(n)&&t.some((a,s)=>a!==`*`&&Wi(n,a)?(i=s,true):false),i}var Ji=10,ot=class{componentFactory;inputMap=new Map;constructor(t,e){this.componentFactory=e.get(Po$1).resolveComponentFactory(t);for(let i of this.componentFactory.inputs)this.inputMap.set(i.propName,i.templateName);}create(t){return new nt(this.componentFactory,t,this.inputMap)}},nt=class{componentFactory;injector;inputMap;eventEmitters=new gr$1(1);events=this.eventEmitters.pipe(ii$1(t=>ve$2(...t)));componentRef=null;scheduledDestroyFn=null;initialInputValues=new Map;ngZone;elementZone;appRef;cdScheduler;constructor(t,e,i){this.componentFactory=t,this.injector=e,this.inputMap=i,this.ngZone=this.injector.get(X),this.appRef=this.injector.get(ct),this.cdScheduler=e.get(tt$1),this.elementZone=typeof Zone>`u`?null:this.ngZone.run(()=>Zone.current);}connect(t){this.runInZone(()=>{if(this.scheduledDestroyFn!==null){this.scheduledDestroyFn(),this.scheduledDestroyFn=null;return}this.componentRef===null&&this.initializeComponent(t);});}disconnect(){this.runInZone(()=>{this.componentRef===null||this.scheduledDestroyFn!==null||(this.scheduledDestroyFn=Ui.schedule(()=>{this.componentRef!==null&&(this.componentRef.destroy(),this.componentRef=null);},Ji));});}getInputValue(t){return this.runInZone(()=>this.componentRef===null?this.initialInputValues.get(t):this.componentRef.instance[t])}setInputValue(t,e){if(this.componentRef===null){this.initialInputValues.set(t,e);return}this.runInZone(()=>{this.componentRef.setInput(this.inputMap.get(t)??t,e),ay(this.componentRef.hostView)&&(cy(this.componentRef.changeDetectorRef),this.cdScheduler.notify(6));});}initializeComponent(t){let e=Z.create({providers:[],parent:this.injector}),i=Ki(t,this.componentFactory.ngContentSelectors);this.componentRef=this.componentFactory.create(e,i,t),this.initializeInputs(),this.initializeOutputs(this.componentRef),this.appRef.attachView(this.componentRef.hostView),this.componentRef.hostView.detectChanges();}initializeInputs(){for(let[t,e]of this.initialInputValues)this.setInputValue(t,e);this.initialInputValues.clear();}initializeOutputs(t){let e=this.componentFactory.outputs.map(({propName:i,templateName:a})=>{let s=t.instance[i];return new m$1(l=>{let d=s.subscribe(f=>l.next({name:a,value:f}));return ()=>d.unsubscribe()})});this.eventEmitters.next(e);}runInZone(t){return this.elementZone&&Zone.current!==this.elementZone?this.ngZone.run(t):t()}},rt=class extends HTMLElement{ngElementEventsSubscription=null};function ui(n,t){let e=Gi(n,t.injector),i=t.strategyFactory||new ot(n,t.injector),a=qi(e);class s extends rt{injector;static observedAttributes=Object.keys(a);get ngElementStrategy(){if(!this._ngElementStrategy){let d=this._ngElementStrategy=i.create(this.injector||t.injector);e.forEach(({propName:f,transform:A})=>{if(!this.hasOwnProperty(f))return;let ne=this[f];delete this[f],d.setInputValue(f,ne,A);});}return this._ngElementStrategy}_ngElementStrategy;constructor(d){super(),this.injector=d;}attributeChangedCallback(d,f,A,ne){let[Se,Ge]=a[d];this.ngElementStrategy.setInputValue(Se,A,Ge);}connectedCallback(){let d=false;this.ngElementStrategy.events&&(this.subscribeToEvents(),d=true),this.ngElementStrategy.connect(this),d||this.subscribeToEvents();}disconnectedCallback(){this._ngElementStrategy&&this._ngElementStrategy.disconnect(),this.ngElementEventsSubscription&&(this.ngElementEventsSubscription.unsubscribe(),this.ngElementEventsSubscription=null);}subscribeToEvents(){this.ngElementEventsSubscription=this.ngElementStrategy.events.subscribe(d=>{let f=new CustomEvent(d.name,{detail:d.value});this.dispatchEvent(f);});}}return e.forEach(({propName:l,transform:d,isSignal:f})=>{Object.defineProperty(s.prototype,l,{get(){let A=this.ngElementStrategy.getInputValue(l);return f&&Ga(A)?A():A},set(A){this.ngElementStrategy.setInputValue(l,A,d);},configurable:true,enumerable:true});}),s}var fi={providers:[Mv()]};var at=n=>({active:n});function Xi(n,t){if(n&1&&(Ka(0,`span`,4),uv(1),Ja()),n&2){let e=kD(2);ud(),Wf(e.collectionFilterConfig.subtitle);}}function eo(n,t){if(n&1&&(Ka(0,`div`,1)(1,`span`,3),uv(2),Ja(),vD(3,Xi,2,1,`span`,4),Ja()),n&2){let e=kD();ud(2),Wf(e.collectionFilterConfig.title),ud(),ED(e.collectionFilterConfig.subtitle?3:-1);}}function to(n,t){if(n&1&&(Ka(0,`span`,9),uv(1),Ja()),n&2){let e=kD(2).$implicit;yf(`ngClass`,Ev(2,at,hv(0))),ud(),ic(``,e.label,` `);}}function io(n,t){if(n&1){let e=ND();Ka(0,`div`,7),Sf(`mousedown`,function(){fu(e);let a=kD().$implicit,s=hv(0);return pu(kD(2).filterClick(a,s))}),Df(1,`img`,8),vD(2,to,2,4,`span`,9),Ja();}if(n&2){let e=kD().$implicit,i=hv(0);ud(),yf(`src`,e.imageSrc,Qg)(`ngClass`,Ev(3,at,i)),ud(),ED(e.label?2:-1);}}function oo(n,t){if(n&1){let e=ND();Ka(0,`button`,10),Sf(`click`,function(){fu(e);let a=kD().$implicit,s=hv(0);return pu(kD(2).filterClick(a,s))}),uv(1),Ja();}if(n&2){let e=kD().$implicit;yf(`ngClass`,Ev(2,at,hv(0))),ud(),ic(``,e.label,` `);}}function no(n,t){if(n&1&&(Qf(0),vD(1,io,3,5,`div`,5)(2,oo,2,4,`button`,6)),n&2){let e=t.$implicit,i=kD(2);pv(e.value===i.currentActiveParams()[e.key]),ud(),ED(i.collectionFilterConfig.template===i.CollectionFilterTemplate.IMAGE?1:i.collectionFilterConfig.template===i.CollectionFilterTemplate.BUTTON?2:-1);}}function ro(n,t){if(n&1&&wD(0,no,3,2,null,null,ID),n&2)_D(kD().collectionFilterConfig.options);}var Be=class n extends Fe{currentActiveParams=Mt$2({});collectionFilterConfig;CollectionFilterTemplate=Fe$3;originalPushState;constructor(){super(),this.attachedURLStateChecker();}engagementTriggerReceived(t){this.collectionFilterConfig=t.content.collectionFilterConfig;}update(){}ngOnDestroy(){this.originalPushState&&(window.history.pushState=this.originalPushState);}filterClick(t,e=false){let i=new URL(window.location.href),a=e?`removed`:`applied`;if(e?i.searchParams.delete(t.key):i.searchParams.set(t.key,t.value),this.collectionFilterConfig.refreshPage){this.sendEvent(t,a),window.location.href=i.href;return}window.history.replaceState({path:i.href},``,i),this.sendEvent(t,a),this.checkAndUpdateParams();}sendEvent(t,e){let i=new Ir$1(`CE Trigger Clicked`,{filterApplication:e,filter:{key:t.key,value:t.value}},this.engagementTrigger);window.CooeeSDK.sendEvent(i);}attachedURLStateChecker(){this.checkAndUpdateParams(),this.originalPushState=window.history.pushState,window.history.pushState=new Proxy(window.history.pushState,{apply:(t,e,i)=>{t.apply(e,i),this.checkAndUpdateParams();}});}checkAndUpdateParams(){let t=new URL(window.location.href),e={};t.searchParams.forEach((i,a)=>{e[a]=i;}),this.currentActiveParams.set(e);}static ɵfac=function(e){return new(e||n)};static ɵcmp=of({type:n,selectors:[[`cooee-collection-filter`]],features:[Xf(kt()),za],decls:4,vars:2,consts:[[1,`wrapper`],[1,`filter-title-container`],[1,`options-container`],[1,`filter-title`],[1,`filter-subtitle`],[1,`image-filter-wrapper`],[`type`,`button`,1,`filter-button`,3,`ngClass`],[1,`image-filter-wrapper`,3,`mousedown`],[`alt`,`collection filter image`,1,`filter-image`,3,`src`,`ngClass`],[1,`filter-label`,3,`ngClass`],[`type`,`button`,1,`filter-button`,3,`click`,`ngClass`]],template:function(e,i){e&1&&(Ka(0,`div`,0),vD(1,eo,4,2,`div`,1),Ka(2,`div`,2),vD(3,ro,2,0),Ja()()),e&2&&(ud(),ED(i.collectionFilterConfig.title?1:-1),ud(2),ED(i.collectionFilterConfig.options.length?3:-1));},dependencies:[wE],styles:[`.wrapper{display:flex;flex-direction:column;gap:10px;padding:10px;justify-content:center;align-items:center}.filter-title-container{display:flex;flex-direction:column;gap:5px;align-items:center}.filter-title-container .filter-title{color:rgba(var(--lc-heading-color));font-family:var(--lc-heading-family),serif;font-weight:var(--lc-heading-weight);font-size:var(--lc-heading-size);transform:var(--lc-heading-transform);letter-spacing:var(--lc-heading-letter-spacing);text-align:var(--lc-heading-align)}.filter-title-container .filter-subtitle{color:rgba(var(--lc-subheading-color));font-weight:var(--lc-subheading-weight);font-size:var(--lc-subheading-size)}.options-container{display:flex;gap:35px;align-items:center;flex-wrap:wrap;justify-content:center}.options-container .image-filter-wrapper{display:flex;gap:10px;flex-direction:column;align-items:center;cursor:pointer}.options-container .image-filter-wrapper .filter-image{width:var(--lc-image-width, 80px);height:var(--lc-image-height, 80px);border-radius:40px}.options-container .image-filter-wrapper .filter-image.active{border:2px solid rgba(var(--lc-primary-color));padding:2px}.options-container .image-filter-wrapper .filter-label{font-size:var(--lc-text-size, 14px);color:rgba(var(--lc-text-color));font-weight:var(--lc-text-weight)}.options-container .image-filter-wrapper .filter-label.active{color:rgba(var(--lc-primary-color))}.options-container .filter-button{background-color:rgba(var(--lc-secondary-button-bg-color));font-size:var(--lc-button-size, 14px);color:rgba(var(--lc-secondary-button-color));border-color:rgba(var(--lc-secondary-button-border-color));font-weight:var(--lc-secondary-button-weight);border-radius:var(--lc-button-radius);font-family:var(--lc-button-family),serif;height:var(--lc-button-height, 36px);padding:0 16px}.options-container .filter-button:hover,.options-container .filter-button.active{background-color:rgba(var(--lc-primary-button-bg-color));color:rgba(var(--lc-primary-button-color));border-color:rgba(var(--lc-primary-button-border-color));font-weight:var(--lc-primary-button-weight)}
|
|
28
28
|
`],encapsulation:3})};var Ne=class n{transform(t,e){return t?qe$2(t,r({},e)):null}static ɵfac=function(e){return new(e||n)};static ɵpipe=jo({name:`cooeeDynamicVariables`,type:n,pure:true})};var st={};(function n(t,e,i,a){var s=!!(t.Worker&&t.Blob&&t.Promise&&t.OffscreenCanvas&&t.OffscreenCanvasRenderingContext2D&&t.HTMLCanvasElement&&t.HTMLCanvasElement.prototype.transferControlToOffscreen&&t.URL&&t.URL.createObjectURL),l=typeof Path2D==`function`&&typeof DOMMatrix==`function`,d=(function(){if(!t.OffscreenCanvas)return false;var r=new OffscreenCanvas(1,1),o=r.getContext(`2d`);o.fillRect(0,0,1,1);var m=r.transferToImageBitmap();try{o.createPattern(m,`no-repeat`);}catch{return false}return true})();function f(){}function A(r){var o=e.exports.Promise,m=o!==void 0?o:t.Promise;return typeof m==`function`?new m(r):(r(f,f),null)}var ne=(function(r,o){return {transform:function(m){if(r)return m;if(o.has(m))return o.get(m);var g=new OffscreenCanvas(m.width,m.height);return g.getContext(`2d`).drawImage(m,0,0),o.set(m,g),g},clear:function(){o.clear();}}})(d,new Map),Se=(function(){var r=Math.floor(16.666666666666668),o,m,g={},C=0;return typeof requestAnimationFrame==`function`&&typeof cancelAnimationFrame==`function`?(o=function(y){var _=Math.random();return g[_]=requestAnimationFrame(function u(x){C===x||C+r-1<x?(C=x,delete g[_],y()):g[_]=requestAnimationFrame(u);}),_},m=function(y){g[y]&&cancelAnimationFrame(g[y]);}):(o=function(y){return setTimeout(y,r)},m=function(y){return clearTimeout(y)}),{frame:o,cancel:m}})(),Ge=(function(){var r,o,m={};function g(C){function y(_,u){C.postMessage({options:_||{},callback:u});}C.init=function(u){var x=u.transferControlToOffscreen();C.postMessage({canvas:x},[x]);},C.fire=function(u,x,V){if(o)return y(u,null),o;var k=Math.random().toString(36).slice(2);return o=A(function(E){function P(N){N.data.callback===k&&(delete m[k],C.removeEventListener(`message`,P),o=null,ne.clear(),V(),E());}C.addEventListener(`message`,P),y(u,k),m[k]=P.bind(null,{data:{callback:k}});}),o},C.reset=function(){C.postMessage({reset:true});for(var u in m)m[u](),delete m[u];};}return function(){if(r)return r;if(!i&&s){var C=[`var CONFETTI, SIZE = {}, module = {};`,`(`+n.toString()+`)(this, module, true, SIZE);`,`onmessage = function(msg) {`,` if (msg.data.options) {`,` CONFETTI(msg.data.options).then(function () {`,` if (msg.data.callback) {`,` postMessage({ callback: msg.data.callback });`,` }`,` });`,` } else if (msg.data.reset) {`,` CONFETTI && CONFETTI.reset();`,` } else if (msg.data.resize) {`,` SIZE.width = msg.data.resize.width;`,` SIZE.height = msg.data.resize.height;`,` } else if (msg.data.canvas) {`,` SIZE.width = msg.data.canvas.width;`,` SIZE.height = msg.data.canvas.height;`,` CONFETTI = module.exports.create(msg.data.canvas);`,` }`,`}`].join(`
|
|
29
29
|
`);try{r=new Worker(URL.createObjectURL(new Blob([C])));}catch(y){return typeof console.warn==`function`&&console.warn(`🎊 Could not load worker`,y),null}g(r);}return r}})(),Ci={particleCount:50,angle:90,spread:45,startVelocity:45,decay:.9,gravity:1,drift:0,ticks:200,x:.5,y:.5,shapes:[`square`,`circle`],zIndex:100,colors:[`#26ccff`,`#a25afd`,`#ff5e7e`,`#88ff5a`,`#fcff42`,`#ffa62d`,`#ff36ff`],disableForReducedMotion:false,scalar:1};function yi(r,o){return o?o(r):r}function _i(r){return r!=null}function L(r,o,m){return yi(r&&_i(r[o])?r[o]:Ci[o],m)}function xi(r){return r<0?0:Math.floor(r)}function bi(r,o){return Math.floor(Math.random()*(o-r))+r}function Ke(r){return parseInt(r,16)}function wi(r){return r.map(Vi)}function Vi(r){var o=String(r).replace(/[^0-9a-f]/gi,``);return o.length<6&&(o=o[0]+o[0]+o[1]+o[1]+o[2]+o[2]),{r:Ke(o.substring(0,2)),g:Ke(o.substring(2,4)),b:Ke(o.substring(4,6))}}function Ei(r){var o=L(r,`origin`,Object);return o.x=L(o,`x`,Number),o.y=L(o,`y`,Number),o}function Ti(r){r.width=document.documentElement.clientWidth,r.height=document.documentElement.clientHeight;}function Si(r){var o=r.getBoundingClientRect();r.width=o.width,r.height=o.height;}function Ii(r){var o=document.createElement(`canvas`);return o.style.position=`fixed`,o.style.top=`0px`,o.style.left=`0px`,o.style.pointerEvents=`none`,o.style.zIndex=r,o}function Mi(r,o,m,g,C,y,_,u,x){r.save(),r.translate(o,m),r.rotate(y),r.scale(g,C),r.arc(0,0,1,_,u,x),r.restore();}function ki(r){var o=r.angle*(Math.PI/180),m=r.spread*(Math.PI/180);return {x:r.x,y:r.y,wobble:Math.random()*10,wobbleSpeed:Math.min(.11,Math.random()*.1+.05),velocity:r.startVelocity*.5+Math.random()*r.startVelocity,angle2D:-o+(.5*m-Math.random()*m),tiltAngle:(Math.random()*.5+.25)*Math.PI,color:r.color,shape:r.shape,tick:0,totalTicks:r.ticks,decay:r.decay,drift:r.drift,random:Math.random()+2,tiltSin:0,tiltCos:0,wobbleX:0,wobbleY:0,gravity:r.gravity*3,ovalScalar:.6,scalar:r.scalar,flat:r.flat}}function Pi(r,o){o.x+=Math.cos(o.angle2D)*o.velocity+o.drift,o.y+=Math.sin(o.angle2D)*o.velocity+o.gravity,o.velocity*=o.decay,o.flat?(o.wobble=0,o.wobbleX=o.x+10*o.scalar,o.wobbleY=o.y+10*o.scalar,o.tiltSin=0,o.tiltCos=0,o.random=1):(o.wobble+=o.wobbleSpeed,o.wobbleX=o.x+10*o.scalar*Math.cos(o.wobble),o.wobbleY=o.y+10*o.scalar*Math.sin(o.wobble),o.tiltAngle+=.1,o.tiltSin=Math.sin(o.tiltAngle),o.tiltCos=Math.cos(o.tiltAngle),o.random=Math.random()+2);var m=o.tick++/o.totalTicks,g=o.x+o.random*o.tiltCos,C=o.y+o.random*o.tiltSin,y=o.wobbleX+o.random*o.tiltCos,_=o.wobbleY+o.random*o.tiltSin;if(r.fillStyle=`rgba(`+o.color.r+`, `+o.color.g+`, `+o.color.b+`, `+(1-m)+`)`,r.beginPath(),l&&o.shape.type===`path`&&typeof o.shape.path==`string`&&Array.isArray(o.shape.matrix))r.fill(Di(o.shape.path,o.shape.matrix,o.x,o.y,Math.abs(y-g)*.1,Math.abs(_-C)*.1,Math.PI/10*o.wobble));else if(o.shape.type===`bitmap`){var u=Math.PI/10*o.wobble,x=Math.abs(y-g)*.1,V=Math.abs(_-C)*.1,k=o.shape.bitmap.width*o.scalar,E=o.shape.bitmap.height*o.scalar,P=new DOMMatrix([Math.cos(u)*x,Math.sin(u)*x,-Math.sin(u)*V,Math.cos(u)*V,o.x,o.y]);P.multiplySelf(new DOMMatrix(o.shape.matrix));var N=r.createPattern(ne.transform(o.shape.bitmap),`no-repeat`);N.setTransform(P),r.globalAlpha=1-m,r.fillStyle=N,r.fillRect(o.x-k/2,o.y-E/2,k,E),r.globalAlpha=1;}else if(o.shape===`circle`)r.ellipse?r.ellipse(o.x,o.y,Math.abs(y-g)*o.ovalScalar,Math.abs(_-C)*o.ovalScalar,Math.PI/10*o.wobble,0,2*Math.PI):Mi(r,o.x,o.y,Math.abs(y-g)*o.ovalScalar,Math.abs(_-C)*o.ovalScalar,Math.PI/10*o.wobble,0,2*Math.PI);else if(o.shape===`star`)for(var b=Math.PI/2*3,z=4*o.scalar,Z=8*o.scalar,W=o.x,re=o.y,fe=5,X=Math.PI/fe;fe--;)W=o.x+Math.cos(b)*Z,re=o.y+Math.sin(b)*Z,r.lineTo(W,re),b+=X,W=o.x+Math.cos(b)*z,re=o.y+Math.sin(b)*z,r.lineTo(W,re),b+=X;else r.moveTo(Math.floor(o.x),Math.floor(o.y)),r.lineTo(Math.floor(o.wobbleX),Math.floor(C)),r.lineTo(Math.floor(y),Math.floor(_)),r.lineTo(Math.floor(g),Math.floor(o.wobbleY));return r.closePath(),r.fill(),o.tick<o.totalTicks}function Fi(r,o,m,g,C){var y=o.slice(),_=r.getContext(`2d`),u,x,V=A(function(k){function E(){u=x=null,_.clearRect(0,0,g.width,g.height),ne.clear(),C(),k();}function P(){i&&!(g.width===a.width&&g.height===a.height)&&(g.width=r.width=a.width,g.height=r.height=a.height),!g.width&&!g.height&&(m(r),g.width=r.width,g.height=r.height),_.clearRect(0,0,g.width,g.height),y=y.filter(function(N){return Pi(_,N)}),y.length?u=Se.frame(P):E();}u=Se.frame(P),x=E;});return {addFettis:function(k){return y=y.concat(k),V},canvas:r,promise:V,reset:function(){u&&Se.cancel(u),x&&x();}}}function lt(r,o){var m=!r,g=!!L(o||{},`resize`),C=false,y=L(o,`disableForReducedMotion`,Boolean),u=s&&!!L(o||{},`useWorker`)?Ge():null,x=m?Ti:Si,V=r&&u?!!r.__confetti_initialized:false,k=typeof matchMedia==`function`&&matchMedia(`(prefers-reduced-motion)`).matches,E;function P(b,z,Z){for(var W=L(b,`particleCount`,xi),re=L(b,`angle`,Number),fe=L(b,`spread`,Number),X=L(b,`startVelocity`,Number),Ri=L(b,`decay`,Number),Oi=L(b,`gravity`,Number),Bi=L(b,`drift`,Number),dt=L(b,`colors`,wi),Ni=L(b,`ticks`,Number),pt=L(b,`shapes`),Hi=L(b,`scalar`),ji=!!L(b,`flat`),mt=Ei(b),ut=W,Je=[],zi=r.width*mt.x,$i=r.height*mt.y;ut--;)Je.push(ki({x:zi,y:$i,angle:re,spread:fe,startVelocity:X,color:dt[ut%dt.length],shape:pt[bi(0,pt.length)],ticks:Ni,decay:Ri,gravity:Oi,drift:Bi,scalar:Hi,flat:ji}));return E?E.addFettis(Je):(E=Fi(r,Je,x,z,Z),E.promise)}function N(b){var z=y||L(b,`disableForReducedMotion`,Boolean),Z=L(b,`zIndex`,Number);if(z&&k)return A(function(X){X();});m&&E?r=E.canvas:m&&!r&&(r=Ii(Z),document.body.appendChild(r)),g&&!V&&x(r);var W={width:r.width,height:r.height};u&&!V&&u.init(r),V=true,u&&(r.__confetti_initialized=true);function re(){if(u){var X={getBoundingClientRect:function(){if(!m)return r.getBoundingClientRect()}};x(X),u.postMessage({resize:{width:X.width,height:X.height}});return}W.width=W.height=null;}function fe(){E=null,g&&(C=false,t.removeEventListener(`resize`,re)),m&&r&&(document.body.contains(r)&&document.body.removeChild(r),r=null,V=false);}return g&&!C&&(C=true,t.addEventListener(`resize`,re,false)),u?u.fire(b,W,fe):P(b,W,fe)}return N.reset=function(){u&&u.reset(),E&&E.reset();},N}var Ye;function ct(){return Ye||(Ye=lt(null,{useWorker:true,resize:true})),Ye}function Di(r,o,m,g,C,y,_){var u=new Path2D(r),x=new Path2D;x.addPath(u,new DOMMatrix(o));var V=new Path2D;return V.addPath(x,new DOMMatrix([Math.cos(_)*C,Math.sin(_)*C,-Math.sin(_)*y,Math.cos(_)*y,m,g])),V}function Ai(r){if(!l)throw new Error(`path confetti are not supported in this browser`);var o,m;typeof r==`string`?o=r:(o=r.path,m=r.matrix);var g=new Path2D(o),y=document.createElement(`canvas`).getContext(`2d`);if(!m){for(var _=1e3,u=_,x=_,V=0,k=0,E,P,N=0;N<_;N+=2)for(var b=0;b<_;b+=2)y.isPointInPath(g,N,b,`nonzero`)&&(u=Math.min(u,N),x=Math.min(x,b),V=Math.max(V,N),k=Math.max(k,b));E=V-u,P=k-x;var z=10,Z=Math.min(z/E,z/P);m=[Z,0,0,Z,-Math.round(E/2+u)*Z,-Math.round(P/2+x)*Z];}return {type:`path`,path:o,matrix:m}}function Li(r){var o,m=1,g=`#000000`,C=`"Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji", "EmojiOne Color", "Android Emoji", "Twemoji Mozilla", "system emoji", sans-serif`;typeof r==`string`?o=r:(o=r.text,m=`scalar`in r?r.scalar:m,C=`fontFamily`in r?r.fontFamily:C,g=`color`in r?r.color:g);var y=10*m,_=``+y+`px `+C,u=new OffscreenCanvas(y,y),x=u.getContext(`2d`);x.font=_;var V=x.measureText(o),k=Math.ceil(V.actualBoundingBoxRight+V.actualBoundingBoxLeft),E=Math.ceil(V.actualBoundingBoxAscent+V.actualBoundingBoxDescent),P=2,N=V.actualBoundingBoxLeft+P,b=V.actualBoundingBoxAscent+P;k+=P+P,E+=P+P,u=new OffscreenCanvas(k,E),x=u.getContext(`2d`),x.font=_,x.fillStyle=g,x.fillText(o,N,b);var z=1/m;return {type:`bitmap`,bitmap:u.transferToImageBitmap(),matrix:[z,0,0,z,-k*z/2,-E*z/2]}}e.exports=function(){return ct().apply(this,arguments)},e.exports.reset=function(){ct().reset();},e.exports.create=lt,e.exports.shapeFromPath=Ai,e.exports.shapeFromText=Li;})((function(){return typeof window<`u`?window:typeof self<`u`?self:this||{}})(),st,false);var vi=st.exports;st.exports.create;var He=class{static DEFAULTS={scalar:1.4,zIndex:1e4,shapes:[`circle`,`circle`,`square`],colors:[`#f51c8f`,`#2179e2`,`#d52dc8`,`#01a9d9`,`#78ff44`,`#fdff6a`]};static async basic(){await this.fire({particleCount:100,spread:70,origin:{y:.6}});}static async leftRight(t=100){let e=[],i=Date.now()+2e3,a=()=>{e.push(this.fire({angle:60,spread:55,origin:{x:0}}),this.fire({angle:120,spread:55,origin:{x:1}})),Date.now()<i&&t>0&&(requestAnimationFrame(a),t--);};a(),await Promise.all(e);}static async realistic(){await Promise.all([this.realisticFire(.25,{spread:26,startVelocity:55}),this.realisticFire(.2,{spread:60}),this.realisticFire(.35,{spread:100,decay:.91,scalar:.8}),this.realisticFire(.1,{spread:120,startVelocity:25,decay:.92,scalar:1.2}),this.realisticFire(.1,{spread:120,startVelocity:45})]);}static async fire(t){Object.assign(t,this.DEFAULTS,t),t.particleCount=t.particleCount??this.DEFAULTS.colors.length,await vi(t);}static async realisticFire(t,e){await this.fire(Object.assign({},{origin:{y:.7}},e,{particleCount:Math.floor(200*t)}));}};var ao=(n,t)=>t.minValue;function so(n,t){if(n&1&&(Xa(0,`div`,7),Iv(1,`safeHtml`)),n&2){let e=kD().$implicit;_f(`innerHTML`,_v(1,1,e.minValue+` Products`),Yg);}}function lo(n,t){if(n&1&&(Xa(0,`div`,7),Iv(1,`cooeeCurrency`),Iv(2,`safeHtml`)),n&2){let e=kD().$implicit;_f(`innerHTML`,_v(2,3,_v(1,1,e.minValue)),Yg);}}function co(n,t){if(n&1&&(Vo$1(0,`li`,6)(1,`div`),vD(2,so,2,3,`div`,7)(3,lo,3,5,`div`,7),Xa(4,`img`,8),Vo$1(5,`div`,9),uv(6),Ho()()()),n&2){let e=t.$implicit,i=kD(2);rc(`left`,e.calculatedAlignment+`%`),ud(2),ED((i.progressBarConfig==null?null:i.progressBarConfig.rewardBasis)===i.RewardBasis.ITEM_COUNT?2:3),ud(2),_f(`src`,i.getIconURL(e),Qg),ud(2),Wf(e.label);}}function po(n,t){if(n&1&&(Xa(0,`div`,0),Iv(1,`cooeeDynamicVariables`),Iv(2,`safeHtml`),Vo$1(3,`div`,1)(4,`ul`,2)(5,`div`,3),Xa(6,`div`,4),Ho(),wD(7,co,7,5,`li`,5,ao),Ho()()),n&2){let e=kD(),i=e.calculatedState();_f(`innerHTML`,_v(2,6,Tv(1,3,i.nextMilestone?i.nextMilestone.reachingText:i.lastMilestone.reachedText,e.localDynamicVariables())),Yg),ud(6),rc(`width`,i.cartValuePercentage+`%`),ud(),_D(i.milestones);}}var je=class n extends Fe{cart;localDynamicVariables=Mt$2({});calculatedState=Mt$2({});progressBarConfig;RewardBasis=Re$2;constructor(){super();}engagementTriggerReceived(t){this.progressBarConfig=t.progressBarConfig;}ngOnInit(){super.ngOnInit(),this.calculateMilestonesSilently();}update(){this.calculateMilestonesSilently();}getIconURL(t){return (this.calculatedState().cartValuePercentage??0)>=t.calculatedAlignment&&t.images?.active?t.images.active:t.images?.base?t.images.base:t.rewardType===ge$3.FREE_SHIPPING?`https://img.icons8.com/ios-filled/50/FFFFFF/free-shipping.png`:t.rewardType===ge$3.DISCOUNT?`https://img.icons8.com/ios-glyphs/30/FFFFFF/sale-price-tag.png`:t.rewardType===ge$3.FREE_AUTO_GIFT?`https://img.icons8.com/ios-filled/50/FFFFFF/gift--v1.png`:``}calculateMilestonesSilently(){this.calculateMilestones().catch(t=>Y$1.error(t));}async calculateMilestones(){let t=this.engagementTrigger,e=this.progressBarConfig;if(!e?.milestones?.length){Y$1.warn(`Milestones not available in progress bar config`,t);return}let i=await this.cart.getNormalisedCart(),a=e.milestones.at(-1),s=e?.reachedAmountOrCount??i.originalAmount,l=e.totalProgress??0;Y$1.verbose(`Cart value:`,s,`, percentage: ${l}%`),this.celebrate(t,s);let d={milestonesReady:true,cartValuePercentage:l,milestones:e.milestones},f=e.milestones.find(A=>!A.reached);if(f){let A=Cr$1(f.minValue-s);if(e.rewardBasis===`ITEM_COUNT`){let ne=f.minValue-s;A=`${ne} ${ne===1?`product`:`products`}`;}this.localDynamicVariables.set({amount_left:A}),d.nextMilestone=f,this.calculatedState.set(d);return}d.lastMilestone=a,this.calculatedState.set(d);}celebrate(t,e){let s=[...t.progressBarConfig.milestones].reverse().find(f=>f.minValue<e);if(!s)return;let l=`lc/en/${t.shortID}/${s.minValue}`;sessionStorage.getItem(l)||(sessionStorage.setItem(l,`1`),this.progressBarConfig?.noConfetti||He.realistic());}static ɵfac=function(e){return new(e||n)};static ɵcmp=of({type:n,selectors:[[`cooee-progressbar`]],inputs:{cart:`cart`},features:[Xf(kt()),za],decls:1,vars:1,consts:[[1,`heading`,3,`innerHTML`],[1,`milestone-container`],[1,`milestone-list`],[1,`untracked-path`],[1,`tracked-path`],[1,`milestone-list-item`,3,`left`],[1,`milestone-list-item`],[1,`milestone-value`,3,`innerHTML`],[`width`,`20`,`height`,`20`,`alt`,`milestone icon`,1,`milestone-icon`,3,`src`],[1,`milestone-label`]],template:function(e,i){e&1&&vD(0,po,9,8),e&2&&ED(i.calculatedState().milestonesReady?0:-1);},dependencies:[Ne,a,ce],styles:[`:host{display:block;padding:10px;background:linear-gradient(0deg,rgba(var(--lc-primary-color),.1) 0%,transparent 100%)}.milestone-container{width:95%;margin:8px 0}.heading{font-weight:500;text-align:center;font-size:12px}.milestone-list{display:flex;align-items:center;position:relative;font-size:10px;font-weight:500}.untracked-path{width:100%;background-color:#e5e7eb;height:4px;position:absolute}.tracked-path{background-color:rgba(var(--lc-primary-color));height:100%;display:block;transition:width .5s ease-in-out}.milestone-list{padding:0;margin:0}.milestone-list-item{position:relative;display:flex;flex-direction:column;align-items:center;height:75px}.milestone-list-item>div{display:flex;flex-direction:column;align-items:center;justify-content:space-between;position:absolute;height:100%;width:100px}.milestone-icon{padding:5px;border-radius:1000px;background-color:rgba(var(--lc-primary-color))}
|
|
30
|
-
`],encapsulation:3})};var mo=[`numberVariable`],ze=class n extends Fe{numberSlot;savingsBarConfig;textParts=Mt$2({start:``,end:``});globalIntervals=[];constructor(){super();}ngAfterViewInit(){this.updateUIVars();}engagementTriggerReceived(t){this.savingsBarConfig=t.content.savingsBarConfig,this.elementRef.nativeElement.classList.add(`lc_`+t.entryAnimation?.toLowerCase()),this.savingsBarConfig.iconURL&&this.elementRef.nativeElement.style.setProperty(`--lc-discount-icon`,this.savingsBarConfig.iconURL);}update(){this.updateUIVars();}updateUIVars(){let t=r(r({},this.engagementTrigger.getCartMagicVariables()),Cn$2(`total_savings`,this.savingsBarConfig.totalSavings)),e=qe$2(this.savingsBarConfig.text,{cart:t},this.triggerContext),i=e.match(/[\d.,]+/)?.[0];if(!i){Y$1.error(`No amount found in text`,e);return}let[a,s]=e.split(i);this.textParts.set({start:a,end:s}),this.savingsBarConfig.animateNumber?this.runAnimation(i):this.numberSlot.nativeElement.innerHTML=i;}runSlotMachineAnimation(t=`0`){let e=this.numberSlot.nativeElement;e.innerHTML=``;let i=this.savingsBarConfig.animationDuration/t.length;this.clearPreviousIntervals();for(let a=0;a<t.length;a++){let s=document.createElement(`div`);s.className=`digit`,s.style.display=`inline-block`,e.appendChild(s);let l=setInterval(()=>{s.innerHTML=`<div>${Math.floor(Math.random()*10)}</div>`;},50);this.globalIntervals.push(l),setTimeout(()=>{clearInterval(l);s.innerHTML=`${t?.[a]??Math.floor(Math.random()*10)}`;},(a+1)*i);}}clearPreviousIntervals(){this.globalIntervals.forEach(clearInterval),this.globalIntervals=[];}runIncrementalAnimation(t){let e=performance.now(),i=a=>{let s=Math.min((a-e)/this.savingsBarConfig.animationDuration,1);this.numberSlot.nativeElement.innerHTML=Math.floor(t*s).toString(),s<1&&requestAnimationFrame(i);};requestAnimationFrame(i);}runAnimation(t){this.savingsBarConfig.animation===`SLOT_MACHINE`?this.runSlotMachineAnimation(t):this.savingsBarConfig.animation===`INCREMENTAL`&&this.runIncrementalAnimation(Number(t));}static ɵfac=function(e){return new(e||n)};static ɵcmp=of({type:n,selectors:[[`cooee-savings-bar`]],viewQuery:function(e,i){if(e&1&&nc(mo,5),e&2){let a;Rf(a=xf())&&(i.numberSlot=a.first);}},features:[Xf(kt()),za],decls:6,vars:2,consts:[[`numberVariable`,``],[1,`container`],[1,`icon`],[1,`primary-text`,3,`innerHTML`],[1,`counter-text`],[1,`final-text`,3,`innerHTML`]],template:function(e,i){e&1&&(Vo$1(0,`div`,1),Xa(1,`div`,2)(2,`div`,3)(3,`div`,4,0)(5,`div`,5),Ho()),e&2&&(ud(2),_f(`innerHTML`,i.textParts().start,Yg),ud(3),_f(`innerHTML`,i.textParts().end,Yg));},styles:[`:host{display:block}.container{white-space:pre;display:flex;justify-content:center;align-items:center;background-color:rgba(var(--lc-primary-button-bg-color, 0 162 81));color:rgba(var(--lc-primary-button-color, 255 255 255));padding:8px;border-radius:4px 4px 0 0;overflow:hidden}.container .icon{background-image:var(--lc-discount-icon, url(https://img.icons8.com/ios-glyphs/30/FFFFFF/discount--v1.png));background-position:center;background-size:cover;height:20px;width:20px;margin-right:2px}
|
|
30
|
+
`],encapsulation:3})};var mo=[`numberVariable`],ze=class n extends Fe{numberSlot;savingsBarConfig;textParts=Mt$2({start:``,end:``});globalIntervals=[];constructor(){super();}ngAfterViewInit(){this.updateUIVars();}engagementTriggerReceived(t){this.savingsBarConfig=t.content.savingsBarConfig,this.elementRef.nativeElement.classList.add(`lc_`+t.entryAnimation?.toLowerCase()),this.savingsBarConfig.iconURL&&this.elementRef.nativeElement.style.setProperty(`--lc-discount-icon`,this.savingsBarConfig.iconURL);}update(){this.engagementTrigger?.content?.savingsBarConfig&&(this.savingsBarConfig=this.engagementTrigger.content.savingsBarConfig),this.savingsBarConfig&&this.updateUIVars();}updateUIVars(){let t=r(r({},this.engagementTrigger.getCartMagicVariables()),Cn$2(`total_savings`,this.savingsBarConfig.totalSavings)),e=qe$2(this.savingsBarConfig.text,{cart:t},this.triggerContext),i=e.match(/[\d.,]+/)?.[0];if(!i){Y$1.error(`No amount found in text`,e);return}let[a,s]=e.split(i);this.textParts.set({start:a,end:s}),this.savingsBarConfig.animateNumber?this.runAnimation(i):this.numberSlot.nativeElement.innerHTML=i;}runSlotMachineAnimation(t=`0`){let e=this.numberSlot.nativeElement;e.innerHTML=``;let i=this.savingsBarConfig.animationDuration/t.length;this.clearPreviousIntervals();for(let a=0;a<t.length;a++){let s=document.createElement(`div`);s.className=`digit`,s.style.display=`inline-block`,e.appendChild(s);let l=setInterval(()=>{s.innerHTML=`<div>${Math.floor(Math.random()*10)}</div>`;},50);this.globalIntervals.push(l),setTimeout(()=>{clearInterval(l);s.innerHTML=`${t?.[a]??Math.floor(Math.random()*10)}`;},(a+1)*i);}}clearPreviousIntervals(){this.globalIntervals.forEach(clearInterval),this.globalIntervals=[];}runIncrementalAnimation(t){let e=performance.now(),i=a=>{let s=Math.min((a-e)/this.savingsBarConfig.animationDuration,1);this.numberSlot.nativeElement.innerHTML=Math.floor(t*s).toString(),s<1&&requestAnimationFrame(i);};requestAnimationFrame(i);}runAnimation(t){this.savingsBarConfig.animation===`SLOT_MACHINE`?this.runSlotMachineAnimation(t):this.savingsBarConfig.animation===`INCREMENTAL`&&this.runIncrementalAnimation(Number(t));}static ɵfac=function(e){return new(e||n)};static ɵcmp=of({type:n,selectors:[[`cooee-savings-bar`]],viewQuery:function(e,i){if(e&1&&nc(mo,5),e&2){let a;Rf(a=xf())&&(i.numberSlot=a.first);}},features:[Xf(kt()),za],decls:6,vars:2,consts:[[`numberVariable`,``],[1,`container`],[1,`icon`],[1,`primary-text`,3,`innerHTML`],[1,`counter-text`],[1,`final-text`,3,`innerHTML`]],template:function(e,i){e&1&&(Vo$1(0,`div`,1),Xa(1,`div`,2)(2,`div`,3)(3,`div`,4,0)(5,`div`,5),Ho()),e&2&&(ud(2),_f(`innerHTML`,i.textParts().start,Yg),ud(3),_f(`innerHTML`,i.textParts().end,Yg));},styles:[`:host{display:block}.container{white-space:pre;display:flex;justify-content:center;align-items:center;background-color:rgba(var(--lc-primary-button-bg-color, 0 162 81));color:rgba(var(--lc-primary-button-color, 255 255 255));padding:8px;border-radius:4px 4px 0 0;overflow:hidden}.container .icon{background-image:var(--lc-discount-icon, url(https://img.icons8.com/ios-glyphs/30/FFFFFF/discount--v1.png));background-position:center;background-size:cover;height:20px;width:20px;margin-right:2px}
|
|
31
31
|
`],encapsulation:3})};var $e=class n extends Fe{item;data=g(Ye);dialogRef=g(W);ItemDetailLayout=Ie$2;constructor(){super(),this.triggerContext=this.data.triggerContext,this.item=this.data.item;}close(){this.dialogRef.close();}engagementTriggerReceived(t){}update(){}static ɵfac=function(e){return new(e||n)};static ɵcmp=of({type:n,selectors:[[`cooee-item-quick-view`]],features:[Xf(kt()),za],decls:1,vars:2,consts:[[3,`closeClick`,`item`,`layout`]],template:function(e,i){e&1&&(Ka(0,`cooee-item-detail`,0),Sf(`closeClick`,function(){return i.close()}),Ja()),e&2&&yf(`item`,i.item)(`layout`,i.ItemDetailLayout.TWO_PANE);},dependencies:[Nt],styles:[`:host{display:flex;align-items:center;justify-content:center;height:100%}@media(min-width:768px){cooee-item-detail{max-width:900px;max-height:80vh;border-radius:var(--lc-card-radius)}}
|
|
32
32
|
`],encapsulation:3})};var Ue=class n{dialog=g(Ro);dialogRef;constructor(){}showItemQuickView(t,e){this.dialogRef=this.dialog.open($e,{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 uo=(n,t)=>({enter:n,exit:t});function fo(n,t){if(n&1&&(Ka(0,`div`,7),uv(1),Ja(),Ka(2,`div`,8),uv(3),Ja()),n&2){let e=kD(2);ud(),ic(` `,e.getCurrency(e.selectedVariant().price.cmp),` `),ud(2),ic(` `,e.getDiscountPercentage(e.selectedVariant().price),`% off `);}}function go(n,t){if(n&1&&(Ka(0,`div`,6),uv(1),Ja()),n&2){let e=kD(2);ud(),ic(` `,e.stickyATCConfig.leftText,` `);}}function vo(n,t){if(n&1&&(Ka(0,`div`,1)(1,`div`,5),uv(2),Ja(),vD(3,fo,4,2),vD(4,go,2,1,`div`,6),Ja()),n&2){let e=kD();ud(2),ic(` `,e.getCurrency(e.selectedVariant().price.d),` `),ud(),ED(e.selectedVariant().price.cmp?3:-1),ud(),ED(e.stickyATCConfig.leftText?4:-1);}}function ho(n,t){if(n&1&&(Ka(0,`div`,9),uv(1),Ja()),n&2){let e=t.$implicit,i=t.$index;kD(2);let a=hv(5);yf(`ngClass`,Cv(2,uo,i===a.currentIndex,i===a.previousIndex)),ud(),ic(` `,e,` `);}}function Co(n,t){if(n&1&&(Ka(0,`div`,4),wD(1,ho,2,5,`div`,9,ID),Ja()),n&2){kD();let e=hv(5);ud(),_D(e.features);}}var Qe=class n extends Fe{currentItem;stickyATCConfig;selectedVariant=Mt$2(void 0);featureSlider=Mt$2({features:[],currentIndex:0});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],this.selectedVariant.set(this.currentItem.vars[0]),this.stickyATCConfig.leftText=this.replaceVariables(this.stickyATCConfig.leftText),this.stickyATCConfig.rightText=this.replaceVariables(this.stickyATCConfig.rightText),this.startFeatureRotation();}update(){}getCurrency(t){return Cr$1(t)}getDiscountPercentage(t){return ((t.cmp-t.d)/t.cmp*100).toFixed(0)}addToCart(){this.engagementService.executeCTA(pe$2.ADD_TO_CART,{item:this.currentItem});}startFeatureRotation(){if(!this.stickyATCConfig.rightText)return;let t=this.stickyATCConfig.rightText.split(`
|
|
33
33
|
`),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?qe$2(t,this.currentItem.getTemplateVariables(),this.triggerContext):``}static ɵfac=function(e){return new(e||n)};static ɵcmp=of({type:n,selectors:[[`cooee-sticky-atc`]],hostBindings:function(e,i){e&1&&Sf(`letscooee:variant-change`,function(s){return i.onVariantChange(s)},Jg);},features:[Xf(kt()),za],decls:7,vars:3,consts:[[1,`lc-wrapper`],[1,`lc-prices`],[1,`lc-button-wrapper`],[`type`,`button`,1,`lc-button`,`lc-button-atc`,3,`click`],[1,`lc-features`],[1,`lc-sale-price`],[1,`lc-additional-text`],[1,`lc-compare-price`],[1,`lc-discount-label`],[1,`lc-feature`,3,`ngClass`]],template:function(e,i){if(e&1&&(Ka(0,`div`,0),vD(1,vo,5,3,`div`,1),Ka(2,`div`,2)(3,`button`,3),Sf(`click`,function(){return i.addToCart()}),uv(4,`Add To Cart`),Ja(),Qf(5),vD(6,Co,3,0,`div`,4),Ja()()),e&2){ud(),ED(i.selectedVariant()&&i.stickyATCConfig.showProductInfo?1:-1),ud(4);let a=pv(i.featureSlider());ud(),ED(a.features.length?6:-1);}},dependencies:[wE],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%}.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:#000;color:#fff;opacity:1;pointer-events:auto;border-radius:4px;min-width:150px;width:100%;padding:8px}.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}
|
|
34
|
-
`],encapsulation:3})};var yo=[`videoEl`];async function hi(){return (await import('./video-detail-dialog.component-CYKja1k0-CVKmp82J.js').then(function (n) { return n.v; })).VideoDetailDialogComponent}var me=class n extends Fe{videoElements;videoEntries;videoConfig;dialogRef=null;dialog=g(Ro);isMobile=M$3();pausedVideos=[];videoLoadingStates=new Map;intersectionObserver;visibleVideos=new Set;constructor(){super(),hi();}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`,{},t,e);}async onVideoTap(t,e,i,a,s){t?.stopPropagation(),t?.preventDefault();let l=e.items?.[0];if(this.sendTriggerClicked(e,l),this.videoConfig.footerContent===`NONE`){a&&(a.muted=false,a.play(),this.onMuteToggled(false,a));return}await this.openDialog(e,i,s);}sendEvent(t,e,i,a){let s=new Ir$1(t,e,this.engagementTrigger);s.setVideos(i),a&&(s.items=[a.toEmbed()]),window.CooeeSDK.sendEvent(s);}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=>{Y$1.error(`Failed to play video:`,e);});}setupIntersectionObserver(t=.5,e=`50px`){this.intersectionObserver=new IntersectionObserver(i=>{i.forEach(a=>{let s=a.target,l=s.dataset.videoId;l&&(a.isIntersecting?(this.visibleVideos.add(l),this.handleVideoVisibilityChange(s,true)):(this.visibleVideos.delete(l),this.handleVideoVisibilityChange(s,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$3();if(!t||!this.videoEntries)return;let e=Je$1();if(e.utm_campaign?.toLowerCase()!==`shoppable_video`||e.utm_source?.toLowerCase()!==Ae$2)return;let i=this.videoEntries.findIndex(a=>a.video.shortID===+t);if(i!==-1){let a=this.videoEntries[i].video;await ce$3.set(`muted`,true),await this.openDialog(a,i);}}async openDialog(t,e,i){await Hi$1();let a={videoEntries:this.videoEntries,currentIndex:e,triggerContext:this.triggerContext,selectedItem:i};this.dialogRef&&this.dialogRef.close(),this.pauseAllPlaylistVideos();let s=await hi();this.dialogRef=this.dialog.open(s,{width:`100vw`,height:`100vh`,data:a,providers:Qt(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(d=>{if(this.dialogRef=null,!d)return;let f=d.lastVideoDuration*1e3,A={videoID:d.lastVideo.id,videoIndex:d.lastVideoIndex,playedTillMS:f,playedTillPercent:f/d.lastVideo.durationMS};this.sendEvent(`CE Video Dialog Closed`,{current:A},d.lastVideo),this.onDialogClosed();});}static ɵfac=function(e){return new(e||n)};static ɵcmp=of({type:n,selectors:[[`cooee-abstract-video`]],viewQuery:function(e,i){if(e&1&&nc(yo,5),e&2){let a;Rf(a=xf())&&(i.videoElements=a);}},features:[za],decls:0,vars:0,template:function(e,i){},encapsulation:2})};var ue=class n{video=Ub.required({alias:`cooeeVideoSources`});prioritySource=Ub(`high`);elementRef=g(Se$1);constructor(){Cs(()=>{this.updateSources();});}updateSources(){let t=this.elementRef.nativeElement,e=this.video(),i=this.prioritySource();t.querySelectorAll(`source`).forEach(s=>s.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=hn$1({type:n,selectors:[[`video`,`cooeeVideoSources`,``]],inputs:{video:[1,`cooeeVideoSources`,`video`],prioritySource:[1,`prioritySource`]}})};var _o=(n,t)=>t.video.id;function xo(n,t){if(n&1&&(Df(0,`div`,1),Iv(1,`safeHtml`)),n&2)yf(`innerHTML`,_v(1,1,kD().videoConfig.heading),Yg);}function bo(n,t){n&1&&(Ka(0,`div`,6),Df(1,`div`,12),Ja());}function wo(n,t){if(n&1){let e=ND();Ka(0,`cooee-mute-toggle`,13),Sf(`toggled`,function(a){fu(e),kD();let s=jD(7);return pu(kD().onMuteToggled(a,s))}),Ja();}if(n&2){kD();let e=jD(7);yf(`muted`,e.muted)(`videoEl`,e);}}function Vo(n,t){if(n&1){let e=ND();Ka(0,`cooee-video-promoted-items`,16),Sf(`cardClick`,function(a){fu(e);let s=kD(2).$index,l=jD(7),d=hv(0);return pu(kD().onItemCardClick(a,d,s,l))}),Ja();}if(n&2){kD(2);yf(`items`,hv(0).items)(`centeredSlides`,false);}}function Eo(n,t){if(n&1){let e=ND();Ka(0,`cooee-item-card`,17),Sf(`buttonClick`,function(){fu(e);let a=kD(2).$index,s=jD(7),l=hv(0);return pu(kD().addToCartClicked(null,l,a,s))})(`click`,function(){fu(e);let a=kD(2).$index,s=jD(7),l=hv(0),d=hv(1);return pu(kD().onItemCardClick(d,l,a,s))}),Ja();}if(n&2){kD(2);yf(`item`,hv(1));}}function To(n,t){if(n&1&&vD(0,Vo,1,2,`cooee-video-promoted-items`,14)(1,Eo,1,1,`cooee-item-card`,15),n&2){kD();let e=hv(0),i=kD();ED(hv(2)===i.VideoConfigFooterContent.ITEM_SWIPER&&e.items.length>1?0:e.items.length?1:-1);}}function So(n,t){if(n&1){let e=ND();Ka(0,`cooee-video-card`,18),Sf(`linkClicked`,function(){fu(e),kD();let a=hv(0);return pu(kD().sendTriggerClicked(a))}),Ja();}if(n&2){kD();yf(`card`,hv(2));}}function Io(n,t){if(n&1){let e=ND();Qf(0)(1)(2),Ka(3,`div`,4)(4,`div`,5),Sf(`click`,function(a){let s=fu(e).$index,l=jD(7),d=hv(0);return pu(kD().onVideoTap(a,d,s,l))})(`keydown.enter`,function(a){let s=fu(e).$index,l=jD(7),d=hv(0);return pu(kD().onVideoTap(a,d,s,l))})(`keydown.space`,function(a){let s=fu(e).$index,l=jD(7),d=hv(0);return pu(kD().onVideoTap(a,d,s,l))}),vD(5,bo,2,0,`div`,6),Ka(6,`video`,7,0),Sf(`mouseenter`,function(){fu(e);let a=jD(7);kD();return pu(hv(1)&&a.play())})(`mouseleave`,function(){fu(e);let a=jD(7);kD();return pu(hv(1)&&a.pause())})(`loadstart`,function(){fu(e);let a=hv(0);return pu(kD().onVideoLoadStart(a.id))})(`canplay`,function(){fu(e);let a=hv(0);return pu(kD().onVideoCanPlay(a.id))}),Ja(),Ka(8,`div`,8),vD(9,wo,1,2,`cooee-mute-toggle`,9),Ja()(),Ka(10,`div`,10),vD(11,To,2,1)(12,So,1,1,`cooee-video-card`,11),Ja()();}if(n&2){let e=t.$implicit,i=kD(),a=hv(0),s=hv(2),l=pv(e.video);ud(),pv(l.items[0]),ud();let f=pv(l.card)&&s===i.VideoConfigFooterContent.CARD;ud(2),rc(`background-image`,l.thumbnail?`url(`+l.thumbnail+`)`:null),ud(),ED(i.isVideoLoading(l.id)?5:-1),ud(),yf(`cooeeVideoSources`,l)(`muted`,true),mf(`preload`,a?`metadata`:`none`)(`autoplay`,null)(`data-video-id`,l.id),ud(3),ED(i.videoConfig.showMuteButton?9:-1),ud(2),ED(i.videoConfig.showItems()?11:f?12:-1);}}var Ze=class n extends me{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,a){let s=e.items?.[0],l=he$4.get().website?.canChangeVariantInCart;if(e.items?.length>1||s?.hasVariants()&&!l){this.onItemCardClick(s,e,i,a);return}this.engagementService.executeCTA(pe$2.ADD_TO_CART,{item:s,video:e});}goToPDP(t,e){t?.stopPropagation(),t?.preventDefault();let i=e.items?.[0];this.engagementService.executeCTA(pe$2.GO_TO_PRODUCT,{item:i,video:e});}onItemCardClick(t,e,i,a){this.videoConfig.playlistConfig.itemCardClickBehavior===`OPEN_ITEM_DETAIL`?this.onVideoTap(null,e,i,a,t):this.onVideoTap(null,e,i,a);}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=of({type:n,selectors:[[`cooee-video-playlist`]],features:[Xf(kt()),za],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&&(Qf(0)(1)(2),vD(3,xo,2,3,`div`,1),Ka(4,`cooee-swiper`,2),ec(5,3),wD(6,Io,13,13,`div`,4,_o),$o(),Ja()),e&2){pv(!i.videoConfig.autoPlay||i.videoConfig.autoPlay===i.VideoConfigAutoPlay.ON),ud(),pv(i.videoConfig.autoPlay===i.VideoConfigAutoPlay.ON_HOVER),ud(),pv(i.videoConfig.footerContent),ud(),ED(i.videoConfig.heading?3:-1);let a=i.videoConfig.playlistConfig.videoSwiper;ud(),yf(`options`,i.swiperOptions)(`navigationConfig`,a==null?null:a.navigation)(`paginationConfig`,a==null?null:a.pagination),ud(2),_D(i.videoEntries);}},dependencies:[Bt,jt,Rt,de,ue,Lt,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)}
|
|
34
|
+
`],encapsulation:3})};var yo=[`videoEl`];async function hi(){return (await import('./video-detail-dialog.component-LxhnmfX6-DWRv7oCM.js').then(function (n) { return n.v; })).VideoDetailDialogComponent}var me=class n extends Fe{videoElements;videoEntries;videoConfig;dialogRef=null;dialog=g(Ro);isMobile=M$3();pausedVideos=[];videoLoadingStates=new Map;intersectionObserver;visibleVideos=new Set;constructor(){super(),hi();}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`,{},t,e);}async onVideoTap(t,e,i,a,s){t?.stopPropagation(),t?.preventDefault();let l=e.items?.[0];if(this.sendTriggerClicked(e,l),this.videoConfig.footerContent===`NONE`){a&&(a.muted=false,a.play(),this.onMuteToggled(false,a));return}await this.openDialog(e,i,s);}sendEvent(t,e,i,a){let s=new Ir$1(t,e,this.engagementTrigger);s.setVideos(i),a&&(s.items=[a.toEmbed()]),window.CooeeSDK.sendEvent(s);}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=>{Y$1.error(`Failed to play video:`,e);});}setupIntersectionObserver(t=.5,e=`50px`){this.intersectionObserver=new IntersectionObserver(i=>{i.forEach(a=>{let s=a.target,l=s.dataset.videoId;l&&(a.isIntersecting?(this.visibleVideos.add(l),this.handleVideoVisibilityChange(s,true)):(this.visibleVideos.delete(l),this.handleVideoVisibilityChange(s,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$3();if(!t||!this.videoEntries)return;let e=Je$1();if(e.utm_campaign?.toLowerCase()!==`shoppable_video`||e.utm_source?.toLowerCase()!==Ae$2)return;let i=this.videoEntries.findIndex(a=>a.video.shortID===+t);if(i!==-1){let a=this.videoEntries[i].video;await ce$3.set(`muted`,true),await this.openDialog(a,i);}}async openDialog(t,e,i){await Hi$1();let a={videoEntries:this.videoEntries,currentIndex:e,triggerContext:this.triggerContext,selectedItem:i};this.dialogRef&&this.dialogRef.close(),this.pauseAllPlaylistVideos();let s=await hi();this.dialogRef=this.dialog.open(s,{width:`100vw`,height:`100vh`,data:a,providers:Qt(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(d=>{if(this.dialogRef=null,!d)return;let f=d.lastVideoDuration*1e3,A={videoID:d.lastVideo.id,videoIndex:d.lastVideoIndex,playedTillMS:f,playedTillPercent:f/d.lastVideo.durationMS};this.sendEvent(`CE Video Dialog Closed`,{current:A},d.lastVideo),this.onDialogClosed();});}static ɵfac=function(e){return new(e||n)};static ɵcmp=of({type:n,selectors:[[`cooee-abstract-video`]],viewQuery:function(e,i){if(e&1&&nc(yo,5),e&2){let a;Rf(a=xf())&&(i.videoElements=a);}},features:[za],decls:0,vars:0,template:function(e,i){},encapsulation:2})};var ue=class n{video=Ub.required({alias:`cooeeVideoSources`});prioritySource=Ub(`high`);elementRef=g(Se$1);constructor(){Cs(()=>{this.updateSources();});}updateSources(){let t=this.elementRef.nativeElement,e=this.video(),i=this.prioritySource();t.querySelectorAll(`source`).forEach(s=>s.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=hn$1({type:n,selectors:[[`video`,`cooeeVideoSources`,``]],inputs:{video:[1,`cooeeVideoSources`,`video`],prioritySource:[1,`prioritySource`]}})};var _o=(n,t)=>t.video.id;function xo(n,t){if(n&1&&(Df(0,`div`,1),Iv(1,`safeHtml`)),n&2)yf(`innerHTML`,_v(1,1,kD().videoConfig.heading),Yg);}function bo(n,t){n&1&&(Ka(0,`div`,6),Df(1,`div`,12),Ja());}function wo(n,t){if(n&1){let e=ND();Ka(0,`cooee-mute-toggle`,13),Sf(`toggled`,function(a){fu(e),kD();let s=jD(7);return pu(kD().onMuteToggled(a,s))}),Ja();}if(n&2){kD();let e=jD(7);yf(`muted`,e.muted)(`videoEl`,e);}}function Vo(n,t){if(n&1){let e=ND();Ka(0,`cooee-video-promoted-items`,16),Sf(`cardClick`,function(a){fu(e);let s=kD(2).$index,l=jD(7),d=hv(0);return pu(kD().onItemCardClick(a,d,s,l))}),Ja();}if(n&2){kD(2);yf(`items`,hv(0).items)(`centeredSlides`,false);}}function Eo(n,t){if(n&1){let e=ND();Ka(0,`cooee-item-card`,17),Sf(`buttonClick`,function(){fu(e);let a=kD(2).$index,s=jD(7),l=hv(0);return pu(kD().addToCartClicked(null,l,a,s))})(`click`,function(){fu(e);let a=kD(2).$index,s=jD(7),l=hv(0),d=hv(1);return pu(kD().onItemCardClick(d,l,a,s))}),Ja();}if(n&2){kD(2);yf(`item`,hv(1));}}function To(n,t){if(n&1&&vD(0,Vo,1,2,`cooee-video-promoted-items`,14)(1,Eo,1,1,`cooee-item-card`,15),n&2){kD();let e=hv(0),i=kD();ED(hv(2)===i.VideoConfigFooterContent.ITEM_SWIPER&&e.items.length>1?0:e.items.length?1:-1);}}function So(n,t){if(n&1){let e=ND();Ka(0,`cooee-video-card`,18),Sf(`linkClicked`,function(){fu(e),kD();let a=hv(0);return pu(kD().sendTriggerClicked(a))}),Ja();}if(n&2){kD();yf(`card`,hv(2));}}function Io(n,t){if(n&1){let e=ND();Qf(0)(1)(2),Ka(3,`div`,4)(4,`div`,5),Sf(`click`,function(a){let s=fu(e).$index,l=jD(7),d=hv(0);return pu(kD().onVideoTap(a,d,s,l))})(`keydown.enter`,function(a){let s=fu(e).$index,l=jD(7),d=hv(0);return pu(kD().onVideoTap(a,d,s,l))})(`keydown.space`,function(a){let s=fu(e).$index,l=jD(7),d=hv(0);return pu(kD().onVideoTap(a,d,s,l))}),vD(5,bo,2,0,`div`,6),Ka(6,`video`,7,0),Sf(`mouseenter`,function(){fu(e);let a=jD(7);kD();return pu(hv(1)&&a.play())})(`mouseleave`,function(){fu(e);let a=jD(7);kD();return pu(hv(1)&&a.pause())})(`loadstart`,function(){fu(e);let a=hv(0);return pu(kD().onVideoLoadStart(a.id))})(`canplay`,function(){fu(e);let a=hv(0);return pu(kD().onVideoCanPlay(a.id))}),Ja(),Ka(8,`div`,8),vD(9,wo,1,2,`cooee-mute-toggle`,9),Ja()(),Ka(10,`div`,10),vD(11,To,2,1)(12,So,1,1,`cooee-video-card`,11),Ja()();}if(n&2){let e=t.$implicit,i=kD(),a=hv(0),s=hv(2),l=pv(e.video);ud(),pv(l.items[0]),ud();let f=pv(l.card)&&s===i.VideoConfigFooterContent.CARD;ud(2),rc(`background-image`,l.thumbnail?`url(`+l.thumbnail+`)`:null),ud(),ED(i.isVideoLoading(l.id)?5:-1),ud(),yf(`cooeeVideoSources`,l)(`muted`,true),mf(`poster`,l.thumbnail)(`preload`,a?`metadata`:`none`)(`autoplay`,null)(`data-video-id`,l.id),ud(3),ED(i.videoConfig.showMuteButton?9:-1),ud(2),ED(i.videoConfig.showItems()?11:f?12:-1);}}var Ze=class n extends me{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,a){let s=e.items?.[0],l=he$4.get().website?.canChangeVariantInCart;if(e.items?.length>1||s?.hasVariants()&&!l){this.onItemCardClick(s,e,i,a);return}this.engagementService.executeCTA(pe$2.ADD_TO_CART,{item:s,video:e});}goToPDP(t,e){t?.stopPropagation(),t?.preventDefault();let i=e.items?.[0];this.engagementService.executeCTA(pe$2.GO_TO_PRODUCT,{item:i,video:e});}onItemCardClick(t,e,i,a){this.videoConfig.playlistConfig.itemCardClickBehavior===`OPEN_ITEM_DETAIL`?this.onVideoTap(null,e,i,a,t):this.onVideoTap(null,e,i,a);}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=of({type:n,selectors:[[`cooee-video-playlist`]],features:[Xf(kt()),za],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&&(Qf(0)(1)(2),vD(3,xo,2,3,`div`,1),Ka(4,`cooee-swiper`,2),ec(5,3),wD(6,Io,13,14,`div`,4,_o),$o(),Ja()),e&2){pv(!i.videoConfig.autoPlay||i.videoConfig.autoPlay===i.VideoConfigAutoPlay.ON),ud(),pv(i.videoConfig.autoPlay===i.VideoConfigAutoPlay.ON_HOVER),ud(),pv(i.videoConfig.footerContent),ud(),ED(i.videoConfig.heading?3:-1);let a=i.videoConfig.playlistConfig.videoSwiper;ud(),yf(`options`,i.swiperOptions)(`navigationConfig`,a==null?null:a.navigation)(`paginationConfig`,a==null?null:a.pagination),ud(2),_D(i.videoEntries);}},dependencies:[Bt,jt,Rt,de,ue,Lt,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
35
|
`],encapsulation:3})};var Mo=[`videoElement`],ko=n=>({"cursor-grab":n}),We=class n extends me{videoElement;video;isDragging=false;hidden=false;cdkDrag=g(ge$1,{self:true});untilDestroyed=Pt();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=of({type:n,selectors:[[`cooee-video-popup`]],viewQuery:function(e,i){if(e&1&&nc(Mo,5),e&2){let a;Rf(a=xf())&&(i.videoElement=a.first);}},hostAttrs:[`role`,`button`,`tabindex`,`0`,`aria-label`,`Open video popup `,`cdkDragBoundary`,`body`],hostVars:2,hostBindings:function(e,i){e&1&&Sf(`keydown.enter`,function(s){return i.onClick(s)})(`keydown.space`,function(s){return i.onClick(s)})(`click`,function(s){return i.onClick(s)}),e&2&&XD(i.popupClasses);},features:[Xf(kt()),iD([{directive:ge$1,inputs:[`cdkDragBoundary`,`cdkDragBoundary`]}]),za],decls:9,vars:5,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`]],template:function(e,i){if(e&1){let a=ND();Ka(0,`div`,1)(1,`button`,2),Sf(`click`,function(l){return fu(a),l.stopPropagation(),pu(i.close())}),Df(2,`cooee-icon`,3),Ja(),Ka(3,`div`,4),Df(4,`cooee-icon`,5),Ka(5,`div`,6),uv(6,`Tap to unmute`),Ja()(),Df(7,`video`,7,0),Ja();}e&2&&(yf(`ngClass`,Ev(3,ko,i.isDragging)),ud(7),yf(`muted`,true)(`cooeeVideoSources`,i.video));},dependencies:[wE,ye,ue],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}
|
|
36
36
|
`],encapsulation:3})};var Po=(n,t)=>t.video.id;function Fo(n,t){if(n&1&&(Df(0,`div`,1),Iv(1,`safeHtml`)),n&2)yf(`innerHTML`,_v(1,1,kD().videoConfig.heading),Yg);}function Do(n,t){n&1&&(Ka(0,`div`,9),Df(1,`div`,12),Ja());}function Ao(n,t){if(n&1&&(Ka(0,`div`,11),uv(1),Ja()),n&2){let e=kD().$implicit;ud(),Wf(e.title);}}function Lo(n,t){if(n&1){let e=ND();Ka(0,`div`,4),Sf(`click`,function(a){let s=fu(e),l=s.$implicit,d=s.$index;return pu(kD().onVideoTap(a,l.video,d))})(`keydown.enter`,function(a){let s=fu(e),l=s.$implicit,d=s.$index;return pu(kD().onVideoTap(a,l.video,d))})(`keydown.space`,function(a){let s=fu(e),l=s.$implicit,d=s.$index;return pu(kD().onVideoTap(a,l.video,d))}),_u(),Ka(1,`svg`,5),Df(2,`circle`,6)(3,`circle`,7),Ja(),Tu(),Ka(4,`div`,8),vD(5,Do,2,0,`div`,9),Ka(6,`video`,10,0),Sf(`loadstart`,function(){let a=fu(e).$implicit;return pu(kD().onVideoLoadStart(a.video.id))})(`canplay`,function(){let a=fu(e).$implicit;return pu(kD().onVideoCanPlay(a.video.id))}),Ja()(),vD(8,Ao,2,1,`div`,11),Ja();}if(n&2){let e=t.$implicit,i=t.$index,a=kD();mf(`aria-label`,`Open video story `+(i+1)),ud(5),ED(a.isVideoLoading(e.video.id)?5:-1),ud(),yf(`poster`,e.video.thumbnail)(`cooeeVideoSources`,e.video)(`prioritySource`,`low`)(`muted`,true),mf(`data-video-id`,e.video.id),ud(2),ED(e.title?8:-1);}}var qe=class n extends me{constructor(){super();}ngAfterViewInit(){super.ngAfterViewInit(),this.setupIntersectionObserver();}ngOnDestroy(){super.ngOnDestroy();}update(){}static ɵfac=function(e){return new(e||n)};static ɵcmp=of({type:n,selectors:[[`cooee-video-stories`]],features:[Xf(kt()),za],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&&(vD(0,Fo,2,3,`div`,1),Ka(1,`div`,2),wD(2,Lo,9,8,`div`,3,Po),Ja()),e&2&&(ED(i.videoConfig.heading?0:-1),ud(2),_D(i.videoEntries));},dependencies:[ue,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}
|
|
37
|
-
`],encapsulation:3})};async function Ha(){let n=await UE(fi),t=(e,i)=>{let a=ui(e,{injector:n.injector});customElements.get(i)||customElements.define(i,a);};t(Qe,`cooee-sticky-atc`),t(ze,`cooee-savings-bar`),t(je,`cooee-progressbar`),t(Ze,`cooee-video-playlist`),t(We,`cooee-video-popup`),t(qe,`cooee-video-stories`),t(ke,`cooee-product-options-picker`),t(Be,`cooee-collection-filter`),sessionStorage.cooeeDebug&&import('./debugger.component-
|
|
37
|
+
`],encapsulation:3})};async function Ha(){let n=await UE(fi),t=(e,i)=>{let a=ui(e,{injector:n.injector});customElements.get(i)||customElements.define(i,a);};t(Qe,`cooee-sticky-atc`),t(ze,`cooee-savings-bar`),t(je,`cooee-progressbar`),t(Ze,`cooee-video-playlist`),t(We,`cooee-video-popup`),t(qe,`cooee-video-stories`),t(ke,`cooee-product-options-picker`),t(Be,`cooee-collection-filter`),sessionStorage.cooeeDebug&&import('./debugger.component-f4r_AGlF-Bzhbfrtf.js').then(e=>{t(e.DebuggerComponent,`cooee-debugger`);}),window.cooeeShowQuickItem=(e,i)=>{n.injector.get(Ue).showItemQuickView(e,i);};}
|
|
38
38
|
|
|
39
|
-
var
|
|
39
|
+
var widgetsDKSCYY7I = /*#__PURE__*/Object.freeze({
|
|
40
40
|
__proto__: null,
|
|
41
41
|
loadAngularWidgets: Ha
|
|
42
42
|
});
|
|
43
43
|
|
|
44
|
-
export { $o as $, Rf as A, Bt as B, xf as C, Df as D, $b as E, Ro as F, Ge as G, Ho as H, ID as I, Ja as J, Ke as K, Lt as L, Mf as M, Nt as N, Ft$2 as O, Cs as P, rc as Q, Rt as R, Sf as S, Tv as T, Ub as U, Vo$1 as V, Wf as W, Xa as X, Yg as Y, mf as Z, _D as _, a, ND as a0, vD as a1, fu as a2, pu as a3, kD as a4, ED as a5, Ef as a6, gv as a7, Zf as a8, qf as a9, fv as aa, Sv as ab, Kg as ac,
|
|
44
|
+
export { $o as $, Rf as A, Bt as B, xf as C, Df as D, $b as E, Ro as F, Ge as G, Ho as H, ID as I, Ja as J, Ke as K, Lt as L, Mf as M, Nt as N, Ft$2 as O, Cs as P, rc as Q, Rt as R, Sf as S, Tv as T, Ub as U, Vo$1 as V, Wf as W, Xa as X, Yg as Y, mf as Z, _D as _, a, ND as a0, vD as a1, fu as a2, pu as a3, kD as a4, ED as a5, Ef as a6, gv as a7, Zf as a8, qf as a9, fv as aa, Sv as ab, Kg as ac, widgetsDKSCYY7I as ad, bE as b, ud as c, Iv as d, _f as e, _v as f, ge$1 as g, g as h, iD as i, W as j, Ka as k, Mt$2 as l, Ye as m, Se$1 as n, of as o, TE as p, wE as q, jt as r, ec as s, lf as t, uv as u, jD as v, wD as w, yf as x, ye as y, nc 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.2.
|
|
4
|
+
"version": "14.2.3",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"postinstall": "bash .dev/setup.sh",
|
|
7
7
|
"lint": "ng lint",
|
|
File without changes
|