1"use strict";(self.fkaWebpackJsonp=self.fkaWebpackJsonp||[]).push([[4400],{4400:(t,e,a)=>{a.r(e),a.d(e,{default:()=>ht});var o=a(641),s=a(33),r=a(3751);const i={class:"product-actions__content"},n={key:0,class:"product-actions__status"},l={class:"text--placeholder product-actions__availability"},c={class:"text--placeholder product-actions__availability"},u={key:0,class:"product-actions__availability product-actions__web-stock"},d={class:"product-actions__web-stock-text"},y={key:0,class:"product-actions__availability"},p={class:"availability__label availability availability--not-in-stock"},v={key:1,class:"product-actions__availability"},k=["data-store-count"],h={key:3,class:"product-actions__status"},g=["data-store-count"],b={key:4,class:"product-actions__availability"},_=["data-store-count"],S={key:5,class:"product-actions__availability"},m=["data-store-count"],I={key:0};var f=a(5052),C=a(4324);const O={class:"modal__content"},L=["alt"],w={class:"product-store-picker__filter"},D={class:"product-store-picker__search input input--small"},Q={class:"sr-only",for:"product-store-picker-input"},E=["placeholder"],X={class:"product-store-picker__details"},F={for:"details"},A={class:"product-store-picker__geo-marker"},H={for:"nearest"},P={key:0,class:"product-store-picker__stores"},K=["src"],W={class:"product-store-picker__info"},B={class:"product-store-picker__wrapper"},U={class:"h4 product-store-picker__name"},$=["href"],x={key:0},N={key:1,class:"product-store-picker__closed"},T={key:"info"},R=["onClick","title","aria-expanded","aria-controls"],M={class:"product-store-picker__toggle"},j=["id","aria-hidden"],z={class:"product-store-picker__opening-hours",key:"opening-hours"},G={key:0,class:"sr-only"},q={class:"product-store-picker__opening-hours product-store-picker__opening-hours--special",key:"special-opening-hours"},J={key:0};var V=a(953),Y=a(2124),Z=a(6663),tt=a(5094),et=a(6978),at=a(402),ot=a(8857),st=a(967),rt=a(2908);const it={lat:void 0,lng:void 0},nt=(0,o.pM)({name:"ProductStorePicker",mixins:[(0,C.m)()],components:{Modal:et.A,Inventory:at.A,Icon:f.A},emits:["close"],props:{initialStores:Array,productName:String,inventoryStatus:Object,storeStockQuantity:Object,locale:String,googleMapsApiKey:String,lang:{type:Object,required:!0}},setup(t,{emit:e}){const a=(0,Y.Pj)(),s=(0,V.KR)([]),r=(0,V.KR)(""),i=(0,V.KR)(!1),n=(0,V.KR)(!1),l=(0,V.KR)(!1),c=(0,V.Kh)({...it}),u=e=>{let a=t.inventoryStatus?.[e]??rt.R.NotInStock;return a===rt.R.FewInStock&&(a=rt.R.InStock),a},d=t=>t.filter((t=>(t=>{const e=r.value.trim().toLowerCase(),a=t.storeName?.toLowerCase()||"",o=t.zipCode||"";return a.includes(e)||o.includes(r.value.trim())})(t))),y=(0,o.EW)((()=>Array.isArray(t.initialStores)?t.initialStores:a?Object.values((0,st.J7)(a)):[])),p=(0,o.EW)((()=>y.value.slice().sort(((t,e)=>{const a=u(t.storeId);return u(e.storeId)-a})))),v=(0,o.EW)((()=>y.value.slice().sort(((e,a)=>(0,ot.m9)(e,a,t.inventoryStatus,t.locale))))),k=(0,o.EW)((()=>{if(!y.value?.length)return[];if(void 0===c.lat||void 0===c.lng)return[];return(0,ot.yI)(y.value,c.lat,c.lng).map((t=>t.item))})),h=(0,o.EW)((()=>n.value?v.value:k.value.length>0?k.value:p.value)),g=(0,o.EW)((()=>{const t=h.value;if(!r.value.trim().toLowerCase())return t;const e=d(t);return e.length>0?e:t})),b=t=>{c.lat=t.coords.latitude,c.lng=t.coords.longitude,it.lat=t.coords.latitude,it.lng=t.coords.longitude};return(0,o.sV)((()=>{a&&!y.value.length&&(0,st.l3)(a),navigator.geolocation?navigator.geolocation.getCurrentPosition(b):console.warn("Geolocation is not supported by this browser")})),{open:s,search:r,details:i,isSortedByInventory:n,disableFocusTrap:l,myPosition:c,stores:y,showStores:g,close:()=>{e("close")},staticMap:e=>{if(!e.latitude||!e.longitude)return null;if(!t.googleMapsApiKey)return tt.z("Google Maps API Key not provided"),null;const a={key:t.googleMapsApiKey,center:`${e.latitude},${e.longitude}`,size:"165x120",zoom:11,maptype:"roadmap",markers:`color:0x6d1b00|label:G|${e.latitude},${e.longitude}`};return`https://maps.googleapis.com/maps/api/staticmap?${Z.stringify(a)}`},toggleStore:t=>{s.value.includes(t.storeId)?s.value=s.value.filter((e=>e!==t.storeId)):s.value.push(t.storeId)},caretClass:t=>["product-store-picker__caret",{"product-store-picker__caret--open":s.value.includes(t.storeId),"aria-hidden":!0}]}}});var lt=a(6262);const ct=(0,lt.A)(nt,[["render",function(t,e,a,i,n,l){const c=(0,o.g2)("inventory"),u=(0,o.g2)("icon"),d=(0,o.g2)("Modal");return(0,o.uX)(),(0,o.Wv)(d,{onClose:t.close,title:t.translate("chooseStore"),lang:t.translate("modal")},{default:(0,o.k6)((()=>[(0,o.Lk)("div",{class:(0,s.C4)(["product-store-picker",{"product-store-picker--details":t.details}])},[(0,o.Lk)("div",O,[t.stores&&t.stores.length?(0,o.Q3)("",!0):((0,o.uX)(),(0,o.CE)("img",{key:0,class:"product-store-picker__loading",src:"/UI/Icons/loading.svg",alt:t.translate("loading")},null,8,L)),t.showStores&&t.showStores.length?((0,o.uX)(),(0,o.CE)(o.FK,{key:1},[(0,o.Lk)("div",w,[(0,o.Lk)("div",D,[(0,o.Lk)("label",Q,(0,s.v_)(t.translate("searchForStore")),1),(0,o.Lk)("form",{role:"search",class:"product-store-picker__form",autocomplete:"off",method:"GET",action:"?",onSubmit:e[1]||(e[1]=(0,r.D$)((()=>{}),["prevent"]))},[(0,o.bo)((0,o.Lk)("input",{class:"input__input",type:"search",id:"product-store-picker-input","onUpdate:modelValue":e[0]||(e[0]=e=>t.search=e),placeholder:t.translate("searchForStore")},null,8,E),[[r.Jo,t.search]])],32)]),(0,o.Lk)("div",X,[(0,o.bo)((0,o.Lk)("input",{type:"checkbox","onUpdate:modelValue":e[2]||(e[2]=e=>t.details=e),id:"details"},null,512),[[r.lH,t.details]]),(0,o.Lk)("label",F,(0,s.v_)(t.translate("showDetailedInformation")),1)]),(0,o.Lk)("div",A,[(0,o.bo)((0,o.Lk)("input",{type:"checkbox","onUpdate:modelValue":e[3]||(e[3]=e=>t.isSortedByInventory=e),id:"nearest"},null,512),[[r.lH,t.isSortedByInventory]]),(0,o.Lk)("label",H,(0,s.v_)(t.translate("sortByStoreStatus")),1)])]),t.showStores&&t.showStores.length?((0,o.uX)(),(0,o.CE)("ul",P,[((0,o.uX)(!0),(0,o.CE)(o.FK,null,(0,o.pI)(t.showStores,(e=>((0,o.uX)(),(0,o.CE)("li",{key:e.storeId,class:"product-store-picker__store"},[t.details?((0,o.uX)(),(0,o.CE)("img",{key:0,class:"product-store-picker__map",src:t.staticMap(e)||void 0,loading:"lazy",alt:"",width:"165",height:"120"}
1,null,8,K)):(0,o.Q3)("",!0),(0,o.Lk)("div",W,[(0,o.Lk)("div",B,[(0,o.Lk)("h2",U,[(0,o.Lk)("a",{class:"link",href:e.link,target:"_blank"},(0,s.v_)(e.storeName),9,$)]),t.inventoryStatus?((0,o.uX)(),(0,o.Wv)(c,{key:0,status:t.inventoryStatus[e.storeId]||0,quantity:t.storeStockQuantity?.[e.storeId],lang:t.translate("availability")},null,8,["status","quantity","lang"])):(0,o.Q3)("",!0)]),t.details?((0,o.uX)(),(0,o.CE)("p",x,(0,s.v_)(e.address)+", "+(0,s.v_)(e.zipCode)+" "+(0,s.v_)(e.city),1)):(0,o.Q3)("",!0),e.openingHours&&e.openingHours.isTemporarilyClosed?((0,o.uX)(),(0,o.CE)("span",N,(0,s.v_)(t.translate("temporarilyClosed")),1)):(0,o.Q3)("",!0),t.details&&Array.isArray(e.openingHours&&e.openingHours.days)?((0,o.uX)(),(0,o.CE)(o.FK,{key:2},[(0,o.Lk)("p",T,[(0,o.Lk)("button",{class:"link--underline-primary",type:"button",onClick:(0,r.D$)((a=>t.toggleStore(e)),["prevent"]),title:t.translate("seeAllHours"),"aria-expanded":t.open.includes(e.storeId)?"true":"false","aria-controls":e.storeId+"-opening-hours-table"},[(0,o.Lk)("span",M,[(0,o.eW)((0,s.v_)(t.translate("openingHours"))+" ",1),(0,o.bF)(u,{class:(0,s.C4)(t.caretClass(e)),icon:"caret-up"},null,8,["class"])])],8,R)]),(0,o.Lk)("div",{class:"product-store-picker__tables",id:e.storeId+"-opening-hours-table","aria-hidden":t.open.includes(e.storeId)?"false":"true"},[e.openingHours&&e.openingHours.days?(0,o.bo)(((0,o.uX)(),(0,o.CE)("table",z,[e.openingHours.caption?((0,o.uX)(),(0,o.CE)("caption",G,(0,s.v_)(e.openingHours.caption),1)):(0,o.Q3)("",!0),(0,o.Lk)("tbody",null,[((0,o.uX)(!0),(0,o.CE)(o.FK,null,(0,o.pI)(e.openingHours.days,(t=>((0,o.uX)(),(0,o.CE)("tr",{key:t.date,class:(0,s.C4)({"is-active":t.active,"is-special":t.isSpecialOpeningHour})},[(0,o.Lk)("td",null,(0,s.v_)(t.date),1),(0,o.Lk)("td",null,[(0,o.Lk)("strong",null,(0,s.v_)(t.dayNameShort),1)]),(0,o.Lk)("td",null,(0,s.v_)(t.openingHours),1)],2)))),128))])],512)),[[r.aG,t.open.includes(e.storeId)]]):(0,o.Q3)("",!0),e.specialOpeningHours&&e.specialOpeningHours.days&&e.specialOpeningHours.days.length?(0,o.bo)(((0,o.uX)(),(0,o.CE)("table",q,[e.specialOpeningHours.caption?((0,o.uX)(),(0,o.CE)("caption",J,(0,s.v_)(e.specialOpeningHours.caption),1)):(0,o.Q3)("",!0),(0,o.Lk)("tbody",null,[((0,o.uX)(!0),(0,o.CE)(o.FK,null,(0,o.pI)(e.specialOpeningHours.days,(t=>((0,o.uX)(),(0,o.CE)("tr",{key:t.dayName,class:(0,s.C4)({"is-active":t.active})},[(0,o.Lk)("td",null,(0,s.v_)(t.date),1),(0,o.Lk)("td",null,(0,s.v_)(t.dayName),1),(0,o.Lk)("td",null,(0,s.v_)(t.openingHours),1)],2)))),128))])],512)),[[r.aG,t.open.includes(e.storeId)]]):(0,o.Q3)("",!0)],8,j)],64)):(0,o.Q3)("",!0)])])))),128))])):(0,o.Q3)("",!0)],64)):(0,o.Q3)("",!0)])],2)])),_:1},8,["onClose","title","lang"])}]]);var ut=a(9901),dt=a(9590),yt=a(6998),pt=a(3165),vt=a(5849);const kt=(0,o.pM)({name:"ProductActions",mixins:[(0,C.m)()],components:{Icon:f.A,ProductStorePicker:ct,Inventory:at.A},props:{initialInventory:Object,salesPhoneNumber:String,productName:String,productCode:String,locale:String,googleMapsApiKey:String,purchaseUrl:String,serviceText:String,isFinished:Boolean,stopped:Boolean,sellKfp:Boolean,sellPall:Boolean,orderTimeCustomerDays:Number,variantOrderTimeCustomerDays:Object,isService:Boolean,isLagerstyrt:{type:Boolean,default:!1},isBuyableOnline:{type:Boolean,default:!1}},data:()=>({storePicker:!1}),computed:{handleDeliveryIcon(){const{inventory:t}=this;switch(t?.availabilityInfo.availabilityStatus){case pt.U.InventoryInStock:case pt.U.ForcedPurchaseButton:return"truck";case pt.U.None:default:return""}},isOnlyAvailableOnline(){return(0,vt.M)(this.inventory?.webInventoryStatus,this.inventory?.storeInventoryStatus,this.isBuyableOnline,this.isLagerstyrt)},isOnlyAvailableInStores(){const{inventory:t}=this;return t?.availabilityInfo.availabilityStatus===pt.U.StoreOnly},showWebInventoryStatus(){return this.inventory?.availabilityInfo.showWebInventoryStatus??!1},showStatus(){return this.showWebInventoryStatus||this.showStoreInventoryStatus},outOfWebStock(){return this.inventory?.webInventoryStatus===rt.R.NotInStock},outOfStoreStock(){return this.inventory?.storeInventoryStatus===rt.R.NotInStock},resolvedOrderTimeCustomerDays(){if(this.variant){const t=this.variantOrderTimeCustomerDays?.[this.variant];if("number"==typeof t&&t>0)return t}return"number"==typeof this.orderTimeCustomerDays&&this.orderTimeCustomerDays>0?this.orderTimeCustomerDays:null},dynamicDeliveryDaysRange(){return null!==this.resolvedOrderTimeCustomerDays?[this.resolvedOrderTimeCustomerDays-2,this.resolvedOrderTimeCustomerDays+2]:null},deliveryLabel(){const{inventory:t,translate:e,translateFormat:a,salesPhoneNumber:o}=this;switch(t?.availabilityInfo.availabilityStatus){case pt.U.InventoryInStock:return null!==this.dynamicDeliveryDaysRange?a(this.dynamicDeliveryDaysRange,"availability","dynamicDeliveryDays"):e("availability","normalDelivery");case pt.U.ContactSales:return a([o??""],"availability","callToOrder");case pt.U.OrderAndBuyInStore:return e("availability","orderAndBuyInStore");case pt.U.ForcedPurchaseButton:return null!==this.dynamicDeliveryDaysRange?a(this.dynamicDeliveryDaysRange,"availability","dynamicDeliveryDays"):e("availability","extendedDelivery");case pt.U.TemporarilyOutOfStock:return t?.availabilityInfo.productBackInStockDate?a([t?.availabilityInfo.productBackInStockDate],"availability","temporarilyOutOfStock"):e("availability","temporarilyOutOfStockUnknownDate");case pt.U.None:if(this.stopped||!this.sellKfp&&!this.sellPall)return e("availability","temporarilyOutOfStockUnknownDate");default:return""}},deliveryLabelClass(){const{inventory:t}=this;return this.handleDeliveryIcon?"product-actions__delivery-label product-actions__delivery-label--has-icon":["product-actions__delivery-label",{"product-actions__delivery-label--bold":[pt.U.ContactSales].includes(t?.availabilityInfo.availabilityStatus??pt.U.None)}]},stores(){return Object.keys(this.inventory?.storeInventory??[]).length},webStockQuantity(){return this.inventory?.webStockQuantity??void 0},variant(){return this.$store?(0,ut.Uo)(this.$store):null},variantInventory(){if(this.variant&&this.$store){return(0,dt.hj)(this.$store)[this.variant]}}
1,productInventory(){return this.productCode&&this.$store?(0,dt.xy)(this.$store)[this.productCode]:null},inventory(){return this.initialInventory??this.productInventory??this.variantInventory},showStoreInventoryStatus(){return!this.isOnlyAvailableOnline&&(this.inventory?.availabilityInfo.showStoreInventoryStatus??!1)},inventoryQueueStatus(){if(!this.$store)return null;const t=(0,dt.Qf)(this.$store);return Object.prototype.hasOwnProperty.call(t,this.productCode)?t[this.productCode]:null},isFetching(){return(0,ot.h8)(this.inventoryQueueStatus)},hasFailed(){return this.inventoryQueueStatus===ot.an.Failed},addingToCart(){return!!this.$store&&(0,yt.H2)(this.$store).adding}},mounted(){this.productCode&&this.$store&&!this.initialInventory&&!this.isFinished&&(0,dt.DQ)(this.$store,[this.productCode])}}),ht=(0,lt.A)(kt,[["render",function(t,e,a,f,C,O){const L=(0,o.g2)("icon"),w=(0,o.g2)("inventory"),D=(0,o.g2)("product-store-picker");return(0,o.uX)(),(0,o.CE)("div",{class:(0,s.C4)(["product-actions",{"product-actions--fetching ":t.isFetching}])},[(0,o.Lk)("div",i,[t.isFetching?((0,o.uX)(),(0,o.CE)("div",n,[(0,o.Lk)("p",l,(0,s.v_)(t.translate("availability","fetching")),1),(0,o.Lk)("p",c,(0,s.v_)(t.translate("availability","fetching")),1)])):(0,o.Q3)("",!0),t.isFetching?(0,o.Q3)("",!0):((0,o.uX)(),(0,o.CE)(o.FK,{key:1},[t.webStockQuantity>0&&t.isBuyableOnline&&t.showWebInventoryStatus&&!t.outOfWebStock?((0,o.uX)(),(0,o.CE)("div",u,[(0,o.bF)(L,{icon:"box-full-light",height:"24",width:"24",class:"product-actions__web-stock-icon"}),(0,o.Lk)("span",d,(0,s.v_)(t.translateFormat([t.webStockQuantity],"availability","webStockQuantityLabel")),1)])):(0,o.Q3)("",!0),t.deliveryLabel?((0,o.uX)(),(0,o.CE)("p",{key:1,ref:"deliveryLabel",class:(0,s.C4)(t.deliveryLabelClass)},[t.handleDeliveryIcon?((0,o.uX)(),(0,o.Wv)(L,{key:0,icon:t.handleDeliveryIcon,height:"32",width:"32",class:"product-actions__delivery-icon"},null,8,["icon"])):(0,o.Q3)("",!0),(0,o.eW)(" "+(0,s.v_)(t.deliveryLabel),1)],2)):(0,o.Q3)("",!0),t.stopped||t.isService?(0,o.Q3)("",!0):((0,o.uX)(),(0,o.CE)(o.FK,{key:2},[t.outOfWebStock&&t.showWebInventoryStatus&&!t.isOnlyAvailableInStores?((0,o.uX)(),(0,o.CE)("div",y,[(0,o.bF)(w,{lang:t.translate("availability")},{default:(0,o.k6)((()=>[(0,o.Lk)("span",p,(0,s.v_)(t.translate("availability","outOfStockOnline")),1)])),_:1},8,["lang"])])):(0,o.Q3)("",!0),t.outOfStoreStock&&t.inventory&&t.showStoreInventoryStatus?((0,o.uX)(),(0,o.CE)("div",v,[(0,o.bF)(w,{status:t.inventory.storeInventoryStatus,lang:t.translate("availability")},{default:(0,o.k6)((()=>[(0,o.Lk)("span",{class:"product-actions__inventory-text","data-store-count":t.stores},(0,s.v_)(t.translate("availability","outOfStockStore")),9,k)])),_:1},8,["status","lang"])])):(0,o.Q3)("",!0)],64)),t.inventory&&t.showStatus?((0,o.uX)(),(0,o.CE)("div",h,[t.showStoreInventoryStatus&&!t.outOfStoreStock?((0,o.uX)(),(0,o.CE)("button",{key:0,onClick:e[0]||(e[0]=(0,r.D$)((e=>t.storePicker=!t.storePicker),["prevent"])),class:"product-actions__store-availability"},[(0,o.bF)(w,{status:t.inventory.storeInventoryStatus,lang:t.translate("availability")},{default:(0,o.k6)((()=>[(0,o.Lk)("span",{class:"product-actions__inventory-text","data-store-count":t.stores},(0,s.v_)(t.translateFormat([t.stores],"availability","storeStatus")),9,g)])),_:1},8,["status","lang"])])):(0,o.Q3)("",!0)])):(0,o.Q3)("",!0),t.isOnlyAvailableInStores?((0,o.uX)(),(0,o.CE)("div",b,[(0,o.bF)(w,{lang:t.translate("availability")},{default:(0,o.k6)((()=>[(0,o.Lk)("span",{class:"product-actions__inventory-text","data-store-count":t.stores},(0,s.v_)(t.translate("sellOnlyInStores")),9,_)])),_:1},8,["lang"])])):(0,o.Q3)("",!0),t.isOnlyAvailableOnline?((0,o.uX)(),(0,o.CE)("div",S,[(0,o.bF)(w,{lang:t.translate("availability")},{default:(0,o.k6)((()=>[(0,o.Lk)("span",{class:"product-actions__inventory-text","data-store-count":t.stores},(0,s.v_)(t.translate("sellOnlyOnline")),9,m)])),_:1},8,["lang"])])):(0,o.Q3)("",!0)],64))]),t.storePicker&&t.inventory?((0,o.uX)(),(0,o.CE)("div",I,[(0,o.bF)(D,{onClose:e[1]||(e[1]=e=>t.storePicker=!1),"product-name":t.productName,"inventory-status":t.inventory.storeInventory,"store-stock-quantity":t.inventory.storeStockQuantity,locale:t.locale,"google-maps-api-key":t.googleMapsApiKey,lang:t.translate("storePicker")},null,8,["product-name","inventory-status","store-stock-quantity","locale","google-maps-api-key","lang"])])):(0,o.Q3)("",!0)],2)}]])}}]);
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.