(window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[]).push([[11,14],{295:function(e,t){},312:function(e,t,r){"use strict";r.r(t);var c=r(5),n=r.n(c),a=(r(8),r(1)),o=r(7),l=r.n(o),i=r(49),s=r(84),u=r(154);r(295),t.default=Object(u.withProductDataContext)((function(e){var t=e.className,r=e.align,c=Object(s.useInnerBlockLayoutContext)().parentClassName,o=Object(s.useProductDataContext)().product;if(!o.id||!o.on_sale)return null;var u="string"==typeof r?"wc-block-components-product-sale-badge--align-".concat(r):"";return React.createElement("div",{className:l()("wc-block-components-product-sale-badge",t,u,n()({},"".concat(c,"__product-onsale"),c))},React.createElement(i.a,{label:Object(a.__)("Sale",'woocommerce'),screenReaderLabel:Object(a.__)("Product on sale",'woocommerce')}))}))},328:function(e,t){},403:function(e,t,r){"use strict";r.r(t);var c=r(154),n=r(20),a=r.n(n),o=r(5),l=r.n(o),i=r(4),s=r.n(i),u=(r(8),r(0)),p=r(1),d=r(7),b=r.n(d),m=r(2),g=r(84),f=r(52),O=r(312);function w(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var c=Object.getOwnPropertySymbols(e);t&&(c=c.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,c)}return r}function j(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?w(Object(r),!0).forEach((function(t){l()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):w(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}r(328);var h=function(){return React.createElement("img",{src:m.PLACEHOLDER_IMG_SRC,alt:"",width:500,height:500})},y=function(e){var t=e.image,r=e.onLoad,c=e.loaded,n=e.showFullSize,o=e.fallbackAlt,l=t||{},i=l.thumbnail,s=l.src,u=l.srcset,p=l.sizes,d=j({alt:l.alt||o,onLoad:r,hidden:!c,src:i},n&&{src:s,srcSet:u,sizes:p});return React.createElement(React.Fragment,null,d.src&&React.createElement("img",a()({"data-testid":"product-image"},d)),!c&&React.createElement(h,null))},v=Object(c.withProductDataContext)((function(e){var t=e.className,r=e.imageSizing,c=void 0===r?"full-size":r,n=e.showProductLink,a=void 0===n||n,o=e.showSaleBadge,i=e.saleBadgeAlign,d=void 0===i?"right":i,m=Object(g.useInnerBlockLayoutContext)().parentClassName,w=Object(g.useProductDataContext)().product,v=Object(u.useState)(!1),E=s()(v,2),P=E[0],k=E[1],R=Object(f.a)().dispatchStoreEvent;if(!w.id)return React.createElement("div",{className:b()(t,"wc-block-components-product-image","wc-block-components-product-image--placeholder",l()({},"".concat(m,"__product-image"),m))},React.createElement(h,null));var S=!!w.images.length,_=S?w.images[0]:null,D=a?"a":u.Fragment,L=Object(p.sprintf)(
/* translators: %s is referring to the product name */
Object(p.__)("Link to %s",'woocommerce'),w.name),C=j(j({href:w.permalink,rel:"nofollow"},!S&&{"aria-label":L}),{},{onClick:function(){R("product-view-link",{product:w})}});return React.createElement("div",{className:b()(t,"wc-block-components-product-image",l()({},"".concat(m,"__product-image"),m))},React.createElement(D,a&&C,!!o&&React.createElement(O.default,{align:d,product:w}),React.createElement(y,{fallbackAlt:w.name,image:_,onLoad:function(){return k(!0)},loaded:P,showFullSize:"cropped"!==c})))}));t.default=Object(c.withFilteredAttributes)({showProductLink:{type:"boolean",default:!0},showSaleBadge:{type:"boolean",default:!0},saleBadgeAlign:{type:"string",default:"right"},imageSizing:{type:"string",default:"full-size"},productId:{type:"number",default:0}})(v)},49:function(e,t,r){"use strict";var c=r(5),n=r.n(c),a=r(0),o=r(7),l=r.n(o);function i(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var c=Object.getOwnPropertySymbols(e);t&&(c=c.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,c)}return r}function s(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?i(Object(r),!0).forEach((function(t){n()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):i(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}t.a=function(e){var t,r=e.label,c=e.screenReaderLabel,n=e.wrapperElement,o=e.wrapperProps,i=void 0===o?{}:o,u=null!=r,p=null!=c;return!u&&p?(t=n||"span",i=s(s({},i),{},{className:l()(i.className,"screen-reader-text")}),React.createElement(t,i,c)):(t=n||a.Fragment,u&&p&&r!==c?React.createElement(t,i,React.createElement("span",{"aria-hidden":"true"},r),React.createElement("span",{className:"screen-reader-text"},c)):React.createElement(t,i,r))}}}]);