File "price-frontend.js"

Full Path: /home/vantageo/public_html/cache/cache/cache/cache/cache/cache/.wp-cli/wp-content/plugins/woocommerce/packages/woocommerce-blocks/build/atomic-block-components/price-frontend.js
File size: 5.51 KB
MIME-type: text/plain
Charset: utf-8

(window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[]).push([[6],{128:function(e,r,c){"use strict";var t=c(7),a=c.n(t),n=c(1),l=c(43),o=c(4),i=c.n(o),u=(c(3),c(159)),s=(c(163),function(e){var r=e.currency,c=e.maxPrice,t=e.minPrice,a=e.priceClassName,n=e.priceStyle;return React.createElement(React.Fragment,null,React.createElement(l.a,{className:i()("wc-block-components-product-price__value",a),currency:r,value:t,style:n})," — ",React.createElement(l.a,{className:i()("wc-block-components-product-price__value",a),currency:r,value:c,style:n}))}),p=function(e){var r=e.currency,c=e.regularPriceClassName,t=e.regularPriceStyle,a=e.regularPrice,o=e.priceClassName,u=e.priceStyle,s=e.price;return React.createElement(React.Fragment,null,React.createElement("span",{className:"screen-reader-text"},Object(n.__)("Previous price:",'woocommerce')),React.createElement(l.a,{currency:r,renderText:function(e){return React.createElement("del",{className:i()("wc-block-components-product-price__regular",c),style:t},e)},value:a}),React.createElement("span",{className:"screen-reader-text"},Object(n.__)("Discounted price:",'woocommerce')),React.createElement(l.a,{currency:r,renderText:function(e){return React.createElement("ins",{className:i()("wc-block-components-product-price__value","is-discounted",o),style:u},e)},value:s}))};r.a=function(e){var r=e.align,c=e.className,t=e.currency,n=e.format,o=void 0===n?"<price/>":n,m=e.maxPrice,d=void 0===m?null:m,y=e.minPrice,b=void 0===y?null:y,f=e.price,g=void 0===f?null:f,v=e.priceClassName,_=e.priceStyle,O=e.regularPrice,P=e.regularPriceClassName,N=e.regularPriceStyle,S=i()(c,"price","wc-block-components-product-price",a()({},"wc-block-components-product-price--align-".concat(r),r));o.includes("<price/>")||(o="<price/>",console.error("Price formats need to include the `<price/>` tag."));var C=O&&g!==O,j=React.createElement("span",{className:i()("wc-block-components-product-price__value",v)});return C?j=React.createElement(p,{currency:t,price:g,priceClassName:v,priceStyle:_,regularPrice:O,regularPriceClassName:P,regularPriceStyle:N}):null!==b&&null!==d?j=React.createElement(s,{currency:t,maxPrice:d,minPrice:b,priceClassName:v,priceStyle:_}):null!==g&&(j=React.createElement(l.a,{className:i()("wc-block-components-product-price__value",v),currency:t,value:g,style:_})),React.createElement("span",{className:S},Object(u.a)(o,{price:j}))}},137:function(e,r){},163:function(e,r){},309:function(e,r,c){"use strict";c.r(r);var t=c(7),a=c.n(t),n=(c(3),c(4)),l=c.n(n),o=c(128),i=c(40),u=c(84),s=c(212),p=c(12),m=c(211);r.default=Object(m.withProductDataContext)((function(e){var r,c,t,n,m,d,y,b=e.className,f=e.align,g=e.fontSize,v=e.customFontSize,_=e.saleFontSize,O=e.customSaleFontSize,P=e.color,N=e.customColor,S=e.saleColor,C=e.customSaleColor,j=Object(u.useInnerBlockLayoutContext)().parentClassName,w=Object(u.useProductDataContext)().product,R=l()(b,a()({},"".concat(j,"__product-price"),j));if(!w.id)return React.createElement(o.a,{align:f,className:R});var x=Object(s.getColorClassName)("color",P),E=Object(s.getFontSizeClass)(g),h=Object(s.getColorClassName)("color",S),k=Object(s.getFontSizeClass)(_),z=l()((r={"has-text-color":P||N,"has-font-size":g||v},a()(r,x,x),a()(r,E,E),r)),F=l()((c={"has-text-color":S||C,"has-font-size":_||O},a()(c,h,h),a()(c,k,k),c)),D={color:N,fontSize:v},T={color:C,fontSize:O},V=w.prices,B=Object(i.getCurrencyFromPriceResponse)(V),U=V.price!==V.regular_price,I=U?l()((t={},a()(t,"".concat(j,"__product-price__value"),j),a()(t,F,Object(p.l)()),t)):l()((n={},a()(n,"".concat(j,"__product-price__value"),j),a()(n,z,Object(p.l)()),n)),J=U?T:D;return React.createElement(o.a,{align:f,className:R,currency:B,price:V.price,priceClassName:I,priceStyle:Object(p.l)()?J:{},minPrice:null==V||null===(m=V.price_range)||void 0===m?void 0:m.min_amount,maxPrice:null==V||null===(d=V.price_range)||void 0===d?void 0:d.max_amount,regularPrice:V.regular_price,regularPriceClassName:l()((y={},a()(y,"".concat(j,"__product-price__regular"),j),a()(y,z,Object(p.l)()),y)),regularPriceStyle:Object(p.l)()?D:{}})}))},43:function(e,r,c){"use strict";var t=c(10),a=c.n(t),n=c(7),l=c.n(n),o=c(15),i=c.n(o),u=c(116),s=c(4),p=c.n(s);c(137);function m(e,r){var c=Object.keys(e);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(e);r&&(t=t.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),c.push.apply(c,t)}return c}function d(e){for(var r=1;r<arguments.length;r++){var c=null!=arguments[r]?arguments[r]:{};r%2?m(Object(c),!0).forEach((function(r){l()(e,r,c[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(c)):m(Object(c)).forEach((function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(c,r))}))}return e}r.a=function(e){var r=e.className,c=e.value,t=e.currency,n=e.onValueChange,l=e.displayType,o=void 0===l?"text":l,s=i()(e,["className","value","currency","onValueChange","displayType"]),m="string"==typeof c?parseInt(c,10):c;if(!Number.isFinite(m))return null;var y=m/Math.pow(10,t.minorUnit);if(!Number.isFinite(y))return null;var b=p()("wc-block-formatted-money-amount","wc-block-components-formatted-money-amount",r),f=d(d(d({},s),function(e){return{thousandSeparator:e.thousandSeparator,decimalSeparator:e.decimalSeparator,decimalScale:e.minorUnit,fixedDecimalScale:!0,prefix:e.prefix,suffix:e.suffix,isNumericString:!0}}(t)),{},{value:void 0,currency:void 0,onValueChange:void 0}),g=n?function(e){var r=e.value*Math.pow(10,t.minorUnit);n(r)}:function(){};return React.createElement(u.a,a()({className:b,displayType:o},f,{value:y,onValueChange:g}))}}}]);