1import{d as r}from"./defineElement-Bh-rOTph.js";import"./GlobalStylesStore--z5tmrDj.js";import{h as e}from"./html-BmWsKWcd.js";import{u as t}from"./directives-geaH8KPO.js";import{i as o}from"./i18n-Ccmx08iC.js";import{i as a,g as c,a as i,b as s,c as d,d as n,e as l}from"./price-model-helper-DVQZ0wsn.js";import{C as p}from"./color-selector-BRgWH1wU.js";import"./product-sizes-DvNiF2TQ.js";import"./svg-icon-CGSNt3Tg.js";import"./tessa-image-WLXP7nJ1.js";import"./price-asterisk-tJ2sUbml.js";import{T as u}from"./TemplateElement-u6hNeGmQ.js";import{F as m}from"./FrameSelectorEvent-DfiDjhlS.js";import{C as h}from"./currency-formatter-DwyavB_T.js";import{d as g}from"./slider-element-BafSDN_V.js";import{P as f}from"./ProductCardEvents-CeucecKi.js";import{S as v}from"./SliderElementEvents-DhBQCjyZ.js";import"./color-button.class-ChSezrT-.js";import"./color-button-5thU7Yv_.js";import"./tessa-image.map-DvYUU_MZ.js";import"./StyledElement-Dmi2NcTH.js";function x(r,e){try{const e=window.siteConfig().staticTexts;if(void 0===e[r])throw"Missing static text";return e[r]}catch(t){return e||r}}g();class w extends u{constructor(){super({shadowRender:!1,autoUpdate:!1,styles:["product-card{--image-max-height:var(--spacing-80,20rem);transition:box-shadow 0.3s}@media (min-width: 768px){product-card:hover{z-index:2;box-shadow:var(--product-card-shadow)}}product-card .product-card-content{--border-color:var(--product-card-border-color,var(--colors-grey-200,#CCCCCC));min-height:600px;box-shadow:0 0 0 1px var(--border-color);height:100%;background-color:var(--colors-white,#fff);border-radius:var(--product-card-border-radius)}@media (min-width: 768px){product-card .product-card-content:hover{--border-color:var(--product-card-border-color-hover)}}product-card .brand-name{margin-bottom:var(--spacing-1,0.25rem);font-size:0.875rem;font-weight:var(--product-brand-font-weight);color:var(--product-brand-color)}product-card .product-card-title{font-size:1.5rem;font-family:var(--product-title-font-family);font-weight:var(--product-title-font-weight);color:var(--product-title-color)}product-card .product-card-description{font-size:0.875rem;color:var(--product-description-color);font-weight:var(--product-description-font-weight)}product-card .product-card-price-group{font-size:0.875rem;color:var(--colors-grey-200,#CCCCCC)}product-card .product-card-price{font-size:1.125rem;font-weight:500;color:var(--colors-black,#000)}product-card frame-selector{margin-top:var(--spacing-6,1.5rem)}product-card .seal{top:var(--spacing-0,0px);left:var(--spacing-0,0px);max-width:100px;max-height:100px}product-card .promotion-logo{max-width:65px;max-height:65px}product-card .arrow{top:50%}product-card .arrow[ref='arrowPrev']{transform:translateY(-50%) translateX(-100%)}product-card .arrow[ref='arrowNext']{transform:translateY(-50%) translateX(100%)}product-card .arrow:hover{background-color:var(--colors-brand-100,#dbeafe);color:var(--colors-brand-500,#3b82f6)}product-card .slider-wrapper{max-height:var(--image-max-height,300px);margin-top:var(--spacing-6,1.5rem)}product-card .slider-wrapper img{max-height:var(--image-max-height,300px)}product-card .slider-wrapper tessa-image{min-height:var(--spacing-8,2rem)}product-card .slider-wrapper:before{content:'';display:block;padding-top:66.66%}product-card slider-element::part(scroller){height:100%}product-card color-selector .colors{flex-wrap:wrap}product-card .sizes{flex-wrap:wrap;white-space:nowrap;transition:opacity 0.5s}product-card .corner{transform:rotateZ(-45deg);width:150px;height:106px;transform-origin:top right}product-card .corner .background{transition:background-color 0.5s}product-card .from-price{transform:translateY(-100%)}@media (min-width: 768px){product-card .arrow[ref='arrowPrev'],\n product-card .arrow[ref='arrowNext']{transform:translateY(-50%) translateX(0)}product-card .arrow{transition:transform 0.3s,opacity 0.3s}product-card:hover .arrow[ref='arrowPrev']{transform:translateY(-50%) translateX(-100%)}product-card:hover .arrow[ref='arrowNext']{transform:translateY(-50%) translateX(100%)}}"],...arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}})}async connected(){this.checkCurrentFrameIdValidity(),this.resetProductIndex(),await this.requestUpdate()}afterUpdate(){this.$refs.imageSlider?.indexItems(),this.$refs.imageSlider?.goTo(this.currentProductIndex),this.dispatch("PRODUCTCARD_INITIALZED",null,{bubbles:!0,cancelable:!1,
1composed:!1})}properties(){return{name:"",description:"",price:"",frames:{},currentFrameId:!1,activeColorKey:!1,currentProductIndex:0,hasFrameSelector:!0,shouldRenderColorSelector:!0,shouldRenderFrameSelector:!0,shouldRenderProductSizes:!0,showSpacerElement:!1}}get currentFrame(){return!1===this.currentFrameId||!1===this.frames.hasOwnProperty(this.currentFrameId)?this.frames[Object.keys(this.frames)[0]]:this.frames[this.currentFrameId]}get currentFrameProduct(){return this.currentFrame?.products?this.currentFrame.products[this.currentProductIndex]:null}get frameProducts(){return this.currentFrame.products||[]}get frameLink(){return this.currentFrameProduct?this.currentFrameProduct.href:null}get frameSiegel(){return!!(this.currentFrame.siegel&&this.currentFrame.siegel.length>0)&&this.currentFrame.siegel[0]}get frameKeys(){return Object.keys(this.frames)}get frameLabels(){return Object.entries(this.frames).map((r=>{let[e,t]=r;return t.label}))}get canSlideLeft(){return this.currentProductIndex>0}get canSlideRight(){return this.currentProductIndex<this.frameProducts.length-1}get defaultPromotionLogo(){return`${window.siteConfig().publicPath}/assets/images/promotion_logo_default.svg`}get framePromotionLogo(){return this.currentFrame?.promotionLogo??this.defaultPromotionLogo??!1}resetProductIndex(){if(this.activeColorKey){const r=this.currentFrame.products.findIndex((r=>r.colorFilterKey===this.activeColorKey));if(r>-1)return void(this.currentProductIndex=r)}else{const r=this.frameProducts.findIndex((r=>r.selected));if(r>-1)return void(this.currentProductIndex=r)}this.currentProductIndex=0}checkCurrentFrameIdValidity(){this.currentFrameId&&this.frames.hasOwnProperty(this.currentFrameId)||(this.currentFrameId=Object.keys(this.frames)[0])}watch(){return{name:()=>{this.resetProductIndex(),this.requestUpdate()},activeColorKey:async()=>this.resetProductIndex(),currentFrameId:()=>{this.checkCurrentFrameIdValidity(),this.requestUpdate()},currentProductIndex:()=>{this.shouldRenderColorSelector&&(this.$refs.colorSelector.activeColorIndex=this.currentProductIndex),this.shouldRenderProductSizes&&(this.$refs.productSizes.sizes=this.currentFrameProduct?.sizes??[]),this.$refs.title.href=this.frameLink,this.requestUpdate()}}}events(){return{"slider-element":{[v.SLIDER_RUN]:r=>{this.currentProductIndex=r.detail||0},[v.SLIDER_RESIZE]:r=>{this.$refs?.tessaImages?.forEach((r=>r.updateImageSrc()))},touchstart:{listener:r=>{r.stopPropagation()},options:{passive:!0}}},"frame-selector":{click:r=>{r.preventDefault()},[m.FRAME_CLICK]:r=>{this.currentFrameId=r.detail}},"color-selector":{click:r=>{r.preventDefault()},[p.COLOR_CLICK]:r=>{this.currentProductIndex=r.detail}},"[ref=arrowNext]":{click:r=>{r.preventDefault(),this.$refs.imageSlider.next()}},"[ref=arrowPrev]":{click:r=>{r.preventDefault(),this.$refs.imageSlider.previous()}},"[ref=title]":{click:r=>{this.dispatch(f.PRODUCT_CLICK,{link:this.frameLink},{bubbles:!0,cancelable:!1,composed:!1})}}}}renderPrice(){return e` 2 ${a(this.currentFrame.prices)?`${o("FROM")}`:""} 3 <span class="product-card-price"> 4 ${c(this.currentFrame.prices)}<price-asterisk></price-asterisk 5 ></span> 6 ${i(this.currentFrame.prices)?e` 7 8 <del>${i(this.currentFrame.prices)}</del> ${h.symbol()} 9 ${s(this.currentFrame.prices)?o("RECOMMENDED_RETAIL_PRICE"):""} 10 `:null} 11 `}renderSaving(){return d(this.currentFrame.prices)?e` 12 <div 13 class="corner absolute right-0 bottom-0 text-center uppercase text-sm text-grey-300 group-hover:text-brand-400" 14 > 15 ${a(this.currentFrame.prices)?e` <div class="absolute from-price w-full top-0">${o("UP_TO")}</div> `:null} 16 <div class="background pt-1 text-white h-full bg-brand-400 md:bg-grey-300 md:group-hover:bg-brand-400"> 17 <div class="text-lg" style="line-height: 1;"> 18 ${d(this.currentFrame.prices,!0)} 19 <span class="text-sm">${h.symbol()}</span> 20 </div> 21 ${o("productCard.saving","sparen")} 22 </div> 23 </div> 24 `:null}renderBasePrice(){return e`<span>${n(this.currentFrame.prices)}</span>`}getImageSlider(){return e` 25 <slider-element 26 ref="imageSlider" 27 class="absolute inset-0" 28 arrows="false" 29 dots="false" 30 selected-index="${this.currentProductIndex}" 31 > 32 ${this.frameProducts.map((r=>{let{image:t}=r;return e`<div class="item px-2px cursor-pointer"> 33 <tessa-image 34 ref="tessaImages[]" 35 url="${t?.url}" 36 class="block" 37 img-css-class="w-full" 38 scale-down="true" 39 ></tessa-image> 40 </div>`}))} 41 </slider-element> 42 `}getSliderArrows(){return this.frameProducts.length<=1?null:e` 43 <div> 44 ${this.canSlideLeft?e` 45 <div 46 class="cursor-pointer absolute flex justify-center items-center py-2 px-0 to
46p-0 left-0 w-4 xl:w-8 arrow text-grey-300 47 text-center opacity-100 md:opacity-0 md:group-hover:opacity-100" 48 ref="arrowPrev" 49 > 50 <svg-icon name="prev" class="w-4 h-4"></svg-icon> 51 </div> 52 `:null} 53 ${this.canSlideRight?e` 54 <div 55 class="cursor-pointer absolute flex justify-center items-center py-2 px-0 top-0 right-0 w-4 xl:w-8 arrow text-grey-300 56 text-center opacity-100 md:opacity-0 md:group-hover:opacity-100" 57 ref="arrowNext" 58 > 59 <svg-icon name="next" class="w-4 h-4"></svg-icon> 60 </div> 61 `:null} 62 </div> 63 `}renderFrameSelector(){return this.hasFrameSelector&&this.frameKeys.length>0&&this.shouldRenderFrameSelector?e` 64 <frame-selector 65 class="inline-block" 66 frames="${JSON.stringify(this.frameKeys)}" 67 labels="${JSON.stringify(this.frameLabels)}" 68 active-frame="${this.currentFrameId}" 69 ></frame-selector> 70 `:null}renderTagline(){return null}renderProductSizes(){return this.shouldRenderProductSizes?e` <product-sizes 71 ref="productSizes" 72 class="sizes flex justify-center mt-2 md:opacity-0 md:group-hover:opacity-100" 73 .sizes=${this.currentFrameProduct?.sizes??[]} 74 ></product-sizes>`:null}renderProductDescription(){return this.description?e` <div class="product-card-description mb-1 w-full truncate">${t(this.description)}</div>`:null}renderColorSelector(){return this.shouldRenderColorSelector?e` <color-selector 75 ref="colorSelector" 76 class="block mt-5" 77 active-color-index="${this.currentProductIndex}" 78 .colors="${this.frameProducts}" 79 ></color-selector>`:null}renderSpacerElement(){return null}template(){return e` 80 <a href="${this.frameLink}" class="block product-card-content group p-4 xl:p-8 relative overflow-hidden"> 81 ${this.renderTagline()} 82 <div class="product-card-title mb-1" ref="title">${t(this.name)}</div> 83 ${this.renderProductDescription()} 84 <div class="product-card-price-group">${this.renderPrice()} ${this.renderBasePrice()}</div> 85 ${this.renderFrameSelector()} 86 <div class="relative slider-wrapper" role="img" alt="${this.name}"> 87 ${this.getImageSlider()} 88 ${this.frameSiegel?e` 89 <div class="absolute seal"> 90 <img src="${this.frameSiegel}" /> 91 </div> 92 `:""} 93 ${this.currentFrame?.promotionLogo?e` 94 <img 95 class="promotion-logo absolute top-0 right-0" 96 src="${this.framePromotionLogo}" 97 alt="Promotion logo" 98 /> 99 `:""} 100 ${this.getSliderArrows()} 101 </div> 102 103 ${this.renderColorSelector()} ${this.renderProductSizes()} ${this.renderSpacerElement()} 104 ${this.renderSaving()} 105 </a> 106 `}}r("product-card",class extends w{constructor(){super({styles:["product-card{--image-max-height:var(--spacing-80,20rem);transition:box-shadow 0.3s}@media (min-width: 768px){product-card:hover{z-index:2;box-shadow:var(--product-card-shadow)}}product-card .product-card-content{--border-color:var(--product-card-border-color,var(--colors-grey-200,#CCCCCC));min-height:600px;box-shadow:0 0 0 1px var(--border-color);height:100%;background-color:var(--colors-white,#fff);border-radius:var(--product-card-border-radius)}@media (min-width: 768px){product-card .product-card-content:hover{--border-color:var(--product-card-border-color-hover)}}product-card .brand-name{margin-bottom:var(--spacing-1,0.25rem);font-size:0.875rem;font-weight:var(--product-brand-font-weight);color:var(--product-brand-color)}product-card .product-card-title{font-size:1.5rem;font-family:var(--product-title-font-family);
106font-weight:var(--product-title-font-weight);color:var(--product-title-color)}product-card .product-card-description{font-size:0.875rem;color:var(--product-description-color);font-weight:var(--product-description-font-weight)}product-card .product-card-price-group{font-size:0.875rem;color:var(--colors-grey-200,#CCCCCC)}product-card .product-card-price{font-size:1.125rem;font-weight:500;color:var(--colors-black,#000)}product-card frame-selector{margin-top:var(--spacing-6,1.5rem)}product-card .seal{top:var(--spacing-0,0px);left:var(--spacing-0,0px);max-width:100px;max-height:100px}product-card .promotion-logo{max-width:65px;max-height:65px}product-card .arrow{top:50%}product-card .arrow[ref='arrowPrev']{transform:translateY(-50%) translateX(-100%)}product-card .arrow[ref='arrowNext']{transform:translateY(-50%) translateX(100%)}product-card .arrow:hover{background-color:var(--colors-brand-100,#dbeafe);color:var(--colors-brand-500,#3b82f6)}product-card .slider-wrapper{max-height:var(--image-max-height,300px);margin-top:var(--spacing-6,1.5rem)}product-card .slider-wrapper img{max-height:var(--image-max-height,300px)}product-card .slider-wrapper tessa-image{min-height:var(--spacing-8,2rem)}product-card .slider-wrapper:before{content:'';display:block;padding-top:66.66%}product-card slider-element::part(scroller){height:100%}product-card color-selector .colors{flex-wrap:wrap}product-card .sizes{flex-wrap:wrap;white-space:nowrap;transition:opacity 0.5s}product-card .corner{transform:rotateZ(-45deg);width:150px;height:106px;transform-origin:top right}product-card .corner .background{transition:background-color 0.5s}product-card .from-price{transform:translateY(-100%)}@media (min-width: 768px){product-card .arrow[ref='arrowPrev'],\n product-card .arrow[ref='arrowNext']{transform:translateY(-50%) translateX(0)}product-card .arrow{transition:transform 0.3s,opacity 0.3s}product-card:hover .arrow[ref='arrowPrev']{transform:translateY(-50%) translateX(-100%)}product-card:hover .arrow[ref='arrowNext']{transform:translateY(-50%) translateX(100%)}}.divider-component{--divider-background-color:black;--divider-height:1px}.divider-component .divider-simple{border-top-width:var(--divider-height)}.divider-component .center-element{text-align:center;display:flex;justify-content:center;align-items:center;color:var(--divider-background-color)}.divider-component .center-element:before,\n .divider-component .center-element:after{content:'';background-color:var(--divider-background-color);height:var(--divider-height);display:block;width:100%}product-card .product-card-content{display:flex;flex-direction:column;min-height:unset}product-card .product-card-description{margin-bottom:var(--spacing-4,1rem)}product-card frame-selector{margin-top:var(--spacing-4,1rem);align-self:flex-start}product-card .product-card-price-group{font-weight:400;color:var(--colors-grey-500,#7F7F7F);margin-bottom:auto}product-card .product-card-price-group .product-card-price{font-weight:700;color:var(--colors-grey-900,#1A1A1A)}product-card .group:hover .frame-saving{background-color:var(--theme-sales-color)}product-card .sizes{font-size:1rem}product-card .sizes .size{padding-left:var(--spacing-1,0.25rem);padding-right:var(--spacing-1,0.25rem);font-weight:700}product-card .frame-saving{clip-path:polygon(8px 0,100% 0%,100% 100%,0% 100%)}product-card .frame-saving-from{font-size:0.625rem;line-height:1}"]})}renderSaving(){return d(this.currentFrame.prices)?e` 107 <div class="absolute leading-none right-0 bottom-0 mb-4 text-white font-bold w-full"> 108 <div class="flex justify-end min-w-0"> 109 <p class="frame-saving pl-10 pr-8 py-2 truncate bg-grey-300"> 110 ${l(this.currentFrame.prices)?x("partiallyReduced",o("productCard.saving.partial")):x("allReduced",o("productCard.saving.all"))} 111 </p> 112 </div> 113 </div> 114 `:null}renderSpacerElement(){return this.showSpacerElement?e`<div class="pt-12 xl:pt-8"></div>`:null}renderTagline(){const r=this.currentFrame.brand||" ";return e`<div class="brand-name">${t(r)}</div>`}}); 115//# sourceMappingURL=product-card-DTjxCgff.js.map
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.