PageSourceSearch

https://www.bettermaker.pl/application/assets/storefront/chunk-loyalty_product_price_initializer.C3_foQ0.js

js bettermaker.pl collected 2026-10-08 07:33:20 UTC 2,090 bytes, 1 lines download raw bytes

1import{a0 as n,a1 as l,S as P}from"./storefrontApp.CsApItsi.min.js";import{e as u,n as d}from"./chunk-vendor-lit.NvY0u02.js";import{P as m}from"./chunk-product_price_changed_handler.BDV5fnm.js";import{P as h}from"./chunk-product_stock_changed_handler.C3zWS6V.js";import{S as y}from"./chunk-storefront_base_lit_element.lX23Jvc.js";import"./chunk-vendor-di.Bh23gdA.js";import"./chunk-storefront_settings_constants.DIF02Gz.js";import"./chunk-vendor-rxjs.Dp7kflo.js";import"./chunk-vendor-lodash.CWHFt7Z.js";import"./chunk-vendor-phoenix.cdKS79L.js";import"./chunk-product_events_constants.BHFu5GP.js";var _=Object.defineProperty,C=Object.getOwnPropertyDescriptor,p=(e,t,o,r)=>{for(var i=r>1?void 0:r?C(t,o):t,c=e.length-1,s;c>=0;c--)(s=e[c])&&(i=(r?s(t,o,i):s(i))||i);return r&&i&&_(t,o,i),i};let a=class extends y{constructor(){super(),this._handleProductPriceChanged=({body:e})=>{e&&(e.productId,this.productId)},this._handleProductStockChanged=({body:e})=>{if(!e)return;const t=this._getPriceElements(n.grossPricesContainer),o=this._getPriceElements(n.netPricesContainer),r={...e.price.gross,loyalty:e.loyalty},i={...e.price.net,loyalty:e.loyalty};this._updatePrice(t,r),this._updatePrice(o,i)}}firstUpdated(e){super.firstUpdated(e),new m(this._handleProductPriceChanged),new h(this._handleProductStockChanged)}_getPriceElements(e){const t=this.querySelector(`.${e} .${n.priceContainer}`),o=t?.querySelector(`.${n.loyaltyPriceContainer} .${n.priceValue}`),r=t?.querySelector(`.${n.priceOutsideLoyaltyProgram}`);return{$loyaltyPrice:o,$priceOutsideLoyaltyProgram:r}}_updatePrice(e,t){const{$loyaltyPrice:o,$priceOutsideLoyaltyProgram:r}=e,{base:i,loyalty:c}=t;o&&c&&this._changePriceValueContent(o,c.price.pointsFormatted),r&&this._changePriceValueContent(r,i.text)}_changePriceValueContent(e,t){e.innerHTML="",e.append(t)}};a.moduleName=l.component;p([u({type:Number,attribute:"product-id"})],a.prototype,"productId",2);a=p([d(l.component)],a);class T extends P{static{this.featureName=l.feature}static{this._components={loyaltyProductPrice:a}}}export{T as LoyaltyProductPriceInitializer};

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.