Version Description
2019-10-14 =
Refactor permission checks for authors.
Download this release
Release Info
Developer | aljullu |
Plugin | ![]() |
Version | 2.4.3 |
Comparing to | |
See all releases |
Code changes from version 2.4.2 to 2.4.3
- build/all-reviews.js +1 -1
- build/blocks.js +1 -1
- build/editor.css +2 -2
- build/featured-category.js +1 -1
- build/featured-product.js +1 -1
- build/handpicked-products.js +1 -1
- build/product-best-sellers.js +1 -1
- build/product-categories-frontend.js +1 -1
- build/product-categories.js +1 -1
- build/product-category.js +1 -1
- build/product-new.js +1 -1
- build/product-on-sale.js +1 -1
- build/product-search.js +1 -1
- build/product-tag.js +1 -1
- build/product-top-rated.js +1 -1
- build/products-by-attribute.js +1 -1
- build/reviews-by-category.js +1 -1
- build/reviews-by-product.js +1 -1
- build/reviews-frontend.js +1 -1
- build/style.css +7 -8
build/all-reviews.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
this.wc=this.wc||{},this.wc.blocks=this.wc.blocks||{},this.wc.blocks["all-reviews"]=function(e){function t(t){for(var n,a,i=t[0],l=t[1],s=t[2],b=0,d=[];b<i.length;b++)a=i[b],Object.prototype.hasOwnProperty.call(o,a)&&o[a]&&d.push(o[a][0]),o[a]=0;for(n in l)Object.prototype.hasOwnProperty.call(l,n)&&(e[n]=l[n]);for(u&&u(t);d.length;)d.shift()();return c.push.apply(c,s||[]),r()}function r(){for(var e,t=0;t<c.length;t++){for(var r=c[t],n=!0,i=1;i<r.length;i++){var l=r[i];0!==o[l]&&(n=!1)}n&&(c.splice(t--,1),e=a(a.s=r[0]))}return e}var n={},o={3:0},c=[];function a(t){if(n[t])return n[t].exports;var r=n[t]={i:t,l:!1,exports:{}};return e[t].call(r.exports,r,r.exports,a),r.l=!0,r.exports}a.m=e,a.c=n,a.d=function(e,t,r){a.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},a.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},a.t=function(e,t){if(1&t&&(e=a(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(a.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var n in e)a.d(r,n,function(t){return e[t]}.bind(null,n));return r},a.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return a.d(t,"a",t),t},a.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},a.p="";var i=window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[],l=i.push.bind(i);i.push=t,i=i.slice();for(var s=0;s<i.length;s++)t(i[s]);var u=l;return c.push([551,2,1,0]),r()}({0:function(e,t){!function(){e.exports=this.wp.element}()},1:function(e,t){!function(){e.exports=this.wp.i18n}()},114:function(e,t,r){},13:function(e,t){!function(){e.exports=this.React}()},17:function(e,t){!function(){e.exports=this.wp.apiFetch}()},18:function(e,t){!function(){e.exports=this.wp.editor}()},19:function(e,t){!function(){e.exports=this.wp.url}()},2:function(e,t){!function(){e.exports=this.wp.components}()},21:function(e,t){!function(){e.exports=this.wp.compose}()},23:function(e,t){!function(){e.exports=this.wp.blocks}()},24:function(e,t,r){"use strict";var n=r(0),o=r(2),c=function(e){var t=e.className,r=e.fillColor;return Object(n.createElement)(o.Icon,{className:t,icon:Object(n.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 22.41"},Object(n.createElement)("g",null,Object(n.createElement)("g",null,Object(n.createElement)("path",{fill:r,d:"M16.55 0H1.75C.56 0 0 .52 0 1.68v9.24c0 1.15.56 1.92 1.75 1.92H2V4.76a2.51 2.51 0 0 1 2.74-2.68H18v-.4A1.51 1.51 0 0 0 16.55 0z"}),Object(n.createElement)("path",{fill:r,d:"M19.54 3.11H4.74C3.55 3.11 3 3.64 3 4.79V14c0 1.19.55 2 1.74 2H5V7.88A2.51 2.51 0 0 1 7.73 5.2H21v-.41a1.51 1.51 0 0 0-1.46-1.68z"}),Object(n.createElement)("path",{fill:r,d:"M22.53 6.23H7.73C6.54 6.23 6 6.75 6 7.91v9.24c0 1.15.56 1.92 1.75 1.92h7a.59.59 0 0 1 .32.11l1.61 1.15 2.83 2a.31.31 0 0 0 .18.05.3.3 0 0 0 .31-.3v-2.73a.3.3 0 0 1 .28-.28h2.31A1.47 1.47 0 0 0 24 17.6V7.91a1.52 1.52 0 0 0-1.47-1.68z"}),Object(n.createElement)("path",{fill:"#ffffff",d:"M10.2 10.92l1.06-2.14 1.05 2.14 2.37.35-1.71 1.66.4 2.36-2.11-1.11-.17.09-.52.27-.51.26-.92.49.18-1.02.09-.57.1-.56.03-.21-1.71-1.66 2.37-.35zM21.46 14.25h-4.4a.69.69 0 0 1-.69-.69.68.68 0 0 1 .69-.68h4.4a.68.68 0 0 1 .69.68.69.69 0 0 1-.69.69zM21.46 11.19h-4.4a.69.69 0 1 1 0-1.37h4.4a.69.69 0 1 1 0 1.37z"}))))})},a=function(){return Object(n.createElement)(o.Icon,{icon:Object(n.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},Object(n.createElement)("path",{fillRule:"nonzero",d:"M21.913 7.0946H2.0254c-1.1708 0-2.0984.9908-2.0205 2.16l.741 11.0724c.0714 1.0638.9552 1.8892 2.0206 1.8892h18.4054c1.0654 0 1.9492-.8254 2.0205-1.8892l.7411-11.0724c.0779-1.1692-.8497-2.16-2.0205-2.16zm-8.8006-4.6573h5.987c1.119 0 2.0255.9065 2.0255 2.0254v.934H2.8103V2.0255C2.8103.9064 3.7168 0 4.8357 0h6.2513c1.119 0 2.0254.9065 2.0254 2.0254v.4119zm-7.0589 11.619a.926.926 0 1 1 0-1.852h11.8297a.926.926 0 1 1 0 1.852H6.0535z"}))})},i=function(){return Object(n.createElement)(o.Icon,{icon:Object(n.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},Object(n.createElement)("path",{d:"M22 7.5H2c-1.2 0-2.1 1-2 2.2l.7 11.1c.1 1.1 1 1.9 2 1.9h18.5c1.1 0 2-.8 2-1.9L24 9.6c.1-1.1-.9-2.1-2-2.1zM13.1 2.8v-.4c0-1.1-.9-2-2-2H4.8c-1.1 0-2 .9-2 2v3.4h18.4v-1c0-1.1-.9-2-2-2h-6.1z"}),Object(n.createElement)("path",{fill:"#fff",d:"M14.4 18.7L12 17.4l-2.4 1.3.5-2.6-1.9-1.9 2.6-.4 1.2-2.4 1.2 2.4 2.6.4-1.9 1.9z"}))})},l=function(){return Object(n.createElement)(o.Icon,{className:"material-icon",icon:Object(n.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},Object(n.createElement)("path",{d:"M0 0h24v24H0z",fill:"none"}),Object(n.createElement)("path",{d:"M23 12l-2.44-2.78.34-3.68-3.61-.82-1.89-3.18L12 3 8.6 1.54 6.71 4.72l-3.61.81.34 3.68L1 12l2.44 2.78-.34 3.69 3.61.82 1.89 3.18L12 21l3.4 1.46 1.89-3.18 3.61-.82-.34-3.68L23 12zm-10 5h-2v-2h2v2zm0-4h-2V7h2v6z"}))})},s=function(){return Object(n.createElement)(o.Icon,{icon:Object(n.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},Object(n.createElement)("path",{fill:"#1E8CBE",d:"M12 7c-2.76 0-5 2.24-5 5s2.24 5 5 5 5-2.24 5-5-2.24-5-5-5zm0-5C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"}))})},u=function(){return Object(n.createElement)(o.Icon,{icon:Object(n.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},Object(n.createElement)("path",{fill:"#6C7781",d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"}))})},b=function(e){var t=e.className,r=e.fillColor;return Object(n.createElement)(o.Icon,{className:t,icon:Object(n.createElement)("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},Object(n.createElement)("path",{fill:r,d:"M2.3,17.3h9.3c0.1,0,0.3,0,0.4,0.1l5.9,4.2c0.3,0.2,0.7,0,0.7-0.3v-3.7c0-0.2,0.2-0.4,0.4-0.4H22 c1.1,0,2-0.9,2-2V2.5c0-1.2-0.7-2.2-2-2.2H2.3C0.7,0.2,0,0.9,0,2.5v12.3C0,16.3,0.7,17.3,2.3,17.3z"}),Object(n.createElement)("polygon",{fill:"#ffffff",points:"8.8,12.1 6.5,10.9 4.1,12.1 4.5,9.5 2.6,7.6 5.3,7.2 6.5,4.8 7.6,7.2 10.3,7.6 8.4,9.5"}),Object(n.createElement)("path",{fill:"#ffffff",d:"M20.7,7.9h-7c-0.5,0-0.9-0.4-0.9-0.9S13.2,6,13.7,6h7c0.5,0,0.9,0.4,0.9,0.9S21.2,7.9,20.7,7.9z"}),Object(n.createElement)("path",{fill:"#ffffff",d:"M20.7,11.5h-7c-0.5,0-0.9-0.4-0.9-0.9s0.4-0.9,0.9-0.9h7c0.5,0,0.9,0.4,0.9,0.9S21.2,11.5,20.7,11.5z"}))})},d=function(e){var t=e.className,r=e.fillColor;return Object(n.createElement)(o.Icon,{className:t,icon:Object(n.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 23"},Object(n.createElement)("path",{fill:r,d:"M21.9943 7.0957H2.00638C0.807102 7.0957 -0.0923543 8.0951 0.0075853 9.29437L0.707162 20.3877C0.807102 21.487 1.70656 22.2865 2.70595 22.2865H21.1948C22.2941 22.2865 23.1936 21.487 23.1936 20.3877L23.9931 9.29437C24.093 8.0951 23.0936 7.0957 21.9943 7.0957Z"}),Object(n.createElement)("path",{fill:r,d:"M13.0921 2.39855V1.99879C13.0921 0.899456 12.1926 0 11.0933 0H4.7971C3.69777 0 2.79831 0.899456 2.79831 1.99879V5.39674H21.1872V4.49728C21.1872 3.39795 20.2877 2.49849 19.1884 2.49849H13.0921V2.39855Z"}),Object(n.createElement)("path",{fill:"white",d:"M8.63115 17.126L6.5415 15.9449L4.361 17.126L4.72442 14.6729L2.99819 13.0376L5.45125 12.6742L6.5415 10.4937L7.5409 12.6742L9.99396 13.0376L8.26773 14.6729L8.63115 17.126Z"}),Object(n.createElement)("path",{fill:"white",d:"M19.1907 13.5918H12.9899C12.547 13.5918 12.1926 13.1921 12.1926 12.6924C12.1926 12.1927 12.547 11.7929 12.9899 11.7929H19.1907C19.6336 11.7929 19.9879 12.1927 19.9879 12.6924C19.9879 13.1921 19.6336 13.5918 19.1907 13.5918Z"}),Object(n.createElement)("path",{fill:"white",d:"M19.1907 17.1897H12.9899C12.547 17.1897 12.1926 16.7899 12.1926 16.2902C12.1926 15.7905 12.547 15.3907 12.9899 15.3907H19.1907C19.6336 15.3907 19.9879 15.7905 19.9879 16.2902C19.9879 16.7899 19.6336 17.1897 19.1907 17.1897Z"}))})},w=function(){return Object(n.createElement)(o.Icon,{className:"material-icon",icon:Object(n.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},Object(n.createElement)("path",{d:"M13 13v8h8v-8h-8zM3 21h8v-8H3v8zM3 3v8h8V3H3zm13.66-1.31L11 7.34 16.66 13l5.66-5.66-5.66-5.65z"}),Object(n.createElement)("path",{d:"M0 0h24v24H0z",fill:"none"}))})},p=r(6),m=r.n(p),h=(r(7),function(e){var t=e.size,r=void 0===t?20:t,c=e.className;return Object(n.createElement)(o.Icon,{className:m()("woo-icon",c),icon:Object(n.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",height:r,width:Math.floor(1.67*r),viewBox:"0 0 245 145"},Object(n.createElement)("path",{fill:"#96588A",d:"M22.76 0h199.1a22.77 22.77 0 0 1 22.8 22.76v75.92a22.77 22.77 0 0 1-22.78 22.78h-71.41l9.77 24-43.13-24H22.76C10.1946 121.449.011 111.2654 0 98.7V22.76C.011 10.1946 10.1946.011 22.76 0z"}),Object(n.createElement)("path",{fill:"#FFF",fillRule:"nonzero",d:"M12.32 20.63a8.16 8.16 0 0 1 6.25-3.09c5.0733-.36 7.9867 2.0333 8.74 7.18 3.14 20.86 6.4933 38.5633 10.06 53.11l21.92-41.69c2-3.76 4.49-5.76 7.52-6 4.3867-.3067 7.13 2.49 8.23 8.39a186 186 0 0 0 9.47 34.23c2.62-25.38 7.0133-43.7133 13.18-55a7.73 7.73 0 0 1 6.6-4.43 8.8 8.8 0 0 1 6.32 2 7.75 7.75 0 0 1 3.05 5.74 8.52 8.52 0 0 1-1 4.77c-3.9 7.24-7.12 19.28-9.66 36.12-2.48 16.2533-3.3967 28.9633-2.75 38.13a12.25 12.25 0 0 1-1.16 6.56 6.32 6.32 0 0 1-5.33 3.53c-2.6667.18-5.3033-1.0567-7.91-3.71-9.2933-9.54-16.6567-23.7267-22.09-42.56C57.3 76.7167 52.48 86.3333 49.3 92.76c-5.86 11.3333-10.89 17.13-15.09 17.39-2.7333.1933-5.0667-2.0933-7-6.86-5.1-13.0933-10.5833-38.4033-16.45-75.93a8.56 8.56 0 0 1 1.56-6.73zM227.23 36.34a23.17 23.17 0 0 0-16-11.59 26.25 26.25 0 0 0-5.42-.58c-9.5867 0-17.41 5-23.47 15a53 53 0 0 0-7.78 28.16c0 7.7333 1.6167 14.3333 4.85 19.8a23.15 23.15 0 0 0 16 11.59 26.28 26.28 0 0 0 5.42.59c9.68 0 17.5033-5 23.47-15A53.89 53.89 0 0 0 232.08 56c0-7.7333-1.6167-14.2867-4.85-19.66zm-12.61 27.72c-1.3733 6.56-3.9167 11.5-7.63 14.82-2.9267 2.6667-5.6133 3.7433-8.06 3.23-2.4467-.5133-4.4033-2.6667-5.87-6.46a25.68 25.68 0 0 1-1.76-9.09 35.9 35.9 0 0 1 .73-7.34 33 33 0 0 1 5.28-11.88c3.3333-4.8933 6.8067-6.9467 10.42-6.16 2.44.4867 4.3933 2.64 5.86 6.46a25.68 25.68 0 0 1 1.76 9.12 35.73 35.73 0 0 1-.73 7.33v-.03zM164.57 36.34a23.2 23.2 0 0 0-16-11.59 26.42 26.42 0 0 0-5.43-.58c-9.5933 0-17.4167 5-23.47 15a53 53 0 0 0-7.78 28.16c0 7.7333 1.6133 14.3333 4.84 19.8a23.19 23.19 0 0 0 16 11.59 26.44 26.44 0 0 0 5.43.59c9.68 0 17.5033-5 23.47-15A53.88 53.88 0 0 0 169.4 56c0-7.7333-1.6133-14.2867-4.84-19.66h.01zm-12.61 27.72c-1.3667 6.56-3.91 11.5-7.63 14.82-2.93 2.64-5.63 3.72-8.07 3.23-2.44-.49-4.4-2.64-5.86-6.46a25.7 25.7 0 0 1-1.77-9.09 35.9 35.9 0 0 1 .74-7.34 33 33 0 0 1 5.28-11.88c3.3333-4.8933 6.8067-6.9467 10.42-6.16 2.44.4867 4.3933 2.64 5.86 6.46a25.91 25.91 0 0 1 1.76 9.12 35.73 35.73 0 0 1-.73 7.33v-.03z"}))})});r.d(t,"a",function(){return c}),r.d(t,"b",function(){return a}),r.d(t,"c",function(){return i}),r.d(t,"d",function(){return l}),r.d(t,"e",function(){return s}),r.d(t,"f",function(){return u}),r.d(t,"h",function(){return b}),r.d(t,"g",function(){return d}),r.d(t,"i",function(){return w}),r.d(t,"j",function(){return h})},39:function(e,t){!function(){e.exports=this.wp.escapeHtml}()},4:function(e,t){!function(){e.exports=this.lodash}()},40:function(e,t,r){"use strict";r.d(t,"b",function(){return l}),r.d(t,"c",function(){return s}),r.d(t,"a",function(){return u});var n=r(17),o=r.n(n),c=r(6),a=r.n(c),i=r(5),l=function(e){if(i.ENABLE_REVIEW_RATING){if("lowest-rating"===e)return{order:"asc",orderby:"rating"};if("highest-rating"===e)return{order:"desc",orderby:"rating"}}return{order:"desc",orderby:"date_gmt"}},s=function(e){return o()({path:"/wc/blocks/products/reviews?"+Object.entries(e).map(function(e){return e.join("=")}).join("&"),parse:!1}).then(function(e){return e.json().then(function(t){return{reviews:t,totalReviews:parseInt(e.headers.get("x-wp-total"),10)}})})},u=function(e,t){var r=t.className,n=t.showReviewDate,o=t.showReviewerName,c=t.showReviewContent,i=t.showProductName,l=t.showReviewImage,s=t.showReviewRating;return a()(e,r,{"has-image":l,"has-name":o,"has-date":n,"has-rating":s,"has-content":c,"has-product-name":i})}},5:function(e,t){!function(){e.exports=this.wc["wc-block-settings"]}()},52:function(e,t,r){"use strict";var n=r(0),o=r(1),c=(r(7),r(29)),a=r.n(c),i=r(6),l=r.n(i),s=r(39),u=r(2);t.a=function(e){var t,r,c=e.className,i=e.error,b=e.isLoading,d=e.onRetry;return Object(n.createElement)(u.Placeholder,{icon:Object(n.createElement)(a.a,{icon:"notice"}),label:Object(o.__)("Sorry, an error occurred","woo-gutenberg-products-block"),className:l()("wc-block-api-error",c)},Object(n.createElement)("div",{className:"wc-block-error__message"},(r=(t=i).apiMessage,t.message||(r?Object(n.createElement)("span",null,Object(o.__)("The following error was returned from the API","woo-gutenberg-products-block"),Object(n.createElement)("br",null),Object(n.createElement)("code",null,Object(s.escapeHTML)(r))):Object(o.__)("An unknown error occurred which prevented the block from being updated.","woo-gutenberg-products-block")))),d&&Object(n.createElement)(n.Fragment,null,b?Object(n.createElement)(u.Spinner,null):Object(n.createElement)(u.Button,{isDefault:!0,onClick:d},Object(o.__)("Retry","woo-gutenberg-products-block"))))}},551:function(e,t,r){"use strict";r.r(t);var n=r(20),o=r.n(n),c=r(0),a=r(1),i=r(23),l=(r(77),r(18)),s=r(2),u=(r(7),r(24)),b=r(81),d=function(){return Object(c.createElement)(s.Placeholder,{className:"wc-block-all-reviews",icon:Object(c.createElement)(u.a,{className:"block-editor-block-icon"}),label:Object(a.__)("All Reviews","woo-gutenberg-products-block")},Object(a.__)("This block shows a list of all product reviews. Your store does not have any reviews yet, but they will show up here when it does.","woo-gutenberg-products-block"))},w=r(63),p=function(e){var t=e.attributes,r=e.setAttributes;return Object(c.createElement)(c.Fragment,null,Object(c.createElement)(l.InspectorControls,{key:"inspector"},Object(c.createElement)(s.PanelBody,{title:Object(a.__)("Content","woo-gutenberg-products-block")},Object(c.createElement)(s.ToggleControl,{label:Object(a.__)("Product name","woo-gutenberg-products-block"),checked:t.showProductName,onChange:function(){return r({showProductName:!t.showProductName})}}),Object(w.b)(t,r)),Object(c.createElement)(s.PanelBody,{title:Object(a.__)("List Settings","woo-gutenberg-products-block")},Object(w.c)(t,r))),Object(c.createElement)(b.a,{attributes:t,className:"wc-block-all-reviews",icon:Object(c.createElement)(u.a,{className:"block-editor-block-icon"}),name:Object(a.__)("All Reviews","woo-gutenberg-products-block"),noReviewsPlaceholder:d}))},m=r(79),h=r(80);function v(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}Object(i.registerBlockType)("woocommerce/all-reviews",{title:Object(a.__)("All Reviews","woo-gutenberg-products-block"),icon:{src:Object(c.createElement)(u.a,{fillColor:"#96588a"}),foreground:"#96588a"},category:"woocommerce",keywords:[Object(a.__)("WooCommerce","woo-gutenberg-products-block")],description:Object(a.__)("Shows a list of all product reviews.","woo-gutenberg-products-block"),attributes:function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?v(r,!0).forEach(function(t){o()(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):v(r).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}({},m.a,{showProductName:{type:"boolean",default:!0}}),edit:function(e){return Object(c.createElement)(p,e)},save:h.a})},63:function(e,t,r){"use strict";r.d(t,"a",function(){return b}),r.d(t,"b",function(){return d}),r.d(t,"c",function(){return w});var n=r(0),o=r(1),c=r(39),a=r(2),i=r(18),l=r(74),s=r(5),u=r(70),b=function(e,t){return Object(n.createElement)(i.BlockControls,null,Object(n.createElement)(a.Toolbar,{controls:[{icon:"edit",title:Object(o.__)("Edit","woo-gutenberg-products-block"),onClick:function(){return t({editMode:!e})},isActive:e}]}))},d=function(e,t){return Object(n.createElement)(n.Fragment,null,Object(n.createElement)(a.ToggleControl,{label:Object(o.__)("Product rating","woo-gutenberg-products-block"),checked:e.showReviewRating,onChange:function(){return t({showReviewRating:!e.showReviewRating})}}),e.showReviewRating&&!s.ENABLE_REVIEW_RATING&&Object(n.createElement)(a.Notice,{className:"wc-block-reviews__notice",isDismissible:!1},Object(n.createElement)(n.RawHTML,null,Object(o.sprintf)(Object(c.escapeHTML)(Object(o.__)("Product rating is disabled in your %sstore settings%s.","woo-gutenberg-products-block")),'<a href="'.concat(Object(l.a)("admin.php?page=wc-settings&tab=products"),'" target="_blank">'),"</a>"))),Object(n.createElement)(a.ToggleControl,{label:Object(o.__)("Reviewer name","woo-gutenberg-products-block"),checked:e.showReviewerName,onChange:function(){return t({showReviewerName:!e.showReviewerName})}}),Object(n.createElement)(a.ToggleControl,{label:Object(o.__)("Image","woo-gutenberg-products-block"),checked:e.showReviewImage,onChange:function(){return t({showReviewImage:!e.showReviewImage})}}),Object(n.createElement)(a.ToggleControl,{label:Object(o.__)("Review date","woo-gutenberg-products-block"),checked:e.showReviewDate,onChange:function(){return t({showReviewDate:!e.showReviewDate})}}),Object(n.createElement)(a.ToggleControl,{label:Object(o.__)("Review content","woo-gutenberg-products-block"),checked:e.showReviewContent,onChange:function(){return t({showReviewContent:!e.showReviewContent})}}),e.showReviewImage&&Object(n.createElement)(n.Fragment,null,Object(n.createElement)(u.a,{label:Object(o.__)("Review image","woo-gutenberg-products-block"),value:e.imageType,options:[{label:Object(o.__)("Reviewer photo","woo-gutenberg-products-block"),value:"reviewer"},{label:Object(o.__)("Product","woo-gutenberg-products-block"),value:"product"}],onChange:function(e){return t({imageType:e})}}),"reviewer"===e.imageType&&!s.SHOW_AVATARS&&Object(n.createElement)(a.Notice,{className:"wc-block-reviews__notice",isDismissible:!1},Object(n.createElement)(n.RawHTML,null,Object(o.sprintf)(Object(c.escapeHTML)(Object(o.__)("Reviewer photo is disabled in your %ssite settings%s.","woo-gutenberg-products-block")),'<a href="'.concat(Object(l.a)("options-discussion.php"),'" target="_blank">'),"</a>")))))},w=function(e,t){return Object(n.createElement)(n.Fragment,null,Object(n.createElement)(a.ToggleControl,{label:Object(o.__)("Order by","woo-gutenberg-products-block"),checked:e.showOrderby,onChange:function(){return t({showOrderby:!e.showOrderby})}}),Object(n.createElement)(a.SelectControl,{label:Object(o.__)("Order Product Reviews by","woo-gutenberg-products-block"),value:e.orderby,options:[{label:"Most recent",value:"most-recent"},{label:"Highest Rating",value:"highest-rating"},{label:"Lowest Rating",value:"lowest-rating"}],onChange:function(e){return t({orderby:e})}}),Object(n.createElement)(a.RangeControl,{label:Object(o.__)("Starting Number of Reviews","woo-gutenberg-products-block"),value:e.reviewsOnPageLoad,onChange:function(e){return t({reviewsOnPageLoad:e})},max:20,min:1}),Object(n.createElement)(a.ToggleControl,{label:Object(o.__)("Load more","woo-gutenberg-products-block"),checked:e.showLoadMore,onChange:function(){return t({showLoadMore:!e.showLoadMore})}}),e.showLoadMore&&Object(n.createElement)(a.RangeControl,{label:Object(o.__)("Load More Reviews","woo-gutenberg-products-block"),value:e.reviewsOnLoadMore,onChange:function(e){return t({reviewsOnLoadMore:e})},max:20,min:1}))}},69:function(e,t,r){"use strict";var n=r(16),o=r.n(n),c=r(8),a=r.n(c),i=r(9),l=r.n(i),s=r(10),u=r.n(s),b=r(11),d=r.n(b),w=r(12),p=r.n(w),m=r(0),h=r(13),v=[];t.a=function(e){return function(t){function r(){return a()(this,r),u()(this,d()(r).apply(this,arguments))}return p()(r,t),l()(r,[{key:"generateUniqueID",value:function(){var e=r.name;return v[e]||(v[e]=0),v[e]++,v[e]}},{key:"render",value:function(){var t=this.generateUniqueID();return Object(m.createElement)(e,o()({},this.props,{componentId:t}))}}]),r}(h.Component)}},70:function(e,t,r){"use strict";var n=r(16),o=r.n(n),c=r(8),a=r.n(c),i=r(9),l=r.n(i),s=r(10),u=r.n(s),b=r(11),d=r.n(b),w=r(15),p=r.n(w),m=r(12),h=r.n(m),v=r(0),g=r(4),f=r(6),O=r.n(f),j=r(2),y=r(21),E=(r(132),function(e){function t(){var e;return a()(this,t),(e=u()(this,d()(t).apply(this,arguments))).onClick=e.onClick.bind(p()(e)),e}return h()(t,e),l()(t,[{key:"onClick",value:function(e){this.props.onChange&&this.props.onChange(e.target.value)}},{key:"render",value:function(){var e,t=this,r=this.props,n=r.label,c=r.checked,a=r.instanceId,i=r.className,l=r.help,s=r.options,u=r.value,b="inspector-toggle-button-control-".concat(a);return l&&(e=Object(g.isFunction)(l)?l(c):l),Object(v.createElement)(j.BaseControl,{id:b,help:e,className:O()("components-toggle-button-control",i)},Object(v.createElement)("label",{id:b+"__label",htmlFor:b,className:"components-toggle-button-control__label"},n),Object(v.createElement)(j.ButtonGroup,{"aria-labelledby":b+"__label"},s.map(function(e,r){var c={};return u===e.value?(c.isPrimary=!0,c["aria-pressed"]=!0):(c.isDefault=!0,c["aria-pressed"]=!1),Object(v.createElement)(j.Button,o()({key:"".concat(e.label,"-").concat(e.value,"-").concat(r),value:e.value,onClick:t.onClick,"aria-label":n+": "+e.label},c),e.label)})))}}]),t}(v.Component));t.a=Object(y.withInstanceId)(E)},77:function(e,t,r){var n=r(114);"string"==typeof n&&(n=[[e.i,n,""]]);var o={insert:"head",singleton:!1};r(35)(n,o);n.locals&&(e.exports=n.locals)},78:function(e,t){!function(){e.exports=this.wp.isShallowEqual}()},79:function(e,t,r){"use strict";t.a={editMode:{type:"boolean",default:!0},imageType:{type:"string",default:"reviewer"},orderby:{type:"string",default:"most-recent"},reviewsOnLoadMore:{type:"number",default:10},reviewsOnPageLoad:{type:"number",default:10},showLoadMore:{type:"boolean",default:!0},showOrderby:{type:"boolean",default:!0},showReviewDate:{type:"boolean",default:!0},showReviewerName:{type:"boolean",default:!0},showReviewImage:{type:"boolean",default:!0},showReviewRating:{type:"boolean",default:!0},showReviewContent:{type:"boolean",default:!0}}},80:function(e,t,r){"use strict";var n=r(16),o=r.n(n),c=r(0),a=(r(77),r(40));t.a=function(e){var t=e.attributes,r=t.categoryIds,n=t.imageType,i=t.orderby,l=t.productId,s={"data-image-type":n,"data-orderby":i,"data-reviews-on-page-load":t.reviewsOnPageLoad,"data-reviews-on-load-more":t.reviewsOnLoadMore,"data-show-load-more":t.showLoadMore,"data-show-orderby":t.showOrderby},u="wc-block-all-reviews";return l&&(s["data-product-id"]=l,u="wc-block-reviews-by-product"),Array.isArray(r)&&(s["data-category-ids"]=r.join(","),u="wc-block-reviews-by-category"),Object(c.createElement)("div",o()({className:Object(a.a)(u,t)},s))}},81:function(e,t,r){"use strict";var n=r(8),o=r.n(n),c=r(9),a=r.n(c),i=r(10),l=r.n(i),s=r(11),u=r.n(s),b=r(12),d=r.n(b),w=r(0),p=r(1),m=r(13),h=(r(7),r(4)),v=r(2),g=r(5),f=r(52),O=r(20),j=r.n(O),y=r(6),E=r.n(y);function _(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}var k=function(e){var t,r=e.label,n=e.screenReaderLabel,o=e.wrapperElement,c=e.wrapperProps;return!r&&n?(t=o||"span",c=function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?_(r,!0).forEach(function(t){j()(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):_(r).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}({},c,{className:E()(c.className,"screen-reader-text")}),Object(w.createElement)(t,c,n)):(t=o||m.Fragment,r&&n&&r!==n?Object(w.createElement)(t,c,Object(w.createElement)("span",{"aria-hidden":!0},r),Object(w.createElement)("span",{className:"screen-reader-text"},n)):Object(w.createElement)(t,c,r))};k.defaultProps={wrapperProps:{}};var R=k,C=(r(170),function(e){var t=e.onClick,r=e.label,n=e.screenReaderLabel;return Object(w.createElement)("div",{className:"wp-block-button wc-block-load-more"},Object(w.createElement)("button",{className:"wp-block-button__link",onClick:t},Object(w.createElement)(R,{label:r,screenReaderLabel:n})))});C.defaultProps={label:Object(p.__)("Load more","woo-gutenberg-products-block")};var N=C,L=r(15),P=r.n(L),M=r(100),x=r.n(M),I=function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"...",n=x()(e,{suffix:r,limit:t});return n.html},T=function(e,t,r,n){var o=H(e,t,r);return I(e,o-n.length,n)},H=function(e,t,r){for(var n={start:0,middle:0,end:e.length};n.start<=n.end;)n.middle=Math.floor((n.start+n.end)/2),t.innerHTML=I(e,n.middle),n=A(n,t.clientHeight,r);return n.middle},A=function(e,t,r){return t<=r?e.start=e.middle+1:e.end=e.middle-1,e},S=function(e){function t(e){var r;return o()(this,t),(r=l()(this,u()(t).apply(this,arguments))).state={isExpanded:!1,clampEnabled:null,content:e.children,summary:"."},r.reviewSummary=Object(m.createRef)(),r.reviewContent=Object(m.createRef)(),r.getButton=r.getButton.bind(P()(r)),r.onClick=r.onClick.bind(P()(r)),r}return d()(t,e),a()(t,[{key:"componentDidMount",value:function(){if(this.props.children){var e=this.props,t=e.maxLines,r=e.ellipsis,n=(this.reviewSummary.current.clientHeight+1)*t+1,o=this.reviewContent.current.clientHeight+1>n;this.setState({clampEnabled:o}),o&&this.setState({summary:T(this.reviewContent.current.innerHTML,this.reviewSummary.current,n,r)})}}},{key:"getButton",value:function(){var e=this.state.isExpanded,t=this.props,r=t.className,n=t.lessText,o=t.moreText,c=e?n:o;if(c)return Object(w.createElement)("a",{href:"#more",className:r+"__read_more",onClick:this.onClick,"aria-expanded":!e,role:"button"},c)}},{key:"onClick",value:function(e){e.preventDefault();var t=this.state.isExpanded;this.setState({isExpanded:!t})}},{key:"render",value:function(){var e=this.props.className,t=this.state,r=t.content,n=t.summary,o=t.clampEnabled,c=t.isExpanded;return r?!1===o?Object(w.createElement)("div",{className:e},Object(w.createElement)("div",{ref:this.reviewContent},r)):Object(w.createElement)("div",{className:e},(!c||null===o)&&Object(w.createElement)("div",{ref:this.reviewSummary,"aria-hidden":c,dangerouslySetInnerHTML:{__html:n}}),(c||null===o)&&Object(w.createElement)("div",{ref:this.reviewContent,"aria-hidden":!c},r),this.getButton()):null}}]),t}(m.Component);S.defaultProps={maxLines:3,ellipsis:"…",moreText:Object(p.__)("Read more","woo-gutenberg-products-block"),lessText:Object(p.__)("Read less","woo-gutenberg-products-block"),className:"read-more-content"};var z=S;r(171);var D=function(e){var t=e.attributes,r=e.review,n=void 0===r?{}:r,o=t.imageType,c=t.showReviewDate,a=t.showReviewerName,i=t.showReviewImage,l=t.showReviewRating,s=t.showReviewContent,u=t.showProductName,b=n.rating,d=!Object.keys(n).length>0,m=Number.isFinite(b)&&l;return Object(w.createElement)("li",{className:E()("wc-block-review-list-item__item",{"is-loading":d}),"aria-hidden":d},(u||c||a||i||m)&&Object(w.createElement)("div",{className:"wc-block-review-list-item__info"},i&&function(e,t,r){return r||!e?Object(w.createElement)("div",{className:"wc-block-review-list-item__image",width:"48",height:"48"}):Object(w.createElement)("div",{className:"wc-block-review-list-item__image"},"product"===t?Object(w.createElement)("img",{"aria-hidden":"true",alt:"",src:e.product_picture||"",className:"wc-block-review-list-item__image",width:"48",height:"48"}):Object(w.createElement)("img",{"aria-hidden":"true",alt:"",src:e.reviewer_avatar_urls[48]||"",srcSet:e.reviewer_avatar_urls[96]+" 2x",className:"wc-block-review-list-item__image",width:"48",height:"48"}),e.verified&&Object(w.createElement)("div",{className:"wc-block-review-list-item__verified",title:Object(p.__)("Verified buyer","woo-gutenberg-products-block")},Object(p.__)("Verified buyer","woo-gutenberg-products-block")))}(n,o,d),(u||a||m||c)&&Object(w.createElement)("div",{className:"wc-block-review-list-item__meta"},m&&function(e){var t=e.rating,r={width:t/5*100+"%"};return Object(w.createElement)("div",{className:"wc-block-review-list-item__rating"},Object(w.createElement)("div",{className:"wc-block-review-list-item__rating__stars",role:"img"},Object(w.createElement)("span",{style:r},Object(p.sprintf)(Object(p.__)("Rated %d out of 5","woo-gutenberg-products-block"),t))))}(n),u&&function(e){return Object(w.createElement)("div",{className:"wc-block-review-list-item__product"},Object(w.createElement)("a",{href:e.product_permalink},e.product_name))}(n),a&&function(e){var t=e.reviewer,r=void 0===t?"":t;return Object(w.createElement)("div",{className:"wc-block-review-list-item__author"},r)}(n),c&&function(e){var t=e.date_created,r=e.formatted_date_created;return Object(w.createElement)("time",{className:"wc-block-review-list-item__published-date",dateTime:t},r)}(n))),s&&function(e){return Object(w.createElement)(z,{maxLines:10,moreText:Object(p.__)("Read full review","woo-gutenberg-products-block"),lessText:Object(p.__)("Hide full review","woo-gutenberg-products-block"),className:"wc-block-review-list-item__text"},Object(w.createElement)("div",{dangerouslySetInnerHTML:{__html:e.review||""}}))}(n))};r(172);function B(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}var V=function(e){var t=e.attributes,r=e.reviews,n=function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?B(r,!0).forEach(function(t){j()(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):B(r).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}({},t,{showReviewImage:(g.SHOW_AVATARS||"product"===t.imageType)&&t.showReviewImage,showReviewRating:g.ENABLE_REVIEW_RATING&&t.showReviewRating});return Object(w.createElement)("ul",{className:"wc-block-review-list"},0===r.length?Object(w.createElement)(D,{attributes:n}):r.map(function(e,t){return Object(w.createElement)(D,{key:e.id||t,attributes:n,review:e})}))},F=r(69),W=(r(173),Object(F.a)(function(e){var t=e.className,r=e.componentId,n=e.defaultValue,o=e.label,c=e.onChange,a=e.options,i=e.screenReaderLabel,l=e.readOnly,s=e.value,u="wc-block-order-select__select-".concat(r);return Object(w.createElement)("p",{className:E()("wc-block-order-select",t)},Object(w.createElement)(R,{label:o,screenReaderLabel:i,wrapperElement:"label",wrapperProps:{className:"wc-block-order-select__label",htmlFor:u}}),Object(w.createElement)("select",{id:u,className:"wc-block-order-select__select",defaultValue:n,onChange:c,readOnly:l,value:s},a.map(function(e){return Object(w.createElement)("option",{key:e.key,value:e.key},e.label)})))})),G=(r(174),function(e){var t=e.defaultValue,r=e.onChange,n=e.readOnly,o=e.value;return Object(w.createElement)(W,{className:"wc-block-review-order-select",defaultValue:t,label:Object(p.__)("Order by","woo-gutenberg-products-block"),onChange:r,options:[{key:"most-recent",label:Object(p.__)("Most recent","woo-gutenberg-products-block")},{key:"highest-rating",label:Object(p.__)("Highest rating","woo-gutenberg-products-block")},{key:"lowest-rating",label:Object(p.__)("Lowest rating","woo-gutenberg-products-block")}],readOnly:n,screenReaderLabel:Object(p.__)("Order reviews by","woo-gutenberg-products-block"),value:o})}),Z=r(16),U=r.n(Z),q=r(38),J=r.n(q),Y=r(78),K=r.n(Y),Q=r(40),X=function(e){var t=function(t){function r(){var e;return o()(this,r),(e=l()(this,u()(r).apply(this,arguments))).state={error:null,loading:!0,reviews:[],totalReviews:0},e.setError=e.setError.bind(P()(e)),e.delayedAppendReviews=e.props.delayFunction(e.appendReviews),e}return d()(r,t),a()(r,[{key:"componentDidMount",value:function(){this.replaceReviews()}},{key:"componentDidUpdate",value:function(e){e.reviewsToDisplay<this.props.reviewsToDisplay?this.delayedAppendReviews():this.shouldReplaceReviews(e,this.props)&&this.replaceReviews()}},{key:"shouldReplaceReviews",value:function(e,t){return e.orderby!==t.orderby||e.order!==t.order||e.productId!==t.productId||!K()(e.categoryIds,t.categoryIds)}},{key:"componentWillUnMount",value:function(){this.delayedAppendReviews.cancel&&this.delayedAppendReviews.cancel()}},{key:"getArgs",value:function(e){var t=this.props,r=t.categoryIds,n=t.order,o=t.orderby,c=t.productId,a={order:n,orderby:o,per_page:t.reviewsToDisplay-e,offset:e};return r&&r.length&&(a.category_id=Array.isArray(r)?r.join(","):r),c&&(a.product_id=c),a}},{key:"replaceReviews",value:function(){var e=this.props.onReviewsReplaced;this.updateListOfReviews().then(e)}},{key:"appendReviews",value:function(){var e=this.props,t=e.onReviewsAppended,r=e.reviewsToDisplay,n=this.state.reviews;r<=n.length||this.updateListOfReviews(n).then(t)}},{key:"updateListOfReviews",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],r=this.props.reviewsToDisplay,n=this.state.totalReviews,o=Math.min(n,r)-t.length;return this.setState({loading:!0,reviews:t.concat(Array(o).fill({}))}),Object(Q.c)(this.getArgs(t.length)).then(function(r){var n=r.reviews,o=r.totalReviews;return e.setState({reviews:t.filter(function(e){return Object.keys(e).length}).concat(n),totalReviews:o,loading:!1,error:null}),{newReviews:n}}).catch(this.setError)}},{key:"setError",value:function(e){var t=this;e.json().then(function(e){var r=t.props.onReviewsLoadError,n="object"===J()(e)&&e.hasOwnProperty("message")?{apiMessage:e.message}:{apiMessage:null};t.setState({reviews:[],loading:!1,error:n}),r()})}},{key:"render",value:function(){var t=this.props.reviewsToDisplay,r=this.state,n=r.error,o=r.loading,c=r.reviews,a=r.totalReviews;return Object(w.createElement)(e,U()({},this.props,{error:n,isLoading:o,reviews:c.slice(0,t),totalReviews:a}))}}]),r}(m.Component);t.defaultProps={delayFunction:function(e){return e},onReviewsAppended:function(){},onReviewsLoadError:function(){},onReviewsReplaced:function(){}};var r=e.displayName,n=void 0===r?e.name||"Component":r;return t.displayName="WithReviews( ".concat(n," )"),t}(function(e){function t(){return o()(this,t),l()(this,u()(t).apply(this,arguments))}return d()(t,e),a()(t,[{key:"render",value:function(){var e=this.props,t=e.attributes,r=e.error,n=e.isLoading,o=e.noReviewsPlaceholder,c=e.reviews,a=e.totalReviews;return r?Object(w.createElement)(f.a,{className:"wc-block-featured-product-error",error:r,isLoading:n}):0!==c.length||n?Object(w.createElement)(v.Disabled,null,t.showOrderby&&g.ENABLE_REVIEW_RATING&&Object(w.createElement)(G,{readOnly:!0,value:t.orderby}),Object(w.createElement)(V,{attributes:t,reviews:c}),t.showLoadMore&&a>c.length&&Object(w.createElement)(N,{screenReaderLabel:Object(p.__)("Load more reviews","woo-gutenberg-products-block")})):Object(w.createElement)(o,{attributes:t})}}]),t}(m.Component)),$=function(e){function t(){return o()(this,t),l()(this,u()(t).apply(this,arguments))}return d()(t,e),a()(t,[{key:"renderHiddenContentPlaceholder",value:function(){var e=this.props,t=e.icon,r=e.name;return Object(w.createElement)(v.Placeholder,{icon:t,label:r},Object(p.__)("The content for this block is hidden due to block settings.","woo-gutenberg-products-block"))}},{key:"render",value:function(){var e=this.props,t=e.attributes,r=e.className,n=e.noReviewsPlaceholder,o=t.categoryIds,c=t.productId,a=t.reviewsOnPageLoad,i=t.showProductName,l=t.showReviewDate,s=t.showReviewerName,u=t.showReviewContent,b=t.showReviewImage,d=t.showReviewRating,p=Object(Q.b)(t.orderby),m=p.order,v=p.orderby;return!(u||d||l||s||b||i)?this.renderHiddenContentPlaceholder():Object(w.createElement)("div",{className:Object(Q.a)(r,t)},Object(w.createElement)(X,{attributes:t,categoryIds:o,delayFunction:function(e){return Object(h.debounce)(e,400)},noReviewsPlaceholder:n,orderby:v,order:m,productId:c,reviewsToDisplay:a}))}}]),t}(m.Component);t.a=$}});
|
1 |
+
this.wc=this.wc||{},this.wc.blocks=this.wc.blocks||{},this.wc.blocks["all-reviews"]=function(e){function t(t){for(var n,a,i=t[0],l=t[1],s=t[2],b=0,d=[];b<i.length;b++)a=i[b],Object.prototype.hasOwnProperty.call(o,a)&&o[a]&&d.push(o[a][0]),o[a]=0;for(n in l)Object.prototype.hasOwnProperty.call(l,n)&&(e[n]=l[n]);for(u&&u(t);d.length;)d.shift()();return c.push.apply(c,s||[]),r()}function r(){for(var e,t=0;t<c.length;t++){for(var r=c[t],n=!0,i=1;i<r.length;i++){var l=r[i];0!==o[l]&&(n=!1)}n&&(c.splice(t--,1),e=a(a.s=r[0]))}return e}var n={},o={3:0},c=[];function a(t){if(n[t])return n[t].exports;var r=n[t]={i:t,l:!1,exports:{}};return e[t].call(r.exports,r,r.exports,a),r.l=!0,r.exports}a.m=e,a.c=n,a.d=function(e,t,r){a.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},a.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},a.t=function(e,t){if(1&t&&(e=a(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(a.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var n in e)a.d(r,n,function(t){return e[t]}.bind(null,n));return r},a.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return a.d(t,"a",t),t},a.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},a.p="";var i=window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[],l=i.push.bind(i);i.push=t,i=i.slice();for(var s=0;s<i.length;s++)t(i[s]);var u=l;return c.push([566,2,1,0]),r()}({0:function(e,t){!function(){e.exports=this.wp.element}()},1:function(e,t){!function(){e.exports=this.wp.i18n}()},118:function(e,t,r){},12:function(e,t){!function(){e.exports=this.React}()},16:function(e,t){!function(){e.exports=this.wp.apiFetch}()},17:function(e,t){!function(){e.exports=this.wp.editor}()},18:function(e,t){!function(){e.exports=this.wp.url}()},20:function(e,t){!function(){e.exports=this.wp.compose}()},22:function(e,t){!function(){e.exports=this.wp.blocks}()},23:function(e,t,r){"use strict";var n=r(0),o=r(3),c=function(e){var t=e.className,r=e.fillColor;return Object(n.createElement)(o.Icon,{className:t,icon:Object(n.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 22.41"},Object(n.createElement)("g",null,Object(n.createElement)("g",null,Object(n.createElement)("path",{fill:r,d:"M16.55 0H1.75C.56 0 0 .52 0 1.68v9.24c0 1.15.56 1.92 1.75 1.92H2V4.76a2.51 2.51 0 0 1 2.74-2.68H18v-.4A1.51 1.51 0 0 0 16.55 0z"}),Object(n.createElement)("path",{fill:r,d:"M19.54 3.11H4.74C3.55 3.11 3 3.64 3 4.79V14c0 1.19.55 2 1.74 2H5V7.88A2.51 2.51 0 0 1 7.73 5.2H21v-.41a1.51 1.51 0 0 0-1.46-1.68z"}),Object(n.createElement)("path",{fill:r,d:"M22.53 6.23H7.73C6.54 6.23 6 6.75 6 7.91v9.24c0 1.15.56 1.92 1.75 1.92h7a.59.59 0 0 1 .32.11l1.61 1.15 2.83 2a.31.31 0 0 0 .18.05.3.3 0 0 0 .31-.3v-2.73a.3.3 0 0 1 .28-.28h2.31A1.47 1.47 0 0 0 24 17.6V7.91a1.52 1.52 0 0 0-1.47-1.68z"}),Object(n.createElement)("path",{fill:"#ffffff",d:"M10.2 10.92l1.06-2.14 1.05 2.14 2.37.35-1.71 1.66.4 2.36-2.11-1.11-.17.09-.52.27-.51.26-.92.49.18-1.02.09-.57.1-.56.03-.21-1.71-1.66 2.37-.35zM21.46 14.25h-4.4a.69.69 0 0 1-.69-.69.68.68 0 0 1 .69-.68h4.4a.68.68 0 0 1 .69.68.69.69 0 0 1-.69.69zM21.46 11.19h-4.4a.69.69 0 1 1 0-1.37h4.4a.69.69 0 1 1 0 1.37z"}))))})},a=function(){return Object(n.createElement)(o.Icon,{icon:Object(n.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},Object(n.createElement)("path",{fillRule:"nonzero",d:"M21.913 7.0946H2.0254c-1.1708 0-2.0984.9908-2.0205 2.16l.741 11.0724c.0714 1.0638.9552 1.8892 2.0206 1.8892h18.4054c1.0654 0 1.9492-.8254 2.0205-1.8892l.7411-11.0724c.0779-1.1692-.8497-2.16-2.0205-2.16zm-8.8006-4.6573h5.987c1.119 0 2.0255.9065 2.0255 2.0254v.934H2.8103V2.0255C2.8103.9064 3.7168 0 4.8357 0h6.2513c1.119 0 2.0254.9065 2.0254 2.0254v.4119zm-7.0589 11.619a.926.926 0 1 1 0-1.852h11.8297a.926.926 0 1 1 0 1.852H6.0535z"}))})},i=function(){return Object(n.createElement)(o.Icon,{icon:Object(n.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},Object(n.createElement)("path",{d:"M22 7.5H2c-1.2 0-2.1 1-2 2.2l.7 11.1c.1 1.1 1 1.9 2 1.9h18.5c1.1 0 2-.8 2-1.9L24 9.6c.1-1.1-.9-2.1-2-2.1zM13.1 2.8v-.4c0-1.1-.9-2-2-2H4.8c-1.1 0-2 .9-2 2v3.4h18.4v-1c0-1.1-.9-2-2-2h-6.1z"}),Object(n.createElement)("path",{fill:"#fff",d:"M14.4 18.7L12 17.4l-2.4 1.3.5-2.6-1.9-1.9 2.6-.4 1.2-2.4 1.2 2.4 2.6.4-1.9 1.9z"}))})},l=function(){return Object(n.createElement)(o.Icon,{className:"material-icon",icon:Object(n.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},Object(n.createElement)("path",{d:"M0 0h24v24H0z",fill:"none"}),Object(n.createElement)("path",{d:"M23 12l-2.44-2.78.34-3.68-3.61-.82-1.89-3.18L12 3 8.6 1.54 6.71 4.72l-3.61.81.34 3.68L1 12l2.44 2.78-.34 3.69 3.61.82 1.89 3.18L12 21l3.4 1.46 1.89-3.18 3.61-.82-.34-3.68L23 12zm-10 5h-2v-2h2v2zm0-4h-2V7h2v6z"}))})},s=function(){return Object(n.createElement)(o.Icon,{icon:Object(n.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},Object(n.createElement)("path",{fill:"#1E8CBE",d:"M12 7c-2.76 0-5 2.24-5 5s2.24 5 5 5 5-2.24 5-5-2.24-5-5-5zm0-5C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"}))})},u=function(){return Object(n.createElement)(o.Icon,{icon:Object(n.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},Object(n.createElement)("path",{fill:"#6C7781",d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"}))})},b=function(e){var t=e.className,r=e.fillColor;return Object(n.createElement)(o.Icon,{className:t,icon:Object(n.createElement)("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},Object(n.createElement)("path",{fill:r,d:"M2.3,17.3h9.3c0.1,0,0.3,0,0.4,0.1l5.9,4.2c0.3,0.2,0.7,0,0.7-0.3v-3.7c0-0.2,0.2-0.4,0.4-0.4H22 c1.1,0,2-0.9,2-2V2.5c0-1.2-0.7-2.2-2-2.2H2.3C0.7,0.2,0,0.9,0,2.5v12.3C0,16.3,0.7,17.3,2.3,17.3z"}),Object(n.createElement)("polygon",{fill:"#ffffff",points:"8.8,12.1 6.5,10.9 4.1,12.1 4.5,9.5 2.6,7.6 5.3,7.2 6.5,4.8 7.6,7.2 10.3,7.6 8.4,9.5"}),Object(n.createElement)("path",{fill:"#ffffff",d:"M20.7,7.9h-7c-0.5,0-0.9-0.4-0.9-0.9S13.2,6,13.7,6h7c0.5,0,0.9,0.4,0.9,0.9S21.2,7.9,20.7,7.9z"}),Object(n.createElement)("path",{fill:"#ffffff",d:"M20.7,11.5h-7c-0.5,0-0.9-0.4-0.9-0.9s0.4-0.9,0.9-0.9h7c0.5,0,0.9,0.4,0.9,0.9S21.2,11.5,20.7,11.5z"}))})},d=function(e){var t=e.className,r=e.fillColor;return Object(n.createElement)(o.Icon,{className:t,icon:Object(n.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 23"},Object(n.createElement)("path",{fill:r,d:"M21.9943 7.0957H2.00638C0.807102 7.0957 -0.0923543 8.0951 0.0075853 9.29437L0.707162 20.3877C0.807102 21.487 1.70656 22.2865 2.70595 22.2865H21.1948C22.2941 22.2865 23.1936 21.487 23.1936 20.3877L23.9931 9.29437C24.093 8.0951 23.0936 7.0957 21.9943 7.0957Z"}),Object(n.createElement)("path",{fill:r,d:"M13.0921 2.39855V1.99879C13.0921 0.899456 12.1926 0 11.0933 0H4.7971C3.69777 0 2.79831 0.899456 2.79831 1.99879V5.39674H21.1872V4.49728C21.1872 3.39795 20.2877 2.49849 19.1884 2.49849H13.0921V2.39855Z"}),Object(n.createElement)("path",{fill:"white",d:"M8.63115 17.126L6.5415 15.9449L4.361 17.126L4.72442 14.6729L2.99819 13.0376L5.45125 12.6742L6.5415 10.4937L7.5409 12.6742L9.99396 13.0376L8.26773 14.6729L8.63115 17.126Z"}),Object(n.createElement)("path",{fill:"white",d:"M19.1907 13.5918H12.9899C12.547 13.5918 12.1926 13.1921 12.1926 12.6924C12.1926 12.1927 12.547 11.7929 12.9899 11.7929H19.1907C19.6336 11.7929 19.9879 12.1927 19.9879 12.6924C19.9879 13.1921 19.6336 13.5918 19.1907 13.5918Z"}),Object(n.createElement)("path",{fill:"white",d:"M19.1907 17.1897H12.9899C12.547 17.1897 12.1926 16.7899 12.1926 16.2902C12.1926 15.7905 12.547 15.3907 12.9899 15.3907H19.1907C19.6336 15.3907 19.9879 15.7905 19.9879 16.2902C19.9879 16.7899 19.6336 17.1897 19.1907 17.1897Z"}))})},w=function(){return Object(n.createElement)(o.Icon,{className:"material-icon",icon:Object(n.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},Object(n.createElement)("path",{d:"M13 13v8h8v-8h-8zM3 21h8v-8H3v8zM3 3v8h8V3H3zm13.66-1.31L11 7.34 16.66 13l5.66-5.66-5.66-5.65z"}),Object(n.createElement)("path",{d:"M0 0h24v24H0z",fill:"none"}))})},p=r(6),m=r.n(p),h=(r(2),function(e){var t=e.size,r=void 0===t?20:t,c=e.className;return Object(n.createElement)(o.Icon,{className:m()("woo-icon",c),icon:Object(n.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",height:r,width:Math.floor(1.67*r),viewBox:"0 0 245 145"},Object(n.createElement)("path",{fill:"#96588A",d:"M22.76 0h199.1a22.77 22.77 0 0 1 22.8 22.76v75.92a22.77 22.77 0 0 1-22.78 22.78h-71.41l9.77 24-43.13-24H22.76C10.1946 121.449.011 111.2654 0 98.7V22.76C.011 10.1946 10.1946.011 22.76 0z"}),Object(n.createElement)("path",{fill:"#FFF",fillRule:"nonzero",d:"M12.32 20.63a8.16 8.16 0 0 1 6.25-3.09c5.0733-.36 7.9867 2.0333 8.74 7.18 3.14 20.86 6.4933 38.5633 10.06 53.11l21.92-41.69c2-3.76 4.49-5.76 7.52-6 4.3867-.3067 7.13 2.49 8.23 8.39a186 186 0 0 0 9.47 34.23c2.62-25.38 7.0133-43.7133 13.18-55a7.73 7.73 0 0 1 6.6-4.43 8.8 8.8 0 0 1 6.32 2 7.75 7.75 0 0 1 3.05 5.74 8.52 8.52 0 0 1-1 4.77c-3.9 7.24-7.12 19.28-9.66 36.12-2.48 16.2533-3.3967 28.9633-2.75 38.13a12.25 12.25 0 0 1-1.16 6.56 6.32 6.32 0 0 1-5.33 3.53c-2.6667.18-5.3033-1.0567-7.91-3.71-9.2933-9.54-16.6567-23.7267-22.09-42.56C57.3 76.7167 52.48 86.3333 49.3 92.76c-5.86 11.3333-10.89 17.13-15.09 17.39-2.7333.1933-5.0667-2.0933-7-6.86-5.1-13.0933-10.5833-38.4033-16.45-75.93a8.56 8.56 0 0 1 1.56-6.73zM227.23 36.34a23.17 23.17 0 0 0-16-11.59 26.25 26.25 0 0 0-5.42-.58c-9.5867 0-17.41 5-23.47 15a53 53 0 0 0-7.78 28.16c0 7.7333 1.6167 14.3333 4.85 19.8a23.15 23.15 0 0 0 16 11.59 26.28 26.28 0 0 0 5.42.59c9.68 0 17.5033-5 23.47-15A53.89 53.89 0 0 0 232.08 56c0-7.7333-1.6167-14.2867-4.85-19.66zm-12.61 27.72c-1.3733 6.56-3.9167 11.5-7.63 14.82-2.9267 2.6667-5.6133 3.7433-8.06 3.23-2.4467-.5133-4.4033-2.6667-5.87-6.46a25.68 25.68 0 0 1-1.76-9.09 35.9 35.9 0 0 1 .73-7.34 33 33 0 0 1 5.28-11.88c3.3333-4.8933 6.8067-6.9467 10.42-6.16 2.44.4867 4.3933 2.64 5.86 6.46a25.68 25.68 0 0 1 1.76 9.12 35.73 35.73 0 0 1-.73 7.33v-.03zM164.57 36.34a23.2 23.2 0 0 0-16-11.59 26.42 26.42 0 0 0-5.43-.58c-9.5933 0-17.4167 5-23.47 15a53 53 0 0 0-7.78 28.16c0 7.7333 1.6133 14.3333 4.84 19.8a23.19 23.19 0 0 0 16 11.59 26.44 26.44 0 0 0 5.43.59c9.68 0 17.5033-5 23.47-15A53.88 53.88 0 0 0 169.4 56c0-7.7333-1.6133-14.2867-4.84-19.66h.01zm-12.61 27.72c-1.3667 6.56-3.91 11.5-7.63 14.82-2.93 2.64-5.63 3.72-8.07 3.23-2.44-.49-4.4-2.64-5.86-6.46a25.7 25.7 0 0 1-1.77-9.09 35.9 35.9 0 0 1 .74-7.34 33 33 0 0 1 5.28-11.88c3.3333-4.8933 6.8067-6.9467 10.42-6.16 2.44.4867 4.3933 2.64 5.86 6.46a25.91 25.91 0 0 1 1.76 9.12 35.73 35.73 0 0 1-.73 7.33v-.03z"}))})});r.d(t,"a",(function(){return c})),r.d(t,"b",(function(){return a})),r.d(t,"c",(function(){return i})),r.d(t,"d",(function(){return l})),r.d(t,"e",(function(){return s})),r.d(t,"f",(function(){return u})),r.d(t,"h",(function(){return b})),r.d(t,"g",(function(){return d})),r.d(t,"i",(function(){return w})),r.d(t,"j",(function(){return h}))},3:function(e,t){!function(){e.exports=this.wp.components}()},38:function(e,t){!function(){e.exports=this.wp.escapeHtml}()},39:function(e,t,r){"use strict";r.d(t,"b",(function(){return l})),r.d(t,"c",(function(){return s})),r.d(t,"a",(function(){return u}));var n=r(16),o=r.n(n),c=r(6),a=r.n(c),i=r(5),l=function(e){if(i.ENABLE_REVIEW_RATING){if("lowest-rating"===e)return{order:"asc",orderby:"rating"};if("highest-rating"===e)return{order:"desc",orderby:"rating"}}return{order:"desc",orderby:"date_gmt"}},s=function(e){return o()({path:"/wc/blocks/products/reviews?"+Object.entries(e).map((function(e){return e.join("=")})).join("&"),parse:!1}).then((function(e){return e.json().then((function(t){return{reviews:t,totalReviews:parseInt(e.headers.get("x-wp-total"),10)}}))}))},u=function(e,t){var r=t.className,n=t.showReviewDate,o=t.showReviewerName,c=t.showReviewContent,i=t.showProductName,l=t.showReviewImage,s=t.showReviewRating;return a()(e,r,{"has-image":l,"has-name":o,"has-date":n,"has-rating":s,"has-content":c,"has-product-name":i})}},4:function(e,t){!function(){e.exports=this.lodash}()},5:function(e,t){!function(){e.exports=this.wc["wc-block-settings"]}()},51:function(e,t,r){"use strict";var n=r(0),o=r(1),c=(r(2),r(27)),a=r.n(c),i=r(6),l=r.n(i),s=r(38),u=r(3);t.a=function(e){var t,r,c=e.className,i=e.error,b=e.isLoading,d=e.onRetry;return Object(n.createElement)(u.Placeholder,{icon:Object(n.createElement)(a.a,{icon:"notice"}),label:Object(o.__)("Sorry, an error occurred","woo-gutenberg-products-block"),className:l()("wc-block-api-error",c)},Object(n.createElement)("div",{className:"wc-block-error__message"},(r=(t=i).apiMessage,t.message||(r?Object(n.createElement)("span",null,Object(o.__)("The following error was returned from the API","woo-gutenberg-products-block"),Object(n.createElement)("br",null),Object(n.createElement)("code",null,Object(s.escapeHTML)(r))):Object(o.__)("An unknown error occurred which prevented the block from being updated.","woo-gutenberg-products-block")))),d&&Object(n.createElement)(n.Fragment,null,b?Object(n.createElement)(u.Spinner,null):Object(n.createElement)(u.Button,{isDefault:!0,onClick:d},Object(o.__)("Retry","woo-gutenberg-products-block"))))}},566:function(e,t,r){"use strict";r.r(t);var n=r(19),o=r.n(n),c=r(0),a=r(1),i=r(22),l=(r(80),r(17)),s=r(3),u=(r(2),r(23)),b=r(84),d=function(){return Object(c.createElement)(s.Placeholder,{className:"wc-block-all-reviews",icon:Object(c.createElement)(u.a,{className:"block-editor-block-icon"}),label:Object(a.__)("All Reviews","woo-gutenberg-products-block")},Object(a.__)("This block shows a list of all product reviews. Your store does not have any reviews yet, but they will show up here when it does.","woo-gutenberg-products-block"))},w=r(61),p=function(e){var t=e.attributes,r=e.setAttributes;return Object(c.createElement)(c.Fragment,null,Object(c.createElement)(l.InspectorControls,{key:"inspector"},Object(c.createElement)(s.PanelBody,{title:Object(a.__)("Content","woo-gutenberg-products-block")},Object(c.createElement)(s.ToggleControl,{label:Object(a.__)("Product name","woo-gutenberg-products-block"),checked:t.showProductName,onChange:function(){return r({showProductName:!t.showProductName})}}),Object(w.b)(t,r)),Object(c.createElement)(s.PanelBody,{title:Object(a.__)("List Settings","woo-gutenberg-products-block")},Object(w.c)(t,r))),Object(c.createElement)(b.a,{attributes:t,className:"wc-block-all-reviews",icon:Object(c.createElement)(u.a,{className:"block-editor-block-icon"}),name:Object(a.__)("All Reviews","woo-gutenberg-products-block"),noReviewsPlaceholder:d}))},m=r(82),h=r(83);function v(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}Object(i.registerBlockType)("woocommerce/all-reviews",{title:Object(a.__)("All Reviews","woo-gutenberg-products-block"),icon:{src:Object(c.createElement)(u.a,{fillColor:"#96588a"}),foreground:"#96588a"},category:"woocommerce",keywords:[Object(a.__)("WooCommerce","woo-gutenberg-products-block")],description:Object(a.__)("Shows a list of all product reviews.","woo-gutenberg-products-block"),attributes:function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?v(r,!0).forEach((function(t){o()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):v(r).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}({},m.a,{showProductName:{type:"boolean",default:!0}}),edit:function(e){return Object(c.createElement)(p,e)},save:h.a})},61:function(e,t,r){"use strict";r.d(t,"a",(function(){return b})),r.d(t,"b",(function(){return d})),r.d(t,"c",(function(){return w}));var n=r(0),o=r(1),c=r(38),a=r(3),i=r(17),l=r(77),s=r(5),u=r(70),b=function(e,t){return Object(n.createElement)(i.BlockControls,null,Object(n.createElement)(a.Toolbar,{controls:[{icon:"edit",title:Object(o.__)("Edit","woo-gutenberg-products-block"),onClick:function(){return t({editMode:!e})},isActive:e}]}))},d=function(e,t){return Object(n.createElement)(n.Fragment,null,Object(n.createElement)(a.ToggleControl,{label:Object(o.__)("Product rating","woo-gutenberg-products-block"),checked:e.showReviewRating,onChange:function(){return t({showReviewRating:!e.showReviewRating})}}),e.showReviewRating&&!s.ENABLE_REVIEW_RATING&&Object(n.createElement)(a.Notice,{className:"wc-block-reviews__notice",isDismissible:!1},Object(n.createElement)(n.RawHTML,null,Object(o.sprintf)(Object(c.escapeHTML)(Object(o.__)("Product rating is disabled in your %sstore settings%s.","woo-gutenberg-products-block")),'<a href="'.concat(Object(l.a)("admin.php?page=wc-settings&tab=products"),'" target="_blank">'),"</a>"))),Object(n.createElement)(a.ToggleControl,{label:Object(o.__)("Reviewer name","woo-gutenberg-products-block"),checked:e.showReviewerName,onChange:function(){return t({showReviewerName:!e.showReviewerName})}}),Object(n.createElement)(a.ToggleControl,{label:Object(o.__)("Image","woo-gutenberg-products-block"),checked:e.showReviewImage,onChange:function(){return t({showReviewImage:!e.showReviewImage})}}),Object(n.createElement)(a.ToggleControl,{label:Object(o.__)("Review date","woo-gutenberg-products-block"),checked:e.showReviewDate,onChange:function(){return t({showReviewDate:!e.showReviewDate})}}),Object(n.createElement)(a.ToggleControl,{label:Object(o.__)("Review content","woo-gutenberg-products-block"),checked:e.showReviewContent,onChange:function(){return t({showReviewContent:!e.showReviewContent})}}),e.showReviewImage&&Object(n.createElement)(n.Fragment,null,Object(n.createElement)(u.a,{label:Object(o.__)("Review image","woo-gutenberg-products-block"),value:e.imageType,options:[{label:Object(o.__)("Reviewer photo","woo-gutenberg-products-block"),value:"reviewer"},{label:Object(o.__)("Product","woo-gutenberg-products-block"),value:"product"}],onChange:function(e){return t({imageType:e})}}),"reviewer"===e.imageType&&!s.SHOW_AVATARS&&Object(n.createElement)(a.Notice,{className:"wc-block-reviews__notice",isDismissible:!1},Object(n.createElement)(n.RawHTML,null,Object(o.sprintf)(Object(c.escapeHTML)(Object(o.__)("Reviewer photo is disabled in your %ssite settings%s.","woo-gutenberg-products-block")),'<a href="'.concat(Object(l.a)("options-discussion.php"),'" target="_blank">'),"</a>")))))},w=function(e,t){return Object(n.createElement)(n.Fragment,null,Object(n.createElement)(a.ToggleControl,{label:Object(o.__)("Order by","woo-gutenberg-products-block"),checked:e.showOrderby,onChange:function(){return t({showOrderby:!e.showOrderby})}}),Object(n.createElement)(a.SelectControl,{label:Object(o.__)("Order Product Reviews by","woo-gutenberg-products-block"),value:e.orderby,options:[{label:"Most recent",value:"most-recent"},{label:"Highest Rating",value:"highest-rating"},{label:"Lowest Rating",value:"lowest-rating"}],onChange:function(e){return t({orderby:e})}}),Object(n.createElement)(a.RangeControl,{label:Object(o.__)("Starting Number of Reviews","woo-gutenberg-products-block"),value:e.reviewsOnPageLoad,onChange:function(e){return t({reviewsOnPageLoad:e})},max:20,min:1}),Object(n.createElement)(a.ToggleControl,{label:Object(o.__)("Load more","woo-gutenberg-products-block"),checked:e.showLoadMore,onChange:function(){return t({showLoadMore:!e.showLoadMore})}}),e.showLoadMore&&Object(n.createElement)(a.RangeControl,{label:Object(o.__)("Load More Reviews","woo-gutenberg-products-block"),value:e.reviewsOnLoadMore,onChange:function(e){return t({reviewsOnLoadMore:e})},max:20,min:1}))}},69:function(e,t,r){"use strict";var n=r(15),o=r.n(n),c=r(7),a=r.n(c),i=r(8),l=r.n(i),s=r(9),u=r.n(s),b=r(10),d=r.n(b),w=r(11),p=r.n(w),m=r(0),h=r(12),v=[];t.a=function(e){return function(t){function r(){return a()(this,r),u()(this,d()(r).apply(this,arguments))}return p()(r,t),l()(r,[{key:"generateUniqueID",value:function(){var e=r.name;return v[e]||(v[e]=0),v[e]++,v[e]}},{key:"render",value:function(){var t=this.generateUniqueID();return Object(m.createElement)(e,o()({},this.props,{componentId:t}))}}]),r}(h.Component)}},70:function(e,t,r){"use strict";var n=r(15),o=r.n(n),c=r(7),a=r.n(c),i=r(8),l=r.n(i),s=r(9),u=r.n(s),b=r(10),d=r.n(b),w=r(14),p=r.n(w),m=r(11),h=r.n(m),v=r(0),g=r(4),f=r(6),O=r.n(f),j=r(3),y=r(20),E=(r(136),function(e){function t(){var e;return a()(this,t),(e=u()(this,d()(t).apply(this,arguments))).onClick=e.onClick.bind(p()(e)),e}return h()(t,e),l()(t,[{key:"onClick",value:function(e){this.props.onChange&&this.props.onChange(e.target.value)}},{key:"render",value:function(){var e,t=this,r=this.props,n=r.label,c=r.checked,a=r.instanceId,i=r.className,l=r.help,s=r.options,u=r.value,b="inspector-toggle-button-control-".concat(a);return l&&(e=Object(g.isFunction)(l)?l(c):l),Object(v.createElement)(j.BaseControl,{id:b,help:e,className:O()("components-toggle-button-control",i)},Object(v.createElement)("label",{id:b+"__label",htmlFor:b,className:"components-toggle-button-control__label"},n),Object(v.createElement)(j.ButtonGroup,{"aria-labelledby":b+"__label"},s.map((function(e,r){var c={};return u===e.value?(c.isPrimary=!0,c["aria-pressed"]=!0):(c.isDefault=!0,c["aria-pressed"]=!1),Object(v.createElement)(j.Button,o()({key:"".concat(e.label,"-").concat(e.value,"-").concat(r),value:e.value,onClick:t.onClick,"aria-label":n+": "+e.label},c),e.label)}))))}}]),t}(v.Component));t.a=Object(y.withInstanceId)(E)},80:function(e,t,r){var n=r(118);"string"==typeof n&&(n=[[e.i,n,""]]);var o={insert:"head",singleton:!1};r(34)(n,o);n.locals&&(e.exports=n.locals)},81:function(e,t){!function(){e.exports=this.wp.isShallowEqual}()},82:function(e,t,r){"use strict";t.a={editMode:{type:"boolean",default:!0},imageType:{type:"string",default:"reviewer"},orderby:{type:"string",default:"most-recent"},reviewsOnLoadMore:{type:"number",default:10},reviewsOnPageLoad:{type:"number",default:10},showLoadMore:{type:"boolean",default:!0},showOrderby:{type:"boolean",default:!0},showReviewDate:{type:"boolean",default:!0},showReviewerName:{type:"boolean",default:!0},showReviewImage:{type:"boolean",default:!0},showReviewRating:{type:"boolean",default:!0},showReviewContent:{type:"boolean",default:!0}}},83:function(e,t,r){"use strict";var n=r(15),o=r.n(n),c=r(0),a=(r(80),r(39));t.a=function(e){var t=e.attributes,r=t.categoryIds,n=t.imageType,i=t.orderby,l=t.productId,s={"data-image-type":n,"data-orderby":i,"data-reviews-on-page-load":t.reviewsOnPageLoad,"data-reviews-on-load-more":t.reviewsOnLoadMore,"data-show-load-more":t.showLoadMore,"data-show-orderby":t.showOrderby},u="wc-block-all-reviews";return l&&(s["data-product-id"]=l,u="wc-block-reviews-by-product"),Array.isArray(r)&&(s["data-category-ids"]=r.join(","),u="wc-block-reviews-by-category"),Object(c.createElement)("div",o()({className:Object(a.a)(u,t)},s))}},84:function(e,t,r){"use strict";var n=r(7),o=r.n(n),c=r(8),a=r.n(c),i=r(9),l=r.n(i),s=r(10),u=r.n(s),b=r(11),d=r.n(b),w=r(0),p=r(1),m=r(12),h=(r(2),r(4)),v=r(3),g=r(5),f=r(51),O=r(19),j=r.n(O),y=r(6),E=r.n(y);function _(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}var k=function(e){var t,r=e.label,n=e.screenReaderLabel,o=e.wrapperElement,c=e.wrapperProps;return!r&&n?(t=o||"span",c=function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?_(r,!0).forEach((function(t){j()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):_(r).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}({},c,{className:E()(c.className,"screen-reader-text")}),Object(w.createElement)(t,c,n)):(t=o||m.Fragment,r&&n&&r!==n?Object(w.createElement)(t,c,Object(w.createElement)("span",{"aria-hidden":!0},r),Object(w.createElement)("span",{className:"screen-reader-text"},n)):Object(w.createElement)(t,c,r))};k.defaultProps={wrapperProps:{}};var R=k,C=(r(179),function(e){var t=e.onClick,r=e.label,n=e.screenReaderLabel;return Object(w.createElement)("div",{className:"wp-block-button wc-block-load-more"},Object(w.createElement)("button",{className:"wp-block-button__link",onClick:t},Object(w.createElement)(R,{label:r,screenReaderLabel:n})))});C.defaultProps={label:Object(p.__)("Load more","woo-gutenberg-products-block")};var N=C,L=r(14),P=r.n(L),M=r(103),x=r.n(M),I=function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"...",n=x()(e,{suffix:r,limit:t});return n.html},T=function(e,t,r,n){var o=H(e,t,r);return I(e,o-n.length,n)},H=function(e,t,r){for(var n={start:0,middle:0,end:e.length};n.start<=n.end;)n.middle=Math.floor((n.start+n.end)/2),t.innerHTML=I(e,n.middle),n=A(n,t.clientHeight,r);return n.middle},A=function(e,t,r){return t<=r?e.start=e.middle+1:e.end=e.middle-1,e},S=function(e){function t(e){var r;return o()(this,t),(r=l()(this,u()(t).apply(this,arguments))).state={isExpanded:!1,clampEnabled:null,content:e.children,summary:"."},r.reviewSummary=Object(m.createRef)(),r.reviewContent=Object(m.createRef)(),r.getButton=r.getButton.bind(P()(r)),r.onClick=r.onClick.bind(P()(r)),r}return d()(t,e),a()(t,[{key:"componentDidMount",value:function(){if(this.props.children){var e=this.props,t=e.maxLines,r=e.ellipsis,n=(this.reviewSummary.current.clientHeight+1)*t+1,o=this.reviewContent.current.clientHeight+1>n;this.setState({clampEnabled:o}),o&&this.setState({summary:T(this.reviewContent.current.innerHTML,this.reviewSummary.current,n,r)})}}},{key:"getButton",value:function(){var e=this.state.isExpanded,t=this.props,r=t.className,n=t.lessText,o=t.moreText,c=e?n:o;if(c)return Object(w.createElement)("a",{href:"#more",className:r+"__read_more",onClick:this.onClick,"aria-expanded":!e,role:"button"},c)}},{key:"onClick",value:function(e){e.preventDefault();var t=this.state.isExpanded;this.setState({isExpanded:!t})}},{key:"render",value:function(){var e=this.props.className,t=this.state,r=t.content,n=t.summary,o=t.clampEnabled,c=t.isExpanded;return r?!1===o?Object(w.createElement)("div",{className:e},Object(w.createElement)("div",{ref:this.reviewContent},r)):Object(w.createElement)("div",{className:e},(!c||null===o)&&Object(w.createElement)("div",{ref:this.reviewSummary,"aria-hidden":c,dangerouslySetInnerHTML:{__html:n}}),(c||null===o)&&Object(w.createElement)("div",{ref:this.reviewContent,"aria-hidden":!c},r),this.getButton()):null}}]),t}(m.Component);S.defaultProps={maxLines:3,ellipsis:"…",moreText:Object(p.__)("Read more","woo-gutenberg-products-block"),lessText:Object(p.__)("Read less","woo-gutenberg-products-block"),className:"read-more-content"};var z=S;r(180);var D=function(e){var t=e.attributes,r=e.review,n=void 0===r?{}:r,o=t.imageType,c=t.showReviewDate,a=t.showReviewerName,i=t.showReviewImage,l=t.showReviewRating,s=t.showReviewContent,u=t.showProductName,b=n.rating,d=!Object.keys(n).length>0,m=Number.isFinite(b)&&l;return Object(w.createElement)("li",{className:E()("wc-block-review-list-item__item",{"is-loading":d}),"aria-hidden":d},(u||c||a||i||m)&&Object(w.createElement)("div",{className:"wc-block-review-list-item__info"},i&&function(e,t,r){return r||!e?Object(w.createElement)("div",{className:"wc-block-review-list-item__image",width:"48",height:"48"}):Object(w.createElement)("div",{className:"wc-block-review-list-item__image"},"product"===t?Object(w.createElement)("img",{"aria-hidden":"true",alt:"",src:e.product_picture||"",className:"wc-block-review-list-item__image",width:"48",height:"48"}):Object(w.createElement)("img",{"aria-hidden":"true",alt:"",src:e.reviewer_avatar_urls[48]||"",srcSet:e.reviewer_avatar_urls[96]+" 2x",className:"wc-block-review-list-item__image",width:"48",height:"48"}),e.verified&&Object(w.createElement)("div",{className:"wc-block-review-list-item__verified",title:Object(p.__)("Verified buyer","woo-gutenberg-products-block")},Object(p.__)("Verified buyer","woo-gutenberg-products-block")))}(n,o,d),(u||a||m||c)&&Object(w.createElement)("div",{className:"wc-block-review-list-item__meta"},m&&function(e){var t=e.rating,r={width:t/5*100+"%"};return Object(w.createElement)("div",{className:"wc-block-review-list-item__rating"},Object(w.createElement)("div",{className:"wc-block-review-list-item__rating__stars",role:"img"},Object(w.createElement)("span",{style:r},Object(p.sprintf)(Object(p.__)("Rated %d out of 5","woo-gutenberg-products-block"),t))))}(n),u&&function(e){return Object(w.createElement)("div",{className:"wc-block-review-list-item__product"},Object(w.createElement)("a",{href:e.product_permalink},e.product_name))}(n),a&&function(e){var t=e.reviewer,r=void 0===t?"":t;return Object(w.createElement)("div",{className:"wc-block-review-list-item__author"},r)}(n),c&&function(e){var t=e.date_created,r=e.formatted_date_created;return Object(w.createElement)("time",{className:"wc-block-review-list-item__published-date",dateTime:t},r)}(n))),s&&function(e){return Object(w.createElement)(z,{maxLines:10,moreText:Object(p.__)("Read full review","woo-gutenberg-products-block"),lessText:Object(p.__)("Hide full review","woo-gutenberg-products-block"),className:"wc-block-review-list-item__text"},Object(w.createElement)("div",{dangerouslySetInnerHTML:{__html:e.review||""}}))}(n))};r(181);function B(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}var V=function(e){var t=e.attributes,r=e.reviews,n=function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?B(r,!0).forEach((function(t){j()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):B(r).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}({},t,{showReviewImage:(g.SHOW_AVATARS||"product"===t.imageType)&&t.showReviewImage,showReviewRating:g.ENABLE_REVIEW_RATING&&t.showReviewRating});return Object(w.createElement)("ul",{className:"wc-block-review-list"},0===r.length?Object(w.createElement)(D,{attributes:n}):r.map((function(e,t){return Object(w.createElement)(D,{key:e.id||t,attributes:n,review:e})})))},F=r(69),W=(r(182),Object(F.a)((function(e){var t=e.className,r=e.componentId,n=e.defaultValue,o=e.label,c=e.onChange,a=e.options,i=e.screenReaderLabel,l=e.readOnly,s=e.value,u="wc-block-order-select__select-".concat(r);return Object(w.createElement)("p",{className:E()("wc-block-order-select",t)},Object(w.createElement)(R,{label:o,screenReaderLabel:i,wrapperElement:"label",wrapperProps:{className:"wc-block-order-select__label",htmlFor:u}}),Object(w.createElement)("select",{id:u,className:"wc-block-order-select__select",defaultValue:n,onChange:c,readOnly:l,value:s},a.map((function(e){return Object(w.createElement)("option",{key:e.key,value:e.key},e.label)}))))}))),G=(r(183),function(e){var t=e.defaultValue,r=e.onChange,n=e.readOnly,o=e.value;return Object(w.createElement)(W,{className:"wc-block-review-order-select",defaultValue:t,label:Object(p.__)("Order by","woo-gutenberg-products-block"),onChange:r,options:[{key:"most-recent",label:Object(p.__)("Most recent","woo-gutenberg-products-block")},{key:"highest-rating",label:Object(p.__)("Highest rating","woo-gutenberg-products-block")},{key:"lowest-rating",label:Object(p.__)("Lowest rating","woo-gutenberg-products-block")}],readOnly:n,screenReaderLabel:Object(p.__)("Order reviews by","woo-gutenberg-products-block"),value:o})}),Z=r(15),U=r.n(Z),q=r(37),J=r.n(q),Y=r(81),K=r.n(Y),Q=r(39),X=function(e){var t=function(t){function r(){var e;return o()(this,r),(e=l()(this,u()(r).apply(this,arguments))).state={error:null,loading:!0,reviews:[],totalReviews:0},e.setError=e.setError.bind(P()(e)),e.delayedAppendReviews=e.props.delayFunction(e.appendReviews),e}return d()(r,t),a()(r,[{key:"componentDidMount",value:function(){this.replaceReviews()}},{key:"componentDidUpdate",value:function(e){e.reviewsToDisplay<this.props.reviewsToDisplay?this.delayedAppendReviews():this.shouldReplaceReviews(e,this.props)&&this.replaceReviews()}},{key:"shouldReplaceReviews",value:function(e,t){return e.orderby!==t.orderby||e.order!==t.order||e.productId!==t.productId||!K()(e.categoryIds,t.categoryIds)}},{key:"componentWillUnMount",value:function(){this.delayedAppendReviews.cancel&&this.delayedAppendReviews.cancel()}},{key:"getArgs",value:function(e){var t=this.props,r=t.categoryIds,n=t.order,o=t.orderby,c=t.productId,a={order:n,orderby:o,per_page:t.reviewsToDisplay-e,offset:e};return r&&r.length&&(a.category_id=Array.isArray(r)?r.join(","):r),c&&(a.product_id=c),a}},{key:"replaceReviews",value:function(){var e=this.props.onReviewsReplaced;this.updateListOfReviews().then(e)}},{key:"appendReviews",value:function(){var e=this.props,t=e.onReviewsAppended,r=e.reviewsToDisplay,n=this.state.reviews;r<=n.length||this.updateListOfReviews(n).then(t)}},{key:"updateListOfReviews",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],r=this.props.reviewsToDisplay,n=this.state.totalReviews,o=Math.min(n,r)-t.length;return this.setState({loading:!0,reviews:t.concat(Array(o).fill({}))}),Object(Q.c)(this.getArgs(t.length)).then((function(r){var n=r.reviews,o=r.totalReviews;return e.setState({reviews:t.filter((function(e){return Object.keys(e).length})).concat(n),totalReviews:o,loading:!1,error:null}),{newReviews:n}})).catch(this.setError)}},{key:"setError",value:function(e){var t=this;e.json().then((function(e){var r=t.props.onReviewsLoadError,n="object"===J()(e)&&e.hasOwnProperty("message")?{apiMessage:e.message}:{apiMessage:null};t.setState({reviews:[],loading:!1,error:n}),r()}))}},{key:"render",value:function(){var t=this.props.reviewsToDisplay,r=this.state,n=r.error,o=r.loading,c=r.reviews,a=r.totalReviews;return Object(w.createElement)(e,U()({},this.props,{error:n,isLoading:o,reviews:c.slice(0,t),totalReviews:a}))}}]),r}(m.Component);t.defaultProps={delayFunction:function(e){return e},onReviewsAppended:function(){},onReviewsLoadError:function(){},onReviewsReplaced:function(){}};var r=e.displayName,n=void 0===r?e.name||"Component":r;return t.displayName="WithReviews( ".concat(n," )"),t}(function(e){function t(){return o()(this,t),l()(this,u()(t).apply(this,arguments))}return d()(t,e),a()(t,[{key:"render",value:function(){var e=this.props,t=e.attributes,r=e.error,n=e.isLoading,o=e.noReviewsPlaceholder,c=e.reviews,a=e.totalReviews;return r?Object(w.createElement)(f.a,{className:"wc-block-featured-product-error",error:r,isLoading:n}):0!==c.length||n?Object(w.createElement)(v.Disabled,null,t.showOrderby&&g.ENABLE_REVIEW_RATING&&Object(w.createElement)(G,{readOnly:!0,value:t.orderby}),Object(w.createElement)(V,{attributes:t,reviews:c}),t.showLoadMore&&a>c.length&&Object(w.createElement)(N,{screenReaderLabel:Object(p.__)("Load more reviews","woo-gutenberg-products-block")})):Object(w.createElement)(o,{attributes:t})}}]),t}(m.Component)),$=function(e){function t(){return o()(this,t),l()(this,u()(t).apply(this,arguments))}return d()(t,e),a()(t,[{key:"renderHiddenContentPlaceholder",value:function(){var e=this.props,t=e.icon,r=e.name;return Object(w.createElement)(v.Placeholder,{icon:t,label:r},Object(p.__)("The content for this block is hidden due to block settings.","woo-gutenberg-products-block"))}},{key:"render",value:function(){var e=this.props,t=e.attributes,r=e.className,n=e.noReviewsPlaceholder,o=t.categoryIds,c=t.productId,a=t.reviewsOnPageLoad,i=t.showProductName,l=t.showReviewDate,s=t.showReviewerName,u=t.showReviewContent,b=t.showReviewImage,d=t.showReviewRating,p=Object(Q.b)(t.orderby),m=p.order,v=p.orderby;return!(u||d||l||s||b||i)?this.renderHiddenContentPlaceholder():Object(w.createElement)("div",{className:Object(Q.a)(r,t)},Object(w.createElement)(X,{attributes:t,categoryIds:o,delayFunction:function(e){return Object(h.debounce)(e,400)},noReviewsPlaceholder:n,orderby:v,order:m,productId:c,reviewsToDisplay:a}))}}]),t}(m.Component);t.a=$}});
|
build/blocks.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
this.wc=this.wc||{},this.wc.blocks=this.wc.blocks||{},this.wc.blocks.blocks=function(e){function t(t){for(var n,o,a=t[0],i=t[1],f=t[2],h=0,u=[];h<a.length;h++)o=a[h],Object.prototype.hasOwnProperty.call(r,o)&&r[o]&&u.push(r[o][0]),r[o]=0;for(n in i)Object.prototype.hasOwnProperty.call(i,n)&&(e[n]=i[n]);for(s&&s(t);u.length;)u.shift()();return l.push.apply(l,f||[]),c()}function c(){for(var e,t=0;t<l.length;t++){for(var c=l[t],n=!0,a=1;a<c.length;a++){var i=c[a];0!==r[i]&&(n=!1)}n&&(l.splice(t--,1),e=o(o.s=c[0]))}return e}var n={},r={4:0},l=[];function o(t){if(n[t])return n[t].exports;var c=n[t]={i:t,l:!1,exports:{}};return e[t].call(c.exports,c,c.exports,o),c.l=!0,c.exports}o.m=e,o.c=n,o.d=function(e,t,c){o.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:c})},o.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},o.t=function(e,t){if(1&t&&(e=o(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var c=Object.create(null);if(o.r(c),Object.defineProperty(c,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var n in e)o.d(c,n,function(t){return e[t]}.bind(null,n));return c},o.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return o.d(t,"a",t),t},o.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},o.p="";var a=window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[],i=a.push.bind(a);a.push=t,a=a.slice();for(var f=0;f<a.length;f++)t(a[f]);var s=i;return l.push([290,2,1,0]),c()}({0:function(e,t){!function(){e.exports=this.wp.element}()},1:function(e,t){!function(){e.exports=this.wp.i18n}()},2:function(e,t){!function(){e.exports=this.wp.components}()},23:function(e,t){!function(){e.exports=this.wp.blocks}()},24:function(e,t,c){"use strict";var n=c(0),r=c(2),l=function(e){var t=e.className,c=e.fillColor;return Object(n.createElement)(r.Icon,{className:t,icon:Object(n.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 22.41"},Object(n.createElement)("g",null,Object(n.createElement)("g",null,Object(n.createElement)("path",{fill:c,d:"M16.55 0H1.75C.56 0 0 .52 0 1.68v9.24c0 1.15.56 1.92 1.75 1.92H2V4.76a2.51 2.51 0 0 1 2.74-2.68H18v-.4A1.51 1.51 0 0 0 16.55 0z"}),Object(n.createElement)("path",{fill:c,d:"M19.54 3.11H4.74C3.55 3.11 3 3.64 3 4.79V14c0 1.19.55 2 1.74 2H5V7.88A2.51 2.51 0 0 1 7.73 5.2H21v-.41a1.51 1.51 0 0 0-1.46-1.68z"}),Object(n.createElement)("path",{fill:c,d:"M22.53 6.23H7.73C6.54 6.23 6 6.75 6 7.91v9.24c0 1.15.56 1.92 1.75 1.92h7a.59.59 0 0 1 .32.11l1.61 1.15 2.83 2a.31.31 0 0 0 .18.05.3.3 0 0 0 .31-.3v-2.73a.3.3 0 0 1 .28-.28h2.31A1.47 1.47 0 0 0 24 17.6V7.91a1.52 1.52 0 0 0-1.47-1.68z"}),Object(n.createElement)("path",{fill:"#ffffff",d:"M10.2 10.92l1.06-2.14 1.05 2.14 2.37.35-1.71 1.66.4 2.36-2.11-1.11-.17.09-.52.27-.51.26-.92.49.18-1.02.09-.57.1-.56.03-.21-1.71-1.66 2.37-.35zM21.46 14.25h-4.4a.69.69 0 0 1-.69-.69.68.68 0 0 1 .69-.68h4.4a.68.68 0 0 1 .69.68.69.69 0 0 1-.69.69zM21.46 11.19h-4.4a.69.69 0 1 1 0-1.37h4.4a.69.69 0 1 1 0 1.37z"}))))})},o=function(){return Object(n.createElement)(r.Icon,{icon:Object(n.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},Object(n.createElement)("path",{fillRule:"nonzero",d:"M21.913 7.0946H2.0254c-1.1708 0-2.0984.9908-2.0205 2.16l.741 11.0724c.0714 1.0638.9552 1.8892 2.0206 1.8892h18.4054c1.0654 0 1.9492-.8254 2.0205-1.8892l.7411-11.0724c.0779-1.1692-.8497-2.16-2.0205-2.16zm-8.8006-4.6573h5.987c1.119 0 2.0255.9065 2.0255 2.0254v.934H2.8103V2.0255C2.8103.9064 3.7168 0 4.8357 0h6.2513c1.119 0 2.0254.9065 2.0254 2.0254v.4119zm-7.0589 11.619a.926.926 0 1 1 0-1.852h11.8297a.926.926 0 1 1 0 1.852H6.0535z"}))})},a=function(){return Object(n.createElement)(r.Icon,{icon:Object(n.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},Object(n.createElement)("path",{d:"M22 7.5H2c-1.2 0-2.1 1-2 2.2l.7 11.1c.1 1.1 1 1.9 2 1.9h18.5c1.1 0 2-.8 2-1.9L24 9.6c.1-1.1-.9-2.1-2-2.1zM13.1 2.8v-.4c0-1.1-.9-2-2-2H4.8c-1.1 0-2 .9-2 2v3.4h18.4v-1c0-1.1-.9-2-2-2h-6.1z"}),Object(n.createElement)("path",{fill:"#fff",d:"M14.4 18.7L12 17.4l-2.4 1.3.5-2.6-1.9-1.9 2.6-.4 1.2-2.4 1.2 2.4 2.6.4-1.9 1.9z"}))})},i=function(){return Object(n.createElement)(r.Icon,{className:"material-icon",icon:Object(n.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},Object(n.createElement)("path",{d:"M0 0h24v24H0z",fill:"none"}),Object(n.createElement)("path",{d:"M23 12l-2.44-2.78.34-3.68-3.61-.82-1.89-3.18L12 3 8.6 1.54 6.71 4.72l-3.61.81.34 3.68L1 12l2.44 2.78-.34 3.69 3.61.82 1.89 3.18L12 21l3.4 1.46 1.89-3.18 3.61-.82-.34-3.68L23 12zm-10 5h-2v-2h2v2zm0-4h-2V7h2v6z"}))})},f=function(){return Object(n.createElement)(r.Icon,{icon:Object(n.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},Object(n.createElement)("path",{fill:"#1E8CBE",d:"M12 7c-2.76 0-5 2.24-5 5s2.24 5 5 5 5-2.24 5-5-2.24-5-5-5zm0-5C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"}))})},s=function(){return Object(n.createElement)(r.Icon,{icon:Object(n.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},Object(n.createElement)("path",{fill:"#6C7781",d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"}))})},h=function(e){var t=e.className,c=e.fillColor;return Object(n.createElement)(r.Icon,{className:t,icon:Object(n.createElement)("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},Object(n.createElement)("path",{fill:c,d:"M2.3,17.3h9.3c0.1,0,0.3,0,0.4,0.1l5.9,4.2c0.3,0.2,0.7,0,0.7-0.3v-3.7c0-0.2,0.2-0.4,0.4-0.4H22 c1.1,0,2-0.9,2-2V2.5c0-1.2-0.7-2.2-2-2.2H2.3C0.7,0.2,0,0.9,0,2.5v12.3C0,16.3,0.7,17.3,2.3,17.3z"}),Object(n.createElement)("polygon",{fill:"#ffffff",points:"8.8,12.1 6.5,10.9 4.1,12.1 4.5,9.5 2.6,7.6 5.3,7.2 6.5,4.8 7.6,7.2 10.3,7.6 8.4,9.5"}),Object(n.createElement)("path",{fill:"#ffffff",d:"M20.7,7.9h-7c-0.5,0-0.9-0.4-0.9-0.9S13.2,6,13.7,6h7c0.5,0,0.9,0.4,0.9,0.9S21.2,7.9,20.7,7.9z"}),Object(n.createElement)("path",{fill:"#ffffff",d:"M20.7,11.5h-7c-0.5,0-0.9-0.4-0.9-0.9s0.4-0.9,0.9-0.9h7c0.5,0,0.9,0.4,0.9,0.9S21.2,11.5,20.7,11.5z"}))})},u=function(e){var t=e.className,c=e.fillColor;return Object(n.createElement)(r.Icon,{className:t,icon:Object(n.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 23"},Object(n.createElement)("path",{fill:c,d:"M21.9943 7.0957H2.00638C0.807102 7.0957 -0.0923543 8.0951 0.0075853 9.29437L0.707162 20.3877C0.807102 21.487 1.70656 22.2865 2.70595 22.2865H21.1948C22.2941 22.2865 23.1936 21.487 23.1936 20.3877L23.9931 9.29437C24.093 8.0951 23.0936 7.0957 21.9943 7.0957Z"}),Object(n.createElement)("path",{fill:c,d:"M13.0921 2.39855V1.99879C13.0921 0.899456 12.1926 0 11.0933 0H4.7971C3.69777 0 2.79831 0.899456 2.79831 1.99879V5.39674H21.1872V4.49728C21.1872 3.39795 20.2877 2.49849 19.1884 2.49849H13.0921V2.39855Z"}),Object(n.createElement)("path",{fill:"white",d:"M8.63115 17.126L6.5415 15.9449L4.361 17.126L4.72442 14.6729L2.99819 13.0376L5.45125 12.6742L6.5415 10.4937L7.5409 12.6742L9.99396 13.0376L8.26773 14.6729L8.63115 17.126Z"}),Object(n.createElement)("path",{fill:"white",d:"M19.1907 13.5918H12.9899C12.547 13.5918 12.1926 13.1921 12.1926 12.6924C12.1926 12.1927 12.547 11.7929 12.9899 11.7929H19.1907C19.6336 11.7929 19.9879 12.1927 19.9879 12.6924C19.9879 13.1921 19.6336 13.5918 19.1907 13.5918Z"}),Object(n.createElement)("path",{fill:"white",d:"M19.1907 17.1897H12.9899C12.547 17.1897 12.1926 16.7899 12.1926 16.2902C12.1926 15.7905 12.547 15.3907 12.9899 15.3907H19.1907C19.6336 15.3907 19.9879 15.7905 19.9879 16.2902C19.9879 16.7899 19.6336 17.1897 19.1907 17.1897Z"}))})},m=function(){return Object(n.createElement)(r.Icon,{className:"material-icon",icon:Object(n.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},Object(n.createElement)("path",{d:"M13 13v8h8v-8h-8zM3 21h8v-8H3v8zM3 3v8h8V3H3zm13.66-1.31L11 7.34 16.66 13l5.66-5.66-5.66-5.65z"}),Object(n.createElement)("path",{d:"M0 0h24v24H0z",fill:"none"}))})},w=c(6),p=c.n(w),v=(c(7),function(e){var t=e.size,c=void 0===t?20:t,l=e.className;return Object(n.createElement)(r.Icon,{className:p()("woo-icon",l),icon:Object(n.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",height:c,width:Math.floor(1.67*c),viewBox:"0 0 245 145"},Object(n.createElement)("path",{fill:"#96588A",d:"M22.76 0h199.1a22.77 22.77 0 0 1 22.8 22.76v75.92a22.77 22.77 0 0 1-22.78 22.78h-71.41l9.77 24-43.13-24H22.76C10.1946 121.449.011 111.2654 0 98.7V22.76C.011 10.1946 10.1946.011 22.76 0z"}),Object(n.createElement)("path",{fill:"#FFF",fillRule:"nonzero",d:"M12.32 20.63a8.16 8.16 0 0 1 6.25-3.09c5.0733-.36 7.9867 2.0333 8.74 7.18 3.14 20.86 6.4933 38.5633 10.06 53.11l21.92-41.69c2-3.76 4.49-5.76 7.52-6 4.3867-.3067 7.13 2.49 8.23 8.39a186 186 0 0 0 9.47 34.23c2.62-25.38 7.0133-43.7133 13.18-55a7.73 7.73 0 0 1 6.6-4.43 8.8 8.8 0 0 1 6.32 2 7.75 7.75 0 0 1 3.05 5.74 8.52 8.52 0 0 1-1 4.77c-3.9 7.24-7.12 19.28-9.66 36.12-2.48 16.2533-3.3967 28.9633-2.75 38.13a12.25 12.25 0 0 1-1.16 6.56 6.32 6.32 0 0 1-5.33 3.53c-2.6667.18-5.3033-1.0567-7.91-3.71-9.2933-9.54-16.6567-23.7267-22.09-42.56C57.3 76.7167 52.48 86.3333 49.3 92.76c-5.86 11.3333-10.89 17.13-15.09 17.39-2.7333.1933-5.0667-2.0933-7-6.86-5.1-13.0933-10.5833-38.4033-16.45-75.93a8.56 8.56 0 0 1 1.56-6.73zM227.23 36.34a23.17 23.17 0 0 0-16-11.59 26.25 26.25 0 0 0-5.42-.58c-9.5867 0-17.41 5-23.47 15a53 53 0 0 0-7.78 28.16c0 7.7333 1.6167 14.3333 4.85 19.8a23.15 23.15 0 0 0 16 11.59 26.28 26.28 0 0 0 5.42.59c9.68 0 17.5033-5 23.47-15A53.89 53.89 0 0 0 232.08 56c0-7.7333-1.6167-14.2867-4.85-19.66zm-12.61 27.72c-1.3733 6.56-3.9167 11.5-7.63 14.82-2.9267 2.6667-5.6133 3.7433-8.06 3.23-2.4467-.5133-4.4033-2.6667-5.87-6.46a25.68 25.68 0 0 1-1.76-9.09 35.9 35.9 0 0 1 .73-7.34 33 33 0 0 1 5.28-11.88c3.3333-4.8933 6.8067-6.9467 10.42-6.16 2.44.4867 4.3933 2.64 5.86 6.46a25.68 25.68 0 0 1 1.76 9.12 35.73 35.73 0 0 1-.73 7.33v-.03zM164.57 36.34a23.2 23.2 0 0 0-16-11.59 26.42 26.42 0 0 0-5.43-.58c-9.5933 0-17.4167 5-23.47 15a53 53 0 0 0-7.78 28.16c0 7.7333 1.6133 14.3333 4.84 19.8a23.19 23.19 0 0 0 16 11.59 26.44 26.44 0 0 0 5.43.59c9.68 0 17.5033-5 23.47-15A53.88 53.88 0 0 0 169.4 56c0-7.7333-1.6133-14.2867-4.84-19.66h.01zm-12.61 27.72c-1.3667 6.56-3.91 11.5-7.63 14.82-2.93 2.64-5.63 3.72-8.07 3.23-2.44-.49-4.4-2.64-5.86-6.46a25.7 25.7 0 0 1-1.77-9.09 35.9 35.9 0 0 1 .74-7.34 33 33 0 0 1 5.28-11.88c3.3333-4.8933 6.8067-6.9467 10.42-6.16 2.44.4867 4.3933 2.64 5.86 6.46a25.91 25.91 0 0 1 1.76 9.12 35.73 35.73 0 0 1-.73 7.33v-.03z"}))})});c.d(t,"a",function(){return l}),c.d(t,"b",function(){return o}),c.d(t,"c",function(){return a}),c.d(t,"d",function(){return i}),c.d(t,"e",function(){return f}),c.d(t,"f",function(){return s}),c.d(t,"h",function(){return h}),c.d(t,"g",function(){return u}),c.d(t,"i",function(){return m}),c.d(t,"j",function(){return v})},290:function(e,t,c){"use strict";c.r(t);var n=c(62),r=c.n(n),l=c(0),o=c(23),a=c(1),i=(c(294),c(296),c(24));Object(o.setCategories)([].concat(r()(Object(o.getCategories)().filter(function(e){return"woocommerce"!==e.slug})),[{slug:"woocommerce",title:Object(a.__)("WooCommerce","woo-gutenberg-products-block"),icon:Object(l.createElement)(i.j,null)}]))},294:function(e,t,c){var n=c(295);"string"==typeof n&&(n=[[e.i,n,""]]);var r={insert:"head",singleton:!1};c(35)(n,r);n.locals&&(e.exports=n.locals)},295:function(e,t,c){}});
|
1 |
+
this.wc=this.wc||{},this.wc.blocks=this.wc.blocks||{},this.wc.blocks.blocks=function(e){function t(t){for(var n,o,a=t[0],i=t[1],f=t[2],h=0,u=[];h<a.length;h++)o=a[h],Object.prototype.hasOwnProperty.call(r,o)&&r[o]&&u.push(r[o][0]),r[o]=0;for(n in i)Object.prototype.hasOwnProperty.call(i,n)&&(e[n]=i[n]);for(s&&s(t);u.length;)u.shift()();return l.push.apply(l,f||[]),c()}function c(){for(var e,t=0;t<l.length;t++){for(var c=l[t],n=!0,a=1;a<c.length;a++){var i=c[a];0!==r[i]&&(n=!1)}n&&(l.splice(t--,1),e=o(o.s=c[0]))}return e}var n={},r={4:0},l=[];function o(t){if(n[t])return n[t].exports;var c=n[t]={i:t,l:!1,exports:{}};return e[t].call(c.exports,c,c.exports,o),c.l=!0,c.exports}o.m=e,o.c=n,o.d=function(e,t,c){o.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:c})},o.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},o.t=function(e,t){if(1&t&&(e=o(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var c=Object.create(null);if(o.r(c),Object.defineProperty(c,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var n in e)o.d(c,n,function(t){return e[t]}.bind(null,n));return c},o.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return o.d(t,"a",t),t},o.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},o.p="";var a=window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[],i=a.push.bind(a);a.push=t,a=a.slice();for(var f=0;f<a.length;f++)t(a[f]);var s=i;return l.push([302,2,1,0]),c()}({0:function(e,t){!function(){e.exports=this.wp.element}()},1:function(e,t){!function(){e.exports=this.wp.i18n}()},22:function(e,t){!function(){e.exports=this.wp.blocks}()},23:function(e,t,c){"use strict";var n=c(0),r=c(3),l=function(e){var t=e.className,c=e.fillColor;return Object(n.createElement)(r.Icon,{className:t,icon:Object(n.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 22.41"},Object(n.createElement)("g",null,Object(n.createElement)("g",null,Object(n.createElement)("path",{fill:c,d:"M16.55 0H1.75C.56 0 0 .52 0 1.68v9.24c0 1.15.56 1.92 1.75 1.92H2V4.76a2.51 2.51 0 0 1 2.74-2.68H18v-.4A1.51 1.51 0 0 0 16.55 0z"}),Object(n.createElement)("path",{fill:c,d:"M19.54 3.11H4.74C3.55 3.11 3 3.64 3 4.79V14c0 1.19.55 2 1.74 2H5V7.88A2.51 2.51 0 0 1 7.73 5.2H21v-.41a1.51 1.51 0 0 0-1.46-1.68z"}),Object(n.createElement)("path",{fill:c,d:"M22.53 6.23H7.73C6.54 6.23 6 6.75 6 7.91v9.24c0 1.15.56 1.92 1.75 1.92h7a.59.59 0 0 1 .32.11l1.61 1.15 2.83 2a.31.31 0 0 0 .18.05.3.3 0 0 0 .31-.3v-2.73a.3.3 0 0 1 .28-.28h2.31A1.47 1.47 0 0 0 24 17.6V7.91a1.52 1.52 0 0 0-1.47-1.68z"}),Object(n.createElement)("path",{fill:"#ffffff",d:"M10.2 10.92l1.06-2.14 1.05 2.14 2.37.35-1.71 1.66.4 2.36-2.11-1.11-.17.09-.52.27-.51.26-.92.49.18-1.02.09-.57.1-.56.03-.21-1.71-1.66 2.37-.35zM21.46 14.25h-4.4a.69.69 0 0 1-.69-.69.68.68 0 0 1 .69-.68h4.4a.68.68 0 0 1 .69.68.69.69 0 0 1-.69.69zM21.46 11.19h-4.4a.69.69 0 1 1 0-1.37h4.4a.69.69 0 1 1 0 1.37z"}))))})},o=function(){return Object(n.createElement)(r.Icon,{icon:Object(n.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},Object(n.createElement)("path",{fillRule:"nonzero",d:"M21.913 7.0946H2.0254c-1.1708 0-2.0984.9908-2.0205 2.16l.741 11.0724c.0714 1.0638.9552 1.8892 2.0206 1.8892h18.4054c1.0654 0 1.9492-.8254 2.0205-1.8892l.7411-11.0724c.0779-1.1692-.8497-2.16-2.0205-2.16zm-8.8006-4.6573h5.987c1.119 0 2.0255.9065 2.0255 2.0254v.934H2.8103V2.0255C2.8103.9064 3.7168 0 4.8357 0h6.2513c1.119 0 2.0254.9065 2.0254 2.0254v.4119zm-7.0589 11.619a.926.926 0 1 1 0-1.852h11.8297a.926.926 0 1 1 0 1.852H6.0535z"}))})},a=function(){return Object(n.createElement)(r.Icon,{icon:Object(n.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},Object(n.createElement)("path",{d:"M22 7.5H2c-1.2 0-2.1 1-2 2.2l.7 11.1c.1 1.1 1 1.9 2 1.9h18.5c1.1 0 2-.8 2-1.9L24 9.6c.1-1.1-.9-2.1-2-2.1zM13.1 2.8v-.4c0-1.1-.9-2-2-2H4.8c-1.1 0-2 .9-2 2v3.4h18.4v-1c0-1.1-.9-2-2-2h-6.1z"}),Object(n.createElement)("path",{fill:"#fff",d:"M14.4 18.7L12 17.4l-2.4 1.3.5-2.6-1.9-1.9 2.6-.4 1.2-2.4 1.2 2.4 2.6.4-1.9 1.9z"}))})},i=function(){return Object(n.createElement)(r.Icon,{className:"material-icon",icon:Object(n.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},Object(n.createElement)("path",{d:"M0 0h24v24H0z",fill:"none"}),Object(n.createElement)("path",{d:"M23 12l-2.44-2.78.34-3.68-3.61-.82-1.89-3.18L12 3 8.6 1.54 6.71 4.72l-3.61.81.34 3.68L1 12l2.44 2.78-.34 3.69 3.61.82 1.89 3.18L12 21l3.4 1.46 1.89-3.18 3.61-.82-.34-3.68L23 12zm-10 5h-2v-2h2v2zm0-4h-2V7h2v6z"}))})},f=function(){return Object(n.createElement)(r.Icon,{icon:Object(n.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},Object(n.createElement)("path",{fill:"#1E8CBE",d:"M12 7c-2.76 0-5 2.24-5 5s2.24 5 5 5 5-2.24 5-5-2.24-5-5-5zm0-5C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"}))})},s=function(){return Object(n.createElement)(r.Icon,{icon:Object(n.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},Object(n.createElement)("path",{fill:"#6C7781",d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"}))})},h=function(e){var t=e.className,c=e.fillColor;return Object(n.createElement)(r.Icon,{className:t,icon:Object(n.createElement)("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},Object(n.createElement)("path",{fill:c,d:"M2.3,17.3h9.3c0.1,0,0.3,0,0.4,0.1l5.9,4.2c0.3,0.2,0.7,0,0.7-0.3v-3.7c0-0.2,0.2-0.4,0.4-0.4H22 c1.1,0,2-0.9,2-2V2.5c0-1.2-0.7-2.2-2-2.2H2.3C0.7,0.2,0,0.9,0,2.5v12.3C0,16.3,0.7,17.3,2.3,17.3z"}),Object(n.createElement)("polygon",{fill:"#ffffff",points:"8.8,12.1 6.5,10.9 4.1,12.1 4.5,9.5 2.6,7.6 5.3,7.2 6.5,4.8 7.6,7.2 10.3,7.6 8.4,9.5"}),Object(n.createElement)("path",{fill:"#ffffff",d:"M20.7,7.9h-7c-0.5,0-0.9-0.4-0.9-0.9S13.2,6,13.7,6h7c0.5,0,0.9,0.4,0.9,0.9S21.2,7.9,20.7,7.9z"}),Object(n.createElement)("path",{fill:"#ffffff",d:"M20.7,11.5h-7c-0.5,0-0.9-0.4-0.9-0.9s0.4-0.9,0.9-0.9h7c0.5,0,0.9,0.4,0.9,0.9S21.2,11.5,20.7,11.5z"}))})},u=function(e){var t=e.className,c=e.fillColor;return Object(n.createElement)(r.Icon,{className:t,icon:Object(n.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 23"},Object(n.createElement)("path",{fill:c,d:"M21.9943 7.0957H2.00638C0.807102 7.0957 -0.0923543 8.0951 0.0075853 9.29437L0.707162 20.3877C0.807102 21.487 1.70656 22.2865 2.70595 22.2865H21.1948C22.2941 22.2865 23.1936 21.487 23.1936 20.3877L23.9931 9.29437C24.093 8.0951 23.0936 7.0957 21.9943 7.0957Z"}),Object(n.createElement)("path",{fill:c,d:"M13.0921 2.39855V1.99879C13.0921 0.899456 12.1926 0 11.0933 0H4.7971C3.69777 0 2.79831 0.899456 2.79831 1.99879V5.39674H21.1872V4.49728C21.1872 3.39795 20.2877 2.49849 19.1884 2.49849H13.0921V2.39855Z"}),Object(n.createElement)("path",{fill:"white",d:"M8.63115 17.126L6.5415 15.9449L4.361 17.126L4.72442 14.6729L2.99819 13.0376L5.45125 12.6742L6.5415 10.4937L7.5409 12.6742L9.99396 13.0376L8.26773 14.6729L8.63115 17.126Z"}),Object(n.createElement)("path",{fill:"white",d:"M19.1907 13.5918H12.9899C12.547 13.5918 12.1926 13.1921 12.1926 12.6924C12.1926 12.1927 12.547 11.7929 12.9899 11.7929H19.1907C19.6336 11.7929 19.9879 12.1927 19.9879 12.6924C19.9879 13.1921 19.6336 13.5918 19.1907 13.5918Z"}),Object(n.createElement)("path",{fill:"white",d:"M19.1907 17.1897H12.9899C12.547 17.1897 12.1926 16.7899 12.1926 16.2902C12.1926 15.7905 12.547 15.3907 12.9899 15.3907H19.1907C19.6336 15.3907 19.9879 15.7905 19.9879 16.2902C19.9879 16.7899 19.6336 17.1897 19.1907 17.1897Z"}))})},m=function(){return Object(n.createElement)(r.Icon,{className:"material-icon",icon:Object(n.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},Object(n.createElement)("path",{d:"M13 13v8h8v-8h-8zM3 21h8v-8H3v8zM3 3v8h8V3H3zm13.66-1.31L11 7.34 16.66 13l5.66-5.66-5.66-5.65z"}),Object(n.createElement)("path",{d:"M0 0h24v24H0z",fill:"none"}))})},w=c(6),p=c.n(w),v=(c(2),function(e){var t=e.size,c=void 0===t?20:t,l=e.className;return Object(n.createElement)(r.Icon,{className:p()("woo-icon",l),icon:Object(n.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",height:c,width:Math.floor(1.67*c),viewBox:"0 0 245 145"},Object(n.createElement)("path",{fill:"#96588A",d:"M22.76 0h199.1a22.77 22.77 0 0 1 22.8 22.76v75.92a22.77 22.77 0 0 1-22.78 22.78h-71.41l9.77 24-43.13-24H22.76C10.1946 121.449.011 111.2654 0 98.7V22.76C.011 10.1946 10.1946.011 22.76 0z"}),Object(n.createElement)("path",{fill:"#FFF",fillRule:"nonzero",d:"M12.32 20.63a8.16 8.16 0 0 1 6.25-3.09c5.0733-.36 7.9867 2.0333 8.74 7.18 3.14 20.86 6.4933 38.5633 10.06 53.11l21.92-41.69c2-3.76 4.49-5.76 7.52-6 4.3867-.3067 7.13 2.49 8.23 8.39a186 186 0 0 0 9.47 34.23c2.62-25.38 7.0133-43.7133 13.18-55a7.73 7.73 0 0 1 6.6-4.43 8.8 8.8 0 0 1 6.32 2 7.75 7.75 0 0 1 3.05 5.74 8.52 8.52 0 0 1-1 4.77c-3.9 7.24-7.12 19.28-9.66 36.12-2.48 16.2533-3.3967 28.9633-2.75 38.13a12.25 12.25 0 0 1-1.16 6.56 6.32 6.32 0 0 1-5.33 3.53c-2.6667.18-5.3033-1.0567-7.91-3.71-9.2933-9.54-16.6567-23.7267-22.09-42.56C57.3 76.7167 52.48 86.3333 49.3 92.76c-5.86 11.3333-10.89 17.13-15.09 17.39-2.7333.1933-5.0667-2.0933-7-6.86-5.1-13.0933-10.5833-38.4033-16.45-75.93a8.56 8.56 0 0 1 1.56-6.73zM227.23 36.34a23.17 23.17 0 0 0-16-11.59 26.25 26.25 0 0 0-5.42-.58c-9.5867 0-17.41 5-23.47 15a53 53 0 0 0-7.78 28.16c0 7.7333 1.6167 14.3333 4.85 19.8a23.15 23.15 0 0 0 16 11.59 26.28 26.28 0 0 0 5.42.59c9.68 0 17.5033-5 23.47-15A53.89 53.89 0 0 0 232.08 56c0-7.7333-1.6167-14.2867-4.85-19.66zm-12.61 27.72c-1.3733 6.56-3.9167 11.5-7.63 14.82-2.9267 2.6667-5.6133 3.7433-8.06 3.23-2.4467-.5133-4.4033-2.6667-5.87-6.46a25.68 25.68 0 0 1-1.76-9.09 35.9 35.9 0 0 1 .73-7.34 33 33 0 0 1 5.28-11.88c3.3333-4.8933 6.8067-6.9467 10.42-6.16 2.44.4867 4.3933 2.64 5.86 6.46a25.68 25.68 0 0 1 1.76 9.12 35.73 35.73 0 0 1-.73 7.33v-.03zM164.57 36.34a23.2 23.2 0 0 0-16-11.59 26.42 26.42 0 0 0-5.43-.58c-9.5933 0-17.4167 5-23.47 15a53 53 0 0 0-7.78 28.16c0 7.7333 1.6133 14.3333 4.84 19.8a23.19 23.19 0 0 0 16 11.59 26.44 26.44 0 0 0 5.43.59c9.68 0 17.5033-5 23.47-15A53.88 53.88 0 0 0 169.4 56c0-7.7333-1.6133-14.2867-4.84-19.66h.01zm-12.61 27.72c-1.3667 6.56-3.91 11.5-7.63 14.82-2.93 2.64-5.63 3.72-8.07 3.23-2.44-.49-4.4-2.64-5.86-6.46a25.7 25.7 0 0 1-1.77-9.09 35.9 35.9 0 0 1 .74-7.34 33 33 0 0 1 5.28-11.88c3.3333-4.8933 6.8067-6.9467 10.42-6.16 2.44.4867 4.3933 2.64 5.86 6.46a25.91 25.91 0 0 1 1.76 9.12 35.73 35.73 0 0 1-.73 7.33v-.03z"}))})});c.d(t,"a",(function(){return l})),c.d(t,"b",(function(){return o})),c.d(t,"c",(function(){return a})),c.d(t,"d",(function(){return i})),c.d(t,"e",(function(){return f})),c.d(t,"f",(function(){return s})),c.d(t,"h",(function(){return h})),c.d(t,"g",(function(){return u})),c.d(t,"i",(function(){return m})),c.d(t,"j",(function(){return v}))},3:function(e,t){!function(){e.exports=this.wp.components}()},302:function(e,t,c){"use strict";c.r(t);var n=c(60),r=c.n(n),l=c(0),o=c(22),a=c(1),i=(c(306),c(308),c(23));Object(o.setCategories)([].concat(r()(Object(o.getCategories)().filter((function(e){return"woocommerce"!==e.slug}))),[{slug:"woocommerce",title:Object(a.__)("WooCommerce","woo-gutenberg-products-block"),icon:Object(l.createElement)(i.j,null)}]))},306:function(e,t,c){var n=c(307);"string"==typeof n&&(n=[[e.i,n,""]]);var r={insert:"head",singleton:!1};c(34)(n,r);n.locals&&(e.exports=n.locals)},307:function(e,t,c){}});
|
build/editor.css
CHANGED
@@ -1,4 +1,4 @@
|
|
1 |
-
@charset "UTF-8";@-webkit-keyframes slide-in-left{0%{-webkit-transform:translateX(100%);transform:translateX(100%)}to{-webkit-transform:translateX(0);transform:translateX(0)}}@keyframes slide-in-left{0%{-webkit-transform:translateX(100%);transform:translateX(100%)}to{-webkit-transform:translateX(0);transform:translateX(0)}}@-webkit-keyframes slide-out-left{0%{-webkit-transform:translateX(-100%);transform:translateX(-100%)}to{-webkit-transform:translateX(-200%);transform:translateX(-200%)}}@keyframes slide-out-left{0%{-webkit-transform:translateX(-100%);transform:translateX(-100%)}to{-webkit-transform:translateX(-200%);transform:translateX(-200%)}}@-webkit-keyframes slide-in-right{0%{-webkit-transform:translateX(-100%);transform:translateX(-100%)}to{-webkit-transform:translateX(0);transform:translateX(0)}}@keyframes slide-in-right{0%{-webkit-transform:translateX(-100%);transform:translateX(-100%)}to{-webkit-transform:translateX(0);transform:translateX(0)}}@-webkit-keyframes slide-out-right{0%{-webkit-transform:translateX(-100%);transform:translateX(-100%)}to{-webkit-transform:translateX(0);transform:translateX(0)}}@keyframes slide-out-right{0%{-webkit-transform:translateX(-100%);transform:translateX(-100%)}to{-webkit-transform:translateX(0);transform:translateX(0)}}.woocommerce-slide-animation>div{width:100%;white-space:nowrap;overflow:hidden;display:-webkit-box;display:flex}.woocommerce-slide-animation.animate-left .slide-enter-active{-webkit-animation:slide-in-left;animation:slide-in-left;-webkit-animation-duration:.2s;animation-duration:.2s}.woocommerce-slide-animation.animate-left .slide-exit-active{-webkit-animation:slide-out-left;animation:slide-out-left;-webkit-animation-duration:.2s;animation-duration:.2s}.woocommerce-slide-animation.animate-right .slide-enter-active{-webkit-animation:slide-in-right;animation:slide-in-right;-webkit-animation-duration:.2s;animation-duration:.2s}.woocommerce-slide-animation.animate-right .slide-exit-active{-webkit-animation:slide-out-right;animation:slide-out-right;-webkit-animation-duration:.2s;animation-duration:.2s}@media screen and (prefers-reduced-motion:reduce){.woocommerce-slide-animation .slide-enter-active,.woocommerce-slide-animation .slide-exit-active{-webkit-animation:none!important;animation:none!important}}.woocommerce-calendar{width:100%;background-color:#f8f9f9;border-top:1px solid #ccd0d4;height:396px}.woocommerce-calendar.is-mobile{height:100%}.woocommerce-calendar__react-dates{width:100%;overflow-x:hidden}.woocommerce-calendar__react-dates .DayPicker{margin:0 auto}.woocommerce-calendar__react-dates .CalendarMonth_table{margin-top:10px}.woocommerce-calendar__react-dates .CalendarDay__selected_span{background:#95588a;border:1px solid #ccd0d4}.woocommerce-calendar__react-dates .CalendarDay__selected{background:#622557;border:1px solid #ccd0d4}.woocommerce-calendar__react-dates .CalendarDay__hovered_span{background:#95588a;border:1px solid #e2e4e7;color:#fff}.woocommerce-calendar__react-dates .CalendarDay__blocked_out_of_range{color:#a2aab2}.woocommerce-calendar__react-dates .CalendarMonth,.woocommerce-calendar__react-dates .CalendarMonthGrid,.woocommerce-calendar__react-dates .DayPicker,.woocommerce-calendar__react-dates .DayPicker_transitionContainer{background-color:#f8f9f9}.woocommerce-calendar__react-dates .DayPicker_weekHeader_li{color:#606a73}.woocommerce-calendar__react-dates .DayPickerNavigation_button:focus{outline:2px solid #bfe7f3}.woocommerce-calendar__react-dates.is-core-datepicker .components-datetime__date{padding-left:0}.woocommerce-calendar__react-dates.is-core-datepicker .CalendarDay__default{background-color:transparent}.woocommerce-calendar__react-dates.is-core-datepicker .CalendarDay__selected{background:#622557;border:none}.woocommerce-calendar__inputs{padding:1em;width:100%;max-width:500px;display:-ms-grid;display:grid;-ms-grid-columns:43% 14% 43%;grid-template-columns:43% 14% 43%;margin:0 auto}.woocommerce-calendar__inputs .components-base-control{margin:0}.woocommerce-calendar__inputs-to{display:-webkit-box;display:flex;-webkit-box-align:center;align-items:center;-webkit-box-pack:center;justify-content:center;-ms-grid-column:2;grid-column-start:2}.woocommerce-calendar__input{position:relative}.woocommerce-calendar__input .dashicons-calendar{position:absolute;top:50%;-webkit-transform:translateY(-50%);transform:translateY(-50%);left:10px}.woocommerce-calendar__input .dashicons-calendar path{fill:#6c7781}.woocommerce-calendar__input:first-child{-ms-grid-column:1;grid-column-start:1}.woocommerce-calendar__input:last-child{-ms-grid-column:3;grid-column-start:3}.woocommerce-calendar__input.is-empty .dashicons-calendar path{fill:#6c7781}.woocommerce-calendar__input.is-error .dashicons-calendar path{fill:#d94f4f}.woocommerce-calendar__input.is-error .woocommerce-calendar__input-text{border:1px solid #d94f4f;box-shadow:inset 0 0 8px #d94f4f}.woocommerce-calendar__input.is-error .woocommerce-calendar__input-text:focus{box-shadow:inset 0 0 8px #d94f4f,0 0 6px rgba(30,140,190,.8)}.woocommerce-calendar__input .woocommerce-calendar__input-text{color:#555d66;border-radius:3px;padding:10px 10px 10px 30px;width:100%;font-size:13px;font-size:.8125rem}.woocommerce-calendar__input .woocommerce-calendar__input-text:-ms-input-placeholder{color:#6c7781}.woocommerce-calendar__input .woocommerce-calendar__input-text::-ms-input-placeholder{color:#6c7781}.woocommerce-calendar__input .woocommerce-calendar__input-text::-webkit-input-placeholder{color:#6c7781}.woocommerce-calendar__input .woocommerce-calendar__input-text::-moz-placeholder{color:#6c7781}.woocommerce-calendar__input .woocommerce-calendar__input-text::placeholder{color:#6c7781}.woocommerce-filters-date__content.is-mobile .woocommerce-calendar__input-error .components-popover__content{height:auto}.woocommerce-calendar__input-error{display:none}.is-error .woocommerce-calendar__input-text:focus+span .woocommerce-calendar__input-error{display:block;left:50%!important;position:absolute;top:auto!important}.woocommerce-calendar__input-error .components-popover__content{background-color:#606a73;color:#fff;padding:.5em;border:none}.woocommerce-calendar__input-error.components-popover .components-popover__content{min-width:100px;width:100px;text-align:center}.woocommerce-calendar__input-error.components-popover:not(.no-arrow):not(.is-mobile).is-bottom:before{border-bottom-color:#606a73;z-index:1;top:-6px}.woocommerce-calendar__input-error.components-popover:not(.no-arrow):not(.is-mobile).is-top:after{border-top-color:#606a73;z-index:1;top:0}.woocommerce-calendar__date-picker-title{font-size:12px;font-size:.75rem;font-weight:100;text-transform:uppercase;text-align:center;color:#6c7781;width:100%;margin:0;padding:1em;background-color:#fff}.woocommerce-card{margin-bottom:24px;background:#fff;border-radius:3px;box-shadow:0 2px 1px -1px rgba(0,0,0,.2),0 1px 1px 0 rgba(0,0,0,.14),0 1px 3px 0 rgba(0,0,0,.12);-webkit-transition:box-shadow .2s cubic-bezier(.4,1,.4,1);transition:box-shadow .2s cubic-bezier(.4,1,.4,1)}@media (max-width:782px){.woocommerce-card{margin-bottom:12px;width:auto}}.woocommerce-card.is-inactive{background-color:#f6f6f6;box-shadow:none}.woocommerce-card__header{padding:16px;display:-ms-grid;display:grid;-webkit-box-align:center;align-items:center;border-top-left-radius:3px;border-top-left-radius:4px}.has-action .woocommerce-card__header{-ms-grid-columns:auto 1fr;grid-template-columns:auto 1fr}.has-menu .woocommerce-card__header{-ms-grid-columns:auto 24px;grid-template-columns:auto 24px}.has-menu.has-action .woocommerce-card__header{grid-gap:12px;-ms-grid-columns:auto 1fr 24px;grid-template-columns:auto 1fr 24px}.woocommerce-card__header-item{-ms-grid-row-align:center}.woocommerce-card__header-item:first-child{-ms-grid-column:1;grid-column-start:1;-ms-grid-column-span:1;grid-column-end:2;-ms-grid-row:1;grid-row-start:1;-ms-grid-row-span:1;grid-row-end:2}.woocommerce-card__header-item:nth-child(2){-ms-grid-column:2;grid-column-start:2;-ms-grid-column-span:1;grid-column-end:3;-ms-grid-row:1;grid-row-start:1;-ms-grid-row-span:1;grid-row-end:2}.woocommerce-card__header-item:nth-child(3){-ms-grid-column:3;grid-column-start:3;-ms-grid-column-span:1;grid-column-end:4;-ms-grid-row:1;grid-row-start:1;-ms-grid-row-span:1;grid-row-end:2}.woocommerce-card__action,.woocommerce-card__menu{text-align:right}.woocommerce-card__body{padding:16px}.woocommerce-card__title{margin:0;font-size:24px;font-size:1.5rem;line-height:1.2;font-weight:400}.woocommerce-card__description{font-size:16px;font-size:1rem;line-height:1.5;color:#636d75;margin-top:12px;margin-bottom:0;font-weight:400}.woocommerce-chart{margin-top:-16px;margin-bottom:24px;background:#fff;border:1px solid #ccd0d4;border-top:0}@media (max-width:782px){.woocommerce-chart{margin-left:-16px;margin-right:-16px;margin-bottom:12px;border-left:none;border-right:none;width:auto}}.woocommerce-chart .woocommerce-chart__header{min-height:50px;border-bottom:1px solid #ccd0d4;display:-webkit-box;display:flex;-webkit-box-orient:horizontal;-webkit-box-direction:normal;flex-flow:row wrap;-webkit-box-pack:justify;justify-content:space-between;-webkit-box-align:center;align-items:center;width:100%}.woocommerce-chart .woocommerce-chart__header .woocommerce-chart__title{height:18px;color:#24292d;font-size:15px;font-weight:600;line-height:18px;margin-left:16px;margin-right:16px}.woocommerce-chart .woocommerce-chart__body{display:-webkit-box;display:flex;-webkit-box-orient:horizontal;-webkit-box-direction:normal;flex-direction:row;-webkit-box-pack:start;justify-content:flex-start;-webkit-box-align:start;align-items:flex-start;width:100%}.woocommerce-chart .woocommerce-chart__body.woocommerce-chart__body-column{-webkit-box-orient:vertical;-webkit-box-direction:normal;flex-direction:column}.woocommerce-chart .woocommerce-chart__footer{width:100%}.woocommerce-chart-placeholder{-webkit-animation:loading-fade 1.6s ease-in-out infinite;animation:loading-fade 1.6s ease-in-out infinite;background-color:#e2e4e7;color:transparent;padding:0;width:100%;display:-webkit-box;display:flex;-webkit-box-align:center;align-items:center;-webkit-box-pack:center;justify-content:center}.woocommerce-chart-placeholder:after{content:"\00a0"}@media screen and (prefers-reduced-motion:reduce){.woocommerce-chart-placeholder{-webkit-animation:none;animation:none}}.woocommerce-chart-placeholder .components-spinner{margin:0}.woocommerce-chart__interval-select{-webkit-box-align:start;align-items:start;border-right:1px solid #ccd0d4;display:-webkit-box;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;flex-direction:column;-webkit-box-pack:center;justify-content:center;margin:0 0 0 auto;min-height:50px;padding:8px 16px 0}@media (max-width:960px){.woocommerce-chart__interval-select{width:100%;-webkit-box-ordinal-group:2;order:1;margin-top:-8px;margin-left:0;padding-left:8px;border-right:0;min-height:0}}#wpbody .woocommerce-chart__interval-select .components-select-control__input{font-size:13px;font-size:.8125rem;border:0;box-shadow:none}#wpbody .woocommerce-chart__interval-select .components-select-control__input:not(:disabled):not([aria-disabled=true]):focus{background-color:#fff;color:#191e23;box-shadow:inset 0 0 0 1px #6c7781,inset 0 0 0 2px #fff;outline:2px solid transparent;outline-offset:-2px}.woocommerce-chart__types{padding:0 8px;white-space:nowrap}.woocommerce-chart__type-button{background:transparent!important}.woocommerce-chart__type-button.components-icon-button{color:#ccd0d4}.woocommerce-chart__type-button.components-icon-button.woocommerce-chart__type-button-selected{color:#555d66}.woocommerce-chart__type-button.components-icon-button:hover{box-shadow:none!important}@media (max-width:960px){.woocommerce-summary+.woocommerce-chart .woocommerce-chart__title{display:none}.woocommerce-summary+.woocommerce-chart .woocommerce-chart__interval-select{width:auto;-webkit-box-ordinal-group:1;order:0;margin-top:0}}.woocommerce-legend.has-total{padding-bottom:50px;position:relative}.woocommerce-legend.woocommerce-legend__direction-column{border-right:1px solid #ccd0d4;min-width:320px}.woocommerce-chart__footer .woocommerce-legend.woocommerce-legend__direction-column{border-right:none}.woocommerce-legend__list{color:#24292d;display:-webkit-box;display:flex;height:100%;margin:0}.woocommerce-legend__direction-column .woocommerce-legend__list{-webkit-box-orient:vertical;-webkit-box-direction:normal;flex-direction:column;height:300px;overflow:auto}.woocommerce-chart__footer .woocommerce-legend__direction-column .woocommerce-legend__list{border-top:1px solid #ccd0d4;height:100%;max-height:none;min-height:none}.has-total.woocommerce-legend__direction-column .woocommerce-legend__list{height:250px}.woocommerce-chart__footer .has-total.woocommerce-legend__direction-column .woocommerce-legend__list{height:auto;max-height:220px;min-height:none}.woocommerce-legend__direction-row .woocommerce-legend__list{-webkit-box-orient:horizontal;-webkit-box-direction:normal;flex-direction:row}.woocommerce-legend__item>button{display:-webkit-box;display:flex;-webkit-box-pack:center;justify-content:center;-webkit-box-align:center;align-items:center;background-color:#fff;color:#555d66;cursor:pointer;display:-webkit-inline-box;display:inline-flex;-webkit-box-orient:horizontal;-webkit-box-direction:normal;flex-direction:row;flex-wrap:nowrap;-webkit-box-pack:justify;justify-content:space-between;width:100%;border:none;padding:0}.woocommerce-legend__item>button .woocommerce-legend__item-container{display:-webkit-box;display:flex;-webkit-box-orient:horizontal;-webkit-box-direction:normal;flex-direction:row;flex-wrap:nowrap;position:relative;padding:3px 0 3px 24px;font-size:13px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;width:100%}.woocommerce-legend__item>button .woocommerce-legend__item-container:hover input~.woocommerce-legend__item-checkmark{background-color:#f3f4f5}.woocommerce-legend__item>button .woocommerce-legend__item-container .woocommerce-legend__item-checkmark{border:1px solid #a2aab2;position:absolute;top:4px;left:0;height:16px;width:16px;background-color:#fff}.woocommerce-legend__item>button .woocommerce-legend__item-container .woocommerce-legend__item-checkmark:after{content:"";position:absolute;display:none}.woocommerce-legend__item>button .woocommerce-legend__item-container .woocommerce-legend__item-checkmark.woocommerce-legend__item-checkmark-checked{background-color:currentColor;border-color:currentColor}.woocommerce-legend__item>button .woocommerce-legend__item-container .woocommerce-legend__item-checkmark.woocommerce-legend__item-checkmark-checked:after{display:block;left:5px;top:2px;width:3px;height:6px;border:solid #fff;border-width:0 2px 2px 0;-webkit-transform:rotate(45deg);transform:rotate(45deg)}.woocommerce-legend__item>button .woocommerce-legend__item-container .woocommerce-legend__item-total{margin-left:auto;font-weight:700}.woocommerce-legend__item>button:focus{outline:none}.woocommerce-legend__item>button:focus .woocommerce-legend__item-container .woocommerce-legend__item-checkmark{outline:2px solid #a2aab2}.woocommerce-legend__item>button:hover{background-color:#f8f9f9}.woocommerce-legend__direction-column .woocommerce-legend__item{margin:0;padding:0}.woocommerce-legend__direction-column .woocommerce-legend__item>button{min-height:36px;padding:0 17px;text-align:left}.woocommerce-legend__direction-column .woocommerce-legend__item:first-child{margin-top:12px}.woocommerce-legend__direction-column .woocommerce-legend__item:last-child:after{content:"";display:block;height:12px;width:100%}.woocommerce-legend__direction-row .woocommerce-legend__item{padding:0;margin:0}.woocommerce-legend__direction-row .woocommerce-legend__item>button{padding:0 17px}.woocommerce-legend__direction-row .woocommerce-legend__item>button .woocommerce-legend__item-container{height:50px;-webkit-box-align:center;align-items:center}.woocommerce-legend__direction-row .woocommerce-legend__item>button .woocommerce-legend__item-container .woocommerce-legend__item-checkmark{top:17px}.woocommerce-legend__direction-row .woocommerce-legend__item>button .woocommerce-legend__item-container .woocommerce-legend__item-title{margin-right:17px}.woocommerce-legend__total{-webkit-box-align:center;align-items:center;background:#fff;border-top:1px solid #ccd0d4;bottom:0;color:#555d66;display:-webkit-box;display:flex;height:50px;-webkit-box-pack:center;justify-content:center;left:0;position:absolute;right:0;text-transform:uppercase}.woocommerce-legend__total:before{background:-webkit-gradient(linear,left top,left bottom,from(transparent),to(rgba(0,0,0,.2)));background:linear-gradient(180deg,transparent,rgba(0,0,0,.2));bottom:100%;content:"";height:20px;left:0;opacity:0;pointer-events:none;position:absolute;right:0;-webkit-transition:opacity .3s;transition:opacity .3s}.is-scrollable .woocommerce-legend__total:before{opacity:1}.woocommerce-chart__body-row .d3-chart__container{width:calc(100% - 320px)}.d3-chart__container{position:relative;width:100%}.d3-chart__container svg{overflow:visible}.d3-chart__container .d3-chart__empty-message{-webkit-box-align:center;align-items:center;bottom:0;color:#6c7781;display:-webkit-box;display:flex;font-size:18px;font-size:1.125rem;font-weight:700;-webkit-box-pack:center;justify-content:center;left:0;line-height:1.5;margin:0 auto;max-width:50%;padding-bottom:48px;pointer-events:none;position:absolute;right:0;top:0;text-align:center}@media (max-width:782px){.d3-chart__container .d3-chart__empty-message{font-size:13px;font-size:.8125rem}}.d3-chart__container .d3-chart__tooltip{border:1px solid #ccd0d4;position:absolute;display:-webkit-box;display:flex;min-width:324px;height:auto;background-color:#fff;text-align:left;padding:17px;box-shadow:0 3px 20px 0 rgba(18,24,30,.1),0 1px 3px 0 rgba(18,24,30,.1);-webkit-box-orient:vertical;-webkit-box-direction:normal;flex-direction:column;flex-wrap:nowrap;-webkit-box-pack:start;justify-content:flex-start;pointer-events:none;visibility:hidden;z-index:1}@media (max-width:600px){.d3-chart__container .d3-chart__tooltip{min-width:auto;width:calc(100% - 48px)}}.d3-chart__container .d3-chart__tooltip h4{text-align:left;line-height:18px;width:100%;text-transform:uppercase;font-size:11px;color:#6c7781;margin-top:0}.d3-chart__container .d3-chart__tooltip ul{list-style:none;margin-bottom:2px;margin-top:2px;font-size:14px}.d3-chart__container .d3-chart__tooltip ul li{flex-wrap:nowrap;-webkit-box-pack:start;justify-content:flex-start;-webkit-box-align:center;align-items:center}.d3-chart__container .d3-chart__tooltip ul li,.d3-chart__container .d3-chart__tooltip ul li.key-row{display:-webkit-box;display:flex;-webkit-box-orient:horizontal;-webkit-box-direction:normal;flex-direction:row}.d3-chart__container .d3-chart__tooltip ul li.key-row{-webkit-box-pack:justify;justify-content:space-between;width:100%}.d3-chart__container .d3-chart__tooltip ul li.key-row .key-container{width:100%;min-width:100px}.d3-chart__container .d3-chart__tooltip ul li.key-row .key-container .key-color{display:inline-block;width:16px;height:16px;margin-right:8px}.d3-chart__container .d3-chart__tooltip ul li.key-row .key-container .key-key{margin-right:6px}.d3-chart__container .d3-chart__tooltip ul li.key-row .key-value{font-weight:600}.d3-chart__container .bargrouprect{shape-rendering:crispEdges}.d3-chart__container .grid .tick line{stroke:#e2e4e7;stroke-width:1;shape-rendering:crispEdges}.d3-chart__container .grid .tick:first-child line{stroke:#555d66}.d3-chart__container .grid.with-positive-ticks .tick:last-child line{opacity:0}.d3-chart__container .tick{padding-top:10px;stroke-width:1}.d3-chart__container .y-axis{text-anchor:start}.d3-chart__container .y-axis.ticktext{fill:#555d66}.d3-chart__container .axis-month .tick text,.d3-chart__container .y-axis .tick text{font-size:10px}.d3-chart__container .focus-grid line{stroke:rgba(0,0,0,.1);stroke-width:1px}.d3-chart__container .barfocus{fill:rgba(0,0,0,.1)}.d3-base{background:transparent;overflow-x:auto;overflow-y:hidden;position:relative;width:100%;height:100%}.woocommerce-count{border:1px solid;border-radius:10px;padding:0 8px;font-weight:700}.woocommerce-page .woocommerce-dropdown-button{background-color:#fff;position:relative;border:1px solid #e2e4e7;color:#555d66;border-radius:4px;padding:0 40px 0 0;width:100%}.woocommerce-page .woocommerce-dropdown-button:after{content:"";position:absolute;right:14px;top:50%;-webkit-transform:translateY(-50%);transform:translateY(-50%);width:0;height:0;border-color:#555d66 transparent transparent;border-style:solid;border-width:6px 6px 0;-webkit-transition:-webkit-transform .2s ease;transition:-webkit-transform .2s ease;transition:transform .2s ease;transition:transform .2s ease,-webkit-transform .2s ease}@media screen and (prefers-reduced-motion:reduce){.woocommerce-page .woocommerce-dropdown-button:after{-webkit-transition:none;transition:none}}.woocommerce-page .woocommerce-dropdown-button.is-open:after{-webkit-transform:translateY(-50%) rotate(180deg);transform:translateY(-50%) rotate(180deg)}.woocommerce-page .woocommerce-dropdown-button.is-open,.woocommerce-page .woocommerce-dropdown-button:active,.woocommerce-page .woocommerce-dropdown-button:hover{background-color:#f8f9f9}.woocommerce-page .woocommerce-dropdown-button.is-multi-line .woocommerce-dropdown-button__labels{-webkit-box-orient:vertical;-webkit-box-direction:normal;flex-direction:column}.woocommerce-dropdown-button__labels{text-align:left;padding:8px 12px;min-height:48px;display:-webkit-box;display:flex;-webkit-box-align:center;align-items:center;width:100%;justify-content:space-around}@media (max-width:400px){.woocommerce-dropdown-button__labels{min-height:46px}}.woocommerce-dropdown-button__labels span{width:100%;text-align:left}.woocommerce-dropdown-button__labels span:last-child{font-size:12px;font-size:.75rem;margin:0}.woocommerce-dropdown-button__labels span:first-child{font-size:13px;font-size:.8125rem;font-weight:600}@media (max-width:400px){.woocommerce-dropdown-button__labels span:last-child{font-size:10px;font-size:.625rem}.woocommerce-dropdown-button__labels span:first-child{font-size:12px;font-size:.75rem}}.woocommerce-ellipsis-menu{text-align:center}.woocommerce-ellipsis-menu__toggle{height:24px;-webkit-box-pack:center;justify-content:center;vertical-align:middle;width:24px}.woocommerce-ellipsis-menu__toggle .dashicon{-webkit-transform:rotate(90deg);transform:rotate(90deg)}.woocommerce-ellipsis-menu__popover{text-align:left}.woocommerce-ellipsis-menu__popover:not(.is-mobile):after,.woocommerce-ellipsis-menu__popover:not(.is-mobile):before{margin-left:-16px}.woocommerce-ellipsis-menu__popover .components-popover__content{width:182px;padding:2px}.woocommerce-ellipsis-menu__popover .components-form-toggle.is-checked .components-form-toggle__track{background-color:#95588a}.woocommerce-ellipsis-menu__popover .woocommerce-ellipsis-menu__content{width:100%}.woocommerce-ellipsis-menu__popover .woocommerce-ellipsis-menu__item,.woocommerce-ellipsis-menu__popover .woocommerce-ellipsis-menu__title{padding:4px 12px}.woocommerce-ellipsis-menu__popover .woocommerce-ellipsis-menu__item{cursor:pointer;color:#6c7781}.woocommerce-ellipsis-menu__popover .woocommerce-ellipsis-menu__item:focus{box-shadow:inset 0 0 0 1px #6c7781,inset 0 0 0 2px #fff;outline:2px solid transparent;outline-offset:-2px}.woocommerce-ellipsis-menu__popover .components-base-control__label,.woocommerce-ellipsis-menu__popover .woocommerce-ellipsis-menu__title{color:#23282d;padding-top:8px;padding-bottom:8px;font-size:15px;font-size:.9375rem;margin-bottom:4px}.woocommerce-ellipsis-menu__popover .components-toggle-control .components-base-control__field{margin:4px 0}.woocommerce-ellipsis-menu__popover .components-base-control{margin:0}.woocommerce-empty-content{margin-bottom:16px;text-align:center}.woocommerce-empty-content .woocommerce-empty-content__illustration{max-width:100%}.woocommerce-empty-content .woocommerce-empty-content__actions .components-button+.components-button{margin-left:16px}.woocommerce-filters-advanced{margin:24px 0}.woocommerce-filters-advanced .woocommerce-card__header{padding:8px 16px}.woocommerce-filters-advanced .woocommerce-card__body{padding:0}.woocommerce-filters-advanced .components-select-control__input{height:38px;padding:0;margin:0}.woocommerce-filters-advanced .components-base-control__field{margin-bottom:0}@media (max-width:782px){.woocommerce-filters-advanced{margin:16px 0;border:1px solid #ccd0d4}}@media (max-width:400px){.woocommerce-filters-advanced{margin:12px 0}}.woocommerce-filters-advanced__title-select{width:70px;display:inline-block;margin:0 8px}.woocommerce-filters-advanced__list{margin:0}.woocommerce-filters-advanced__list-item{padding:0 16px 0 0;margin:0;display:-ms-grid;display:grid;-ms-grid-columns:1fr 40px;grid-template-columns:1fr 40px;background-color:#f8f9f9;border-bottom:1px solid #ccd0d4}.woocommerce-filters-advanced__list-item:hover{background-color:#f3f4f5}.woocommerce-filters-advanced__list-item .woocommerce-filters-advanced__line-item:first-child{-ms-grid-column:1;grid-column-start:1;-ms-grid-column-span:1;grid-column-end:2;-ms-grid-row:1;grid-row-start:1;-ms-grid-row-span:1;grid-row-end:2}.woocommerce-filters-advanced__list-item .woocommerce-filters-advanced__line-item:nth-child(2){-ms-grid-column:2;grid-column-start:2;-ms-grid-column-span:1;grid-column-end:3;-ms-grid-row:1;grid-row-start:1;-ms-grid-row-span:1;grid-row-end:2}.woocommerce-filters-advanced__list-item fieldset{padding:8px 8px 8px 16px}.woocommerce-filters-advanced__list-item .woocommerce-filters-advanced__remove{width:40px;height:38px;-ms-grid-row-align:center;align-self:center}@media (max-width:400px){.woocommerce-filters-advanced__list-item .woocommerce-filters-advanced__remove{position:absolute;top:0;right:4px}}.woocommerce-filters-advanced__list-item .components-form-token-field{border-radius:4px}@media (max-width:400px){.woocommerce-filters-advanced__list-item{display:block;position:relative;padding:8px 8px 0 0}}.woocommerce-filters-advanced__add-filter{padding:12px;margin:0;color:#95588a;display:block;background-color:#f8f9f9;border-bottom:1px solid #ccd0d4}.woocommerce-filters-advanced__add-filter:hover{background-color:#f3f4f5}.woocommerce-filters-advanced__add-filter div div{display:inline-block}.woocommerce-filters-advanced__add-filter .components-popover:not(.is-mobile) .components-popover__content{min-width:180px}.woocommerce-filters-advanced__fieldset{display:-webkit-box;display:flex;-webkit-box-align:center;align-items:center}.woocommerce-filters-advanced__fieldset>div{padding:0 4px}@media (max-width:782px){.woocommerce-filters-advanced__fieldset>div{width:100%;padding:4px 0}}@media (max-width:782px){.woocommerce-filters-advanced__fieldset{display:block}}.woocommerce-filters-advanced__fieldset.is-english{display:-ms-grid;display:grid;-ms-grid-columns:100px 150px 1fr;grid-template-columns:100px 150px 1fr}.woocommerce-filters-advanced__fieldset.is-english .woocommerce-filters-advanced__fieldset-item:first-child{-ms-grid-column:1;grid-column-start:1;-ms-grid-column-span:1;grid-column-end:2;-ms-grid-row:1;grid-row-start:1;-ms-grid-row-span:1;grid-row-end:2}.woocommerce-filters-advanced__fieldset.is-english .woocommerce-filters-advanced__fieldset-item:nth-child(2){-ms-grid-column:2;grid-column-start:2;-ms-grid-column-span:1;grid-column-end:3;-ms-grid-row:1;grid-row-start:1;-ms-grid-row-span:1;grid-row-end:2}.woocommerce-filters-advanced__fieldset.is-english .woocommerce-filters-advanced__fieldset-item:nth-child(3){-ms-grid-column:3;grid-column-start:3;-ms-grid-column-span:1;grid-column-end:4;-ms-grid-row:1;grid-row-start:1;-ms-grid-row-span:1;grid-row-end:2}.woocommerce-filters-advanced__fieldset.is-english .woocommerce-filters-advanced__fieldset-item:first-child{display:-webkit-box;display:flex;-webkit-box-align:center;align-items:center}@media (max-width:782px){.woocommerce-filters-advanced__fieldset.is-english{display:block}}.woocommerce-filters-advanced__rule{width:150px}.woocommerce-filters-advanced__input{width:100%}.woocommerce-filters-advanced__add-filter-dropdown{display:inline-block}.woocommerce-filters-advanced__add-button{color:inherit;padding:8px}.woocommerce-filters-advanced__add-button svg{fill:currentColor;margin:0 6px 0 0}.woocommerce-filters-advanced__add-button.components-icon-button:not(:disabled):not([aria-disabled=true]):not(.is-default):hover{color:#c88bbd}.woocommerce-filters-advanced__add-button:not(:disabled):not([aria-disabled=true]):focus{color:#95588a;background-color:transparent}.woocommerce-filters-advanced__controls{padding:8px 16px;display:-webkit-box;display:flex;-webkit-box-align:center;align-items:center}.woocommerce-filters-advanced__controls .components-button{margin-right:16px}.woocommerce-filters-advanced__add-dropdown{padding:8px 0}.woocommerce-filters-advanced__add-dropdown li{margin:0}.woocommerce-filters-advanced__add-dropdown .components-button{width:100%;padding:8px}.woocommerce-filters-advanced__add-dropdown .components-button:hover{background-color:#f3f4f5}.woocommerce-filters-advanced__add-dropdown .components-button:not(:disabled):not([aria-disabled=true]):focus{background-color:#edeff0;box-shadow:none}.woocommerce-filters-advanced__input-range{-webkit-box-align:center;align-items:center;display:-ms-grid;display:grid;-ms-grid-columns:1fr;grid-template-columns:1fr}.woocommerce-filters-advanced__input-range.is-between{-ms-grid-columns:1fr 36px 1fr;grid-template-columns:1fr 36px 1fr}.woocommerce-filters-advanced__input-range input{height:38px;margin:0}.woocommerce-filters-advanced__input-range .separator{text-align:center}.woocommerce-filters-date__content.is-mobile .components-popover__header{border:none;height:0}.woocommerce-filters-date__content.is-mobile .components-popover__close{-webkit-transform:translateY(22px);transform:translateY(22px)}.woocommerce-filters-date__content.is-mobile .components-tab-panel__tab-content{height:calc(100% - 46px);overflow:auto}.woocommerce-filters-date__tabs{height:calc(100% - 42px)}.woocommerce-filters-date__tabs .components-tab-panel__tabs{display:-ms-grid;display:grid;-ms-grid-columns:1fr 1fr;grid-template-columns:1fr 1fr;border-radius:5px;margin:0 1em 1em}.woocommerce-filters-date__tabs .components-tab-panel__tab-content{display:-webkit-box;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;flex-direction:column;-webkit-box-align:center;align-items:center}.woocommerce-filters-date__tab:first-child{-ms-grid-column:1;grid-column-start:1;-ms-grid-column-span:1;grid-column-end:2;-ms-grid-row:1;grid-row-start:1;-ms-grid-row-span:1;grid-row-end:2}.woocommerce-filters-date__tab:nth-child(2){-ms-grid-column:2;grid-column-start:2;-ms-grid-column-span:1;grid-column-end:3;-ms-grid-row:1;grid-row-start:1;-ms-grid-row-span:1;grid-row-end:2}button.woocommerce-filters-date__tab{outline:none;border:1px solid #95588a;padding:8px;margin:0;border-radius:4px 0 0 4px;color:#95588a;background-color:transparent;-webkit-box-pack:center;justify-content:center}button.woocommerce-filters-date__tab:hover{background-color:#f8f4f7;cursor:pointer}button.woocommerce-filters-date__tab:last-child{border-radius:0 4px 4px 0}button.woocommerce-filters-date__tab.is-active,button.woocommerce-filters-date__tab.is-active:focus{background-color:#95588a;color:#fff}button.woocommerce-filters-date__tab:focus{box-shadow:inset 0 -1px 0 #00435d,0 0 0 2px #bfe7f3}.woocommerce-filters-date__text{font-size:12px;font-size:.75rem;font-weight:100;text-transform:uppercase;text-align:center;color:#6c7781;width:100%;margin:0;padding:1em;background-color:#fff}.woocommerce-filters-date__content-controls{display:-webkit-box;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;flex-direction:column;width:100%;-webkit-box-align:center;align-items:center;padding-bottom:1em;background-color:#fff}.woocommerce-filters-date__content-controls.is-custom{border-top:1px solid #ccd0d4}.woocommerce-filters-date__button-group{padding-top:1em;display:-webkit-box;display:flex;-webkit-box-pack:center;justify-content:center;width:100%}.woocommerce-filters-date__button-group .woocommerce-filters-date__button.is-button{-webkit-box-pack:center;justify-content:center;width:40%;height:34px;margin:0 12px}.woocommerce-filters-filter__content.is-mobile .components-popover__header-title{font-size:12px;font-size:.75rem;font-weight:100;text-transform:uppercase;text-align:center;color:#555d66}.woocommerce-filters-filter__content.is-mobile .woocommerce-filters-filter__content-list-item:last-child{border-bottom:1px solid #ccd0d4}.woocommerce-filters-filter__content-list{margin:0;width:100%;min-width:100%}.woocommerce-filters-filter__content-list-item{border-bottom:1px solid #ccd0d4;margin:0}.woocommerce-filters-filter__content-list-item:last-child{border-bottom:none}.woocommerce-filters-filter__content-list-item.is-selected .woocommerce-filters-filter__button{background-color:#fff}.woocommerce-filters-filter__content-list-item.is-selected .woocommerce-filters-filter__button.components-button:not(:disabled):not([aria-disabled=true]):focus{background-color:#fff}.woocommerce-filters-filter__content-list-item.is-selected .woocommerce-filters-filter__button:before{content:"";width:8px;height:8px;background-color:#95588a;position:absolute;top:50%;left:1em;-webkit-transform:translate(50%,-50%);transform:translate(50%,-50%)}.woocommerce-filters-filter__content-list-item .woocommerce-filters-filter__button{position:relative;display:block;width:100%;padding:1em 1em 1em 3em;background-color:#f8f9f9;text-align:left}.woocommerce-filters-filter__content-list-item .woocommerce-filters-filter__button.components-button{color:#555d66}.woocommerce-filters-filter__content-list-item .woocommerce-filters-filter__button:hover{background-color:#f3f4f5;color:#555d66}.woocommerce-filters-filter__content-list-item .woocommerce-filters-filter__button.components-button:not(:disabled):not([aria-disabled=true]):focus{background-color:#f8f9f9}.woocommerce-filters-filter__content-list-item .woocommerce-filters-filter__button .dashicon{position:absolute;left:1em;top:50%;-webkit-transform:translateY(-50%);transform:translateY(-50%)}.woocommerce-filters .components-base-control__field{margin-bottom:0}@media (max-width:400px){.woocommerce-filters{margin-left:-8px;margin-right:-8px}}.woocommerce-filters__basic-filters{display:-webkit-box;display:flex;margin-bottom:24px}@media (max-width:1280px){.woocommerce-filters__basic-filters{-webkit-box-orient:vertical;-webkit-box-direction:normal;flex-direction:column}}@media (max-width:782px){.woocommerce-filters__basic-filters{margin-bottom:16px}}.woocommerce-filters-filter{width:25%;padding:0 12px;min-height:82px;display:-webkit-box;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;flex-direction:column;-webkit-box-pack:end;justify-content:flex-end}.woocommerce-filters-filter:first-child{padding-left:0}.woocommerce-filters-filter:last-child{padding-right:0}@media (max-width:1440px){.woocommerce-filters-filter{width:33.3%}}@media (max-width:1280px){.woocommerce-filters-filter{width:50%;padding:0;min-height:78px}}@media (max-width:782px){.woocommerce-filters-filter{width:100%}}.woocommerce-filters-label{margin:7px 0;display:block}@media (max-width:1280px){.woocommerce-filters-label{margin:5px 0}}.woocommerce-filters-date__content .components-popover__content,.woocommerce-filters-filter__content .components-popover__content{width:320px;border:1px solid #ccd0d4;background-color:#fff}.woocommerce-filters-date__content .woocommerce-calendar__input-error .components-popover__content,.woocommerce-filters-filter__content .woocommerce-calendar__input-error .components-popover__content{background-color:#606a73}.woocommerce-filters-date__content.is-mobile .components-popover__content,.woocommerce-filters-filter__content.is-mobile .components-popover__content{width:100%;height:100%;border:none}.woocommerce-filters__compare .woocommerce-card__body{padding:0}.woocommerce-filters__compare-body{padding:16px;background-color:#f8f9f9;border-bottom:1px solid #e2e4e7}.woocommerce-filters__compare-footer{padding:16px;display:-webkit-box;display:flex;-webkit-box-align:center;align-items:center}.woocommerce-filters__compare-footer .components-button{margin-right:16px}.woocommerce-filters-filter__search .woocommerce-search__autocomplete-results{position:static}.woocommerce-filters-filter__search .woocommerce-search__inline-container{overflow:hidden}.woocommerce-filters-filter__search .woocommerce-search__inline-container:not(.is-active){border:none}.woocommerce-filters-advanced__list-item .components-base-control+.components-base-control{margin-bottom:0}.woocommerce-flag span{vertical-align:middle}.woocommerce-flag .woocommerce-flag__fallback{background:#e2e4e7;color:transparent;width:24px;height:18px;display:block;overflow:hidden}.woocommerce-gravatar{border-radius:50%}.woocommerce-list__item{padding:16px;display:-webkit-box;display:flex;-webkit-box-align:center;align-items:center;margin-bottom:0}.woocommerce-list__item.has-action{cursor:pointer}.woocommerce-list__item .woocommerce-list__item-title{display:block;font-size:16px;line-height:22px;color:#1a1a1a}.woocommerce-list__item .woocommerce-list__item-description{margin-top:4px;display:block;font-size:14px;line-height:20px;color:#50575d}.woocommerce-list__item .woocommerce-list__item-before{margin-right:20px;display:-webkit-box;display:flex;-webkit-box-align:center;align-items:center}.woocommerce-list__item .woocommerce-list__item-after{margin-left:auto}.woocommerce-list__item .woocommerce-list__item-after,.woocommerce-order-status{display:-webkit-box;display:flex;-webkit-box-align:center;align-items:center}.woocommerce-order-status__indicator{min-width:16px;width:16px;height:16px;display:block;background:#ccd0d4;margin-right:8px;border-radius:50%;border:3px solid #e2e4e7}.woocommerce-order-status__indicator.is-processing{background:#4ab866;border-color:#93d5a4}.woocommerce-order-status__indicator.is-on-hold{background:#ffb900;border-color:#ffd566}.woocommerce-pagination{display:-webkit-box;display:flex;-webkit-box-orient:horizontal;-webkit-box-direction:normal;flex-direction:row;flex-wrap:nowrap;-webkit-box-pack:center;justify-content:center;-webkit-box-align:center;align-items:center}@media (max-width:782px){.woocommerce-pagination{-webkit-box-orient:vertical;-webkit-box-direction:normal;flex-direction:column}}.woocommerce-pagination input{border-radius:4px}.woocommerce-pagination__page-arrows{display:-webkit-box;display:flex;-webkit-box-orient:horizontal;-webkit-box-direction:normal;flex-direction:row}.woocommerce-pagination__page-arrows-buttons{display:-webkit-inline-box;display:inline-flex;-webkit-box-align:baseline;align-items:baseline;border:solid #b5bfc9;border-width:1px 1px 2px;border-radius:4px;background:#f0f2f4}.woocommerce-pagination__page-arrows-buttons .components-button:not(:disabled):not([aria-disabled=true]){color:#24292d;height:30px;width:32px;-webkit-box-pack:center;justify-content:center}.woocommerce-pagination__page-arrows-buttons .components-icon-button:not(:disabled):not([aria-disabled=true]):hover{color:#6c7781}.woocommerce-pagination__page-arrows-buttons button:first-child{border-right:2px solid #d3d9de}.woocommerce-pagination__page-arrows-buttons .woocommerce-pagination__link{padding:4px}.woocommerce-pagination__page-arrows-label{margin-top:8px;margin-right:8px}.woocommerce-pagination__page-picker{margin-left:16px}@media (max-width:782px){.woocommerce-pagination__page-picker{margin-top:16px;margin-left:0}}.woocommerce-pagination__page-picker .woocommerce-pagination__page-picker-input{margin-left:8px;width:60px;height:34px;box-shadow:none}.woocommerce-pagination__per-page-picker{margin-left:16px}@media (max-width:782px){.woocommerce-pagination__per-page-picker{margin-top:16px;margin-left:0}}.woocommerce-pagination__per-page-picker .components-base-control{margin-bottom:0}.woocommerce-pagination__per-page-picker .components-base-control__field{display:-webkit-box;display:flex;-webkit-box-orient:horizontal;-webkit-box-direction:normal;flex-direction:row;-webkit-box-align:baseline;align-items:baseline;margin-bottom:0}.woocommerce-pagination__per-page-picker .components-select-control__input{width:60px;height:34px;box-shadow:none}.woocommerce-pagination__per-page-picker .components-base-control__label{margin-right:8px}.woocommerce-pagination__page-picker-input.has-error,.woocommerce-pagination__page-picker-input.has-error:focus{border-color:#d94f4f;box-shadow:0 0 2px #d94f4f}.woocommerce-product-image{border-radius:50%}.woocommerce-rating{position:relative;vertical-align:middle;display:inline-block;overflow:hidden;white-space:nowrap}.woocommerce-rating .gridicon{fill:#d7dade}.woocommerce-rating .woocommerce-rating__star-outline{position:absolute;left:0;top:0;white-space:nowrap;overflow:hidden}.woocommerce-rating .woocommerce-rating__star-outline .gridicon{fill:#555d66}.woocommerce-search{position:relative;min-width:0}.woocommerce-search>div{min-width:0}.woocommerce-search .woocommerce-search__icon{position:absolute;top:10px;left:10px;fill:#a2aab2}.woocommerce-search .woocommerce-tag{max-width:100%}.woocommerce-search .woocommerce-tag .woocommerce-tag__text{max-width:calc(100% - 24px)}.woocommerce-search:not(.has-inline-tags) .woocommerce-tag{margin:8px 6px 0 0}.woocommerce-search.has-inline-tags .woocommerce-search__icon{top:50%;-webkit-transform:translateY(-50%);transform:translateY(-50%)}.woocommerce-search .woocommerce-search__inline-container{width:100%;padding:4px 2px 4px 36px;border:1px solid #ccd0d4;background-color:#fff;display:-webkit-box;display:flex;-webkit-box-align:center;align-items:center;position:relative}.woocommerce-search .woocommerce-search__inline-container.is-active{border-color:#00a0d2;box-shadow:inset 0 0 0 #00435d,0 0 1px 2px #bfe7f3}.woocommerce-search .woocommerce-search__inline-container.has-tags{padding-right:36px}.woocommerce-search .woocommerce-search__inline-container .woocommerce-search__token-list{max-width:100%;display:inline-block;padding:1px 0}.woocommerce-search .woocommerce-search__inline-input,.woocommerce-search .woocommerce-search__inline-input:focus{border:none;outline:none;box-shadow:none;padding:2px 0;line-height:20px;max-width:100%;min-width:70px;font-size:inherit;vertical-align:middle}.woocommerce-search .woocommerce-search__inline-input:focus[type=number]::-webkit-inner-spin-button,.woocommerce-search .woocommerce-search__inline-input:focus[type=number]::-webkit-outer-spin-button,.woocommerce-search .woocommerce-search__inline-input[type=number]::-webkit-inner-spin-button,.woocommerce-search .woocommerce-search__inline-input[type=number]::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}.woocommerce-search .woocommerce-search__input{width:100%;padding:8px 12px 8px 36px;border:1px solid #ccd0d4}.woocommerce-search .woocommerce-search__autocomplete-results{display:-webkit-box;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;flex-direction:column;-webkit-box-align:stretch;align-items:stretch;border:1px solid #ccd0d4;position:absolute;left:0;right:0;z-index:10}.woocommerce-search .woocommerce-search__autocomplete-results:empty{display:none}.woocommerce-search .woocommerce-search__autocomplete-results.is-static-results{position:static}.woocommerce-search .woocommerce-search__autocomplete-result{margin-bottom:0;display:-webkit-box;display:flex;-webkit-box-orient:horizontal;-webkit-box-direction:normal;flex-direction:row;-webkit-box-flex:1;flex-grow:1;flex-shrink:0;-webkit-box-align:center;align-items:center;padding:12px;color:#95588a;text-align:left;background:#f8f9f9;border-bottom:1px solid #e2e4e7}.woocommerce-search .woocommerce-search__autocomplete-result:last-of-type{border-bottom:none}.woocommerce-search .woocommerce-search__autocomplete-result:hover{box-shadow:none;color:#95588a;background:#f3f4f5}.woocommerce-search .woocommerce-search__autocomplete-result.is-selected,.woocommerce-search .woocommerce-search__autocomplete-result:active,.woocommerce-search .woocommerce-search__autocomplete-result:focus{color:#95588a;background:#fff;box-shadow:inset 0 0 0 1px #f3f4f5,inset 0 0 0 2px #24292d}.woocommerce-search .woocommerce-search__autocomplete-result .woocommerce-search__result-thumbnail{margin-right:12px}.woocommerce-search__result-name{text-decoration:underline}.woocommerce-search__clear{position:absolute;right:10px;top:calc(50% - 10px)}.woocommerce-search__clear>.dashicon{color:#c9c9c9}.woocommerce-search-list{width:100%;padding:0 0 16px;text-align:left}.woocommerce-search-list__selected{margin:16px 0;padding:16px 0 0;min-height:76px;border-top:1px solid #e2e4e7}.woocommerce-search-list__selected .woocommerce-search-list__selected-header{margin-bottom:8px}.woocommerce-search-list__selected .woocommerce-search-list__selected-header button{margin-left:12px}.woocommerce-search-list__selected .woocommerce-tag__text{max-width:13em}.woocommerce-search-list__search{margin:16px 0;padding:16px 0 0;border-top:1px solid #e2e4e7}.woocommerce-search-list__search .components-base-control__field{margin-bottom:16px}.woocommerce-search-list__list{padding:0;max-height:17em;overflow-x:hidden;overflow-y:auto;border-top:1px solid #e2e4e7;border-bottom:1px solid #e2e4e7}.woocommerce-search-list__list.is-loading,.woocommerce-search-list__list.is-not-found{padding:12px 0;text-align:center;border:none}.woocommerce-search-list__list.is-not-found .woocommerce-search-list__not-found-icon,.woocommerce-search-list__list.is-not-found .woocommerce-search-list__not-found-text{display:inline-block}.woocommerce-search-list__list.is-not-found .woocommerce-search-list__not-found-icon{margin-right:16px}.woocommerce-search-list__list.is-not-found .woocommerce-search-list__not-found-icon .gridicon{vertical-align:top;margin-top:-1px}.woocommerce-search-list__list .components-spinner{float:none;margin:0 auto}.woocommerce-search-list__list .components-menu-group__label{clip:rect(1px,1px,1px,1px);-webkit-clip-path:inset(50%);clip-path:inset(50%);height:1px;width:1px;margin:-1px;overflow:hidden;overflow-wrap:normal!important;word-wrap:normal!important}.woocommerce-search-list__list>[role=menu]{border:1px solid #e2e4e7;border-bottom:none}.woocommerce-search-list__list .woocommerce-search-list__item{display:-webkit-box;display:flex;-webkit-box-align:center;align-items:center;margin-bottom:0;padding:12px 16px;background:#fff;border-bottom:1px solid #e2e4e7!important;color:#555d66}.woocommerce-search-list__list .woocommerce-search-list__item:active,.woocommerce-search-list__list .woocommerce-search-list__item:focus,.woocommerce-search-list__list .woocommerce-search-list__item:hover{background:#f8f9f9}.woocommerce-search-list__list .woocommerce-search-list__item:last-child{border-bottom:none!important}.woocommerce-search-list__list .woocommerce-search-list__item .woocommerce-search-list__item-state{-webkit-box-flex:0;flex:0 0 16px;margin-right:8px;height:24px}.woocommerce-search-list__list .woocommerce-search-list__item .woocommerce-search-list__item-label{display:-webkit-box;display:flex;-webkit-box-flex:1;flex:1}.woocommerce-search-list__list .woocommerce-search-list__item.depth-0+.depth-1{margin-top:-1px}.woocommerce-search-list__list .woocommerce-search-list__item:not(.depth-0){border-bottom:0!important}.woocommerce-search-list__list .woocommerce-search-list__item:not(.depth-0)+.depth-0{border-top:1px solid #e2e4e7}.woocommerce-search-list__list .woocommerce-search-list__item[class*=depth-] .woocommerce-search-list__item-label:before{margin-right:4px;content:"— — — — — "}.woocommerce-search-list__list .woocommerce-search-list__item.depth-0 .woocommerce-search-list__item-label:before{margin-right:0;content:""}.woocommerce-search-list__list .woocommerce-search-list__item.depth-1 .woocommerce-search-list__item-label:before{content:"— "}.woocommerce-search-list__list .woocommerce-search-list__item.depth-2 .woocommerce-search-list__item-label:before{content:"— — "}.woocommerce-search-list__list .woocommerce-search-list__item.depth-3 .woocommerce-search-list__item-label:before{content:"— — — "}.woocommerce-search-list__list .woocommerce-search-list__item.depth-4 .woocommerce-search-list__item-label:before{content:"— — — — "}.woocommerce-search-list__list .woocommerce-search-list__item .woocommerce-search-list__item-name{display:inline-block}.woocommerce-search-list__list .woocommerce-search-list__item .woocommerce-search-list__item-prefix{display:none;color:#6c7781}.woocommerce-search-list__list .woocommerce-search-list__item.is-searching .woocommerce-search-list__item-label,.woocommerce-search-list__list .woocommerce-search-list__item.is-skip-level .woocommerce-search-list__item-label{display:inline-block}.woocommerce-search-list__list .woocommerce-search-list__item.is-searching .woocommerce-search-list__item-prefix,.woocommerce-search-list__list .woocommerce-search-list__item.is-skip-level .woocommerce-search-list__item-prefix{display:inline}.woocommerce-search-list__list .woocommerce-search-list__item.is-searching .woocommerce-search-list__item-prefix:after,.woocommerce-search-list__list .woocommerce-search-list__item.is-skip-level .woocommerce-search-list__item-prefix:after{margin-right:4px;content:" ›"}.woocommerce-search-list__list .woocommerce-search-list__item.is-searching .woocommerce-search-list__item-name{color:#191e23}.woocommerce-search-list__list .woocommerce-search-list__item .woocommerce-search-list__item-count{-webkit-box-flex:0;flex:0 1 auto;padding:2px 8px;border:1px solid #e2e4e7;border-radius:12px;font-size:.8em;line-height:1.4;color:#6c7781;background:#fff;white-space:nowrap}.components-panel .woocommerce-search-list{padding:0}.components-panel .woocommerce-search-list__selected{margin:0 0 16px;padding:0;border-top:none;min-height:54px}.components-panel .woocommerce-search-list__search{margin:0 0 16px;padding:0;border-top:none}.woocommerce-section-header{padding:13px;border-bottom:none;display:-webkit-box;display:flex;-webkit-box-pack:justify;justify-content:space-between}@media (max-width:782px){.woocommerce-section-header{margin-left:-16px;margin-right:-16px;margin-bottom:12px;border-left:none;border-right:none;width:auto}}.woocommerce-section-header hr{-ms-grid-row-align:center;align-self:center;-webkit-box-flex:1;flex-grow:1;height:1px;margin:0 10px}@media (max-width:782px){.woocommerce-section-header.has-interval-select{position:relative;padding-bottom:30px}.woocommerce-section-header.has-interval-select .woocommerce-chart__interval-select{position:absolute;left:0;bottom:0;padding-left:6px}}.woocommerce-section-header__actions,.woocommerce-section-header__menu{text-align:right}.woocommerce-section-header__actions{display:-webkit-box;display:flex;-webkit-box-flex:1;flex-grow:1;-webkit-box-pack:end;justify-content:flex-end;-webkit-box-align:center;align-items:center}.woocommerce-section-header__actions .components-base-control{padding-top:0;min-height:34px}.woocommerce-section-header__actions .components-base-control__field{margin-bottom:0}.woocommerce-section-header__actions .components-base-control__field select{background:transparent}.woocommerce-ellipsis-menu__toggle{padding:0}.woocommerce-section-header__menu{display:-webkit-box;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;flex-direction:column;-webkit-box-pack:center;justify-content:center}.woocommerce-section-header__title{margin:0 16px 0 0;padding:3px 0;font-size:18px;font-size:1.125rem;line-height:2.2;font-weight:600}.woocommerce-segmented-selection{width:100%;color:#555d66}.woocommerce-segmented-selection__container{width:100%;-ms-grid-columns:1fr 1fr;grid-template-columns:1fr 1fr;display:-ms-grid;display:grid;border-top:1px solid #ccd0d4;border-bottom:1px solid #ccd0d4;background-color:#ccd0d4}.woocommerce-segmented-selection__item:nth-child(2n){border-left:1px solid #ccd0d4;border-top:1px solid #ccd0d4}.woocommerce-segmented-selection__item:nth-child(odd){border-top:1px solid #ccd0d4}.woocommerce-segmented-selection__item:nth-child(-n+2){border-top:0}.woocommerce-segmented-selection__label{background-color:#f8f9f9;padding:12px 12px 12px 36px;position:relative;display:block;height:100%}.woocommerce-segmented-selection__label:active{background-color:#f3f4f5}.woocommerce-segmented-selection__label:hover{background-color:#f3f4f5}.woocommerce-segmented-selection__input{opacity:0;position:absolute;left:-9999px}.woocommerce-segmented-selection__input:active+label .woocommerce-segmented-selection__label{background-color:#f3f4f5}.woocommerce-segmented-selection__input:checked+label .woocommerce-segmented-selection__label{background-color:#fff;font-weight:600}.woocommerce-segmented-selection__input:checked+label .woocommerce-segmented-selection__label:before{content:"";width:8px;height:8px;background-color:#95588a;position:absolute;top:50%;-webkit-transform:translate(-20px,-50%);transform:translate(-20px,-50%)}.woocommerce-segmented-selection__input:focus+label .woocommerce-segmented-selection__label{box-shadow:inset 0 0 0 1px #24292d}.woocommerce-simple-select-control__dropdown{position:relative;width:100%;height:56px;border:1px solid #b0b5b8;box-shadow:none;box-sizing:border-box;border-radius:3px;background:#fff;font-size:16px;line-height:54px;font-weight:400;margin-top:16px;margin-bottom:16px}.woocommerce-simple-select-control__dropdown .woocommerce-simple-select-control__selector.components-button{border:0;background:transparent;box-shadow:none;-webkit-box-pack:unset;justify-content:unset;margin-left:0;position:absolute;top:0;height:100%;width:100%;left:0;padding-left:16px;padding-right:40px}.woocommerce-simple-select-control__dropdown .woocommerce-simple-select-control__selector.components-button:focus:not(:disabled){box-shadow:none;outline:none;background-color:transparent;outline-offset:0}.woocommerce-simple-select-control__dropdown .woocommerce-simple-select-control__selector.components-button:after{display:block;pointer-events:none;position:absolute;float:right;line-height:56px;font-family:dashicons,sans-serif;font-size:20px;content:"\f140";z-index:101;height:24px;width:24px;margin-top:0;top:0;right:16px;bottom:16px;color:#000}.woocommerce-simple-select-control__dropdown .woocommerce-simple-select-control__dropdown-content.components-popover.is-bottom{margin-top:-80px;z-index:999}.woocommerce-simple-select-control__dropdown .woocommerce-simple-select-control__dropdown-content.components-popover.is-bottom:after,.woocommerce-simple-select-control__dropdown .woocommerce-simple-select-control__dropdown-content.components-popover.is-bottom:before{display:none}.woocommerce-simple-select-control__dropdown .woocommerce-simple-select-control__dropdown-content .components-button{display:block;position:relative;padding:10px 20px 10px 40px;width:100%;text-align:left}.woocommerce-simple-select-control__dropdown .woocommerce-simple-select-control__dropdown-content .components-button.is-selected{background:#ccced0}.woocommerce-simple-select-control__dropdown.is-empty .woocommerce-simple-select-control__selector.components-button{font-size:16px;line-height:54px;height:54px;z-index:100;color:#636d75}.woocommerce-simple-select-control__dropdown.is-active{box-shadow:0 0 0 2px #673d99;border-color:transparent}.woocommerce-simple-select-control__dropdown.has-value .woocommerce-simple-select-control__selector{display:-webkit-box;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;flex-direction:column}.woocommerce-simple-select-control__dropdown.has-value .woocommerce-simple-select-control__selector.components-button:after{bottom:23px}.woocommerce-simple-select-control__dropdown.has-value .woocommerce-simple-select-control__label{font-size:12px;line-height:16px;margin-top:8px;color:#636d75}.woocommerce-simple-select-control__dropdown.has-value .woocommerce-simple-select-control__value{color:#2b2d2f;font-size:16px;white-space:nowrap}.woocommerce-split-button{display:-webkit-box;display:flex;-webkit-box-align:center;align-items:center;padding:4px 0}.woocommerce-split-button .woocommerce-split-button__menu{padding:0}.woocommerce-split-button .woocommerce-split-button__main-action,.woocommerce-split-button .woocommerce-split-button__menu-toggle{line-height:26px;height:42px;border-radius:3px;white-space:nowrap;color:#555d66;border:1px solid #b5bcc2;background:#f3f4f5;box-shadow:inset 0 -1px 0 #b5bcc2;vertical-align:top}.woocommerce-split-button .woocommerce-split-button__main-action{padding:0 12px;border-top-right-radius:0;border-bottom-right-radius:0;border-right:0;height:32px}.woocommerce-split-button .woocommerce-split-button__menu-toggle{border-top-left-radius:0;border-bottom-left-radius:0;padding:4px;height:32px;width:32px}.woocommerce-split-button .woocommerce-split-button__menu-popover.is-mobile{top:46px}.woocommerce-split-button .woocommerce-split-button__main-action.components-button:not(:disabled):not([aria-disabled=true]):not(.is-default):hover,.woocommerce-split-button .woocommerce-split-button__menu-toggle.components-icon-button:not(:disabled):not([aria-disabled=true]):not(.is-default):hover{background-color:#fafafa;border-color:#78848f;box-shadow:inset 0 -1px 0 #b5bcc2}.woocommerce-split-button .woocommerce-split-button__main-action.components-button:not(:disabled):not([aria-disabled=true]):not(.is-default):focus,.woocommerce-split-button .woocommerce-split-button__menu-toggle.components-icon-button:not(:disabled):not([aria-disabled=true]):not(.is-default):focus{background-color:#fafafa;border:1px solid #555d66;box-shadow:inset 0 -1px 0 #6c7781,0 0 0 2px #bfe7f3}.woocommerce-split-button .woocommerce-split-button__main-action.components-button .dashicon,.woocommerce-split-button .woocommerce-split-button__main-action.components-button .gridicon{width:18px;height:18px}.woocommerce-split-button.has-label .woocommerce-split-button__main-action.components-button .dashicon,.woocommerce-split-button.has-label .woocommerce-split-button__main-action.components-button .gridicon{margin-right:8px}.woocommerce-split-button .woocommerce-split-button__menu-wrapper{width:100%;padding:4px}.woocommerce-split-button .woocommerce-split-button__menu-wrapper .components-button,.woocommerce-split-button .woocommerce-split-button__menu-wrapper .components-icon-button{color:#555d66;margin-top:4px;margin-bottom:4px}.woocommerce-split-button .woocommerce-split-button__menu-wrapper .components-button:not(:disabled):not([aria-disabled=true]):not(.is-default):hover{background-color:#fff;color:#24292d;box-shadow:inset 0 0 0 1px #e2e4e7,inset 0 0 0 2px #fff,0 1px 1px rgba(25,30,35,.2)}.woocommerce-split-button .woocommerce-split-button__menu-item{width:100%;padding:4px;border-radius:0;outline:none;cursor:pointer}.woocommerce-split-button .woocommerce-split-button__menu-item .dashicon{margin-right:8px}.woocommerce-split-button .dashicons-arrow-down{fill:#555d66;height:20px;width:20px}.woocommerce-split-button .woocommerce-split-button__menu-toggle.is-active,.woocommerce-split-button .woocommerce-split-button__menu-toggle.is-active:hover,.woocommerce-split-button .woocommerce-split-button__menu-toggle.is-active:hover>svg,.woocommerce-split-button .woocommerce-split-button__menu-toggle.is-active>svg{background:initial}.woocommerce-split-button .woocommerce-split-button__menu-toggle.is-active,.woocommerce-split-button .woocommerce-split-button__menu-toggle.is-active:hover{border-color:#b5bcc2}.woocommerce-split-button.is-primary .woocommerce-split-button__main-action,.woocommerce-split-button.is-primary .woocommerce-split-button__menu-toggle{background:#95588a;color:#fff;border-color:#7c3f71;box-shadow:inset 0 -1px 0 #7c3f71}.woocommerce-split-button.is-primary .woocommerce-split-button__main-action.components-button:not(:disabled):not([aria-disabled=true]):not(.is-default):hover,.woocommerce-split-button.is-primary .woocommerce-split-button__menu-toggle.components-icon-button:not(:disabled):not([aria-disabled=true]):not(.is-default):hover{color:#fff;background-color:#7c3f71;border-color:#622557;box-shadow:inset 0 -1px 0 #622557}.woocommerce-split-button.is-primary .woocommerce-split-button__main-action.components-button:not(:disabled):not([aria-disabled=true]):not(.is-default):focus,.woocommerce-split-button.is-primary .woocommerce-split-button__menu-toggle.components-icon-button:not(:disabled):not([aria-disabled=true]):not(.is-default):focus{color:#fff;background-color:#7c3f71;box-shadow:inset 0 -1px 0 #622557,0 0 0 2px #ffd7ff;border:1px solid #622557}.woocommerce-split-button.is-primary .dashicons-arrow-down{fill:#fff}.woocommerce-stepper .woocommerce-stepper__steps{display:-webkit-box;display:flex;justify-content:space-around;margin-bottom:24px}.woocommerce-stepper .woocommerce-stepper__step{display:-webkit-inline-box;display:inline-flex;padding:8px;font-weight:400;position:relative}.woocommerce-stepper .woocommerce-stepper__step .woocommerce-stepper__step-label{color:#1a1a1a;line-height:24px;font-size:16px}.woocommerce-stepper .woocommerce-stepper__step .woocommerce-stepper__step-description{display:none;font-size:14px;color:#636d75;font-weight:400;margin-top:2px}.woocommerce-stepper .woocommerce-stepper__step svg{display:none}.woocommerce-stepper .woocommerce-stepper__step .woocommerce-spinner{display:block;margin-right:12px;max-height:24px;min-width:auto;width:24px;border-radius:50%;background:#005fb7}.woocommerce-stepper .woocommerce-stepper__step .woocommerce-spinner__circle{stroke:#fff}.woocommerce-stepper .woocommerce-stepper__step.is-active .woocommerce-stepper__step-icon,.woocommerce-stepper .woocommerce-stepper__step.is-complete .woocommerce-stepper__step-icon{background:#005fb7;color:#fff}.woocommerce-stepper .woocommerce-stepper__step.is-active .woocommerce-stepper__step-icon{font-weight:600}.woocommerce-stepper .woocommerce-stepper__step.is-active .woocommerce-stepper__step-label{font-weight:600;margin:0}.woocommerce-stepper .woocommerce-stepper__step.is-complete .woocommerce-stepper__step-number{display:none}.woocommerce-stepper .woocommerce-stepper__step.is-complete svg{display:inline}.woocommerce-stepper .woocommerce-stepper__step-icon{font-size:16px;display:-webkit-inline-box;display:inline-flex;-webkit-box-align:center;align-items:center;-webkit-box-pack:center;justify-content:center;width:24px;height:24px;min-width:24px;margin-right:12px;background:#e1e2e2;color:#50575d;border-radius:50%}.woocommerce-stepper .woocommerce-stepper__step-divider{align-self:flex-start;-webkit-box-flex:1;flex-grow:1;border-bottom:1px solid #e1e2e2;margin-top:20px}.woocommerce-stepper .woocommerce-stepper__step-divider:last-child{display:none}@media (max-width:782px){.woocommerce-stepper .woocommerce-stepper__step-label{display:none;padding-top:24px}.woocommerce-stepper .woocommerce-stepper__step-icon{margin-right:0}}.woocommerce-stepper.is-vertical .woocommerce-stepper__steps{-webkit-box-align:initial;align-items:normal;-webkit-box-orient:vertical;-webkit-box-direction:normal;flex-direction:column}.woocommerce-stepper.is-vertical .woocommerce-stepper__step{min-height:90px}.woocommerce-stepper.is-vertical .woocommerce-stepper__step:after{content:"";position:absolute;left:20px;top:40px;height:calc(100% - 40px);border-left:1px solid #e1e2e2}.woocommerce-stepper.is-vertical .woocommerce-stepper__step:last-child{min-height:auto}.woocommerce-stepper.is-vertical .woocommerce-stepper__step:last-child:after{display:none}.woocommerce-stepper.is-vertical .woocommerce-stepper__step-label{display:initial}.woocommerce-stepper.is-vertical .woocommerce-stepper__step-icon{margin-right:12px}.woocommerce-stepper.is-vertical .woocommerce-stepper__step-description{display:block}.woocommerce-stepper.is-vertical .woocommerce-stepper_content{margin-top:8px}@-webkit-keyframes rotate{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}to{-webkit-transform:rotate(270deg);transform:rotate(270deg)}}@keyframes rotate{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}to{-webkit-transform:rotate(270deg);transform:rotate(270deg)}}@-webkit-keyframes growAndShrink{0%,to{stroke-dashoffset:200}50%{stroke-dashoffset:50;-webkit-transform:rotate(135deg);transform:rotate(135deg)}to{-webkit-transform:rotate(450deg);transform:rotate(450deg)}}@keyframes growAndShrink{0%,to{stroke-dashoffset:200}50%{stroke-dashoffset:50;-webkit-transform:rotate(135deg);transform:rotate(135deg)}to{-webkit-transform:rotate(450deg);transform:rotate(450deg)}}.woocommerce-spinner{-webkit-animation:rotate 2s linear infinite;animation:rotate 2s linear infinite;width:40px;min-width:40px;height:40px;max-height:40px}.woocommerce-spinner__circle{stroke-dasharray:200;stroke-dashoffset:0;-webkit-transform-origin:center;transform-origin:center;-webkit-animation:growAndShrink 2s ease-in-out infinite;animation:growAndShrink 2s ease-in-out infinite;stroke:#1a1a1a}.woocommerce-summary{margin:16px 0;display:-ms-grid;display:grid;border-color:#ccd0d4;border-style:solid;border-width:1px 0 0 1px;background-color:#edeff0;box-shadow:inset -1px -1px 0 #ccd0d4}@media (max-width:782px){.woocommerce-summary{border-width:0}.woocommerce-summary.is-placeholder{border-top:0}.woocommerce-summary .woocommerce-summary__item-container.is-placeholder{border-top:1px solid #ccd0d4}}.woocommerce-summary .components-popover.components-popover{position:static!important;top:auto!important;left:auto!important;right:auto!important;bottom:auto!important;margin-top:0!important;margin-left:0}.woocommerce-summary .components-popover.components-popover .components-popover__header{display:none}.woocommerce-summary .components-popover.components-popover .components-popover__content{position:static;left:auto;right:auto;margin:0;width:100%;max-width:100%!important;max-height:100%!important;box-shadow:none;border:none;-webkit-transform:none;transform:none}.woocommerce-summary .components-popover.components-popover .components-popover__content .woocommerce-summary__item.is-selected{display:none}.components-popover__content .woocommerce-summary{max-height:100%;margin-top:0;margin-bottom:0;overflow-y:auto;border:none}.woocommerce-summary .woocommerce-summary__item-data{display:-webkit-box;display:flex;flex-wrap:wrap}.woocommerce-summary .woocommerce-summary__item-delta,.woocommerce-summary .woocommerce-summary__item-value{-webkit-box-flex:1;flex:1 0 auto}.woocommerce-summary .woocommerce-summary__item-delta{-webkit-box-flex:0;flex:0 1 auto;display:-webkit-box;display:flex;flex-wrap:none}.woocommerce-summary,.woocommerce-summary.has-1-items,.woocommerce-summary.has-one-item{-ms-grid-columns:1fr;grid-template-columns:1fr}.woocommerce-summary.has-2-items{-ms-grid-columns:(1fr)[2];grid-template-columns:repeat(2,1fr)}.woocommerce-summary.has-2-items .woocommerce-summary__item-container:nth-of-type(2n) .woocommerce-summary__item{border-right-color:#ccd0d4}.woocommerce-summary.has-2-items .woocommerce-summary__item-container:nth-of-type(odd):nth-last-of-type(-n+2) .woocommerce-summary__item,.woocommerce-summary.has-2-items .woocommerce-summary__item-container:nth-of-type(odd):nth-last-of-type(-n+2)~.woocommerce-summary__item-container .woocommerce-summary__item{border-bottom-color:#ccd0d4}.woocommerce-summary.has-3-items{-ms-grid-columns:(1fr)[3];grid-template-columns:repeat(3,1fr)}.woocommerce-summary.has-3-items .woocommerce-summary__item-container:nth-of-type(3n) .woocommerce-summary__item{border-right-color:#ccd0d4}.woocommerce-summary.has-3-items .woocommerce-summary__item-container:nth-of-type(3n+1):nth-last-of-type(-n+3) .woocommerce-summary__item,.woocommerce-summary.has-3-items .woocommerce-summary__item-container:nth-of-type(3n+1):nth-last-of-type(-n+3)~.woocommerce-summary__item-container .woocommerce-summary__item{border-bottom-color:#ccd0d4}.woocommerce-summary.has-4-items,.woocommerce-summary.has-7-items,.woocommerce-summary.has-8-items{-ms-grid-columns:(1fr)[4];grid-template-columns:repeat(4,1fr)}.woocommerce-summary.has-4-items .woocommerce-summary__item-container:nth-of-type(4n) .woocommerce-summary__item,.woocommerce-summary.has-7-items .woocommerce-summary__item-container:nth-of-type(4n) .woocommerce-summary__item,.woocommerce-summary.has-8-items .woocommerce-summary__item-container:nth-of-type(4n) .woocommerce-summary__item{border-right-color:#ccd0d4}.woocommerce-summary.has-4-items .woocommerce-summary__item-container:nth-of-type(4n+1):nth-last-of-type(-n+4) .woocommerce-summary__item,.woocommerce-summary.has-4-items .woocommerce-summary__item-container:nth-of-type(4n+1):nth-last-of-type(-n+4)~.woocommerce-summary__item-container .woocommerce-summary__item,.woocommerce-summary.has-7-items .woocommerce-summary__item-container:nth-of-type(4n+1):nth-last-of-type(-n+4) .woocommerce-summary__item,.woocommerce-summary.has-7-items .woocommerce-summary__item-container:nth-of-type(4n+1):nth-last-of-type(-n+4)~.woocommerce-summary__item-container .woocommerce-summary__item,.woocommerce-summary.has-8-items .woocommerce-summary__item-container:nth-of-type(4n+1):nth-last-of-type(-n+4) .woocommerce-summary__item,.woocommerce-summary.has-8-items .woocommerce-summary__item-container:nth-of-type(4n+1):nth-last-of-type(-n+4)~.woocommerce-summary__item-container .woocommerce-summary__item{border-bottom-color:#ccd0d4}.woocommerce-summary.has-5-items{-ms-grid-columns:(1fr)[5];grid-template-columns:repeat(5,1fr)}.woocommerce-summary.has-5-items .woocommerce-summary__item-container:nth-of-type(5n) .woocommerce-summary__item{border-right-color:#ccd0d4}.woocommerce-summary.has-5-items .woocommerce-summary__item-container:nth-of-type(5n+1):nth-last-of-type(-n+5) .woocommerce-summary__item,.woocommerce-summary.has-5-items .woocommerce-summary__item-container:nth-of-type(5n+1):nth-last-of-type(-n+5)~.woocommerce-summary__item-container .woocommerce-summary__item{border-bottom-color:#ccd0d4}.woocommerce-summary.has-5-items .woocommerce-summary__item-delta,.woocommerce-summary.has-5-items .woocommerce-summary__item-value{min-width:100%}.woocommerce-summary.has-5-items .woocommerce-summary__item-prev-label,.woocommerce-summary.has-5-items .woocommerce-summary__item-prev-value{display:block}.woocommerce-summary.has-5-items.is-placeholder .woocommerce-summary__item-prev-label{margin-right:calc(100% - 80px)}@media (min-width:1441px){.woocommerce-summary.has-6-items{-ms-grid-columns:(1fr)[6];grid-template-columns:repeat(6,1fr)}.woocommerce-summary.has-6-items .woocommerce-summary__item-container:nth-of-type(6n) .woocommerce-summary__item{border-right-color:#ccd0d4}.woocommerce-summary.has-6-items .woocommerce-summary__item-container:nth-of-type(6n+1):nth-last-of-type(-n+6) .woocommerce-summary__item,.woocommerce-summary.has-6-items .woocommerce-summary__item-container:nth-of-type(6n+1):nth-last-of-type(-n+6)~.woocommerce-summary__item-container .woocommerce-summary__item{border-bottom-color:#ccd0d4}.woocommerce-summary.has-6-items .woocommerce-summary__item-delta,.woocommerce-summary.has-6-items .woocommerce-summary__item-value{min-width:100%}.woocommerce-summary.has-6-items .woocommerce-summary__item-prev-label,.woocommerce-summary.has-6-items .woocommerce-summary__item-prev-value{display:block}.woocommerce-summary.has-6-items.is-placeholder .woocommerce-summary__item-prev-label{margin-right:calc(100% - 80px)}.woocommerce-summary.has-9-items,.woocommerce-summary.has-10-items{-ms-grid-columns:(1fr)[5];grid-template-columns:repeat(5,1fr)}.woocommerce-summary.has-9-items .woocommerce-summary__item-container:nth-of-type(5n) .woocommerce-summary__item,.woocommerce-summary.has-10-items .woocommerce-summary__item-container:nth-of-type(5n) .woocommerce-summary__item{border-right-color:#ccd0d4}.woocommerce-summary.has-9-items .woocommerce-summary__item-container:nth-of-type(5n+1):nth-last-of-type(-n+5) .woocommerce-summary__item,.woocommerce-summary.has-9-items .woocommerce-summary__item-container:nth-of-type(5n+1):nth-last-of-type(-n+5)~.woocommerce-summary__item-container .woocommerce-summary__item,.woocommerce-summary.has-10-items .woocommerce-summary__item-container:nth-of-type(5n+1):nth-last-of-type(-n+5) .woocommerce-summary__item,.woocommerce-summary.has-10-items .woocommerce-summary__item-container:nth-of-type(5n+1):nth-last-of-type(-n+5)~.woocommerce-summary__item-container .woocommerce-summary__item{border-bottom-color:#ccd0d4}.woocommerce-summary.has-9-items .woocommerce-summary__item-delta,.woocommerce-summary.has-9-items .woocommerce-summary__item-value,.woocommerce-summary.has-10-items .woocommerce-summary__item-delta,.woocommerce-summary.has-10-items .woocommerce-summary__item-value{min-width:100%}.woocommerce-summary.has-9-items .woocommerce-summary__item-prev-label,.woocommerce-summary.has-9-items .woocommerce-summary__item-prev-value,.woocommerce-summary.has-10-items .woocommerce-summary__item-prev-label,.woocommerce-summary.has-10-items .woocommerce-summary__item-prev-value{display:block}.woocommerce-summary.has-9-items.is-placeholder .woocommerce-summary__item-prev-label,.woocommerce-summary.has-10-items.is-placeholder .woocommerce-summary__item-prev-label{margin-right:calc(100% - 80px)}}@media (max-width:1440px){.woocommerce-summary.has-4-items .woocommerce-summary__item-delta,.woocommerce-summary.has-4-items .woocommerce-summary__item-value,.woocommerce-summary.has-7-items .woocommerce-summary__item-delta,.woocommerce-summary.has-7-items .woocommerce-summary__item-value,.woocommerce-summary.has-8-items .woocommerce-summary__item-delta,.woocommerce-summary.has-8-items .woocommerce-summary__item-value{min-width:100%}.woocommerce-summary.has-4-items .woocommerce-summary__item-prev-label,.woocommerce-summary.has-4-items .woocommerce-summary__item-prev-value,.woocommerce-summary.has-7-items .woocommerce-summary__item-prev-label,.woocommerce-summary.has-7-items .woocommerce-summary__item-prev-value,.woocommerce-summary.has-8-items .woocommerce-summary__item-prev-label,.woocommerce-summary.has-8-items .woocommerce-summary__item-prev-value{display:block}.woocommerce-summary.has-4-items.is-placeholder .woocommerce-summary__item-prev-label,.woocommerce-summary.has-7-items.is-placeholder .woocommerce-summary__item-prev-label,.woocommerce-summary.has-8-items.is-placeholder .woocommerce-summary__item-prev-label{margin-right:calc(100% - 80px)}.woocommerce-summary.has-6-items,.woocommerce-summary.has-9-items{-ms-grid-columns:(1fr)[3];grid-template-columns:repeat(3,1fr)}.woocommerce-summary.has-6-items .woocommerce-summary__item-container:nth-of-type(3n) .woocommerce-summary__item,.woocommerce-summary.has-9-items .woocommerce-summary__item-container:nth-of-type(3n) .woocommerce-summary__item{border-right-color:#ccd0d4}.woocommerce-summary.has-6-items .woocommerce-summary__item-container:nth-of-type(3n+1):nth-last-of-type(-n+3) .woocommerce-summary__item,.woocommerce-summary.has-6-items .woocommerce-summary__item-container:nth-of-type(3n+1):nth-last-of-type(-n+3)~.woocommerce-summary__item-container .woocommerce-summary__item,.woocommerce-summary.has-9-items .woocommerce-summary__item-container:nth-of-type(3n+1):nth-last-of-type(-n+3) .woocommerce-summary__item,.woocommerce-summary.has-9-items .woocommerce-summary__item-container:nth-of-type(3n+1):nth-last-of-type(-n+3)~.woocommerce-summary__item-container .woocommerce-summary__item{border-bottom-color:#ccd0d4}.woocommerce-summary.has-10-items{-ms-grid-columns:(1fr)[4];grid-template-columns:repeat(4,1fr)}.woocommerce-summary.has-10-items .woocommerce-summary__item-container:nth-of-type(4n) .woocommerce-summary__item{border-right-color:#ccd0d4}.woocommerce-summary.has-10-items .woocommerce-summary__item-container:nth-of-type(4n+1):nth-last-of-type(-n+4) .woocommerce-summary__item,.woocommerce-summary.has-10-items .woocommerce-summary__item-container:nth-of-type(4n+1):nth-last-of-type(-n+4)~.woocommerce-summary__item-container .woocommerce-summary__item{border-bottom-color:#ccd0d4}.woocommerce-summary.has-10-items .woocommerce-summary__item-delta,.woocommerce-summary.has-10-items .woocommerce-summary__item-value{min-width:100%}.woocommerce-summary.has-10-items .woocommerce-summary__item-prev-label,.woocommerce-summary.has-10-items .woocommerce-summary__item-prev-value{display:block}.woocommerce-summary.has-10-items.is-placeholder .woocommerce-summary__item-prev-label{margin-right:calc(100% - 80px)}.woocommerce-summary.has-9-items .woocommerce-summary__item-container:nth-of-type(5n) .woocommerce-summary__item,.woocommerce-summary.has-10-items .woocommerce-summary__item-container:nth-of-type(5n) .woocommerce-summary__item{border-right-color:#e2e4e7}}@media (max-width:960px){.woocommerce-summary .woocommerce-summary__item{border-right-color:#ccd0d4}}@media (max-width:782px){.woocommerce-summary .woocommerce-summary__item-container{margin-left:-16px;margin-right:-16px;width:auto}.woocommerce-summary .woocommerce-summary__item-container .woocommerce-summary__item{border-right:none}.woocommerce-summary .components-popover.components-popover{margin-left:-16px;margin-right:-16px}.woocommerce-summary .components-popover.components-popover .woocommerce-summary__item-container{margin-left:0;margin-right:0}}.woocommerce-summary__item-container{margin-bottom:0}.woocommerce-summary__item-container:last-of-type .woocommerce-summary__item{border-bottom-color:#ccd0d4!important}.woocommerce-summary__item-container.is-dropdown-button{padding:0;list-style:none;border-right:1px solid #ccd0d4}.woocommerce-summary__item-container.is-dropdown-button .components-button{border-bottom:1px solid #ccd0d4;text-align:left;display:block}@media (max-width:782px){.woocommerce-summary__item-container.is-dropdown-button{border-right:none}}.woocommerce-summary__item-container.is-placeholder .woocommerce-summary__item-label{-webkit-animation:loading-fade 1.6s ease-in-out infinite;animation:loading-fade 1.6s ease-in-out infinite;background-color:#e2e4e7;color:transparent;display:inline-block;height:16px;margin-top:2.2px;max-width:110px;width:70%}.woocommerce-summary__item-container.is-placeholder .woocommerce-summary__item-label:after{content:"\00a0"}@media screen and (prefers-reduced-motion:reduce){.woocommerce-summary__item-container.is-placeholder .woocommerce-summary__item-label{-webkit-animation:none;animation:none}}.woocommerce-summary__item-container.is-placeholder .woocommerce-summary__item-data{-webkit-box-pack:justify;justify-content:space-between}.woocommerce-summary__item-container.is-placeholder .woocommerce-summary__item-delta-value,.woocommerce-summary__item-container.is-placeholder .woocommerce-summary__item-prev-label,.woocommerce-summary__item-container.is-placeholder .woocommerce-summary__item-prev-value,.woocommerce-summary__item-container.is-placeholder .woocommerce-summary__item-value{-webkit-animation:loading-fade 1.6s ease-in-out infinite;animation:loading-fade 1.6s ease-in-out infinite;background-color:#e2e4e7;color:transparent;display:inline-block;height:16px;min-width:auto}.woocommerce-summary__item-container.is-placeholder .woocommerce-summary__item-delta-value:after,.woocommerce-summary__item-container.is-placeholder .woocommerce-summary__item-prev-label:after,.woocommerce-summary__item-container.is-placeholder .woocommerce-summary__item-prev-value:after,.woocommerce-summary__item-container.is-placeholder .woocommerce-summary__item-value:after{content:"\00a0"}@media screen and (prefers-reduced-motion:reduce){.woocommerce-summary__item-container.is-placeholder .woocommerce-summary__item-delta-value,.woocommerce-summary__item-container.is-placeholder .woocommerce-summary__item-prev-label,.woocommerce-summary__item-container.is-placeholder .woocommerce-summary__item-prev-value,.woocommerce-summary__item-container.is-placeholder .woocommerce-summary__item-value{-webkit-animation:none;animation:none}}.woocommerce-summary__item-container.is-placeholder .woocommerce-summary__item-value{margin-top:2.2px;max-width:60px}.woocommerce-summary__item-container.is-placeholder .woocommerce-summary__item-delta-value{margin-top:2.2px;width:50px}.woocommerce-summary__item-container.is-placeholder .woocommerce-summary__item-prev-label{width:80px}.woocommerce-summary__item-container.is-placeholder .woocommerce-summary__item-prev-value{width:40px}.woocommerce-summary__item{display:-webkit-box;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;flex-direction:column;height:100%;padding:16px;background-color:#f8f9f9;border-bottom:1px solid #e2e4e7;border-right:1px solid #e2e4e7;line-height:1.4em;text-decoration:none}.woocommerce-summary__item:hover{background-color:#f3f4f5}.woocommerce-summary__item:active{background-color:#edeff0}.woocommerce-summary__item:focus{box-shadow:inset -1px -1px 0 #6c7781,inset 1px 1px 0 #6c7781!important}.woocommerce-summary__item.is-selected:focus{box-shadow:inset -1px -1px 0 #6c7781,inset 1px 0 0 #6c7781,inset 0 4px 0 #95588a!important}.is-dropdown-button .woocommerce-summary__item{position:relative;width:100%;padding-right:56px}@media (max-width:782px){.is-dropdown-button .woocommerce-summary__item{border-right:none}}.woocommerce-summary__item .woocommerce-summary__item-data{margin-top:auto}.woocommerce-summary__item .woocommerce-summary__item-label{display:block;margin-bottom:16px;font-size:11px;font-size:.6875rem;text-transform:uppercase;color:#6c7781}.woocommerce-summary__item .woocommerce-summary__item-value{margin-bottom:4px;font-size:18px;font-size:1.125rem;font-weight:500;color:#191e23}.woocommerce-summary__item .woocommerce-summary__item-delta{margin-bottom:12px;font-size:18px;font-size:1.125rem;font-weight:300;color:#555d66}.woocommerce-summary__item.is-selected{background:#fff;box-shadow:inset 0 4px 0 #95588a}.woocommerce-summary__item.is-selected .woocommerce-summary__item-value{font-weight:600}.woocommerce-summary__item.is-selected .woocommerce-summary__item-delta{font-weight:400}.woocommerce-summary__item.is-good-trend .woocommerce-summary__item-delta{color:#4ab866}.woocommerce-summary__item.is-bad-trend .woocommerce-summary__item-delta{color:#d94f4f}.woocommerce-summary__item .woocommerce-summary__item-delta-icon{vertical-align:middle;margin-right:3px;fill:currentColor}.woocommerce-summary__item .woocommerce-summary__item-delta-icon.gridicons-arrow-up{-webkit-transform:rotate(45deg);transform:rotate(45deg)}.woocommerce-summary__item .woocommerce-summary__item-delta-icon.gridicons-arrow-down{-webkit-transform:rotate(-45deg);transform:rotate(-45deg)}.woocommerce-summary__item .woocommerce-summary__item-prev-label,.woocommerce-summary__item .woocommerce-summary__item-prev-value{font-size:13px;font-size:.8125rem;color:#555d66;display:inline-block}.woocommerce-summary__item .woocommerce-summary__toggle{position:absolute;top:44px;right:16px;-webkit-transition:-webkit-transform .2s ease;transition:-webkit-transform .2s ease;transition:transform .2s ease;transition:transform .2s ease,-webkit-transform .2s ease}@media screen and (prefers-reduced-motion:reduce){.woocommerce-summary__item .woocommerce-summary__toggle{-webkit-transition:none;transition:none}}.is-dropdown-expanded .woocommerce-summary__item .woocommerce-summary__toggle{-webkit-transform:rotate(-180deg);transform:rotate(-180deg)}.components-popover__content .woocommerce-summary__item .woocommerce-summary__item-label{margin-bottom:0}.components-popover__content .woocommerce-summary__item .woocommerce-summary__item-delta,.components-popover__content .woocommerce-summary__item .woocommerce-summary__item-value{font-size:13px;font-size:.8125rem;margin-bottom:0}.components-popover__content .woocommerce-summary__item .woocommerce-summary__item-prev-label,.components-popover__content .woocommerce-summary__item .woocommerce-summary__item-prev-value{font-size:11px;font-size:.6875rem}.woocommerce-table .woocommerce-card__body{padding:0;position:relative}.woocommerce-table .woocommerce-search{-webkit-box-flex:1;flex-grow:1}.woocommerce-table .woocommerce-card__action{justify-self:flex-end;margin:-13px 0}.woocommerce-table .woocommerce-card__menu{justify-self:flex-end}.woocommerce-table.has-compare .woocommerce-card__action,.woocommerce-table.has-search .woocommerce-card__action{-webkit-box-align:center;align-items:center;text-align:left;display:-ms-grid;display:grid;width:100%;-ms-grid-columns:auto 1fr auto;grid-template-columns:auto 1fr auto}@media (max-width:960px){.woocommerce-table.has-compare .woocommerce-card__action,.woocommerce-table.has-search .woocommerce-card__action{-ms-grid-row:1;-ms-grid-row-span:2;-ms-grid-column:1;-ms-grid-column-span:3;grid-area:1/1/3/4;grid-gap:12px;-ms-grid-columns:auto 1fr 24px;grid-template-columns:auto 1fr 24px;margin:0}.woocommerce-table.has-compare .woocommerce-card__action .woocommerce-table__compare,.woocommerce-table.has-search .woocommerce-card__action .woocommerce-table__compare{display:-webkit-box;display:flex;-ms-grid-row:2;-ms-grid-row-span:1;-ms-grid-column:1;-ms-grid-column-span:1;grid-area:2/1/3/2}.woocommerce-table.has-compare .woocommerce-card__action .woocommerce-search,.woocommerce-table.has-search .woocommerce-card__action .woocommerce-search{-ms-grid-row:2;-ms-grid-row-span:1;-ms-grid-column:2;-ms-grid-column-span:2;grid-area:2/2/3/4;margin-right:0}.woocommerce-table.has-compare .woocommerce-card__action .woocommerce-table__download-button,.woocommerce-table.has-search .woocommerce-card__action .woocommerce-table__download-button{-ms-grid-row:1;-ms-grid-row-span:1;-ms-grid-column:2;-ms-grid-column-span:1;grid-area:1/2/2/3;-ms-grid-column-align:end;justify-self:end;margin:-6px 0}}.woocommerce-table.has-compare.has-search:not(.has-compare) .woocommerce-card__action,.woocommerce-table.has-search.has-search:not(.has-compare) .woocommerce-card__action{-ms-grid-columns:1fr auto;grid-template-columns:1fr auto}.woocommerce-table.has-compare.has-search:not(.has-compare) .woocommerce-card__action .woocommerce-search,.woocommerce-table.has-search.has-search:not(.has-compare) .woocommerce-card__action .woocommerce-search{-ms-grid-row-align:center;align-self:center;-ms-grid-column:1;grid-column-start:1;-ms-grid-column-span:1;grid-column-end:2}.woocommerce-table.has-compare.has-search:not(.has-compare) .woocommerce-card__action .woocommerce-table__download-button,.woocommerce-table.has-search.has-search:not(.has-compare) .woocommerce-card__action .woocommerce-table__download-button{-ms-grid-row-align:center;align-self:center;-ms-grid-column:2;grid-column-start:2;-ms-grid-column-span:1;grid-column-end:3}@media (max-width:960px){.woocommerce-table.has-compare.has-search:not(.has-compare) .woocommerce-card__action,.woocommerce-table.has-search.has-search:not(.has-compare) .woocommerce-card__action{-ms-grid-row:1;-ms-grid-row-span:2;-ms-grid-column:1;-ms-grid-column-span:3;grid-area:1/1/3/4;-ms-grid-columns:auto 1fr 24px;grid-template-columns:auto 1fr 24px}.woocommerce-table.has-compare.has-search:not(.has-compare) .woocommerce-card__action .woocommerce-search,.woocommerce-table.has-search.has-search:not(.has-compare) .woocommerce-card__action .woocommerce-search{-ms-grid-row:2;-ms-grid-row-span:1;-ms-grid-column:1;-ms-grid-column-span:3;grid-area:2/1/3/4;margin-left:0}.woocommerce-table.has-compare.has-search:not(.has-compare) .woocommerce-card__action .woocommerce-table__download-button,.woocommerce-table.has-search.has-search:not(.has-compare) .woocommerce-card__action .woocommerce-table__download-button{-ms-grid-row:1;-ms-grid-row-span:1;-ms-grid-column:2;-ms-grid-column-span:1;grid-area:1/2/2/3}}.woocommerce-table.has-compare .woocommerce-search,.woocommerce-table.has-search .woocommerce-search{margin:0 16px}.woocommerce-table.has-compare .woocommerce-compare-button,.woocommerce-table.has-search .woocommerce-compare-button{padding:3px 12px;height:auto}.woocommerce-table.is-empty{-webkit-box-align:center;align-items:center;background:#f8f9f9;color:#555d66;display:-webkit-box;display:flex;height:calc(17px + 1.1375rem + 165px + 5.6875rem);height:calc(17px + 1.1375rem + (33px + 1.1375rem)*var(--number-of-rows));-webkit-box-pack:center;justify-content:center;padding:16px;text-align:center}.woocommerce-table button.woocommerce-table__download-button.is-link{padding:6px 12px;color:#000;text-decoration:none}.woocommerce-table button.woocommerce-table__download-button.is-link svg{margin-right:8px;height:24px;width:24px}@media (max-width:782px){.woocommerce-table button.woocommerce-table__download-button.is-link svg{margin-right:0}.woocommerce-table button.woocommerce-table__download-button.is-link .woocommerce-table__download-button__label{display:none}}.woocommerce-table .woocommerce-pagination{padding-top:16px;padding-bottom:16px;z-index:1;background:#fff;position:relative}.woocommerce-table__caption{font-size:24px;font-size:1.5rem;text-align:left}.woocommerce-table__table{overflow-x:auto}.woocommerce-table__table:after{content:"";position:absolute;right:0;top:0;width:41px;height:100%;background:-webkit-gradient(linear,left top,right top,from(transparent),to(rgba(0,0,0,.2)));background:linear-gradient(90deg,transparent,rgba(0,0,0,.2));opacity:0;pointer-events:none;-webkit-transition:opacity .3s;transition:opacity .3s}.woocommerce-table__table.is-scrollable:after{opacity:1}.woocommerce-table__table table{border-collapse:collapse;width:100%}.woocommerce-table__table tr:focus-within,.woocommerce-table__table tr:hover{background-color:#f3f4f5}.woocommerce-table__table tr:focus-within td,.woocommerce-table__table tr:focus-within th,.woocommerce-table__table tr:hover td,.woocommerce-table__table tr:hover th{background:transparent}.woocommerce-table__header,.woocommerce-table__item{font-size:13px;font-size:.8125rem;padding:16px 24px;border-bottom:1px solid #e2e4e7;text-align:left}.woocommerce-table__header>a:only-child,.woocommerce-table__item>a:only-child{display:block}.woocommerce-table__header a:focus,.woocommerce-table__header a:hover,.woocommerce-table__item a:focus,.woocommerce-table__item a:hover{color:#622557}.woocommerce-table__header .is-placeholder,.woocommerce-table__item .is-placeholder{-webkit-animation:loading-fade 1.6s ease-in-out infinite;animation:loading-fade 1.6s ease-in-out infinite;background-color:#e2e4e7;color:transparent;display:inline-block;height:16px;max-width:120px;width:80%}.woocommerce-table__header .is-placeholder:after,.woocommerce-table__item .is-placeholder:after{content:"\00a0"}@media screen and (prefers-reduced-motion:reduce){.woocommerce-table__header .is-placeholder,.woocommerce-table__item .is-placeholder{-webkit-animation:none;animation:none}}.woocommerce-table__header:not(.is-left-aligned),.woocommerce-table__item:not(.is-left-aligned){text-align:right}.woocommerce-table__header:not(.is-left-aligned) button,.woocommerce-table__item:not(.is-left-aligned) button{-webkit-box-pack:end;justify-content:flex-end}.woocommerce-table__header.is-numeric .is-placeholder,.woocommerce-table__item.is-numeric .is-placeholder{max-width:40px}.woocommerce-table__header .is-negative,.woocommerce-table__item .is-negative{color:#d94f4f;font-weight:700}.woocommerce-table__header.is-sorted,.woocommerce-table__item.is-sorted{background-color:#f8f9f9}.woocommerce-table__header.is-checkbox-column,.woocommerce-table__item.is-checkbox-column{width:33px;max-width:33px;padding-right:0;padding-left:16px}.woocommerce-table__header.is-checkbox-column+th,.woocommerce-table__item.is-checkbox-column+th{border-left:0}th.woocommerce-table__item{font-weight:400}.woocommerce-table__header{padding:8px 24px;background-color:#f8f9fa;border-bottom:1px solid #ccd0d4;font-weight:700;white-space:nowrap}.woocommerce-table__header+.woocommerce-table__header{border-left:1px solid #ccd0d4}.woocommerce-table__header.is-left-aligned.is-sortable{padding-left:16px}.woocommerce-table__header.is-left-aligned.is-sortable svg{display:-webkit-inline-box;display:inline-flex;-webkit-box-ordinal-group:2;order:1;margin-left:0}.woocommerce-table__header .components-button.is-button{height:auto;width:100%;padding:8px 24px 8px 0;vertical-align:middle;line-height:1;border:none;background:transparent;box-shadow:none!important}.woocommerce-table__header .components-button.is-button:hover{box-shadow:none!important}.woocommerce-table__header .components-button.is-button:active{box-shadow:none!important}.woocommerce-table__header.is-sortable{padding:0}.woocommerce-table__header.is-sortable .gridicon{visibility:hidden;margin-left:4px}.woocommerce-table__header.is-sortable .components-button:focus .gridicon,.woocommerce-table__header.is-sortable .components-button:hover .gridicon,.woocommerce-table__header.is-sortable.is-sorted .components-button .gridicon{visibility:visible}.woocommerce-table__summary{margin:0;padding:16px 0;text-align:center;z-index:1;background:#fff;position:relative}.woocommerce-table__summary-item{display:inline-block;margin-bottom:0;margin-left:8px;margin-right:8px}.woocommerce-table__summary-item .woocommerce-table__summary-label,.woocommerce-table__summary-item .woocommerce-table__summary-value{display:inline-block}.woocommerce-table__summary-item .woocommerce-table__summary-label{margin-left:4px}.woocommerce-table__summary-item .woocommerce-table__summary-value{font-weight:600}.woocommerce-tag{display:-webkit-inline-box;display:inline-flex;margin:1px 4px 1px 0;overflow:hidden;vertical-align:middle}.woocommerce-tag .woocommerce-tag__remove.components-icon-button,.woocommerce-tag .woocommerce-tag__text{display:inline-block;line-height:24px;background:#e2e4e7;-webkit-transition:all .2s cubic-bezier(.4,1,.4,1);transition:all .2s cubic-bezier(.4,1,.4,1)}.woocommerce-tag .woocommerce-tag__text{-ms-grid-row-align:center;align-self:center;padding:0 8px;border-radius:12px;color:#555d66;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.woocommerce-tag.has-remove .woocommerce-tag__text{padding:0 4px 0 8px;border-radius:12px 0 0 12px}.woocommerce-tag .woocommerce-tag__remove.components-icon-button{cursor:pointer;padding:0 2px;border-radius:0 12px 12px 0;color:#555d66;line-height:10px;text-indent:0}.woocommerce-tag .woocommerce-tag__remove.components-icon-button:hover{color:#32373c}.text-control-with-affixes{display:-webkit-inline-box;display:inline-flex;-webkit-box-orient:horizontal;-webkit-box-direction:normal;flex-direction:row;width:100%}.text-control-with-affixes input[type=email],.text-control-with-affixes input[type=number],.text-control-with-affixes input[type=password],.text-control-with-affixes input[type=text],.text-control-with-affixes input[type=url]{-webkit-box-flex:1;flex-grow:1;margin:0}.text-control-with-affixes input[type=email]:disabled,.text-control-with-affixes input[type=number]:disabled,.text-control-with-affixes input[type=password]:disabled,.text-control-with-affixes input[type=text]:disabled,.text-control-with-affixes input[type=url]:disabled{border-right-width:0}.text-control-with-affixes input[type=email]:disabled+.text-control-with-affixes__suffix,.text-control-with-affixes input[type=number]:disabled+.text-control-with-affixes__suffix,.text-control-with-affixes input[type=password]:disabled+.text-control-with-affixes__suffix,.text-control-with-affixes input[type=text]:disabled+.text-control-with-affixes__suffix,.text-control-with-affixes input[type=url]:disabled+.text-control-with-affixes__suffix{border-left:1px solid #e2e4e7}.text-control-with-affixes__prefix,.text-control-with-affixes__suffix{position:relative;background:#fff;border:1px solid #e2e4e7;color:#555d66;padding:7px 14px;white-space:nowrap;-webkit-box-flex:1;flex:1 0 auto;font-size:14px;line-height:1.5}.text-control-with-affixes__prefix{border-right:none}.text-control-with-affixes__prefix+input[type=email]:disabled,.text-control-with-affixes__prefix+input[type=number]:disabled,.text-control-with-affixes__prefix+input[type=password]:disabled,.text-control-with-affixes__prefix+input[type=text]:disabled,.text-control-with-affixes__prefix+input[type=url]:disabled{border-left-color:#e2e4e7;border-right-width:1px}.text-control-with-affixes__suffix{border-left:none}.woocommerce-view-more-list{padding-left:4px;margin:0 0 0 4px;vertical-align:middle}.woocommerce-view-more-list__popover{margin:0;padding:16px;text-align:left}.woocommerce-view-more-list__popover__item{display:block;margin:16px 0}.woocommerce-view-more-list__popover__item:first-child{margin-top:0}.woocommerce-view-more-list__popover__item:last-child{margin-bottom:0}.woocommerce-web-preview{width:100%;display:-webkit-box;display:flex;-webkit-box-align:center;align-items:center;-webkit-box-pack:center;justify-content:center;background:#f6f6f6}.woocommerce-web-preview.is-loading .woocommerce-web-preview__iframe-wrapper{display:none}.woocommerce-web-preview .woocommerce-web-preview__iframe-wrapper{width:100%}.woocommerce-web-preview iframe{width:100%;height:100%;min-height:400px}
|
2 |
@-webkit-keyframes loading-fade{0%{opacity:.7}50%{opacity:1}to{opacity:.7}}@keyframes loading-fade{0%{opacity:.7}50%{opacity:1}to{opacity:.7}}.editor-block-preview__content{overflow:hidden}.components-placeholder__label .gridicon,.components-placeholder__label .material-icon{margin-right:1ch;fill:currentColor}.editor-styles-wrapper .wc-block-grid .wc-block-grid__products{list-style:none;margin:0}.editor-styles-wrapper .wc-block-grid .wc-block-grid__products .wp-block-button__link{color:inherit}.editor-styles-wrapper .wc-block-grid.components-placeholder{padding:2em 1em}.editor-styles-wrapper .wc-block-grid.is-loading,.editor-styles-wrapper .wc-block-grid.is-not-found{display:block}.wc-block-api-error .components-placeholder__fieldset{display:block;margin:0;padding:0}.wc-block-api-error .wc-block-error__message{margin-bottom:16px}.wc-block-api-error .components-spinner{float:none}
|
3 |
@-webkit-keyframes loading-fade{0%{opacity:.7}50%{opacity:1}to{opacity:.7}}@keyframes loading-fade{0%{opacity:.7}50%{opacity:1}to{opacity:.7}}.wc-block-handpicked-products__selection{width:100%}
|
4 |
@-webkit-keyframes loading-fade{0%{opacity:.7}50%{opacity:1}to{opacity:.7}}@keyframes loading-fade{0%{opacity:.7}50%{opacity:1}to{opacity:.7}}.wc-block-products-category__selection{width:100%}.wc-block-products-category__cancel-button.is-tertiary{margin:1em auto 0;display:block;text-align:center;font-size:1em}
|
@@ -6,6 +6,6 @@
|
|
6 |
@-webkit-keyframes loading-fade{0%{opacity:.7}50%{opacity:1}to{opacity:.7}}@keyframes loading-fade{0%{opacity:.7}50%{opacity:1}to{opacity:.7}}.wc-block-products-by-attribute__selection{width:100%}
|
7 |
@-webkit-keyframes loading-fade{0%{opacity:.7}50%{opacity:1}to{opacity:.7}}@keyframes loading-fade{0%{opacity:.7}50%{opacity:1}to{opacity:.7}}.wc-block-featured-product.components-placeholder{background-color:rgba(139,139,150,.1)}.wc-block-featured-product .components-resizable-box__handle{z-index:10}.wc-block-featured-product__message{margin-bottom:16px}.wc-block-featured-product__selection{width:100%}
|
8 |
@-webkit-keyframes loading-fade{0%{opacity:.7}50%{opacity:1}to{opacity:.7}}@keyframes loading-fade{0%{opacity:.7}50%{opacity:1}to{opacity:.7}}.wc-block-reviews__selection{width:100%}.components-base-control+.wc-block-reviews__notice{margin:-16px 0 16px}.components-base-control:nth-last-child(2)+.wc-block-reviews__notice{margin:-16px 0 12px}
|
9 |
-
@-webkit-keyframes loading-fade{0%{opacity:.7}50%{opacity:1}to{opacity:.7}}@keyframes loading-fade{0%{opacity:.7}50%{opacity:1}to{opacity:.7}}.wc-block-product-search__field.input-control{color:#828b96!important}.wc-block-product-search .wc-block-product-search__fields .block-editor-rich-text{
|
10 |
@-webkit-keyframes loading-fade{0%{opacity:.7}50%{opacity:1}to{opacity:.7}}@keyframes loading-fade{0%{opacity:.7}50%{opacity:1}to{opacity:.7}}.wc-block-product-tag__selection{width:100%}.wc-block-product-tag__cancel-button.is-tertiary{margin:1em auto 0;display:block;text-align:center;font-size:1em}
|
11 |
@-webkit-keyframes loading-fade{0%{opacity:.7}50%{opacity:1}to{opacity:.7}}@keyframes loading-fade{0%{opacity:.7}50%{opacity:1}to{opacity:.7}}.wc-block-featured-category.components-placeholder{background-color:rgba(139,139,150,.1)}.wc-block-featured-category .components-resizable-box__handle{z-index:10}.wc-block-featured-category .components-placeholder__label svg{fill:currentColor;margin-right:1ch}.wc-block-featured-category__selection{width:100%}
|
1 |
+
@charset "UTF-8";@-webkit-keyframes slide-in-left{0%{transform:translateX(100%)}to{transform:translateX(0)}}@keyframes slide-in-left{0%{transform:translateX(100%)}to{transform:translateX(0)}}@-webkit-keyframes slide-out-left{0%{transform:translateX(-100%)}to{transform:translateX(-200%)}}@keyframes slide-out-left{0%{transform:translateX(-100%)}to{transform:translateX(-200%)}}@-webkit-keyframes slide-in-right{0%{transform:translateX(-100%)}to{transform:translateX(0)}}@keyframes slide-in-right{0%{transform:translateX(-100%)}to{transform:translateX(0)}}@-webkit-keyframes slide-out-right{0%{transform:translateX(-100%)}to{transform:translateX(0)}}@keyframes slide-out-right{0%{transform:translateX(-100%)}to{transform:translateX(0)}}.woocommerce-slide-animation>div{width:100%;white-space:nowrap;overflow:hidden;display:flex}.woocommerce-slide-animation.animate-left .slide-enter-active{-webkit-animation:slide-in-left;animation:slide-in-left;-webkit-animation-duration:.2s;animation-duration:.2s}.woocommerce-slide-animation.animate-left .slide-exit-active{-webkit-animation:slide-out-left;animation:slide-out-left;-webkit-animation-duration:.2s;animation-duration:.2s}.woocommerce-slide-animation.animate-right .slide-enter-active{-webkit-animation:slide-in-right;animation:slide-in-right;-webkit-animation-duration:.2s;animation-duration:.2s}.woocommerce-slide-animation.animate-right .slide-exit-active{-webkit-animation:slide-out-right;animation:slide-out-right;-webkit-animation-duration:.2s;animation-duration:.2s}@media screen and (prefers-reduced-motion:reduce){.woocommerce-slide-animation .slide-enter-active,.woocommerce-slide-animation .slide-exit-active{-webkit-animation:none!important;animation:none!important}}.woocommerce-calendar{width:100%;background-color:#f8f9f9;border-top:1px solid #ccd0d4;height:396px}.woocommerce-calendar.is-mobile{height:100%}.woocommerce-calendar__react-dates{width:100%;overflow-x:hidden}.woocommerce-calendar__react-dates .DayPicker{margin:0 auto}.woocommerce-calendar__react-dates .CalendarMonth_table{margin-top:10px}.woocommerce-calendar__react-dates .CalendarDay__selected_span{background:#95588a;border:1px solid #ccd0d4}.woocommerce-calendar__react-dates .CalendarDay__selected{background:#622557;border:1px solid #ccd0d4}.woocommerce-calendar__react-dates .CalendarDay__hovered_span{background:#95588a;border:1px solid #e2e4e7;color:#fff}.woocommerce-calendar__react-dates .CalendarDay__blocked_out_of_range{color:#a2aab2}.woocommerce-calendar__react-dates .CalendarMonth,.woocommerce-calendar__react-dates .CalendarMonthGrid,.woocommerce-calendar__react-dates .DayPicker,.woocommerce-calendar__react-dates .DayPicker_transitionContainer{background-color:#f8f9f9}.woocommerce-calendar__react-dates .DayPicker_weekHeader_li{color:#606a73}.woocommerce-calendar__react-dates .DayPickerNavigation_button:focus{outline:2px solid #bfe7f3}.woocommerce-calendar__react-dates.is-core-datepicker .components-datetime__date{padding-left:0}.woocommerce-calendar__react-dates.is-core-datepicker .CalendarDay__default{background-color:transparent}.woocommerce-calendar__react-dates.is-core-datepicker .CalendarDay__selected{background:#622557;border:none}.woocommerce-calendar__inputs{padding:1em;width:100%;max-width:500px;display:-ms-grid;display:grid;-ms-grid-columns:43% 14% 43%;grid-template-columns:43% 14% 43%;margin:0 auto}.woocommerce-calendar__inputs .components-base-control{margin:0}.woocommerce-calendar__inputs-to{display:flex;align-items:center;justify-content:center;-ms-grid-column:2;grid-column-start:2}.woocommerce-calendar__input{position:relative}.woocommerce-calendar__input .dashicons-calendar{position:absolute;top:50%;transform:translateY(-50%);left:10px}.woocommerce-calendar__input .dashicons-calendar path{fill:#6c7781}.woocommerce-calendar__input:first-child{-ms-grid-column:1;grid-column-start:1}.woocommerce-calendar__input:last-child{-ms-grid-column:3;grid-column-start:3}.woocommerce-calendar__input.is-empty .dashicons-calendar path{fill:#6c7781}.woocommerce-calendar__input.is-error .dashicons-calendar path{fill:#d94f4f}.woocommerce-calendar__input.is-error .woocommerce-calendar__input-text{border:1px solid #d94f4f;box-shadow:inset 0 0 8px #d94f4f}.woocommerce-calendar__input.is-error .woocommerce-calendar__input-text:focus{box-shadow:inset 0 0 8px #d94f4f,0 0 6px rgba(30,140,190,.8)}.woocommerce-calendar__input .woocommerce-calendar__input-text{color:#555d66;border-radius:3px;padding:10px 10px 10px 30px;width:100%;font-size:13px;font-size:.8125rem}.woocommerce-calendar__input .woocommerce-calendar__input-text:-ms-input-placeholder{color:#6c7781}.woocommerce-calendar__input .woocommerce-calendar__input-text::-ms-input-placeholder{color:#6c7781}.woocommerce-calendar__input .woocommerce-calendar__input-text::-webkit-input-placeholder{color:#6c7781}.woocommerce-calendar__input .woocommerce-calendar__input-text::-moz-placeholder{color:#6c7781}.woocommerce-calendar__input .woocommerce-calendar__input-text::placeholder{color:#6c7781}.woocommerce-filters-date__content.is-mobile .woocommerce-calendar__input-error .components-popover__content{height:auto}.woocommerce-calendar__input-error{display:none}.is-error .woocommerce-calendar__input-text:focus+span .woocommerce-calendar__input-error{display:block;left:50%!important;position:absolute;top:auto!important}.woocommerce-calendar__input-error .components-popover__content{background-color:#606a73;color:#fff;padding:.5em;border:none}.woocommerce-calendar__input-error.components-popover .components-popover__content{min-width:100px;width:100px;text-align:center}.woocommerce-calendar__input-error.components-popover:not(.no-arrow):not(.is-mobile).is-bottom:before{border-bottom-color:#606a73;z-index:1;top:-6px}.woocommerce-calendar__input-error.components-popover:not(.no-arrow):not(.is-mobile).is-top:after{border-top-color:#606a73;z-index:1;top:0}.woocommerce-calendar__date-picker-title{font-size:12px;font-size:.75rem;font-weight:100;text-transform:uppercase;text-align:center;color:#6c7781;width:100%;margin:0;padding:1em;background-color:#fff}.woocommerce-card{margin-bottom:24px;background:#fff;border-radius:3px;box-shadow:0 2px 1px -1px rgba(0,0,0,.2),0 1px 1px 0 rgba(0,0,0,.14),0 1px 3px 0 rgba(0,0,0,.12);transition:box-shadow .2s cubic-bezier(.4,1,.4,1)}@media (max-width:782px){.woocommerce-card{margin-bottom:12px;width:auto}}.woocommerce-card.is-inactive{background-color:#f6f6f6;box-shadow:none}.woocommerce-card__header{padding:16px;display:-ms-grid;display:grid;align-items:center;border-top-left-radius:3px;border-top-left-radius:4px}.has-action .woocommerce-card__header{-ms-grid-columns:auto 1fr;grid-template-columns:auto 1fr}.has-menu .woocommerce-card__header{-ms-grid-columns:auto 24px;grid-template-columns:auto 24px}.has-menu.has-action .woocommerce-card__header{grid-gap:12px;-ms-grid-columns:auto 1fr 24px;grid-template-columns:auto 1fr 24px}.woocommerce-card__header-item{-ms-grid-row-align:center}.woocommerce-card__header-item:first-child{-ms-grid-column:1;grid-column-start:1;-ms-grid-column-span:1;grid-column-end:2;-ms-grid-row:1;grid-row-start:1;-ms-grid-row-span:1;grid-row-end:2}.woocommerce-card__header-item:nth-child(2){-ms-grid-column:2;grid-column-start:2;-ms-grid-column-span:1;grid-column-end:3;-ms-grid-row:1;grid-row-start:1;-ms-grid-row-span:1;grid-row-end:2}.woocommerce-card__header-item:nth-child(3){-ms-grid-column:3;grid-column-start:3;-ms-grid-column-span:1;grid-column-end:4;-ms-grid-row:1;grid-row-start:1;-ms-grid-row-span:1;grid-row-end:2}.woocommerce-card__action,.woocommerce-card__menu{text-align:right}.woocommerce-card__body{padding:16px}.woocommerce-card__title{margin:0;font-size:24px;font-size:1.5rem;line-height:1.2;font-weight:400}.woocommerce-card__description{font-size:16px;font-size:1rem;line-height:1.5;color:#636d75;margin-top:12px;margin-bottom:0;font-weight:400}.woocommerce-chart{margin-top:-16px;margin-bottom:24px;background:#fff;border:1px solid #ccd0d4;border-top:0}@media (max-width:782px){.woocommerce-chart{margin-left:-16px;margin-right:-16px;margin-bottom:12px;border-left:none;border-right:none;width:auto}}.woocommerce-chart .woocommerce-chart__header{min-height:50px;border-bottom:1px solid #ccd0d4;display:flex;flex-flow:row wrap;justify-content:space-between;align-items:center;width:100%}.woocommerce-chart .woocommerce-chart__header .woocommerce-chart__title{height:18px;color:#24292d;font-size:15px;font-weight:600;line-height:18px;margin-left:16px;margin-right:16px}.woocommerce-chart .woocommerce-chart__body{display:flex;flex-direction:row;justify-content:flex-start;align-items:flex-start;width:100%}.woocommerce-chart .woocommerce-chart__body.woocommerce-chart__body-column{flex-direction:column}.woocommerce-chart .woocommerce-chart__footer{width:100%}.woocommerce-chart-placeholder{-webkit-animation:loading-fade 1.6s ease-in-out infinite;animation:loading-fade 1.6s ease-in-out infinite;background-color:#e2e4e7;color:transparent;padding:0;width:100%;display:flex;align-items:center;justify-content:center}.woocommerce-chart-placeholder:after{content:"\00a0"}@media screen and (prefers-reduced-motion:reduce){.woocommerce-chart-placeholder{-webkit-animation:none;animation:none}}.woocommerce-chart-placeholder .components-spinner{margin:0}.woocommerce-chart__interval-select{align-items:start;border-right:1px solid #ccd0d4;display:flex;flex-direction:column;justify-content:center;margin:0 0 0 auto;min-height:50px;padding:8px 16px 0}@media (max-width:960px){.woocommerce-chart__interval-select{width:100%;order:1;margin-top:-8px;margin-left:0;padding-left:8px;border-right:0;min-height:0}}#wpbody .woocommerce-chart__interval-select .components-select-control__input{font-size:13px;font-size:.8125rem;border:0;box-shadow:none}#wpbody .woocommerce-chart__interval-select .components-select-control__input:not(:disabled):not([aria-disabled=true]):focus{background-color:#fff;color:#191e23;box-shadow:inset 0 0 0 1px #6c7781,inset 0 0 0 2px #fff;outline:2px solid transparent;outline-offset:-2px}.woocommerce-chart__types{padding:0 8px;white-space:nowrap}.woocommerce-chart__type-button{background:transparent!important}.woocommerce-chart__type-button.components-icon-button{color:#ccd0d4}.woocommerce-chart__type-button.components-icon-button.woocommerce-chart__type-button-selected{color:#555d66}.woocommerce-chart__type-button.components-icon-button:hover{box-shadow:none!important}@media (max-width:960px){.woocommerce-summary+.woocommerce-chart .woocommerce-chart__title{display:none}.woocommerce-summary+.woocommerce-chart .woocommerce-chart__interval-select{width:auto;order:0;margin-top:0}}.woocommerce-legend.has-total{padding-bottom:50px;position:relative}.woocommerce-legend.woocommerce-legend__direction-column{border-right:1px solid #ccd0d4;min-width:320px}.woocommerce-chart__footer .woocommerce-legend.woocommerce-legend__direction-column{border-right:none}.woocommerce-legend__list{color:#24292d;display:flex;height:100%;margin:0}.woocommerce-legend__direction-column .woocommerce-legend__list{flex-direction:column;height:300px;overflow:auto}.woocommerce-chart__footer .woocommerce-legend__direction-column .woocommerce-legend__list{border-top:1px solid #ccd0d4;height:100%;max-height:none;min-height:none}.has-total.woocommerce-legend__direction-column .woocommerce-legend__list{height:250px}.woocommerce-chart__footer .has-total.woocommerce-legend__direction-column .woocommerce-legend__list{height:auto;max-height:220px;min-height:none}.woocommerce-legend__direction-row .woocommerce-legend__list{flex-direction:row}.woocommerce-legend__item>button{display:flex;justify-content:center;align-items:center;background-color:#fff;color:#555d66;cursor:pointer;display:inline-flex;flex-direction:row;flex-wrap:nowrap;justify-content:space-between;width:100%;border:none;padding:0}.woocommerce-legend__item>button .woocommerce-legend__item-container{display:flex;flex-direction:row;flex-wrap:nowrap;position:relative;padding:3px 0 3px 24px;font-size:13px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;width:100%}.woocommerce-legend__item>button .woocommerce-legend__item-container:hover input~.woocommerce-legend__item-checkmark{background-color:#f3f4f5}.woocommerce-legend__item>button .woocommerce-legend__item-container .woocommerce-legend__item-checkmark{border:1px solid #a2aab2;position:absolute;top:4px;left:0;height:16px;width:16px;background-color:#fff}.woocommerce-legend__item>button .woocommerce-legend__item-container .woocommerce-legend__item-checkmark:after{content:"";position:absolute;display:none}.woocommerce-legend__item>button .woocommerce-legend__item-container .woocommerce-legend__item-checkmark.woocommerce-legend__item-checkmark-checked{background-color:currentColor;border-color:currentColor}.woocommerce-legend__item>button .woocommerce-legend__item-container .woocommerce-legend__item-checkmark.woocommerce-legend__item-checkmark-checked:after{display:block;left:5px;top:2px;width:3px;height:6px;border:solid #fff;border-width:0 2px 2px 0;transform:rotate(45deg)}.woocommerce-legend__item>button .woocommerce-legend__item-container .woocommerce-legend__item-total{margin-left:auto;font-weight:700}.woocommerce-legend__item>button:focus{outline:none}.woocommerce-legend__item>button:focus .woocommerce-legend__item-container .woocommerce-legend__item-checkmark{outline:2px solid #a2aab2}.woocommerce-legend__item>button:hover{background-color:#f8f9f9}.woocommerce-legend__direction-column .woocommerce-legend__item{margin:0;padding:0}.woocommerce-legend__direction-column .woocommerce-legend__item>button{min-height:36px;padding:0 17px;text-align:left}.woocommerce-legend__direction-column .woocommerce-legend__item:first-child{margin-top:12px}.woocommerce-legend__direction-column .woocommerce-legend__item:last-child:after{content:"";display:block;height:12px;width:100%}.woocommerce-legend__direction-row .woocommerce-legend__item{padding:0;margin:0}.woocommerce-legend__direction-row .woocommerce-legend__item>button{padding:0 17px}.woocommerce-legend__direction-row .woocommerce-legend__item>button .woocommerce-legend__item-container{height:50px;align-items:center}.woocommerce-legend__direction-row .woocommerce-legend__item>button .woocommerce-legend__item-container .woocommerce-legend__item-checkmark{top:17px}.woocommerce-legend__direction-row .woocommerce-legend__item>button .woocommerce-legend__item-container .woocommerce-legend__item-title{margin-right:17px}.woocommerce-legend__total{align-items:center;background:#fff;border-top:1px solid #ccd0d4;bottom:0;color:#555d66;display:flex;height:50px;justify-content:center;left:0;position:absolute;right:0;text-transform:uppercase}.woocommerce-legend__total:before{background:linear-gradient(180deg,transparent,rgba(0,0,0,.2));bottom:100%;content:"";height:20px;left:0;opacity:0;pointer-events:none;position:absolute;right:0;transition:opacity .3s}.is-scrollable .woocommerce-legend__total:before{opacity:1}.woocommerce-chart__body-row .d3-chart__container{width:calc(100% - 320px)}.d3-chart__container{position:relative;width:100%}.d3-chart__container svg{overflow:visible}.d3-chart__container .d3-chart__empty-message{align-items:center;bottom:0;color:#6c7781;display:flex;font-size:18px;font-size:1.125rem;font-weight:700;justify-content:center;left:0;line-height:1.5;margin:0 auto;max-width:50%;padding-bottom:48px;pointer-events:none;position:absolute;right:0;top:0;text-align:center}@media (max-width:782px){.d3-chart__container .d3-chart__empty-message{font-size:13px;font-size:.8125rem}}.d3-chart__container .d3-chart__tooltip{border:1px solid #ccd0d4;position:absolute;display:flex;min-width:324px;height:auto;background-color:#fff;text-align:left;padding:17px;box-shadow:0 3px 20px 0 rgba(18,24,30,.1),0 1px 3px 0 rgba(18,24,30,.1);flex-direction:column;flex-wrap:nowrap;justify-content:flex-start;pointer-events:none;visibility:hidden;z-index:1}@media (max-width:600px){.d3-chart__container .d3-chart__tooltip{min-width:auto;width:calc(100% - 48px)}}.d3-chart__container .d3-chart__tooltip h4{text-align:left;line-height:18px;width:100%;text-transform:uppercase;font-size:11px;color:#6c7781;margin-top:0}.d3-chart__container .d3-chart__tooltip ul{list-style:none;margin-bottom:2px;margin-top:2px;font-size:14px}.d3-chart__container .d3-chart__tooltip ul li{display:flex;flex-direction:row;flex-wrap:nowrap;justify-content:flex-start;align-items:center}.d3-chart__container .d3-chart__tooltip ul li.key-row{display:flex;flex-direction:row;justify-content:space-between;width:100%}.d3-chart__container .d3-chart__tooltip ul li.key-row .key-container{width:100%;min-width:100px}.d3-chart__container .d3-chart__tooltip ul li.key-row .key-container .key-color{display:inline-block;width:16px;height:16px;margin-right:8px}.d3-chart__container .d3-chart__tooltip ul li.key-row .key-container .key-key{margin-right:6px}.d3-chart__container .d3-chart__tooltip ul li.key-row .key-value{font-weight:600}.d3-chart__container .bargrouprect{shape-rendering:crispEdges}.d3-chart__container .grid .tick line{stroke:#e2e4e7;stroke-width:1;shape-rendering:crispEdges}.d3-chart__container .grid .tick:first-child line{stroke:#555d66}.d3-chart__container .grid.with-positive-ticks .tick:last-child line{opacity:0}.d3-chart__container .tick{padding-top:10px;stroke-width:1}.d3-chart__container .y-axis{text-anchor:start}.d3-chart__container .y-axis.ticktext{fill:#555d66}.d3-chart__container .axis-month .tick text,.d3-chart__container .y-axis .tick text{font-size:10px}.d3-chart__container .focus-grid line{stroke:rgba(0,0,0,.1);stroke-width:1px}.d3-chart__container .barfocus{fill:rgba(0,0,0,.1)}.d3-base{background:transparent;overflow-x:auto;overflow-y:hidden;position:relative;width:100%;height:100%}.woocommerce-count{border:1px solid;border-radius:10px;padding:0 8px;font-weight:700}.woocommerce-page .woocommerce-dropdown-button{background-color:#fff;position:relative;border:1px solid #e2e4e7;color:#555d66;border-radius:4px;padding:0 40px 0 0;width:100%}.woocommerce-page .woocommerce-dropdown-button:after{content:"";position:absolute;right:14px;top:50%;transform:translateY(-50%);width:0;height:0;border-color:#555d66 transparent transparent;border-style:solid;border-width:6px 6px 0;transition:transform .2s ease}@media screen and (prefers-reduced-motion:reduce){.woocommerce-page .woocommerce-dropdown-button:after{transition:none}}.woocommerce-page .woocommerce-dropdown-button.is-open:after{transform:translateY(-50%) rotate(180deg)}.woocommerce-page .woocommerce-dropdown-button.is-open,.woocommerce-page .woocommerce-dropdown-button:active,.woocommerce-page .woocommerce-dropdown-button:hover{background-color:#f8f9f9}.woocommerce-page .woocommerce-dropdown-button.is-multi-line .woocommerce-dropdown-button__labels{flex-direction:column}.woocommerce-dropdown-button__labels{text-align:left;padding:8px 12px;min-height:48px;display:flex;align-items:center;width:100%;justify-content:space-around}@media (max-width:400px){.woocommerce-dropdown-button__labels{min-height:46px}}.woocommerce-dropdown-button__labels span{width:100%;text-align:left}.woocommerce-dropdown-button__labels span:last-child{font-size:12px;font-size:.75rem;margin:0}.woocommerce-dropdown-button__labels span:first-child{font-size:13px;font-size:.8125rem;font-weight:600}@media (max-width:400px){.woocommerce-dropdown-button__labels span:last-child{font-size:10px;font-size:.625rem}.woocommerce-dropdown-button__labels span:first-child{font-size:12px;font-size:.75rem}}.woocommerce-ellipsis-menu{text-align:center}.woocommerce-ellipsis-menu__toggle{height:24px;justify-content:center;vertical-align:middle;width:24px}.woocommerce-ellipsis-menu__toggle .dashicon{transform:rotate(90deg)}.woocommerce-ellipsis-menu__popover{text-align:left}.woocommerce-ellipsis-menu__popover:not(.is-mobile):after,.woocommerce-ellipsis-menu__popover:not(.is-mobile):before{margin-left:-16px}.woocommerce-ellipsis-menu__popover .components-popover__content{width:182px;padding:2px}.woocommerce-ellipsis-menu__popover .components-form-toggle.is-checked .components-form-toggle__track{background-color:#95588a}.woocommerce-ellipsis-menu__popover .woocommerce-ellipsis-menu__content{width:100%}.woocommerce-ellipsis-menu__popover .woocommerce-ellipsis-menu__item,.woocommerce-ellipsis-menu__popover .woocommerce-ellipsis-menu__title{padding:4px 12px}.woocommerce-ellipsis-menu__popover .woocommerce-ellipsis-menu__item{cursor:pointer;color:#6c7781}.woocommerce-ellipsis-menu__popover .woocommerce-ellipsis-menu__item:focus{box-shadow:inset 0 0 0 1px #6c7781,inset 0 0 0 2px #fff;outline:2px solid transparent;outline-offset:-2px}.woocommerce-ellipsis-menu__popover .components-base-control__label,.woocommerce-ellipsis-menu__popover .woocommerce-ellipsis-menu__title{color:#23282d;padding-top:8px;padding-bottom:8px;font-size:15px;font-size:.9375rem;margin-bottom:4px}.woocommerce-ellipsis-menu__popover .components-toggle-control .components-base-control__field{margin:4px 0}.woocommerce-ellipsis-menu__popover .components-base-control{margin:0}.woocommerce-empty-content{margin-bottom:16px;text-align:center}.woocommerce-empty-content .woocommerce-empty-content__illustration{max-width:100%}.woocommerce-empty-content .woocommerce-empty-content__actions .components-button+.components-button{margin-left:16px}.woocommerce-filters-advanced{margin:24px 0}.woocommerce-filters-advanced .woocommerce-card__header{padding:8px 16px}.woocommerce-filters-advanced .woocommerce-card__body{padding:0}.woocommerce-filters-advanced .components-select-control__input{height:38px;padding:0;margin:0}.woocommerce-filters-advanced .components-base-control__field{margin-bottom:0}@media (max-width:782px){.woocommerce-filters-advanced{margin:16px 0;border:1px solid #ccd0d4}}@media (max-width:400px){.woocommerce-filters-advanced{margin:12px 0}}.woocommerce-filters-advanced__title-select{width:70px;display:inline-block;margin:0 8px}.woocommerce-filters-advanced__list{margin:0}.woocommerce-filters-advanced__list-item{padding:0 16px 0 0;margin:0;display:-ms-grid;display:grid;-ms-grid-columns:1fr 40px;grid-template-columns:1fr 40px;background-color:#f8f9f9;border-bottom:1px solid #ccd0d4}.woocommerce-filters-advanced__list-item:hover{background-color:#f3f4f5}.woocommerce-filters-advanced__list-item .woocommerce-filters-advanced__line-item:first-child{-ms-grid-column:1;grid-column-start:1;-ms-grid-column-span:1;grid-column-end:2;-ms-grid-row:1;grid-row-start:1;-ms-grid-row-span:1;grid-row-end:2}.woocommerce-filters-advanced__list-item .woocommerce-filters-advanced__line-item:nth-child(2){-ms-grid-column:2;grid-column-start:2;-ms-grid-column-span:1;grid-column-end:3;-ms-grid-row:1;grid-row-start:1;-ms-grid-row-span:1;grid-row-end:2}.woocommerce-filters-advanced__list-item fieldset{padding:8px 8px 8px 16px}.woocommerce-filters-advanced__list-item .woocommerce-filters-advanced__remove{width:40px;height:38px;-ms-grid-row-align:center;align-self:center}@media (max-width:400px){.woocommerce-filters-advanced__list-item .woocommerce-filters-advanced__remove{position:absolute;top:0;right:4px}}.woocommerce-filters-advanced__list-item .components-form-token-field{border-radius:4px}@media (max-width:400px){.woocommerce-filters-advanced__list-item{display:block;position:relative;padding:8px 8px 0 0}}.woocommerce-filters-advanced__add-filter{padding:12px;margin:0;color:#95588a;display:block;background-color:#f8f9f9;border-bottom:1px solid #ccd0d4}.woocommerce-filters-advanced__add-filter:hover{background-color:#f3f4f5}.woocommerce-filters-advanced__add-filter div div{display:inline-block}.woocommerce-filters-advanced__add-filter .components-popover:not(.is-mobile) .components-popover__content{min-width:180px}.woocommerce-filters-advanced__fieldset{display:flex;align-items:center}.woocommerce-filters-advanced__fieldset>div{padding:0 4px}@media (max-width:782px){.woocommerce-filters-advanced__fieldset>div{width:100%;padding:4px 0}}@media (max-width:782px){.woocommerce-filters-advanced__fieldset{display:block}}.woocommerce-filters-advanced__fieldset.is-english{display:-ms-grid;display:grid;-ms-grid-columns:100px 150px 1fr;grid-template-columns:100px 150px 1fr}.woocommerce-filters-advanced__fieldset.is-english .woocommerce-filters-advanced__fieldset-item:first-child{-ms-grid-column:1;grid-column-start:1;-ms-grid-column-span:1;grid-column-end:2;-ms-grid-row:1;grid-row-start:1;-ms-grid-row-span:1;grid-row-end:2}.woocommerce-filters-advanced__fieldset.is-english .woocommerce-filters-advanced__fieldset-item:nth-child(2){-ms-grid-column:2;grid-column-start:2;-ms-grid-column-span:1;grid-column-end:3;-ms-grid-row:1;grid-row-start:1;-ms-grid-row-span:1;grid-row-end:2}.woocommerce-filters-advanced__fieldset.is-english .woocommerce-filters-advanced__fieldset-item:nth-child(3){-ms-grid-column:3;grid-column-start:3;-ms-grid-column-span:1;grid-column-end:4;-ms-grid-row:1;grid-row-start:1;-ms-grid-row-span:1;grid-row-end:2}.woocommerce-filters-advanced__fieldset.is-english .woocommerce-filters-advanced__fieldset-item:first-child{display:flex;align-items:center}@media (max-width:782px){.woocommerce-filters-advanced__fieldset.is-english{display:block}}.woocommerce-filters-advanced__rule{width:150px}.woocommerce-filters-advanced__input{width:100%}.woocommerce-filters-advanced__add-filter-dropdown{display:inline-block}.woocommerce-filters-advanced__add-button{color:inherit;padding:8px}.woocommerce-filters-advanced__add-button svg{fill:currentColor;margin:0 6px 0 0}.woocommerce-filters-advanced__add-button.components-icon-button:not(:disabled):not([aria-disabled=true]):not(.is-default):hover{color:#c88bbd}.woocommerce-filters-advanced__add-button:not(:disabled):not([aria-disabled=true]):focus{color:#95588a;background-color:transparent}.woocommerce-filters-advanced__controls{padding:8px 16px;display:flex;align-items:center}.woocommerce-filters-advanced__controls .components-button{margin-right:16px}.woocommerce-filters-advanced__add-dropdown{padding:8px 0}.woocommerce-filters-advanced__add-dropdown li{margin:0}.woocommerce-filters-advanced__add-dropdown .components-button{width:100%;padding:8px}.woocommerce-filters-advanced__add-dropdown .components-button:hover{background-color:#f3f4f5}.woocommerce-filters-advanced__add-dropdown .components-button:not(:disabled):not([aria-disabled=true]):focus{background-color:#edeff0;box-shadow:none}.woocommerce-filters-advanced__input-range{align-items:center;display:-ms-grid;display:grid;-ms-grid-columns:1fr;grid-template-columns:1fr}.woocommerce-filters-advanced__input-range.is-between{-ms-grid-columns:1fr 36px 1fr;grid-template-columns:1fr 36px 1fr}.woocommerce-filters-advanced__input-range input{height:38px;margin:0}.woocommerce-filters-advanced__input-range .separator{text-align:center}.woocommerce-filters-date__content.is-mobile .components-popover__header{border:none;height:0}.woocommerce-filters-date__content.is-mobile .components-popover__close{transform:translateY(22px)}.woocommerce-filters-date__content.is-mobile .components-tab-panel__tab-content{height:calc(100% - 46px);overflow:auto}.woocommerce-filters-date__tabs{height:calc(100% - 42px)}.woocommerce-filters-date__tabs .components-tab-panel__tabs{display:-ms-grid;display:grid;-ms-grid-columns:1fr 1fr;grid-template-columns:1fr 1fr;border-radius:5px;margin:0 1em 1em}.woocommerce-filters-date__tabs .components-tab-panel__tab-content{display:flex;flex-direction:column;align-items:center}.woocommerce-filters-date__tab:first-child{-ms-grid-column:1;grid-column-start:1;-ms-grid-column-span:1;grid-column-end:2;-ms-grid-row:1;grid-row-start:1;-ms-grid-row-span:1;grid-row-end:2}.woocommerce-filters-date__tab:nth-child(2){-ms-grid-column:2;grid-column-start:2;-ms-grid-column-span:1;grid-column-end:3;-ms-grid-row:1;grid-row-start:1;-ms-grid-row-span:1;grid-row-end:2}button.woocommerce-filters-date__tab{outline:none;border:1px solid #95588a;padding:8px;margin:0;border-radius:4px 0 0 4px;color:#95588a;background-color:transparent;justify-content:center}button.woocommerce-filters-date__tab:hover{background-color:#f8f4f7;cursor:pointer}button.woocommerce-filters-date__tab:last-child{border-radius:0 4px 4px 0}button.woocommerce-filters-date__tab.is-active,button.woocommerce-filters-date__tab.is-active:focus{background-color:#95588a;color:#fff}button.woocommerce-filters-date__tab:focus{box-shadow:inset 0 -1px 0 #00435d,0 0 0 2px #bfe7f3}.woocommerce-filters-date__text{font-size:12px;font-size:.75rem;font-weight:100;text-transform:uppercase;text-align:center;color:#6c7781;width:100%;margin:0;padding:1em;background-color:#fff}.woocommerce-filters-date__content-controls{display:flex;flex-direction:column;width:100%;align-items:center;padding-bottom:1em;background-color:#fff}.woocommerce-filters-date__content-controls.is-custom{border-top:1px solid #ccd0d4}.woocommerce-filters-date__button-group{padding-top:1em;display:flex;justify-content:center;width:100%}.woocommerce-filters-date__button-group .woocommerce-filters-date__button.is-button{justify-content:center;width:40%;height:34px;margin:0 12px}.woocommerce-filters-filter__content.is-mobile .components-popover__header-title{font-size:12px;font-size:.75rem;font-weight:100;text-transform:uppercase;text-align:center;color:#555d66}.woocommerce-filters-filter__content.is-mobile .woocommerce-filters-filter__content-list-item:last-child{border-bottom:1px solid #ccd0d4}.woocommerce-filters-filter__content-list{margin:0;width:100%;min-width:100%}.woocommerce-filters-filter__content-list-item{border-bottom:1px solid #ccd0d4;margin:0}.woocommerce-filters-filter__content-list-item:last-child{border-bottom:none}.woocommerce-filters-filter__content-list-item.is-selected .woocommerce-filters-filter__button,.woocommerce-filters-filter__content-list-item.is-selected .woocommerce-filters-filter__button.components-button:not(:disabled):not([aria-disabled=true]):focus{background-color:#fff}.woocommerce-filters-filter__content-list-item.is-selected .woocommerce-filters-filter__button:before{content:"";width:8px;height:8px;background-color:#95588a;position:absolute;top:50%;left:1em;transform:translate(50%,-50%)}.woocommerce-filters-filter__content-list-item .woocommerce-filters-filter__button{position:relative;display:block;width:100%;padding:1em 1em 1em 3em;background-color:#f8f9f9;text-align:left}.woocommerce-filters-filter__content-list-item .woocommerce-filters-filter__button.components-button{color:#555d66}.woocommerce-filters-filter__content-list-item .woocommerce-filters-filter__button:hover{background-color:#f3f4f5;color:#555d66}.woocommerce-filters-filter__content-list-item .woocommerce-filters-filter__button.components-button:not(:disabled):not([aria-disabled=true]):focus{background-color:#f8f9f9}.woocommerce-filters-filter__content-list-item .woocommerce-filters-filter__button .dashicon{position:absolute;left:1em;top:50%;transform:translateY(-50%)}.woocommerce-filters .components-base-control__field{margin-bottom:0}@media (max-width:400px){.woocommerce-filters{margin-left:-8px;margin-right:-8px}}.woocommerce-filters__basic-filters{display:flex;margin-bottom:24px}@media (max-width:1280px){.woocommerce-filters__basic-filters{flex-direction:column}}@media (max-width:782px){.woocommerce-filters__basic-filters{margin-bottom:16px}}.woocommerce-filters-filter{width:25%;padding:0 12px;min-height:82px;display:flex;flex-direction:column;justify-content:flex-end}.woocommerce-filters-filter:first-child{padding-left:0}.woocommerce-filters-filter:last-child{padding-right:0}@media (max-width:1440px){.woocommerce-filters-filter{width:33.3%}}@media (max-width:1280px){.woocommerce-filters-filter{width:50%;padding:0;min-height:78px}}@media (max-width:782px){.woocommerce-filters-filter{width:100%}}.woocommerce-filters-label{margin:7px 0;display:block}@media (max-width:1280px){.woocommerce-filters-label{margin:5px 0}}.woocommerce-filters-date__content .components-popover__content,.woocommerce-filters-filter__content .components-popover__content{width:320px;border:1px solid #ccd0d4;background-color:#fff}.woocommerce-filters-date__content .woocommerce-calendar__input-error .components-popover__content,.woocommerce-filters-filter__content .woocommerce-calendar__input-error .components-popover__content{background-color:#606a73}.woocommerce-filters-date__content.is-mobile .components-popover__content,.woocommerce-filters-filter__content.is-mobile .components-popover__content{width:100%;height:100%;border:none}.woocommerce-filters__compare .woocommerce-card__body{padding:0}.woocommerce-filters__compare-body{padding:16px;background-color:#f8f9f9;border-bottom:1px solid #e2e4e7}.woocommerce-filters__compare-footer{padding:16px;display:flex;align-items:center}.woocommerce-filters__compare-footer .components-button{margin-right:16px}.woocommerce-filters-filter__search .woocommerce-search__autocomplete-results{position:static}.woocommerce-filters-filter__search .woocommerce-search__inline-container{overflow:hidden}.woocommerce-filters-filter__search .woocommerce-search__inline-container:not(.is-active){border:none}.woocommerce-filters-advanced__list-item .components-base-control+.components-base-control{margin-bottom:0}.woocommerce-flag span{vertical-align:middle}.woocommerce-flag .woocommerce-flag__fallback{background:#e2e4e7;color:transparent;width:24px;height:18px;display:block;overflow:hidden}.woocommerce-gravatar{border-radius:50%}.woocommerce-list__item{padding:16px;display:flex;align-items:center;margin-bottom:0}.woocommerce-list__item.has-action{cursor:pointer}.woocommerce-list__item .woocommerce-list__item-title{display:block;font-size:16px;line-height:22px;color:#1a1a1a}.woocommerce-list__item .woocommerce-list__item-description{margin-top:4px;display:block;font-size:14px;line-height:20px;color:#50575d}.woocommerce-list__item .woocommerce-list__item-before{margin-right:20px;display:flex;align-items:center}.woocommerce-list__item .woocommerce-list__item-after{display:flex;align-items:center;margin-left:auto}.woocommerce-order-status{display:flex;align-items:center}.woocommerce-order-status__indicator{min-width:16px;width:16px;height:16px;display:block;background:#ccd0d4;margin-right:8px;border-radius:50%;border:3px solid #e2e4e7}.woocommerce-order-status__indicator.is-processing{background:#4ab866;border-color:#93d5a4}.woocommerce-order-status__indicator.is-on-hold{background:#ffb900;border-color:#ffd566}.woocommerce-pagination{display:flex;flex-direction:row;flex-wrap:nowrap;justify-content:center;align-items:center}@media (max-width:782px){.woocommerce-pagination{flex-direction:column}}.woocommerce-pagination input{border-radius:4px}.woocommerce-pagination__page-arrows{display:flex;flex-direction:row}.woocommerce-pagination__page-arrows-buttons{display:inline-flex;align-items:baseline;border:solid #b5bfc9;border-width:1px 1px 2px;border-radius:4px;background:#f0f2f4}.woocommerce-pagination__page-arrows-buttons .components-button:not(:disabled):not([aria-disabled=true]){color:#24292d;height:30px;width:32px;justify-content:center}.woocommerce-pagination__page-arrows-buttons .components-icon-button:not(:disabled):not([aria-disabled=true]):hover{color:#6c7781}.woocommerce-pagination__page-arrows-buttons button:first-child{border-right:2px solid #d3d9de}.woocommerce-pagination__page-arrows-buttons .woocommerce-pagination__link{padding:4px}.woocommerce-pagination__page-arrows-label{margin-top:8px;margin-right:8px}.woocommerce-pagination__page-picker{margin-left:16px}@media (max-width:782px){.woocommerce-pagination__page-picker{margin-top:16px;margin-left:0}}.woocommerce-pagination__page-picker .woocommerce-pagination__page-picker-input{margin-left:8px;width:60px;height:34px;box-shadow:none}.woocommerce-pagination__per-page-picker{margin-left:16px}@media (max-width:782px){.woocommerce-pagination__per-page-picker{margin-top:16px;margin-left:0}}.woocommerce-pagination__per-page-picker .components-base-control{margin-bottom:0}.woocommerce-pagination__per-page-picker .components-base-control__field{display:flex;flex-direction:row;align-items:baseline;margin-bottom:0}.woocommerce-pagination__per-page-picker .components-select-control__input{width:60px;height:34px;box-shadow:none}.woocommerce-pagination__per-page-picker .components-base-control__label{margin-right:8px}.woocommerce-pagination__page-picker-input.has-error,.woocommerce-pagination__page-picker-input.has-error:focus{border-color:#d94f4f;box-shadow:0 0 2px #d94f4f}.woocommerce-product-image{border-radius:50%}.woocommerce-rating{position:relative;vertical-align:middle;display:inline-block;overflow:hidden;white-space:nowrap}.woocommerce-rating .gridicon{fill:#d7dade}.woocommerce-rating .woocommerce-rating__star-outline{position:absolute;left:0;top:0;white-space:nowrap;overflow:hidden}.woocommerce-rating .woocommerce-rating__star-outline .gridicon{fill:#555d66}.woocommerce-search{position:relative;min-width:0}.woocommerce-search>div{min-width:0}.woocommerce-search .woocommerce-search__icon{position:absolute;top:10px;left:10px;fill:#a2aab2}.woocommerce-search .woocommerce-tag{max-width:100%}.woocommerce-search .woocommerce-tag .woocommerce-tag__text{max-width:calc(100% - 24px)}.woocommerce-search:not(.has-inline-tags) .woocommerce-tag{margin:8px 6px 0 0}.woocommerce-search.has-inline-tags .woocommerce-search__icon{top:50%;transform:translateY(-50%)}.woocommerce-search .woocommerce-search__inline-container{width:100%;padding:4px 2px 4px 36px;border:1px solid #ccd0d4;background-color:#fff;display:flex;align-items:center;position:relative}.woocommerce-search .woocommerce-search__inline-container.is-active{border-color:#00a0d2;box-shadow:inset 0 0 0 #00435d,0 0 1px 2px #bfe7f3}.woocommerce-search .woocommerce-search__inline-container.has-tags{padding-right:36px}.woocommerce-search .woocommerce-search__inline-container .woocommerce-search__token-list{max-width:100%;display:inline-block;padding:1px 0}.woocommerce-search .woocommerce-search__inline-input,.woocommerce-search .woocommerce-search__inline-input:focus{border:none;outline:none;box-shadow:none;padding:2px 0;line-height:20px;max-width:100%;min-width:70px;font-size:inherit;vertical-align:middle}.woocommerce-search .woocommerce-search__inline-input:focus[type=number]::-webkit-inner-spin-button,.woocommerce-search .woocommerce-search__inline-input:focus[type=number]::-webkit-outer-spin-button,.woocommerce-search .woocommerce-search__inline-input[type=number]::-webkit-inner-spin-button,.woocommerce-search .woocommerce-search__inline-input[type=number]::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}.woocommerce-search .woocommerce-search__input{width:100%;padding:8px 12px 8px 36px;border:1px solid #ccd0d4}.woocommerce-search .woocommerce-search__autocomplete-results{display:flex;flex-direction:column;align-items:stretch;border:1px solid #ccd0d4;position:absolute;left:0;right:0;z-index:10}.woocommerce-search .woocommerce-search__autocomplete-results:empty{display:none}.woocommerce-search .woocommerce-search__autocomplete-results.is-static-results{position:static}.woocommerce-search .woocommerce-search__autocomplete-result{margin-bottom:0;display:flex;flex-direction:row;flex-grow:1;flex-shrink:0;align-items:center;padding:12px;color:#95588a;text-align:left;background:#f8f9f9;border-bottom:1px solid #e2e4e7}.woocommerce-search .woocommerce-search__autocomplete-result:last-of-type{border-bottom:none}.woocommerce-search .woocommerce-search__autocomplete-result:hover{box-shadow:none;color:#95588a;background:#f3f4f5}.woocommerce-search .woocommerce-search__autocomplete-result.is-selected,.woocommerce-search .woocommerce-search__autocomplete-result:active,.woocommerce-search .woocommerce-search__autocomplete-result:focus{color:#95588a;background:#fff;box-shadow:inset 0 0 0 1px #f3f4f5,inset 0 0 0 2px #24292d}.woocommerce-search .woocommerce-search__autocomplete-result .woocommerce-search__result-thumbnail{margin-right:12px}.woocommerce-search__result-name{text-decoration:underline}.woocommerce-search__clear{position:absolute;right:10px;top:calc(50% - 10px)}.woocommerce-search__clear>.dashicon{color:#c9c9c9}.woocommerce-search-list{width:100%;padding:0 0 16px;text-align:left}.woocommerce-search-list__selected{margin:16px 0;padding:16px 0 0;min-height:76px;border-top:1px solid #e2e4e7}.woocommerce-search-list__selected .woocommerce-search-list__selected-header{margin-bottom:8px}.woocommerce-search-list__selected .woocommerce-search-list__selected-header button{margin-left:12px}.woocommerce-search-list__selected .woocommerce-tag__text{max-width:13em}.woocommerce-search-list__search{margin:16px 0;padding:16px 0 0;border-top:1px solid #e2e4e7}.woocommerce-search-list__search .components-base-control__field{margin-bottom:16px}.woocommerce-search-list__list{padding:0;max-height:17em;overflow-x:hidden;overflow-y:auto;border-top:1px solid #e2e4e7;border-bottom:1px solid #e2e4e7}.woocommerce-search-list__list.is-loading,.woocommerce-search-list__list.is-not-found{padding:12px 0;text-align:center;border:none}.woocommerce-search-list__list.is-not-found .woocommerce-search-list__not-found-icon,.woocommerce-search-list__list.is-not-found .woocommerce-search-list__not-found-text{display:inline-block}.woocommerce-search-list__list.is-not-found .woocommerce-search-list__not-found-icon{margin-right:16px}.woocommerce-search-list__list.is-not-found .woocommerce-search-list__not-found-icon .gridicon{vertical-align:top;margin-top:-1px}.woocommerce-search-list__list .components-spinner{float:none;margin:0 auto}.woocommerce-search-list__list .components-menu-group__label{clip:rect(1px,1px,1px,1px);-webkit-clip-path:inset(50%);clip-path:inset(50%);height:1px;width:1px;margin:-1px;overflow:hidden;overflow-wrap:normal!important;word-wrap:normal!important}.woocommerce-search-list__list>[role=menu]{border:1px solid #e2e4e7;border-bottom:none}.woocommerce-search-list__list .woocommerce-search-list__item{display:flex;align-items:center;margin-bottom:0;padding:12px 16px;background:#fff;border-bottom:1px solid #e2e4e7!important;color:#555d66}.woocommerce-search-list__list .woocommerce-search-list__item:active,.woocommerce-search-list__list .woocommerce-search-list__item:focus,.woocommerce-search-list__list .woocommerce-search-list__item:hover{background:#f8f9f9}.woocommerce-search-list__list .woocommerce-search-list__item:last-child{border-bottom:none!important}.woocommerce-search-list__list .woocommerce-search-list__item .woocommerce-search-list__item-state{flex:0 0 16px;margin-right:8px;height:24px}.woocommerce-search-list__list .woocommerce-search-list__item .woocommerce-search-list__item-label{display:flex;flex:1}.woocommerce-search-list__list .woocommerce-search-list__item.depth-0+.depth-1{margin-top:-1px}.woocommerce-search-list__list .woocommerce-search-list__item:not(.depth-0){border-bottom:0!important}.woocommerce-search-list__list .woocommerce-search-list__item:not(.depth-0)+.depth-0{border-top:1px solid #e2e4e7}.woocommerce-search-list__list .woocommerce-search-list__item[class*=depth-] .woocommerce-search-list__item-label:before{margin-right:4px;content:"— — — — — "}.woocommerce-search-list__list .woocommerce-search-list__item.depth-0 .woocommerce-search-list__item-label:before{margin-right:0;content:""}.woocommerce-search-list__list .woocommerce-search-list__item.depth-1 .woocommerce-search-list__item-label:before{content:"— "}.woocommerce-search-list__list .woocommerce-search-list__item.depth-2 .woocommerce-search-list__item-label:before{content:"— — "}.woocommerce-search-list__list .woocommerce-search-list__item.depth-3 .woocommerce-search-list__item-label:before{content:"— — — "}.woocommerce-search-list__list .woocommerce-search-list__item.depth-4 .woocommerce-search-list__item-label:before{content:"— — — — "}.woocommerce-search-list__list .woocommerce-search-list__item .woocommerce-search-list__item-name{display:inline-block}.woocommerce-search-list__list .woocommerce-search-list__item .woocommerce-search-list__item-prefix{display:none;color:#6c7781}.woocommerce-search-list__list .woocommerce-search-list__item.is-searching .woocommerce-search-list__item-label,.woocommerce-search-list__list .woocommerce-search-list__item.is-skip-level .woocommerce-search-list__item-label{display:inline-block}.woocommerce-search-list__list .woocommerce-search-list__item.is-searching .woocommerce-search-list__item-prefix,.woocommerce-search-list__list .woocommerce-search-list__item.is-skip-level .woocommerce-search-list__item-prefix{display:inline}.woocommerce-search-list__list .woocommerce-search-list__item.is-searching .woocommerce-search-list__item-prefix:after,.woocommerce-search-list__list .woocommerce-search-list__item.is-skip-level .woocommerce-search-list__item-prefix:after{margin-right:4px;content:" ›"}.woocommerce-search-list__list .woocommerce-search-list__item.is-searching .woocommerce-search-list__item-name{color:#191e23}.woocommerce-search-list__list .woocommerce-search-list__item .woocommerce-search-list__item-count{flex:0 1 auto;padding:2px 8px;border:1px solid #e2e4e7;border-radius:12px;font-size:.8em;line-height:1.4;color:#6c7781;background:#fff;white-space:nowrap}.components-panel .woocommerce-search-list{padding:0}.components-panel .woocommerce-search-list__selected{margin:0 0 16px;padding:0;border-top:none;min-height:54px}.components-panel .woocommerce-search-list__search{margin:0 0 16px;padding:0;border-top:none}.woocommerce-section-header{padding:13px;border-bottom:none;display:flex;justify-content:space-between}@media (max-width:782px){.woocommerce-section-header{margin-left:-16px;margin-right:-16px;margin-bottom:12px;border-left:none;border-right:none;width:auto}}.woocommerce-section-header hr{-ms-grid-row-align:center;align-self:center;flex-grow:1;height:1px;margin:0 10px}@media (max-width:782px){.woocommerce-section-header.has-interval-select{position:relative;padding-bottom:30px}.woocommerce-section-header.has-interval-select .woocommerce-chart__interval-select{position:absolute;left:0;bottom:0;padding-left:6px}}.woocommerce-section-header__actions,.woocommerce-section-header__menu{text-align:right}.woocommerce-section-header__actions{display:flex;flex-grow:1;justify-content:flex-end;align-items:center}.woocommerce-section-header__actions .components-base-control{padding-top:0;min-height:34px}.woocommerce-section-header__actions .components-base-control__field{margin-bottom:0}.woocommerce-section-header__actions .components-base-control__field select{background:transparent}.woocommerce-ellipsis-menu__toggle{padding:0}.woocommerce-section-header__menu{display:flex;flex-direction:column;justify-content:center}.woocommerce-section-header__title{margin:0 16px 0 0;padding:3px 0;font-size:18px;font-size:1.125rem;line-height:2.2;font-weight:600}.woocommerce-segmented-selection{width:100%;color:#555d66}.woocommerce-segmented-selection__container{width:100%;-ms-grid-columns:1fr 1fr;grid-template-columns:1fr 1fr;display:-ms-grid;display:grid;border-top:1px solid #ccd0d4;border-bottom:1px solid #ccd0d4;background-color:#ccd0d4}.woocommerce-segmented-selection__item:nth-child(2n){border-left:1px solid #ccd0d4;border-top:1px solid #ccd0d4}.woocommerce-segmented-selection__item:nth-child(odd){border-top:1px solid #ccd0d4}.woocommerce-segmented-selection__item:nth-child(-n+2){border-top:0}.woocommerce-segmented-selection__label{background-color:#f8f9f9;padding:12px 12px 12px 36px;position:relative;display:block;height:100%}.woocommerce-segmented-selection__label:active,.woocommerce-segmented-selection__label:hover{background-color:#f3f4f5}.woocommerce-segmented-selection__input{opacity:0;position:absolute;left:-9999px}.woocommerce-segmented-selection__input:active+label .woocommerce-segmented-selection__label{background-color:#f3f4f5}.woocommerce-segmented-selection__input:checked+label .woocommerce-segmented-selection__label{background-color:#fff;font-weight:600}.woocommerce-segmented-selection__input:checked+label .woocommerce-segmented-selection__label:before{content:"";width:8px;height:8px;background-color:#95588a;position:absolute;top:50%;transform:translate(-20px,-50%)}.woocommerce-segmented-selection__input:focus+label .woocommerce-segmented-selection__label{box-shadow:inset 0 0 0 1px #24292d}.woocommerce-simple-select-control__dropdown{position:relative;width:100%;height:56px;border:1px solid #b0b5b8;box-shadow:none;box-sizing:border-box;border-radius:3px;background:#fff;font-size:16px;line-height:54px;font-weight:400;margin-top:16px;margin-bottom:16px}.woocommerce-simple-select-control__dropdown .woocommerce-simple-select-control__selector.components-button{border:0;background:transparent;box-shadow:none;justify-content:unset;margin-left:0;position:absolute;top:0;height:100%;width:100%;left:0;padding-left:16px;padding-right:40px}.woocommerce-simple-select-control__dropdown .woocommerce-simple-select-control__selector.components-button:focus:not(:disabled){box-shadow:none;outline:none;background-color:transparent;outline-offset:0}.woocommerce-simple-select-control__dropdown .woocommerce-simple-select-control__selector.components-button:after{display:block;pointer-events:none;position:absolute;float:right;line-height:56px;font-family:dashicons,sans-serif;font-size:20px;content:"\f140";z-index:101;height:24px;width:24px;margin-top:0;top:0;right:16px;bottom:16px;color:#000}.woocommerce-simple-select-control__dropdown .woocommerce-simple-select-control__dropdown-content.components-popover.is-bottom{margin-top:-80px;z-index:999}.woocommerce-simple-select-control__dropdown .woocommerce-simple-select-control__dropdown-content.components-popover.is-bottom:after,.woocommerce-simple-select-control__dropdown .woocommerce-simple-select-control__dropdown-content.components-popover.is-bottom:before{display:none}.woocommerce-simple-select-control__dropdown .woocommerce-simple-select-control__dropdown-content .components-button{display:block;position:relative;padding:10px 20px 10px 40px;width:100%;text-align:left}.woocommerce-simple-select-control__dropdown .woocommerce-simple-select-control__dropdown-content .components-button.is-selected{background:#ccced0}.woocommerce-simple-select-control__dropdown.is-empty .woocommerce-simple-select-control__selector.components-button{font-size:16px;line-height:54px;height:54px;z-index:100;color:#636d75}.woocommerce-simple-select-control__dropdown.is-active{box-shadow:0 0 0 2px #673d99;border-color:transparent}.woocommerce-simple-select-control__dropdown.has-value .woocommerce-simple-select-control__selector{display:flex;flex-direction:column}.woocommerce-simple-select-control__dropdown.has-value .woocommerce-simple-select-control__selector.components-button:after{bottom:23px}.woocommerce-simple-select-control__dropdown.has-value .woocommerce-simple-select-control__label{font-size:12px;line-height:16px;margin-top:8px;color:#636d75}.woocommerce-simple-select-control__dropdown.has-value .woocommerce-simple-select-control__value{color:#2b2d2f;font-size:16px;white-space:nowrap}.woocommerce-split-button{display:flex;align-items:center;padding:4px 0}.woocommerce-split-button .woocommerce-split-button__menu{padding:0}.woocommerce-split-button .woocommerce-split-button__main-action,.woocommerce-split-button .woocommerce-split-button__menu-toggle{line-height:26px;height:42px;border-radius:3px;white-space:nowrap;color:#555d66;border:1px solid #b5bcc2;background:#f3f4f5;box-shadow:inset 0 -1px 0 #b5bcc2;vertical-align:top}.woocommerce-split-button .woocommerce-split-button__main-action{padding:0 12px;border-top-right-radius:0;border-bottom-right-radius:0;border-right:0;height:32px}.woocommerce-split-button .woocommerce-split-button__menu-toggle{border-top-left-radius:0;border-bottom-left-radius:0;padding:4px;height:32px;width:32px}.woocommerce-split-button .woocommerce-split-button__menu-popover.is-mobile{top:46px}.woocommerce-split-button .woocommerce-split-button__main-action.components-button:not(:disabled):not([aria-disabled=true]):not(.is-default):hover,.woocommerce-split-button .woocommerce-split-button__menu-toggle.components-icon-button:not(:disabled):not([aria-disabled=true]):not(.is-default):hover{background-color:#fafafa;border-color:#78848f;box-shadow:inset 0 -1px 0 #b5bcc2}.woocommerce-split-button .woocommerce-split-button__main-action.components-button:not(:disabled):not([aria-disabled=true]):not(.is-default):focus,.woocommerce-split-button .woocommerce-split-button__menu-toggle.components-icon-button:not(:disabled):not([aria-disabled=true]):not(.is-default):focus{background-color:#fafafa;border:1px solid #555d66;box-shadow:inset 0 -1px 0 #6c7781,0 0 0 2px #bfe7f3}.woocommerce-split-button .woocommerce-split-button__main-action.components-button .dashicon,.woocommerce-split-button .woocommerce-split-button__main-action.components-button .gridicon{width:18px;height:18px}.woocommerce-split-button.has-label .woocommerce-split-button__main-action.components-button .dashicon,.woocommerce-split-button.has-label .woocommerce-split-button__main-action.components-button .gridicon{margin-right:8px}.woocommerce-split-button .woocommerce-split-button__menu-wrapper{width:100%;padding:4px}.woocommerce-split-button .woocommerce-split-button__menu-wrapper .components-button,.woocommerce-split-button .woocommerce-split-button__menu-wrapper .components-icon-button{color:#555d66;margin-top:4px;margin-bottom:4px}.woocommerce-split-button .woocommerce-split-button__menu-wrapper .components-button:not(:disabled):not([aria-disabled=true]):not(.is-default):hover{background-color:#fff;color:#24292d;box-shadow:inset 0 0 0 1px #e2e4e7,inset 0 0 0 2px #fff,0 1px 1px rgba(25,30,35,.2)}.woocommerce-split-button .woocommerce-split-button__menu-item{width:100%;padding:4px;border-radius:0;outline:none;cursor:pointer}.woocommerce-split-button .woocommerce-split-button__menu-item .dashicon{margin-right:8px}.woocommerce-split-button .dashicons-arrow-down{fill:#555d66;height:20px;width:20px}.woocommerce-split-button .woocommerce-split-button__menu-toggle.is-active,.woocommerce-split-button .woocommerce-split-button__menu-toggle.is-active:hover,.woocommerce-split-button .woocommerce-split-button__menu-toggle.is-active:hover>svg,.woocommerce-split-button .woocommerce-split-button__menu-toggle.is-active>svg{background:initial}.woocommerce-split-button .woocommerce-split-button__menu-toggle.is-active,.woocommerce-split-button .woocommerce-split-button__menu-toggle.is-active:hover{border-color:#b5bcc2}.woocommerce-split-button.is-primary .woocommerce-split-button__main-action,.woocommerce-split-button.is-primary .woocommerce-split-button__menu-toggle{background:#95588a;color:#fff;border-color:#7c3f71;box-shadow:inset 0 -1px 0 #7c3f71}.woocommerce-split-button.is-primary .woocommerce-split-button__main-action.components-button:not(:disabled):not([aria-disabled=true]):not(.is-default):hover,.woocommerce-split-button.is-primary .woocommerce-split-button__menu-toggle.components-icon-button:not(:disabled):not([aria-disabled=true]):not(.is-default):hover{color:#fff;background-color:#7c3f71;border-color:#622557;box-shadow:inset 0 -1px 0 #622557}.woocommerce-split-button.is-primary .woocommerce-split-button__main-action.components-button:not(:disabled):not([aria-disabled=true]):not(.is-default):focus,.woocommerce-split-button.is-primary .woocommerce-split-button__menu-toggle.components-icon-button:not(:disabled):not([aria-disabled=true]):not(.is-default):focus{color:#fff;background-color:#7c3f71;box-shadow:inset 0 -1px 0 #622557,0 0 0 2px #ffd7ff;border:1px solid #622557}.woocommerce-split-button.is-primary .dashicons-arrow-down{fill:#fff}.woocommerce-stepper .woocommerce-stepper__steps{display:flex;justify-content:space-around;margin-bottom:24px}.woocommerce-stepper .woocommerce-stepper__step{display:inline-flex;padding:8px;font-weight:400;position:relative}.woocommerce-stepper .woocommerce-stepper__step .woocommerce-stepper__step-label{color:#1a1a1a;line-height:24px;font-size:16px}.woocommerce-stepper .woocommerce-stepper__step .woocommerce-stepper__step-description{display:none;font-size:14px;color:#636d75;font-weight:400;margin-top:2px}.woocommerce-stepper .woocommerce-stepper__step svg{display:none}.woocommerce-stepper .woocommerce-stepper__step .woocommerce-spinner{display:block;margin-right:12px;max-height:24px;min-width:auto;width:24px;border-radius:50%;background:#005fb7}.woocommerce-stepper .woocommerce-stepper__step .woocommerce-spinner__circle{stroke:#fff}.woocommerce-stepper .woocommerce-stepper__step.is-active .woocommerce-stepper__step-icon,.woocommerce-stepper .woocommerce-stepper__step.is-complete .woocommerce-stepper__step-icon{background:#005fb7;color:#fff}.woocommerce-stepper .woocommerce-stepper__step.is-active .woocommerce-stepper__step-icon{font-weight:600}.woocommerce-stepper .woocommerce-stepper__step.is-active .woocommerce-stepper__step-label{font-weight:600;margin:0}.woocommerce-stepper .woocommerce-stepper__step.is-complete .woocommerce-stepper__step-number{display:none}.woocommerce-stepper .woocommerce-stepper__step.is-complete svg{display:inline}.woocommerce-stepper .woocommerce-stepper__step-icon{font-size:16px;display:inline-flex;align-items:center;justify-content:center;width:24px;height:24px;min-width:24px;margin-right:12px;background:#e1e2e2;color:#50575d;border-radius:50%}.woocommerce-stepper .woocommerce-stepper__step-divider{align-self:flex-start;flex-grow:1;border-bottom:1px solid #e1e2e2;margin-top:20px}.woocommerce-stepper .woocommerce-stepper__step-divider:last-child{display:none}@media (max-width:782px){.woocommerce-stepper .woocommerce-stepper__step-label{display:none;padding-top:24px}.woocommerce-stepper .woocommerce-stepper__step-icon{margin-right:0}}.woocommerce-stepper.is-vertical .woocommerce-stepper__steps{align-items:normal;flex-direction:column}.woocommerce-stepper.is-vertical .woocommerce-stepper__step{min-height:90px}.woocommerce-stepper.is-vertical .woocommerce-stepper__step:after{content:"";position:absolute;left:20px;top:40px;height:calc(100% - 40px);border-left:1px solid #e1e2e2}.woocommerce-stepper.is-vertical .woocommerce-stepper__step:last-child{min-height:auto}.woocommerce-stepper.is-vertical .woocommerce-stepper__step:last-child:after{display:none}.woocommerce-stepper.is-vertical .woocommerce-stepper__step-label{display:initial}.woocommerce-stepper.is-vertical .woocommerce-stepper__step-icon{margin-right:12px}.woocommerce-stepper.is-vertical .woocommerce-stepper__step-description{display:block}.woocommerce-stepper.is-vertical .woocommerce-stepper_content{margin-top:8px}@-webkit-keyframes rotate{0%{transform:rotate(0deg)}to{transform:rotate(270deg)}}@keyframes rotate{0%{transform:rotate(0deg)}to{transform:rotate(270deg)}}@-webkit-keyframes growAndShrink{0%,to{stroke-dashoffset:200}50%{stroke-dashoffset:50;transform:rotate(135deg)}to{transform:rotate(450deg)}}@keyframes growAndShrink{0%,to{stroke-dashoffset:200}50%{stroke-dashoffset:50;transform:rotate(135deg)}to{transform:rotate(450deg)}}.woocommerce-spinner{-webkit-animation:rotate 2s linear infinite;animation:rotate 2s linear infinite;width:40px;min-width:40px;height:40px;max-height:40px}.woocommerce-spinner__circle{stroke-dasharray:200;stroke-dashoffset:0;transform-origin:center;-webkit-animation:growAndShrink 2s ease-in-out infinite;animation:growAndShrink 2s ease-in-out infinite;stroke:#1a1a1a}.woocommerce-summary{margin:16px 0;display:-ms-grid;display:grid;border-color:#ccd0d4;border-style:solid;border-width:1px 0 0 1px;background-color:#edeff0;box-shadow:inset -1px -1px 0 #ccd0d4}@media (max-width:782px){.woocommerce-summary{border-width:0}.woocommerce-summary.is-placeholder{border-top:0}.woocommerce-summary .woocommerce-summary__item-container.is-placeholder{border-top:1px solid #ccd0d4}}.woocommerce-summary .components-popover.components-popover{position:static!important;top:auto!important;left:auto!important;right:auto!important;bottom:auto!important;margin-top:0!important;margin-left:0}.woocommerce-summary .components-popover.components-popover .components-popover__header{display:none}.woocommerce-summary .components-popover.components-popover .components-popover__content{position:static;left:auto;right:auto;margin:0;width:100%;max-width:100%!important;max-height:100%!important;box-shadow:none;border:none;transform:none}.woocommerce-summary .components-popover.components-popover .components-popover__content .woocommerce-summary__item.is-selected{display:none}.components-popover__content .woocommerce-summary{max-height:100%;margin-top:0;margin-bottom:0;overflow-y:auto;border:none}.woocommerce-summary .woocommerce-summary__item-data{display:flex;flex-wrap:wrap}.woocommerce-summary .woocommerce-summary__item-delta,.woocommerce-summary .woocommerce-summary__item-value{flex:1 0 auto}.woocommerce-summary .woocommerce-summary__item-delta{flex:0 1 auto;display:flex;flex-wrap:none}.woocommerce-summary,.woocommerce-summary.has-1-items,.woocommerce-summary.has-one-item{-ms-grid-columns:1fr;grid-template-columns:1fr}.woocommerce-summary.has-2-items{-ms-grid-columns:(1fr)[2];grid-template-columns:repeat(2,1fr)}.woocommerce-summary.has-2-items .woocommerce-summary__item-container:nth-of-type(2n) .woocommerce-summary__item{border-right-color:#ccd0d4}.woocommerce-summary.has-2-items .woocommerce-summary__item-container:nth-of-type(odd):nth-last-of-type(-n+2) .woocommerce-summary__item,.woocommerce-summary.has-2-items .woocommerce-summary__item-container:nth-of-type(odd):nth-last-of-type(-n+2)~.woocommerce-summary__item-container .woocommerce-summary__item{border-bottom-color:#ccd0d4}.woocommerce-summary.has-3-items{-ms-grid-columns:(1fr)[3];grid-template-columns:repeat(3,1fr)}.woocommerce-summary.has-3-items .woocommerce-summary__item-container:nth-of-type(3n) .woocommerce-summary__item{border-right-color:#ccd0d4}.woocommerce-summary.has-3-items .woocommerce-summary__item-container:nth-of-type(3n+1):nth-last-of-type(-n+3) .woocommerce-summary__item,.woocommerce-summary.has-3-items .woocommerce-summary__item-container:nth-of-type(3n+1):nth-last-of-type(-n+3)~.woocommerce-summary__item-container .woocommerce-summary__item{border-bottom-color:#ccd0d4}.woocommerce-summary.has-4-items,.woocommerce-summary.has-7-items,.woocommerce-summary.has-8-items{-ms-grid-columns:(1fr)[4];grid-template-columns:repeat(4,1fr)}.woocommerce-summary.has-4-items .woocommerce-summary__item-container:nth-of-type(4n) .woocommerce-summary__item,.woocommerce-summary.has-7-items .woocommerce-summary__item-container:nth-of-type(4n) .woocommerce-summary__item,.woocommerce-summary.has-8-items .woocommerce-summary__item-container:nth-of-type(4n) .woocommerce-summary__item{border-right-color:#ccd0d4}.woocommerce-summary.has-4-items .woocommerce-summary__item-container:nth-of-type(4n+1):nth-last-of-type(-n+4) .woocommerce-summary__item,.woocommerce-summary.has-4-items .woocommerce-summary__item-container:nth-of-type(4n+1):nth-last-of-type(-n+4)~.woocommerce-summary__item-container .woocommerce-summary__item,.woocommerce-summary.has-7-items .woocommerce-summary__item-container:nth-of-type(4n+1):nth-last-of-type(-n+4) .woocommerce-summary__item,.woocommerce-summary.has-7-items .woocommerce-summary__item-container:nth-of-type(4n+1):nth-last-of-type(-n+4)~.woocommerce-summary__item-container .woocommerce-summary__item,.woocommerce-summary.has-8-items .woocommerce-summary__item-container:nth-of-type(4n+1):nth-last-of-type(-n+4) .woocommerce-summary__item,.woocommerce-summary.has-8-items .woocommerce-summary__item-container:nth-of-type(4n+1):nth-last-of-type(-n+4)~.woocommerce-summary__item-container .woocommerce-summary__item{border-bottom-color:#ccd0d4}.woocommerce-summary.has-5-items{-ms-grid-columns:(1fr)[5];grid-template-columns:repeat(5,1fr)}.woocommerce-summary.has-5-items .woocommerce-summary__item-container:nth-of-type(5n) .woocommerce-summary__item{border-right-color:#ccd0d4}.woocommerce-summary.has-5-items .woocommerce-summary__item-container:nth-of-type(5n+1):nth-last-of-type(-n+5) .woocommerce-summary__item,.woocommerce-summary.has-5-items .woocommerce-summary__item-container:nth-of-type(5n+1):nth-last-of-type(-n+5)~.woocommerce-summary__item-container .woocommerce-summary__item{border-bottom-color:#ccd0d4}.woocommerce-summary.has-5-items .woocommerce-summary__item-delta,.woocommerce-summary.has-5-items .woocommerce-summary__item-value{min-width:100%}.woocommerce-summary.has-5-items .woocommerce-summary__item-prev-label,.woocommerce-summary.has-5-items .woocommerce-summary__item-prev-value{display:block}.woocommerce-summary.has-5-items.is-placeholder .woocommerce-summary__item-prev-label{margin-right:calc(100% - 80px)}@media (min-width:1441px){.woocommerce-summary.has-6-items{-ms-grid-columns:(1fr)[6];grid-template-columns:repeat(6,1fr)}.woocommerce-summary.has-6-items .woocommerce-summary__item-container:nth-of-type(6n) .woocommerce-summary__item{border-right-color:#ccd0d4}.woocommerce-summary.has-6-items .woocommerce-summary__item-container:nth-of-type(6n+1):nth-last-of-type(-n+6) .woocommerce-summary__item,.woocommerce-summary.has-6-items .woocommerce-summary__item-container:nth-of-type(6n+1):nth-last-of-type(-n+6)~.woocommerce-summary__item-container .woocommerce-summary__item{border-bottom-color:#ccd0d4}.woocommerce-summary.has-6-items .woocommerce-summary__item-delta,.woocommerce-summary.has-6-items .woocommerce-summary__item-value{min-width:100%}.woocommerce-summary.has-6-items .woocommerce-summary__item-prev-label,.woocommerce-summary.has-6-items .woocommerce-summary__item-prev-value{display:block}.woocommerce-summary.has-6-items.is-placeholder .woocommerce-summary__item-prev-label{margin-right:calc(100% - 80px)}.woocommerce-summary.has-9-items,.woocommerce-summary.has-10-items{-ms-grid-columns:(1fr)[5];grid-template-columns:repeat(5,1fr)}.woocommerce-summary.has-9-items .woocommerce-summary__item-container:nth-of-type(5n) .woocommerce-summary__item,.woocommerce-summary.has-10-items .woocommerce-summary__item-container:nth-of-type(5n) .woocommerce-summary__item{border-right-color:#ccd0d4}.woocommerce-summary.has-9-items .woocommerce-summary__item-container:nth-of-type(5n+1):nth-last-of-type(-n+5) .woocommerce-summary__item,.woocommerce-summary.has-9-items .woocommerce-summary__item-container:nth-of-type(5n+1):nth-last-of-type(-n+5)~.woocommerce-summary__item-container .woocommerce-summary__item,.woocommerce-summary.has-10-items .woocommerce-summary__item-container:nth-of-type(5n+1):nth-last-of-type(-n+5) .woocommerce-summary__item,.woocommerce-summary.has-10-items .woocommerce-summary__item-container:nth-of-type(5n+1):nth-last-of-type(-n+5)~.woocommerce-summary__item-container .woocommerce-summary__item{border-bottom-color:#ccd0d4}.woocommerce-summary.has-9-items .woocommerce-summary__item-delta,.woocommerce-summary.has-9-items .woocommerce-summary__item-value,.woocommerce-summary.has-10-items .woocommerce-summary__item-delta,.woocommerce-summary.has-10-items .woocommerce-summary__item-value{min-width:100%}.woocommerce-summary.has-9-items .woocommerce-summary__item-prev-label,.woocommerce-summary.has-9-items .woocommerce-summary__item-prev-value,.woocommerce-summary.has-10-items .woocommerce-summary__item-prev-label,.woocommerce-summary.has-10-items .woocommerce-summary__item-prev-value{display:block}.woocommerce-summary.has-9-items.is-placeholder .woocommerce-summary__item-prev-label,.woocommerce-summary.has-10-items.is-placeholder .woocommerce-summary__item-prev-label{margin-right:calc(100% - 80px)}}@media (max-width:1440px){.woocommerce-summary.has-4-items .woocommerce-summary__item-delta,.woocommerce-summary.has-4-items .woocommerce-summary__item-value,.woocommerce-summary.has-7-items .woocommerce-summary__item-delta,.woocommerce-summary.has-7-items .woocommerce-summary__item-value,.woocommerce-summary.has-8-items .woocommerce-summary__item-delta,.woocommerce-summary.has-8-items .woocommerce-summary__item-value{min-width:100%}.woocommerce-summary.has-4-items .woocommerce-summary__item-prev-label,.woocommerce-summary.has-4-items .woocommerce-summary__item-prev-value,.woocommerce-summary.has-7-items .woocommerce-summary__item-prev-label,.woocommerce-summary.has-7-items .woocommerce-summary__item-prev-value,.woocommerce-summary.has-8-items .woocommerce-summary__item-prev-label,.woocommerce-summary.has-8-items .woocommerce-summary__item-prev-value{display:block}.woocommerce-summary.has-4-items.is-placeholder .woocommerce-summary__item-prev-label,.woocommerce-summary.has-7-items.is-placeholder .woocommerce-summary__item-prev-label,.woocommerce-summary.has-8-items.is-placeholder .woocommerce-summary__item-prev-label{margin-right:calc(100% - 80px)}.woocommerce-summary.has-6-items,.woocommerce-summary.has-9-items{-ms-grid-columns:(1fr)[3];grid-template-columns:repeat(3,1fr)}.woocommerce-summary.has-6-items .woocommerce-summary__item-container:nth-of-type(3n) .woocommerce-summary__item,.woocommerce-summary.has-9-items .woocommerce-summary__item-container:nth-of-type(3n) .woocommerce-summary__item{border-right-color:#ccd0d4}.woocommerce-summary.has-6-items .woocommerce-summary__item-container:nth-of-type(3n+1):nth-last-of-type(-n+3) .woocommerce-summary__item,.woocommerce-summary.has-6-items .woocommerce-summary__item-container:nth-of-type(3n+1):nth-last-of-type(-n+3)~.woocommerce-summary__item-container .woocommerce-summary__item,.woocommerce-summary.has-9-items .woocommerce-summary__item-container:nth-of-type(3n+1):nth-last-of-type(-n+3) .woocommerce-summary__item,.woocommerce-summary.has-9-items .woocommerce-summary__item-container:nth-of-type(3n+1):nth-last-of-type(-n+3)~.woocommerce-summary__item-container .woocommerce-summary__item{border-bottom-color:#ccd0d4}.woocommerce-summary.has-10-items{-ms-grid-columns:(1fr)[4];grid-template-columns:repeat(4,1fr)}.woocommerce-summary.has-10-items .woocommerce-summary__item-container:nth-of-type(4n) .woocommerce-summary__item{border-right-color:#ccd0d4}.woocommerce-summary.has-10-items .woocommerce-summary__item-container:nth-of-type(4n+1):nth-last-of-type(-n+4) .woocommerce-summary__item,.woocommerce-summary.has-10-items .woocommerce-summary__item-container:nth-of-type(4n+1):nth-last-of-type(-n+4)~.woocommerce-summary__item-container .woocommerce-summary__item{border-bottom-color:#ccd0d4}.woocommerce-summary.has-10-items .woocommerce-summary__item-delta,.woocommerce-summary.has-10-items .woocommerce-summary__item-value{min-width:100%}.woocommerce-summary.has-10-items .woocommerce-summary__item-prev-label,.woocommerce-summary.has-10-items .woocommerce-summary__item-prev-value{display:block}.woocommerce-summary.has-10-items.is-placeholder .woocommerce-summary__item-prev-label{margin-right:calc(100% - 80px)}.woocommerce-summary.has-9-items .woocommerce-summary__item-container:nth-of-type(5n) .woocommerce-summary__item,.woocommerce-summary.has-10-items .woocommerce-summary__item-container:nth-of-type(5n) .woocommerce-summary__item{border-right-color:#e2e4e7}}@media (max-width:960px){.woocommerce-summary .woocommerce-summary__item{border-right-color:#ccd0d4}}@media (max-width:782px){.woocommerce-summary .woocommerce-summary__item-container{margin-left:-16px;margin-right:-16px;width:auto}.woocommerce-summary .woocommerce-summary__item-container .woocommerce-summary__item{border-right:none}.woocommerce-summary .components-popover.components-popover{margin-left:-16px;margin-right:-16px}.woocommerce-summary .components-popover.components-popover .woocommerce-summary__item-container{margin-left:0;margin-right:0}}.woocommerce-summary__item-container{margin-bottom:0}.woocommerce-summary__item-container:last-of-type .woocommerce-summary__item{border-bottom-color:#ccd0d4!important}.woocommerce-summary__item-container.is-dropdown-button{padding:0;list-style:none;border-right:1px solid #ccd0d4}.woocommerce-summary__item-container.is-dropdown-button .components-button{border-bottom:1px solid #ccd0d4;text-align:left;display:block}@media (max-width:782px){.woocommerce-summary__item-container.is-dropdown-button{border-right:none}}.woocommerce-summary__item-container.is-placeholder .woocommerce-summary__item-label{-webkit-animation:loading-fade 1.6s ease-in-out infinite;animation:loading-fade 1.6s ease-in-out infinite;background-color:#e2e4e7;color:transparent;display:inline-block;height:16px;margin-top:2.2px;max-width:110px;width:70%}.woocommerce-summary__item-container.is-placeholder .woocommerce-summary__item-label:after{content:"\00a0"}@media screen and (prefers-reduced-motion:reduce){.woocommerce-summary__item-container.is-placeholder .woocommerce-summary__item-label{-webkit-animation:none;animation:none}}.woocommerce-summary__item-container.is-placeholder .woocommerce-summary__item-data{justify-content:space-between}.woocommerce-summary__item-container.is-placeholder .woocommerce-summary__item-delta-value,.woocommerce-summary__item-container.is-placeholder .woocommerce-summary__item-prev-label,.woocommerce-summary__item-container.is-placeholder .woocommerce-summary__item-prev-value,.woocommerce-summary__item-container.is-placeholder .woocommerce-summary__item-value{-webkit-animation:loading-fade 1.6s ease-in-out infinite;animation:loading-fade 1.6s ease-in-out infinite;background-color:#e2e4e7;color:transparent;display:inline-block;height:16px;min-width:auto}.woocommerce-summary__item-container.is-placeholder .woocommerce-summary__item-delta-value:after,.woocommerce-summary__item-container.is-placeholder .woocommerce-summary__item-prev-label:after,.woocommerce-summary__item-container.is-placeholder .woocommerce-summary__item-prev-value:after,.woocommerce-summary__item-container.is-placeholder .woocommerce-summary__item-value:after{content:"\00a0"}@media screen and (prefers-reduced-motion:reduce){.woocommerce-summary__item-container.is-placeholder .woocommerce-summary__item-delta-value,.woocommerce-summary__item-container.is-placeholder .woocommerce-summary__item-prev-label,.woocommerce-summary__item-container.is-placeholder .woocommerce-summary__item-prev-value,.woocommerce-summary__item-container.is-placeholder .woocommerce-summary__item-value{-webkit-animation:none;animation:none}}.woocommerce-summary__item-container.is-placeholder .woocommerce-summary__item-value{margin-top:2.2px;max-width:60px}.woocommerce-summary__item-container.is-placeholder .woocommerce-summary__item-delta-value{margin-top:2.2px;width:50px}.woocommerce-summary__item-container.is-placeholder .woocommerce-summary__item-prev-label{width:80px}.woocommerce-summary__item-container.is-placeholder .woocommerce-summary__item-prev-value{width:40px}.woocommerce-summary__item{display:flex;flex-direction:column;height:100%;padding:16px;background-color:#f8f9f9;border-bottom:1px solid #e2e4e7;border-right:1px solid #e2e4e7;line-height:1.4em;text-decoration:none}.woocommerce-summary__item:hover{background-color:#f3f4f5}.woocommerce-summary__item:active{background-color:#edeff0}.woocommerce-summary__item:focus{box-shadow:inset -1px -1px 0 #6c7781,inset 1px 1px 0 #6c7781!important}.woocommerce-summary__item.is-selected:focus{box-shadow:inset -1px -1px 0 #6c7781,inset 1px 0 0 #6c7781,inset 0 4px 0 #95588a!important}.is-dropdown-button .woocommerce-summary__item{position:relative;width:100%;padding-right:56px}@media (max-width:782px){.is-dropdown-button .woocommerce-summary__item{border-right:none}}.woocommerce-summary__item .woocommerce-summary__item-data{margin-top:auto}.woocommerce-summary__item .woocommerce-summary__item-label{display:block;margin-bottom:16px;font-size:11px;font-size:.6875rem;text-transform:uppercase;color:#6c7781}.woocommerce-summary__item .woocommerce-summary__item-value{margin-bottom:4px;font-size:18px;font-size:1.125rem;font-weight:500;color:#191e23}.woocommerce-summary__item .woocommerce-summary__item-delta{margin-bottom:12px;font-size:18px;font-size:1.125rem;font-weight:300;color:#555d66}.woocommerce-summary__item.is-selected{background:#fff;box-shadow:inset 0 4px 0 #95588a}.woocommerce-summary__item.is-selected .woocommerce-summary__item-value{font-weight:600}.woocommerce-summary__item.is-selected .woocommerce-summary__item-delta{font-weight:400}.woocommerce-summary__item.is-good-trend .woocommerce-summary__item-delta{color:#4ab866}.woocommerce-summary__item.is-bad-trend .woocommerce-summary__item-delta{color:#d94f4f}.woocommerce-summary__item .woocommerce-summary__item-delta-icon{vertical-align:middle;margin-right:3px;fill:currentColor}.woocommerce-summary__item .woocommerce-summary__item-delta-icon.gridicons-arrow-up{transform:rotate(45deg)}.woocommerce-summary__item .woocommerce-summary__item-delta-icon.gridicons-arrow-down{transform:rotate(-45deg)}.woocommerce-summary__item .woocommerce-summary__item-prev-label,.woocommerce-summary__item .woocommerce-summary__item-prev-value{font-size:13px;font-size:.8125rem;color:#555d66;display:inline-block}.woocommerce-summary__item .woocommerce-summary__toggle{position:absolute;top:44px;right:16px;transition:transform .2s ease}@media screen and (prefers-reduced-motion:reduce){.woocommerce-summary__item .woocommerce-summary__toggle{transition:none}}.is-dropdown-expanded .woocommerce-summary__item .woocommerce-summary__toggle{transform:rotate(-180deg)}.components-popover__content .woocommerce-summary__item .woocommerce-summary__item-label{margin-bottom:0}.components-popover__content .woocommerce-summary__item .woocommerce-summary__item-delta,.components-popover__content .woocommerce-summary__item .woocommerce-summary__item-value{font-size:13px;font-size:.8125rem;margin-bottom:0}.components-popover__content .woocommerce-summary__item .woocommerce-summary__item-prev-label,.components-popover__content .woocommerce-summary__item .woocommerce-summary__item-prev-value{font-size:11px;font-size:.6875rem}.woocommerce-table .woocommerce-card__body{padding:0;position:relative}.woocommerce-table .woocommerce-search{flex-grow:1}.woocommerce-table .woocommerce-card__action{justify-self:flex-end;margin:-13px 0}.woocommerce-table .woocommerce-card__menu{justify-self:flex-end}.woocommerce-table.has-compare .woocommerce-card__action,.woocommerce-table.has-search .woocommerce-card__action{align-items:center;text-align:left;display:-ms-grid;display:grid;width:100%;-ms-grid-columns:auto 1fr auto;grid-template-columns:auto 1fr auto}@media (max-width:960px){.woocommerce-table.has-compare .woocommerce-card__action,.woocommerce-table.has-search .woocommerce-card__action{-ms-grid-row:1;-ms-grid-row-span:2;-ms-grid-column:1;-ms-grid-column-span:3;grid-area:1/1/3/4;grid-gap:12px;-ms-grid-columns:auto 1fr 24px;grid-template-columns:auto 1fr 24px;margin:0}.woocommerce-table.has-compare .woocommerce-card__action .woocommerce-table__compare,.woocommerce-table.has-search .woocommerce-card__action .woocommerce-table__compare{display:flex;-ms-grid-row:2;-ms-grid-row-span:1;-ms-grid-column:1;-ms-grid-column-span:1;grid-area:2/1/3/2}.woocommerce-table.has-compare .woocommerce-card__action .woocommerce-search,.woocommerce-table.has-search .woocommerce-card__action .woocommerce-search{-ms-grid-row:2;-ms-grid-row-span:1;-ms-grid-column:2;-ms-grid-column-span:2;grid-area:2/2/3/4;margin-right:0}.woocommerce-table.has-compare .woocommerce-card__action .woocommerce-table__download-button,.woocommerce-table.has-search .woocommerce-card__action .woocommerce-table__download-button{-ms-grid-row:1;-ms-grid-row-span:1;-ms-grid-column:2;-ms-grid-column-span:1;grid-area:1/2/2/3;-ms-grid-column-align:end;justify-self:end;margin:-6px 0}}.woocommerce-table.has-compare.has-search:not(.has-compare) .woocommerce-card__action,.woocommerce-table.has-search.has-search:not(.has-compare) .woocommerce-card__action{-ms-grid-columns:1fr auto;grid-template-columns:1fr auto}.woocommerce-table.has-compare.has-search:not(.has-compare) .woocommerce-card__action .woocommerce-search,.woocommerce-table.has-search.has-search:not(.has-compare) .woocommerce-card__action .woocommerce-search{-ms-grid-row-align:center;align-self:center;-ms-grid-column:1;grid-column-start:1;-ms-grid-column-span:1;grid-column-end:2}.woocommerce-table.has-compare.has-search:not(.has-compare) .woocommerce-card__action .woocommerce-table__download-button,.woocommerce-table.has-search.has-search:not(.has-compare) .woocommerce-card__action .woocommerce-table__download-button{-ms-grid-row-align:center;align-self:center;-ms-grid-column:2;grid-column-start:2;-ms-grid-column-span:1;grid-column-end:3}@media (max-width:960px){.woocommerce-table.has-compare.has-search:not(.has-compare) .woocommerce-card__action,.woocommerce-table.has-search.has-search:not(.has-compare) .woocommerce-card__action{-ms-grid-row:1;-ms-grid-row-span:2;-ms-grid-column:1;-ms-grid-column-span:3;grid-area:1/1/3/4;-ms-grid-columns:auto 1fr 24px;grid-template-columns:auto 1fr 24px}.woocommerce-table.has-compare.has-search:not(.has-compare) .woocommerce-card__action .woocommerce-search,.woocommerce-table.has-search.has-search:not(.has-compare) .woocommerce-card__action .woocommerce-search{-ms-grid-row:2;-ms-grid-row-span:1;-ms-grid-column:1;-ms-grid-column-span:3;grid-area:2/1/3/4;margin-left:0}.woocommerce-table.has-compare.has-search:not(.has-compare) .woocommerce-card__action .woocommerce-table__download-button,.woocommerce-table.has-search.has-search:not(.has-compare) .woocommerce-card__action .woocommerce-table__download-button{-ms-grid-row:1;-ms-grid-row-span:1;-ms-grid-column:2;-ms-grid-column-span:1;grid-area:1/2/2/3}}.woocommerce-table.has-compare .woocommerce-search,.woocommerce-table.has-search .woocommerce-search{margin:0 16px}.woocommerce-table.has-compare .woocommerce-compare-button,.woocommerce-table.has-search .woocommerce-compare-button{padding:3px 12px;height:auto}.woocommerce-table.is-empty{align-items:center;background:#f8f9f9;color:#555d66;display:flex;height:calc(17px + 1.1375rem + 165px + 5.6875rem);height:calc(17px + 1.1375rem + (33px + 1.1375rem)*var(--number-of-rows));justify-content:center;padding:16px;text-align:center}.woocommerce-table button.woocommerce-table__download-button.is-link{padding:6px 12px;color:#000;text-decoration:none}.woocommerce-table button.woocommerce-table__download-button.is-link svg{margin-right:8px;height:24px;width:24px}@media (max-width:782px){.woocommerce-table button.woocommerce-table__download-button.is-link svg{margin-right:0}.woocommerce-table button.woocommerce-table__download-button.is-link .woocommerce-table__download-button__label{display:none}}.woocommerce-table .woocommerce-pagination{padding-top:16px;padding-bottom:16px;z-index:1;background:#fff;position:relative}.woocommerce-table__caption{font-size:24px;font-size:1.5rem;text-align:left}.woocommerce-table__table{overflow-x:auto}.woocommerce-table__table:after{content:"";position:absolute;right:0;top:0;width:41px;height:100%;background:linear-gradient(90deg,transparent,rgba(0,0,0,.2));opacity:0;pointer-events:none;transition:opacity .3s}.woocommerce-table__table.is-scrollable:after{opacity:1}.woocommerce-table__table table{border-collapse:collapse;width:100%}.woocommerce-table__table tr:focus-within,.woocommerce-table__table tr:hover{background-color:#f3f4f5}.woocommerce-table__table tr:focus-within td,.woocommerce-table__table tr:focus-within th,.woocommerce-table__table tr:hover td,.woocommerce-table__table tr:hover th{background:transparent}.woocommerce-table__header,.woocommerce-table__item{font-size:13px;font-size:.8125rem;padding:16px 24px;border-bottom:1px solid #e2e4e7;text-align:left}.woocommerce-table__header>a:only-child,.woocommerce-table__item>a:only-child{display:block}.woocommerce-table__header a:focus,.woocommerce-table__header a:hover,.woocommerce-table__item a:focus,.woocommerce-table__item a:hover{color:#622557}.woocommerce-table__header .is-placeholder,.woocommerce-table__item .is-placeholder{-webkit-animation:loading-fade 1.6s ease-in-out infinite;animation:loading-fade 1.6s ease-in-out infinite;background-color:#e2e4e7;color:transparent;display:inline-block;height:16px;max-width:120px;width:80%}.woocommerce-table__header .is-placeholder:after,.woocommerce-table__item .is-placeholder:after{content:"\00a0"}@media screen and (prefers-reduced-motion:reduce){.woocommerce-table__header .is-placeholder,.woocommerce-table__item .is-placeholder{-webkit-animation:none;animation:none}}.woocommerce-table__header:not(.is-left-aligned),.woocommerce-table__item:not(.is-left-aligned){text-align:right}.woocommerce-table__header:not(.is-left-aligned) button,.woocommerce-table__item:not(.is-left-aligned) button{justify-content:flex-end}.woocommerce-table__header.is-numeric .is-placeholder,.woocommerce-table__item.is-numeric .is-placeholder{max-width:40px}.woocommerce-table__header .is-negative,.woocommerce-table__item .is-negative{color:#d94f4f;font-weight:700}.woocommerce-table__header.is-sorted,.woocommerce-table__item.is-sorted{background-color:#f8f9f9}.woocommerce-table__header.is-checkbox-column,.woocommerce-table__item.is-checkbox-column{width:33px;max-width:33px;padding-right:0;padding-left:16px}.woocommerce-table__header.is-checkbox-column+th,.woocommerce-table__item.is-checkbox-column+th{border-left:0}th.woocommerce-table__item{font-weight:400}.woocommerce-table__header{padding:8px 24px;background-color:#f8f9fa;border-bottom:1px solid #ccd0d4;font-weight:700;white-space:nowrap}.woocommerce-table__header+.woocommerce-table__header{border-left:1px solid #ccd0d4}.woocommerce-table__header.is-left-aligned.is-sortable{padding-left:16px}.woocommerce-table__header.is-left-aligned.is-sortable svg{display:inline-flex;order:1;margin-left:0}.woocommerce-table__header .components-button.is-button{height:auto;width:100%;padding:8px 24px 8px 0;vertical-align:middle;line-height:1;border:none;background:transparent;box-shadow:none!important}.woocommerce-table__header .components-button.is-button:active,.woocommerce-table__header .components-button.is-button:hover{box-shadow:none!important}.woocommerce-table__header.is-sortable{padding:0}.woocommerce-table__header.is-sortable .gridicon{visibility:hidden;margin-left:4px}.woocommerce-table__header.is-sortable .components-button:focus .gridicon,.woocommerce-table__header.is-sortable .components-button:hover .gridicon,.woocommerce-table__header.is-sortable.is-sorted .components-button .gridicon{visibility:visible}.woocommerce-table__summary{margin:0;padding:16px 0;text-align:center;z-index:1;background:#fff;position:relative}.woocommerce-table__summary-item{display:inline-block;margin-bottom:0;margin-left:8px;margin-right:8px}.woocommerce-table__summary-item .woocommerce-table__summary-label,.woocommerce-table__summary-item .woocommerce-table__summary-value{display:inline-block}.woocommerce-table__summary-item .woocommerce-table__summary-label{margin-left:4px}.woocommerce-table__summary-item .woocommerce-table__summary-value{font-weight:600}.woocommerce-tag{display:inline-flex;margin:1px 4px 1px 0;overflow:hidden;vertical-align:middle}.woocommerce-tag .woocommerce-tag__remove.components-icon-button,.woocommerce-tag .woocommerce-tag__text{display:inline-block;line-height:24px;background:#e2e4e7;transition:all .2s cubic-bezier(.4,1,.4,1)}.woocommerce-tag .woocommerce-tag__text{-ms-grid-row-align:center;align-self:center;padding:0 8px;border-radius:12px;color:#555d66;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.woocommerce-tag.has-remove .woocommerce-tag__text{padding:0 4px 0 8px;border-radius:12px 0 0 12px}.woocommerce-tag .woocommerce-tag__remove.components-icon-button{cursor:pointer;padding:0 2px;border-radius:0 12px 12px 0;color:#555d66;line-height:10px;text-indent:0}.woocommerce-tag .woocommerce-tag__remove.components-icon-button:hover{color:#32373c}.text-control-with-affixes{display:inline-flex;flex-direction:row;width:100%}.text-control-with-affixes input[type=email],.text-control-with-affixes input[type=number],.text-control-with-affixes input[type=password],.text-control-with-affixes input[type=text],.text-control-with-affixes input[type=url]{flex-grow:1;margin:0}.text-control-with-affixes input[type=email]:disabled,.text-control-with-affixes input[type=number]:disabled,.text-control-with-affixes input[type=password]:disabled,.text-control-with-affixes input[type=text]:disabled,.text-control-with-affixes input[type=url]:disabled{border-right-width:0}.text-control-with-affixes input[type=email]:disabled+.text-control-with-affixes__suffix,.text-control-with-affixes input[type=number]:disabled+.text-control-with-affixes__suffix,.text-control-with-affixes input[type=password]:disabled+.text-control-with-affixes__suffix,.text-control-with-affixes input[type=text]:disabled+.text-control-with-affixes__suffix,.text-control-with-affixes input[type=url]:disabled+.text-control-with-affixes__suffix{border-left:1px solid #e2e4e7}.text-control-with-affixes__prefix,.text-control-with-affixes__suffix{position:relative;background:#fff;border:1px solid #e2e4e7;color:#555d66;padding:7px 14px;white-space:nowrap;flex:1 0 auto;font-size:14px;line-height:1.5}.text-control-with-affixes__prefix{border-right:none}.text-control-with-affixes__prefix+input[type=email]:disabled,.text-control-with-affixes__prefix+input[type=number]:disabled,.text-control-with-affixes__prefix+input[type=password]:disabled,.text-control-with-affixes__prefix+input[type=text]:disabled,.text-control-with-affixes__prefix+input[type=url]:disabled{border-left-color:#e2e4e7;border-right-width:1px}.text-control-with-affixes__suffix{border-left:none}.woocommerce-view-more-list{padding-left:4px;margin:0 0 0 4px;vertical-align:middle}.woocommerce-view-more-list__popover{margin:0;padding:16px;text-align:left}.woocommerce-view-more-list__popover__item{display:block;margin:16px 0}.woocommerce-view-more-list__popover__item:first-child{margin-top:0}.woocommerce-view-more-list__popover__item:last-child{margin-bottom:0}.woocommerce-web-preview{width:100%;display:flex;align-items:center;justify-content:center;background:#f6f6f6}.woocommerce-web-preview.is-loading .woocommerce-web-preview__iframe-wrapper{display:none}.woocommerce-web-preview .woocommerce-web-preview__iframe-wrapper{width:100%}.woocommerce-web-preview iframe{width:100%;height:100%;min-height:400px}
|
2 |
@-webkit-keyframes loading-fade{0%{opacity:.7}50%{opacity:1}to{opacity:.7}}@keyframes loading-fade{0%{opacity:.7}50%{opacity:1}to{opacity:.7}}.editor-block-preview__content{overflow:hidden}.components-placeholder__label .gridicon,.components-placeholder__label .material-icon{margin-right:1ch;fill:currentColor}.editor-styles-wrapper .wc-block-grid .wc-block-grid__products{list-style:none;margin:0}.editor-styles-wrapper .wc-block-grid .wc-block-grid__products .wp-block-button__link{color:inherit}.editor-styles-wrapper .wc-block-grid.components-placeholder{padding:2em 1em}.editor-styles-wrapper .wc-block-grid.is-loading,.editor-styles-wrapper .wc-block-grid.is-not-found{display:block}.wc-block-api-error .components-placeholder__fieldset{display:block;margin:0;padding:0}.wc-block-api-error .wc-block-error__message{margin-bottom:16px}.wc-block-api-error .components-spinner{float:none}
|
3 |
@-webkit-keyframes loading-fade{0%{opacity:.7}50%{opacity:1}to{opacity:.7}}@keyframes loading-fade{0%{opacity:.7}50%{opacity:1}to{opacity:.7}}.wc-block-handpicked-products__selection{width:100%}
|
4 |
@-webkit-keyframes loading-fade{0%{opacity:.7}50%{opacity:1}to{opacity:.7}}@keyframes loading-fade{0%{opacity:.7}50%{opacity:1}to{opacity:.7}}.wc-block-products-category__selection{width:100%}.wc-block-products-category__cancel-button.is-tertiary{margin:1em auto 0;display:block;text-align:center;font-size:1em}
|
6 |
@-webkit-keyframes loading-fade{0%{opacity:.7}50%{opacity:1}to{opacity:.7}}@keyframes loading-fade{0%{opacity:.7}50%{opacity:1}to{opacity:.7}}.wc-block-products-by-attribute__selection{width:100%}
|
7 |
@-webkit-keyframes loading-fade{0%{opacity:.7}50%{opacity:1}to{opacity:.7}}@keyframes loading-fade{0%{opacity:.7}50%{opacity:1}to{opacity:.7}}.wc-block-featured-product.components-placeholder{background-color:rgba(139,139,150,.1)}.wc-block-featured-product .components-resizable-box__handle{z-index:10}.wc-block-featured-product__message{margin-bottom:16px}.wc-block-featured-product__selection{width:100%}
|
8 |
@-webkit-keyframes loading-fade{0%{opacity:.7}50%{opacity:1}to{opacity:.7}}@keyframes loading-fade{0%{opacity:.7}50%{opacity:1}to{opacity:.7}}.wc-block-reviews__selection{width:100%}.components-base-control+.wc-block-reviews__notice{margin:-16px 0 16px}.components-base-control:nth-last-child(2)+.wc-block-reviews__notice{margin:-16px 0 12px}
|
9 |
+
@-webkit-keyframes loading-fade{0%{opacity:.7}50%{opacity:1}to{opacity:.7}}@keyframes loading-fade{0%{opacity:.7}50%{opacity:1}to{opacity:.7}}.wc-block-product-search__field.input-control{color:#828b96!important}.wc-block-product-search .wc-block-product-search__fields .block-editor-rich-text{flex-grow:1}
|
10 |
@-webkit-keyframes loading-fade{0%{opacity:.7}50%{opacity:1}to{opacity:.7}}@keyframes loading-fade{0%{opacity:.7}50%{opacity:1}to{opacity:.7}}.wc-block-product-tag__selection{width:100%}.wc-block-product-tag__cancel-button.is-tertiary{margin:1em auto 0;display:block;text-align:center;font-size:1em}
|
11 |
@-webkit-keyframes loading-fade{0%{opacity:.7}50%{opacity:1}to{opacity:.7}}@keyframes loading-fade{0%{opacity:.7}50%{opacity:1}to{opacity:.7}}.wc-block-featured-category.components-placeholder{background-color:rgba(139,139,150,.1)}.wc-block-featured-category .components-resizable-box__handle{z-index:10}.wc-block-featured-category .components-placeholder__label svg{fill:currentColor;margin-right:1ch}.wc-block-featured-category__selection{width:100%}
|
build/featured-category.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
this.wc=this.wc||{},this.wc.blocks=this.wc.blocks||{},this.wc.blocks["featured-category"]=function(e){function t(t){for(var c,a,l=t[0],i=t[1],s=t[2],d=0,b=[];d<l.length;d++)a=l[d],Object.prototype.hasOwnProperty.call(o,a)&&o[a]&&b.push(o[a][0]),o[a]=0;for(c in i)Object.prototype.hasOwnProperty.call(i,c)&&(e[c]=i[c]);for(u&&u(t);b.length;)b.shift()();return r.push.apply(r,s||[]),n()}function n(){for(var e,t=0;t<r.length;t++){for(var n=r[t],c=!0,l=1;l<n.length;l++){var i=n[l];0!==o[i]&&(c=!1)}c&&(r.splice(t--,1),e=a(a.s=n[0]))}return e}var c={},o={5:0},r=[];function a(t){if(c[t])return c[t].exports;var n=c[t]={i:t,l:!1,exports:{}};return e[t].call(n.exports,n,n.exports,a),n.l=!0,n.exports}a.m=e,a.c=c,a.d=function(e,t,n){a.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},a.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},a.t=function(e,t){if(1&t&&(e=a(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(a.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var c in e)a.d(n,c,function(t){return e[t]}.bind(null,c));return n},a.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return a.d(t,"a",t),t},a.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},a.p="";var l=window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[],i=l.push.bind(l);l.push=t,l=l.slice();for(var s=0;s<l.length;s++)t(l[s]);var u=i;return r.push([549,2,1,0]),n()}({0:function(e,t){!function(){e.exports=this.wp.element}()},1:function(e,t){!function(){e.exports=this.wp.i18n}()},13:function(e,t){!function(){e.exports=this.React}()},14:function(e,t){!function(){e.exports=this.moment}()},17:function(e,t){!function(){e.exports=this.wp.apiFetch}()},18:function(e,t){!function(){e.exports=this.wp.editor}()},19:function(e,t){!function(){e.exports=this.wp.url}()},2:function(e,t){!function(){e.exports=this.wp.components}()},21:function(e,t){!function(){e.exports=this.wp.compose}()},23:function(e,t){!function(){e.exports=this.wp.blocks}()},24:function(e,t,n){"use strict";var c=n(0),o=n(2),r=function(e){var t=e.className,n=e.fillColor;return Object(c.createElement)(o.Icon,{className:t,icon:Object(c.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 22.41"},Object(c.createElement)("g",null,Object(c.createElement)("g",null,Object(c.createElement)("path",{fill:n,d:"M16.55 0H1.75C.56 0 0 .52 0 1.68v9.24c0 1.15.56 1.92 1.75 1.92H2V4.76a2.51 2.51 0 0 1 2.74-2.68H18v-.4A1.51 1.51 0 0 0 16.55 0z"}),Object(c.createElement)("path",{fill:n,d:"M19.54 3.11H4.74C3.55 3.11 3 3.64 3 4.79V14c0 1.19.55 2 1.74 2H5V7.88A2.51 2.51 0 0 1 7.73 5.2H21v-.41a1.51 1.51 0 0 0-1.46-1.68z"}),Object(c.createElement)("path",{fill:n,d:"M22.53 6.23H7.73C6.54 6.23 6 6.75 6 7.91v9.24c0 1.15.56 1.92 1.75 1.92h7a.59.59 0 0 1 .32.11l1.61 1.15 2.83 2a.31.31 0 0 0 .18.05.3.3 0 0 0 .31-.3v-2.73a.3.3 0 0 1 .28-.28h2.31A1.47 1.47 0 0 0 24 17.6V7.91a1.52 1.52 0 0 0-1.47-1.68z"}),Object(c.createElement)("path",{fill:"#ffffff",d:"M10.2 10.92l1.06-2.14 1.05 2.14 2.37.35-1.71 1.66.4 2.36-2.11-1.11-.17.09-.52.27-.51.26-.92.49.18-1.02.09-.57.1-.56.03-.21-1.71-1.66 2.37-.35zM21.46 14.25h-4.4a.69.69 0 0 1-.69-.69.68.68 0 0 1 .69-.68h4.4a.68.68 0 0 1 .69.68.69.69 0 0 1-.69.69zM21.46 11.19h-4.4a.69.69 0 1 1 0-1.37h4.4a.69.69 0 1 1 0 1.37z"}))))})},a=function(){return Object(c.createElement)(o.Icon,{icon:Object(c.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},Object(c.createElement)("path",{fillRule:"nonzero",d:"M21.913 7.0946H2.0254c-1.1708 0-2.0984.9908-2.0205 2.16l.741 11.0724c.0714 1.0638.9552 1.8892 2.0206 1.8892h18.4054c1.0654 0 1.9492-.8254 2.0205-1.8892l.7411-11.0724c.0779-1.1692-.8497-2.16-2.0205-2.16zm-8.8006-4.6573h5.987c1.119 0 2.0255.9065 2.0255 2.0254v.934H2.8103V2.0255C2.8103.9064 3.7168 0 4.8357 0h6.2513c1.119 0 2.0254.9065 2.0254 2.0254v.4119zm-7.0589 11.619a.926.926 0 1 1 0-1.852h11.8297a.926.926 0 1 1 0 1.852H6.0535z"}))})},l=function(){return Object(c.createElement)(o.Icon,{icon:Object(c.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},Object(c.createElement)("path",{d:"M22 7.5H2c-1.2 0-2.1 1-2 2.2l.7 11.1c.1 1.1 1 1.9 2 1.9h18.5c1.1 0 2-.8 2-1.9L24 9.6c.1-1.1-.9-2.1-2-2.1zM13.1 2.8v-.4c0-1.1-.9-2-2-2H4.8c-1.1 0-2 .9-2 2v3.4h18.4v-1c0-1.1-.9-2-2-2h-6.1z"}),Object(c.createElement)("path",{fill:"#fff",d:"M14.4 18.7L12 17.4l-2.4 1.3.5-2.6-1.9-1.9 2.6-.4 1.2-2.4 1.2 2.4 2.6.4-1.9 1.9z"}))})},i=function(){return Object(c.createElement)(o.Icon,{className:"material-icon",icon:Object(c.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},Object(c.createElement)("path",{d:"M0 0h24v24H0z",fill:"none"}),Object(c.createElement)("path",{d:"M23 12l-2.44-2.78.34-3.68-3.61-.82-1.89-3.18L12 3 8.6 1.54 6.71 4.72l-3.61.81.34 3.68L1 12l2.44 2.78-.34 3.69 3.61.82 1.89 3.18L12 21l3.4 1.46 1.89-3.18 3.61-.82-.34-3.68L23 12zm-10 5h-2v-2h2v2zm0-4h-2V7h2v6z"}))})},s=function(){return Object(c.createElement)(o.Icon,{icon:Object(c.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},Object(c.createElement)("path",{fill:"#1E8CBE",d:"M12 7c-2.76 0-5 2.24-5 5s2.24 5 5 5 5-2.24 5-5-2.24-5-5-5zm0-5C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"}))})},u=function(){return Object(c.createElement)(o.Icon,{icon:Object(c.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},Object(c.createElement)("path",{fill:"#6C7781",d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"}))})},d=function(e){var t=e.className,n=e.fillColor;return Object(c.createElement)(o.Icon,{className:t,icon:Object(c.createElement)("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},Object(c.createElement)("path",{fill:n,d:"M2.3,17.3h9.3c0.1,0,0.3,0,0.4,0.1l5.9,4.2c0.3,0.2,0.7,0,0.7-0.3v-3.7c0-0.2,0.2-0.4,0.4-0.4H22 c1.1,0,2-0.9,2-2V2.5c0-1.2-0.7-2.2-2-2.2H2.3C0.7,0.2,0,0.9,0,2.5v12.3C0,16.3,0.7,17.3,2.3,17.3z"}),Object(c.createElement)("polygon",{fill:"#ffffff",points:"8.8,12.1 6.5,10.9 4.1,12.1 4.5,9.5 2.6,7.6 5.3,7.2 6.5,4.8 7.6,7.2 10.3,7.6 8.4,9.5"}),Object(c.createElement)("path",{fill:"#ffffff",d:"M20.7,7.9h-7c-0.5,0-0.9-0.4-0.9-0.9S13.2,6,13.7,6h7c0.5,0,0.9,0.4,0.9,0.9S21.2,7.9,20.7,7.9z"}),Object(c.createElement)("path",{fill:"#ffffff",d:"M20.7,11.5h-7c-0.5,0-0.9-0.4-0.9-0.9s0.4-0.9,0.9-0.9h7c0.5,0,0.9,0.4,0.9,0.9S21.2,11.5,20.7,11.5z"}))})},b=function(e){var t=e.className,n=e.fillColor;return Object(c.createElement)(o.Icon,{className:t,icon:Object(c.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 23"},Object(c.createElement)("path",{fill:n,d:"M21.9943 7.0957H2.00638C0.807102 7.0957 -0.0923543 8.0951 0.0075853 9.29437L0.707162 20.3877C0.807102 21.487 1.70656 22.2865 2.70595 22.2865H21.1948C22.2941 22.2865 23.1936 21.487 23.1936 20.3877L23.9931 9.29437C24.093 8.0951 23.0936 7.0957 21.9943 7.0957Z"}),Object(c.createElement)("path",{fill:n,d:"M13.0921 2.39855V1.99879C13.0921 0.899456 12.1926 0 11.0933 0H4.7971C3.69777 0 2.79831 0.899456 2.79831 1.99879V5.39674H21.1872V4.49728C21.1872 3.39795 20.2877 2.49849 19.1884 2.49849H13.0921V2.39855Z"}),Object(c.createElement)("path",{fill:"white",d:"M8.63115 17.126L6.5415 15.9449L4.361 17.126L4.72442 14.6729L2.99819 13.0376L5.45125 12.6742L6.5415 10.4937L7.5409 12.6742L9.99396 13.0376L8.26773 14.6729L8.63115 17.126Z"}),Object(c.createElement)("path",{fill:"white",d:"M19.1907 13.5918H12.9899C12.547 13.5918 12.1926 13.1921 12.1926 12.6924C12.1926 12.1927 12.547 11.7929 12.9899 11.7929H19.1907C19.6336 11.7929 19.9879 12.1927 19.9879 12.6924C19.9879 13.1921 19.6336 13.5918 19.1907 13.5918Z"}),Object(c.createElement)("path",{fill:"white",d:"M19.1907 17.1897H12.9899C12.547 17.1897 12.1926 16.7899 12.1926 16.2902C12.1926 15.7905 12.547 15.3907 12.9899 15.3907H19.1907C19.6336 15.3907 19.9879 15.7905 19.9879 16.2902C19.9879 16.7899 19.6336 17.1897 19.1907 17.1897Z"}))})},p=function(){return Object(c.createElement)(o.Icon,{className:"material-icon",icon:Object(c.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},Object(c.createElement)("path",{d:"M13 13v8h8v-8h-8zM3 21h8v-8H3v8zM3 3v8h8V3H3zm13.66-1.31L11 7.34 16.66 13l5.66-5.66-5.66-5.65z"}),Object(c.createElement)("path",{d:"M0 0h24v24H0z",fill:"none"}))})},g=n(6),h=n.n(g),f=(n(7),function(e){var t=e.size,n=void 0===t?20:t,r=e.className;return Object(c.createElement)(o.Icon,{className:h()("woo-icon",r),icon:Object(c.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",height:n,width:Math.floor(1.67*n),viewBox:"0 0 245 145"},Object(c.createElement)("path",{fill:"#96588A",d:"M22.76 0h199.1a22.77 22.77 0 0 1 22.8 22.76v75.92a22.77 22.77 0 0 1-22.78 22.78h-71.41l9.77 24-43.13-24H22.76C10.1946 121.449.011 111.2654 0 98.7V22.76C.011 10.1946 10.1946.011 22.76 0z"}),Object(c.createElement)("path",{fill:"#FFF",fillRule:"nonzero",d:"M12.32 20.63a8.16 8.16 0 0 1 6.25-3.09c5.0733-.36 7.9867 2.0333 8.74 7.18 3.14 20.86 6.4933 38.5633 10.06 53.11l21.92-41.69c2-3.76 4.49-5.76 7.52-6 4.3867-.3067 7.13 2.49 8.23 8.39a186 186 0 0 0 9.47 34.23c2.62-25.38 7.0133-43.7133 13.18-55a7.73 7.73 0 0 1 6.6-4.43 8.8 8.8 0 0 1 6.32 2 7.75 7.75 0 0 1 3.05 5.74 8.52 8.52 0 0 1-1 4.77c-3.9 7.24-7.12 19.28-9.66 36.12-2.48 16.2533-3.3967 28.9633-2.75 38.13a12.25 12.25 0 0 1-1.16 6.56 6.32 6.32 0 0 1-5.33 3.53c-2.6667.18-5.3033-1.0567-7.91-3.71-9.2933-9.54-16.6567-23.7267-22.09-42.56C57.3 76.7167 52.48 86.3333 49.3 92.76c-5.86 11.3333-10.89 17.13-15.09 17.39-2.7333.1933-5.0667-2.0933-7-6.86-5.1-13.0933-10.5833-38.4033-16.45-75.93a8.56 8.56 0 0 1 1.56-6.73zM227.23 36.34a23.17 23.17 0 0 0-16-11.59 26.25 26.25 0 0 0-5.42-.58c-9.5867 0-17.41 5-23.47 15a53 53 0 0 0-7.78 28.16c0 7.7333 1.6167 14.3333 4.85 19.8a23.15 23.15 0 0 0 16 11.59 26.28 26.28 0 0 0 5.42.59c9.68 0 17.5033-5 23.47-15A53.89 53.89 0 0 0 232.08 56c0-7.7333-1.6167-14.2867-4.85-19.66zm-12.61 27.72c-1.3733 6.56-3.9167 11.5-7.63 14.82-2.9267 2.6667-5.6133 3.7433-8.06 3.23-2.4467-.5133-4.4033-2.6667-5.87-6.46a25.68 25.68 0 0 1-1.76-9.09 35.9 35.9 0 0 1 .73-7.34 33 33 0 0 1 5.28-11.88c3.3333-4.8933 6.8067-6.9467 10.42-6.16 2.44.4867 4.3933 2.64 5.86 6.46a25.68 25.68 0 0 1 1.76 9.12 35.73 35.73 0 0 1-.73 7.33v-.03zM164.57 36.34a23.2 23.2 0 0 0-16-11.59 26.42 26.42 0 0 0-5.43-.58c-9.5933 0-17.4167 5-23.47 15a53 53 0 0 0-7.78 28.16c0 7.7333 1.6133 14.3333 4.84 19.8a23.19 23.19 0 0 0 16 11.59 26.44 26.44 0 0 0 5.43.59c9.68 0 17.5033-5 23.47-15A53.88 53.88 0 0 0 169.4 56c0-7.7333-1.6133-14.2867-4.84-19.66h.01zm-12.61 27.72c-1.3667 6.56-3.91 11.5-7.63 14.82-2.93 2.64-5.63 3.72-8.07 3.23-2.44-.49-4.4-2.64-5.86-6.46a25.7 25.7 0 0 1-1.77-9.09 35.9 35.9 0 0 1 .74-7.34 33 33 0 0 1 5.28-11.88c3.3333-4.8933 6.8067-6.9467 10.42-6.16 2.44.4867 4.3933 2.64 5.86 6.46a25.91 25.91 0 0 1 1.76 9.12 35.73 35.73 0 0 1-.73 7.33v-.03z"}))})});n.d(t,"a",function(){return r}),n.d(t,"b",function(){return a}),n.d(t,"c",function(){return l}),n.d(t,"d",function(){return i}),n.d(t,"e",function(){return s}),n.d(t,"f",function(){return u}),n.d(t,"h",function(){return d}),n.d(t,"g",function(){return b}),n.d(t,"i",function(){return p}),n.d(t,"j",function(){return f})},25:function(e,t,n){"use strict";n.d(t,"d",function(){return b}),n.d(t,"b",function(){return p}),n.d(t,"c",function(){return g}),n.d(t,"a",function(){return h});var c=n(20),o=n.n(c),r=n(19),a=n(17),l=n.n(a),i=n(4),s=n(5);function u(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var c=Object.getOwnPropertySymbols(e);t&&(c=c.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,c)}return n}function d(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?u(n,!0).forEach(function(t){o()(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):u(n).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}var b=function(e){var t=e.selected,n=void 0===t?[]:t,c=e.search,o=void 0===c?"":c,a=e.queryArgs,u=function(e){var t=e.selected,n=void 0===t?[]:t,c=e.search,o=void 0===c?"":c,a=e.queryArgs,l=void 0===a?[]:a,i={per_page:s.IS_LARGE_CATALOG?100:-1,catalog_visibility:"any",status:"publish",search:o,orderby:"title",order:"asc"},u=[Object(r.addQueryArgs)(s.ENDPOINTS.products,d({},i,{},l))];return s.IS_LARGE_CATALOG&&n.length&&u.push(Object(r.addQueryArgs)(s.ENDPOINTS.products,{catalog_visibility:"any",status:"publish",include:n})),u}({selected:n,search:o,queryArgs:void 0===a?[]:a});return Promise.all(u.map(function(e){return l()({path:e})})).then(function(e){return Object(i.uniqBy)(Object(i.flatten)(e),"id")})},p=function(e){return l()({path:"".concat(s.ENDPOINTS.products,"/").concat(e)})},g=function(e){var t=e.selected,n=function(e){var t=e.selected,n=void 0===t?[]:t,c=e.search,o=[Object(r.addQueryArgs)("".concat(s.ENDPOINTS.products,"/tags"),{per_page:s.LIMIT_TAGS?100:-1,orderby:s.LIMIT_TAGS?"count":"name",order:s.LIMIT_TAGS?"desc":"asc",search:c})];return s.LIMIT_TAGS&&n.length&&o.push(Object(r.addQueryArgs)("".concat(s.ENDPOINTS.products,"/tags"),{include:n})),o}({selected:void 0===t?[]:t,search:e.search});return Promise.all(n.map(function(e){return l()({path:e})})).then(function(e){return Object(i.uniqBy)(Object(i.flatten)(e),"id")})},h=function(e){return l()({path:"".concat(s.ENDPOINTS.categories,"/").concat(e)})}},33:function(e,t){!function(){e.exports=this.wp.keycodes}()},39:function(e,t){!function(){e.exports=this.wp.escapeHtml}()},4:function(e,t){!function(){e.exports=this.lodash}()},41:function(e,t,n){"use strict";var c=n(16),o=n.n(c),r=n(8),a=n.n(r),l=n(9),i=n.n(l),s=n(10),u=n.n(s),d=n(11),b=n.n(d),p=n(15),g=n.n(p),h=n(12),f=n.n(h),m=n(0),O=n(1),j=n(19),w=n(17),v=n.n(w),y=n(4),E=(n(7),n(26)),_=n(2),k=n(5),C=(n(86),function(e){function t(){var e;return a()(this,t),(e=u()(this,b()(t).apply(this,arguments))).state={list:[],loading:!0},e.renderItem=e.renderItem.bind(g()(e)),e}return f()(t,e),i()(t,[{key:"componentDidMount",value:function(){var e=this;v()({path:Object(j.addQueryArgs)("".concat(k.ENDPOINTS.products,"/categories"),{per_page:-1})}).then(function(t){e.setState({list:t,loading:!1})}).catch(function(){e.setState({list:[],loading:!1})})}},{key:"renderItem",value:function(e){var t=e.item,n=e.search,c=e.depth,r=void 0===c?0:c,a=["woocommerce-product-categories__item"];n.length&&a.push("is-searching"),0===r&&0!==t.parent&&a.push("is-skip-level");var l=t.breadcrumbs.length?"".concat(t.breadcrumbs.join(", "),", ").concat(t.name):t.name;return Object(m.createElement)(E.b,o()({className:a.join(" ")},e,{showCount:!0,"aria-label":Object(O.sprintf)(Object(O._n)("%s, has %d product","%s, has %d products",t.count,"woo-gutenberg-products-block"),l,t.count)}))}},{key:"render",value:function(){var e=this.state,t=e.list,n=e.loading,c=this.props,o=c.onChange,r=c.onOperatorChange,a=c.operator,l=c.selected,i=c.isSingle,s={clear:Object(O.__)("Clear all product categories","woo-gutenberg-products-block"),list:Object(O.__)("Product Categories","woo-gutenberg-products-block"),noItems:Object(O.__)("Your store doesn't have any product categories.","woo-gutenberg-products-block"),search:Object(O.__)("Search for product categories","woo-gutenberg-products-block"),selected:function(e){return Object(O.sprintf)(Object(O._n)("%d category selected","%d categories selected",e,"woo-gutenberg-products-block"),e)},updated:Object(O.__)("Category search results updated.","woo-gutenberg-products-block")};return Object(m.createElement)(m.Fragment,null,Object(m.createElement)(E.a,{className:"woocommerce-product-categories",list:t,isLoading:n,selected:l.map(function(e){return Object(y.find)(t,{id:e})}).filter(Boolean),onChange:o,renderItem:this.renderItem,messages:s,isHierarchical:!0,isSingle:i}),!!r&&Object(m.createElement)("div",{className:l.length<2?"screen-reader-text":""},Object(m.createElement)(_.SelectControl,{className:"woocommerce-product-categories__operator",label:Object(O.__)("Display products matching","woo-gutenberg-products-block"),help:Object(O.__)("Pick at least two categories to use this setting.","woo-gutenberg-products-block"),value:a,onChange:r,options:[{label:Object(O.__)("Any selected categories","woo-gutenberg-products-block"),value:"any"},{label:Object(O.__)("All selected categories","woo-gutenberg-products-block"),value:"all"}]})))}}]),t}(m.Component));C.defaultProps={operator:"any",isSingle:!1},t.a=C},44:function(e,t){!function(){e.exports=this.ReactDOM}()},47:function(e,t){!function(){e.exports=this.wp.viewport}()},5:function(e,t){!function(){e.exports=this.wc["wc-block-settings"]}()},51:function(e,t){!function(){e.exports=this.wp.hooks}()},52:function(e,t,n){"use strict";var c=n(0),o=n(1),r=(n(7),n(29)),a=n.n(r),l=n(6),i=n.n(l),s=n(39),u=n(2);t.a=function(e){var t,n,r=e.className,l=e.error,d=e.isLoading,b=e.onRetry;return Object(c.createElement)(u.Placeholder,{icon:Object(c.createElement)(a.a,{icon:"notice"}),label:Object(o.__)("Sorry, an error occurred","woo-gutenberg-products-block"),className:i()("wc-block-api-error",r)},Object(c.createElement)("div",{className:"wc-block-error__message"},(n=(t=l).apiMessage,t.message||(n?Object(c.createElement)("span",null,Object(o.__)("The following error was returned from the API","woo-gutenberg-products-block"),Object(c.createElement)("br",null),Object(c.createElement)("code",null,Object(s.escapeHTML)(n))):Object(o.__)("An unknown error occurred which prevented the block from being updated.","woo-gutenberg-products-block")))),b&&Object(c.createElement)(c.Fragment,null,d?Object(c.createElement)(u.Spinner,null):Object(c.createElement)(u.Button,{isDefault:!0,onClick:b},Object(o.__)("Retry","woo-gutenberg-products-block"))))}},53:function(e,t){!function(){e.exports=this.wp.htmlEntities}()},54:function(e,t){!function(){e.exports=this.wp.date}()},543:function(e,t,n){var c=n(544);"string"==typeof c&&(c=[[e.i,c,""]]);var o={insert:"head",singleton:!1};n(35)(c,o);c.locals&&(e.exports=c.locals)},544:function(e,t,n){},549:function(e,t,n){"use strict";n.r(t);var c=n(0),o=n(1),r=n(18),a=n(23),l=n(5),i=(n(541),n(543),n(2)),s=n(6),u=n.n(s),d=n(21),b=(n(7),n(24)),p=n(41),g=n(52),h=n(4);function f(e){return e&&Object(h.isObject)(e.image)?e.image.src:""}var m=n(71),O=Object(d.compose)([m.a,Object(r.withColors)({overlayColor:"background-color"}),i.withSpokenMessages])(function(e){var t,n,a,s,d,m,O=e.attributes,j=e.isSelected,w=e.setAttributes,v=e.error,y=e.getCategory,E=e.isLoading,_=e.category,k=e.overlayColor,C=e.setOverlayColor,S=e.debouncedSpeak,M=O.editMode;return v?Object(c.createElement)(g.a,{className:"wc-block-featured-category-error",error:v,isLoading:E,onRetry:y}):M?Object(c.createElement)(i.Placeholder,{icon:Object(c.createElement)(b.c,null),label:Object(o.__)("Featured Category","woo-gutenberg-products-block"),className:"wc-block-featured-category"},Object(o.__)("Visually highlight a product category and encourage prompt action.","woo-gutenberg-products-block"),Object(c.createElement)("div",{className:"wc-block-featured-category__selection"},Object(c.createElement)(p.a,{selected:[O.categoryId],onChange:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=e[0]?e[0].id:0;w({categoryId:t,mediaId:0,mediaSrc:""})},isSingle:!0}),Object(c.createElement)(i.Button,{isDefault:!0,onClick:function(){w({editMode:!1}),S(Object(o.__)("Showing Featured Product block preview.","woo-gutenberg-products-block"))}},Object(o.__)("Done","woo-gutenberg-products-block")))):Object(c.createElement)(c.Fragment,null,(d=O.contentAlign,m=O.mediaId||function(e){return e&&Object(h.isObject)(e.image)?e.image.id:0}(_),Object(c.createElement)(r.BlockControls,null,Object(c.createElement)(r.AlignmentToolbar,{value:d,onChange:function(e){w({contentAlign:e})}}),Object(c.createElement)(r.MediaUploadCheck,null,Object(c.createElement)(i.Toolbar,null,Object(c.createElement)(r.MediaUpload,{onSelect:function(e){w({mediaId:e.id,mediaSrc:e.url})},allowedTypes:["image"],value:m,render:function(e){var t=e.open;return Object(c.createElement)(i.IconButton,{className:"components-toolbar__control",label:Object(o.__)("Edit media"),icon:"format-image",onClick:t,disabled:!_})}}))))),(t=O.mediaSrc||f(_),n=O.focalPoint,a=void 0===n?{x:.5,y:.5}:n,s="function"==typeof i.FocalPointPicker,Object(c.createElement)(r.InspectorControls,{key:"inspector"},Object(c.createElement)(i.PanelBody,{title:Object(o.__)("Content","woo-gutenberg-products-block")},Object(c.createElement)(i.ToggleControl,{label:Object(o.__)("Show description","woo-gutenberg-products-block"),checked:O.showDesc,onChange:function(){return w({showDesc:!O.showDesc})}})),Object(c.createElement)(r.PanelColorSettings,{title:Object(o.__)("Overlay","woo-gutenberg-products-block"),colorSettings:[{value:k.color,onChange:C,label:Object(o.__)("Overlay Color","woo-gutenberg-products-block")}]},!!t&&Object(c.createElement)(c.Fragment,null,Object(c.createElement)(i.RangeControl,{label:Object(o.__)("Background Opacity","woo-gutenberg-products-block"),value:O.dimRatio,onChange:function(e){return w({dimRatio:e})},min:0,max:100,step:10}),s&&Object(c.createElement)(i.FocalPointPicker,{label:Object(o.__)("Focal Point Picker"),url:t,value:a,onChange:function(e){return w({focalPoint:e})}}))))),_?function(){var e,t,n=O.className,a=O.contentAlign,s=O.dimRatio,d=O.focalPoint,b=O.height,p=O.showDesc,g=u()("wc-block-featured-category",{"is-selected":j,"is-loading":!_&&E,"is-not-found":!_&&!E,"has-background-dim":0!==s},0===(e=s)||50===e?null:"has-background-dim-".concat(10*Math.round(e/10)),"center"!==a&&"has-".concat(a,"-content"),n),h=O.mediaSrc||f(_),m=_?(t=h)?{backgroundImage:"url(".concat(t,")")}:{}:{};k.color&&(m.backgroundColor=k.color),d&&(m.backgroundPosition="".concat(100*d.x,"% ").concat(100*d.y,"%"));return Object(c.createElement)(i.ResizableBox,{className:g,size:{height:b},minHeight:l.MIN_HEIGHT,enable:{bottom:!0},onResizeStop:function(e,t,n){w({height:parseInt(n.style.height)})},style:m},Object(c.createElement)("div",{className:"wc-block-featured-category__wrapper"},Object(c.createElement)("h2",{className:"wc-block-featured-category__title",dangerouslySetInnerHTML:{__html:_.name}}),p&&Object(c.createElement)("div",{className:"wc-block-featured-category__description",dangerouslySetInnerHTML:{__html:_.description}}),Object(c.createElement)("div",{className:"wc-block-featured-category__link"},Object(c.createElement)(r.InnerBlocks,{template:[["core/button",{text:Object(o.__)("Shop now","woo-gutenberg-products-block"),url:_.permalink,align:"center"}]],templateLock:"all"}))))}():Object(c.createElement)(i.Placeholder,{className:"wc-block-featured-category",icon:Object(c.createElement)(b.c,null),label:Object(o.__)("Featured Category","woo-gutenberg-products-block")},E?Object(c.createElement)(i.Spinner,null):Object(o.__)("No product category is selected.","woo-gutenberg-products-block")))});Object(a.registerBlockType)("woocommerce/featured-category",{title:Object(o.__)("Featured Category","woo-gutenberg-products-block"),icon:{src:Object(c.createElement)(b.c,null),foreground:"#96588a"},category:"woocommerce",keywords:[Object(o.__)("WooCommerce","woo-gutenberg-products-block")],description:Object(o.__)("Visually highlight a product category and encourage prompt action.","woo-gutenberg-products-block"),supports:{align:["wide","full"],html:!1},attributes:{contentAlign:{type:"string",default:"center"},dimRatio:{type:"number",default:50},editMode:{type:"boolean",default:!0},focalPoint:{type:"object"},height:{type:"number",default:l.DEFAULT_HEIGHT},mediaId:{type:"number",default:0},mediaSrc:{type:"string",default:""},overlayColor:{type:"string"},customOverlayColor:{type:"string"},linkText:{type:"string",default:Object(o.__)("Shop now","woo-gutenberg-products-block")},categoryId:{type:"number"},showDesc:{type:"boolean",default:!0}},edit:function(e){return Object(c.createElement)(O,e)},save:function(){return Object(c.createElement)(r.InnerBlocks.Content,null)}})},61:function(e,t){!function(){e.exports=this.wp.dom}()},64:function(e,t){},65:function(e,t){},67:function(e,t){},68:function(e,t){},71:function(e,t,n){"use strict";var c=n(16),o=n.n(c),r=n(38),a=n.n(r),l=n(8),i=n.n(l),s=n(9),u=n.n(s),d=n(10),b=n.n(d),p=n(11),g=n.n(p),h=n(15),f=n.n(h),m=n(12),O=n.n(m),j=n(0),w=n(21),v=n(25),y=Object(w.createHigherOrderComponent)(function(e){return function(t){function n(){var e;return i()(this,n),(e=b()(this,g()(n).apply(this,arguments))).state={error:null,loading:!1,product:null},e.loadProduct=e.loadProduct.bind(f()(e)),e}return O()(n,t),u()(n,[{key:"componentDidMount",value:function(){this.loadProduct()}},{key:"componentDidUpdate",value:function(e){e.attributes.productId!==this.props.attributes.productId&&this.loadProduct()}},{key:"loadProduct",value:function(){var e=this,t=this.props.attributes.productId;t?(this.setState({loading:!0}),Object(v.b)(t).then(function(t){e.setState({product:t,loading:!1,error:null})}).catch(function(t){var n="object"===a()(t)&&t.hasOwnProperty("message")?{apiMessage:t.message}:{apiMessage:null};e.setState({product:null,loading:!1,error:n})})):this.setState({product:null,loading:!1,error:null})}},{key:"render",value:function(){var t=this.state,n=t.error,c=t.loading,r=t.product;return Object(j.createElement)(e,o()({},this.props,{error:n,getProduct:this.loadProduct,isLoading:c,product:r}))}}]),n}(j.Component)},"withProduct"),E=Object(w.createHigherOrderComponent)(function(e){return function(t){function n(){var e;return i()(this,n),(e=b()(this,g()(n).apply(this,arguments))).state={error:null,loading:!1,category:null},e.loadCategory=e.loadCategory.bind(f()(e)),e}return O()(n,t),u()(n,[{key:"componentDidMount",value:function(){this.loadCategory()}},{key:"componentDidUpdate",value:function(e){e.attributes.categoryId!==this.props.attributes.categoryId&&this.loadCategory()}},{key:"loadCategory",value:function(){var e=this,t=this.props.attributes.categoryId;t?(this.setState({loading:!0}),Object(v.a)(t).then(function(t){e.setState({category:t,loading:!1,error:null})}).catch(function(t){var n="object"===a()(t)&&t.hasOwnProperty("message")?{apiMessage:t.message}:{apiMessage:null};e.setState({category:null,loading:!1,error:n})})):this.setState({category:null,loading:!1,error:null})}},{key:"render",value:function(){var t=this.state,n=t.error,c=t.loading,r=t.category;return Object(j.createElement)(e,o()({},this.props,{error:n,getCategory:this.loadCategory,isLoading:c,category:r}))}}]),n}(j.Component)},"withCategory"),_=n(4),k=(n(7),n(5)),C=Object(w.createHigherOrderComponent)(function(e){var t=function(t){function n(){var e;return i()(this,n),(e=b()(this,g()(n).apply(this,arguments))).state={list:[],loading:!0},e.debouncedOnSearch=Object(_.debounce)(e.onSearch.bind(f()(e)),400),e}return O()(n,t),u()(n,[{key:"componentDidMount",value:function(){var e=this,t=this.props.selected;Object(v.d)({selected:t}).then(function(t){e.setState({list:t,loading:!1})}).catch(function(){e.setState({list:[],loading:!1})})}},{key:"componentWillUnmount",value:function(){this.debouncedOnSearch.cancel()}},{key:"onSearch",value:function(e){var t=this,n=this.props.selected;Object(v.d)({selected:n,search:e}).then(function(e){t.setState({list:e,loading:!1})}).catch(function(){t.setState({list:[],loading:!1})})}},{key:"render",value:function(){var t=this.state,n=t.list,c=t.loading,r=this.props.selected;return Object(j.createElement)(e,o()({},this.props,{products:n,isLoading:c,selected:n.filter(function(e){var t=e.id;return r.includes(t)}),onSearch:k.IS_LARGE_CATALOG?this.debouncedOnSearch:null}))}}]),n}(j.Component);return t.defaultProps={selected:[]},t},"withSearchedProducts");n.d(t,"b",function(){return y}),n.d(t,"a",function(){return E}),n.d(t,"c",function(){return C})}});
|
1 |
+
this.wc=this.wc||{},this.wc.blocks=this.wc.blocks||{},this.wc.blocks["featured-category"]=function(e){function t(t){for(var c,a,l=t[0],i=t[1],s=t[2],d=0,b=[];d<l.length;d++)a=l[d],Object.prototype.hasOwnProperty.call(o,a)&&o[a]&&b.push(o[a][0]),o[a]=0;for(c in i)Object.prototype.hasOwnProperty.call(i,c)&&(e[c]=i[c]);for(u&&u(t);b.length;)b.shift()();return r.push.apply(r,s||[]),n()}function n(){for(var e,t=0;t<r.length;t++){for(var n=r[t],c=!0,l=1;l<n.length;l++){var i=n[l];0!==o[i]&&(c=!1)}c&&(r.splice(t--,1),e=a(a.s=n[0]))}return e}var c={},o={5:0},r=[];function a(t){if(c[t])return c[t].exports;var n=c[t]={i:t,l:!1,exports:{}};return e[t].call(n.exports,n,n.exports,a),n.l=!0,n.exports}a.m=e,a.c=c,a.d=function(e,t,n){a.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},a.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},a.t=function(e,t){if(1&t&&(e=a(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(a.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var c in e)a.d(n,c,function(t){return e[t]}.bind(null,c));return n},a.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return a.d(t,"a",t),t},a.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},a.p="";var l=window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[],i=l.push.bind(l);l.push=t,l=l.slice();for(var s=0;s<l.length;s++)t(l[s]);var u=i;return r.push([565,2,1,0]),n()}({0:function(e,t){!function(){e.exports=this.wp.element}()},1:function(e,t){!function(){e.exports=this.wp.i18n}()},12:function(e,t){!function(){e.exports=this.React}()},13:function(e,t){!function(){e.exports=this.moment}()},16:function(e,t){!function(){e.exports=this.wp.apiFetch}()},17:function(e,t){!function(){e.exports=this.wp.editor}()},18:function(e,t){!function(){e.exports=this.wp.url}()},20:function(e,t){!function(){e.exports=this.wp.compose}()},22:function(e,t){!function(){e.exports=this.wp.blocks}()},23:function(e,t,n){"use strict";var c=n(0),o=n(3),r=function(e){var t=e.className,n=e.fillColor;return Object(c.createElement)(o.Icon,{className:t,icon:Object(c.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 22.41"},Object(c.createElement)("g",null,Object(c.createElement)("g",null,Object(c.createElement)("path",{fill:n,d:"M16.55 0H1.75C.56 0 0 .52 0 1.68v9.24c0 1.15.56 1.92 1.75 1.92H2V4.76a2.51 2.51 0 0 1 2.74-2.68H18v-.4A1.51 1.51 0 0 0 16.55 0z"}),Object(c.createElement)("path",{fill:n,d:"M19.54 3.11H4.74C3.55 3.11 3 3.64 3 4.79V14c0 1.19.55 2 1.74 2H5V7.88A2.51 2.51 0 0 1 7.73 5.2H21v-.41a1.51 1.51 0 0 0-1.46-1.68z"}),Object(c.createElement)("path",{fill:n,d:"M22.53 6.23H7.73C6.54 6.23 6 6.75 6 7.91v9.24c0 1.15.56 1.92 1.75 1.92h7a.59.59 0 0 1 .32.11l1.61 1.15 2.83 2a.31.31 0 0 0 .18.05.3.3 0 0 0 .31-.3v-2.73a.3.3 0 0 1 .28-.28h2.31A1.47 1.47 0 0 0 24 17.6V7.91a1.52 1.52 0 0 0-1.47-1.68z"}),Object(c.createElement)("path",{fill:"#ffffff",d:"M10.2 10.92l1.06-2.14 1.05 2.14 2.37.35-1.71 1.66.4 2.36-2.11-1.11-.17.09-.52.27-.51.26-.92.49.18-1.02.09-.57.1-.56.03-.21-1.71-1.66 2.37-.35zM21.46 14.25h-4.4a.69.69 0 0 1-.69-.69.68.68 0 0 1 .69-.68h4.4a.68.68 0 0 1 .69.68.69.69 0 0 1-.69.69zM21.46 11.19h-4.4a.69.69 0 1 1 0-1.37h4.4a.69.69 0 1 1 0 1.37z"}))))})},a=function(){return Object(c.createElement)(o.Icon,{icon:Object(c.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},Object(c.createElement)("path",{fillRule:"nonzero",d:"M21.913 7.0946H2.0254c-1.1708 0-2.0984.9908-2.0205 2.16l.741 11.0724c.0714 1.0638.9552 1.8892 2.0206 1.8892h18.4054c1.0654 0 1.9492-.8254 2.0205-1.8892l.7411-11.0724c.0779-1.1692-.8497-2.16-2.0205-2.16zm-8.8006-4.6573h5.987c1.119 0 2.0255.9065 2.0255 2.0254v.934H2.8103V2.0255C2.8103.9064 3.7168 0 4.8357 0h6.2513c1.119 0 2.0254.9065 2.0254 2.0254v.4119zm-7.0589 11.619a.926.926 0 1 1 0-1.852h11.8297a.926.926 0 1 1 0 1.852H6.0535z"}))})},l=function(){return Object(c.createElement)(o.Icon,{icon:Object(c.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},Object(c.createElement)("path",{d:"M22 7.5H2c-1.2 0-2.1 1-2 2.2l.7 11.1c.1 1.1 1 1.9 2 1.9h18.5c1.1 0 2-.8 2-1.9L24 9.6c.1-1.1-.9-2.1-2-2.1zM13.1 2.8v-.4c0-1.1-.9-2-2-2H4.8c-1.1 0-2 .9-2 2v3.4h18.4v-1c0-1.1-.9-2-2-2h-6.1z"}),Object(c.createElement)("path",{fill:"#fff",d:"M14.4 18.7L12 17.4l-2.4 1.3.5-2.6-1.9-1.9 2.6-.4 1.2-2.4 1.2 2.4 2.6.4-1.9 1.9z"}))})},i=function(){return Object(c.createElement)(o.Icon,{className:"material-icon",icon:Object(c.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},Object(c.createElement)("path",{d:"M0 0h24v24H0z",fill:"none"}),Object(c.createElement)("path",{d:"M23 12l-2.44-2.78.34-3.68-3.61-.82-1.89-3.18L12 3 8.6 1.54 6.71 4.72l-3.61.81.34 3.68L1 12l2.44 2.78-.34 3.69 3.61.82 1.89 3.18L12 21l3.4 1.46 1.89-3.18 3.61-.82-.34-3.68L23 12zm-10 5h-2v-2h2v2zm0-4h-2V7h2v6z"}))})},s=function(){return Object(c.createElement)(o.Icon,{icon:Object(c.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},Object(c.createElement)("path",{fill:"#1E8CBE",d:"M12 7c-2.76 0-5 2.24-5 5s2.24 5 5 5 5-2.24 5-5-2.24-5-5-5zm0-5C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"}))})},u=function(){return Object(c.createElement)(o.Icon,{icon:Object(c.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},Object(c.createElement)("path",{fill:"#6C7781",d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"}))})},d=function(e){var t=e.className,n=e.fillColor;return Object(c.createElement)(o.Icon,{className:t,icon:Object(c.createElement)("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},Object(c.createElement)("path",{fill:n,d:"M2.3,17.3h9.3c0.1,0,0.3,0,0.4,0.1l5.9,4.2c0.3,0.2,0.7,0,0.7-0.3v-3.7c0-0.2,0.2-0.4,0.4-0.4H22 c1.1,0,2-0.9,2-2V2.5c0-1.2-0.7-2.2-2-2.2H2.3C0.7,0.2,0,0.9,0,2.5v12.3C0,16.3,0.7,17.3,2.3,17.3z"}),Object(c.createElement)("polygon",{fill:"#ffffff",points:"8.8,12.1 6.5,10.9 4.1,12.1 4.5,9.5 2.6,7.6 5.3,7.2 6.5,4.8 7.6,7.2 10.3,7.6 8.4,9.5"}),Object(c.createElement)("path",{fill:"#ffffff",d:"M20.7,7.9h-7c-0.5,0-0.9-0.4-0.9-0.9S13.2,6,13.7,6h7c0.5,0,0.9,0.4,0.9,0.9S21.2,7.9,20.7,7.9z"}),Object(c.createElement)("path",{fill:"#ffffff",d:"M20.7,11.5h-7c-0.5,0-0.9-0.4-0.9-0.9s0.4-0.9,0.9-0.9h7c0.5,0,0.9,0.4,0.9,0.9S21.2,11.5,20.7,11.5z"}))})},b=function(e){var t=e.className,n=e.fillColor;return Object(c.createElement)(o.Icon,{className:t,icon:Object(c.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 23"},Object(c.createElement)("path",{fill:n,d:"M21.9943 7.0957H2.00638C0.807102 7.0957 -0.0923543 8.0951 0.0075853 9.29437L0.707162 20.3877C0.807102 21.487 1.70656 22.2865 2.70595 22.2865H21.1948C22.2941 22.2865 23.1936 21.487 23.1936 20.3877L23.9931 9.29437C24.093 8.0951 23.0936 7.0957 21.9943 7.0957Z"}),Object(c.createElement)("path",{fill:n,d:"M13.0921 2.39855V1.99879C13.0921 0.899456 12.1926 0 11.0933 0H4.7971C3.69777 0 2.79831 0.899456 2.79831 1.99879V5.39674H21.1872V4.49728C21.1872 3.39795 20.2877 2.49849 19.1884 2.49849H13.0921V2.39855Z"}),Object(c.createElement)("path",{fill:"white",d:"M8.63115 17.126L6.5415 15.9449L4.361 17.126L4.72442 14.6729L2.99819 13.0376L5.45125 12.6742L6.5415 10.4937L7.5409 12.6742L9.99396 13.0376L8.26773 14.6729L8.63115 17.126Z"}),Object(c.createElement)("path",{fill:"white",d:"M19.1907 13.5918H12.9899C12.547 13.5918 12.1926 13.1921 12.1926 12.6924C12.1926 12.1927 12.547 11.7929 12.9899 11.7929H19.1907C19.6336 11.7929 19.9879 12.1927 19.9879 12.6924C19.9879 13.1921 19.6336 13.5918 19.1907 13.5918Z"}),Object(c.createElement)("path",{fill:"white",d:"M19.1907 17.1897H12.9899C12.547 17.1897 12.1926 16.7899 12.1926 16.2902C12.1926 15.7905 12.547 15.3907 12.9899 15.3907H19.1907C19.6336 15.3907 19.9879 15.7905 19.9879 16.2902C19.9879 16.7899 19.6336 17.1897 19.1907 17.1897Z"}))})},p=function(){return Object(c.createElement)(o.Icon,{className:"material-icon",icon:Object(c.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},Object(c.createElement)("path",{d:"M13 13v8h8v-8h-8zM3 21h8v-8H3v8zM3 3v8h8V3H3zm13.66-1.31L11 7.34 16.66 13l5.66-5.66-5.66-5.65z"}),Object(c.createElement)("path",{d:"M0 0h24v24H0z",fill:"none"}))})},g=n(6),h=n.n(g),f=(n(2),function(e){var t=e.size,n=void 0===t?20:t,r=e.className;return Object(c.createElement)(o.Icon,{className:h()("woo-icon",r),icon:Object(c.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",height:n,width:Math.floor(1.67*n),viewBox:"0 0 245 145"},Object(c.createElement)("path",{fill:"#96588A",d:"M22.76 0h199.1a22.77 22.77 0 0 1 22.8 22.76v75.92a22.77 22.77 0 0 1-22.78 22.78h-71.41l9.77 24-43.13-24H22.76C10.1946 121.449.011 111.2654 0 98.7V22.76C.011 10.1946 10.1946.011 22.76 0z"}),Object(c.createElement)("path",{fill:"#FFF",fillRule:"nonzero",d:"M12.32 20.63a8.16 8.16 0 0 1 6.25-3.09c5.0733-.36 7.9867 2.0333 8.74 7.18 3.14 20.86 6.4933 38.5633 10.06 53.11l21.92-41.69c2-3.76 4.49-5.76 7.52-6 4.3867-.3067 7.13 2.49 8.23 8.39a186 186 0 0 0 9.47 34.23c2.62-25.38 7.0133-43.7133 13.18-55a7.73 7.73 0 0 1 6.6-4.43 8.8 8.8 0 0 1 6.32 2 7.75 7.75 0 0 1 3.05 5.74 8.52 8.52 0 0 1-1 4.77c-3.9 7.24-7.12 19.28-9.66 36.12-2.48 16.2533-3.3967 28.9633-2.75 38.13a12.25 12.25 0 0 1-1.16 6.56 6.32 6.32 0 0 1-5.33 3.53c-2.6667.18-5.3033-1.0567-7.91-3.71-9.2933-9.54-16.6567-23.7267-22.09-42.56C57.3 76.7167 52.48 86.3333 49.3 92.76c-5.86 11.3333-10.89 17.13-15.09 17.39-2.7333.1933-5.0667-2.0933-7-6.86-5.1-13.0933-10.5833-38.4033-16.45-75.93a8.56 8.56 0 0 1 1.56-6.73zM227.23 36.34a23.17 23.17 0 0 0-16-11.59 26.25 26.25 0 0 0-5.42-.58c-9.5867 0-17.41 5-23.47 15a53 53 0 0 0-7.78 28.16c0 7.7333 1.6167 14.3333 4.85 19.8a23.15 23.15 0 0 0 16 11.59 26.28 26.28 0 0 0 5.42.59c9.68 0 17.5033-5 23.47-15A53.89 53.89 0 0 0 232.08 56c0-7.7333-1.6167-14.2867-4.85-19.66zm-12.61 27.72c-1.3733 6.56-3.9167 11.5-7.63 14.82-2.9267 2.6667-5.6133 3.7433-8.06 3.23-2.4467-.5133-4.4033-2.6667-5.87-6.46a25.68 25.68 0 0 1-1.76-9.09 35.9 35.9 0 0 1 .73-7.34 33 33 0 0 1 5.28-11.88c3.3333-4.8933 6.8067-6.9467 10.42-6.16 2.44.4867 4.3933 2.64 5.86 6.46a25.68 25.68 0 0 1 1.76 9.12 35.73 35.73 0 0 1-.73 7.33v-.03zM164.57 36.34a23.2 23.2 0 0 0-16-11.59 26.42 26.42 0 0 0-5.43-.58c-9.5933 0-17.4167 5-23.47 15a53 53 0 0 0-7.78 28.16c0 7.7333 1.6133 14.3333 4.84 19.8a23.19 23.19 0 0 0 16 11.59 26.44 26.44 0 0 0 5.43.59c9.68 0 17.5033-5 23.47-15A53.88 53.88 0 0 0 169.4 56c0-7.7333-1.6133-14.2867-4.84-19.66h.01zm-12.61 27.72c-1.3667 6.56-3.91 11.5-7.63 14.82-2.93 2.64-5.63 3.72-8.07 3.23-2.44-.49-4.4-2.64-5.86-6.46a25.7 25.7 0 0 1-1.77-9.09 35.9 35.9 0 0 1 .74-7.34 33 33 0 0 1 5.28-11.88c3.3333-4.8933 6.8067-6.9467 10.42-6.16 2.44.4867 4.3933 2.64 5.86 6.46a25.91 25.91 0 0 1 1.76 9.12 35.73 35.73 0 0 1-.73 7.33v-.03z"}))})});n.d(t,"a",(function(){return r})),n.d(t,"b",(function(){return a})),n.d(t,"c",(function(){return l})),n.d(t,"d",(function(){return i})),n.d(t,"e",(function(){return s})),n.d(t,"f",(function(){return u})),n.d(t,"h",(function(){return d})),n.d(t,"g",(function(){return b})),n.d(t,"i",(function(){return p})),n.d(t,"j",(function(){return f}))},24:function(e,t,n){"use strict";n.d(t,"d",(function(){return b})),n.d(t,"b",(function(){return p})),n.d(t,"c",(function(){return g})),n.d(t,"a",(function(){return h}));var c=n(19),o=n.n(c),r=n(18),a=n(16),l=n.n(a),i=n(4),s=n(5);function u(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var c=Object.getOwnPropertySymbols(e);t&&(c=c.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,c)}return n}function d(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?u(n,!0).forEach((function(t){o()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):u(n).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var b=function(e){var t=e.selected,n=void 0===t?[]:t,c=e.search,o=void 0===c?"":c,a=e.queryArgs,u=function(e){var t=e.selected,n=void 0===t?[]:t,c=e.search,o=void 0===c?"":c,a=e.queryArgs,l=void 0===a?[]:a,i={per_page:s.IS_LARGE_CATALOG?100:-1,catalog_visibility:"any",status:"publish",search:o,orderby:"title",order:"asc"},u=[Object(r.addQueryArgs)(s.ENDPOINTS.products,d({},i,{},l))];return s.IS_LARGE_CATALOG&&n.length&&u.push(Object(r.addQueryArgs)(s.ENDPOINTS.products,{catalog_visibility:"any",status:"publish",include:n})),u}({selected:n,search:o,queryArgs:void 0===a?[]:a});return Promise.all(u.map((function(e){return l()({path:e})}))).then((function(e){return Object(i.uniqBy)(Object(i.flatten)(e),"id")}))},p=function(e){return l()({path:"".concat(s.ENDPOINTS.products,"/").concat(e)})},g=function(e){var t=e.selected,n=function(e){var t=e.selected,n=void 0===t?[]:t,c=e.search,o=[Object(r.addQueryArgs)("".concat(s.ENDPOINTS.products,"/tags"),{per_page:s.LIMIT_TAGS?100:-1,orderby:s.LIMIT_TAGS?"count":"name",order:s.LIMIT_TAGS?"desc":"asc",search:c})];return s.LIMIT_TAGS&&n.length&&o.push(Object(r.addQueryArgs)("".concat(s.ENDPOINTS.products,"/tags"),{include:n})),o}({selected:void 0===t?[]:t,search:e.search});return Promise.all(n.map((function(e){return l()({path:e})}))).then((function(e){return Object(i.uniqBy)(Object(i.flatten)(e),"id")}))},h=function(e){return l()({path:"".concat(s.ENDPOINTS.categories,"/").concat(e)})}},3:function(e,t){!function(){e.exports=this.wp.components}()},32:function(e,t){!function(){e.exports=this.wp.keycodes}()},38:function(e,t){!function(){e.exports=this.wp.escapeHtml}()},4:function(e,t){!function(){e.exports=this.lodash}()},40:function(e,t,n){"use strict";var c=n(15),o=n.n(c),r=n(7),a=n.n(r),l=n(8),i=n.n(l),s=n(9),u=n.n(s),d=n(10),b=n.n(d),p=n(14),g=n.n(p),h=n(11),f=n.n(h),m=n(0),O=n(1),j=n(18),w=n(16),v=n.n(w),y=n(4),E=(n(2),n(25)),_=n(3),k=n(5),C=(n(89),function(e){function t(){var e;return a()(this,t),(e=u()(this,b()(t).apply(this,arguments))).state={list:[],loading:!0},e.renderItem=e.renderItem.bind(g()(e)),e}return f()(t,e),i()(t,[{key:"componentDidMount",value:function(){var e=this;v()({path:Object(j.addQueryArgs)("".concat(k.ENDPOINTS.products,"/categories"),{per_page:-1})}).then((function(t){e.setState({list:t,loading:!1})})).catch((function(){e.setState({list:[],loading:!1})}))}},{key:"renderItem",value:function(e){var t=e.item,n=e.search,c=e.depth,r=void 0===c?0:c,a=["woocommerce-product-categories__item"];n.length&&a.push("is-searching"),0===r&&0!==t.parent&&a.push("is-skip-level");var l=t.breadcrumbs.length?"".concat(t.breadcrumbs.join(", "),", ").concat(t.name):t.name;return Object(m.createElement)(E.b,o()({className:a.join(" ")},e,{showCount:!0,"aria-label":Object(O.sprintf)(Object(O._n)("%s, has %d product","%s, has %d products",t.count,"woo-gutenberg-products-block"),l,t.count)}))}},{key:"render",value:function(){var e=this.state,t=e.list,n=e.loading,c=this.props,o=c.onChange,r=c.onOperatorChange,a=c.operator,l=c.selected,i=c.isSingle,s={clear:Object(O.__)("Clear all product categories","woo-gutenberg-products-block"),list:Object(O.__)("Product Categories","woo-gutenberg-products-block"),noItems:Object(O.__)("Your store doesn't have any product categories.","woo-gutenberg-products-block"),search:Object(O.__)("Search for product categories","woo-gutenberg-products-block"),selected:function(e){return Object(O.sprintf)(Object(O._n)("%d category selected","%d categories selected",e,"woo-gutenberg-products-block"),e)},updated:Object(O.__)("Category search results updated.","woo-gutenberg-products-block")};return Object(m.createElement)(m.Fragment,null,Object(m.createElement)(E.a,{className:"woocommerce-product-categories",list:t,isLoading:n,selected:l.map((function(e){return Object(y.find)(t,{id:e})})).filter(Boolean),onChange:o,renderItem:this.renderItem,messages:s,isHierarchical:!0,isSingle:i}),!!r&&Object(m.createElement)("div",{className:l.length<2?"screen-reader-text":""},Object(m.createElement)(_.SelectControl,{className:"woocommerce-product-categories__operator",label:Object(O.__)("Display products matching","woo-gutenberg-products-block"),help:Object(O.__)("Pick at least two categories to use this setting.","woo-gutenberg-products-block"),value:a,onChange:r,options:[{label:Object(O.__)("Any selected categories","woo-gutenberg-products-block"),value:"any"},{label:Object(O.__)("All selected categories","woo-gutenberg-products-block"),value:"all"}]})))}}]),t}(m.Component));C.defaultProps={operator:"any",isSingle:!1},t.a=C},43:function(e,t){!function(){e.exports=this.ReactDOM}()},46:function(e,t){!function(){e.exports=this.wp.viewport}()},5:function(e,t){!function(){e.exports=this.wc["wc-block-settings"]}()},50:function(e,t){!function(){e.exports=this.wp.hooks}()},51:function(e,t,n){"use strict";var c=n(0),o=n(1),r=(n(2),n(27)),a=n.n(r),l=n(6),i=n.n(l),s=n(38),u=n(3);t.a=function(e){var t,n,r=e.className,l=e.error,d=e.isLoading,b=e.onRetry;return Object(c.createElement)(u.Placeholder,{icon:Object(c.createElement)(a.a,{icon:"notice"}),label:Object(o.__)("Sorry, an error occurred","woo-gutenberg-products-block"),className:i()("wc-block-api-error",r)},Object(c.createElement)("div",{className:"wc-block-error__message"},(n=(t=l).apiMessage,t.message||(n?Object(c.createElement)("span",null,Object(o.__)("The following error was returned from the API","woo-gutenberg-products-block"),Object(c.createElement)("br",null),Object(c.createElement)("code",null,Object(s.escapeHTML)(n))):Object(o.__)("An unknown error occurred which prevented the block from being updated.","woo-gutenberg-products-block")))),b&&Object(c.createElement)(c.Fragment,null,d?Object(c.createElement)(u.Spinner,null):Object(c.createElement)(u.Button,{isDefault:!0,onClick:b},Object(o.__)("Retry","woo-gutenberg-products-block"))))}},52:function(e,t){!function(){e.exports=this.wp.htmlEntities}()},53:function(e,t){!function(){e.exports=this.wp.date}()},558:function(e,t,n){var c=n(559);"string"==typeof c&&(c=[[e.i,c,""]]);var o={insert:"head",singleton:!1};n(34)(c,o);c.locals&&(e.exports=c.locals)},559:function(e,t,n){},565:function(e,t,n){"use strict";n.r(t);var c=n(0),o=n(1),r=n(17),a=n(22),l=n(5),i=(n(556),n(558),n(3)),s=n(6),u=n.n(s),d=n(20),b=(n(2),n(23)),p=n(40),g=n(51),h=n(4);function f(e){return e&&Object(h.isObject)(e.image)?e.image.src:""}var m=n(71),O=Object(d.compose)([m.a,Object(r.withColors)({overlayColor:"background-color"}),i.withSpokenMessages])((function(e){var t,n,a,s,d,m,O=e.attributes,j=e.isSelected,w=e.setAttributes,v=e.error,y=e.getCategory,E=e.isLoading,_=e.category,k=e.overlayColor,C=e.setOverlayColor,S=e.debouncedSpeak,M=O.editMode;return v?Object(c.createElement)(g.a,{className:"wc-block-featured-category-error",error:v,isLoading:E,onRetry:y}):M?Object(c.createElement)(i.Placeholder,{icon:Object(c.createElement)(b.c,null),label:Object(o.__)("Featured Category","woo-gutenberg-products-block"),className:"wc-block-featured-category"},Object(o.__)("Visually highlight a product category and encourage prompt action.","woo-gutenberg-products-block"),Object(c.createElement)("div",{className:"wc-block-featured-category__selection"},Object(c.createElement)(p.a,{selected:[O.categoryId],onChange:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=e[0]?e[0].id:0;w({categoryId:t,mediaId:0,mediaSrc:""})},isSingle:!0}),Object(c.createElement)(i.Button,{isDefault:!0,onClick:function(){w({editMode:!1}),S(Object(o.__)("Showing Featured Product block preview.","woo-gutenberg-products-block"))}},Object(o.__)("Done","woo-gutenberg-products-block")))):Object(c.createElement)(c.Fragment,null,(d=O.contentAlign,m=O.mediaId||function(e){return e&&Object(h.isObject)(e.image)?e.image.id:0}(_),Object(c.createElement)(r.BlockControls,null,Object(c.createElement)(r.AlignmentToolbar,{value:d,onChange:function(e){w({contentAlign:e})}}),Object(c.createElement)(r.MediaUploadCheck,null,Object(c.createElement)(i.Toolbar,null,Object(c.createElement)(r.MediaUpload,{onSelect:function(e){w({mediaId:e.id,mediaSrc:e.url})},allowedTypes:["image"],value:m,render:function(e){var t=e.open;return Object(c.createElement)(i.IconButton,{className:"components-toolbar__control",label:Object(o.__)("Edit media"),icon:"format-image",onClick:t,disabled:!_})}}))))),(t=O.mediaSrc||f(_),n=O.focalPoint,a=void 0===n?{x:.5,y:.5}:n,s="function"==typeof i.FocalPointPicker,Object(c.createElement)(r.InspectorControls,{key:"inspector"},Object(c.createElement)(i.PanelBody,{title:Object(o.__)("Content","woo-gutenberg-products-block")},Object(c.createElement)(i.ToggleControl,{label:Object(o.__)("Show description","woo-gutenberg-products-block"),checked:O.showDesc,onChange:function(){return w({showDesc:!O.showDesc})}})),Object(c.createElement)(r.PanelColorSettings,{title:Object(o.__)("Overlay","woo-gutenberg-products-block"),colorSettings:[{value:k.color,onChange:C,label:Object(o.__)("Overlay Color","woo-gutenberg-products-block")}]},!!t&&Object(c.createElement)(c.Fragment,null,Object(c.createElement)(i.RangeControl,{label:Object(o.__)("Background Opacity","woo-gutenberg-products-block"),value:O.dimRatio,onChange:function(e){return w({dimRatio:e})},min:0,max:100,step:10}),s&&Object(c.createElement)(i.FocalPointPicker,{label:Object(o.__)("Focal Point Picker"),url:t,value:a,onChange:function(e){return w({focalPoint:e})}}))))),_?function(){var e,t,n=O.className,a=O.contentAlign,s=O.dimRatio,d=O.focalPoint,b=O.height,p=O.showDesc,g=u()("wc-block-featured-category",{"is-selected":j,"is-loading":!_&&E,"is-not-found":!_&&!E,"has-background-dim":0!==s},0===(e=s)||50===e?null:"has-background-dim-".concat(10*Math.round(e/10)),"center"!==a&&"has-".concat(a,"-content"),n),h=O.mediaSrc||f(_),m=_?(t=h)?{backgroundImage:"url(".concat(t,")")}:{}:{};k.color&&(m.backgroundColor=k.color),d&&(m.backgroundPosition="".concat(100*d.x,"% ").concat(100*d.y,"%"));return Object(c.createElement)(i.ResizableBox,{className:g,size:{height:b},minHeight:l.MIN_HEIGHT,enable:{bottom:!0},onResizeStop:function(e,t,n){w({height:parseInt(n.style.height)})},style:m},Object(c.createElement)("div",{className:"wc-block-featured-category__wrapper"},Object(c.createElement)("h2",{className:"wc-block-featured-category__title",dangerouslySetInnerHTML:{__html:_.name}}),p&&Object(c.createElement)("div",{className:"wc-block-featured-category__description",dangerouslySetInnerHTML:{__html:_.description}}),Object(c.createElement)("div",{className:"wc-block-featured-category__link"},Object(c.createElement)(r.InnerBlocks,{template:[["core/button",{text:Object(o.__)("Shop now","woo-gutenberg-products-block"),url:_.permalink,align:"center"}]],templateLock:"all"}))))}():Object(c.createElement)(i.Placeholder,{className:"wc-block-featured-category",icon:Object(c.createElement)(b.c,null),label:Object(o.__)("Featured Category","woo-gutenberg-products-block")},E?Object(c.createElement)(i.Spinner,null):Object(o.__)("No product category is selected.","woo-gutenberg-products-block")))}));Object(a.registerBlockType)("woocommerce/featured-category",{title:Object(o.__)("Featured Category","woo-gutenberg-products-block"),icon:{src:Object(c.createElement)(b.c,null),foreground:"#96588a"},category:"woocommerce",keywords:[Object(o.__)("WooCommerce","woo-gutenberg-products-block")],description:Object(o.__)("Visually highlight a product category and encourage prompt action.","woo-gutenberg-products-block"),supports:{align:["wide","full"],html:!1},attributes:{contentAlign:{type:"string",default:"center"},dimRatio:{type:"number",default:50},editMode:{type:"boolean",default:!0},focalPoint:{type:"object"},height:{type:"number",default:l.DEFAULT_HEIGHT},mediaId:{type:"number",default:0},mediaSrc:{type:"string",default:""},overlayColor:{type:"string"},customOverlayColor:{type:"string"},linkText:{type:"string",default:Object(o.__)("Shop now","woo-gutenberg-products-block")},categoryId:{type:"number"},showDesc:{type:"boolean",default:!0}},edit:function(e){return Object(c.createElement)(O,e)},save:function(){return Object(c.createElement)(r.InnerBlocks.Content,null)}})},59:function(e,t){!function(){e.exports=this.wp.dom}()},62:function(e,t){},63:function(e,t){},64:function(e,t){},66:function(e,t){},67:function(e,t){},71:function(e,t,n){"use strict";var c=n(15),o=n.n(c),r=n(37),a=n.n(r),l=n(7),i=n.n(l),s=n(8),u=n.n(s),d=n(9),b=n.n(d),p=n(10),g=n.n(p),h=n(14),f=n.n(h),m=n(11),O=n.n(m),j=n(0),w=n(20),v=n(24),y=Object(w.createHigherOrderComponent)((function(e){return function(t){function n(){var e;return i()(this,n),(e=b()(this,g()(n).apply(this,arguments))).state={error:null,loading:!1,product:null},e.loadProduct=e.loadProduct.bind(f()(e)),e}return O()(n,t),u()(n,[{key:"componentDidMount",value:function(){this.loadProduct()}},{key:"componentDidUpdate",value:function(e){e.attributes.productId!==this.props.attributes.productId&&this.loadProduct()}},{key:"loadProduct",value:function(){var e=this,t=this.props.attributes.productId;t?(this.setState({loading:!0}),Object(v.b)(t).then((function(t){e.setState({product:t,loading:!1,error:null})})).catch((function(t){var n="object"===a()(t)&&t.hasOwnProperty("message")?{apiMessage:t.message}:{apiMessage:null};e.setState({product:null,loading:!1,error:n})}))):this.setState({product:null,loading:!1,error:null})}},{key:"render",value:function(){var t=this.state,n=t.error,c=t.loading,r=t.product;return Object(j.createElement)(e,o()({},this.props,{error:n,getProduct:this.loadProduct,isLoading:c,product:r}))}}]),n}(j.Component)}),"withProduct"),E=Object(w.createHigherOrderComponent)((function(e){return function(t){function n(){var e;return i()(this,n),(e=b()(this,g()(n).apply(this,arguments))).state={error:null,loading:!1,category:null},e.loadCategory=e.loadCategory.bind(f()(e)),e}return O()(n,t),u()(n,[{key:"componentDidMount",value:function(){this.loadCategory()}},{key:"componentDidUpdate",value:function(e){e.attributes.categoryId!==this.props.attributes.categoryId&&this.loadCategory()}},{key:"loadCategory",value:function(){var e=this,t=this.props.attributes.categoryId;t?(this.setState({loading:!0}),Object(v.a)(t).then((function(t){e.setState({category:t,loading:!1,error:null})})).catch((function(t){var n="object"===a()(t)&&t.hasOwnProperty("message")?{apiMessage:t.message}:{apiMessage:null};e.setState({category:null,loading:!1,error:n})}))):this.setState({category:null,loading:!1,error:null})}},{key:"render",value:function(){var t=this.state,n=t.error,c=t.loading,r=t.category;return Object(j.createElement)(e,o()({},this.props,{error:n,getCategory:this.loadCategory,isLoading:c,category:r}))}}]),n}(j.Component)}),"withCategory"),_=n(4),k=(n(2),n(5)),C=Object(w.createHigherOrderComponent)((function(e){var t=function(t){function n(){var e;return i()(this,n),(e=b()(this,g()(n).apply(this,arguments))).state={list:[],loading:!0},e.debouncedOnSearch=Object(_.debounce)(e.onSearch.bind(f()(e)),400),e}return O()(n,t),u()(n,[{key:"componentDidMount",value:function(){var e=this,t=this.props.selected;Object(v.d)({selected:t}).then((function(t){e.setState({list:t,loading:!1})})).catch((function(){e.setState({list:[],loading:!1})}))}},{key:"componentWillUnmount",value:function(){this.debouncedOnSearch.cancel()}},{key:"onSearch",value:function(e){var t=this,n=this.props.selected;Object(v.d)({selected:n,search:e}).then((function(e){t.setState({list:e,loading:!1})})).catch((function(){t.setState({list:[],loading:!1})}))}},{key:"render",value:function(){var t=this.state,n=t.list,c=t.loading,r=this.props.selected;return Object(j.createElement)(e,o()({},this.props,{products:n,isLoading:c,selected:n.filter((function(e){var t=e.id;return r.includes(t)})),onSearch:k.IS_LARGE_CATALOG?this.debouncedOnSearch:null}))}}]),n}(j.Component);return t.defaultProps={selected:[]},t}),"withSearchedProducts");n.d(t,"b",(function(){return y})),n.d(t,"a",(function(){return E})),n.d(t,"c",(function(){return C}))}});
|
build/featured-product.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
this.wc=this.wc||{},this.wc.blocks=this.wc.blocks||{},this.wc.blocks["featured-product"]=function(e){function t(t){for(var c,a,i=t[0],l=t[1],s=t[2],d=0,p=[];d<i.length;d++)a=i[d],Object.prototype.hasOwnProperty.call(r,a)&&r[a]&&p.push(r[a][0]),r[a]=0;for(c in l)Object.prototype.hasOwnProperty.call(l,c)&&(e[c]=l[c]);for(u&&u(t);p.length;)p.shift()();return o.push.apply(o,s||[]),n()}function n(){for(var e,t=0;t<o.length;t++){for(var n=o[t],c=!0,i=1;i<n.length;i++){var l=n[i];0!==r[l]&&(c=!1)}c&&(o.splice(t--,1),e=a(a.s=n[0]))}return e}var c={},r={6:0},o=[];function a(t){if(c[t])return c[t].exports;var n=c[t]={i:t,l:!1,exports:{}};return e[t].call(n.exports,n,n.exports,a),n.l=!0,n.exports}a.m=e,a.c=c,a.d=function(e,t,n){a.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},a.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},a.t=function(e,t){if(1&t&&(e=a(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(a.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var c in e)a.d(n,c,function(t){return e[t]}.bind(null,c));return n},a.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return a.d(t,"a",t),t},a.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},a.p="";var i=window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[],l=i.push.bind(i);i.push=t,i=i.slice();for(var s=0;s<i.length;s++)t(i[s]);var u=l;return o.push([546,2,1,0]),n()}({0:function(e,t){!function(){e.exports=this.wp.element}()},1:function(e,t){!function(){e.exports=this.wp.i18n}()},13:function(e,t){!function(){e.exports=this.React}()},14:function(e,t){!function(){e.exports=this.moment}()},17:function(e,t){!function(){e.exports=this.wp.apiFetch}()},18:function(e,t){!function(){e.exports=this.wp.editor}()},19:function(e,t){!function(){e.exports=this.wp.url}()},2:function(e,t){!function(){e.exports=this.wp.components}()},21:function(e,t){!function(){e.exports=this.wp.compose}()},23:function(e,t){!function(){e.exports=this.wp.blocks}()},24:function(e,t,n){"use strict";var c=n(0),r=n(2),o=function(e){var t=e.className,n=e.fillColor;return Object(c.createElement)(r.Icon,{className:t,icon:Object(c.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 22.41"},Object(c.createElement)("g",null,Object(c.createElement)("g",null,Object(c.createElement)("path",{fill:n,d:"M16.55 0H1.75C.56 0 0 .52 0 1.68v9.24c0 1.15.56 1.92 1.75 1.92H2V4.76a2.51 2.51 0 0 1 2.74-2.68H18v-.4A1.51 1.51 0 0 0 16.55 0z"}),Object(c.createElement)("path",{fill:n,d:"M19.54 3.11H4.74C3.55 3.11 3 3.64 3 4.79V14c0 1.19.55 2 1.74 2H5V7.88A2.51 2.51 0 0 1 7.73 5.2H21v-.41a1.51 1.51 0 0 0-1.46-1.68z"}),Object(c.createElement)("path",{fill:n,d:"M22.53 6.23H7.73C6.54 6.23 6 6.75 6 7.91v9.24c0 1.15.56 1.92 1.75 1.92h7a.59.59 0 0 1 .32.11l1.61 1.15 2.83 2a.31.31 0 0 0 .18.05.3.3 0 0 0 .31-.3v-2.73a.3.3 0 0 1 .28-.28h2.31A1.47 1.47 0 0 0 24 17.6V7.91a1.52 1.52 0 0 0-1.47-1.68z"}),Object(c.createElement)("path",{fill:"#ffffff",d:"M10.2 10.92l1.06-2.14 1.05 2.14 2.37.35-1.71 1.66.4 2.36-2.11-1.11-.17.09-.52.27-.51.26-.92.49.18-1.02.09-.57.1-.56.03-.21-1.71-1.66 2.37-.35zM21.46 14.25h-4.4a.69.69 0 0 1-.69-.69.68.68 0 0 1 .69-.68h4.4a.68.68 0 0 1 .69.68.69.69 0 0 1-.69.69zM21.46 11.19h-4.4a.69.69 0 1 1 0-1.37h4.4a.69.69 0 1 1 0 1.37z"}))))})},a=function(){return Object(c.createElement)(r.Icon,{icon:Object(c.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},Object(c.createElement)("path",{fillRule:"nonzero",d:"M21.913 7.0946H2.0254c-1.1708 0-2.0984.9908-2.0205 2.16l.741 11.0724c.0714 1.0638.9552 1.8892 2.0206 1.8892h18.4054c1.0654 0 1.9492-.8254 2.0205-1.8892l.7411-11.0724c.0779-1.1692-.8497-2.16-2.0205-2.16zm-8.8006-4.6573h5.987c1.119 0 2.0255.9065 2.0255 2.0254v.934H2.8103V2.0255C2.8103.9064 3.7168 0 4.8357 0h6.2513c1.119 0 2.0254.9065 2.0254 2.0254v.4119zm-7.0589 11.619a.926.926 0 1 1 0-1.852h11.8297a.926.926 0 1 1 0 1.852H6.0535z"}))})},i=function(){return Object(c.createElement)(r.Icon,{icon:Object(c.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},Object(c.createElement)("path",{d:"M22 7.5H2c-1.2 0-2.1 1-2 2.2l.7 11.1c.1 1.1 1 1.9 2 1.9h18.5c1.1 0 2-.8 2-1.9L24 9.6c.1-1.1-.9-2.1-2-2.1zM13.1 2.8v-.4c0-1.1-.9-2-2-2H4.8c-1.1 0-2 .9-2 2v3.4h18.4v-1c0-1.1-.9-2-2-2h-6.1z"}),Object(c.createElement)("path",{fill:"#fff",d:"M14.4 18.7L12 17.4l-2.4 1.3.5-2.6-1.9-1.9 2.6-.4 1.2-2.4 1.2 2.4 2.6.4-1.9 1.9z"}))})},l=function(){return Object(c.createElement)(r.Icon,{className:"material-icon",icon:Object(c.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},Object(c.createElement)("path",{d:"M0 0h24v24H0z",fill:"none"}),Object(c.createElement)("path",{d:"M23 12l-2.44-2.78.34-3.68-3.61-.82-1.89-3.18L12 3 8.6 1.54 6.71 4.72l-3.61.81.34 3.68L1 12l2.44 2.78-.34 3.69 3.61.82 1.89 3.18L12 21l3.4 1.46 1.89-3.18 3.61-.82-.34-3.68L23 12zm-10 5h-2v-2h2v2zm0-4h-2V7h2v6z"}))})},s=function(){return Object(c.createElement)(r.Icon,{icon:Object(c.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},Object(c.createElement)("path",{fill:"#1E8CBE",d:"M12 7c-2.76 0-5 2.24-5 5s2.24 5 5 5 5-2.24 5-5-2.24-5-5-5zm0-5C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"}))})},u=function(){return Object(c.createElement)(r.Icon,{icon:Object(c.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},Object(c.createElement)("path",{fill:"#6C7781",d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"}))})},d=function(e){var t=e.className,n=e.fillColor;return Object(c.createElement)(r.Icon,{className:t,icon:Object(c.createElement)("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},Object(c.createElement)("path",{fill:n,d:"M2.3,17.3h9.3c0.1,0,0.3,0,0.4,0.1l5.9,4.2c0.3,0.2,0.7,0,0.7-0.3v-3.7c0-0.2,0.2-0.4,0.4-0.4H22 c1.1,0,2-0.9,2-2V2.5c0-1.2-0.7-2.2-2-2.2H2.3C0.7,0.2,0,0.9,0,2.5v12.3C0,16.3,0.7,17.3,2.3,17.3z"}),Object(c.createElement)("polygon",{fill:"#ffffff",points:"8.8,12.1 6.5,10.9 4.1,12.1 4.5,9.5 2.6,7.6 5.3,7.2 6.5,4.8 7.6,7.2 10.3,7.6 8.4,9.5"}),Object(c.createElement)("path",{fill:"#ffffff",d:"M20.7,7.9h-7c-0.5,0-0.9-0.4-0.9-0.9S13.2,6,13.7,6h7c0.5,0,0.9,0.4,0.9,0.9S21.2,7.9,20.7,7.9z"}),Object(c.createElement)("path",{fill:"#ffffff",d:"M20.7,11.5h-7c-0.5,0-0.9-0.4-0.9-0.9s0.4-0.9,0.9-0.9h7c0.5,0,0.9,0.4,0.9,0.9S21.2,11.5,20.7,11.5z"}))})},p=function(e){var t=e.className,n=e.fillColor;return Object(c.createElement)(r.Icon,{className:t,icon:Object(c.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 23"},Object(c.createElement)("path",{fill:n,d:"M21.9943 7.0957H2.00638C0.807102 7.0957 -0.0923543 8.0951 0.0075853 9.29437L0.707162 20.3877C0.807102 21.487 1.70656 22.2865 2.70595 22.2865H21.1948C22.2941 22.2865 23.1936 21.487 23.1936 20.3877L23.9931 9.29437C24.093 8.0951 23.0936 7.0957 21.9943 7.0957Z"}),Object(c.createElement)("path",{fill:n,d:"M13.0921 2.39855V1.99879C13.0921 0.899456 12.1926 0 11.0933 0H4.7971C3.69777 0 2.79831 0.899456 2.79831 1.99879V5.39674H21.1872V4.49728C21.1872 3.39795 20.2877 2.49849 19.1884 2.49849H13.0921V2.39855Z"}),Object(c.createElement)("path",{fill:"white",d:"M8.63115 17.126L6.5415 15.9449L4.361 17.126L4.72442 14.6729L2.99819 13.0376L5.45125 12.6742L6.5415 10.4937L7.5409 12.6742L9.99396 13.0376L8.26773 14.6729L8.63115 17.126Z"}),Object(c.createElement)("path",{fill:"white",d:"M19.1907 13.5918H12.9899C12.547 13.5918 12.1926 13.1921 12.1926 12.6924C12.1926 12.1927 12.547 11.7929 12.9899 11.7929H19.1907C19.6336 11.7929 19.9879 12.1927 19.9879 12.6924C19.9879 13.1921 19.6336 13.5918 19.1907 13.5918Z"}),Object(c.createElement)("path",{fill:"white",d:"M19.1907 17.1897H12.9899C12.547 17.1897 12.1926 16.7899 12.1926 16.2902C12.1926 15.7905 12.547 15.3907 12.9899 15.3907H19.1907C19.6336 15.3907 19.9879 15.7905 19.9879 16.2902C19.9879 16.7899 19.6336 17.1897 19.1907 17.1897Z"}))})},b=function(){return Object(c.createElement)(r.Icon,{className:"material-icon",icon:Object(c.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},Object(c.createElement)("path",{d:"M13 13v8h8v-8h-8zM3 21h8v-8H3v8zM3 3v8h8V3H3zm13.66-1.31L11 7.34 16.66 13l5.66-5.66-5.66-5.65z"}),Object(c.createElement)("path",{d:"M0 0h24v24H0z",fill:"none"}))})},h=n(6),f=n.n(h),m=(n(7),function(e){var t=e.size,n=void 0===t?20:t,o=e.className;return Object(c.createElement)(r.Icon,{className:f()("woo-icon",o),icon:Object(c.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",height:n,width:Math.floor(1.67*n),viewBox:"0 0 245 145"},Object(c.createElement)("path",{fill:"#96588A",d:"M22.76 0h199.1a22.77 22.77 0 0 1 22.8 22.76v75.92a22.77 22.77 0 0 1-22.78 22.78h-71.41l9.77 24-43.13-24H22.76C10.1946 121.449.011 111.2654 0 98.7V22.76C.011 10.1946 10.1946.011 22.76 0z"}),Object(c.createElement)("path",{fill:"#FFF",fillRule:"nonzero",d:"M12.32 20.63a8.16 8.16 0 0 1 6.25-3.09c5.0733-.36 7.9867 2.0333 8.74 7.18 3.14 20.86 6.4933 38.5633 10.06 53.11l21.92-41.69c2-3.76 4.49-5.76 7.52-6 4.3867-.3067 7.13 2.49 8.23 8.39a186 186 0 0 0 9.47 34.23c2.62-25.38 7.0133-43.7133 13.18-55a7.73 7.73 0 0 1 6.6-4.43 8.8 8.8 0 0 1 6.32 2 7.75 7.75 0 0 1 3.05 5.74 8.52 8.52 0 0 1-1 4.77c-3.9 7.24-7.12 19.28-9.66 36.12-2.48 16.2533-3.3967 28.9633-2.75 38.13a12.25 12.25 0 0 1-1.16 6.56 6.32 6.32 0 0 1-5.33 3.53c-2.6667.18-5.3033-1.0567-7.91-3.71-9.2933-9.54-16.6567-23.7267-22.09-42.56C57.3 76.7167 52.48 86.3333 49.3 92.76c-5.86 11.3333-10.89 17.13-15.09 17.39-2.7333.1933-5.0667-2.0933-7-6.86-5.1-13.0933-10.5833-38.4033-16.45-75.93a8.56 8.56 0 0 1 1.56-6.73zM227.23 36.34a23.17 23.17 0 0 0-16-11.59 26.25 26.25 0 0 0-5.42-.58c-9.5867 0-17.41 5-23.47 15a53 53 0 0 0-7.78 28.16c0 7.7333 1.6167 14.3333 4.85 19.8a23.15 23.15 0 0 0 16 11.59 26.28 26.28 0 0 0 5.42.59c9.68 0 17.5033-5 23.47-15A53.89 53.89 0 0 0 232.08 56c0-7.7333-1.6167-14.2867-4.85-19.66zm-12.61 27.72c-1.3733 6.56-3.9167 11.5-7.63 14.82-2.9267 2.6667-5.6133 3.7433-8.06 3.23-2.4467-.5133-4.4033-2.6667-5.87-6.46a25.68 25.68 0 0 1-1.76-9.09 35.9 35.9 0 0 1 .73-7.34 33 33 0 0 1 5.28-11.88c3.3333-4.8933 6.8067-6.9467 10.42-6.16 2.44.4867 4.3933 2.64 5.86 6.46a25.68 25.68 0 0 1 1.76 9.12 35.73 35.73 0 0 1-.73 7.33v-.03zM164.57 36.34a23.2 23.2 0 0 0-16-11.59 26.42 26.42 0 0 0-5.43-.58c-9.5933 0-17.4167 5-23.47 15a53 53 0 0 0-7.78 28.16c0 7.7333 1.6133 14.3333 4.84 19.8a23.19 23.19 0 0 0 16 11.59 26.44 26.44 0 0 0 5.43.59c9.68 0 17.5033-5 23.47-15A53.88 53.88 0 0 0 169.4 56c0-7.7333-1.6133-14.2867-4.84-19.66h.01zm-12.61 27.72c-1.3667 6.56-3.91 11.5-7.63 14.82-2.93 2.64-5.63 3.72-8.07 3.23-2.44-.49-4.4-2.64-5.86-6.46a25.7 25.7 0 0 1-1.77-9.09 35.9 35.9 0 0 1 .74-7.34 33 33 0 0 1 5.28-11.88c3.3333-4.8933 6.8067-6.9467 10.42-6.16 2.44.4867 4.3933 2.64 5.86 6.46a25.91 25.91 0 0 1 1.76 9.12 35.73 35.73 0 0 1-.73 7.33v-.03z"}))})});n.d(t,"a",function(){return o}),n.d(t,"b",function(){return a}),n.d(t,"c",function(){return i}),n.d(t,"d",function(){return l}),n.d(t,"e",function(){return s}),n.d(t,"f",function(){return u}),n.d(t,"h",function(){return d}),n.d(t,"g",function(){return p}),n.d(t,"i",function(){return b}),n.d(t,"j",function(){return m})},25:function(e,t,n){"use strict";n.d(t,"d",function(){return p}),n.d(t,"b",function(){return b}),n.d(t,"c",function(){return h}),n.d(t,"a",function(){return f});var c=n(20),r=n.n(c),o=n(19),a=n(17),i=n.n(a),l=n(4),s=n(5);function u(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var c=Object.getOwnPropertySymbols(e);t&&(c=c.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,c)}return n}function d(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?u(n,!0).forEach(function(t){r()(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):u(n).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}var p=function(e){var t=e.selected,n=void 0===t?[]:t,c=e.search,r=void 0===c?"":c,a=e.queryArgs,u=function(e){var t=e.selected,n=void 0===t?[]:t,c=e.search,r=void 0===c?"":c,a=e.queryArgs,i=void 0===a?[]:a,l={per_page:s.IS_LARGE_CATALOG?100:-1,catalog_visibility:"any",status:"publish",search:r,orderby:"title",order:"asc"},u=[Object(o.addQueryArgs)(s.ENDPOINTS.products,d({},l,{},i))];return s.IS_LARGE_CATALOG&&n.length&&u.push(Object(o.addQueryArgs)(s.ENDPOINTS.products,{catalog_visibility:"any",status:"publish",include:n})),u}({selected:n,search:r,queryArgs:void 0===a?[]:a});return Promise.all(u.map(function(e){return i()({path:e})})).then(function(e){return Object(l.uniqBy)(Object(l.flatten)(e),"id")})},b=function(e){return i()({path:"".concat(s.ENDPOINTS.products,"/").concat(e)})},h=function(e){var t=e.selected,n=function(e){var t=e.selected,n=void 0===t?[]:t,c=e.search,r=[Object(o.addQueryArgs)("".concat(s.ENDPOINTS.products,"/tags"),{per_page:s.LIMIT_TAGS?100:-1,orderby:s.LIMIT_TAGS?"count":"name",order:s.LIMIT_TAGS?"desc":"asc",search:c})];return s.LIMIT_TAGS&&n.length&&r.push(Object(o.addQueryArgs)("".concat(s.ENDPOINTS.products,"/tags"),{include:n})),r}({selected:void 0===t?[]:t,search:e.search});return Promise.all(n.map(function(e){return i()({path:e})})).then(function(e){return Object(l.uniqBy)(Object(l.flatten)(e),"id")})},f=function(e){return i()({path:"".concat(s.ENDPOINTS.categories,"/").concat(e)})}},33:function(e,t){!function(){e.exports=this.wp.keycodes}()},39:function(e,t){!function(){e.exports=this.wp.escapeHtml}()},4:function(e,t){!function(){e.exports=this.lodash}()},44:function(e,t){!function(){e.exports=this.ReactDOM}()},47:function(e,t){!function(){e.exports=this.wp.viewport}()},5:function(e,t){!function(){e.exports=this.wc["wc-block-settings"]}()},51:function(e,t){!function(){e.exports=this.wp.hooks}()},52:function(e,t,n){"use strict";var c=n(0),r=n(1),o=(n(7),n(29)),a=n.n(o),i=n(6),l=n.n(i),s=n(39),u=n(2);t.a=function(e){var t,n,o=e.className,i=e.error,d=e.isLoading,p=e.onRetry;return Object(c.createElement)(u.Placeholder,{icon:Object(c.createElement)(a.a,{icon:"notice"}),label:Object(r.__)("Sorry, an error occurred","woo-gutenberg-products-block"),className:l()("wc-block-api-error",o)},Object(c.createElement)("div",{className:"wc-block-error__message"},(n=(t=i).apiMessage,t.message||(n?Object(c.createElement)("span",null,Object(r.__)("The following error was returned from the API","woo-gutenberg-products-block"),Object(c.createElement)("br",null),Object(c.createElement)("code",null,Object(s.escapeHTML)(n))):Object(r.__)("An unknown error occurred which prevented the block from being updated.","woo-gutenberg-products-block")))),p&&Object(c.createElement)(c.Fragment,null,d?Object(c.createElement)(u.Spinner,null):Object(c.createElement)(u.Button,{isDefault:!0,onClick:p},Object(r.__)("Retry","woo-gutenberg-products-block"))))}},525:function(e,t,n){var c=n(526);"string"==typeof c&&(c=[[e.i,c,""]]);var r={insert:"head",singleton:!1};n(35)(c,r);c.locals&&(e.exports=c.locals)},526:function(e,t,n){},53:function(e,t){!function(){e.exports=this.wp.htmlEntities}()},54:function(e,t){!function(){e.exports=this.wp.date}()},546:function(e,t,n){"use strict";n.r(t);var c=n(0),r=n(1),o=n(18),a=n(23),i=n(5),l=(n(523),n(525),n(2)),s=n(6),u=n.n(s),d=n(21),p=n(4),b=(n(7),n(99)),h=n(52);function f(e){return e&&e.images&&e.images.length&&e.images[0].src||""}var m=n(71),g=Object(d.compose)([m.b,Object(o.withColors)({overlayColor:"background-color"}),l.withSpokenMessages])(function(e){var t,n,a,s,d=e.attributes,m=e.debouncedSpeak,g=e.error,O=e.getProduct,v=e.isLoading,j=e.isSelected,w=e.overlayColor,y=e.product,E=e.setAttributes,_=e.setOverlayColor,k=function(){var e=d.contentAlign,t=d.editMode,n=d.mediaId||function(e){return e&&e.images&&e.images.length&&e.images[0].id||0}(y);return Object(c.createElement)(o.BlockControls,null,Object(c.createElement)(o.AlignmentToolbar,{value:e,onChange:function(e){E({contentAlign:e})}}),Object(c.createElement)(o.MediaUploadCheck,null,Object(c.createElement)(l.Toolbar,null,Object(c.createElement)(o.MediaUpload,{onSelect:function(e){E({mediaId:e.id,mediaSrc:e.url})},allowedTypes:["image"],value:n,render:function(e){var t=e.open;return Object(c.createElement)(l.IconButton,{className:"components-toolbar__control",label:Object(r.__)("Edit media"),icon:"format-image",onClick:t,disabled:!y})}}))),Object(c.createElement)(l.Toolbar,{controls:[{icon:"edit",title:Object(r.__)("Edit"),onClick:function(){return E({editMode:!t})},isActive:t}]}))},S=d.editMode;return g?Object(c.createElement)(h.a,{className:"wc-block-featured-product-error",error:g,isLoading:v,onRetry:O}):S?Object(c.createElement)(c.Fragment,null,k(),Object(c.createElement)(l.Placeholder,{icon:"star-filled",label:Object(r.__)("Featured Product","woo-gutenberg-products-block"),className:"wc-block-featured-product"},Object(r.__)("Visually highlight a product or variation and encourage prompt action","woo-gutenberg-products-block"),Object(c.createElement)("div",{className:"wc-block-featured-product__selection"},Object(c.createElement)(b.a,{selected:d.productId||0,onChange:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=e[0]?e[0].id:0;E({productId:t,mediaId:0,mediaSrc:""})}}),Object(c.createElement)(l.Button,{isDefault:!0,onClick:function(){E({editMode:!1}),m(Object(r.__)("Showing Featured Product block preview.","woo-gutenberg-products-block"))}},Object(r.__)("Done","woo-gutenberg-products-block"))))):Object(c.createElement)(c.Fragment,null,k(),(t=d.mediaSrc||f(y),n=d.focalPoint,a=void 0===n?{x:.5,y:.5}:n,s="function"==typeof l.FocalPointPicker,Object(c.createElement)(o.InspectorControls,{key:"inspector"},Object(c.createElement)(l.PanelBody,{title:Object(r.__)("Content","woo-gutenberg-products-block")},Object(c.createElement)(l.ToggleControl,{label:Object(r.__)("Show description","woo-gutenberg-products-block"),checked:d.showDesc,onChange:function(){return E({showDesc:!d.showDesc})}}),Object(c.createElement)(l.ToggleControl,{label:Object(r.__)("Show price","woo-gutenberg-products-block"),checked:d.showPrice,onChange:function(){return E({showPrice:!d.showPrice})}})),Object(c.createElement)(o.PanelColorSettings,{title:Object(r.__)("Overlay","woo-gutenberg-products-block"),colorSettings:[{value:w.color,onChange:_,label:Object(r.__)("Overlay Color","woo-gutenberg-products-block")}]},!!t&&Object(c.createElement)(c.Fragment,null,Object(c.createElement)(l.RangeControl,{label:Object(r.__)("Background Opacity","woo-gutenberg-products-block"),value:d.dimRatio,onChange:function(e){return E({dimRatio:e})},min:0,max:100,step:10}),s&&Object(c.createElement)(l.FocalPointPicker,{label:Object(r.__)("Focal Point Picker"),url:t,value:a,onChange:function(e){return E({focalPoint:e})}}))))),y?function(){var e,t,n=d.className,a=d.contentAlign,s=d.dimRatio,b=d.focalPoint,h=d.height,m=d.showDesc,g=d.showPrice,O=u()("wc-block-featured-product",{"is-selected":j,"is-loading":!y&&v,"is-not-found":!y&&!v,"has-background-dim":0!==s},0===(e=s)||50===e?null:"has-background-dim-".concat(10*Math.round(e/10)),"center"!==a&&"has-".concat(a,"-content"),n),_=(t=d.mediaSrc||y,Object(p.isObject)(t)&&(t=f(t)),t?{backgroundImage:"url(".concat(t,")")}:{});w.color&&(_.backgroundColor=w.color),b&&(_.backgroundPosition="".concat(100*b.x,"% ").concat(100*b.y,"%"));return Object(c.createElement)(l.ResizableBox,{className:O,size:{height:h},minHeight:i.MIN_HEIGHT,enable:{bottom:!0},onResizeStop:function(e,t,n){E({height:parseInt(n.style.height)})},style:_},Object(c.createElement)("div",{className:"wc-block-featured-product__wrapper"},Object(c.createElement)("h2",{className:"wc-block-featured-product__title",dangerouslySetInnerHTML:{__html:y.name}}),!Object(p.isEmpty)(y.variation)&&Object(c.createElement)("h3",{className:"wc-block-featured-product__variation",dangerouslySetInnerHTML:{__html:y.variation}}),m&&Object(c.createElement)("div",{className:"wc-block-featured-product__description",dangerouslySetInnerHTML:{__html:y.description}}),g&&Object(c.createElement)("div",{className:"wc-block-featured-product__price",dangerouslySetInnerHTML:{__html:y.price_html}}),Object(c.createElement)("div",{className:"wc-block-featured-product__link"},Object(c.createElement)(o.InnerBlocks,{template:[["core/button",{text:Object(r.__)("Shop now","woo-gutenberg-products-block"),url:y.permalink,align:"center"}]],templateLock:"all"}))))}():Object(c.createElement)(l.Placeholder,{className:"wc-block-featured-product",icon:"star-filled",label:Object(r.__)("Featured Product","woo-gutenberg-products-block")},v?Object(c.createElement)(l.Spinner,null):Object(r.__)("No product is selected.","woo-gutenberg-products-block")))});Object(a.registerBlockType)("woocommerce/featured-product",{title:Object(r.__)("Featured Product","woo-gutenberg-products-block"),icon:{src:"star-filled",foreground:"#96588a"},category:"woocommerce",keywords:[Object(r.__)("WooCommerce","woo-gutenberg-products-block")],description:Object(r.__)("Visually highlight a product or variation and encourage prompt action.","woo-gutenberg-products-block"),supports:{align:["wide","full"],html:!1},attributes:{contentAlign:{type:"string",default:"center"},dimRatio:{type:"number",default:50},editMode:{type:"boolean",default:!0},focalPoint:{type:"object"},height:{type:"number",default:i.DEFAULT_HEIGHT},mediaId:{type:"number",default:0},mediaSrc:{type:"string",default:""},overlayColor:{type:"string"},customOverlayColor:{type:"string"},linkText:{type:"string",default:Object(r.__)("Shop now","woo-gutenberg-products-block")},productId:{type:"number"},showDesc:{type:"boolean",default:!0},showPrice:{type:"boolean",default:!0}},edit:function(e){return Object(c.createElement)(g,e)},save:function(){return Object(c.createElement)(o.InnerBlocks.Content,null)}})},61:function(e,t){!function(){e.exports=this.wp.dom}()},64:function(e,t){},65:function(e,t){},67:function(e,t){},68:function(e,t){},71:function(e,t,n){"use strict";var c=n(16),r=n.n(c),o=n(38),a=n.n(o),i=n(8),l=n.n(i),s=n(9),u=n.n(s),d=n(10),p=n.n(d),b=n(11),h=n.n(b),f=n(15),m=n.n(f),g=n(12),O=n.n(g),v=n(0),j=n(21),w=n(25),y=Object(j.createHigherOrderComponent)(function(e){return function(t){function n(){var e;return l()(this,n),(e=p()(this,h()(n).apply(this,arguments))).state={error:null,loading:!1,product:null},e.loadProduct=e.loadProduct.bind(m()(e)),e}return O()(n,t),u()(n,[{key:"componentDidMount",value:function(){this.loadProduct()}},{key:"componentDidUpdate",value:function(e){e.attributes.productId!==this.props.attributes.productId&&this.loadProduct()}},{key:"loadProduct",value:function(){var e=this,t=this.props.attributes.productId;t?(this.setState({loading:!0}),Object(w.b)(t).then(function(t){e.setState({product:t,loading:!1,error:null})}).catch(function(t){var n="object"===a()(t)&&t.hasOwnProperty("message")?{apiMessage:t.message}:{apiMessage:null};e.setState({product:null,loading:!1,error:n})})):this.setState({product:null,loading:!1,error:null})}},{key:"render",value:function(){var t=this.state,n=t.error,c=t.loading,o=t.product;return Object(v.createElement)(e,r()({},this.props,{error:n,getProduct:this.loadProduct,isLoading:c,product:o}))}}]),n}(v.Component)},"withProduct"),E=Object(j.createHigherOrderComponent)(function(e){return function(t){function n(){var e;return l()(this,n),(e=p()(this,h()(n).apply(this,arguments))).state={error:null,loading:!1,category:null},e.loadCategory=e.loadCategory.bind(m()(e)),e}return O()(n,t),u()(n,[{key:"componentDidMount",value:function(){this.loadCategory()}},{key:"componentDidUpdate",value:function(e){e.attributes.categoryId!==this.props.attributes.categoryId&&this.loadCategory()}},{key:"loadCategory",value:function(){var e=this,t=this.props.attributes.categoryId;t?(this.setState({loading:!0}),Object(w.a)(t).then(function(t){e.setState({category:t,loading:!1,error:null})}).catch(function(t){var n="object"===a()(t)&&t.hasOwnProperty("message")?{apiMessage:t.message}:{apiMessage:null};e.setState({category:null,loading:!1,error:n})})):this.setState({category:null,loading:!1,error:null})}},{key:"render",value:function(){var t=this.state,n=t.error,c=t.loading,o=t.category;return Object(v.createElement)(e,r()({},this.props,{error:n,getCategory:this.loadCategory,isLoading:c,category:o}))}}]),n}(v.Component)},"withCategory"),_=n(4),k=(n(7),n(5)),S=Object(j.createHigherOrderComponent)(function(e){var t=function(t){function n(){var e;return l()(this,n),(e=p()(this,h()(n).apply(this,arguments))).state={list:[],loading:!0},e.debouncedOnSearch=Object(_.debounce)(e.onSearch.bind(m()(e)),400),e}return O()(n,t),u()(n,[{key:"componentDidMount",value:function(){var e=this,t=this.props.selected;Object(w.d)({selected:t}).then(function(t){e.setState({list:t,loading:!1})}).catch(function(){e.setState({list:[],loading:!1})})}},{key:"componentWillUnmount",value:function(){this.debouncedOnSearch.cancel()}},{key:"onSearch",value:function(e){var t=this,n=this.props.selected;Object(w.d)({selected:n,search:e}).then(function(e){t.setState({list:e,loading:!1})}).catch(function(){t.setState({list:[],loading:!1})})}},{key:"render",value:function(){var t=this.state,n=t.list,c=t.loading,o=this.props.selected;return Object(v.createElement)(e,r()({},this.props,{products:n,isLoading:c,selected:n.filter(function(e){var t=e.id;return o.includes(t)}),onSearch:k.IS_LARGE_CATALOG?this.debouncedOnSearch:null}))}}]),n}(v.Component);return t.defaultProps={selected:[]},t},"withSearchedProducts");n.d(t,"b",function(){return y}),n.d(t,"a",function(){return E}),n.d(t,"c",function(){return S})},99:function(e,t,n){"use strict";var c=n(62),r=n.n(c),o=n(16),a=n.n(o),i=n(20),l=n.n(i),s=n(8),u=n.n(s),d=n(9),p=n.n(d),b=n(10),h=n.n(b),f=n(11),m=n.n(f),g=n(15),O=n.n(g),v=n(12),j=n.n(v),w=n(0),y=n(1),E=n(19),_=n(17),k=n.n(_),S=n(4),C=(n(7),n(26)),P=n(2),M=n(6),I=n.n(M),L=n(5),x=n(25),N=n(24);n(280);function A(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var c=Object.getOwnPropertySymbols(e);t&&(c=c.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,c)}return n}function H(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?A(n,!0).forEach(function(t){l()(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):A(n).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function z(e,t){if(!t)return e;var n=new RegExp(Object(S.escapeRegExp)(t),"ig");return e.replace(n,"<strong>$&</strong>")}var T=function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return e?Object(w.createElement)(N.e,null):Object(w.createElement)(N.f,null)},D=function(e){function t(){var e;return u()(this,t),(e=h()(this,m()(t).apply(this,arguments))).state={products:[],product:0,variationsList:{},variationsLoading:!1,loading:!0},e.debouncedOnSearch=Object(S.debounce)(e.onSearch.bind(O()(e)),400),e.debouncedGetVariations=Object(S.debounce)(e.getVariations.bind(O()(e)),200),e.renderItem=e.renderItem.bind(O()(e)),e.onProductSelect=e.onProductSelect.bind(O()(e)),e}return j()(t,e),p()(t,[{key:"componentWillUnmount",value:function(){this.debouncedOnSearch.cancel(),this.debouncedGetVariations.cancel()}},{key:"componentDidMount",value:function(){var e=this,t=this.props,n=t.selected,c=t.queryArgs;Object(x.d)({selected:n,queryArgs:c}).then(function(t){t=t.map(function(e){return H({},e,{parent:0,count:e.variations?e.variations.length:0})}),e.setState({products:t,loading:!1})}).catch(function(){e.setState({products:[],loading:!1})})}},{key:"componentDidUpdate",value:function(e,t){t.product!==this.state.product&&this.debouncedGetVariations()}},{key:"getVariations",value:function(){var e=this,t=this.state,n=t.product,c=t.products,r=t.variationsList;if(n){var o=c.find(function(e){return e.id===n});o.variations&&0!==o.variations.length&&(r[n]||this.setState({variationsLoading:!0}),k()({path:Object(E.addQueryArgs)("".concat(L.ENDPOINTS.products,"/").concat(n,"/variations"),{per_page:-1})}).then(function(t){t=t.map(function(e){return H({},e,{parent:n})}),e.setState(function(e){return{variationsList:H({},e.variationsList,l()({},n,t)),variationsLoading:!1}})}).catch(function(){e.setState({termsLoading:!1})}))}else this.setState({variationsList:{},variationsLoading:!1})}},{key:"onSearch",value:function(e){var t=this,n=this.props,c=n.selected,r=n.queryArgs;Object(x.d)({selected:c,search:e,queryArgs:r}).then(function(e){t.setState({products:e,loading:!1})}).catch(function(){t.setState({products:[],loading:!1})})}},{key:"onProductSelect",value:function(e,t){var n=this;return function(){n.setState({product:t?0:e.id})}}},{key:"renderItem",value:function(e){var t=this,n=e.item,c=e.search,r=e.depth,o=void 0===r?0:r,i=e.isSelected,l=e.onSelect,s=this.state,u=s.product,d=s.variationsLoading,p=I()("woocommerce-search-product__item","woocommerce-search-list__item","depth-".concat(o),{"is-searching":c.length>0,"is-skip-level":0===o&&0!==n.parent,"is-variable":n.count>0}),b=Object.assign({},e);delete b.isSingle;var h={role:"menuitemradio"};return n.breadcrumbs.length&&(h["aria-label"]="".concat(n.breadcrumbs[0],": ").concat(n.name)),n.count&&(h["aria-expanded"]=n.id===u),n.breadcrumbs.length?(Object(S.isEmpty)(n.variation)||(n.name=n.variation),Object(w.createElement)(C.b,a()({className:p},e,h))):[Object(w.createElement)(P.MenuItem,a()({key:"product-".concat(n.id),isSelected:i},b,h,{className:p,onClick:function(){l(n)(),t.onProductSelect(n,i)()}}),Object(w.createElement)("span",{className:"woocommerce-search-list__item-state"},T(i)),Object(w.createElement)("span",{className:"woocommerce-search-list__item-label"},Object(w.createElement)("span",{className:"woocommerce-search-list__item-name",dangerouslySetInnerHTML:{__html:z(n.name,c)}})),n.count?Object(w.createElement)("span",{className:"woocommerce-search-list__item-variation-count"},Object(y.sprintf)(Object(y._n)("%d variation","%d variations",n.count,"woo-gutenberg-products-block"),n.count)):null),u===n.id&&n.count>0&&d&&Object(w.createElement)("div",{key:"loading",className:"woocommerce-search-list__item woocommerce-search-product__itemdepth-1 is-loading is-not-active"},Object(w.createElement)(P.Spinner,null))]}},{key:"render",value:function(){var e=this.state,t=e.products,n=e.loading,c=e.product,o=e.variationsList,a=this.props,i=a.onChange,l=a.renderItem,s=a.selected,u=o[c]||[],d=[].concat(r()(t),r()(u)),p={list:Object(y.__)("Products","woo-gutenberg-products-block"),noItems:Object(y.__)("Your store doesn't have any products.","woo-gutenberg-products-block"),search:Object(y.__)("Search for a product to display","woo-gutenberg-products-block"),updated:Object(y.__)("Product search results updated.","woo-gutenberg-products-block")},b=s?[Object(S.find)(d,{id:s})]:[];return Object(w.createElement)(w.Fragment,null,Object(w.createElement)(C.a,{className:"woocommerce-products",list:d,isLoading:n,isSingle:!0,selected:b,onChange:i,renderItem:l||this.renderItem,onSearch:L.IS_LARGE_CATALOG?this.debouncedOnSearch:null,messages:p,isHierarchical:!0}))}}]),t}(w.Component);t.a=D}});
|
1 |
+
this.wc=this.wc||{},this.wc.blocks=this.wc.blocks||{},this.wc.blocks["featured-product"]=function(e){function t(t){for(var c,a,i=t[0],l=t[1],s=t[2],d=0,p=[];d<i.length;d++)a=i[d],Object.prototype.hasOwnProperty.call(r,a)&&r[a]&&p.push(r[a][0]),r[a]=0;for(c in l)Object.prototype.hasOwnProperty.call(l,c)&&(e[c]=l[c]);for(u&&u(t);p.length;)p.shift()();return o.push.apply(o,s||[]),n()}function n(){for(var e,t=0;t<o.length;t++){for(var n=o[t],c=!0,i=1;i<n.length;i++){var l=n[i];0!==r[l]&&(c=!1)}c&&(o.splice(t--,1),e=a(a.s=n[0]))}return e}var c={},r={6:0},o=[];function a(t){if(c[t])return c[t].exports;var n=c[t]={i:t,l:!1,exports:{}};return e[t].call(n.exports,n,n.exports,a),n.l=!0,n.exports}a.m=e,a.c=c,a.d=function(e,t,n){a.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},a.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},a.t=function(e,t){if(1&t&&(e=a(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(a.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var c in e)a.d(n,c,function(t){return e[t]}.bind(null,c));return n},a.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return a.d(t,"a",t),t},a.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},a.p="";var i=window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[],l=i.push.bind(i);i.push=t,i=i.slice();for(var s=0;s<i.length;s++)t(i[s]);var u=l;return o.push([561,2,1,0]),n()}({0:function(e,t){!function(){e.exports=this.wp.element}()},1:function(e,t){!function(){e.exports=this.wp.i18n}()},102:function(e,t,n){"use strict";var c=n(60),r=n.n(c),o=n(15),a=n.n(o),i=n(19),l=n.n(i),s=n(7),u=n.n(s),d=n(8),p=n.n(d),b=n(9),h=n.n(b),f=n(10),m=n.n(f),g=n(14),O=n.n(g),v=n(11),j=n.n(v),w=n(0),y=n(1),E=n(18),_=n(16),k=n.n(_),S=n(4),C=(n(2),n(25)),P=n(3),M=n(6),I=n.n(M),L=n(5),x=n(24),N=n(23);n(294);function A(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var c=Object.getOwnPropertySymbols(e);t&&(c=c.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,c)}return n}function H(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?A(n,!0).forEach((function(t){l()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):A(n).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function z(e,t){if(!t)return e;var n=new RegExp(Object(S.escapeRegExp)(t),"ig");return e.replace(n,"<strong>$&</strong>")}var T=function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return e?Object(w.createElement)(N.e,null):Object(w.createElement)(N.f,null)},D=function(e){function t(){var e;return u()(this,t),(e=h()(this,m()(t).apply(this,arguments))).state={products:[],product:0,variationsList:{},variationsLoading:!1,loading:!0},e.debouncedOnSearch=Object(S.debounce)(e.onSearch.bind(O()(e)),400),e.debouncedGetVariations=Object(S.debounce)(e.getVariations.bind(O()(e)),200),e.renderItem=e.renderItem.bind(O()(e)),e.onProductSelect=e.onProductSelect.bind(O()(e)),e}return j()(t,e),p()(t,[{key:"componentWillUnmount",value:function(){this.debouncedOnSearch.cancel(),this.debouncedGetVariations.cancel()}},{key:"componentDidMount",value:function(){var e=this,t=this.props,n=t.selected,c=t.queryArgs;Object(x.d)({selected:n,queryArgs:c}).then((function(t){t=t.map((function(e){return H({},e,{parent:0,count:e.variations?e.variations.length:0})})),e.setState({products:t,loading:!1})})).catch((function(){e.setState({products:[],loading:!1})}))}},{key:"componentDidUpdate",value:function(e,t){t.product!==this.state.product&&this.debouncedGetVariations()}},{key:"getVariations",value:function(){var e=this,t=this.state,n=t.product,c=t.products,r=t.variationsList;if(n){var o=c.find((function(e){return e.id===n}));o.variations&&0!==o.variations.length&&(r[n]||this.setState({variationsLoading:!0}),k()({path:Object(E.addQueryArgs)("".concat(L.ENDPOINTS.products,"/").concat(n,"/variations"),{per_page:-1})}).then((function(t){t=t.map((function(e){return H({},e,{parent:n})})),e.setState((function(e){return{variationsList:H({},e.variationsList,l()({},n,t)),variationsLoading:!1}}))})).catch((function(){e.setState({termsLoading:!1})})))}else this.setState({variationsList:{},variationsLoading:!1})}},{key:"onSearch",value:function(e){var t=this,n=this.props,c=n.selected,r=n.queryArgs;Object(x.d)({selected:c,search:e,queryArgs:r}).then((function(e){t.setState({products:e,loading:!1})})).catch((function(){t.setState({products:[],loading:!1})}))}},{key:"onProductSelect",value:function(e,t){var n=this;return function(){n.setState({product:t?0:e.id})}}},{key:"renderItem",value:function(e){var t=this,n=e.item,c=e.search,r=e.depth,o=void 0===r?0:r,i=e.isSelected,l=e.onSelect,s=this.state,u=s.product,d=s.variationsLoading,p=I()("woocommerce-search-product__item","woocommerce-search-list__item","depth-".concat(o),{"is-searching":c.length>0,"is-skip-level":0===o&&0!==n.parent,"is-variable":n.count>0}),b=Object.assign({},e);delete b.isSingle;var h={role:"menuitemradio"};return n.breadcrumbs.length&&(h["aria-label"]="".concat(n.breadcrumbs[0],": ").concat(n.name)),n.count&&(h["aria-expanded"]=n.id===u),n.breadcrumbs.length?(Object(S.isEmpty)(n.variation)||(n.name=n.variation),Object(w.createElement)(C.b,a()({className:p},e,h))):[Object(w.createElement)(P.MenuItem,a()({key:"product-".concat(n.id),isSelected:i},b,h,{className:p,onClick:function(){l(n)(),t.onProductSelect(n,i)()}}),Object(w.createElement)("span",{className:"woocommerce-search-list__item-state"},T(i)),Object(w.createElement)("span",{className:"woocommerce-search-list__item-label"},Object(w.createElement)("span",{className:"woocommerce-search-list__item-name",dangerouslySetInnerHTML:{__html:z(n.name,c)}})),n.count?Object(w.createElement)("span",{className:"woocommerce-search-list__item-variation-count"},Object(y.sprintf)(Object(y._n)("%d variation","%d variations",n.count,"woo-gutenberg-products-block"),n.count)):null),u===n.id&&n.count>0&&d&&Object(w.createElement)("div",{key:"loading",className:"woocommerce-search-list__item woocommerce-search-product__itemdepth-1 is-loading is-not-active"},Object(w.createElement)(P.Spinner,null))]}},{key:"render",value:function(){var e=this.state,t=e.products,n=e.loading,c=e.product,o=e.variationsList,a=this.props,i=a.onChange,l=a.renderItem,s=a.selected,u=o[c]||[],d=[].concat(r()(t),r()(u)),p={list:Object(y.__)("Products","woo-gutenberg-products-block"),noItems:Object(y.__)("Your store doesn't have any products.","woo-gutenberg-products-block"),search:Object(y.__)("Search for a product to display","woo-gutenberg-products-block"),updated:Object(y.__)("Product search results updated.","woo-gutenberg-products-block")},b=s?[Object(S.find)(d,{id:s})]:[];return Object(w.createElement)(w.Fragment,null,Object(w.createElement)(C.a,{className:"woocommerce-products",list:d,isLoading:n,isSingle:!0,selected:b,onChange:i,renderItem:l||this.renderItem,onSearch:L.IS_LARGE_CATALOG?this.debouncedOnSearch:null,messages:p,isHierarchical:!0}))}}]),t}(w.Component);t.a=D},12:function(e,t){!function(){e.exports=this.React}()},13:function(e,t){!function(){e.exports=this.moment}()},16:function(e,t){!function(){e.exports=this.wp.apiFetch}()},17:function(e,t){!function(){e.exports=this.wp.editor}()},18:function(e,t){!function(){e.exports=this.wp.url}()},20:function(e,t){!function(){e.exports=this.wp.compose}()},22:function(e,t){!function(){e.exports=this.wp.blocks}()},23:function(e,t,n){"use strict";var c=n(0),r=n(3),o=function(e){var t=e.className,n=e.fillColor;return Object(c.createElement)(r.Icon,{className:t,icon:Object(c.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 22.41"},Object(c.createElement)("g",null,Object(c.createElement)("g",null,Object(c.createElement)("path",{fill:n,d:"M16.55 0H1.75C.56 0 0 .52 0 1.68v9.24c0 1.15.56 1.92 1.75 1.92H2V4.76a2.51 2.51 0 0 1 2.74-2.68H18v-.4A1.51 1.51 0 0 0 16.55 0z"}),Object(c.createElement)("path",{fill:n,d:"M19.54 3.11H4.74C3.55 3.11 3 3.64 3 4.79V14c0 1.19.55 2 1.74 2H5V7.88A2.51 2.51 0 0 1 7.73 5.2H21v-.41a1.51 1.51 0 0 0-1.46-1.68z"}),Object(c.createElement)("path",{fill:n,d:"M22.53 6.23H7.73C6.54 6.23 6 6.75 6 7.91v9.24c0 1.15.56 1.92 1.75 1.92h7a.59.59 0 0 1 .32.11l1.61 1.15 2.83 2a.31.31 0 0 0 .18.05.3.3 0 0 0 .31-.3v-2.73a.3.3 0 0 1 .28-.28h2.31A1.47 1.47 0 0 0 24 17.6V7.91a1.52 1.52 0 0 0-1.47-1.68z"}),Object(c.createElement)("path",{fill:"#ffffff",d:"M10.2 10.92l1.06-2.14 1.05 2.14 2.37.35-1.71 1.66.4 2.36-2.11-1.11-.17.09-.52.27-.51.26-.92.49.18-1.02.09-.57.1-.56.03-.21-1.71-1.66 2.37-.35zM21.46 14.25h-4.4a.69.69 0 0 1-.69-.69.68.68 0 0 1 .69-.68h4.4a.68.68 0 0 1 .69.68.69.69 0 0 1-.69.69zM21.46 11.19h-4.4a.69.69 0 1 1 0-1.37h4.4a.69.69 0 1 1 0 1.37z"}))))})},a=function(){return Object(c.createElement)(r.Icon,{icon:Object(c.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},Object(c.createElement)("path",{fillRule:"nonzero",d:"M21.913 7.0946H2.0254c-1.1708 0-2.0984.9908-2.0205 2.16l.741 11.0724c.0714 1.0638.9552 1.8892 2.0206 1.8892h18.4054c1.0654 0 1.9492-.8254 2.0205-1.8892l.7411-11.0724c.0779-1.1692-.8497-2.16-2.0205-2.16zm-8.8006-4.6573h5.987c1.119 0 2.0255.9065 2.0255 2.0254v.934H2.8103V2.0255C2.8103.9064 3.7168 0 4.8357 0h6.2513c1.119 0 2.0254.9065 2.0254 2.0254v.4119zm-7.0589 11.619a.926.926 0 1 1 0-1.852h11.8297a.926.926 0 1 1 0 1.852H6.0535z"}))})},i=function(){return Object(c.createElement)(r.Icon,{icon:Object(c.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},Object(c.createElement)("path",{d:"M22 7.5H2c-1.2 0-2.1 1-2 2.2l.7 11.1c.1 1.1 1 1.9 2 1.9h18.5c1.1 0 2-.8 2-1.9L24 9.6c.1-1.1-.9-2.1-2-2.1zM13.1 2.8v-.4c0-1.1-.9-2-2-2H4.8c-1.1 0-2 .9-2 2v3.4h18.4v-1c0-1.1-.9-2-2-2h-6.1z"}),Object(c.createElement)("path",{fill:"#fff",d:"M14.4 18.7L12 17.4l-2.4 1.3.5-2.6-1.9-1.9 2.6-.4 1.2-2.4 1.2 2.4 2.6.4-1.9 1.9z"}))})},l=function(){return Object(c.createElement)(r.Icon,{className:"material-icon",icon:Object(c.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},Object(c.createElement)("path",{d:"M0 0h24v24H0z",fill:"none"}),Object(c.createElement)("path",{d:"M23 12l-2.44-2.78.34-3.68-3.61-.82-1.89-3.18L12 3 8.6 1.54 6.71 4.72l-3.61.81.34 3.68L1 12l2.44 2.78-.34 3.69 3.61.82 1.89 3.18L12 21l3.4 1.46 1.89-3.18 3.61-.82-.34-3.68L23 12zm-10 5h-2v-2h2v2zm0-4h-2V7h2v6z"}))})},s=function(){return Object(c.createElement)(r.Icon,{icon:Object(c.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},Object(c.createElement)("path",{fill:"#1E8CBE",d:"M12 7c-2.76 0-5 2.24-5 5s2.24 5 5 5 5-2.24 5-5-2.24-5-5-5zm0-5C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"}))})},u=function(){return Object(c.createElement)(r.Icon,{icon:Object(c.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},Object(c.createElement)("path",{fill:"#6C7781",d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"}))})},d=function(e){var t=e.className,n=e.fillColor;return Object(c.createElement)(r.Icon,{className:t,icon:Object(c.createElement)("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},Object(c.createElement)("path",{fill:n,d:"M2.3,17.3h9.3c0.1,0,0.3,0,0.4,0.1l5.9,4.2c0.3,0.2,0.7,0,0.7-0.3v-3.7c0-0.2,0.2-0.4,0.4-0.4H22 c1.1,0,2-0.9,2-2V2.5c0-1.2-0.7-2.2-2-2.2H2.3C0.7,0.2,0,0.9,0,2.5v12.3C0,16.3,0.7,17.3,2.3,17.3z"}),Object(c.createElement)("polygon",{fill:"#ffffff",points:"8.8,12.1 6.5,10.9 4.1,12.1 4.5,9.5 2.6,7.6 5.3,7.2 6.5,4.8 7.6,7.2 10.3,7.6 8.4,9.5"}),Object(c.createElement)("path",{fill:"#ffffff",d:"M20.7,7.9h-7c-0.5,0-0.9-0.4-0.9-0.9S13.2,6,13.7,6h7c0.5,0,0.9,0.4,0.9,0.9S21.2,7.9,20.7,7.9z"}),Object(c.createElement)("path",{fill:"#ffffff",d:"M20.7,11.5h-7c-0.5,0-0.9-0.4-0.9-0.9s0.4-0.9,0.9-0.9h7c0.5,0,0.9,0.4,0.9,0.9S21.2,11.5,20.7,11.5z"}))})},p=function(e){var t=e.className,n=e.fillColor;return Object(c.createElement)(r.Icon,{className:t,icon:Object(c.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 23"},Object(c.createElement)("path",{fill:n,d:"M21.9943 7.0957H2.00638C0.807102 7.0957 -0.0923543 8.0951 0.0075853 9.29437L0.707162 20.3877C0.807102 21.487 1.70656 22.2865 2.70595 22.2865H21.1948C22.2941 22.2865 23.1936 21.487 23.1936 20.3877L23.9931 9.29437C24.093 8.0951 23.0936 7.0957 21.9943 7.0957Z"}),Object(c.createElement)("path",{fill:n,d:"M13.0921 2.39855V1.99879C13.0921 0.899456 12.1926 0 11.0933 0H4.7971C3.69777 0 2.79831 0.899456 2.79831 1.99879V5.39674H21.1872V4.49728C21.1872 3.39795 20.2877 2.49849 19.1884 2.49849H13.0921V2.39855Z"}),Object(c.createElement)("path",{fill:"white",d:"M8.63115 17.126L6.5415 15.9449L4.361 17.126L4.72442 14.6729L2.99819 13.0376L5.45125 12.6742L6.5415 10.4937L7.5409 12.6742L9.99396 13.0376L8.26773 14.6729L8.63115 17.126Z"}),Object(c.createElement)("path",{fill:"white",d:"M19.1907 13.5918H12.9899C12.547 13.5918 12.1926 13.1921 12.1926 12.6924C12.1926 12.1927 12.547 11.7929 12.9899 11.7929H19.1907C19.6336 11.7929 19.9879 12.1927 19.9879 12.6924C19.9879 13.1921 19.6336 13.5918 19.1907 13.5918Z"}),Object(c.createElement)("path",{fill:"white",d:"M19.1907 17.1897H12.9899C12.547 17.1897 12.1926 16.7899 12.1926 16.2902C12.1926 15.7905 12.547 15.3907 12.9899 15.3907H19.1907C19.6336 15.3907 19.9879 15.7905 19.9879 16.2902C19.9879 16.7899 19.6336 17.1897 19.1907 17.1897Z"}))})},b=function(){return Object(c.createElement)(r.Icon,{className:"material-icon",icon:Object(c.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},Object(c.createElement)("path",{d:"M13 13v8h8v-8h-8zM3 21h8v-8H3v8zM3 3v8h8V3H3zm13.66-1.31L11 7.34 16.66 13l5.66-5.66-5.66-5.65z"}),Object(c.createElement)("path",{d:"M0 0h24v24H0z",fill:"none"}))})},h=n(6),f=n.n(h),m=(n(2),function(e){var t=e.size,n=void 0===t?20:t,o=e.className;return Object(c.createElement)(r.Icon,{className:f()("woo-icon",o),icon:Object(c.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",height:n,width:Math.floor(1.67*n),viewBox:"0 0 245 145"},Object(c.createElement)("path",{fill:"#96588A",d:"M22.76 0h199.1a22.77 22.77 0 0 1 22.8 22.76v75.92a22.77 22.77 0 0 1-22.78 22.78h-71.41l9.77 24-43.13-24H22.76C10.1946 121.449.011 111.2654 0 98.7V22.76C.011 10.1946 10.1946.011 22.76 0z"}),Object(c.createElement)("path",{fill:"#FFF",fillRule:"nonzero",d:"M12.32 20.63a8.16 8.16 0 0 1 6.25-3.09c5.0733-.36 7.9867 2.0333 8.74 7.18 3.14 20.86 6.4933 38.5633 10.06 53.11l21.92-41.69c2-3.76 4.49-5.76 7.52-6 4.3867-.3067 7.13 2.49 8.23 8.39a186 186 0 0 0 9.47 34.23c2.62-25.38 7.0133-43.7133 13.18-55a7.73 7.73 0 0 1 6.6-4.43 8.8 8.8 0 0 1 6.32 2 7.75 7.75 0 0 1 3.05 5.74 8.52 8.52 0 0 1-1 4.77c-3.9 7.24-7.12 19.28-9.66 36.12-2.48 16.2533-3.3967 28.9633-2.75 38.13a12.25 12.25 0 0 1-1.16 6.56 6.32 6.32 0 0 1-5.33 3.53c-2.6667.18-5.3033-1.0567-7.91-3.71-9.2933-9.54-16.6567-23.7267-22.09-42.56C57.3 76.7167 52.48 86.3333 49.3 92.76c-5.86 11.3333-10.89 17.13-15.09 17.39-2.7333.1933-5.0667-2.0933-7-6.86-5.1-13.0933-10.5833-38.4033-16.45-75.93a8.56 8.56 0 0 1 1.56-6.73zM227.23 36.34a23.17 23.17 0 0 0-16-11.59 26.25 26.25 0 0 0-5.42-.58c-9.5867 0-17.41 5-23.47 15a53 53 0 0 0-7.78 28.16c0 7.7333 1.6167 14.3333 4.85 19.8a23.15 23.15 0 0 0 16 11.59 26.28 26.28 0 0 0 5.42.59c9.68 0 17.5033-5 23.47-15A53.89 53.89 0 0 0 232.08 56c0-7.7333-1.6167-14.2867-4.85-19.66zm-12.61 27.72c-1.3733 6.56-3.9167 11.5-7.63 14.82-2.9267 2.6667-5.6133 3.7433-8.06 3.23-2.4467-.5133-4.4033-2.6667-5.87-6.46a25.68 25.68 0 0 1-1.76-9.09 35.9 35.9 0 0 1 .73-7.34 33 33 0 0 1 5.28-11.88c3.3333-4.8933 6.8067-6.9467 10.42-6.16 2.44.4867 4.3933 2.64 5.86 6.46a25.68 25.68 0 0 1 1.76 9.12 35.73 35.73 0 0 1-.73 7.33v-.03zM164.57 36.34a23.2 23.2 0 0 0-16-11.59 26.42 26.42 0 0 0-5.43-.58c-9.5933 0-17.4167 5-23.47 15a53 53 0 0 0-7.78 28.16c0 7.7333 1.6133 14.3333 4.84 19.8a23.19 23.19 0 0 0 16 11.59 26.44 26.44 0 0 0 5.43.59c9.68 0 17.5033-5 23.47-15A53.88 53.88 0 0 0 169.4 56c0-7.7333-1.6133-14.2867-4.84-19.66h.01zm-12.61 27.72c-1.3667 6.56-3.91 11.5-7.63 14.82-2.93 2.64-5.63 3.72-8.07 3.23-2.44-.49-4.4-2.64-5.86-6.46a25.7 25.7 0 0 1-1.77-9.09 35.9 35.9 0 0 1 .74-7.34 33 33 0 0 1 5.28-11.88c3.3333-4.8933 6.8067-6.9467 10.42-6.16 2.44.4867 4.3933 2.64 5.86 6.46a25.91 25.91 0 0 1 1.76 9.12 35.73 35.73 0 0 1-.73 7.33v-.03z"}))})});n.d(t,"a",(function(){return o})),n.d(t,"b",(function(){return a})),n.d(t,"c",(function(){return i})),n.d(t,"d",(function(){return l})),n.d(t,"e",(function(){return s})),n.d(t,"f",(function(){return u})),n.d(t,"h",(function(){return d})),n.d(t,"g",(function(){return p})),n.d(t,"i",(function(){return b})),n.d(t,"j",(function(){return m}))},24:function(e,t,n){"use strict";n.d(t,"d",(function(){return p})),n.d(t,"b",(function(){return b})),n.d(t,"c",(function(){return h})),n.d(t,"a",(function(){return f}));var c=n(19),r=n.n(c),o=n(18),a=n(16),i=n.n(a),l=n(4),s=n(5);function u(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var c=Object.getOwnPropertySymbols(e);t&&(c=c.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,c)}return n}function d(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?u(n,!0).forEach((function(t){r()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):u(n).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var p=function(e){var t=e.selected,n=void 0===t?[]:t,c=e.search,r=void 0===c?"":c,a=e.queryArgs,u=function(e){var t=e.selected,n=void 0===t?[]:t,c=e.search,r=void 0===c?"":c,a=e.queryArgs,i=void 0===a?[]:a,l={per_page:s.IS_LARGE_CATALOG?100:-1,catalog_visibility:"any",status:"publish",search:r,orderby:"title",order:"asc"},u=[Object(o.addQueryArgs)(s.ENDPOINTS.products,d({},l,{},i))];return s.IS_LARGE_CATALOG&&n.length&&u.push(Object(o.addQueryArgs)(s.ENDPOINTS.products,{catalog_visibility:"any",status:"publish",include:n})),u}({selected:n,search:r,queryArgs:void 0===a?[]:a});return Promise.all(u.map((function(e){return i()({path:e})}))).then((function(e){return Object(l.uniqBy)(Object(l.flatten)(e),"id")}))},b=function(e){return i()({path:"".concat(s.ENDPOINTS.products,"/").concat(e)})},h=function(e){var t=e.selected,n=function(e){var t=e.selected,n=void 0===t?[]:t,c=e.search,r=[Object(o.addQueryArgs)("".concat(s.ENDPOINTS.products,"/tags"),{per_page:s.LIMIT_TAGS?100:-1,orderby:s.LIMIT_TAGS?"count":"name",order:s.LIMIT_TAGS?"desc":"asc",search:c})];return s.LIMIT_TAGS&&n.length&&r.push(Object(o.addQueryArgs)("".concat(s.ENDPOINTS.products,"/tags"),{include:n})),r}({selected:void 0===t?[]:t,search:e.search});return Promise.all(n.map((function(e){return i()({path:e})}))).then((function(e){return Object(l.uniqBy)(Object(l.flatten)(e),"id")}))},f=function(e){return i()({path:"".concat(s.ENDPOINTS.categories,"/").concat(e)})}},3:function(e,t){!function(){e.exports=this.wp.components}()},32:function(e,t){!function(){e.exports=this.wp.keycodes}()},38:function(e,t){!function(){e.exports=this.wp.escapeHtml}()},4:function(e,t){!function(){e.exports=this.lodash}()},43:function(e,t){!function(){e.exports=this.ReactDOM}()},46:function(e,t){!function(){e.exports=this.wp.viewport}()},5:function(e,t){!function(){e.exports=this.wc["wc-block-settings"]}()},50:function(e,t){!function(){e.exports=this.wp.hooks}()},51:function(e,t,n){"use strict";var c=n(0),r=n(1),o=(n(2),n(27)),a=n.n(o),i=n(6),l=n.n(i),s=n(38),u=n(3);t.a=function(e){var t,n,o=e.className,i=e.error,d=e.isLoading,p=e.onRetry;return Object(c.createElement)(u.Placeholder,{icon:Object(c.createElement)(a.a,{icon:"notice"}),label:Object(r.__)("Sorry, an error occurred","woo-gutenberg-products-block"),className:l()("wc-block-api-error",o)},Object(c.createElement)("div",{className:"wc-block-error__message"},(n=(t=i).apiMessage,t.message||(n?Object(c.createElement)("span",null,Object(r.__)("The following error was returned from the API","woo-gutenberg-products-block"),Object(c.createElement)("br",null),Object(c.createElement)("code",null,Object(s.escapeHTML)(n))):Object(r.__)("An unknown error occurred which prevented the block from being updated.","woo-gutenberg-products-block")))),p&&Object(c.createElement)(c.Fragment,null,d?Object(c.createElement)(u.Spinner,null):Object(c.createElement)(u.Button,{isDefault:!0,onClick:p},Object(r.__)("Retry","woo-gutenberg-products-block"))))}},52:function(e,t){!function(){e.exports=this.wp.htmlEntities}()},53:function(e,t){!function(){e.exports=this.wp.date}()},542:function(e,t,n){var c=n(543);"string"==typeof c&&(c=[[e.i,c,""]]);var r={insert:"head",singleton:!1};n(34)(c,r);c.locals&&(e.exports=c.locals)},543:function(e,t,n){},561:function(e,t,n){"use strict";n.r(t);var c=n(0),r=n(1),o=n(17),a=n(22),i=n(5),l=(n(540),n(542),n(3)),s=n(6),u=n.n(s),d=n(20),p=n(4),b=(n(2),n(102)),h=n(51);function f(e){return e&&e.images&&e.images.length&&e.images[0].src||""}var m=n(71),g=Object(d.compose)([m.b,Object(o.withColors)({overlayColor:"background-color"}),l.withSpokenMessages])((function(e){var t,n,a,s,d=e.attributes,m=e.debouncedSpeak,g=e.error,O=e.getProduct,v=e.isLoading,j=e.isSelected,w=e.overlayColor,y=e.product,E=e.setAttributes,_=e.setOverlayColor,k=function(){var e=d.contentAlign,t=d.editMode,n=d.mediaId||function(e){return e&&e.images&&e.images.length&&e.images[0].id||0}(y);return Object(c.createElement)(o.BlockControls,null,Object(c.createElement)(o.AlignmentToolbar,{value:e,onChange:function(e){E({contentAlign:e})}}),Object(c.createElement)(o.MediaUploadCheck,null,Object(c.createElement)(l.Toolbar,null,Object(c.createElement)(o.MediaUpload,{onSelect:function(e){E({mediaId:e.id,mediaSrc:e.url})},allowedTypes:["image"],value:n,render:function(e){var t=e.open;return Object(c.createElement)(l.IconButton,{className:"components-toolbar__control",label:Object(r.__)("Edit media"),icon:"format-image",onClick:t,disabled:!y})}}))),Object(c.createElement)(l.Toolbar,{controls:[{icon:"edit",title:Object(r.__)("Edit"),onClick:function(){return E({editMode:!t})},isActive:t}]}))},S=d.editMode;return g?Object(c.createElement)(h.a,{className:"wc-block-featured-product-error",error:g,isLoading:v,onRetry:O}):S?Object(c.createElement)(c.Fragment,null,k(),Object(c.createElement)(l.Placeholder,{icon:"star-filled",label:Object(r.__)("Featured Product","woo-gutenberg-products-block"),className:"wc-block-featured-product"},Object(r.__)("Visually highlight a product or variation and encourage prompt action","woo-gutenberg-products-block"),Object(c.createElement)("div",{className:"wc-block-featured-product__selection"},Object(c.createElement)(b.a,{selected:d.productId||0,onChange:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=e[0]?e[0].id:0;E({productId:t,mediaId:0,mediaSrc:""})}}),Object(c.createElement)(l.Button,{isDefault:!0,onClick:function(){E({editMode:!1}),m(Object(r.__)("Showing Featured Product block preview.","woo-gutenberg-products-block"))}},Object(r.__)("Done","woo-gutenberg-products-block"))))):Object(c.createElement)(c.Fragment,null,k(),(t=d.mediaSrc||f(y),n=d.focalPoint,a=void 0===n?{x:.5,y:.5}:n,s="function"==typeof l.FocalPointPicker,Object(c.createElement)(o.InspectorControls,{key:"inspector"},Object(c.createElement)(l.PanelBody,{title:Object(r.__)("Content","woo-gutenberg-products-block")},Object(c.createElement)(l.ToggleControl,{label:Object(r.__)("Show description","woo-gutenberg-products-block"),checked:d.showDesc,onChange:function(){return E({showDesc:!d.showDesc})}}),Object(c.createElement)(l.ToggleControl,{label:Object(r.__)("Show price","woo-gutenberg-products-block"),checked:d.showPrice,onChange:function(){return E({showPrice:!d.showPrice})}})),Object(c.createElement)(o.PanelColorSettings,{title:Object(r.__)("Overlay","woo-gutenberg-products-block"),colorSettings:[{value:w.color,onChange:_,label:Object(r.__)("Overlay Color","woo-gutenberg-products-block")}]},!!t&&Object(c.createElement)(c.Fragment,null,Object(c.createElement)(l.RangeControl,{label:Object(r.__)("Background Opacity","woo-gutenberg-products-block"),value:d.dimRatio,onChange:function(e){return E({dimRatio:e})},min:0,max:100,step:10}),s&&Object(c.createElement)(l.FocalPointPicker,{label:Object(r.__)("Focal Point Picker"),url:t,value:a,onChange:function(e){return E({focalPoint:e})}}))))),y?function(){var e,t,n=d.className,a=d.contentAlign,s=d.dimRatio,b=d.focalPoint,h=d.height,m=d.showDesc,g=d.showPrice,O=u()("wc-block-featured-product",{"is-selected":j,"is-loading":!y&&v,"is-not-found":!y&&!v,"has-background-dim":0!==s},0===(e=s)||50===e?null:"has-background-dim-".concat(10*Math.round(e/10)),"center"!==a&&"has-".concat(a,"-content"),n),_=(t=d.mediaSrc||y,Object(p.isObject)(t)&&(t=f(t)),t?{backgroundImage:"url(".concat(t,")")}:{});w.color&&(_.backgroundColor=w.color),b&&(_.backgroundPosition="".concat(100*b.x,"% ").concat(100*b.y,"%"));return Object(c.createElement)(l.ResizableBox,{className:O,size:{height:h},minHeight:i.MIN_HEIGHT,enable:{bottom:!0},onResizeStop:function(e,t,n){E({height:parseInt(n.style.height)})},style:_},Object(c.createElement)("div",{className:"wc-block-featured-product__wrapper"},Object(c.createElement)("h2",{className:"wc-block-featured-product__title",dangerouslySetInnerHTML:{__html:y.name}}),!Object(p.isEmpty)(y.variation)&&Object(c.createElement)("h3",{className:"wc-block-featured-product__variation",dangerouslySetInnerHTML:{__html:y.variation}}),m&&Object(c.createElement)("div",{className:"wc-block-featured-product__description",dangerouslySetInnerHTML:{__html:y.description}}),g&&Object(c.createElement)("div",{className:"wc-block-featured-product__price",dangerouslySetInnerHTML:{__html:y.price_html}}),Object(c.createElement)("div",{className:"wc-block-featured-product__link"},Object(c.createElement)(o.InnerBlocks,{template:[["core/button",{text:Object(r.__)("Shop now","woo-gutenberg-products-block"),url:y.permalink,align:"center"}]],templateLock:"all"}))))}():Object(c.createElement)(l.Placeholder,{className:"wc-block-featured-product",icon:"star-filled",label:Object(r.__)("Featured Product","woo-gutenberg-products-block")},v?Object(c.createElement)(l.Spinner,null):Object(r.__)("No product is selected.","woo-gutenberg-products-block")))}));Object(a.registerBlockType)("woocommerce/featured-product",{title:Object(r.__)("Featured Product","woo-gutenberg-products-block"),icon:{src:"star-filled",foreground:"#96588a"},category:"woocommerce",keywords:[Object(r.__)("WooCommerce","woo-gutenberg-products-block")],description:Object(r.__)("Visually highlight a product or variation and encourage prompt action.","woo-gutenberg-products-block"),supports:{align:["wide","full"],html:!1},attributes:{contentAlign:{type:"string",default:"center"},dimRatio:{type:"number",default:50},editMode:{type:"boolean",default:!0},focalPoint:{type:"object"},height:{type:"number",default:i.DEFAULT_HEIGHT},mediaId:{type:"number",default:0},mediaSrc:{type:"string",default:""},overlayColor:{type:"string"},customOverlayColor:{type:"string"},linkText:{type:"string",default:Object(r.__)("Shop now","woo-gutenberg-products-block")},productId:{type:"number"},showDesc:{type:"boolean",default:!0},showPrice:{type:"boolean",default:!0}},edit:function(e){return Object(c.createElement)(g,e)},save:function(){return Object(c.createElement)(o.InnerBlocks.Content,null)}})},59:function(e,t){!function(){e.exports=this.wp.dom}()},62:function(e,t){},63:function(e,t){},64:function(e,t){},66:function(e,t){},67:function(e,t){},71:function(e,t,n){"use strict";var c=n(15),r=n.n(c),o=n(37),a=n.n(o),i=n(7),l=n.n(i),s=n(8),u=n.n(s),d=n(9),p=n.n(d),b=n(10),h=n.n(b),f=n(14),m=n.n(f),g=n(11),O=n.n(g),v=n(0),j=n(20),w=n(24),y=Object(j.createHigherOrderComponent)((function(e){return function(t){function n(){var e;return l()(this,n),(e=p()(this,h()(n).apply(this,arguments))).state={error:null,loading:!1,product:null},e.loadProduct=e.loadProduct.bind(m()(e)),e}return O()(n,t),u()(n,[{key:"componentDidMount",value:function(){this.loadProduct()}},{key:"componentDidUpdate",value:function(e){e.attributes.productId!==this.props.attributes.productId&&this.loadProduct()}},{key:"loadProduct",value:function(){var e=this,t=this.props.attributes.productId;t?(this.setState({loading:!0}),Object(w.b)(t).then((function(t){e.setState({product:t,loading:!1,error:null})})).catch((function(t){var n="object"===a()(t)&&t.hasOwnProperty("message")?{apiMessage:t.message}:{apiMessage:null};e.setState({product:null,loading:!1,error:n})}))):this.setState({product:null,loading:!1,error:null})}},{key:"render",value:function(){var t=this.state,n=t.error,c=t.loading,o=t.product;return Object(v.createElement)(e,r()({},this.props,{error:n,getProduct:this.loadProduct,isLoading:c,product:o}))}}]),n}(v.Component)}),"withProduct"),E=Object(j.createHigherOrderComponent)((function(e){return function(t){function n(){var e;return l()(this,n),(e=p()(this,h()(n).apply(this,arguments))).state={error:null,loading:!1,category:null},e.loadCategory=e.loadCategory.bind(m()(e)),e}return O()(n,t),u()(n,[{key:"componentDidMount",value:function(){this.loadCategory()}},{key:"componentDidUpdate",value:function(e){e.attributes.categoryId!==this.props.attributes.categoryId&&this.loadCategory()}},{key:"loadCategory",value:function(){var e=this,t=this.props.attributes.categoryId;t?(this.setState({loading:!0}),Object(w.a)(t).then((function(t){e.setState({category:t,loading:!1,error:null})})).catch((function(t){var n="object"===a()(t)&&t.hasOwnProperty("message")?{apiMessage:t.message}:{apiMessage:null};e.setState({category:null,loading:!1,error:n})}))):this.setState({category:null,loading:!1,error:null})}},{key:"render",value:function(){var t=this.state,n=t.error,c=t.loading,o=t.category;return Object(v.createElement)(e,r()({},this.props,{error:n,getCategory:this.loadCategory,isLoading:c,category:o}))}}]),n}(v.Component)}),"withCategory"),_=n(4),k=(n(2),n(5)),S=Object(j.createHigherOrderComponent)((function(e){var t=function(t){function n(){var e;return l()(this,n),(e=p()(this,h()(n).apply(this,arguments))).state={list:[],loading:!0},e.debouncedOnSearch=Object(_.debounce)(e.onSearch.bind(m()(e)),400),e}return O()(n,t),u()(n,[{key:"componentDidMount",value:function(){var e=this,t=this.props.selected;Object(w.d)({selected:t}).then((function(t){e.setState({list:t,loading:!1})})).catch((function(){e.setState({list:[],loading:!1})}))}},{key:"componentWillUnmount",value:function(){this.debouncedOnSearch.cancel()}},{key:"onSearch",value:function(e){var t=this,n=this.props.selected;Object(w.d)({selected:n,search:e}).then((function(e){t.setState({list:e,loading:!1})})).catch((function(){t.setState({list:[],loading:!1})}))}},{key:"render",value:function(){var t=this.state,n=t.list,c=t.loading,o=this.props.selected;return Object(v.createElement)(e,r()({},this.props,{products:n,isLoading:c,selected:n.filter((function(e){var t=e.id;return o.includes(t)})),onSearch:k.IS_LARGE_CATALOG?this.debouncedOnSearch:null}))}}]),n}(v.Component);return t.defaultProps={selected:[]},t}),"withSearchedProducts");n.d(t,"b",(function(){return y})),n.d(t,"a",(function(){return E})),n.d(t,"c",(function(){return S}))}});
|
build/handpicked-products.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
this.wc=this.wc||{},this.wc.blocks=this.wc.blocks||{},this.wc.blocks["handpicked-products"]=function(e){function t(t){for(var r,i,a=t[0],l=t[1],u=t[2],d=0,b=[];d<a.length;d++)i=a[d],Object.prototype.hasOwnProperty.call(o,i)&&o[i]&&b.push(o[i][0]),o[i]=0;for(r in l)Object.prototype.hasOwnProperty.call(l,r)&&(e[r]=l[r]);for(s&&s(t);b.length;)b.shift()();return c.push.apply(c,u||[]),n()}function n(){for(var e,t=0;t<c.length;t++){for(var n=c[t],r=!0,a=1;a<n.length;a++){var l=n[a];0!==o[l]&&(r=!1)}r&&(c.splice(t--,1),e=i(i.s=n[0]))}return e}var r={},o={7:0},c=[];function i(t){if(r[t])return r[t].exports;var n=r[t]={i:t,l:!1,exports:{}};return e[t].call(n.exports,n,n.exports,i),n.l=!0,n.exports}i.m=e,i.c=r,i.d=function(e,t,n){i.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},i.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},i.t=function(e,t){if(1&t&&(e=i(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(i.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)i.d(n,r,function(t){return e[t]}.bind(null,r));return n},i.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return i.d(t,"a",t),t},i.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},i.p="";var a=window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[],l=a.push.bind(a);a.push=t,a=a.slice();for(var u=0;u<a.length;u++)t(a[u]);var s=l;return c.push([548,2,0]),n()}({0:function(e,t){!function(){e.exports=this.wp.element}()},1:function(e,t){!function(){e.exports=this.wp.i18n}()},13:function(e,t){!function(){e.exports=this.React}()},14:function(e,t){!function(){e.exports=this.moment}()},17:function(e,t){!function(){e.exports=this.wp.apiFetch}()},18:function(e,t){!function(){e.exports=this.wp.editor}()},19:function(e,t){!function(){e.exports=this.wp.url}()},2:function(e,t){!function(){e.exports=this.wp.components}()},21:function(e,t){!function(){e.exports=this.wp.compose}()},23:function(e,t){!function(){e.exports=this.wp.blocks}()},24:function(e,t,n){"use strict";var r=n(0),o=n(2),c=function(e){var t=e.className,n=e.fillColor;return Object(r.createElement)(o.Icon,{className:t,icon:Object(r.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 22.41"},Object(r.createElement)("g",null,Object(r.createElement)("g",null,Object(r.createElement)("path",{fill:n,d:"M16.55 0H1.75C.56 0 0 .52 0 1.68v9.24c0 1.15.56 1.92 1.75 1.92H2V4.76a2.51 2.51 0 0 1 2.74-2.68H18v-.4A1.51 1.51 0 0 0 16.55 0z"}),Object(r.createElement)("path",{fill:n,d:"M19.54 3.11H4.74C3.55 3.11 3 3.64 3 4.79V14c0 1.19.55 2 1.74 2H5V7.88A2.51 2.51 0 0 1 7.73 5.2H21v-.41a1.51 1.51 0 0 0-1.46-1.68z"}),Object(r.createElement)("path",{fill:n,d:"M22.53 6.23H7.73C6.54 6.23 6 6.75 6 7.91v9.24c0 1.15.56 1.92 1.75 1.92h7a.59.59 0 0 1 .32.11l1.61 1.15 2.83 2a.31.31 0 0 0 .18.05.3.3 0 0 0 .31-.3v-2.73a.3.3 0 0 1 .28-.28h2.31A1.47 1.47 0 0 0 24 17.6V7.91a1.52 1.52 0 0 0-1.47-1.68z"}),Object(r.createElement)("path",{fill:"#ffffff",d:"M10.2 10.92l1.06-2.14 1.05 2.14 2.37.35-1.71 1.66.4 2.36-2.11-1.11-.17.09-.52.27-.51.26-.92.49.18-1.02.09-.57.1-.56.03-.21-1.71-1.66 2.37-.35zM21.46 14.25h-4.4a.69.69 0 0 1-.69-.69.68.68 0 0 1 .69-.68h4.4a.68.68 0 0 1 .69.68.69.69 0 0 1-.69.69zM21.46 11.19h-4.4a.69.69 0 1 1 0-1.37h4.4a.69.69 0 1 1 0 1.37z"}))))})},i=function(){return Object(r.createElement)(o.Icon,{icon:Object(r.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},Object(r.createElement)("path",{fillRule:"nonzero",d:"M21.913 7.0946H2.0254c-1.1708 0-2.0984.9908-2.0205 2.16l.741 11.0724c.0714 1.0638.9552 1.8892 2.0206 1.8892h18.4054c1.0654 0 1.9492-.8254 2.0205-1.8892l.7411-11.0724c.0779-1.1692-.8497-2.16-2.0205-2.16zm-8.8006-4.6573h5.987c1.119 0 2.0255.9065 2.0255 2.0254v.934H2.8103V2.0255C2.8103.9064 3.7168 0 4.8357 0h6.2513c1.119 0 2.0254.9065 2.0254 2.0254v.4119zm-7.0589 11.619a.926.926 0 1 1 0-1.852h11.8297a.926.926 0 1 1 0 1.852H6.0535z"}))})},a=function(){return Object(r.createElement)(o.Icon,{icon:Object(r.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},Object(r.createElement)("path",{d:"M22 7.5H2c-1.2 0-2.1 1-2 2.2l.7 11.1c.1 1.1 1 1.9 2 1.9h18.5c1.1 0 2-.8 2-1.9L24 9.6c.1-1.1-.9-2.1-2-2.1zM13.1 2.8v-.4c0-1.1-.9-2-2-2H4.8c-1.1 0-2 .9-2 2v3.4h18.4v-1c0-1.1-.9-2-2-2h-6.1z"}),Object(r.createElement)("path",{fill:"#fff",d:"M14.4 18.7L12 17.4l-2.4 1.3.5-2.6-1.9-1.9 2.6-.4 1.2-2.4 1.2 2.4 2.6.4-1.9 1.9z"}))})},l=function(){return Object(r.createElement)(o.Icon,{className:"material-icon",icon:Object(r.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},Object(r.createElement)("path",{d:"M0 0h24v24H0z",fill:"none"}),Object(r.createElement)("path",{d:"M23 12l-2.44-2.78.34-3.68-3.61-.82-1.89-3.18L12 3 8.6 1.54 6.71 4.72l-3.61.81.34 3.68L1 12l2.44 2.78-.34 3.69 3.61.82 1.89 3.18L12 21l3.4 1.46 1.89-3.18 3.61-.82-.34-3.68L23 12zm-10 5h-2v-2h2v2zm0-4h-2V7h2v6z"}))})},u=function(){return Object(r.createElement)(o.Icon,{icon:Object(r.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},Object(r.createElement)("path",{fill:"#1E8CBE",d:"M12 7c-2.76 0-5 2.24-5 5s2.24 5 5 5 5-2.24 5-5-2.24-5-5-5zm0-5C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"}))})},s=function(){return Object(r.createElement)(o.Icon,{icon:Object(r.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},Object(r.createElement)("path",{fill:"#6C7781",d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"}))})},d=function(e){var t=e.className,n=e.fillColor;return Object(r.createElement)(o.Icon,{className:t,icon:Object(r.createElement)("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},Object(r.createElement)("path",{fill:n,d:"M2.3,17.3h9.3c0.1,0,0.3,0,0.4,0.1l5.9,4.2c0.3,0.2,0.7,0,0.7-0.3v-3.7c0-0.2,0.2-0.4,0.4-0.4H22 c1.1,0,2-0.9,2-2V2.5c0-1.2-0.7-2.2-2-2.2H2.3C0.7,0.2,0,0.9,0,2.5v12.3C0,16.3,0.7,17.3,2.3,17.3z"}),Object(r.createElement)("polygon",{fill:"#ffffff",points:"8.8,12.1 6.5,10.9 4.1,12.1 4.5,9.5 2.6,7.6 5.3,7.2 6.5,4.8 7.6,7.2 10.3,7.6 8.4,9.5"}),Object(r.createElement)("path",{fill:"#ffffff",d:"M20.7,7.9h-7c-0.5,0-0.9-0.4-0.9-0.9S13.2,6,13.7,6h7c0.5,0,0.9,0.4,0.9,0.9S21.2,7.9,20.7,7.9z"}),Object(r.createElement)("path",{fill:"#ffffff",d:"M20.7,11.5h-7c-0.5,0-0.9-0.4-0.9-0.9s0.4-0.9,0.9-0.9h7c0.5,0,0.9,0.4,0.9,0.9S21.2,11.5,20.7,11.5z"}))})},b=function(e){var t=e.className,n=e.fillColor;return Object(r.createElement)(o.Icon,{className:t,icon:Object(r.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 23"},Object(r.createElement)("path",{fill:n,d:"M21.9943 7.0957H2.00638C0.807102 7.0957 -0.0923543 8.0951 0.0075853 9.29437L0.707162 20.3877C0.807102 21.487 1.70656 22.2865 2.70595 22.2865H21.1948C22.2941 22.2865 23.1936 21.487 23.1936 20.3877L23.9931 9.29437C24.093 8.0951 23.0936 7.0957 21.9943 7.0957Z"}),Object(r.createElement)("path",{fill:n,d:"M13.0921 2.39855V1.99879C13.0921 0.899456 12.1926 0 11.0933 0H4.7971C3.69777 0 2.79831 0.899456 2.79831 1.99879V5.39674H21.1872V4.49728C21.1872 3.39795 20.2877 2.49849 19.1884 2.49849H13.0921V2.39855Z"}),Object(r.createElement)("path",{fill:"white",d:"M8.63115 17.126L6.5415 15.9449L4.361 17.126L4.72442 14.6729L2.99819 13.0376L5.45125 12.6742L6.5415 10.4937L7.5409 12.6742L9.99396 13.0376L8.26773 14.6729L8.63115 17.126Z"}),Object(r.createElement)("path",{fill:"white",d:"M19.1907 13.5918H12.9899C12.547 13.5918 12.1926 13.1921 12.1926 12.6924C12.1926 12.1927 12.547 11.7929 12.9899 11.7929H19.1907C19.6336 11.7929 19.9879 12.1927 19.9879 12.6924C19.9879 13.1921 19.6336 13.5918 19.1907 13.5918Z"}),Object(r.createElement)("path",{fill:"white",d:"M19.1907 17.1897H12.9899C12.547 17.1897 12.1926 16.7899 12.1926 16.2902C12.1926 15.7905 12.547 15.3907 12.9899 15.3907H19.1907C19.6336 15.3907 19.9879 15.7905 19.9879 16.2902C19.9879 16.7899 19.6336 17.1897 19.1907 17.1897Z"}))})},p=function(){return Object(r.createElement)(o.Icon,{className:"material-icon",icon:Object(r.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},Object(r.createElement)("path",{d:"M13 13v8h8v-8h-8zM3 21h8v-8H3v8zM3 3v8h8V3H3zm13.66-1.31L11 7.34 16.66 13l5.66-5.66-5.66-5.65z"}),Object(r.createElement)("path",{d:"M0 0h24v24H0z",fill:"none"}))})},g=n(6),h=n.n(g),f=(n(7),function(e){var t=e.size,n=void 0===t?20:t,c=e.className;return Object(r.createElement)(o.Icon,{className:h()("woo-icon",c),icon:Object(r.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",height:n,width:Math.floor(1.67*n),viewBox:"0 0 245 145"},Object(r.createElement)("path",{fill:"#96588A",d:"M22.76 0h199.1a22.77 22.77 0 0 1 22.8 22.76v75.92a22.77 22.77 0 0 1-22.78 22.78h-71.41l9.77 24-43.13-24H22.76C10.1946 121.449.011 111.2654 0 98.7V22.76C.011 10.1946 10.1946.011 22.76 0z"}),Object(r.createElement)("path",{fill:"#FFF",fillRule:"nonzero",d:"M12.32 20.63a8.16 8.16 0 0 1 6.25-3.09c5.0733-.36 7.9867 2.0333 8.74 7.18 3.14 20.86 6.4933 38.5633 10.06 53.11l21.92-41.69c2-3.76 4.49-5.76 7.52-6 4.3867-.3067 7.13 2.49 8.23 8.39a186 186 0 0 0 9.47 34.23c2.62-25.38 7.0133-43.7133 13.18-55a7.73 7.73 0 0 1 6.6-4.43 8.8 8.8 0 0 1 6.32 2 7.75 7.75 0 0 1 3.05 5.74 8.52 8.52 0 0 1-1 4.77c-3.9 7.24-7.12 19.28-9.66 36.12-2.48 16.2533-3.3967 28.9633-2.75 38.13a12.25 12.25 0 0 1-1.16 6.56 6.32 6.32 0 0 1-5.33 3.53c-2.6667.18-5.3033-1.0567-7.91-3.71-9.2933-9.54-16.6567-23.7267-22.09-42.56C57.3 76.7167 52.48 86.3333 49.3 92.76c-5.86 11.3333-10.89 17.13-15.09 17.39-2.7333.1933-5.0667-2.0933-7-6.86-5.1-13.0933-10.5833-38.4033-16.45-75.93a8.56 8.56 0 0 1 1.56-6.73zM227.23 36.34a23.17 23.17 0 0 0-16-11.59 26.25 26.25 0 0 0-5.42-.58c-9.5867 0-17.41 5-23.47 15a53 53 0 0 0-7.78 28.16c0 7.7333 1.6167 14.3333 4.85 19.8a23.15 23.15 0 0 0 16 11.59 26.28 26.28 0 0 0 5.42.59c9.68 0 17.5033-5 23.47-15A53.89 53.89 0 0 0 232.08 56c0-7.7333-1.6167-14.2867-4.85-19.66zm-12.61 27.72c-1.3733 6.56-3.9167 11.5-7.63 14.82-2.9267 2.6667-5.6133 3.7433-8.06 3.23-2.4467-.5133-4.4033-2.6667-5.87-6.46a25.68 25.68 0 0 1-1.76-9.09 35.9 35.9 0 0 1 .73-7.34 33 33 0 0 1 5.28-11.88c3.3333-4.8933 6.8067-6.9467 10.42-6.16 2.44.4867 4.3933 2.64 5.86 6.46a25.68 25.68 0 0 1 1.76 9.12 35.73 35.73 0 0 1-.73 7.33v-.03zM164.57 36.34a23.2 23.2 0 0 0-16-11.59 26.42 26.42 0 0 0-5.43-.58c-9.5933 0-17.4167 5-23.47 15a53 53 0 0 0-7.78 28.16c0 7.7333 1.6133 14.3333 4.84 19.8a23.19 23.19 0 0 0 16 11.59 26.44 26.44 0 0 0 5.43.59c9.68 0 17.5033-5 23.47-15A53.88 53.88 0 0 0 169.4 56c0-7.7333-1.6133-14.2867-4.84-19.66h.01zm-12.61 27.72c-1.3667 6.56-3.91 11.5-7.63 14.82-2.93 2.64-5.63 3.72-8.07 3.23-2.44-.49-4.4-2.64-5.86-6.46a25.7 25.7 0 0 1-1.77-9.09 35.9 35.9 0 0 1 .74-7.34 33 33 0 0 1 5.28-11.88c3.3333-4.8933 6.8067-6.9467 10.42-6.16 2.44.4867 4.3933 2.64 5.86 6.46a25.91 25.91 0 0 1 1.76 9.12 35.73 35.73 0 0 1-.73 7.33v-.03z"}))})});n.d(t,"a",function(){return c}),n.d(t,"b",function(){return i}),n.d(t,"c",function(){return a}),n.d(t,"d",function(){return l}),n.d(t,"e",function(){return u}),n.d(t,"f",function(){return s}),n.d(t,"h",function(){return d}),n.d(t,"g",function(){return b}),n.d(t,"i",function(){return p}),n.d(t,"j",function(){return f})},25:function(e,t,n){"use strict";n.d(t,"d",function(){return b}),n.d(t,"b",function(){return p}),n.d(t,"c",function(){return g}),n.d(t,"a",function(){return h});var r=n(20),o=n.n(r),c=n(19),i=n(17),a=n.n(i),l=n(4),u=n(5);function s(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function d(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?s(n,!0).forEach(function(t){o()(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):s(n).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}var b=function(e){var t=e.selected,n=void 0===t?[]:t,r=e.search,o=void 0===r?"":r,i=e.queryArgs,s=function(e){var t=e.selected,n=void 0===t?[]:t,r=e.search,o=void 0===r?"":r,i=e.queryArgs,a=void 0===i?[]:i,l={per_page:u.IS_LARGE_CATALOG?100:-1,catalog_visibility:"any",status:"publish",search:o,orderby:"title",order:"asc"},s=[Object(c.addQueryArgs)(u.ENDPOINTS.products,d({},l,{},a))];return u.IS_LARGE_CATALOG&&n.length&&s.push(Object(c.addQueryArgs)(u.ENDPOINTS.products,{catalog_visibility:"any",status:"publish",include:n})),s}({selected:n,search:o,queryArgs:void 0===i?[]:i});return Promise.all(s.map(function(e){return a()({path:e})})).then(function(e){return Object(l.uniqBy)(Object(l.flatten)(e),"id")})},p=function(e){return a()({path:"".concat(u.ENDPOINTS.products,"/").concat(e)})},g=function(e){var t=e.selected,n=function(e){var t=e.selected,n=void 0===t?[]:t,r=e.search,o=[Object(c.addQueryArgs)("".concat(u.ENDPOINTS.products,"/tags"),{per_page:u.LIMIT_TAGS?100:-1,orderby:u.LIMIT_TAGS?"count":"name",order:u.LIMIT_TAGS?"desc":"asc",search:r})];return u.LIMIT_TAGS&&n.length&&o.push(Object(c.addQueryArgs)("".concat(u.ENDPOINTS.products,"/tags"),{include:n})),o}({selected:void 0===t?[]:t,search:e.search});return Promise.all(n.map(function(e){return a()({path:e})})).then(function(e){return Object(l.uniqBy)(Object(l.flatten)(e),"id")})},h=function(e){return a()({path:"".concat(u.ENDPOINTS.categories,"/").concat(e)})}},300:function(e,t,n){var r=n(301);"string"==typeof r&&(r=[[e.i,r,""]]);var o={insert:"head",singleton:!1};n(35)(r,o);r.locals&&(e.exports=r.locals)},301:function(e,t,n){},33:function(e,t){!function(){e.exports=this.wp.keycodes}()},37:function(e,t,n){"use strict";var r=n(20),o=n.n(r),c=n(0),i=n(1),a=(n(7),n(2));function l(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function u(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?l(n,!0).forEach(function(t){o()(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):l(n).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}t.a=function(e){var t=e.onChange,n=e.settings,r=n.button,o=n.price,l=n.rating,s=n.title;return Object(c.createElement)(c.Fragment,null,Object(c.createElement)(a.ToggleControl,{label:Object(i.__)("Product title","woo-gutenberg-products-block"),help:s?Object(i.__)("Product title is visible.","woo-gutenberg-products-block"):Object(i.__)("Product title is hidden.","woo-gutenberg-products-block"),checked:s,onChange:function(){return t(u({},n,{title:!s}))}}),Object(c.createElement)(a.ToggleControl,{label:Object(i.__)("Product price","woo-gutenberg-products-block"),help:o?Object(i.__)("Product price is visible.","woo-gutenberg-products-block"):Object(i.__)("Product price is hidden.","woo-gutenberg-products-block"),checked:o,onChange:function(){return t(u({},n,{price:!o}))}}),Object(c.createElement)(a.ToggleControl,{label:Object(i.__)("Product rating","woo-gutenberg-products-block"),help:l?Object(i.__)("Product rating is visible.","woo-gutenberg-products-block"):Object(i.__)("Product rating is hidden.","woo-gutenberg-products-block"),checked:l,onChange:function(){return t(u({},n,{rating:!l}))}}),Object(c.createElement)(a.ToggleControl,{label:Object(i.__)("Add to Cart button","woo-gutenberg-products-block"),help:r?Object(i.__)("Add to Cart button is visible.","woo-gutenberg-products-block"):Object(i.__)("Add to Cart button is hidden.","woo-gutenberg-products-block"),checked:r,onChange:function(){return t(u({},n,{button:!r}))}}))}},4:function(e,t){!function(){e.exports=this.lodash}()},44:function(e,t){!function(){e.exports=this.ReactDOM}()},46:function(e,t,n){"use strict";var r=n(0),o=n(6),c=n.n(o),i=n(58),a=n.n(i),l=n(5);n.d(t,"a",function(){return u});var u=function(e){return function(t){var n=t.attributes,o=n.align,i=n.contentVisibility,u=c()(o?"align".concat(o):"",{"is-hidden-title":!i.title,"is-hidden-price":!i.price,"is-hidden-rating":!i.rating,"is-hidden-button":!i.button});return Object(r.createElement)(r.RawHTML,{className:u},function(e,t){var n=e.attributes,r=n.attributes,o=n.attrOperator,c=n.categories,i=n.catOperator,u=n.orderby,s=n.products,d=n.columns||l.DEFAULT_COLUMNS,b=n.rows||l.DEFAULT_ROWS,p=new Map;switch(p.set("limit",b*d),p.set("columns",d),c&&c.length&&(p.set("category",c.join(",")),i&&"all"===i&&p.set("cat_operator","AND")),r&&r.length&&(p.set("terms",r.map(function(e){return e.id}).join(",")),p.set("attribute",r[0].attr_slug),o&&"all"===o&&p.set("terms_operator","AND")),u&&("price_desc"===u?(p.set("orderby","price"),p.set("order","DESC")):"price_asc"===u?(p.set("orderby","price"),p.set("order","ASC")):"date"===u?(p.set("orderby","date"),p.set("order","DESC")):p.set("orderby",u)),t){case"woocommerce/product-best-sellers":p.set("best_selling","1");break;case"woocommerce/product-top-rated":p.set("orderby","rating");break;case"woocommerce/product-on-sale":p.set("on_sale","1");break;case"woocommerce/product-new":p.set("orderby","date"),p.set("order","DESC");break;case"woocommerce/handpicked-products":if(!s.length)return"";p.set("ids",s.join(",")),p.set("limit",s.length);break;case"woocommerce/product-category":if(!c||!c.length)return"";break;case"woocommerce/products-by-attribute":if(!r||!r.length)return""}var g="[products",h=!0,f=!1,O=void 0;try{for(var m,w=p[Symbol.iterator]();!(h=(m=w.next()).done);h=!0){var v=a()(m.value,2);g+=" "+v[0]+'="'+v[1]+'"'}}catch(e){f=!0,O=e}finally{try{h||null==w.return||w.return()}finally{if(f)throw O}}return g+="]"}(t,e))}}},47:function(e,t){!function(){e.exports=this.wp.viewport}()},5:function(e,t){!function(){e.exports=this.wc["wc-block-settings"]}()},51:function(e,t){!function(){e.exports=this.wp.hooks}()},53:function(e,t){!function(){e.exports=this.wp.htmlEntities}()},54:function(e,t){!function(){e.exports=this.wp.date}()},548:function(e,t,n){"use strict";n.r(t);var r=n(0),o=n(1),c=n(23),i=n(5),a=(n(300),n(8)),l=n.n(a),u=n(9),s=n.n(u),d=n(10),b=n.n(d),p=n(11),g=n.n(p),h=n(12),f=n.n(h),O=n(18),m=n(2),w=(n(7),n(37)),v=n(24),j=n(26),y=n(71),_=function(e){var t=e.onChange,n=e.onSearch,c=e.selected,i=e.products,a=e.isLoading,l={clear:Object(o.__)("Clear all products","woo-gutenberg-products-block"),list:Object(o.__)("Products","woo-gutenberg-products-block"),noItems:Object(o.__)("Your store doesn't have any products.","woo-gutenberg-products-block"),search:Object(o.__)("Search for products to display","woo-gutenberg-products-block"),selected:function(e){return Object(o.sprintf)(Object(o._n)("%d product selected","%d products selected",e,"woo-gutenberg-products-block"),e)},updated:Object(o.__)("Product search results updated.","woo-gutenberg-products-block")};return Object(r.createElement)(j.a,{className:"woocommerce-products",list:i,isLoading:a,selected:c,onSearch:n,onChange:t,messages:l})};_.defaultProps={selected:[],products:[],isLoading:!0};var E=Object(y.c)(_),k=n(57),C=function(e){function t(){return l()(this,t),b()(this,g()(t).apply(this,arguments))}return f()(t,e),s()(t,[{key:"getInspectorControls",value:function(){var e=this.props,t=e.attributes,n=e.setAttributes,c=t.columns,a=t.contentVisibility,l=t.orderby,u=t.alignButtons;return Object(r.createElement)(O.InspectorControls,{key:"inspector"},Object(r.createElement)(m.PanelBody,{title:Object(o.__)("Layout","woo-gutenberg-products-block"),initialOpen:!0},Object(r.createElement)(m.RangeControl,{label:Object(o.__)("Columns","woo-gutenberg-products-block"),value:c,onChange:function(e){return n({columns:e})},min:i.MIN_COLUMNS,max:i.MAX_COLUMNS}),Object(r.createElement)(m.ToggleControl,{label:Object(o.__)("Align Add to Cart buttons","woo-gutenberg-products-block"),help:u?Object(o.__)("Buttons are aligned vertically.","woo-gutenberg-products-block"):Object(o.__)("Buttons follow content.","woo-gutenberg-products-block"),checked:u,onChange:function(){return n({alignButtons:!u})}})),Object(r.createElement)(m.PanelBody,{title:Object(o.__)("Content","woo-gutenberg-products-block"),initialOpen:!0},Object(r.createElement)(w.a,{settings:a,onChange:function(e){return n({contentVisibility:e})}})),Object(r.createElement)(m.PanelBody,{title:Object(o.__)("Order By","woo-gutenberg-products-block"),initialOpen:!1},Object(r.createElement)(k.a,{setAttributes:n,value:l})),Object(r.createElement)(m.PanelBody,{title:Object(o.__)("Products","woo-gutenberg-products-block"),initialOpen:!1},Object(r.createElement)(E,{selected:t.products,onChange:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=e.map(function(e){return e.id});n({products:t})}})))}},{key:"renderEditMode",value:function(){var e=this.props,t=e.attributes,n=e.debouncedSpeak,c=e.setAttributes;return Object(r.createElement)(m.Placeholder,{icon:Object(r.createElement)(v.i,null),label:Object(o.__)("Hand-picked Products","woo-gutenberg-products-block"),className:"wc-block-products-grid wc-block-handpicked-products"},Object(o.__)("Display a selection of hand-picked products in a grid.","woo-gutenberg-products-block"),Object(r.createElement)("div",{className:"wc-block-handpicked-products__selection"},Object(r.createElement)(E,{selected:t.products,onChange:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=e.map(function(e){return e.id});c({products:t})}}),Object(r.createElement)(m.Button,{isDefault:!0,onClick:function(){c({editMode:!1}),n(Object(o.__)("Showing Hand-picked Products block preview.","woo-gutenberg-products-block"))}},Object(o.__)("Done","woo-gutenberg-products-block"))))}},{key:"render",value:function(){var e=this.props,t=e.attributes,n=e.name,c=e.setAttributes,i=t.editMode;return Object(r.createElement)(r.Fragment,null,Object(r.createElement)(O.BlockControls,null,Object(r.createElement)(m.Toolbar,{controls:[{icon:"edit",title:Object(o.__)("Edit"),onClick:function(){return c({editMode:!i})},isActive:i}]})),this.getInspectorControls(),i?this.renderEditMode():Object(r.createElement)(m.Disabled,null,Object(r.createElement)(O.ServerSideRender,{block:n,attributes:t})))}}]),t}(r.Component),S=Object(m.withSpokenMessages)(C),P=n(46);Object(c.registerBlockType)("woocommerce/handpicked-products",{title:Object(o.__)("Hand-picked Products","woo-gutenberg-products-block"),icon:{src:Object(r.createElement)(v.i,null),foreground:"#96588a"},category:"woocommerce",keywords:[Object(o.__)("WooCommerce","woo-gutenberg-products-block")],description:Object(o.__)("Display a selection of hand-picked products in a grid.","woo-gutenberg-products-block"),supports:{align:["wide","full"],html:!1},attributes:{align:{type:"string"},columns:{type:"number",default:i.DEFAULT_COLUMNS},editMode:{type:"boolean",default:!0},contentVisibility:{type:"object",default:{title:!0,price:!0,rating:!0,button:!0}},orderby:{type:"string",default:"date"},products:{type:"array",default:[]},alignButtons:{type:"boolean",default:!1}},deprecated:[{attributes:{align:{type:"string"},columns:{type:"number",default:i.DEFAULT_COLUMNS},editMode:{type:"boolean",default:!0},contentVisibility:{type:"object",default:{title:!0,price:!0,rating:!0,button:!0}},orderby:{type:"string",default:"date"},products:{type:"array",default:[]}},save:Object(P.a)("woocommerce/handpicked-products")}],edit:function(e){return Object(r.createElement)(S,e)},save:function(){return null}})},57:function(e,t,n){"use strict";var r=n(0),o=n(1),c=n(2);n(7);t.a=function(e){var t=e.value,n=e.setAttributes;return Object(r.createElement)(c.SelectControl,{label:Object(o.__)("Order products by","woo-gutenberg-products-block"),value:t,options:[{label:Object(o.__)("Newness - newest first","woo-gutenberg-products-block"),value:"date"},{label:Object(o.__)("Price - low to high","woo-gutenberg-products-block"),value:"price_asc"},{label:Object(o.__)("Price - high to low","woo-gutenberg-products-block"),value:"price_desc"},{label:Object(o.__)("Rating - highest first","woo-gutenberg-products-block"),value:"rating"},{label:Object(o.__)("Sales - most first","woo-gutenberg-products-block"),value:"popularity"},{label:Object(o.__)("Title - alphabetical","woo-gutenberg-products-block"),value:"title"},{label:Object(o.__)("Menu Order","woo-gutenberg-products-block"),value:"menu_order"}],onChange:function(e){return n({orderby:e})}})}},61:function(e,t){!function(){e.exports=this.wp.dom}()},64:function(e,t){},65:function(e,t){},67:function(e,t){},68:function(e,t){},71:function(e,t,n){"use strict";var r=n(16),o=n.n(r),c=n(38),i=n.n(c),a=n(8),l=n.n(a),u=n(9),s=n.n(u),d=n(10),b=n.n(d),p=n(11),g=n.n(p),h=n(15),f=n.n(h),O=n(12),m=n.n(O),w=n(0),v=n(21),j=n(25),y=Object(v.createHigherOrderComponent)(function(e){return function(t){function n(){var e;return l()(this,n),(e=b()(this,g()(n).apply(this,arguments))).state={error:null,loading:!1,product:null},e.loadProduct=e.loadProduct.bind(f()(e)),e}return m()(n,t),s()(n,[{key:"componentDidMount",value:function(){this.loadProduct()}},{key:"componentDidUpdate",value:function(e){e.attributes.productId!==this.props.attributes.productId&&this.loadProduct()}},{key:"loadProduct",value:function(){var e=this,t=this.props.attributes.productId;t?(this.setState({loading:!0}),Object(j.b)(t).then(function(t){e.setState({product:t,loading:!1,error:null})}).catch(function(t){var n="object"===i()(t)&&t.hasOwnProperty("message")?{apiMessage:t.message}:{apiMessage:null};e.setState({product:null,loading:!1,error:n})})):this.setState({product:null,loading:!1,error:null})}},{key:"render",value:function(){var t=this.state,n=t.error,r=t.loading,c=t.product;return Object(w.createElement)(e,o()({},this.props,{error:n,getProduct:this.loadProduct,isLoading:r,product:c}))}}]),n}(w.Component)},"withProduct"),_=Object(v.createHigherOrderComponent)(function(e){return function(t){function n(){var e;return l()(this,n),(e=b()(this,g()(n).apply(this,arguments))).state={error:null,loading:!1,category:null},e.loadCategory=e.loadCategory.bind(f()(e)),e}return m()(n,t),s()(n,[{key:"componentDidMount",value:function(){this.loadCategory()}},{key:"componentDidUpdate",value:function(e){e.attributes.categoryId!==this.props.attributes.categoryId&&this.loadCategory()}},{key:"loadCategory",value:function(){var e=this,t=this.props.attributes.categoryId;t?(this.setState({loading:!0}),Object(j.a)(t).then(function(t){e.setState({category:t,loading:!1,error:null})}).catch(function(t){var n="object"===i()(t)&&t.hasOwnProperty("message")?{apiMessage:t.message}:{apiMessage:null};e.setState({category:null,loading:!1,error:n})})):this.setState({category:null,loading:!1,error:null})}},{key:"render",value:function(){var t=this.state,n=t.error,r=t.loading,c=t.category;return Object(w.createElement)(e,o()({},this.props,{error:n,getCategory:this.loadCategory,isLoading:r,category:c}))}}]),n}(w.Component)},"withCategory"),E=n(4),k=(n(7),n(5)),C=Object(v.createHigherOrderComponent)(function(e){var t=function(t){function n(){var e;return l()(this,n),(e=b()(this,g()(n).apply(this,arguments))).state={list:[],loading:!0},e.debouncedOnSearch=Object(E.debounce)(e.onSearch.bind(f()(e)),400),e}return m()(n,t),s()(n,[{key:"componentDidMount",value:function(){var e=this,t=this.props.selected;Object(j.d)({selected:t}).then(function(t){e.setState({list:t,loading:!1})}).catch(function(){e.setState({list:[],loading:!1})})}},{key:"componentWillUnmount",value:function(){this.debouncedOnSearch.cancel()}},{key:"onSearch",value:function(e){var t=this,n=this.props.selected;Object(j.d)({selected:n,search:e}).then(function(e){t.setState({list:e,loading:!1})}).catch(function(){t.setState({list:[],loading:!1})})}},{key:"render",value:function(){var t=this.state,n=t.list,r=t.loading,c=this.props.selected;return Object(w.createElement)(e,o()({},this.props,{products:n,isLoading:r,selected:n.filter(function(e){var t=e.id;return c.includes(t)}),onSearch:k.IS_LARGE_CATALOG?this.debouncedOnSearch:null}))}}]),n}(w.Component);return t.defaultProps={selected:[]},t},"withSearchedProducts");n.d(t,"b",function(){return y}),n.d(t,"a",function(){return _}),n.d(t,"c",function(){return C})}});
|
1 |
+
this.wc=this.wc||{},this.wc.blocks=this.wc.blocks||{},this.wc.blocks["handpicked-products"]=function(e){function t(t){for(var r,i,a=t[0],l=t[1],u=t[2],d=0,b=[];d<a.length;d++)i=a[d],Object.prototype.hasOwnProperty.call(o,i)&&o[i]&&b.push(o[i][0]),o[i]=0;for(r in l)Object.prototype.hasOwnProperty.call(l,r)&&(e[r]=l[r]);for(s&&s(t);b.length;)b.shift()();return c.push.apply(c,u||[]),n()}function n(){for(var e,t=0;t<c.length;t++){for(var n=c[t],r=!0,a=1;a<n.length;a++){var l=n[a];0!==o[l]&&(r=!1)}r&&(c.splice(t--,1),e=i(i.s=n[0]))}return e}var r={},o={7:0},c=[];function i(t){if(r[t])return r[t].exports;var n=r[t]={i:t,l:!1,exports:{}};return e[t].call(n.exports,n,n.exports,i),n.l=!0,n.exports}i.m=e,i.c=r,i.d=function(e,t,n){i.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},i.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},i.t=function(e,t){if(1&t&&(e=i(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(i.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)i.d(n,r,function(t){return e[t]}.bind(null,r));return n},i.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return i.d(t,"a",t),t},i.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},i.p="";var a=window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[],l=a.push.bind(a);a.push=t,a=a.slice();for(var u=0;u<a.length;u++)t(a[u]);var s=l;return c.push([563,2,0]),n()}({0:function(e,t){!function(){e.exports=this.wp.element}()},1:function(e,t){!function(){e.exports=this.wp.i18n}()},12:function(e,t){!function(){e.exports=this.React}()},13:function(e,t){!function(){e.exports=this.moment}()},16:function(e,t){!function(){e.exports=this.wp.apiFetch}()},17:function(e,t){!function(){e.exports=this.wp.editor}()},18:function(e,t){!function(){e.exports=this.wp.url}()},20:function(e,t){!function(){e.exports=this.wp.compose}()},22:function(e,t){!function(){e.exports=this.wp.blocks}()},23:function(e,t,n){"use strict";var r=n(0),o=n(3),c=function(e){var t=e.className,n=e.fillColor;return Object(r.createElement)(o.Icon,{className:t,icon:Object(r.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 22.41"},Object(r.createElement)("g",null,Object(r.createElement)("g",null,Object(r.createElement)("path",{fill:n,d:"M16.55 0H1.75C.56 0 0 .52 0 1.68v9.24c0 1.15.56 1.92 1.75 1.92H2V4.76a2.51 2.51 0 0 1 2.74-2.68H18v-.4A1.51 1.51 0 0 0 16.55 0z"}),Object(r.createElement)("path",{fill:n,d:"M19.54 3.11H4.74C3.55 3.11 3 3.64 3 4.79V14c0 1.19.55 2 1.74 2H5V7.88A2.51 2.51 0 0 1 7.73 5.2H21v-.41a1.51 1.51 0 0 0-1.46-1.68z"}),Object(r.createElement)("path",{fill:n,d:"M22.53 6.23H7.73C6.54 6.23 6 6.75 6 7.91v9.24c0 1.15.56 1.92 1.75 1.92h7a.59.59 0 0 1 .32.11l1.61 1.15 2.83 2a.31.31 0 0 0 .18.05.3.3 0 0 0 .31-.3v-2.73a.3.3 0 0 1 .28-.28h2.31A1.47 1.47 0 0 0 24 17.6V7.91a1.52 1.52 0 0 0-1.47-1.68z"}),Object(r.createElement)("path",{fill:"#ffffff",d:"M10.2 10.92l1.06-2.14 1.05 2.14 2.37.35-1.71 1.66.4 2.36-2.11-1.11-.17.09-.52.27-.51.26-.92.49.18-1.02.09-.57.1-.56.03-.21-1.71-1.66 2.37-.35zM21.46 14.25h-4.4a.69.69 0 0 1-.69-.69.68.68 0 0 1 .69-.68h4.4a.68.68 0 0 1 .69.68.69.69 0 0 1-.69.69zM21.46 11.19h-4.4a.69.69 0 1 1 0-1.37h4.4a.69.69 0 1 1 0 1.37z"}))))})},i=function(){return Object(r.createElement)(o.Icon,{icon:Object(r.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},Object(r.createElement)("path",{fillRule:"nonzero",d:"M21.913 7.0946H2.0254c-1.1708 0-2.0984.9908-2.0205 2.16l.741 11.0724c.0714 1.0638.9552 1.8892 2.0206 1.8892h18.4054c1.0654 0 1.9492-.8254 2.0205-1.8892l.7411-11.0724c.0779-1.1692-.8497-2.16-2.0205-2.16zm-8.8006-4.6573h5.987c1.119 0 2.0255.9065 2.0255 2.0254v.934H2.8103V2.0255C2.8103.9064 3.7168 0 4.8357 0h6.2513c1.119 0 2.0254.9065 2.0254 2.0254v.4119zm-7.0589 11.619a.926.926 0 1 1 0-1.852h11.8297a.926.926 0 1 1 0 1.852H6.0535z"}))})},a=function(){return Object(r.createElement)(o.Icon,{icon:Object(r.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},Object(r.createElement)("path",{d:"M22 7.5H2c-1.2 0-2.1 1-2 2.2l.7 11.1c.1 1.1 1 1.9 2 1.9h18.5c1.1 0 2-.8 2-1.9L24 9.6c.1-1.1-.9-2.1-2-2.1zM13.1 2.8v-.4c0-1.1-.9-2-2-2H4.8c-1.1 0-2 .9-2 2v3.4h18.4v-1c0-1.1-.9-2-2-2h-6.1z"}),Object(r.createElement)("path",{fill:"#fff",d:"M14.4 18.7L12 17.4l-2.4 1.3.5-2.6-1.9-1.9 2.6-.4 1.2-2.4 1.2 2.4 2.6.4-1.9 1.9z"}))})},l=function(){return Object(r.createElement)(o.Icon,{className:"material-icon",icon:Object(r.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},Object(r.createElement)("path",{d:"M0 0h24v24H0z",fill:"none"}),Object(r.createElement)("path",{d:"M23 12l-2.44-2.78.34-3.68-3.61-.82-1.89-3.18L12 3 8.6 1.54 6.71 4.72l-3.61.81.34 3.68L1 12l2.44 2.78-.34 3.69 3.61.82 1.89 3.18L12 21l3.4 1.46 1.89-3.18 3.61-.82-.34-3.68L23 12zm-10 5h-2v-2h2v2zm0-4h-2V7h2v6z"}))})},u=function(){return Object(r.createElement)(o.Icon,{icon:Object(r.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},Object(r.createElement)("path",{fill:"#1E8CBE",d:"M12 7c-2.76 0-5 2.24-5 5s2.24 5 5 5 5-2.24 5-5-2.24-5-5-5zm0-5C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"}))})},s=function(){return Object(r.createElement)(o.Icon,{icon:Object(r.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},Object(r.createElement)("path",{fill:"#6C7781",d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"}))})},d=function(e){var t=e.className,n=e.fillColor;return Object(r.createElement)(o.Icon,{className:t,icon:Object(r.createElement)("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},Object(r.createElement)("path",{fill:n,d:"M2.3,17.3h9.3c0.1,0,0.3,0,0.4,0.1l5.9,4.2c0.3,0.2,0.7,0,0.7-0.3v-3.7c0-0.2,0.2-0.4,0.4-0.4H22 c1.1,0,2-0.9,2-2V2.5c0-1.2-0.7-2.2-2-2.2H2.3C0.7,0.2,0,0.9,0,2.5v12.3C0,16.3,0.7,17.3,2.3,17.3z"}),Object(r.createElement)("polygon",{fill:"#ffffff",points:"8.8,12.1 6.5,10.9 4.1,12.1 4.5,9.5 2.6,7.6 5.3,7.2 6.5,4.8 7.6,7.2 10.3,7.6 8.4,9.5"}),Object(r.createElement)("path",{fill:"#ffffff",d:"M20.7,7.9h-7c-0.5,0-0.9-0.4-0.9-0.9S13.2,6,13.7,6h7c0.5,0,0.9,0.4,0.9,0.9S21.2,7.9,20.7,7.9z"}),Object(r.createElement)("path",{fill:"#ffffff",d:"M20.7,11.5h-7c-0.5,0-0.9-0.4-0.9-0.9s0.4-0.9,0.9-0.9h7c0.5,0,0.9,0.4,0.9,0.9S21.2,11.5,20.7,11.5z"}))})},b=function(e){var t=e.className,n=e.fillColor;return Object(r.createElement)(o.Icon,{className:t,icon:Object(r.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 23"},Object(r.createElement)("path",{fill:n,d:"M21.9943 7.0957H2.00638C0.807102 7.0957 -0.0923543 8.0951 0.0075853 9.29437L0.707162 20.3877C0.807102 21.487 1.70656 22.2865 2.70595 22.2865H21.1948C22.2941 22.2865 23.1936 21.487 23.1936 20.3877L23.9931 9.29437C24.093 8.0951 23.0936 7.0957 21.9943 7.0957Z"}),Object(r.createElement)("path",{fill:n,d:"M13.0921 2.39855V1.99879C13.0921 0.899456 12.1926 0 11.0933 0H4.7971C3.69777 0 2.79831 0.899456 2.79831 1.99879V5.39674H21.1872V4.49728C21.1872 3.39795 20.2877 2.49849 19.1884 2.49849H13.0921V2.39855Z"}),Object(r.createElement)("path",{fill:"white",d:"M8.63115 17.126L6.5415 15.9449L4.361 17.126L4.72442 14.6729L2.99819 13.0376L5.45125 12.6742L6.5415 10.4937L7.5409 12.6742L9.99396 13.0376L8.26773 14.6729L8.63115 17.126Z"}),Object(r.createElement)("path",{fill:"white",d:"M19.1907 13.5918H12.9899C12.547 13.5918 12.1926 13.1921 12.1926 12.6924C12.1926 12.1927 12.547 11.7929 12.9899 11.7929H19.1907C19.6336 11.7929 19.9879 12.1927 19.9879 12.6924C19.9879 13.1921 19.6336 13.5918 19.1907 13.5918Z"}),Object(r.createElement)("path",{fill:"white",d:"M19.1907 17.1897H12.9899C12.547 17.1897 12.1926 16.7899 12.1926 16.2902C12.1926 15.7905 12.547 15.3907 12.9899 15.3907H19.1907C19.6336 15.3907 19.9879 15.7905 19.9879 16.2902C19.9879 16.7899 19.6336 17.1897 19.1907 17.1897Z"}))})},p=function(){return Object(r.createElement)(o.Icon,{className:"material-icon",icon:Object(r.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},Object(r.createElement)("path",{d:"M13 13v8h8v-8h-8zM3 21h8v-8H3v8zM3 3v8h8V3H3zm13.66-1.31L11 7.34 16.66 13l5.66-5.66-5.66-5.65z"}),Object(r.createElement)("path",{d:"M0 0h24v24H0z",fill:"none"}))})},g=n(6),h=n.n(g),f=(n(2),function(e){var t=e.size,n=void 0===t?20:t,c=e.className;return Object(r.createElement)(o.Icon,{className:h()("woo-icon",c),icon:Object(r.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",height:n,width:Math.floor(1.67*n),viewBox:"0 0 245 145"},Object(r.createElement)("path",{fill:"#96588A",d:"M22.76 0h199.1a22.77 22.77 0 0 1 22.8 22.76v75.92a22.77 22.77 0 0 1-22.78 22.78h-71.41l9.77 24-43.13-24H22.76C10.1946 121.449.011 111.2654 0 98.7V22.76C.011 10.1946 10.1946.011 22.76 0z"}),Object(r.createElement)("path",{fill:"#FFF",fillRule:"nonzero",d:"M12.32 20.63a8.16 8.16 0 0 1 6.25-3.09c5.0733-.36 7.9867 2.0333 8.74 7.18 3.14 20.86 6.4933 38.5633 10.06 53.11l21.92-41.69c2-3.76 4.49-5.76 7.52-6 4.3867-.3067 7.13 2.49 8.23 8.39a186 186 0 0 0 9.47 34.23c2.62-25.38 7.0133-43.7133 13.18-55a7.73 7.73 0 0 1 6.6-4.43 8.8 8.8 0 0 1 6.32 2 7.75 7.75 0 0 1 3.05 5.74 8.52 8.52 0 0 1-1 4.77c-3.9 7.24-7.12 19.28-9.66 36.12-2.48 16.2533-3.3967 28.9633-2.75 38.13a12.25 12.25 0 0 1-1.16 6.56 6.32 6.32 0 0 1-5.33 3.53c-2.6667.18-5.3033-1.0567-7.91-3.71-9.2933-9.54-16.6567-23.7267-22.09-42.56C57.3 76.7167 52.48 86.3333 49.3 92.76c-5.86 11.3333-10.89 17.13-15.09 17.39-2.7333.1933-5.0667-2.0933-7-6.86-5.1-13.0933-10.5833-38.4033-16.45-75.93a8.56 8.56 0 0 1 1.56-6.73zM227.23 36.34a23.17 23.17 0 0 0-16-11.59 26.25 26.25 0 0 0-5.42-.58c-9.5867 0-17.41 5-23.47 15a53 53 0 0 0-7.78 28.16c0 7.7333 1.6167 14.3333 4.85 19.8a23.15 23.15 0 0 0 16 11.59 26.28 26.28 0 0 0 5.42.59c9.68 0 17.5033-5 23.47-15A53.89 53.89 0 0 0 232.08 56c0-7.7333-1.6167-14.2867-4.85-19.66zm-12.61 27.72c-1.3733 6.56-3.9167 11.5-7.63 14.82-2.9267 2.6667-5.6133 3.7433-8.06 3.23-2.4467-.5133-4.4033-2.6667-5.87-6.46a25.68 25.68 0 0 1-1.76-9.09 35.9 35.9 0 0 1 .73-7.34 33 33 0 0 1 5.28-11.88c3.3333-4.8933 6.8067-6.9467 10.42-6.16 2.44.4867 4.3933 2.64 5.86 6.46a25.68 25.68 0 0 1 1.76 9.12 35.73 35.73 0 0 1-.73 7.33v-.03zM164.57 36.34a23.2 23.2 0 0 0-16-11.59 26.42 26.42 0 0 0-5.43-.58c-9.5933 0-17.4167 5-23.47 15a53 53 0 0 0-7.78 28.16c0 7.7333 1.6133 14.3333 4.84 19.8a23.19 23.19 0 0 0 16 11.59 26.44 26.44 0 0 0 5.43.59c9.68 0 17.5033-5 23.47-15A53.88 53.88 0 0 0 169.4 56c0-7.7333-1.6133-14.2867-4.84-19.66h.01zm-12.61 27.72c-1.3667 6.56-3.91 11.5-7.63 14.82-2.93 2.64-5.63 3.72-8.07 3.23-2.44-.49-4.4-2.64-5.86-6.46a25.7 25.7 0 0 1-1.77-9.09 35.9 35.9 0 0 1 .74-7.34 33 33 0 0 1 5.28-11.88c3.3333-4.8933 6.8067-6.9467 10.42-6.16 2.44.4867 4.3933 2.64 5.86 6.46a25.91 25.91 0 0 1 1.76 9.12 35.73 35.73 0 0 1-.73 7.33v-.03z"}))})});n.d(t,"a",(function(){return c})),n.d(t,"b",(function(){return i})),n.d(t,"c",(function(){return a})),n.d(t,"d",(function(){return l})),n.d(t,"e",(function(){return u})),n.d(t,"f",(function(){return s})),n.d(t,"h",(function(){return d})),n.d(t,"g",(function(){return b})),n.d(t,"i",(function(){return p})),n.d(t,"j",(function(){return f}))},24:function(e,t,n){"use strict";n.d(t,"d",(function(){return b})),n.d(t,"b",(function(){return p})),n.d(t,"c",(function(){return g})),n.d(t,"a",(function(){return h}));var r=n(19),o=n.n(r),c=n(18),i=n(16),a=n.n(i),l=n(4),u=n(5);function s(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function d(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?s(n,!0).forEach((function(t){o()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):s(n).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var b=function(e){var t=e.selected,n=void 0===t?[]:t,r=e.search,o=void 0===r?"":r,i=e.queryArgs,s=function(e){var t=e.selected,n=void 0===t?[]:t,r=e.search,o=void 0===r?"":r,i=e.queryArgs,a=void 0===i?[]:i,l={per_page:u.IS_LARGE_CATALOG?100:-1,catalog_visibility:"any",status:"publish",search:o,orderby:"title",order:"asc"},s=[Object(c.addQueryArgs)(u.ENDPOINTS.products,d({},l,{},a))];return u.IS_LARGE_CATALOG&&n.length&&s.push(Object(c.addQueryArgs)(u.ENDPOINTS.products,{catalog_visibility:"any",status:"publish",include:n})),s}({selected:n,search:o,queryArgs:void 0===i?[]:i});return Promise.all(s.map((function(e){return a()({path:e})}))).then((function(e){return Object(l.uniqBy)(Object(l.flatten)(e),"id")}))},p=function(e){return a()({path:"".concat(u.ENDPOINTS.products,"/").concat(e)})},g=function(e){var t=e.selected,n=function(e){var t=e.selected,n=void 0===t?[]:t,r=e.search,o=[Object(c.addQueryArgs)("".concat(u.ENDPOINTS.products,"/tags"),{per_page:u.LIMIT_TAGS?100:-1,orderby:u.LIMIT_TAGS?"count":"name",order:u.LIMIT_TAGS?"desc":"asc",search:r})];return u.LIMIT_TAGS&&n.length&&o.push(Object(c.addQueryArgs)("".concat(u.ENDPOINTS.products,"/tags"),{include:n})),o}({selected:void 0===t?[]:t,search:e.search});return Promise.all(n.map((function(e){return a()({path:e})}))).then((function(e){return Object(l.uniqBy)(Object(l.flatten)(e),"id")}))},h=function(e){return a()({path:"".concat(u.ENDPOINTS.categories,"/").concat(e)})}},3:function(e,t){!function(){e.exports=this.wp.components}()},312:function(e,t,n){var r=n(313);"string"==typeof r&&(r=[[e.i,r,""]]);var o={insert:"head",singleton:!1};n(34)(r,o);r.locals&&(e.exports=r.locals)},313:function(e,t,n){},32:function(e,t){!function(){e.exports=this.wp.keycodes}()},36:function(e,t,n){"use strict";var r=n(19),o=n.n(r),c=n(0),i=n(1),a=(n(2),n(3));function l(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function u(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?l(n,!0).forEach((function(t){o()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):l(n).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}t.a=function(e){var t=e.onChange,n=e.settings,r=n.button,o=n.price,l=n.rating,s=n.title;return Object(c.createElement)(c.Fragment,null,Object(c.createElement)(a.ToggleControl,{label:Object(i.__)("Product title","woo-gutenberg-products-block"),help:s?Object(i.__)("Product title is visible.","woo-gutenberg-products-block"):Object(i.__)("Product title is hidden.","woo-gutenberg-products-block"),checked:s,onChange:function(){return t(u({},n,{title:!s}))}}),Object(c.createElement)(a.ToggleControl,{label:Object(i.__)("Product price","woo-gutenberg-products-block"),help:o?Object(i.__)("Product price is visible.","woo-gutenberg-products-block"):Object(i.__)("Product price is hidden.","woo-gutenberg-products-block"),checked:o,onChange:function(){return t(u({},n,{price:!o}))}}),Object(c.createElement)(a.ToggleControl,{label:Object(i.__)("Product rating","woo-gutenberg-products-block"),help:l?Object(i.__)("Product rating is visible.","woo-gutenberg-products-block"):Object(i.__)("Product rating is hidden.","woo-gutenberg-products-block"),checked:l,onChange:function(){return t(u({},n,{rating:!l}))}}),Object(c.createElement)(a.ToggleControl,{label:Object(i.__)("Add to Cart button","woo-gutenberg-products-block"),help:r?Object(i.__)("Add to Cart button is visible.","woo-gutenberg-products-block"):Object(i.__)("Add to Cart button is hidden.","woo-gutenberg-products-block"),checked:r,onChange:function(){return t(u({},n,{button:!r}))}}))}},4:function(e,t){!function(){e.exports=this.lodash}()},43:function(e,t){!function(){e.exports=this.ReactDOM}()},45:function(e,t,n){"use strict";var r=n(0),o=n(6),c=n.n(o),i=n(56),a=n.n(i),l=n(5);n.d(t,"a",(function(){return u}));var u=function(e){return function(t){var n=t.attributes,o=n.align,i=n.contentVisibility,u=c()(o?"align".concat(o):"",{"is-hidden-title":!i.title,"is-hidden-price":!i.price,"is-hidden-rating":!i.rating,"is-hidden-button":!i.button});return Object(r.createElement)(r.RawHTML,{className:u},function(e,t){var n=e.attributes,r=n.attributes,o=n.attrOperator,c=n.categories,i=n.catOperator,u=n.orderby,s=n.products,d=n.columns||l.DEFAULT_COLUMNS,b=n.rows||l.DEFAULT_ROWS,p=new Map;switch(p.set("limit",b*d),p.set("columns",d),c&&c.length&&(p.set("category",c.join(",")),i&&"all"===i&&p.set("cat_operator","AND")),r&&r.length&&(p.set("terms",r.map((function(e){return e.id})).join(",")),p.set("attribute",r[0].attr_slug),o&&"all"===o&&p.set("terms_operator","AND")),u&&("price_desc"===u?(p.set("orderby","price"),p.set("order","DESC")):"price_asc"===u?(p.set("orderby","price"),p.set("order","ASC")):"date"===u?(p.set("orderby","date"),p.set("order","DESC")):p.set("orderby",u)),t){case"woocommerce/product-best-sellers":p.set("best_selling","1");break;case"woocommerce/product-top-rated":p.set("orderby","rating");break;case"woocommerce/product-on-sale":p.set("on_sale","1");break;case"woocommerce/product-new":p.set("orderby","date"),p.set("order","DESC");break;case"woocommerce/handpicked-products":if(!s.length)return"";p.set("ids",s.join(",")),p.set("limit",s.length);break;case"woocommerce/product-category":if(!c||!c.length)return"";break;case"woocommerce/products-by-attribute":if(!r||!r.length)return""}var g="[products",h=!0,f=!1,O=void 0;try{for(var m,w=p[Symbol.iterator]();!(h=(m=w.next()).done);h=!0){var v=a()(m.value,2);g+=" "+v[0]+'="'+v[1]+'"'}}catch(e){f=!0,O=e}finally{try{h||null==w.return||w.return()}finally{if(f)throw O}}return g+="]"}(t,e))}}},46:function(e,t){!function(){e.exports=this.wp.viewport}()},5:function(e,t){!function(){e.exports=this.wc["wc-block-settings"]}()},50:function(e,t){!function(){e.exports=this.wp.hooks}()},52:function(e,t){!function(){e.exports=this.wp.htmlEntities}()},53:function(e,t){!function(){e.exports=this.wp.date}()},55:function(e,t,n){"use strict";var r=n(0),o=n(1),c=n(3);n(2);t.a=function(e){var t=e.value,n=e.setAttributes;return Object(r.createElement)(c.SelectControl,{label:Object(o.__)("Order products by","woo-gutenberg-products-block"),value:t,options:[{label:Object(o.__)("Newness - newest first","woo-gutenberg-products-block"),value:"date"},{label:Object(o.__)("Price - low to high","woo-gutenberg-products-block"),value:"price_asc"},{label:Object(o.__)("Price - high to low","woo-gutenberg-products-block"),value:"price_desc"},{label:Object(o.__)("Rating - highest first","woo-gutenberg-products-block"),value:"rating"},{label:Object(o.__)("Sales - most first","woo-gutenberg-products-block"),value:"popularity"},{label:Object(o.__)("Title - alphabetical","woo-gutenberg-products-block"),value:"title"},{label:Object(o.__)("Menu Order","woo-gutenberg-products-block"),value:"menu_order"}],onChange:function(e){return n({orderby:e})}})}},563:function(e,t,n){"use strict";n.r(t);var r=n(0),o=n(1),c=n(22),i=n(5),a=(n(312),n(7)),l=n.n(a),u=n(8),s=n.n(u),d=n(9),b=n.n(d),p=n(10),g=n.n(p),h=n(11),f=n.n(h),O=n(17),m=n(3),w=(n(2),n(36)),v=n(23),j=n(25),y=n(71),_=function(e){var t=e.onChange,n=e.onSearch,c=e.selected,i=e.products,a=e.isLoading,l={clear:Object(o.__)("Clear all products","woo-gutenberg-products-block"),list:Object(o.__)("Products","woo-gutenberg-products-block"),noItems:Object(o.__)("Your store doesn't have any products.","woo-gutenberg-products-block"),search:Object(o.__)("Search for products to display","woo-gutenberg-products-block"),selected:function(e){return Object(o.sprintf)(Object(o._n)("%d product selected","%d products selected",e,"woo-gutenberg-products-block"),e)},updated:Object(o.__)("Product search results updated.","woo-gutenberg-products-block")};return Object(r.createElement)(j.a,{className:"woocommerce-products",list:i,isLoading:a,selected:c,onSearch:n,onChange:t,messages:l})};_.defaultProps={selected:[],products:[],isLoading:!0};var E=Object(y.c)(_),k=n(55),C=function(e){function t(){return l()(this,t),b()(this,g()(t).apply(this,arguments))}return f()(t,e),s()(t,[{key:"getInspectorControls",value:function(){var e=this.props,t=e.attributes,n=e.setAttributes,c=t.columns,a=t.contentVisibility,l=t.orderby,u=t.alignButtons;return Object(r.createElement)(O.InspectorControls,{key:"inspector"},Object(r.createElement)(m.PanelBody,{title:Object(o.__)("Layout","woo-gutenberg-products-block"),initialOpen:!0},Object(r.createElement)(m.RangeControl,{label:Object(o.__)("Columns","woo-gutenberg-products-block"),value:c,onChange:function(e){return n({columns:e})},min:i.MIN_COLUMNS,max:i.MAX_COLUMNS}),Object(r.createElement)(m.ToggleControl,{label:Object(o.__)("Align Add to Cart buttons","woo-gutenberg-products-block"),help:u?Object(o.__)("Buttons are aligned vertically.","woo-gutenberg-products-block"):Object(o.__)("Buttons follow content.","woo-gutenberg-products-block"),checked:u,onChange:function(){return n({alignButtons:!u})}})),Object(r.createElement)(m.PanelBody,{title:Object(o.__)("Content","woo-gutenberg-products-block"),initialOpen:!0},Object(r.createElement)(w.a,{settings:a,onChange:function(e){return n({contentVisibility:e})}})),Object(r.createElement)(m.PanelBody,{title:Object(o.__)("Order By","woo-gutenberg-products-block"),initialOpen:!1},Object(r.createElement)(k.a,{setAttributes:n,value:l})),Object(r.createElement)(m.PanelBody,{title:Object(o.__)("Products","woo-gutenberg-products-block"),initialOpen:!1},Object(r.createElement)(E,{selected:t.products,onChange:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=e.map((function(e){return e.id}));n({products:t})}})))}},{key:"renderEditMode",value:function(){var e=this.props,t=e.attributes,n=e.debouncedSpeak,c=e.setAttributes;return Object(r.createElement)(m.Placeholder,{icon:Object(r.createElement)(v.i,null),label:Object(o.__)("Hand-picked Products","woo-gutenberg-products-block"),className:"wc-block-products-grid wc-block-handpicked-products"},Object(o.__)("Display a selection of hand-picked products in a grid.","woo-gutenberg-products-block"),Object(r.createElement)("div",{className:"wc-block-handpicked-products__selection"},Object(r.createElement)(E,{selected:t.products,onChange:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=e.map((function(e){return e.id}));c({products:t})}}),Object(r.createElement)(m.Button,{isDefault:!0,onClick:function(){c({editMode:!1}),n(Object(o.__)("Showing Hand-picked Products block preview.","woo-gutenberg-products-block"))}},Object(o.__)("Done","woo-gutenberg-products-block"))))}},{key:"render",value:function(){var e=this.props,t=e.attributes,n=e.name,c=e.setAttributes,i=t.editMode;return Object(r.createElement)(r.Fragment,null,Object(r.createElement)(O.BlockControls,null,Object(r.createElement)(m.Toolbar,{controls:[{icon:"edit",title:Object(o.__)("Edit"),onClick:function(){return c({editMode:!i})},isActive:i}]})),this.getInspectorControls(),i?this.renderEditMode():Object(r.createElement)(m.Disabled,null,Object(r.createElement)(O.ServerSideRender,{block:n,attributes:t})))}}]),t}(r.Component),S=Object(m.withSpokenMessages)(C),P=n(45);Object(c.registerBlockType)("woocommerce/handpicked-products",{title:Object(o.__)("Hand-picked Products","woo-gutenberg-products-block"),icon:{src:Object(r.createElement)(v.i,null),foreground:"#96588a"},category:"woocommerce",keywords:[Object(o.__)("WooCommerce","woo-gutenberg-products-block")],description:Object(o.__)("Display a selection of hand-picked products in a grid.","woo-gutenberg-products-block"),supports:{align:["wide","full"],html:!1},attributes:{align:{type:"string"},columns:{type:"number",default:i.DEFAULT_COLUMNS},editMode:{type:"boolean",default:!0},contentVisibility:{type:"object",default:{title:!0,price:!0,rating:!0,button:!0}},orderby:{type:"string",default:"date"},products:{type:"array",default:[]},alignButtons:{type:"boolean",default:!1}},deprecated:[{attributes:{align:{type:"string"},columns:{type:"number",default:i.DEFAULT_COLUMNS},editMode:{type:"boolean",default:!0},contentVisibility:{type:"object",default:{title:!0,price:!0,rating:!0,button:!0}},orderby:{type:"string",default:"date"},products:{type:"array",default:[]}},save:Object(P.a)("woocommerce/handpicked-products")}],edit:function(e){return Object(r.createElement)(S,e)},save:function(){return null}})},59:function(e,t){!function(){e.exports=this.wp.dom}()},62:function(e,t){},63:function(e,t){},64:function(e,t){},66:function(e,t){},67:function(e,t){},71:function(e,t,n){"use strict";var r=n(15),o=n.n(r),c=n(37),i=n.n(c),a=n(7),l=n.n(a),u=n(8),s=n.n(u),d=n(9),b=n.n(d),p=n(10),g=n.n(p),h=n(14),f=n.n(h),O=n(11),m=n.n(O),w=n(0),v=n(20),j=n(24),y=Object(v.createHigherOrderComponent)((function(e){return function(t){function n(){var e;return l()(this,n),(e=b()(this,g()(n).apply(this,arguments))).state={error:null,loading:!1,product:null},e.loadProduct=e.loadProduct.bind(f()(e)),e}return m()(n,t),s()(n,[{key:"componentDidMount",value:function(){this.loadProduct()}},{key:"componentDidUpdate",value:function(e){e.attributes.productId!==this.props.attributes.productId&&this.loadProduct()}},{key:"loadProduct",value:function(){var e=this,t=this.props.attributes.productId;t?(this.setState({loading:!0}),Object(j.b)(t).then((function(t){e.setState({product:t,loading:!1,error:null})})).catch((function(t){var n="object"===i()(t)&&t.hasOwnProperty("message")?{apiMessage:t.message}:{apiMessage:null};e.setState({product:null,loading:!1,error:n})}))):this.setState({product:null,loading:!1,error:null})}},{key:"render",value:function(){var t=this.state,n=t.error,r=t.loading,c=t.product;return Object(w.createElement)(e,o()({},this.props,{error:n,getProduct:this.loadProduct,isLoading:r,product:c}))}}]),n}(w.Component)}),"withProduct"),_=Object(v.createHigherOrderComponent)((function(e){return function(t){function n(){var e;return l()(this,n),(e=b()(this,g()(n).apply(this,arguments))).state={error:null,loading:!1,category:null},e.loadCategory=e.loadCategory.bind(f()(e)),e}return m()(n,t),s()(n,[{key:"componentDidMount",value:function(){this.loadCategory()}},{key:"componentDidUpdate",value:function(e){e.attributes.categoryId!==this.props.attributes.categoryId&&this.loadCategory()}},{key:"loadCategory",value:function(){var e=this,t=this.props.attributes.categoryId;t?(this.setState({loading:!0}),Object(j.a)(t).then((function(t){e.setState({category:t,loading:!1,error:null})})).catch((function(t){var n="object"===i()(t)&&t.hasOwnProperty("message")?{apiMessage:t.message}:{apiMessage:null};e.setState({category:null,loading:!1,error:n})}))):this.setState({category:null,loading:!1,error:null})}},{key:"render",value:function(){var t=this.state,n=t.error,r=t.loading,c=t.category;return Object(w.createElement)(e,o()({},this.props,{error:n,getCategory:this.loadCategory,isLoading:r,category:c}))}}]),n}(w.Component)}),"withCategory"),E=n(4),k=(n(2),n(5)),C=Object(v.createHigherOrderComponent)((function(e){var t=function(t){function n(){var e;return l()(this,n),(e=b()(this,g()(n).apply(this,arguments))).state={list:[],loading:!0},e.debouncedOnSearch=Object(E.debounce)(e.onSearch.bind(f()(e)),400),e}return m()(n,t),s()(n,[{key:"componentDidMount",value:function(){var e=this,t=this.props.selected;Object(j.d)({selected:t}).then((function(t){e.setState({list:t,loading:!1})})).catch((function(){e.setState({list:[],loading:!1})}))}},{key:"componentWillUnmount",value:function(){this.debouncedOnSearch.cancel()}},{key:"onSearch",value:function(e){var t=this,n=this.props.selected;Object(j.d)({selected:n,search:e}).then((function(e){t.setState({list:e,loading:!1})})).catch((function(){t.setState({list:[],loading:!1})}))}},{key:"render",value:function(){var t=this.state,n=t.list,r=t.loading,c=this.props.selected;return Object(w.createElement)(e,o()({},this.props,{products:n,isLoading:r,selected:n.filter((function(e){var t=e.id;return c.includes(t)})),onSearch:k.IS_LARGE_CATALOG?this.debouncedOnSearch:null}))}}]),n}(w.Component);return t.defaultProps={selected:[]},t}),"withSearchedProducts");n.d(t,"b",(function(){return y})),n.d(t,"a",(function(){return _})),n.d(t,"c",(function(){return C}))}});
|
build/product-best-sellers.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
this.wc=this.wc||{},this.wc.blocks=this.wc.blocks||{},this.wc.blocks["product-best-sellers"]=function(e){function t(t){for(var r,i,s=t[0],u=t[1],a=t[2],b=0,p=[];b<s.length;b++)i=s[b],Object.prototype.hasOwnProperty.call(n,i)&&n[i]&&p.push(n[i][0]),n[i]=0;for(r in u)Object.prototype.hasOwnProperty.call(u,r)&&(e[r]=u[r]);for(l&&l(t);p.length;)p.shift()();return c.push.apply(c,a||[]),o()}function o(){for(var e,t=0;t<c.length;t++){for(var o=c[t],r=!0,s=1;s<o.length;s++){var u=o[s];0!==n[u]&&(r=!1)}r&&(c.splice(t--,1),e=i(i.s=o[0]))}return e}var r={},n={8:0},c=[];function i(t){if(r[t])return r[t].exports;var o=r[t]={i:t,l:!1,exports:{}};return e[t].call(o.exports,o,o.exports,i),o.l=!0,o.exports}i.m=e,i.c=r,i.d=function(e,t,o){i.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:o})},i.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},i.t=function(e,t){if(1&t&&(e=i(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var o=Object.create(null);if(i.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)i.d(o,r,function(t){return e[t]}.bind(null,r));return o},i.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return i.d(t,"a",t),t},i.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},i.p="";var s=window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[],u=s.push.bind(s);s.push=t,s=s.slice();for(var a=0;a<s.length;a++)t(s[a]);var l=u;return c.push([559,1,0]),o()}({0:function(e,t){!function(){e.exports=this.wp.element}()},1:function(e,t){!function(){e.exports=this.wp.i18n}()},13:function(e,t){!function(){e.exports=this.React}()},14:function(e,t){!function(){e.exports=this.moment}()},17:function(e,t){!function(){e.exports=this.wp.apiFetch}()},18:function(e,t){!function(){e.exports=this.wp.editor}()},19:function(e,t){!function(){e.exports=this.wp.url}()},2:function(e,t){!function(){e.exports=this.wp.components}()},21:function(e,t){!function(){e.exports=this.wp.compose}()},23:function(e,t){!function(){e.exports=this.wp.blocks}()},33:function(e,t){!function(){e.exports=this.wp.keycodes}()},36:function(e,t,o){"use strict";o.d(t,"b",function(){return n});var r=o(5),n=["woocommerce/product-best-sellers","woocommerce/product-category","woocommerce/product-new","woocommerce/product-on-sale","woocommerce/product-top-rated"];t.a={columns:{type:"number",default:r.DEFAULT_COLUMNS},rows:{type:"number",default:r.DEFAULT_ROWS},alignButtons:{type:"boolean",default:!1},categories:{type:"array",default:[]},catOperator:{type:"string",default:"any"},contentVisibility:{type:"object",default:{title:!0,price:!0,rating:!0,button:!0}}}},37:function(e,t,o){"use strict";var r=o(20),n=o.n(r),c=o(0),i=o(1),s=(o(7),o(2));function u(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),o.push.apply(o,r)}return o}function a(e){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?u(o,!0).forEach(function(t){n()(e,t,o[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):u(o).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(o,t))})}return e}t.a=function(e){var t=e.onChange,o=e.settings,r=o.button,n=o.price,u=o.rating,l=o.title;return Object(c.createElement)(c.Fragment,null,Object(c.createElement)(s.ToggleControl,{label:Object(i.__)("Product title","woo-gutenberg-products-block"),help:l?Object(i.__)("Product title is visible.","woo-gutenberg-products-block"):Object(i.__)("Product title is hidden.","woo-gutenberg-products-block"),checked:l,onChange:function(){return t(a({},o,{title:!l}))}}),Object(c.createElement)(s.ToggleControl,{label:Object(i.__)("Product price","woo-gutenberg-products-block"),help:n?Object(i.__)("Product price is visible.","woo-gutenberg-products-block"):Object(i.__)("Product price is hidden.","woo-gutenberg-products-block"),checked:n,onChange:function(){return t(a({},o,{price:!n}))}}),Object(c.createElement)(s.ToggleControl,{label:Object(i.__)("Product rating","woo-gutenberg-products-block"),help:u?Object(i.__)("Product rating is visible.","woo-gutenberg-products-block"):Object(i.__)("Product rating is hidden.","woo-gutenberg-products-block"),checked:u,onChange:function(){return t(a({},o,{rating:!u}))}}),Object(c.createElement)(s.ToggleControl,{label:Object(i.__)("Add to Cart button","woo-gutenberg-products-block"),help:r?Object(i.__)("Add to Cart button is visible.","woo-gutenberg-products-block"):Object(i.__)("Add to Cart button is hidden.","woo-gutenberg-products-block"),checked:r,onChange:function(){return t(a({},o,{button:!r}))}}))}},4:function(e,t){!function(){e.exports=this.lodash}()},41:function(e,t,o){"use strict";var r=o(16),n=o.n(r),c=o(8),i=o.n(c),s=o(9),u=o.n(s),a=o(10),l=o.n(a),b=o(11),p=o.n(b),d=o(15),g=o.n(d),f=o(12),m=o.n(f),O=o(0),h=o(1),w=o(19),j=o(17),y=o.n(j),_=o(4),v=(o(7),o(26)),k=o(2),C=o(5),P=(o(86),function(e){function t(){var e;return i()(this,t),(e=l()(this,p()(t).apply(this,arguments))).state={list:[],loading:!0},e.renderItem=e.renderItem.bind(g()(e)),e}return m()(t,e),u()(t,[{key:"componentDidMount",value:function(){var e=this;y()({path:Object(w.addQueryArgs)("".concat(C.ENDPOINTS.products,"/categories"),{per_page:-1})}).then(function(t){e.setState({list:t,loading:!1})}).catch(function(){e.setState({list:[],loading:!1})})}},{key:"renderItem",value:function(e){var t=e.item,o=e.search,r=e.depth,c=void 0===r?0:r,i=["woocommerce-product-categories__item"];o.length&&i.push("is-searching"),0===c&&0!==t.parent&&i.push("is-skip-level");var s=t.breadcrumbs.length?"".concat(t.breadcrumbs.join(", "),", ").concat(t.name):t.name;return Object(O.createElement)(v.b,n()({className:i.join(" ")},e,{showCount:!0,"aria-label":Object(h.sprintf)(Object(h._n)("%s, has %d product","%s, has %d products",t.count,"woo-gutenberg-products-block"),s,t.count)}))}},{key:"render",value:function(){var e=this.state,t=e.list,o=e.loading,r=this.props,n=r.onChange,c=r.onOperatorChange,i=r.operator,s=r.selected,u=r.isSingle,a={clear:Object(h.__)("Clear all product categories","woo-gutenberg-products-block"),list:Object(h.__)("Product Categories","woo-gutenberg-products-block"),noItems:Object(h.__)("Your store doesn't have any product categories.","woo-gutenberg-products-block"),search:Object(h.__)("Search for product categories","woo-gutenberg-products-block"),selected:function(e){return Object(h.sprintf)(Object(h._n)("%d category selected","%d categories selected",e,"woo-gutenberg-products-block"),e)},updated:Object(h.__)("Category search results updated.","woo-gutenberg-products-block")};return Object(O.createElement)(O.Fragment,null,Object(O.createElement)(v.a,{className:"woocommerce-product-categories",list:t,isLoading:o,selected:s.map(function(e){return Object(_.find)(t,{id:e})}).filter(Boolean),onChange:n,renderItem:this.renderItem,messages:a,isHierarchical:!0,isSingle:u}),!!c&&Object(O.createElement)("div",{className:s.length<2?"screen-reader-text":""},Object(O.createElement)(k.SelectControl,{className:"woocommerce-product-categories__operator",label:Object(h.__)("Display products matching","woo-gutenberg-products-block"),help:Object(h.__)("Pick at least two categories to use this setting.","woo-gutenberg-products-block"),value:i,onChange:c,options:[{label:Object(h.__)("Any selected categories","woo-gutenberg-products-block"),value:"any"},{label:Object(h.__)("All selected categories","woo-gutenberg-products-block"),value:"all"}]})))}}]),t}(O.Component));P.defaultProps={operator:"any",isSingle:!1},t.a=P},44:function(e,t){!function(){e.exports=this.ReactDOM}()},45:function(e,t,o){"use strict";var r=o(0),n=o(1),c=o(4),i=(o(7),o(2)),s=o(5);t.a=function(e){var t=e.columns,o=e.rows,u=e.setAttributes,a=e.alignButtons;return Object(r.createElement)(r.Fragment,null,Object(r.createElement)(i.RangeControl,{label:Object(n.__)("Columns","woo-gutenberg-products-block"),value:t,onChange:function(e){var t=Object(c.clamp)(e,s.MIN_COLUMNS,s.MAX_COLUMNS);u({columns:Object(c.isNaN)(t)?"":t})},min:s.MIN_COLUMNS,max:s.MAX_COLUMNS}),Object(r.createElement)(i.RangeControl,{label:Object(n.__)("Rows","woo-gutenberg-products-block"),value:o,onChange:function(e){var t=Object(c.clamp)(e,s.MIN_ROWS,s.MAX_ROWS);u({rows:Object(c.isNaN)(t)?"":t})},min:s.MIN_ROWS,max:s.MAX_ROWS}),Object(r.createElement)(i.ToggleControl,{label:Object(n.__)("Align Add to Cart buttons","woo-gutenberg-products-block"),help:a?Object(n.__)("Buttons are aligned vertically.","woo-gutenberg-products-block"):Object(n.__)("Buttons follow content.","woo-gutenberg-products-block"),checked:a,onChange:function(){return u({alignButtons:!a})}}))}},46:function(e,t,o){"use strict";var r=o(0),n=o(6),c=o.n(n),i=o(58),s=o.n(i),u=o(5);o.d(t,"a",function(){return a});var a=function(e){return function(t){var o=t.attributes,n=o.align,i=o.contentVisibility,a=c()(n?"align".concat(n):"",{"is-hidden-title":!i.title,"is-hidden-price":!i.price,"is-hidden-rating":!i.rating,"is-hidden-button":!i.button});return Object(r.createElement)(r.RawHTML,{className:a},function(e,t){var o=e.attributes,r=o.attributes,n=o.attrOperator,c=o.categories,i=o.catOperator,a=o.orderby,l=o.products,b=o.columns||u.DEFAULT_COLUMNS,p=o.rows||u.DEFAULT_ROWS,d=new Map;switch(d.set("limit",p*b),d.set("columns",b),c&&c.length&&(d.set("category",c.join(",")),i&&"all"===i&&d.set("cat_operator","AND")),r&&r.length&&(d.set("terms",r.map(function(e){return e.id}).join(",")),d.set("attribute",r[0].attr_slug),n&&"all"===n&&d.set("terms_operator","AND")),a&&("price_desc"===a?(d.set("orderby","price"),d.set("order","DESC")):"price_asc"===a?(d.set("orderby","price"),d.set("order","ASC")):"date"===a?(d.set("orderby","date"),d.set("order","DESC")):d.set("orderby",a)),t){case"woocommerce/product-best-sellers":d.set("best_selling","1");break;case"woocommerce/product-top-rated":d.set("orderby","rating");break;case"woocommerce/product-on-sale":d.set("on_sale","1");break;case"woocommerce/product-new":d.set("orderby","date"),d.set("order","DESC");break;case"woocommerce/handpicked-products":if(!l.length)return"";d.set("ids",l.join(",")),d.set("limit",l.length);break;case"woocommerce/product-category":if(!c||!c.length)return"";break;case"woocommerce/products-by-attribute":if(!r||!r.length)return""}var g="[products",f=!0,m=!1,O=void 0;try{for(var h,w=d[Symbol.iterator]();!(f=(h=w.next()).done);f=!0){var j=s()(h.value,2);g+=" "+j[0]+'="'+j[1]+'"'}}catch(e){m=!0,O=e}finally{try{f||null==w.return||w.return()}finally{if(m)throw O}}return g+="]"}(t,e))}}},47:function(e,t){!function(){e.exports=this.wp.viewport}()},5:function(e,t){!function(){e.exports=this.wc["wc-block-settings"]}()},51:function(e,t){!function(){e.exports=this.wp.hooks}()},53:function(e,t){!function(){e.exports=this.wp.htmlEntities}()},54:function(e,t){!function(){e.exports=this.wp.date}()},559:function(e,t,o){"use strict";o.r(t);var r=o(20),n=o.n(r),c=o(0),i=o(1),s=o(23),u=o(4),a=o(29),l=o.n(a),b=o(8),p=o.n(b),d=o(9),g=o.n(d),f=o(10),m=o.n(f),O=o(11),h=o.n(O),w=o(12),j=o.n(w),y=o(2),_=o(18),v=(o(7),o(37)),k=o(45),C=o(41),P=function(e){function t(){return p()(this,t),m()(this,h()(t).apply(this,arguments))}return j()(t,e),g()(t,[{key:"getInspectorControls",value:function(){var e=this.props,t=e.attributes,o=e.setAttributes,r=t.categories,n=t.catOperator,s=t.columns,u=t.contentVisibility,a=t.rows,l=t.alignButtons;return Object(c.createElement)(_.InspectorControls,{key:"inspector"},Object(c.createElement)(y.PanelBody,{title:Object(i.__)("Layout","woo-gutenberg-products-block"),initialOpen:!0},Object(c.createElement)(k.a,{columns:s,rows:a,alignButtons:l,setAttributes:o})),Object(c.createElement)(y.PanelBody,{title:Object(i.__)("Content","woo-gutenberg-products-block"),initialOpen:!0},Object(c.createElement)(v.a,{settings:u,onChange:function(e){return o({contentVisibility:e})}})),Object(c.createElement)(y.PanelBody,{title:Object(i.__)("Filter by Product Category","woo-gutenberg-products-block"),initialOpen:!1},Object(c.createElement)(C.a,{selected:r,onChange:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=e.map(function(e){return e.id});o({categories:t})},operator:n,onOperatorChange:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"any";return o({catOperator:e})}})))}},{key:"render",value:function(){var e=this.props,t=e.attributes,o=e.name;return Object(c.createElement)(c.Fragment,null,this.getInspectorControls(),Object(c.createElement)(y.Disabled,null,Object(c.createElement)(_.ServerSideRender,{block:o,attributes:t})))}}]),t}(c.Component),E=o(46),S=o(36);function x(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),o.push.apply(o,r)}return o}Object(s.registerBlockType)("woocommerce/product-best-sellers",{title:Object(i.__)("Best Selling Products","woo-gutenberg-products-block"),icon:{src:Object(c.createElement)(l.a,{icon:"stats-up-alt"}),foreground:"#96588a"},category:"woocommerce",keywords:[Object(i.__)("WooCommerce","woo-gutenberg-products-block")],description:Object(i.__)("Display a grid of your all-time best selling products.","woo-gutenberg-products-block"),supports:{align:["wide","full"],html:!1},attributes:function(e){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?x(o,!0).forEach(function(t){n()(e,t,o[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):x(o).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(o,t))})}return e}({},S.a),transforms:{from:[{type:"block",blocks:Object(u.without)(S.b,"woocommerce/product-best-sellers"),transform:function(e){return Object(s.createBlock)("woocommerce/product-best-sellers",e)}}]},deprecated:[{attributes:S.a,save:Object(E.a)("woocommerce/product-best-sellers")}],edit:function(e){return Object(c.createElement)(P,e)},save:function(){return null}})},61:function(e,t){!function(){e.exports=this.wp.dom}()},64:function(e,t){},65:function(e,t){},67:function(e,t){},68:function(e,t){}});
|
1 |
+
this.wc=this.wc||{},this.wc.blocks=this.wc.blocks||{},this.wc.blocks["product-best-sellers"]=function(e){function t(t){for(var r,i,s=t[0],u=t[1],a=t[2],b=0,p=[];b<s.length;b++)i=s[b],Object.prototype.hasOwnProperty.call(n,i)&&n[i]&&p.push(n[i][0]),n[i]=0;for(r in u)Object.prototype.hasOwnProperty.call(u,r)&&(e[r]=u[r]);for(l&&l(t);p.length;)p.shift()();return c.push.apply(c,a||[]),o()}function o(){for(var e,t=0;t<c.length;t++){for(var o=c[t],r=!0,s=1;s<o.length;s++){var u=o[s];0!==n[u]&&(r=!1)}r&&(c.splice(t--,1),e=i(i.s=o[0]))}return e}var r={},n={8:0},c=[];function i(t){if(r[t])return r[t].exports;var o=r[t]={i:t,l:!1,exports:{}};return e[t].call(o.exports,o,o.exports,i),o.l=!0,o.exports}i.m=e,i.c=r,i.d=function(e,t,o){i.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:o})},i.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},i.t=function(e,t){if(1&t&&(e=i(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var o=Object.create(null);if(i.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)i.d(o,r,function(t){return e[t]}.bind(null,r));return o},i.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return i.d(t,"a",t),t},i.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},i.p="";var s=window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[],u=s.push.bind(s);s.push=t,s=s.slice();for(var a=0;a<s.length;a++)t(s[a]);var l=u;return c.push([573,1,0]),o()}({0:function(e,t){!function(){e.exports=this.wp.element}()},1:function(e,t){!function(){e.exports=this.wp.i18n}()},12:function(e,t){!function(){e.exports=this.React}()},13:function(e,t){!function(){e.exports=this.moment}()},16:function(e,t){!function(){e.exports=this.wp.apiFetch}()},17:function(e,t){!function(){e.exports=this.wp.editor}()},18:function(e,t){!function(){e.exports=this.wp.url}()},20:function(e,t){!function(){e.exports=this.wp.compose}()},22:function(e,t){!function(){e.exports=this.wp.blocks}()},3:function(e,t){!function(){e.exports=this.wp.components}()},32:function(e,t){!function(){e.exports=this.wp.keycodes}()},35:function(e,t,o){"use strict";o.d(t,"b",(function(){return n}));var r=o(5),n=["woocommerce/product-best-sellers","woocommerce/product-category","woocommerce/product-new","woocommerce/product-on-sale","woocommerce/product-top-rated"];t.a={columns:{type:"number",default:r.DEFAULT_COLUMNS},rows:{type:"number",default:r.DEFAULT_ROWS},alignButtons:{type:"boolean",default:!1},categories:{type:"array",default:[]},catOperator:{type:"string",default:"any"},contentVisibility:{type:"object",default:{title:!0,price:!0,rating:!0,button:!0}}}},36:function(e,t,o){"use strict";var r=o(19),n=o.n(r),c=o(0),i=o(1),s=(o(2),o(3));function u(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),o.push.apply(o,r)}return o}function a(e){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?u(o,!0).forEach((function(t){n()(e,t,o[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):u(o).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(o,t))}))}return e}t.a=function(e){var t=e.onChange,o=e.settings,r=o.button,n=o.price,u=o.rating,l=o.title;return Object(c.createElement)(c.Fragment,null,Object(c.createElement)(s.ToggleControl,{label:Object(i.__)("Product title","woo-gutenberg-products-block"),help:l?Object(i.__)("Product title is visible.","woo-gutenberg-products-block"):Object(i.__)("Product title is hidden.","woo-gutenberg-products-block"),checked:l,onChange:function(){return t(a({},o,{title:!l}))}}),Object(c.createElement)(s.ToggleControl,{label:Object(i.__)("Product price","woo-gutenberg-products-block"),help:n?Object(i.__)("Product price is visible.","woo-gutenberg-products-block"):Object(i.__)("Product price is hidden.","woo-gutenberg-products-block"),checked:n,onChange:function(){return t(a({},o,{price:!n}))}}),Object(c.createElement)(s.ToggleControl,{label:Object(i.__)("Product rating","woo-gutenberg-products-block"),help:u?Object(i.__)("Product rating is visible.","woo-gutenberg-products-block"):Object(i.__)("Product rating is hidden.","woo-gutenberg-products-block"),checked:u,onChange:function(){return t(a({},o,{rating:!u}))}}),Object(c.createElement)(s.ToggleControl,{label:Object(i.__)("Add to Cart button","woo-gutenberg-products-block"),help:r?Object(i.__)("Add to Cart button is visible.","woo-gutenberg-products-block"):Object(i.__)("Add to Cart button is hidden.","woo-gutenberg-products-block"),checked:r,onChange:function(){return t(a({},o,{button:!r}))}}))}},4:function(e,t){!function(){e.exports=this.lodash}()},40:function(e,t,o){"use strict";var r=o(15),n=o.n(r),c=o(7),i=o.n(c),s=o(8),u=o.n(s),a=o(9),l=o.n(a),b=o(10),p=o.n(b),d=o(14),g=o.n(d),f=o(11),m=o.n(f),O=o(0),h=o(1),w=o(18),j=o(16),y=o.n(j),_=o(4),v=(o(2),o(25)),k=o(3),C=o(5),P=(o(89),function(e){function t(){var e;return i()(this,t),(e=l()(this,p()(t).apply(this,arguments))).state={list:[],loading:!0},e.renderItem=e.renderItem.bind(g()(e)),e}return m()(t,e),u()(t,[{key:"componentDidMount",value:function(){var e=this;y()({path:Object(w.addQueryArgs)("".concat(C.ENDPOINTS.products,"/categories"),{per_page:-1})}).then((function(t){e.setState({list:t,loading:!1})})).catch((function(){e.setState({list:[],loading:!1})}))}},{key:"renderItem",value:function(e){var t=e.item,o=e.search,r=e.depth,c=void 0===r?0:r,i=["woocommerce-product-categories__item"];o.length&&i.push("is-searching"),0===c&&0!==t.parent&&i.push("is-skip-level");var s=t.breadcrumbs.length?"".concat(t.breadcrumbs.join(", "),", ").concat(t.name):t.name;return Object(O.createElement)(v.b,n()({className:i.join(" ")},e,{showCount:!0,"aria-label":Object(h.sprintf)(Object(h._n)("%s, has %d product","%s, has %d products",t.count,"woo-gutenberg-products-block"),s,t.count)}))}},{key:"render",value:function(){var e=this.state,t=e.list,o=e.loading,r=this.props,n=r.onChange,c=r.onOperatorChange,i=r.operator,s=r.selected,u=r.isSingle,a={clear:Object(h.__)("Clear all product categories","woo-gutenberg-products-block"),list:Object(h.__)("Product Categories","woo-gutenberg-products-block"),noItems:Object(h.__)("Your store doesn't have any product categories.","woo-gutenberg-products-block"),search:Object(h.__)("Search for product categories","woo-gutenberg-products-block"),selected:function(e){return Object(h.sprintf)(Object(h._n)("%d category selected","%d categories selected",e,"woo-gutenberg-products-block"),e)},updated:Object(h.__)("Category search results updated.","woo-gutenberg-products-block")};return Object(O.createElement)(O.Fragment,null,Object(O.createElement)(v.a,{className:"woocommerce-product-categories",list:t,isLoading:o,selected:s.map((function(e){return Object(_.find)(t,{id:e})})).filter(Boolean),onChange:n,renderItem:this.renderItem,messages:a,isHierarchical:!0,isSingle:u}),!!c&&Object(O.createElement)("div",{className:s.length<2?"screen-reader-text":""},Object(O.createElement)(k.SelectControl,{className:"woocommerce-product-categories__operator",label:Object(h.__)("Display products matching","woo-gutenberg-products-block"),help:Object(h.__)("Pick at least two categories to use this setting.","woo-gutenberg-products-block"),value:i,onChange:c,options:[{label:Object(h.__)("Any selected categories","woo-gutenberg-products-block"),value:"any"},{label:Object(h.__)("All selected categories","woo-gutenberg-products-block"),value:"all"}]})))}}]),t}(O.Component));P.defaultProps={operator:"any",isSingle:!1},t.a=P},43:function(e,t){!function(){e.exports=this.ReactDOM}()},44:function(e,t,o){"use strict";var r=o(0),n=o(1),c=o(4),i=(o(2),o(3)),s=o(5);t.a=function(e){var t=e.columns,o=e.rows,u=e.setAttributes,a=e.alignButtons;return Object(r.createElement)(r.Fragment,null,Object(r.createElement)(i.RangeControl,{label:Object(n.__)("Columns","woo-gutenberg-products-block"),value:t,onChange:function(e){var t=Object(c.clamp)(e,s.MIN_COLUMNS,s.MAX_COLUMNS);u({columns:Object(c.isNaN)(t)?"":t})},min:s.MIN_COLUMNS,max:s.MAX_COLUMNS}),Object(r.createElement)(i.RangeControl,{label:Object(n.__)("Rows","woo-gutenberg-products-block"),value:o,onChange:function(e){var t=Object(c.clamp)(e,s.MIN_ROWS,s.MAX_ROWS);u({rows:Object(c.isNaN)(t)?"":t})},min:s.MIN_ROWS,max:s.MAX_ROWS}),Object(r.createElement)(i.ToggleControl,{label:Object(n.__)("Align Add to Cart buttons","woo-gutenberg-products-block"),help:a?Object(n.__)("Buttons are aligned vertically.","woo-gutenberg-products-block"):Object(n.__)("Buttons follow content.","woo-gutenberg-products-block"),checked:a,onChange:function(){return u({alignButtons:!a})}}))}},45:function(e,t,o){"use strict";var r=o(0),n=o(6),c=o.n(n),i=o(56),s=o.n(i),u=o(5);o.d(t,"a",(function(){return a}));var a=function(e){return function(t){var o=t.attributes,n=o.align,i=o.contentVisibility,a=c()(n?"align".concat(n):"",{"is-hidden-title":!i.title,"is-hidden-price":!i.price,"is-hidden-rating":!i.rating,"is-hidden-button":!i.button});return Object(r.createElement)(r.RawHTML,{className:a},function(e,t){var o=e.attributes,r=o.attributes,n=o.attrOperator,c=o.categories,i=o.catOperator,a=o.orderby,l=o.products,b=o.columns||u.DEFAULT_COLUMNS,p=o.rows||u.DEFAULT_ROWS,d=new Map;switch(d.set("limit",p*b),d.set("columns",b),c&&c.length&&(d.set("category",c.join(",")),i&&"all"===i&&d.set("cat_operator","AND")),r&&r.length&&(d.set("terms",r.map((function(e){return e.id})).join(",")),d.set("attribute",r[0].attr_slug),n&&"all"===n&&d.set("terms_operator","AND")),a&&("price_desc"===a?(d.set("orderby","price"),d.set("order","DESC")):"price_asc"===a?(d.set("orderby","price"),d.set("order","ASC")):"date"===a?(d.set("orderby","date"),d.set("order","DESC")):d.set("orderby",a)),t){case"woocommerce/product-best-sellers":d.set("best_selling","1");break;case"woocommerce/product-top-rated":d.set("orderby","rating");break;case"woocommerce/product-on-sale":d.set("on_sale","1");break;case"woocommerce/product-new":d.set("orderby","date"),d.set("order","DESC");break;case"woocommerce/handpicked-products":if(!l.length)return"";d.set("ids",l.join(",")),d.set("limit",l.length);break;case"woocommerce/product-category":if(!c||!c.length)return"";break;case"woocommerce/products-by-attribute":if(!r||!r.length)return""}var g="[products",f=!0,m=!1,O=void 0;try{for(var h,w=d[Symbol.iterator]();!(f=(h=w.next()).done);f=!0){var j=s()(h.value,2);g+=" "+j[0]+'="'+j[1]+'"'}}catch(e){m=!0,O=e}finally{try{f||null==w.return||w.return()}finally{if(m)throw O}}return g+="]"}(t,e))}}},46:function(e,t){!function(){e.exports=this.wp.viewport}()},5:function(e,t){!function(){e.exports=this.wc["wc-block-settings"]}()},50:function(e,t){!function(){e.exports=this.wp.hooks}()},52:function(e,t){!function(){e.exports=this.wp.htmlEntities}()},53:function(e,t){!function(){e.exports=this.wp.date}()},573:function(e,t,o){"use strict";o.r(t);var r=o(19),n=o.n(r),c=o(0),i=o(1),s=o(22),u=o(4),a=o(27),l=o.n(a),b=o(7),p=o.n(b),d=o(8),g=o.n(d),f=o(9),m=o.n(f),O=o(10),h=o.n(O),w=o(11),j=o.n(w),y=o(3),_=o(17),v=(o(2),o(36)),k=o(44),C=o(40),P=function(e){function t(){return p()(this,t),m()(this,h()(t).apply(this,arguments))}return j()(t,e),g()(t,[{key:"getInspectorControls",value:function(){var e=this.props,t=e.attributes,o=e.setAttributes,r=t.categories,n=t.catOperator,s=t.columns,u=t.contentVisibility,a=t.rows,l=t.alignButtons;return Object(c.createElement)(_.InspectorControls,{key:"inspector"},Object(c.createElement)(y.PanelBody,{title:Object(i.__)("Layout","woo-gutenberg-products-block"),initialOpen:!0},Object(c.createElement)(k.a,{columns:s,rows:a,alignButtons:l,setAttributes:o})),Object(c.createElement)(y.PanelBody,{title:Object(i.__)("Content","woo-gutenberg-products-block"),initialOpen:!0},Object(c.createElement)(v.a,{settings:u,onChange:function(e){return o({contentVisibility:e})}})),Object(c.createElement)(y.PanelBody,{title:Object(i.__)("Filter by Product Category","woo-gutenberg-products-block"),initialOpen:!1},Object(c.createElement)(C.a,{selected:r,onChange:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=e.map((function(e){return e.id}));o({categories:t})},operator:n,onOperatorChange:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"any";return o({catOperator:e})}})))}},{key:"render",value:function(){var e=this.props,t=e.attributes,o=e.name;return Object(c.createElement)(c.Fragment,null,this.getInspectorControls(),Object(c.createElement)(y.Disabled,null,Object(c.createElement)(_.ServerSideRender,{block:o,attributes:t})))}}]),t}(c.Component),E=o(45),S=o(35);function x(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),o.push.apply(o,r)}return o}Object(s.registerBlockType)("woocommerce/product-best-sellers",{title:Object(i.__)("Best Selling Products","woo-gutenberg-products-block"),icon:{src:Object(c.createElement)(l.a,{icon:"stats-up-alt"}),foreground:"#96588a"},category:"woocommerce",keywords:[Object(i.__)("WooCommerce","woo-gutenberg-products-block")],description:Object(i.__)("Display a grid of your all-time best selling products.","woo-gutenberg-products-block"),supports:{align:["wide","full"],html:!1},attributes:function(e){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?x(o,!0).forEach((function(t){n()(e,t,o[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):x(o).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(o,t))}))}return e}({},S.a),transforms:{from:[{type:"block",blocks:Object(u.without)(S.b,"woocommerce/product-best-sellers"),transform:function(e){return Object(s.createBlock)("woocommerce/product-best-sellers",e)}}]},deprecated:[{attributes:S.a,save:Object(E.a)("woocommerce/product-best-sellers")}],edit:function(e){return Object(c.createElement)(P,e)},save:function(){return null}})},59:function(e,t){!function(){e.exports=this.wp.dom}()},62:function(e,t){},63:function(e,t){},64:function(e,t){},66:function(e,t){},67:function(e,t){}});
|
build/product-categories-frontend.js
CHANGED
@@ -3,4 +3,4 @@
|
|
3 |
Copyright (c) 2017 Jed Watson.
|
4 |
Licensed under the MIT License (MIT), see
|
5 |
http://jedwatson.github.io/classnames
|
6 |
-
*/!function(){"use strict";var r={}.hasOwnProperty;function o(){for(var e=[],t=0;t<arguments.length;t++){var n=arguments[t];if(n){var i=typeof n;if("string"===i||"number"===i)e.push(n);else if(Array.isArray(n)&&n.length){var c=o.apply(null,n);c&&e.push(c)}else if("object"===i)for(var a in n)r.call(n,a)&&n[a]&&e.push(a)}}return e.join(" ")}e.exports?(o.default=o,e.exports=o):void 0===(n=function(){return o}.apply(t,[]))||(e.exports=n)}()},,function(e,t){e.exports=function(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}},function(e,t){function r(){return e.exports=r=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},r.apply(this,arguments)}e.exports=r},function(e,t){function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function n(t){return"function"==typeof Symbol&&"symbol"===r(Symbol.iterator)?e.exports=n=function(e){return r(e)}:e.exports=n=function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":r(e)},n(t)}e.exports=n},function(e,t){!function(){e.exports=this.ReactDOM}()},function(e,t,r){"use strict";var n=r(12),o=r.n(n),i=r(3),c=r.n(i),a=r(4),u=r.n(a),s=r(5),l=r.n(s),p=r(6),f=r.n(p),y=r(7),b=r.n(y),d=r(1),h=[];t.a=function(e){return function(t){function r(){return c()(this,r),l()(this,f()(r).apply(this,arguments))}return b()(r,t),u()(r,[{key:"generateUniqueID",value:function(){var e=r.name;return h[e]||(h[e]=0),h[e]++,h[e]}},{key:"render",value:function(){var t=this.generateUniqueID();return React.createElement(e,o()({},this.props,{componentId:t}))}}]),r}(d.Component)}},,function(e,t){function r(t,n){return e.exports=r=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},r(t,n)}e.exports=r},function(e,t,r){var n=r(22),o=r(23),i=r(24);e.exports=function(e){return n(e)||o(e)||i()}},,,,function(e,t){e.exports=function(e){if(Array.isArray(e)){for(var t=0,r=new Array(e.length);t<e.length;t++)r[t]=e[t];return r}}},function(e,t){e.exports=function(e){if(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e))return Array.from(e)}},function(e,t){e.exports=function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}},,,,,,,,,function(e,t,r){"use strict";r.r(t);var n=r(14),o=r(3),i=r.n(o),c=r(4),a=r.n(c),u=r(5),s=r.n(u),l=r(6),p=r.n(l),f=r(2),y=r.n(f),b=r(7),d=r.n(b),h=r(0),m=r(1),v=r(9),g=r.n(v),O=r(8),w=r(15),j=function(e){function t(){var e;return i()(this,t),(e=s()(this,p()(t).apply(this,arguments))).select=Object(m.createRef)(),e.onNavigate=e.onNavigate.bind(y()(e)),e.renderList=e.renderList.bind(y()(e)),e.renderOptions=e.renderOptions.bind(y()(e)),e}return d()(t,e),a()(t,[{key:"onNavigate",value:function(){var e=this.props.isPreview,t=void 0!==e&&e,r=this.select.current.value;if("false"!==r){var n=O.HOME_URL;t||0!==r.indexOf(n)||(document.location.href=r)}}},{key:"renderList",value:function(e){var t=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=this.props.isPreview,o=void 0!==n&&n,i=this.props.attributes.hasCount,c="parent-"+e[0].term_id;return React.createElement("ul",{key:c},e.map(function(e){var n=i?React.createElement("span",null,"(",e.count,")"):null;return[React.createElement("li",{key:e.term_id},React.createElement("a",{href:o?null:e.link},e.name)," ",n," "),!!e.children&&!!e.children.length&&t.renderList(e.children,r+1)]}))}},{key:"renderOptions",value:function(e){var t=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=this.props.attributes.hasCount;return e.map(function(e){var o=n?"(".concat(e.count,")"):null;return[React.createElement("option",{key:e.term_id,value:e.link},"–".repeat(r)," ",e.name," ",o),!!e.children&&!!e.children.length&&t.renderOptions(e.children,r+1)]})}},{key:"render",value:function(){var e=this.props,t=e.attributes,r=e.categories,n=e.componentId,o=t.className,i=t.isDropdown,c=g()("wc-block-product-categories",o,{"is-dropdown":i,"is-list":!i}),a="prod-categories-".concat(n);return React.createElement(m.Fragment,null,r.length>0&&React.createElement("div",{className:c},i?React.createElement(m.Fragment,null,React.createElement("div",{className:"wc-block-product-categories__dropdown"},React.createElement("label",{className:"screen-reader-text",htmlFor:a},Object(h.__)("Select a category","woo-gutenberg-products-block")),React.createElement("select",{id:a,ref:this.select},React.createElement("option",{value:"false",hidden:!0},Object(h.__)("Select a category","woo-gutenberg-products-block")),this.renderOptions(r))),React.createElement("button",{type:"button",className:"wc-block-product-categories__button","aria-label":Object(h.__)("Go to category","woo-gutenberg-products-block"),icon:"arrow-right-alt2",onClick:this.onNavigate},React.createElement("svg",{"aria-hidden":"true",role:"img",focusable:"false",className:"dashicon dashicons-arrow-right-alt2",xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 20 20"},React.createElement("path",{d:"M6 15l5-5-5-5 1-2 7 7-7 7z"})))):this.renderList(r)))}}]),t}(m.Component),x=Object(w.a)(j),E=r(18),_=r.n(E),S=r(11),P=r.n(S);function R(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function k(){var e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:[]).reduce(function(e,t,r,n){var o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:t.parent;return(e[o]||(e[o]=[])).push(t),e},{}),t=function t(r){return r.map(function(r){var n=e[r.term_id];return delete e[r.term_id],function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?R(r,!0).forEach(function(t){P()(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):R(r).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}({},r,{children:n&&n.length?t(n):[]})})},r=t(e[0]||[]);return delete e[0],Object.keys(e).forEach(function(e){r.push.apply(r,_()(t(e||[])))}),r}var N=document.querySelectorAll(".wp-block-woocommerce-product-categories");N.length&&Array.prototype.forEach.call(N,function(e){var t=JSON.parse(JSON.stringify(e.dataset)),r={hasCount:"true"===t.hasCount,hasEmpty:"true"===t.hasEmpty,isDropdown:"true"===t.isDropdown,isHierarchical:"true"===t.isHierarchical},o=function(e){var t=e.hasEmpty,r=e.isHierarchical,n=O.PRODUCT_CATEGORIES.filter(function(e){return t||!!e.count});return r?k(n):n}(r);e.classList.remove("is-loading"),Object(n.render)(React.createElement(x,{attributes:r,categories:o}),e)})}]);
|
3 |
Copyright (c) 2017 Jed Watson.
|
4 |
Licensed under the MIT License (MIT), see
|
5 |
http://jedwatson.github.io/classnames
|
6 |
+
*/!function(){"use strict";var r={}.hasOwnProperty;function o(){for(var e=[],t=0;t<arguments.length;t++){var n=arguments[t];if(n){var i=typeof n;if("string"===i||"number"===i)e.push(n);else if(Array.isArray(n)&&n.length){var c=o.apply(null,n);c&&e.push(c)}else if("object"===i)for(var a in n)r.call(n,a)&&n[a]&&e.push(a)}}return e.join(" ")}e.exports?(o.default=o,e.exports=o):void 0===(n=function(){return o}.apply(t,[]))||(e.exports=n)}()},,function(e,t){e.exports=function(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}},function(e,t){function r(){return e.exports=r=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},r.apply(this,arguments)}e.exports=r},function(e,t){function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function n(t){return"function"==typeof Symbol&&"symbol"===r(Symbol.iterator)?e.exports=n=function(e){return r(e)}:e.exports=n=function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":r(e)},n(t)}e.exports=n},function(e,t){!function(){e.exports=this.ReactDOM}()},function(e,t,r){"use strict";var n=r(12),o=r.n(n),i=r(3),c=r.n(i),a=r(4),u=r.n(a),s=r(5),l=r.n(s),p=r(6),f=r.n(p),y=r(7),b=r.n(y),d=r(1),h=[];t.a=function(e){return function(t){function r(){return c()(this,r),l()(this,f()(r).apply(this,arguments))}return b()(r,t),u()(r,[{key:"generateUniqueID",value:function(){var e=r.name;return h[e]||(h[e]=0),h[e]++,h[e]}},{key:"render",value:function(){var t=this.generateUniqueID();return React.createElement(e,o()({},this.props,{componentId:t}))}}]),r}(d.Component)}},,function(e,t){function r(t,n){return e.exports=r=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},r(t,n)}e.exports=r},function(e,t,r){var n=r(22),o=r(23),i=r(24);e.exports=function(e){return n(e)||o(e)||i()}},,,,function(e,t){e.exports=function(e){if(Array.isArray(e)){for(var t=0,r=new Array(e.length);t<e.length;t++)r[t]=e[t];return r}}},function(e,t){e.exports=function(e){if(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e))return Array.from(e)}},function(e,t){e.exports=function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}},,,,,,,,,function(e,t,r){"use strict";r.r(t);var n=r(14),o=r(3),i=r.n(o),c=r(4),a=r.n(c),u=r(5),s=r.n(u),l=r(6),p=r.n(l),f=r(2),y=r.n(f),b=r(7),d=r.n(b),h=r(0),m=r(1),v=r(9),g=r.n(v),O=r(8),w=r(15),j=function(e){function t(){var e;return i()(this,t),(e=s()(this,p()(t).apply(this,arguments))).select=Object(m.createRef)(),e.onNavigate=e.onNavigate.bind(y()(e)),e.renderList=e.renderList.bind(y()(e)),e.renderOptions=e.renderOptions.bind(y()(e)),e}return d()(t,e),a()(t,[{key:"onNavigate",value:function(){var e=this.props.isPreview,t=void 0!==e&&e,r=this.select.current.value;if("false"!==r){var n=O.HOME_URL;t||0!==r.indexOf(n)||(document.location.href=r)}}},{key:"renderList",value:function(e){var t=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=this.props.isPreview,o=void 0!==n&&n,i=this.props.attributes.hasCount,c="parent-"+e[0].term_id;return React.createElement("ul",{key:c},e.map((function(e){var n=i?React.createElement("span",null,"(",e.count,")"):null;return[React.createElement("li",{key:e.term_id},React.createElement("a",{href:o?null:e.link},e.name)," ",n," "),!!e.children&&!!e.children.length&&t.renderList(e.children,r+1)]})))}},{key:"renderOptions",value:function(e){var t=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=this.props.attributes.hasCount;return e.map((function(e){var o=n?"(".concat(e.count,")"):null;return[React.createElement("option",{key:e.term_id,value:e.link},"–".repeat(r)," ",e.name," ",o),!!e.children&&!!e.children.length&&t.renderOptions(e.children,r+1)]}))}},{key:"render",value:function(){var e=this.props,t=e.attributes,r=e.categories,n=e.componentId,o=t.className,i=t.isDropdown,c=g()("wc-block-product-categories",o,{"is-dropdown":i,"is-list":!i}),a="prod-categories-".concat(n);return React.createElement(m.Fragment,null,r.length>0&&React.createElement("div",{className:c},i?React.createElement(m.Fragment,null,React.createElement("div",{className:"wc-block-product-categories__dropdown"},React.createElement("label",{className:"screen-reader-text",htmlFor:a},Object(h.__)("Select a category","woo-gutenberg-products-block")),React.createElement("select",{id:a,ref:this.select},React.createElement("option",{value:"false",hidden:!0},Object(h.__)("Select a category","woo-gutenberg-products-block")),this.renderOptions(r))),React.createElement("button",{type:"button",className:"wc-block-product-categories__button","aria-label":Object(h.__)("Go to category","woo-gutenberg-products-block"),icon:"arrow-right-alt2",onClick:this.onNavigate},React.createElement("svg",{"aria-hidden":"true",role:"img",focusable:"false",className:"dashicon dashicons-arrow-right-alt2",xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 20 20"},React.createElement("path",{d:"M6 15l5-5-5-5 1-2 7 7-7 7z"})))):this.renderList(r)))}}]),t}(m.Component),x=Object(w.a)(j),E=r(18),_=r.n(E),S=r(11),P=r.n(S);function R(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function k(){var e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:[]).reduce((function(e,t,r,n){var o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:t.parent;return(e[o]||(e[o]=[])).push(t),e}),{}),t=function t(r){return r.map((function(r){var n=e[r.term_id];return delete e[r.term_id],function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?R(r,!0).forEach((function(t){P()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):R(r).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}({},r,{children:n&&n.length?t(n):[]})}))},r=t(e[0]||[]);return delete e[0],Object.keys(e).forEach((function(e){r.push.apply(r,_()(t(e||[])))})),r}var N=document.querySelectorAll(".wp-block-woocommerce-product-categories");N.length&&Array.prototype.forEach.call(N,(function(e){var t=JSON.parse(JSON.stringify(e.dataset)),r={hasCount:"true"===t.hasCount,hasEmpty:"true"===t.hasEmpty,isDropdown:"true"===t.isDropdown,isHierarchical:"true"===t.isHierarchical},o=function(e){var t=e.hasEmpty,r=e.isHierarchical,n=O.PRODUCT_CATEGORIES.filter((function(e){return t||!!e.count}));return r?k(n):n}(r);e.classList.remove("is-loading"),Object(n.render)(React.createElement(x,{attributes:r,categories:o}),e)}))}]);
|
build/product-categories.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
this.wc=this.wc||{},this.wc.blocks=this.wc.blocks||{},this.wc.blocks["product-categories"]=function(e){function t(t){for(var c,a,l=t[0],i=t[1],s=t[2],b=0,p=[];b<l.length;b++)a=l[b],Object.prototype.hasOwnProperty.call(r,a)&&r[a]&&p.push(r[a][0]),r[a]=0;for(c in i)Object.prototype.hasOwnProperty.call(i,c)&&(e[c]=i[c]);for(u&&u(t);p.length;)p.shift()();return o.push.apply(o,s||[]),n()}function n(){for(var e,t=0;t<o.length;t++){for(var n=o[t],c=!0,l=1;l<n.length;l++){var i=n[l];0!==r[i]&&(c=!1)}c&&(o.splice(t--,1),e=a(a.s=n[0]))}return e}var c={},r={9:0},o=[];function a(t){if(c[t])return c[t].exports;var n=c[t]={i:t,l:!1,exports:{}};return e[t].call(n.exports,n,n.exports,a),n.l=!0,n.exports}a.m=e,a.c=c,a.d=function(e,t,n){a.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},a.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},a.t=function(e,t){if(1&t&&(e=a(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(a.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var c in e)a.d(n,c,function(t){return e[t]}.bind(null,c));return n},a.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return a.d(t,"a",t),t},a.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},a.p="";var l=window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[],i=l.push.bind(l);l.push=t,l=l.slice();for(var s=0;s<l.length;s++)t(l[s]);var u=i;return o.push([545,2,1,0]),n()}({0:function(e,t){!function(){e.exports=this.wp.element}()},1:function(e,t){!function(){e.exports=this.wp.i18n}()},13:function(e,t){!function(){e.exports=this.React}()},18:function(e,t){!function(){e.exports=this.wp.editor}()},2:function(e,t){!function(){e.exports=this.wp.components}()},21:function(e,t){!function(){e.exports=this.wp.compose}()},23:function(e,t){!function(){e.exports=this.wp.blocks}()},24:function(e,t,n){"use strict";var c=n(0),r=n(2),o=function(e){var t=e.className,n=e.fillColor;return Object(c.createElement)(r.Icon,{className:t,icon:Object(c.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 22.41"},Object(c.createElement)("g",null,Object(c.createElement)("g",null,Object(c.createElement)("path",{fill:n,d:"M16.55 0H1.75C.56 0 0 .52 0 1.68v9.24c0 1.15.56 1.92 1.75 1.92H2V4.76a2.51 2.51 0 0 1 2.74-2.68H18v-.4A1.51 1.51 0 0 0 16.55 0z"}),Object(c.createElement)("path",{fill:n,d:"M19.54 3.11H4.74C3.55 3.11 3 3.64 3 4.79V14c0 1.19.55 2 1.74 2H5V7.88A2.51 2.51 0 0 1 7.73 5.2H21v-.41a1.51 1.51 0 0 0-1.46-1.68z"}),Object(c.createElement)("path",{fill:n,d:"M22.53 6.23H7.73C6.54 6.23 6 6.75 6 7.91v9.24c0 1.15.56 1.92 1.75 1.92h7a.59.59 0 0 1 .32.11l1.61 1.15 2.83 2a.31.31 0 0 0 .18.05.3.3 0 0 0 .31-.3v-2.73a.3.3 0 0 1 .28-.28h2.31A1.47 1.47 0 0 0 24 17.6V7.91a1.52 1.52 0 0 0-1.47-1.68z"}),Object(c.createElement)("path",{fill:"#ffffff",d:"M10.2 10.92l1.06-2.14 1.05 2.14 2.37.35-1.71 1.66.4 2.36-2.11-1.11-.17.09-.52.27-.51.26-.92.49.18-1.02.09-.57.1-.56.03-.21-1.71-1.66 2.37-.35zM21.46 14.25h-4.4a.69.69 0 0 1-.69-.69.68.68 0 0 1 .69-.68h4.4a.68.68 0 0 1 .69.68.69.69 0 0 1-.69.69zM21.46 11.19h-4.4a.69.69 0 1 1 0-1.37h4.4a.69.69 0 1 1 0 1.37z"}))))})},a=function(){return Object(c.createElement)(r.Icon,{icon:Object(c.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},Object(c.createElement)("path",{fillRule:"nonzero",d:"M21.913 7.0946H2.0254c-1.1708 0-2.0984.9908-2.0205 2.16l.741 11.0724c.0714 1.0638.9552 1.8892 2.0206 1.8892h18.4054c1.0654 0 1.9492-.8254 2.0205-1.8892l.7411-11.0724c.0779-1.1692-.8497-2.16-2.0205-2.16zm-8.8006-4.6573h5.987c1.119 0 2.0255.9065 2.0255 2.0254v.934H2.8103V2.0255C2.8103.9064 3.7168 0 4.8357 0h6.2513c1.119 0 2.0254.9065 2.0254 2.0254v.4119zm-7.0589 11.619a.926.926 0 1 1 0-1.852h11.8297a.926.926 0 1 1 0 1.852H6.0535z"}))})},l=function(){return Object(c.createElement)(r.Icon,{icon:Object(c.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},Object(c.createElement)("path",{d:"M22 7.5H2c-1.2 0-2.1 1-2 2.2l.7 11.1c.1 1.1 1 1.9 2 1.9h18.5c1.1 0 2-.8 2-1.9L24 9.6c.1-1.1-.9-2.1-2-2.1zM13.1 2.8v-.4c0-1.1-.9-2-2-2H4.8c-1.1 0-2 .9-2 2v3.4h18.4v-1c0-1.1-.9-2-2-2h-6.1z"}),Object(c.createElement)("path",{fill:"#fff",d:"M14.4 18.7L12 17.4l-2.4 1.3.5-2.6-1.9-1.9 2.6-.4 1.2-2.4 1.2 2.4 2.6.4-1.9 1.9z"}))})},i=function(){return Object(c.createElement)(r.Icon,{className:"material-icon",icon:Object(c.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},Object(c.createElement)("path",{d:"M0 0h24v24H0z",fill:"none"}),Object(c.createElement)("path",{d:"M23 12l-2.44-2.78.34-3.68-3.61-.82-1.89-3.18L12 3 8.6 1.54 6.71 4.72l-3.61.81.34 3.68L1 12l2.44 2.78-.34 3.69 3.61.82 1.89 3.18L12 21l3.4 1.46 1.89-3.18 3.61-.82-.34-3.68L23 12zm-10 5h-2v-2h2v2zm0-4h-2V7h2v6z"}))})},s=function(){return Object(c.createElement)(r.Icon,{icon:Object(c.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},Object(c.createElement)("path",{fill:"#1E8CBE",d:"M12 7c-2.76 0-5 2.24-5 5s2.24 5 5 5 5-2.24 5-5-2.24-5-5-5zm0-5C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"}))})},u=function(){return Object(c.createElement)(r.Icon,{icon:Object(c.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},Object(c.createElement)("path",{fill:"#6C7781",d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"}))})},b=function(e){var t=e.className,n=e.fillColor;return Object(c.createElement)(r.Icon,{className:t,icon:Object(c.createElement)("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},Object(c.createElement)("path",{fill:n,d:"M2.3,17.3h9.3c0.1,0,0.3,0,0.4,0.1l5.9,4.2c0.3,0.2,0.7,0,0.7-0.3v-3.7c0-0.2,0.2-0.4,0.4-0.4H22 c1.1,0,2-0.9,2-2V2.5c0-1.2-0.7-2.2-2-2.2H2.3C0.7,0.2,0,0.9,0,2.5v12.3C0,16.3,0.7,17.3,2.3,17.3z"}),Object(c.createElement)("polygon",{fill:"#ffffff",points:"8.8,12.1 6.5,10.9 4.1,12.1 4.5,9.5 2.6,7.6 5.3,7.2 6.5,4.8 7.6,7.2 10.3,7.6 8.4,9.5"}),Object(c.createElement)("path",{fill:"#ffffff",d:"M20.7,7.9h-7c-0.5,0-0.9-0.4-0.9-0.9S13.2,6,13.7,6h7c0.5,0,0.9,0.4,0.9,0.9S21.2,7.9,20.7,7.9z"}),Object(c.createElement)("path",{fill:"#ffffff",d:"M20.7,11.5h-7c-0.5,0-0.9-0.4-0.9-0.9s0.4-0.9,0.9-0.9h7c0.5,0,0.9,0.4,0.9,0.9S21.2,11.5,20.7,11.5z"}))})},p=function(e){var t=e.className,n=e.fillColor;return Object(c.createElement)(r.Icon,{className:t,icon:Object(c.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 23"},Object(c.createElement)("path",{fill:n,d:"M21.9943 7.0957H2.00638C0.807102 7.0957 -0.0923543 8.0951 0.0075853 9.29437L0.707162 20.3877C0.807102 21.487 1.70656 22.2865 2.70595 22.2865H21.1948C22.2941 22.2865 23.1936 21.487 23.1936 20.3877L23.9931 9.29437C24.093 8.0951 23.0936 7.0957 21.9943 7.0957Z"}),Object(c.createElement)("path",{fill:n,d:"M13.0921 2.39855V1.99879C13.0921 0.899456 12.1926 0 11.0933 0H4.7971C3.69777 0 2.79831 0.899456 2.79831 1.99879V5.39674H21.1872V4.49728C21.1872 3.39795 20.2877 2.49849 19.1884 2.49849H13.0921V2.39855Z"}),Object(c.createElement)("path",{fill:"white",d:"M8.63115 17.126L6.5415 15.9449L4.361 17.126L4.72442 14.6729L2.99819 13.0376L5.45125 12.6742L6.5415 10.4937L7.5409 12.6742L9.99396 13.0376L8.26773 14.6729L8.63115 17.126Z"}),Object(c.createElement)("path",{fill:"white",d:"M19.1907 13.5918H12.9899C12.547 13.5918 12.1926 13.1921 12.1926 12.6924C12.1926 12.1927 12.547 11.7929 12.9899 11.7929H19.1907C19.6336 11.7929 19.9879 12.1927 19.9879 12.6924C19.9879 13.1921 19.6336 13.5918 19.1907 13.5918Z"}),Object(c.createElement)("path",{fill:"white",d:"M19.1907 17.1897H12.9899C12.547 17.1897 12.1926 16.7899 12.1926 16.2902C12.1926 15.7905 12.547 15.3907 12.9899 15.3907H19.1907C19.6336 15.3907 19.9879 15.7905 19.9879 16.2902C19.9879 16.7899 19.6336 17.1897 19.1907 17.1897Z"}))})},h=function(){return Object(c.createElement)(r.Icon,{className:"material-icon",icon:Object(c.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},Object(c.createElement)("path",{d:"M13 13v8h8v-8h-8zM3 21h8v-8H3v8zM3 3v8h8V3H3zm13.66-1.31L11 7.34 16.66 13l5.66-5.66-5.66-5.65z"}),Object(c.createElement)("path",{d:"M0 0h24v24H0z",fill:"none"}))})},d=n(6),f=n.n(d),m=(n(7),function(e){var t=e.size,n=void 0===t?20:t,o=e.className;return Object(c.createElement)(r.Icon,{className:f()("woo-icon",o),icon:Object(c.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",height:n,width:Math.floor(1.67*n),viewBox:"0 0 245 145"},Object(c.createElement)("path",{fill:"#96588A",d:"M22.76 0h199.1a22.77 22.77 0 0 1 22.8 22.76v75.92a22.77 22.77 0 0 1-22.78 22.78h-71.41l9.77 24-43.13-24H22.76C10.1946 121.449.011 111.2654 0 98.7V22.76C.011 10.1946 10.1946.011 22.76 0z"}),Object(c.createElement)("path",{fill:"#FFF",fillRule:"nonzero",d:"M12.32 20.63a8.16 8.16 0 0 1 6.25-3.09c5.0733-.36 7.9867 2.0333 8.74 7.18 3.14 20.86 6.4933 38.5633 10.06 53.11l21.92-41.69c2-3.76 4.49-5.76 7.52-6 4.3867-.3067 7.13 2.49 8.23 8.39a186 186 0 0 0 9.47 34.23c2.62-25.38 7.0133-43.7133 13.18-55a7.73 7.73 0 0 1 6.6-4.43 8.8 8.8 0 0 1 6.32 2 7.75 7.75 0 0 1 3.05 5.74 8.52 8.52 0 0 1-1 4.77c-3.9 7.24-7.12 19.28-9.66 36.12-2.48 16.2533-3.3967 28.9633-2.75 38.13a12.25 12.25 0 0 1-1.16 6.56 6.32 6.32 0 0 1-5.33 3.53c-2.6667.18-5.3033-1.0567-7.91-3.71-9.2933-9.54-16.6567-23.7267-22.09-42.56C57.3 76.7167 52.48 86.3333 49.3 92.76c-5.86 11.3333-10.89 17.13-15.09 17.39-2.7333.1933-5.0667-2.0933-7-6.86-5.1-13.0933-10.5833-38.4033-16.45-75.93a8.56 8.56 0 0 1 1.56-6.73zM227.23 36.34a23.17 23.17 0 0 0-16-11.59 26.25 26.25 0 0 0-5.42-.58c-9.5867 0-17.41 5-23.47 15a53 53 0 0 0-7.78 28.16c0 7.7333 1.6167 14.3333 4.85 19.8a23.15 23.15 0 0 0 16 11.59 26.28 26.28 0 0 0 5.42.59c9.68 0 17.5033-5 23.47-15A53.89 53.89 0 0 0 232.08 56c0-7.7333-1.6167-14.2867-4.85-19.66zm-12.61 27.72c-1.3733 6.56-3.9167 11.5-7.63 14.82-2.9267 2.6667-5.6133 3.7433-8.06 3.23-2.4467-.5133-4.4033-2.6667-5.87-6.46a25.68 25.68 0 0 1-1.76-9.09 35.9 35.9 0 0 1 .73-7.34 33 33 0 0 1 5.28-11.88c3.3333-4.8933 6.8067-6.9467 10.42-6.16 2.44.4867 4.3933 2.64 5.86 6.46a25.68 25.68 0 0 1 1.76 9.12 35.73 35.73 0 0 1-.73 7.33v-.03zM164.57 36.34a23.2 23.2 0 0 0-16-11.59 26.42 26.42 0 0 0-5.43-.58c-9.5933 0-17.4167 5-23.47 15a53 53 0 0 0-7.78 28.16c0 7.7333 1.6133 14.3333 4.84 19.8a23.19 23.19 0 0 0 16 11.59 26.44 26.44 0 0 0 5.43.59c9.68 0 17.5033-5 23.47-15A53.88 53.88 0 0 0 169.4 56c0-7.7333-1.6133-14.2867-4.84-19.66h.01zm-12.61 27.72c-1.3667 6.56-3.91 11.5-7.63 14.82-2.93 2.64-5.63 3.72-8.07 3.23-2.44-.49-4.4-2.64-5.86-6.46a25.7 25.7 0 0 1-1.77-9.09 35.9 35.9 0 0 1 .74-7.34 33 33 0 0 1 5.28-11.88c3.3333-4.8933 6.8067-6.9467 10.42-6.16 2.44.4867 4.3933 2.64 5.86 6.46a25.91 25.91 0 0 1 1.76 9.12 35.73 35.73 0 0 1-.73 7.33v-.03z"}))})});n.d(t,"a",function(){return o}),n.d(t,"b",function(){return a}),n.d(t,"c",function(){return l}),n.d(t,"d",function(){return i}),n.d(t,"e",function(){return s}),n.d(t,"f",function(){return u}),n.d(t,"h",function(){return b}),n.d(t,"g",function(){return p}),n.d(t,"i",function(){return h}),n.d(t,"j",function(){return m})},279:function(e,t,n){var c=n(515);"string"==typeof c&&(c=[[e.i,c,""]]);var r={insert:"head",singleton:!1};n(35)(c,r);c.locals&&(e.exports=c.locals)},4:function(e,t){!function(){e.exports=this.lodash}()},5:function(e,t){!function(){e.exports=this.wc["wc-block-settings"]}()},515:function(e,t,n){},545:function(e,t,n){"use strict";n.r(t);var c=n(16),r=n.n(c),o=n(0),a=n(1),l=n(23),i=(n(279),n(516),n(18)),s=n(2),u=n(8),b=n.n(u),p=n(9),h=n.n(p),d=n(10),f=n.n(d),m=n(11),g=n.n(m),w=n(15),v=n.n(w),O=n(12),j=n.n(O),E=n(13),y=n(6),_=n.n(y),k=n(5),C=n(69),x=function(e){function t(){var e;return b()(this,t),(e=f()(this,g()(t).apply(this,arguments))).select=Object(E.createRef)(),e.onNavigate=e.onNavigate.bind(v()(e)),e.renderList=e.renderList.bind(v()(e)),e.renderOptions=e.renderOptions.bind(v()(e)),e}return j()(t,e),h()(t,[{key:"onNavigate",value:function(){var e=this.props.isPreview,t=void 0!==e&&e,n=this.select.current.value;if("false"!==n){var c=k.HOME_URL;t||0!==n.indexOf(c)||(document.location.href=n)}}},{key:"renderList",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,c=this.props.isPreview,r=void 0!==c&&c,a=this.props.attributes.hasCount,l="parent-"+e[0].term_id;return Object(o.createElement)("ul",{key:l},e.map(function(e){var c=a?Object(o.createElement)("span",null,"(",e.count,")"):null;return[Object(o.createElement)("li",{key:e.term_id},Object(o.createElement)("a",{href:r?null:e.link},e.name)," ",c," "),!!e.children&&!!e.children.length&&t.renderList(e.children,n+1)]}))}},{key:"renderOptions",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,c=this.props.attributes.hasCount;return e.map(function(e){var r=c?"(".concat(e.count,")"):null;return[Object(o.createElement)("option",{key:e.term_id,value:e.link},"–".repeat(n)," ",e.name," ",r),!!e.children&&!!e.children.length&&t.renderOptions(e.children,n+1)]})}},{key:"render",value:function(){var e=this.props,t=e.attributes,n=e.categories,c=e.componentId,r=t.className,l=t.isDropdown,i=_()("wc-block-product-categories",r,{"is-dropdown":l,"is-list":!l}),s="prod-categories-".concat(c);return Object(o.createElement)(E.Fragment,null,n.length>0&&Object(o.createElement)("div",{className:i},l?Object(o.createElement)(E.Fragment,null,Object(o.createElement)("div",{className:"wc-block-product-categories__dropdown"},Object(o.createElement)("label",{className:"screen-reader-text",htmlFor:s},Object(a.__)("Select a category","woo-gutenberg-products-block")),Object(o.createElement)("select",{id:s,ref:this.select},Object(o.createElement)("option",{value:"false",hidden:!0},Object(a.__)("Select a category","woo-gutenberg-products-block")),this.renderOptions(n))),Object(o.createElement)("button",{type:"button",className:"wc-block-product-categories__button","aria-label":Object(a.__)("Go to category","woo-gutenberg-products-block"),icon:"arrow-right-alt2",onClick:this.onNavigate},Object(o.createElement)("svg",{"aria-hidden":"true",role:"img",focusable:"false",className:"dashicon dashicons-arrow-right-alt2",xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 20 20"},Object(o.createElement)("path",{d:"M6 15l5-5-5-5 1-2 7 7-7 7z"})))):this.renderList(n)))}}]),t}(E.Component),z=Object(C.a)(x),M=n(70),H=n(62),L=n.n(H),N=n(20),P=n.n(N);function B(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var c=Object.getOwnPropertySymbols(e);t&&(c=c.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,c)}return n}function I(){var e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:[]).reduce(function(e,t,n,c){var r=arguments.length>4&&void 0!==arguments[4]?arguments[4]:t.parent;return(e[r]||(e[r]=[])).push(t),e},{}),t=function t(n){return n.map(function(n){var c=e[n.term_id];return delete e[n.term_id],function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?B(n,!0).forEach(function(t){P()(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):B(n).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}({},n,{children:c&&c.length?t(c):[]})})},n=t(e[0]||[]);return delete e[0],Object.keys(e).forEach(function(e){n.push.apply(n,L()(t(e||[])))}),n}var S=n(24);Object(l.registerBlockType)("woocommerce/product-categories",{title:Object(a.__)("Product Categories List","woo-gutenberg-products-block"),icon:{src:Object(o.createElement)(S.b,null),foreground:"#96588a"},category:"woocommerce",keywords:[Object(a.__)("WooCommerce","woo-gutenberg-products-block")],description:Object(a.__)("Show your product categories as a list or dropdown.","woo-gutenberg-products-block"),supports:{align:["wide","full"]},attributes:{hasCount:{type:"boolean",default:!0,source:"attribute",selector:"div",attribute:"data-has-count"},hasEmpty:{type:"boolean",default:!1,source:"attribute",selector:"div",attribute:"data-has-empty"},isDropdown:{type:"boolean",default:!1,source:"attribute",selector:"div",attribute:"data-is-dropdown"},isHierarchical:{type:"boolean",default:!0,source:"attribute",selector:"div",attribute:"data-is-hierarchical"}},edit:function(e){var t=e.attributes,n=e.setAttributes,c=t.hasCount,r=t.hasEmpty,l=t.isDropdown,u=t.isHierarchical,b=function(e){var t=e.hasEmpty,n=e.isHierarchical,c=k.PRODUCT_CATEGORIES.filter(function(e){return t||!!e.count});return n?I(c):c}(t);return Object(o.createElement)(o.Fragment,null,Object(o.createElement)(i.InspectorControls,{key:"inspector"},Object(o.createElement)(s.PanelBody,{title:Object(a.__)("Content","woo-gutenberg-products-block"),initialOpen:!0},Object(o.createElement)(s.ToggleControl,{label:Object(a.__)("Show product count","woo-gutenberg-products-block"),help:c?Object(a.__)("Product count is visible.","woo-gutenberg-products-block"):Object(a.__)("Product count is hidden.","woo-gutenberg-products-block"),checked:c,onChange:function(){return n({hasCount:!c})}}),Object(o.createElement)(s.ToggleControl,{label:Object(a.__)("Show hierarchy","woo-gutenberg-products-block"),help:u?Object(a.__)("Hierarchy is visible.","woo-gutenberg-products-block"):Object(a.__)("Hierarchy is hidden.","woo-gutenberg-products-block"),checked:u,onChange:function(){return n({isHierarchical:!u})}}),Object(o.createElement)(s.ToggleControl,{label:Object(a.__)("Show empty categories","woo-gutenberg-products-block"),help:r?Object(a.__)("Empty categories are visible.","woo-gutenberg-products-block"):Object(a.__)("Empty categories are hidden.","woo-gutenberg-products-block"),checked:r,onChange:function(){return n({hasEmpty:!r})}})),Object(o.createElement)(s.PanelBody,{title:Object(a.__)("List Settings","woo-gutenberg-products-block"),initialOpen:!0},Object(o.createElement)(M.a,{label:Object(a.__)("Display style","woo-gutenberg-products-block"),value:l?"dropdown":"list",options:[{label:Object(a.__)("List","woo-gutenberg-products-block"),value:"list"},{label:Object(a.__)("Dropdown","woo-gutenberg-products-block"),value:"dropdown"}],onChange:function(e){return n({isDropdown:"dropdown"===e})}}))),b.length>0?Object(o.createElement)(z,{attributes:t,categories:b,isPreview:!0}):Object(o.createElement)(s.Placeholder,{className:"wc-block-product-categories",icon:Object(o.createElement)(S.b,null),label:Object(a.__)("Product Categories List","woo-gutenberg-products-block")},Object(a.__)("This block shows product categories for your store. In order to preview this you'll first need to create a product and assign it to a category.","woo-gutenberg-products-block")))},save:function(e){var t=e.attributes,n=t.hasCount,c=t.hasEmpty,a=t.isDropdown,l=t.isHierarchical,i={};return n&&(i["data-has-count"]=!0),c&&(i["data-has-empty"]=!0),a&&(i["data-is-dropdown"]=!0),l&&(i["data-is-hierarchical"]=!0),Object(o.createElement)("div",r()({className:"is-loading"},i),a?Object(o.createElement)("span",{"aria-hidden":!0,className:"wc-block-product-categories__placeholder"}):Object(o.createElement)("ul",{"aria-hidden":!0},Object(o.createElement)("li",null,Object(o.createElement)("span",{className:"wc-block-product-categories__placeholder"})),Object(o.createElement)("li",null,Object(o.createElement)("span",{className:"wc-block-product-categories__placeholder"})),Object(o.createElement)("li",null,Object(o.createElement)("span",{className:"wc-block-product-categories__placeholder"}))))}})},69:function(e,t,n){"use strict";var c=n(16),r=n.n(c),o=n(8),a=n.n(o),l=n(9),i=n.n(l),s=n(10),u=n.n(s),b=n(11),p=n.n(b),h=n(12),d=n.n(h),f=n(0),m=n(13),g=[];t.a=function(e){return function(t){function n(){return a()(this,n),u()(this,p()(n).apply(this,arguments))}return d()(n,t),i()(n,[{key:"generateUniqueID",value:function(){var e=n.name;return g[e]||(g[e]=0),g[e]++,g[e]}},{key:"render",value:function(){var t=this.generateUniqueID();return Object(f.createElement)(e,r()({},this.props,{componentId:t}))}}]),n}(m.Component)}},70:function(e,t,n){"use strict";var c=n(16),r=n.n(c),o=n(8),a=n.n(o),l=n(9),i=n.n(l),s=n(10),u=n.n(s),b=n(11),p=n.n(b),h=n(15),d=n.n(h),f=n(12),m=n.n(f),g=n(0),w=n(4),v=n(6),O=n.n(v),j=n(2),E=n(21),y=(n(132),function(e){function t(){var e;return a()(this,t),(e=u()(this,p()(t).apply(this,arguments))).onClick=e.onClick.bind(d()(e)),e}return m()(t,e),i()(t,[{key:"onClick",value:function(e){this.props.onChange&&this.props.onChange(e.target.value)}},{key:"render",value:function(){var e,t=this,n=this.props,c=n.label,o=n.checked,a=n.instanceId,l=n.className,i=n.help,s=n.options,u=n.value,b="inspector-toggle-button-control-".concat(a);return i&&(e=Object(w.isFunction)(i)?i(o):i),Object(g.createElement)(j.BaseControl,{id:b,help:e,className:O()("components-toggle-button-control",l)},Object(g.createElement)("label",{id:b+"__label",htmlFor:b,className:"components-toggle-button-control__label"},c),Object(g.createElement)(j.ButtonGroup,{"aria-labelledby":b+"__label"},s.map(function(e,n){var o={};return u===e.value?(o.isPrimary=!0,o["aria-pressed"]=!0):(o.isDefault=!0,o["aria-pressed"]=!1),Object(g.createElement)(j.Button,r()({key:"".concat(e.label,"-").concat(e.value,"-").concat(n),value:e.value,onClick:t.onClick,"aria-label":c+": "+e.label},o),e.label)})))}}]),t}(g.Component));t.a=Object(E.withInstanceId)(y)}});
|
1 |
+
this.wc=this.wc||{},this.wc.blocks=this.wc.blocks||{},this.wc.blocks["product-categories"]=function(e){function t(t){for(var c,a,l=t[0],i=t[1],s=t[2],b=0,p=[];b<l.length;b++)a=l[b],Object.prototype.hasOwnProperty.call(r,a)&&r[a]&&p.push(r[a][0]),r[a]=0;for(c in i)Object.prototype.hasOwnProperty.call(i,c)&&(e[c]=i[c]);for(u&&u(t);p.length;)p.shift()();return o.push.apply(o,s||[]),n()}function n(){for(var e,t=0;t<o.length;t++){for(var n=o[t],c=!0,l=1;l<n.length;l++){var i=n[l];0!==r[i]&&(c=!1)}c&&(o.splice(t--,1),e=a(a.s=n[0]))}return e}var c={},r={9:0},o=[];function a(t){if(c[t])return c[t].exports;var n=c[t]={i:t,l:!1,exports:{}};return e[t].call(n.exports,n,n.exports,a),n.l=!0,n.exports}a.m=e,a.c=c,a.d=function(e,t,n){a.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},a.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},a.t=function(e,t){if(1&t&&(e=a(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(a.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var c in e)a.d(n,c,function(t){return e[t]}.bind(null,c));return n},a.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return a.d(t,"a",t),t},a.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},a.p="";var l=window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[],i=l.push.bind(l);l.push=t,l=l.slice();for(var s=0;s<l.length;s++)t(l[s]);var u=i;return o.push([560,2,1,0]),n()}({0:function(e,t){!function(){e.exports=this.wp.element}()},1:function(e,t){!function(){e.exports=this.wp.i18n}()},12:function(e,t){!function(){e.exports=this.React}()},17:function(e,t){!function(){e.exports=this.wp.editor}()},20:function(e,t){!function(){e.exports=this.wp.compose}()},22:function(e,t){!function(){e.exports=this.wp.blocks}()},23:function(e,t,n){"use strict";var c=n(0),r=n(3),o=function(e){var t=e.className,n=e.fillColor;return Object(c.createElement)(r.Icon,{className:t,icon:Object(c.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 22.41"},Object(c.createElement)("g",null,Object(c.createElement)("g",null,Object(c.createElement)("path",{fill:n,d:"M16.55 0H1.75C.56 0 0 .52 0 1.68v9.24c0 1.15.56 1.92 1.75 1.92H2V4.76a2.51 2.51 0 0 1 2.74-2.68H18v-.4A1.51 1.51 0 0 0 16.55 0z"}),Object(c.createElement)("path",{fill:n,d:"M19.54 3.11H4.74C3.55 3.11 3 3.64 3 4.79V14c0 1.19.55 2 1.74 2H5V7.88A2.51 2.51 0 0 1 7.73 5.2H21v-.41a1.51 1.51 0 0 0-1.46-1.68z"}),Object(c.createElement)("path",{fill:n,d:"M22.53 6.23H7.73C6.54 6.23 6 6.75 6 7.91v9.24c0 1.15.56 1.92 1.75 1.92h7a.59.59 0 0 1 .32.11l1.61 1.15 2.83 2a.31.31 0 0 0 .18.05.3.3 0 0 0 .31-.3v-2.73a.3.3 0 0 1 .28-.28h2.31A1.47 1.47 0 0 0 24 17.6V7.91a1.52 1.52 0 0 0-1.47-1.68z"}),Object(c.createElement)("path",{fill:"#ffffff",d:"M10.2 10.92l1.06-2.14 1.05 2.14 2.37.35-1.71 1.66.4 2.36-2.11-1.11-.17.09-.52.27-.51.26-.92.49.18-1.02.09-.57.1-.56.03-.21-1.71-1.66 2.37-.35zM21.46 14.25h-4.4a.69.69 0 0 1-.69-.69.68.68 0 0 1 .69-.68h4.4a.68.68 0 0 1 .69.68.69.69 0 0 1-.69.69zM21.46 11.19h-4.4a.69.69 0 1 1 0-1.37h4.4a.69.69 0 1 1 0 1.37z"}))))})},a=function(){return Object(c.createElement)(r.Icon,{icon:Object(c.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},Object(c.createElement)("path",{fillRule:"nonzero",d:"M21.913 7.0946H2.0254c-1.1708 0-2.0984.9908-2.0205 2.16l.741 11.0724c.0714 1.0638.9552 1.8892 2.0206 1.8892h18.4054c1.0654 0 1.9492-.8254 2.0205-1.8892l.7411-11.0724c.0779-1.1692-.8497-2.16-2.0205-2.16zm-8.8006-4.6573h5.987c1.119 0 2.0255.9065 2.0255 2.0254v.934H2.8103V2.0255C2.8103.9064 3.7168 0 4.8357 0h6.2513c1.119 0 2.0254.9065 2.0254 2.0254v.4119zm-7.0589 11.619a.926.926 0 1 1 0-1.852h11.8297a.926.926 0 1 1 0 1.852H6.0535z"}))})},l=function(){return Object(c.createElement)(r.Icon,{icon:Object(c.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},Object(c.createElement)("path",{d:"M22 7.5H2c-1.2 0-2.1 1-2 2.2l.7 11.1c.1 1.1 1 1.9 2 1.9h18.5c1.1 0 2-.8 2-1.9L24 9.6c.1-1.1-.9-2.1-2-2.1zM13.1 2.8v-.4c0-1.1-.9-2-2-2H4.8c-1.1 0-2 .9-2 2v3.4h18.4v-1c0-1.1-.9-2-2-2h-6.1z"}),Object(c.createElement)("path",{fill:"#fff",d:"M14.4 18.7L12 17.4l-2.4 1.3.5-2.6-1.9-1.9 2.6-.4 1.2-2.4 1.2 2.4 2.6.4-1.9 1.9z"}))})},i=function(){return Object(c.createElement)(r.Icon,{className:"material-icon",icon:Object(c.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},Object(c.createElement)("path",{d:"M0 0h24v24H0z",fill:"none"}),Object(c.createElement)("path",{d:"M23 12l-2.44-2.78.34-3.68-3.61-.82-1.89-3.18L12 3 8.6 1.54 6.71 4.72l-3.61.81.34 3.68L1 12l2.44 2.78-.34 3.69 3.61.82 1.89 3.18L12 21l3.4 1.46 1.89-3.18 3.61-.82-.34-3.68L23 12zm-10 5h-2v-2h2v2zm0-4h-2V7h2v6z"}))})},s=function(){return Object(c.createElement)(r.Icon,{icon:Object(c.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},Object(c.createElement)("path",{fill:"#1E8CBE",d:"M12 7c-2.76 0-5 2.24-5 5s2.24 5 5 5 5-2.24 5-5-2.24-5-5-5zm0-5C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"}))})},u=function(){return Object(c.createElement)(r.Icon,{icon:Object(c.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},Object(c.createElement)("path",{fill:"#6C7781",d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"}))})},b=function(e){var t=e.className,n=e.fillColor;return Object(c.createElement)(r.Icon,{className:t,icon:Object(c.createElement)("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},Object(c.createElement)("path",{fill:n,d:"M2.3,17.3h9.3c0.1,0,0.3,0,0.4,0.1l5.9,4.2c0.3,0.2,0.7,0,0.7-0.3v-3.7c0-0.2,0.2-0.4,0.4-0.4H22 c1.1,0,2-0.9,2-2V2.5c0-1.2-0.7-2.2-2-2.2H2.3C0.7,0.2,0,0.9,0,2.5v12.3C0,16.3,0.7,17.3,2.3,17.3z"}),Object(c.createElement)("polygon",{fill:"#ffffff",points:"8.8,12.1 6.5,10.9 4.1,12.1 4.5,9.5 2.6,7.6 5.3,7.2 6.5,4.8 7.6,7.2 10.3,7.6 8.4,9.5"}),Object(c.createElement)("path",{fill:"#ffffff",d:"M20.7,7.9h-7c-0.5,0-0.9-0.4-0.9-0.9S13.2,6,13.7,6h7c0.5,0,0.9,0.4,0.9,0.9S21.2,7.9,20.7,7.9z"}),Object(c.createElement)("path",{fill:"#ffffff",d:"M20.7,11.5h-7c-0.5,0-0.9-0.4-0.9-0.9s0.4-0.9,0.9-0.9h7c0.5,0,0.9,0.4,0.9,0.9S21.2,11.5,20.7,11.5z"}))})},p=function(e){var t=e.className,n=e.fillColor;return Object(c.createElement)(r.Icon,{className:t,icon:Object(c.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 23"},Object(c.createElement)("path",{fill:n,d:"M21.9943 7.0957H2.00638C0.807102 7.0957 -0.0923543 8.0951 0.0075853 9.29437L0.707162 20.3877C0.807102 21.487 1.70656 22.2865 2.70595 22.2865H21.1948C22.2941 22.2865 23.1936 21.487 23.1936 20.3877L23.9931 9.29437C24.093 8.0951 23.0936 7.0957 21.9943 7.0957Z"}),Object(c.createElement)("path",{fill:n,d:"M13.0921 2.39855V1.99879C13.0921 0.899456 12.1926 0 11.0933 0H4.7971C3.69777 0 2.79831 0.899456 2.79831 1.99879V5.39674H21.1872V4.49728C21.1872 3.39795 20.2877 2.49849 19.1884 2.49849H13.0921V2.39855Z"}),Object(c.createElement)("path",{fill:"white",d:"M8.63115 17.126L6.5415 15.9449L4.361 17.126L4.72442 14.6729L2.99819 13.0376L5.45125 12.6742L6.5415 10.4937L7.5409 12.6742L9.99396 13.0376L8.26773 14.6729L8.63115 17.126Z"}),Object(c.createElement)("path",{fill:"white",d:"M19.1907 13.5918H12.9899C12.547 13.5918 12.1926 13.1921 12.1926 12.6924C12.1926 12.1927 12.547 11.7929 12.9899 11.7929H19.1907C19.6336 11.7929 19.9879 12.1927 19.9879 12.6924C19.9879 13.1921 19.6336 13.5918 19.1907 13.5918Z"}),Object(c.createElement)("path",{fill:"white",d:"M19.1907 17.1897H12.9899C12.547 17.1897 12.1926 16.7899 12.1926 16.2902C12.1926 15.7905 12.547 15.3907 12.9899 15.3907H19.1907C19.6336 15.3907 19.9879 15.7905 19.9879 16.2902C19.9879 16.7899 19.6336 17.1897 19.1907 17.1897Z"}))})},h=function(){return Object(c.createElement)(r.Icon,{className:"material-icon",icon:Object(c.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},Object(c.createElement)("path",{d:"M13 13v8h8v-8h-8zM3 21h8v-8H3v8zM3 3v8h8V3H3zm13.66-1.31L11 7.34 16.66 13l5.66-5.66-5.66-5.65z"}),Object(c.createElement)("path",{d:"M0 0h24v24H0z",fill:"none"}))})},d=n(6),f=n.n(d),m=(n(2),function(e){var t=e.size,n=void 0===t?20:t,o=e.className;return Object(c.createElement)(r.Icon,{className:f()("woo-icon",o),icon:Object(c.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",height:n,width:Math.floor(1.67*n),viewBox:"0 0 245 145"},Object(c.createElement)("path",{fill:"#96588A",d:"M22.76 0h199.1a22.77 22.77 0 0 1 22.8 22.76v75.92a22.77 22.77 0 0 1-22.78 22.78h-71.41l9.77 24-43.13-24H22.76C10.1946 121.449.011 111.2654 0 98.7V22.76C.011 10.1946 10.1946.011 22.76 0z"}),Object(c.createElement)("path",{fill:"#FFF",fillRule:"nonzero",d:"M12.32 20.63a8.16 8.16 0 0 1 6.25-3.09c5.0733-.36 7.9867 2.0333 8.74 7.18 3.14 20.86 6.4933 38.5633 10.06 53.11l21.92-41.69c2-3.76 4.49-5.76 7.52-6 4.3867-.3067 7.13 2.49 8.23 8.39a186 186 0 0 0 9.47 34.23c2.62-25.38 7.0133-43.7133 13.18-55a7.73 7.73 0 0 1 6.6-4.43 8.8 8.8 0 0 1 6.32 2 7.75 7.75 0 0 1 3.05 5.74 8.52 8.52 0 0 1-1 4.77c-3.9 7.24-7.12 19.28-9.66 36.12-2.48 16.2533-3.3967 28.9633-2.75 38.13a12.25 12.25 0 0 1-1.16 6.56 6.32 6.32 0 0 1-5.33 3.53c-2.6667.18-5.3033-1.0567-7.91-3.71-9.2933-9.54-16.6567-23.7267-22.09-42.56C57.3 76.7167 52.48 86.3333 49.3 92.76c-5.86 11.3333-10.89 17.13-15.09 17.39-2.7333.1933-5.0667-2.0933-7-6.86-5.1-13.0933-10.5833-38.4033-16.45-75.93a8.56 8.56 0 0 1 1.56-6.73zM227.23 36.34a23.17 23.17 0 0 0-16-11.59 26.25 26.25 0 0 0-5.42-.58c-9.5867 0-17.41 5-23.47 15a53 53 0 0 0-7.78 28.16c0 7.7333 1.6167 14.3333 4.85 19.8a23.15 23.15 0 0 0 16 11.59 26.28 26.28 0 0 0 5.42.59c9.68 0 17.5033-5 23.47-15A53.89 53.89 0 0 0 232.08 56c0-7.7333-1.6167-14.2867-4.85-19.66zm-12.61 27.72c-1.3733 6.56-3.9167 11.5-7.63 14.82-2.9267 2.6667-5.6133 3.7433-8.06 3.23-2.4467-.5133-4.4033-2.6667-5.87-6.46a25.68 25.68 0 0 1-1.76-9.09 35.9 35.9 0 0 1 .73-7.34 33 33 0 0 1 5.28-11.88c3.3333-4.8933 6.8067-6.9467 10.42-6.16 2.44.4867 4.3933 2.64 5.86 6.46a25.68 25.68 0 0 1 1.76 9.12 35.73 35.73 0 0 1-.73 7.33v-.03zM164.57 36.34a23.2 23.2 0 0 0-16-11.59 26.42 26.42 0 0 0-5.43-.58c-9.5933 0-17.4167 5-23.47 15a53 53 0 0 0-7.78 28.16c0 7.7333 1.6133 14.3333 4.84 19.8a23.19 23.19 0 0 0 16 11.59 26.44 26.44 0 0 0 5.43.59c9.68 0 17.5033-5 23.47-15A53.88 53.88 0 0 0 169.4 56c0-7.7333-1.6133-14.2867-4.84-19.66h.01zm-12.61 27.72c-1.3667 6.56-3.91 11.5-7.63 14.82-2.93 2.64-5.63 3.72-8.07 3.23-2.44-.49-4.4-2.64-5.86-6.46a25.7 25.7 0 0 1-1.77-9.09 35.9 35.9 0 0 1 .74-7.34 33 33 0 0 1 5.28-11.88c3.3333-4.8933 6.8067-6.9467 10.42-6.16 2.44.4867 4.3933 2.64 5.86 6.46a25.91 25.91 0 0 1 1.76 9.12 35.73 35.73 0 0 1-.73 7.33v-.03z"}))})});n.d(t,"a",(function(){return o})),n.d(t,"b",(function(){return a})),n.d(t,"c",(function(){return l})),n.d(t,"d",(function(){return i})),n.d(t,"e",(function(){return s})),n.d(t,"f",(function(){return u})),n.d(t,"h",(function(){return b})),n.d(t,"g",(function(){return p})),n.d(t,"i",(function(){return h})),n.d(t,"j",(function(){return m}))},293:function(e,t,n){var c=n(532);"string"==typeof c&&(c=[[e.i,c,""]]);var r={insert:"head",singleton:!1};n(34)(c,r);c.locals&&(e.exports=c.locals)},3:function(e,t){!function(){e.exports=this.wp.components}()},4:function(e,t){!function(){e.exports=this.lodash}()},5:function(e,t){!function(){e.exports=this.wc["wc-block-settings"]}()},532:function(e,t,n){},560:function(e,t,n){"use strict";n.r(t);var c=n(15),r=n.n(c),o=n(0),a=n(1),l=n(22),i=(n(293),n(533),n(17)),s=n(3),u=n(7),b=n.n(u),p=n(8),h=n.n(p),d=n(9),f=n.n(d),m=n(10),g=n.n(m),w=n(14),v=n.n(w),O=n(11),j=n.n(O),E=n(12),y=n(6),_=n.n(y),k=n(5),C=n(69),x=function(e){function t(){var e;return b()(this,t),(e=f()(this,g()(t).apply(this,arguments))).select=Object(E.createRef)(),e.onNavigate=e.onNavigate.bind(v()(e)),e.renderList=e.renderList.bind(v()(e)),e.renderOptions=e.renderOptions.bind(v()(e)),e}return j()(t,e),h()(t,[{key:"onNavigate",value:function(){var e=this.props.isPreview,t=void 0!==e&&e,n=this.select.current.value;if("false"!==n){var c=k.HOME_URL;t||0!==n.indexOf(c)||(document.location.href=n)}}},{key:"renderList",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,c=this.props.isPreview,r=void 0!==c&&c,a=this.props.attributes.hasCount,l="parent-"+e[0].term_id;return Object(o.createElement)("ul",{key:l},e.map((function(e){var c=a?Object(o.createElement)("span",null,"(",e.count,")"):null;return[Object(o.createElement)("li",{key:e.term_id},Object(o.createElement)("a",{href:r?null:e.link},e.name)," ",c," "),!!e.children&&!!e.children.length&&t.renderList(e.children,n+1)]})))}},{key:"renderOptions",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,c=this.props.attributes.hasCount;return e.map((function(e){var r=c?"(".concat(e.count,")"):null;return[Object(o.createElement)("option",{key:e.term_id,value:e.link},"–".repeat(n)," ",e.name," ",r),!!e.children&&!!e.children.length&&t.renderOptions(e.children,n+1)]}))}},{key:"render",value:function(){var e=this.props,t=e.attributes,n=e.categories,c=e.componentId,r=t.className,l=t.isDropdown,i=_()("wc-block-product-categories",r,{"is-dropdown":l,"is-list":!l}),s="prod-categories-".concat(c);return Object(o.createElement)(E.Fragment,null,n.length>0&&Object(o.createElement)("div",{className:i},l?Object(o.createElement)(E.Fragment,null,Object(o.createElement)("div",{className:"wc-block-product-categories__dropdown"},Object(o.createElement)("label",{className:"screen-reader-text",htmlFor:s},Object(a.__)("Select a category","woo-gutenberg-products-block")),Object(o.createElement)("select",{id:s,ref:this.select},Object(o.createElement)("option",{value:"false",hidden:!0},Object(a.__)("Select a category","woo-gutenberg-products-block")),this.renderOptions(n))),Object(o.createElement)("button",{type:"button",className:"wc-block-product-categories__button","aria-label":Object(a.__)("Go to category","woo-gutenberg-products-block"),icon:"arrow-right-alt2",onClick:this.onNavigate},Object(o.createElement)("svg",{"aria-hidden":"true",role:"img",focusable:"false",className:"dashicon dashicons-arrow-right-alt2",xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 20 20"},Object(o.createElement)("path",{d:"M6 15l5-5-5-5 1-2 7 7-7 7z"})))):this.renderList(n)))}}]),t}(E.Component),z=Object(C.a)(x),M=n(70),H=n(60),L=n.n(H),N=n(19),P=n.n(N);function B(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var c=Object.getOwnPropertySymbols(e);t&&(c=c.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,c)}return n}function I(){var e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:[]).reduce((function(e,t,n,c){var r=arguments.length>4&&void 0!==arguments[4]?arguments[4]:t.parent;return(e[r]||(e[r]=[])).push(t),e}),{}),t=function t(n){return n.map((function(n){var c=e[n.term_id];return delete e[n.term_id],function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?B(n,!0).forEach((function(t){P()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):B(n).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({},n,{children:c&&c.length?t(c):[]})}))},n=t(e[0]||[]);return delete e[0],Object.keys(e).forEach((function(e){n.push.apply(n,L()(t(e||[])))})),n}var S=n(23);Object(l.registerBlockType)("woocommerce/product-categories",{title:Object(a.__)("Product Categories List","woo-gutenberg-products-block"),icon:{src:Object(o.createElement)(S.b,null),foreground:"#96588a"},category:"woocommerce",keywords:[Object(a.__)("WooCommerce","woo-gutenberg-products-block")],description:Object(a.__)("Show your product categories as a list or dropdown.","woo-gutenberg-products-block"),supports:{align:["wide","full"]},attributes:{hasCount:{type:"boolean",default:!0,source:"attribute",selector:"div",attribute:"data-has-count"},hasEmpty:{type:"boolean",default:!1,source:"attribute",selector:"div",attribute:"data-has-empty"},isDropdown:{type:"boolean",default:!1,source:"attribute",selector:"div",attribute:"data-is-dropdown"},isHierarchical:{type:"boolean",default:!0,source:"attribute",selector:"div",attribute:"data-is-hierarchical"}},edit:function(e){var t=e.attributes,n=e.setAttributes,c=t.hasCount,r=t.hasEmpty,l=t.isDropdown,u=t.isHierarchical,b=function(e){var t=e.hasEmpty,n=e.isHierarchical,c=k.PRODUCT_CATEGORIES.filter((function(e){return t||!!e.count}));return n?I(c):c}(t);return Object(o.createElement)(o.Fragment,null,Object(o.createElement)(i.InspectorControls,{key:"inspector"},Object(o.createElement)(s.PanelBody,{title:Object(a.__)("Content","woo-gutenberg-products-block"),initialOpen:!0},Object(o.createElement)(s.ToggleControl,{label:Object(a.__)("Show product count","woo-gutenberg-products-block"),help:c?Object(a.__)("Product count is visible.","woo-gutenberg-products-block"):Object(a.__)("Product count is hidden.","woo-gutenberg-products-block"),checked:c,onChange:function(){return n({hasCount:!c})}}),Object(o.createElement)(s.ToggleControl,{label:Object(a.__)("Show hierarchy","woo-gutenberg-products-block"),help:u?Object(a.__)("Hierarchy is visible.","woo-gutenberg-products-block"):Object(a.__)("Hierarchy is hidden.","woo-gutenberg-products-block"),checked:u,onChange:function(){return n({isHierarchical:!u})}}),Object(o.createElement)(s.ToggleControl,{label:Object(a.__)("Show empty categories","woo-gutenberg-products-block"),help:r?Object(a.__)("Empty categories are visible.","woo-gutenberg-products-block"):Object(a.__)("Empty categories are hidden.","woo-gutenberg-products-block"),checked:r,onChange:function(){return n({hasEmpty:!r})}})),Object(o.createElement)(s.PanelBody,{title:Object(a.__)("List Settings","woo-gutenberg-products-block"),initialOpen:!0},Object(o.createElement)(M.a,{label:Object(a.__)("Display style","woo-gutenberg-products-block"),value:l?"dropdown":"list",options:[{label:Object(a.__)("List","woo-gutenberg-products-block"),value:"list"},{label:Object(a.__)("Dropdown","woo-gutenberg-products-block"),value:"dropdown"}],onChange:function(e){return n({isDropdown:"dropdown"===e})}}))),b.length>0?Object(o.createElement)(z,{attributes:t,categories:b,isPreview:!0}):Object(o.createElement)(s.Placeholder,{className:"wc-block-product-categories",icon:Object(o.createElement)(S.b,null),label:Object(a.__)("Product Categories List","woo-gutenberg-products-block")},Object(a.__)("This block shows product categories for your store. In order to preview this you'll first need to create a product and assign it to a category.","woo-gutenberg-products-block")))},save:function(e){var t=e.attributes,n=t.hasCount,c=t.hasEmpty,a=t.isDropdown,l=t.isHierarchical,i={};return n&&(i["data-has-count"]=!0),c&&(i["data-has-empty"]=!0),a&&(i["data-is-dropdown"]=!0),l&&(i["data-is-hierarchical"]=!0),Object(o.createElement)("div",r()({className:"is-loading"},i),a?Object(o.createElement)("span",{"aria-hidden":!0,className:"wc-block-product-categories__placeholder"}):Object(o.createElement)("ul",{"aria-hidden":!0},Object(o.createElement)("li",null,Object(o.createElement)("span",{className:"wc-block-product-categories__placeholder"})),Object(o.createElement)("li",null,Object(o.createElement)("span",{className:"wc-block-product-categories__placeholder"})),Object(o.createElement)("li",null,Object(o.createElement)("span",{className:"wc-block-product-categories__placeholder"}))))}})},69:function(e,t,n){"use strict";var c=n(15),r=n.n(c),o=n(7),a=n.n(o),l=n(8),i=n.n(l),s=n(9),u=n.n(s),b=n(10),p=n.n(b),h=n(11),d=n.n(h),f=n(0),m=n(12),g=[];t.a=function(e){return function(t){function n(){return a()(this,n),u()(this,p()(n).apply(this,arguments))}return d()(n,t),i()(n,[{key:"generateUniqueID",value:function(){var e=n.name;return g[e]||(g[e]=0),g[e]++,g[e]}},{key:"render",value:function(){var t=this.generateUniqueID();return Object(f.createElement)(e,r()({},this.props,{componentId:t}))}}]),n}(m.Component)}},70:function(e,t,n){"use strict";var c=n(15),r=n.n(c),o=n(7),a=n.n(o),l=n(8),i=n.n(l),s=n(9),u=n.n(s),b=n(10),p=n.n(b),h=n(14),d=n.n(h),f=n(11),m=n.n(f),g=n(0),w=n(4),v=n(6),O=n.n(v),j=n(3),E=n(20),y=(n(136),function(e){function t(){var e;return a()(this,t),(e=u()(this,p()(t).apply(this,arguments))).onClick=e.onClick.bind(d()(e)),e}return m()(t,e),i()(t,[{key:"onClick",value:function(e){this.props.onChange&&this.props.onChange(e.target.value)}},{key:"render",value:function(){var e,t=this,n=this.props,c=n.label,o=n.checked,a=n.instanceId,l=n.className,i=n.help,s=n.options,u=n.value,b="inspector-toggle-button-control-".concat(a);return i&&(e=Object(w.isFunction)(i)?i(o):i),Object(g.createElement)(j.BaseControl,{id:b,help:e,className:O()("components-toggle-button-control",l)},Object(g.createElement)("label",{id:b+"__label",htmlFor:b,className:"components-toggle-button-control__label"},c),Object(g.createElement)(j.ButtonGroup,{"aria-labelledby":b+"__label"},s.map((function(e,n){var o={};return u===e.value?(o.isPrimary=!0,o["aria-pressed"]=!0):(o.isDefault=!0,o["aria-pressed"]=!1),Object(g.createElement)(j.Button,r()({key:"".concat(e.label,"-").concat(e.value,"-").concat(n),value:e.value,onClick:t.onClick,"aria-label":c+": "+e.label},o),e.label)}))))}}]),t}(g.Component));t.a=Object(E.withInstanceId)(y)}});
|
build/product-category.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
this.wc=this.wc||{},this.wc.blocks=this.wc.blocks||{},this.wc.blocks["product-category"]=function(e){function t(t){for(var r,i,s=t[0],a=t[1],u=t[2],b=0,d=[];b<s.length;b++)i=s[b],Object.prototype.hasOwnProperty.call(n,i)&&n[i]&&d.push(n[i][0]),n[i]=0;for(r in a)Object.prototype.hasOwnProperty.call(a,r)&&(e[r]=a[r]);for(l&&l(t);d.length;)d.shift()();return c.push.apply(c,u||[]),o()}function o(){for(var e,t=0;t<c.length;t++){for(var o=c[t],r=!0,s=1;s<o.length;s++){var a=o[s];0!==n[a]&&(r=!1)}r&&(c.splice(t--,1),e=i(i.s=o[0]))}return e}var r={},n={10:0},c=[];function i(t){if(r[t])return r[t].exports;var o=r[t]={i:t,l:!1,exports:{}};return e[t].call(o.exports,o,o.exports,i),o.l=!0,o.exports}i.m=e,i.c=r,i.d=function(e,t,o){i.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:o})},i.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},i.t=function(e,t){if(1&t&&(e=i(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var o=Object.create(null);if(i.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)i.d(o,r,function(t){return e[t]}.bind(null,r));return o},i.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return i.d(t,"a",t),t},i.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},i.p="";var s=window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[],a=s.push.bind(s);s.push=t,s=s.slice();for(var u=0;u<s.length;u++)t(s[u]);var l=a;return c.push([555,2,1,0]),o()}({0:function(e,t){!function(){e.exports=this.wp.element}()},1:function(e,t){!function(){e.exports=this.wp.i18n}()},13:function(e,t){!function(){e.exports=this.React}()},14:function(e,t){!function(){e.exports=this.moment}()},17:function(e,t){!function(){e.exports=this.wp.apiFetch}()},18:function(e,t){!function(){e.exports=this.wp.editor}()},19:function(e,t){!function(){e.exports=this.wp.url}()},2:function(e,t){!function(){e.exports=this.wp.components}()},21:function(e,t){!function(){e.exports=this.wp.compose}()},23:function(e,t){!function(){e.exports=this.wp.blocks}()},33:function(e,t){!function(){e.exports=this.wp.keycodes}()},36:function(e,t,o){"use strict";o.d(t,"b",function(){return n});var r=o(5),n=["woocommerce/product-best-sellers","woocommerce/product-category","woocommerce/product-new","woocommerce/product-on-sale","woocommerce/product-top-rated"];t.a={columns:{type:"number",default:r.DEFAULT_COLUMNS},rows:{type:"number",default:r.DEFAULT_ROWS},alignButtons:{type:"boolean",default:!1},categories:{type:"array",default:[]},catOperator:{type:"string",default:"any"},contentVisibility:{type:"object",default:{title:!0,price:!0,rating:!0,button:!0}}}},37:function(e,t,o){"use strict";var r=o(20),n=o.n(r),c=o(0),i=o(1),s=(o(7),o(2));function a(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),o.push.apply(o,r)}return o}function u(e){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?a(o,!0).forEach(function(t){n()(e,t,o[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):a(o).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(o,t))})}return e}t.a=function(e){var t=e.onChange,o=e.settings,r=o.button,n=o.price,a=o.rating,l=o.title;return Object(c.createElement)(c.Fragment,null,Object(c.createElement)(s.ToggleControl,{label:Object(i.__)("Product title","woo-gutenberg-products-block"),help:l?Object(i.__)("Product title is visible.","woo-gutenberg-products-block"):Object(i.__)("Product title is hidden.","woo-gutenberg-products-block"),checked:l,onChange:function(){return t(u({},o,{title:!l}))}}),Object(c.createElement)(s.ToggleControl,{label:Object(i.__)("Product price","woo-gutenberg-products-block"),help:n?Object(i.__)("Product price is visible.","woo-gutenberg-products-block"):Object(i.__)("Product price is hidden.","woo-gutenberg-products-block"),checked:n,onChange:function(){return t(u({},o,{price:!n}))}}),Object(c.createElement)(s.ToggleControl,{label:Object(i.__)("Product rating","woo-gutenberg-products-block"),help:a?Object(i.__)("Product rating is visible.","woo-gutenberg-products-block"):Object(i.__)("Product rating is hidden.","woo-gutenberg-products-block"),checked:a,onChange:function(){return t(u({},o,{rating:!a}))}}),Object(c.createElement)(s.ToggleControl,{label:Object(i.__)("Add to Cart button","woo-gutenberg-products-block"),help:r?Object(i.__)("Add to Cart button is visible.","woo-gutenberg-products-block"):Object(i.__)("Add to Cart button is hidden.","woo-gutenberg-products-block"),checked:r,onChange:function(){return t(u({},o,{button:!r}))}}))}},4:function(e,t){!function(){e.exports=this.lodash}()},41:function(e,t,o){"use strict";var r=o(16),n=o.n(r),c=o(8),i=o.n(c),s=o(9),a=o.n(s),u=o(10),l=o.n(u),b=o(11),d=o.n(b),p=o(15),g=o.n(p),f=o(12),O=o.n(f),h=o(0),m=o(1),w=o(19),y=o(17),j=o.n(y),_=o(4),v=(o(7),o(26)),k=o(2),C=o(5),E=(o(86),function(e){function t(){var e;return i()(this,t),(e=l()(this,d()(t).apply(this,arguments))).state={list:[],loading:!0},e.renderItem=e.renderItem.bind(g()(e)),e}return O()(t,e),a()(t,[{key:"componentDidMount",value:function(){var e=this;j()({path:Object(w.addQueryArgs)("".concat(C.ENDPOINTS.products,"/categories"),{per_page:-1})}).then(function(t){e.setState({list:t,loading:!1})}).catch(function(){e.setState({list:[],loading:!1})})}},{key:"renderItem",value:function(e){var t=e.item,o=e.search,r=e.depth,c=void 0===r?0:r,i=["woocommerce-product-categories__item"];o.length&&i.push("is-searching"),0===c&&0!==t.parent&&i.push("is-skip-level");var s=t.breadcrumbs.length?"".concat(t.breadcrumbs.join(", "),", ").concat(t.name):t.name;return Object(h.createElement)(v.b,n()({className:i.join(" ")},e,{showCount:!0,"aria-label":Object(m.sprintf)(Object(m._n)("%s, has %d product","%s, has %d products",t.count,"woo-gutenberg-products-block"),s,t.count)}))}},{key:"render",value:function(){var e=this.state,t=e.list,o=e.loading,r=this.props,n=r.onChange,c=r.onOperatorChange,i=r.operator,s=r.selected,a=r.isSingle,u={clear:Object(m.__)("Clear all product categories","woo-gutenberg-products-block"),list:Object(m.__)("Product Categories","woo-gutenberg-products-block"),noItems:Object(m.__)("Your store doesn't have any product categories.","woo-gutenberg-products-block"),search:Object(m.__)("Search for product categories","woo-gutenberg-products-block"),selected:function(e){return Object(m.sprintf)(Object(m._n)("%d category selected","%d categories selected",e,"woo-gutenberg-products-block"),e)},updated:Object(m.__)("Category search results updated.","woo-gutenberg-products-block")};return Object(h.createElement)(h.Fragment,null,Object(h.createElement)(v.a,{className:"woocommerce-product-categories",list:t,isLoading:o,selected:s.map(function(e){return Object(_.find)(t,{id:e})}).filter(Boolean),onChange:n,renderItem:this.renderItem,messages:u,isHierarchical:!0,isSingle:a}),!!c&&Object(h.createElement)("div",{className:s.length<2?"screen-reader-text":""},Object(h.createElement)(k.SelectControl,{className:"woocommerce-product-categories__operator",label:Object(m.__)("Display products matching","woo-gutenberg-products-block"),help:Object(m.__)("Pick at least two categories to use this setting.","woo-gutenberg-products-block"),value:i,onChange:c,options:[{label:Object(m.__)("Any selected categories","woo-gutenberg-products-block"),value:"any"},{label:Object(m.__)("All selected categories","woo-gutenberg-products-block"),value:"all"}]})))}}]),t}(h.Component));E.defaultProps={operator:"any",isSingle:!1},t.a=E},44:function(e,t){!function(){e.exports=this.ReactDOM}()},45:function(e,t,o){"use strict";var r=o(0),n=o(1),c=o(4),i=(o(7),o(2)),s=o(5);t.a=function(e){var t=e.columns,o=e.rows,a=e.setAttributes,u=e.alignButtons;return Object(r.createElement)(r.Fragment,null,Object(r.createElement)(i.RangeControl,{label:Object(n.__)("Columns","woo-gutenberg-products-block"),value:t,onChange:function(e){var t=Object(c.clamp)(e,s.MIN_COLUMNS,s.MAX_COLUMNS);a({columns:Object(c.isNaN)(t)?"":t})},min:s.MIN_COLUMNS,max:s.MAX_COLUMNS}),Object(r.createElement)(i.RangeControl,{label:Object(n.__)("Rows","woo-gutenberg-products-block"),value:o,onChange:function(e){var t=Object(c.clamp)(e,s.MIN_ROWS,s.MAX_ROWS);a({rows:Object(c.isNaN)(t)?"":t})},min:s.MIN_ROWS,max:s.MAX_ROWS}),Object(r.createElement)(i.ToggleControl,{label:Object(n.__)("Align Add to Cart buttons","woo-gutenberg-products-block"),help:u?Object(n.__)("Buttons are aligned vertically.","woo-gutenberg-products-block"):Object(n.__)("Buttons follow content.","woo-gutenberg-products-block"),checked:u,onChange:function(){return a({alignButtons:!u})}}))}},46:function(e,t,o){"use strict";var r=o(0),n=o(6),c=o.n(n),i=o(58),s=o.n(i),a=o(5);o.d(t,"a",function(){return u});var u=function(e){return function(t){var o=t.attributes,n=o.align,i=o.contentVisibility,u=c()(n?"align".concat(n):"",{"is-hidden-title":!i.title,"is-hidden-price":!i.price,"is-hidden-rating":!i.rating,"is-hidden-button":!i.button});return Object(r.createElement)(r.RawHTML,{className:u},function(e,t){var o=e.attributes,r=o.attributes,n=o.attrOperator,c=o.categories,i=o.catOperator,u=o.orderby,l=o.products,b=o.columns||a.DEFAULT_COLUMNS,d=o.rows||a.DEFAULT_ROWS,p=new Map;switch(p.set("limit",d*b),p.set("columns",b),c&&c.length&&(p.set("category",c.join(",")),i&&"all"===i&&p.set("cat_operator","AND")),r&&r.length&&(p.set("terms",r.map(function(e){return e.id}).join(",")),p.set("attribute",r[0].attr_slug),n&&"all"===n&&p.set("terms_operator","AND")),u&&("price_desc"===u?(p.set("orderby","price"),p.set("order","DESC")):"price_asc"===u?(p.set("orderby","price"),p.set("order","ASC")):"date"===u?(p.set("orderby","date"),p.set("order","DESC")):p.set("orderby",u)),t){case"woocommerce/product-best-sellers":p.set("best_selling","1");break;case"woocommerce/product-top-rated":p.set("orderby","rating");break;case"woocommerce/product-on-sale":p.set("on_sale","1");break;case"woocommerce/product-new":p.set("orderby","date"),p.set("order","DESC");break;case"woocommerce/handpicked-products":if(!l.length)return"";p.set("ids",l.join(",")),p.set("limit",l.length);break;case"woocommerce/product-category":if(!c||!c.length)return"";break;case"woocommerce/products-by-attribute":if(!r||!r.length)return""}var g="[products",f=!0,O=!1,h=void 0;try{for(var m,w=p[Symbol.iterator]();!(f=(m=w.next()).done);f=!0){var y=s()(m.value,2);g+=" "+y[0]+'="'+y[1]+'"'}}catch(e){O=!0,h=e}finally{try{f||null==w.return||w.return()}finally{if(O)throw h}}return g+="]"}(t,e))}}},47:function(e,t){!function(){e.exports=this.wp.viewport}()},5:function(e,t){!function(){e.exports=this.wc["wc-block-settings"]}()},51:function(e,t){!function(){e.exports=this.wp.hooks}()},513:function(e,t,o){var r=o(514);"string"==typeof r&&(r=[[e.i,r,""]]);var n={insert:"head",singleton:!1};o(35)(r,n);r.locals&&(e.exports=r.locals)},514:function(e,t,o){},53:function(e,t){!function(){e.exports=this.wp.htmlEntities}()},54:function(e,t){!function(){e.exports=this.wp.date}()},555:function(e,t,o){"use strict";o.r(t);var r=o(20),n=o.n(r),c=o(0),i=o(1),s=o(23),a=o(4),u=(o(513),o(8)),l=o.n(u),b=o(9),d=o.n(b),p=o(10),g=o.n(p),f=o(11),O=o.n(f),h=o(15),m=o.n(h),w=o(12),y=o.n(w),j=o(18),_=o(2),v=(o(7),o(37)),k=o(45),C=o(41),E=o(57);function P(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),o.push.apply(o,r)}return o}function S(e){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?P(o,!0).forEach(function(t){n()(e,t,o[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):P(o).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(o,t))})}return e}var A=function(e){function t(){var e,o;l()(this,t);for(var r=arguments.length,c=new Array(r),i=0;i<r;i++)c[i]=arguments[i];return o=g()(this,(e=O()(t)).call.apply(e,[this].concat(c))),n()(m()(o),"state",{changedAttributes:{},isEditing:!1}),n()(m()(o),"startEditing",function(){o.setState({isEditing:!0,changedAttributes:{}})}),n()(m()(o),"stopEditing",function(){o.setState({isEditing:!1,changedAttributes:{}})}),n()(m()(o),"setChangedAttributes",function(e){o.setState(function(t){return{changedAttributes:S({},t.changedAttributes,{},e)}})}),n()(m()(o),"save",function(){var e=o.state.changedAttributes;(0,o.props.setAttributes)(e),o.stopEditing()}),o}return y()(t,e),d()(t,[{key:"componentDidMount",value:function(){this.props.attributes.categories.length||this.setState({isEditing:!0})}},{key:"getInspectorControls",value:function(){var e=this,t=this.props,o=t.attributes,r=t.setAttributes,n=this.state.isEditing,s=o.columns,a=o.catOperator,u=o.contentVisibility,l=o.orderby,b=o.rows,d=o.alignButtons;return Object(c.createElement)(j.InspectorControls,{key:"inspector"},Object(c.createElement)(_.PanelBody,{title:Object(i.__)("Product Category","woo-gutenberg-products-block"),initialOpen:!o.categories.length&&!n},Object(c.createElement)(C.a,{selected:o.categories,onChange:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],o=t.map(function(e){return e.id}),n={categories:o};r(n),e.setChangedAttributes(n)},operator:a,onOperatorChange:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"any",o={catOperator:t};r(o),e.setChangedAttributes(o)}})),Object(c.createElement)(_.PanelBody,{title:Object(i.__)("Layout","woo-gutenberg-products-block"),initialOpen:!0},Object(c.createElement)(k.a,{columns:s,rows:b,alignButtons:d,setAttributes:r})),Object(c.createElement)(_.PanelBody,{title:Object(i.__)("Content","woo-gutenberg-products-block"),initialOpen:!0},Object(c.createElement)(v.a,{settings:u,onChange:function(e){return r({contentVisibility:e})}})),Object(c.createElement)(_.PanelBody,{title:Object(i.__)("Order By","woo-gutenberg-products-block"),initialOpen:!1},Object(c.createElement)(E.a,{setAttributes:r,value:l})))}},{key:"renderEditMode",value:function(){var e=this,t=this.props,o=t.attributes,r=t.debouncedSpeak,n=S({},o,{},this.state.changedAttributes);return Object(c.createElement)(_.Placeholder,{icon:"category",label:Object(i.__)("Products by Category","woo-gutenberg-products-block"),className:"wc-block-products-grid wc-block-products-category"},Object(i.__)("Display a grid of products from your selected categories.","woo-gutenberg-products-block"),Object(c.createElement)("div",{className:"wc-block-products-category__selection"},Object(c.createElement)(C.a,{selected:n.categories,onChange:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],o=t.map(function(e){return e.id});e.setChangedAttributes({categories:o})},operator:n.catOperator,onOperatorChange:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"any";return e.setChangedAttributes({catOperator:t})}}),Object(c.createElement)(_.Button,{isDefault:!0,onClick:function(){e.save(),r(Object(i.__)("Showing Products by Category block preview.","woo-gutenberg-products-block"))}},Object(i.__)("Done","woo-gutenberg-products-block")),Object(c.createElement)(_.Button,{className:"wc-block-products-category__cancel-button",isTertiary:!0,onClick:function(){e.stopEditing(),r(Object(i.__)("Showing Products by Category block preview.","woo-gutenberg-products-block"))}},Object(i.__)("Cancel","woo-gutenberg-products-block"))))}},{key:"renderViewMode",value:function(){var e=this.props,t=e.attributes,o=e.name,r=t.categories.length;return Object(c.createElement)(_.Disabled,null,r?Object(c.createElement)(j.ServerSideRender,{block:o,attributes:t}):Object(i.__)("Select at least one category to display its products.","woo-gutenberg-products-block"))}},{key:"render",value:function(){var e=this,t=this.state.isEditing;return Object(c.createElement)(c.Fragment,null,Object(c.createElement)(j.BlockControls,null,Object(c.createElement)(_.Toolbar,{controls:[{icon:"edit",title:Object(i.__)("Edit"),onClick:function(){return t?e.stopEditing():e.startEditing()},isActive:t}]})),this.getInspectorControls(),t?this.renderEditMode():this.renderViewMode())}}]),t}(c.Component),M=Object(_.withSpokenMessages)(A),D=o(46),x=o(36);function N(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),o.push.apply(o,r)}return o}function B(e){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?N(o,!0).forEach(function(t){n()(e,t,o[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):N(o).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(o,t))})}return e}Object(s.registerBlockType)("woocommerce/product-category",{title:Object(i.__)("Products by Category","woo-gutenberg-products-block"),icon:{src:"category",foreground:"#96588a"},category:"woocommerce",keywords:[Object(i.__)("WooCommerce","woo-gutenberg-products-block")],description:Object(i.__)("Display a grid of products from your selected categories.","woo-gutenberg-products-block"),supports:{align:["wide","full"],html:!1},attributes:B({},x.a,{editMode:{type:"boolean",default:!0},orderby:{type:"string",default:"date"}}),transforms:{from:[{type:"block",blocks:Object(a.without)(x.b,"woocommerce/product-category"),transform:function(e){return Object(s.createBlock)("woocommerce/product-category",B({},e,{editMode:!1}))}}]},deprecated:[{attributes:B({},x.a,{editMode:{type:"boolean",default:!0},orderby:{type:"string",default:"date"}}),save:Object(D.a)("woocommerce/product-category")}],edit:function(e){return Object(c.createElement)(M,e)},save:function(){return null}})},57:function(e,t,o){"use strict";var r=o(0),n=o(1),c=o(2);o(7);t.a=function(e){var t=e.value,o=e.setAttributes;return Object(r.createElement)(c.SelectControl,{label:Object(n.__)("Order products by","woo-gutenberg-products-block"),value:t,options:[{label:Object(n.__)("Newness - newest first","woo-gutenberg-products-block"),value:"date"},{label:Object(n.__)("Price - low to high","woo-gutenberg-products-block"),value:"price_asc"},{label:Object(n.__)("Price - high to low","woo-gutenberg-products-block"),value:"price_desc"},{label:Object(n.__)("Rating - highest first","woo-gutenberg-products-block"),value:"rating"},{label:Object(n.__)("Sales - most first","woo-gutenberg-products-block"),value:"popularity"},{label:Object(n.__)("Title - alphabetical","woo-gutenberg-products-block"),value:"title"},{label:Object(n.__)("Menu Order","woo-gutenberg-products-block"),value:"menu_order"}],onChange:function(e){return o({orderby:e})}})}},61:function(e,t){!function(){e.exports=this.wp.dom}()},64:function(e,t){},65:function(e,t){},67:function(e,t){},68:function(e,t){}});
|
1 |
+
this.wc=this.wc||{},this.wc.blocks=this.wc.blocks||{},this.wc.blocks["product-category"]=function(e){function t(t){for(var r,i,s=t[0],a=t[1],u=t[2],b=0,d=[];b<s.length;b++)i=s[b],Object.prototype.hasOwnProperty.call(n,i)&&n[i]&&d.push(n[i][0]),n[i]=0;for(r in a)Object.prototype.hasOwnProperty.call(a,r)&&(e[r]=a[r]);for(l&&l(t);d.length;)d.shift()();return c.push.apply(c,u||[]),o()}function o(){for(var e,t=0;t<c.length;t++){for(var o=c[t],r=!0,s=1;s<o.length;s++){var a=o[s];0!==n[a]&&(r=!1)}r&&(c.splice(t--,1),e=i(i.s=o[0]))}return e}var r={},n={10:0},c=[];function i(t){if(r[t])return r[t].exports;var o=r[t]={i:t,l:!1,exports:{}};return e[t].call(o.exports,o,o.exports,i),o.l=!0,o.exports}i.m=e,i.c=r,i.d=function(e,t,o){i.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:o})},i.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},i.t=function(e,t){if(1&t&&(e=i(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var o=Object.create(null);if(i.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)i.d(o,r,function(t){return e[t]}.bind(null,r));return o},i.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return i.d(t,"a",t),t},i.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},i.p="";var s=window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[],a=s.push.bind(s);s.push=t,s=s.slice();for(var u=0;u<s.length;u++)t(s[u]);var l=a;return c.push([571,2,1,0]),o()}({0:function(e,t){!function(){e.exports=this.wp.element}()},1:function(e,t){!function(){e.exports=this.wp.i18n}()},12:function(e,t){!function(){e.exports=this.React}()},13:function(e,t){!function(){e.exports=this.moment}()},16:function(e,t){!function(){e.exports=this.wp.apiFetch}()},17:function(e,t){!function(){e.exports=this.wp.editor}()},18:function(e,t){!function(){e.exports=this.wp.url}()},20:function(e,t){!function(){e.exports=this.wp.compose}()},22:function(e,t){!function(){e.exports=this.wp.blocks}()},3:function(e,t){!function(){e.exports=this.wp.components}()},32:function(e,t){!function(){e.exports=this.wp.keycodes}()},35:function(e,t,o){"use strict";o.d(t,"b",(function(){return n}));var r=o(5),n=["woocommerce/product-best-sellers","woocommerce/product-category","woocommerce/product-new","woocommerce/product-on-sale","woocommerce/product-top-rated"];t.a={columns:{type:"number",default:r.DEFAULT_COLUMNS},rows:{type:"number",default:r.DEFAULT_ROWS},alignButtons:{type:"boolean",default:!1},categories:{type:"array",default:[]},catOperator:{type:"string",default:"any"},contentVisibility:{type:"object",default:{title:!0,price:!0,rating:!0,button:!0}}}},36:function(e,t,o){"use strict";var r=o(19),n=o.n(r),c=o(0),i=o(1),s=(o(2),o(3));function a(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),o.push.apply(o,r)}return o}function u(e){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?a(o,!0).forEach((function(t){n()(e,t,o[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):a(o).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(o,t))}))}return e}t.a=function(e){var t=e.onChange,o=e.settings,r=o.button,n=o.price,a=o.rating,l=o.title;return Object(c.createElement)(c.Fragment,null,Object(c.createElement)(s.ToggleControl,{label:Object(i.__)("Product title","woo-gutenberg-products-block"),help:l?Object(i.__)("Product title is visible.","woo-gutenberg-products-block"):Object(i.__)("Product title is hidden.","woo-gutenberg-products-block"),checked:l,onChange:function(){return t(u({},o,{title:!l}))}}),Object(c.createElement)(s.ToggleControl,{label:Object(i.__)("Product price","woo-gutenberg-products-block"),help:n?Object(i.__)("Product price is visible.","woo-gutenberg-products-block"):Object(i.__)("Product price is hidden.","woo-gutenberg-products-block"),checked:n,onChange:function(){return t(u({},o,{price:!n}))}}),Object(c.createElement)(s.ToggleControl,{label:Object(i.__)("Product rating","woo-gutenberg-products-block"),help:a?Object(i.__)("Product rating is visible.","woo-gutenberg-products-block"):Object(i.__)("Product rating is hidden.","woo-gutenberg-products-block"),checked:a,onChange:function(){return t(u({},o,{rating:!a}))}}),Object(c.createElement)(s.ToggleControl,{label:Object(i.__)("Add to Cart button","woo-gutenberg-products-block"),help:r?Object(i.__)("Add to Cart button is visible.","woo-gutenberg-products-block"):Object(i.__)("Add to Cart button is hidden.","woo-gutenberg-products-block"),checked:r,onChange:function(){return t(u({},o,{button:!r}))}}))}},4:function(e,t){!function(){e.exports=this.lodash}()},40:function(e,t,o){"use strict";var r=o(15),n=o.n(r),c=o(7),i=o.n(c),s=o(8),a=o.n(s),u=o(9),l=o.n(u),b=o(10),d=o.n(b),p=o(14),g=o.n(p),f=o(11),O=o.n(f),h=o(0),m=o(1),w=o(18),y=o(16),j=o.n(y),_=o(4),v=(o(2),o(25)),k=o(3),C=o(5),E=(o(89),function(e){function t(){var e;return i()(this,t),(e=l()(this,d()(t).apply(this,arguments))).state={list:[],loading:!0},e.renderItem=e.renderItem.bind(g()(e)),e}return O()(t,e),a()(t,[{key:"componentDidMount",value:function(){var e=this;j()({path:Object(w.addQueryArgs)("".concat(C.ENDPOINTS.products,"/categories"),{per_page:-1})}).then((function(t){e.setState({list:t,loading:!1})})).catch((function(){e.setState({list:[],loading:!1})}))}},{key:"renderItem",value:function(e){var t=e.item,o=e.search,r=e.depth,c=void 0===r?0:r,i=["woocommerce-product-categories__item"];o.length&&i.push("is-searching"),0===c&&0!==t.parent&&i.push("is-skip-level");var s=t.breadcrumbs.length?"".concat(t.breadcrumbs.join(", "),", ").concat(t.name):t.name;return Object(h.createElement)(v.b,n()({className:i.join(" ")},e,{showCount:!0,"aria-label":Object(m.sprintf)(Object(m._n)("%s, has %d product","%s, has %d products",t.count,"woo-gutenberg-products-block"),s,t.count)}))}},{key:"render",value:function(){var e=this.state,t=e.list,o=e.loading,r=this.props,n=r.onChange,c=r.onOperatorChange,i=r.operator,s=r.selected,a=r.isSingle,u={clear:Object(m.__)("Clear all product categories","woo-gutenberg-products-block"),list:Object(m.__)("Product Categories","woo-gutenberg-products-block"),noItems:Object(m.__)("Your store doesn't have any product categories.","woo-gutenberg-products-block"),search:Object(m.__)("Search for product categories","woo-gutenberg-products-block"),selected:function(e){return Object(m.sprintf)(Object(m._n)("%d category selected","%d categories selected",e,"woo-gutenberg-products-block"),e)},updated:Object(m.__)("Category search results updated.","woo-gutenberg-products-block")};return Object(h.createElement)(h.Fragment,null,Object(h.createElement)(v.a,{className:"woocommerce-product-categories",list:t,isLoading:o,selected:s.map((function(e){return Object(_.find)(t,{id:e})})).filter(Boolean),onChange:n,renderItem:this.renderItem,messages:u,isHierarchical:!0,isSingle:a}),!!c&&Object(h.createElement)("div",{className:s.length<2?"screen-reader-text":""},Object(h.createElement)(k.SelectControl,{className:"woocommerce-product-categories__operator",label:Object(m.__)("Display products matching","woo-gutenberg-products-block"),help:Object(m.__)("Pick at least two categories to use this setting.","woo-gutenberg-products-block"),value:i,onChange:c,options:[{label:Object(m.__)("Any selected categories","woo-gutenberg-products-block"),value:"any"},{label:Object(m.__)("All selected categories","woo-gutenberg-products-block"),value:"all"}]})))}}]),t}(h.Component));E.defaultProps={operator:"any",isSingle:!1},t.a=E},43:function(e,t){!function(){e.exports=this.ReactDOM}()},44:function(e,t,o){"use strict";var r=o(0),n=o(1),c=o(4),i=(o(2),o(3)),s=o(5);t.a=function(e){var t=e.columns,o=e.rows,a=e.setAttributes,u=e.alignButtons;return Object(r.createElement)(r.Fragment,null,Object(r.createElement)(i.RangeControl,{label:Object(n.__)("Columns","woo-gutenberg-products-block"),value:t,onChange:function(e){var t=Object(c.clamp)(e,s.MIN_COLUMNS,s.MAX_COLUMNS);a({columns:Object(c.isNaN)(t)?"":t})},min:s.MIN_COLUMNS,max:s.MAX_COLUMNS}),Object(r.createElement)(i.RangeControl,{label:Object(n.__)("Rows","woo-gutenberg-products-block"),value:o,onChange:function(e){var t=Object(c.clamp)(e,s.MIN_ROWS,s.MAX_ROWS);a({rows:Object(c.isNaN)(t)?"":t})},min:s.MIN_ROWS,max:s.MAX_ROWS}),Object(r.createElement)(i.ToggleControl,{label:Object(n.__)("Align Add to Cart buttons","woo-gutenberg-products-block"),help:u?Object(n.__)("Buttons are aligned vertically.","woo-gutenberg-products-block"):Object(n.__)("Buttons follow content.","woo-gutenberg-products-block"),checked:u,onChange:function(){return a({alignButtons:!u})}}))}},45:function(e,t,o){"use strict";var r=o(0),n=o(6),c=o.n(n),i=o(56),s=o.n(i),a=o(5);o.d(t,"a",(function(){return u}));var u=function(e){return function(t){var o=t.attributes,n=o.align,i=o.contentVisibility,u=c()(n?"align".concat(n):"",{"is-hidden-title":!i.title,"is-hidden-price":!i.price,"is-hidden-rating":!i.rating,"is-hidden-button":!i.button});return Object(r.createElement)(r.RawHTML,{className:u},function(e,t){var o=e.attributes,r=o.attributes,n=o.attrOperator,c=o.categories,i=o.catOperator,u=o.orderby,l=o.products,b=o.columns||a.DEFAULT_COLUMNS,d=o.rows||a.DEFAULT_ROWS,p=new Map;switch(p.set("limit",d*b),p.set("columns",b),c&&c.length&&(p.set("category",c.join(",")),i&&"all"===i&&p.set("cat_operator","AND")),r&&r.length&&(p.set("terms",r.map((function(e){return e.id})).join(",")),p.set("attribute",r[0].attr_slug),n&&"all"===n&&p.set("terms_operator","AND")),u&&("price_desc"===u?(p.set("orderby","price"),p.set("order","DESC")):"price_asc"===u?(p.set("orderby","price"),p.set("order","ASC")):"date"===u?(p.set("orderby","date"),p.set("order","DESC")):p.set("orderby",u)),t){case"woocommerce/product-best-sellers":p.set("best_selling","1");break;case"woocommerce/product-top-rated":p.set("orderby","rating");break;case"woocommerce/product-on-sale":p.set("on_sale","1");break;case"woocommerce/product-new":p.set("orderby","date"),p.set("order","DESC");break;case"woocommerce/handpicked-products":if(!l.length)return"";p.set("ids",l.join(",")),p.set("limit",l.length);break;case"woocommerce/product-category":if(!c||!c.length)return"";break;case"woocommerce/products-by-attribute":if(!r||!r.length)return""}var g="[products",f=!0,O=!1,h=void 0;try{for(var m,w=p[Symbol.iterator]();!(f=(m=w.next()).done);f=!0){var y=s()(m.value,2);g+=" "+y[0]+'="'+y[1]+'"'}}catch(e){O=!0,h=e}finally{try{f||null==w.return||w.return()}finally{if(O)throw h}}return g+="]"}(t,e))}}},46:function(e,t){!function(){e.exports=this.wp.viewport}()},5:function(e,t){!function(){e.exports=this.wc["wc-block-settings"]}()},50:function(e,t){!function(){e.exports=this.wp.hooks}()},52:function(e,t){!function(){e.exports=this.wp.htmlEntities}()},53:function(e,t){!function(){e.exports=this.wp.date}()},530:function(e,t,o){var r=o(531);"string"==typeof r&&(r=[[e.i,r,""]]);var n={insert:"head",singleton:!1};o(34)(r,n);r.locals&&(e.exports=r.locals)},531:function(e,t,o){},55:function(e,t,o){"use strict";var r=o(0),n=o(1),c=o(3);o(2);t.a=function(e){var t=e.value,o=e.setAttributes;return Object(r.createElement)(c.SelectControl,{label:Object(n.__)("Order products by","woo-gutenberg-products-block"),value:t,options:[{label:Object(n.__)("Newness - newest first","woo-gutenberg-products-block"),value:"date"},{label:Object(n.__)("Price - low to high","woo-gutenberg-products-block"),value:"price_asc"},{label:Object(n.__)("Price - high to low","woo-gutenberg-products-block"),value:"price_desc"},{label:Object(n.__)("Rating - highest first","woo-gutenberg-products-block"),value:"rating"},{label:Object(n.__)("Sales - most first","woo-gutenberg-products-block"),value:"popularity"},{label:Object(n.__)("Title - alphabetical","woo-gutenberg-products-block"),value:"title"},{label:Object(n.__)("Menu Order","woo-gutenberg-products-block"),value:"menu_order"}],onChange:function(e){return o({orderby:e})}})}},571:function(e,t,o){"use strict";o.r(t);var r=o(19),n=o.n(r),c=o(0),i=o(1),s=o(22),a=o(4),u=(o(530),o(7)),l=o.n(u),b=o(8),d=o.n(b),p=o(9),g=o.n(p),f=o(10),O=o.n(f),h=o(14),m=o.n(h),w=o(11),y=o.n(w),j=o(17),_=o(3),v=(o(2),o(36)),k=o(44),C=o(40),E=o(55);function P(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),o.push.apply(o,r)}return o}function S(e){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?P(o,!0).forEach((function(t){n()(e,t,o[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):P(o).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(o,t))}))}return e}var A=function(e){function t(){var e,o;l()(this,t);for(var r=arguments.length,c=new Array(r),i=0;i<r;i++)c[i]=arguments[i];return o=g()(this,(e=O()(t)).call.apply(e,[this].concat(c))),n()(m()(o),"state",{changedAttributes:{},isEditing:!1}),n()(m()(o),"startEditing",(function(){o.setState({isEditing:!0,changedAttributes:{}})})),n()(m()(o),"stopEditing",(function(){o.setState({isEditing:!1,changedAttributes:{}})})),n()(m()(o),"setChangedAttributes",(function(e){o.setState((function(t){return{changedAttributes:S({},t.changedAttributes,{},e)}}))})),n()(m()(o),"save",(function(){var e=o.state.changedAttributes;(0,o.props.setAttributes)(e),o.stopEditing()})),o}return y()(t,e),d()(t,[{key:"componentDidMount",value:function(){this.props.attributes.categories.length||this.setState({isEditing:!0})}},{key:"getInspectorControls",value:function(){var e=this,t=this.props,o=t.attributes,r=t.setAttributes,n=this.state.isEditing,s=o.columns,a=o.catOperator,u=o.contentVisibility,l=o.orderby,b=o.rows,d=o.alignButtons;return Object(c.createElement)(j.InspectorControls,{key:"inspector"},Object(c.createElement)(_.PanelBody,{title:Object(i.__)("Product Category","woo-gutenberg-products-block"),initialOpen:!o.categories.length&&!n},Object(c.createElement)(C.a,{selected:o.categories,onChange:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],o=t.map((function(e){return e.id})),n={categories:o};r(n),e.setChangedAttributes(n)},operator:a,onOperatorChange:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"any",o={catOperator:t};r(o),e.setChangedAttributes(o)}})),Object(c.createElement)(_.PanelBody,{title:Object(i.__)("Layout","woo-gutenberg-products-block"),initialOpen:!0},Object(c.createElement)(k.a,{columns:s,rows:b,alignButtons:d,setAttributes:r})),Object(c.createElement)(_.PanelBody,{title:Object(i.__)("Content","woo-gutenberg-products-block"),initialOpen:!0},Object(c.createElement)(v.a,{settings:u,onChange:function(e){return r({contentVisibility:e})}})),Object(c.createElement)(_.PanelBody,{title:Object(i.__)("Order By","woo-gutenberg-products-block"),initialOpen:!1},Object(c.createElement)(E.a,{setAttributes:r,value:l})))}},{key:"renderEditMode",value:function(){var e=this,t=this.props,o=t.attributes,r=t.debouncedSpeak,n=S({},o,{},this.state.changedAttributes);return Object(c.createElement)(_.Placeholder,{icon:"category",label:Object(i.__)("Products by Category","woo-gutenberg-products-block"),className:"wc-block-products-grid wc-block-products-category"},Object(i.__)("Display a grid of products from your selected categories.","woo-gutenberg-products-block"),Object(c.createElement)("div",{className:"wc-block-products-category__selection"},Object(c.createElement)(C.a,{selected:n.categories,onChange:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],o=t.map((function(e){return e.id}));e.setChangedAttributes({categories:o})},operator:n.catOperator,onOperatorChange:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"any";return e.setChangedAttributes({catOperator:t})}}),Object(c.createElement)(_.Button,{isDefault:!0,onClick:function(){e.save(),r(Object(i.__)("Showing Products by Category block preview.","woo-gutenberg-products-block"))}},Object(i.__)("Done","woo-gutenberg-products-block")),Object(c.createElement)(_.Button,{className:"wc-block-products-category__cancel-button",isTertiary:!0,onClick:function(){e.stopEditing(),r(Object(i.__)("Showing Products by Category block preview.","woo-gutenberg-products-block"))}},Object(i.__)("Cancel","woo-gutenberg-products-block"))))}},{key:"renderViewMode",value:function(){var e=this.props,t=e.attributes,o=e.name,r=t.categories.length;return Object(c.createElement)(_.Disabled,null,r?Object(c.createElement)(j.ServerSideRender,{block:o,attributes:t}):Object(i.__)("Select at least one category to display its products.","woo-gutenberg-products-block"))}},{key:"render",value:function(){var e=this,t=this.state.isEditing;return Object(c.createElement)(c.Fragment,null,Object(c.createElement)(j.BlockControls,null,Object(c.createElement)(_.Toolbar,{controls:[{icon:"edit",title:Object(i.__)("Edit"),onClick:function(){return t?e.stopEditing():e.startEditing()},isActive:t}]})),this.getInspectorControls(),t?this.renderEditMode():this.renderViewMode())}}]),t}(c.Component),M=Object(_.withSpokenMessages)(A),D=o(45),x=o(35);function N(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),o.push.apply(o,r)}return o}function B(e){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?N(o,!0).forEach((function(t){n()(e,t,o[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):N(o).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(o,t))}))}return e}Object(s.registerBlockType)("woocommerce/product-category",{title:Object(i.__)("Products by Category","woo-gutenberg-products-block"),icon:{src:"category",foreground:"#96588a"},category:"woocommerce",keywords:[Object(i.__)("WooCommerce","woo-gutenberg-products-block")],description:Object(i.__)("Display a grid of products from your selected categories.","woo-gutenberg-products-block"),supports:{align:["wide","full"],html:!1},attributes:B({},x.a,{editMode:{type:"boolean",default:!0},orderby:{type:"string",default:"date"}}),transforms:{from:[{type:"block",blocks:Object(a.without)(x.b,"woocommerce/product-category"),transform:function(e){return Object(s.createBlock)("woocommerce/product-category",B({},e,{editMode:!1}))}}]},deprecated:[{attributes:B({},x.a,{editMode:{type:"boolean",default:!0},orderby:{type:"string",default:"date"}}),save:Object(D.a)("woocommerce/product-category")}],edit:function(e){return Object(c.createElement)(M,e)},save:function(){return null}})},59:function(e,t){!function(){e.exports=this.wp.dom}()},62:function(e,t){},63:function(e,t){},64:function(e,t){},66:function(e,t){},67:function(e,t){}});
|
build/product-new.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
this.wc=this.wc||{},this.wc.blocks=this.wc.blocks||{},this.wc.blocks["product-new"]=function(e){function t(t){for(var r,i,a=t[0],l=t[1],s=t[2],b=0,p=[];b<a.length;b++)i=a[b],Object.prototype.hasOwnProperty.call(o,i)&&o[i]&&p.push(o[i][0]),o[i]=0;for(r in l)Object.prototype.hasOwnProperty.call(l,r)&&(e[r]=l[r]);for(u&&u(t);p.length;)p.shift()();return c.push.apply(c,s||[]),n()}function n(){for(var e,t=0;t<c.length;t++){for(var n=c[t],r=!0,a=1;a<n.length;a++){var l=n[a];0!==o[l]&&(r=!1)}r&&(c.splice(t--,1),e=i(i.s=n[0]))}return e}var r={},o={11:0},c=[];function i(t){if(r[t])return r[t].exports;var n=r[t]={i:t,l:!1,exports:{}};return e[t].call(n.exports,n,n.exports,i),n.l=!0,n.exports}i.m=e,i.c=r,i.d=function(e,t,n){i.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},i.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},i.t=function(e,t){if(1&t&&(e=i(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(i.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)i.d(n,r,function(t){return e[t]}.bind(null,r));return n},i.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return i.d(t,"a",t),t},i.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},i.p="";var a=window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[],l=a.push.bind(a);a.push=t,a=a.slice();for(var s=0;s<a.length;s++)t(a[s]);var u=l;return c.push([556,1,0]),n()}({0:function(e,t){!function(){e.exports=this.wp.element}()},1:function(e,t){!function(){e.exports=this.wp.i18n}()},13:function(e,t){!function(){e.exports=this.React}()},14:function(e,t){!function(){e.exports=this.moment}()},17:function(e,t){!function(){e.exports=this.wp.apiFetch}()},18:function(e,t){!function(){e.exports=this.wp.editor}()},19:function(e,t){!function(){e.exports=this.wp.url}()},2:function(e,t){!function(){e.exports=this.wp.components}()},21:function(e,t){!function(){e.exports=this.wp.compose}()},23:function(e,t){!function(){e.exports=this.wp.blocks}()},24:function(e,t,n){"use strict";var r=n(0),o=n(2),c=function(e){var t=e.className,n=e.fillColor;return Object(r.createElement)(o.Icon,{className:t,icon:Object(r.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 22.41"},Object(r.createElement)("g",null,Object(r.createElement)("g",null,Object(r.createElement)("path",{fill:n,d:"M16.55 0H1.75C.56 0 0 .52 0 1.68v9.24c0 1.15.56 1.92 1.75 1.92H2V4.76a2.51 2.51 0 0 1 2.74-2.68H18v-.4A1.51 1.51 0 0 0 16.55 0z"}),Object(r.createElement)("path",{fill:n,d:"M19.54 3.11H4.74C3.55 3.11 3 3.64 3 4.79V14c0 1.19.55 2 1.74 2H5V7.88A2.51 2.51 0 0 1 7.73 5.2H21v-.41a1.51 1.51 0 0 0-1.46-1.68z"}),Object(r.createElement)("path",{fill:n,d:"M22.53 6.23H7.73C6.54 6.23 6 6.75 6 7.91v9.24c0 1.15.56 1.92 1.75 1.92h7a.59.59 0 0 1 .32.11l1.61 1.15 2.83 2a.31.31 0 0 0 .18.05.3.3 0 0 0 .31-.3v-2.73a.3.3 0 0 1 .28-.28h2.31A1.47 1.47 0 0 0 24 17.6V7.91a1.52 1.52 0 0 0-1.47-1.68z"}),Object(r.createElement)("path",{fill:"#ffffff",d:"M10.2 10.92l1.06-2.14 1.05 2.14 2.37.35-1.71 1.66.4 2.36-2.11-1.11-.17.09-.52.27-.51.26-.92.49.18-1.02.09-.57.1-.56.03-.21-1.71-1.66 2.37-.35zM21.46 14.25h-4.4a.69.69 0 0 1-.69-.69.68.68 0 0 1 .69-.68h4.4a.68.68 0 0 1 .69.68.69.69 0 0 1-.69.69zM21.46 11.19h-4.4a.69.69 0 1 1 0-1.37h4.4a.69.69 0 1 1 0 1.37z"}))))})},i=function(){return Object(r.createElement)(o.Icon,{icon:Object(r.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},Object(r.createElement)("path",{fillRule:"nonzero",d:"M21.913 7.0946H2.0254c-1.1708 0-2.0984.9908-2.0205 2.16l.741 11.0724c.0714 1.0638.9552 1.8892 2.0206 1.8892h18.4054c1.0654 0 1.9492-.8254 2.0205-1.8892l.7411-11.0724c.0779-1.1692-.8497-2.16-2.0205-2.16zm-8.8006-4.6573h5.987c1.119 0 2.0255.9065 2.0255 2.0254v.934H2.8103V2.0255C2.8103.9064 3.7168 0 4.8357 0h6.2513c1.119 0 2.0254.9065 2.0254 2.0254v.4119zm-7.0589 11.619a.926.926 0 1 1 0-1.852h11.8297a.926.926 0 1 1 0 1.852H6.0535z"}))})},a=function(){return Object(r.createElement)(o.Icon,{icon:Object(r.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},Object(r.createElement)("path",{d:"M22 7.5H2c-1.2 0-2.1 1-2 2.2l.7 11.1c.1 1.1 1 1.9 2 1.9h18.5c1.1 0 2-.8 2-1.9L24 9.6c.1-1.1-.9-2.1-2-2.1zM13.1 2.8v-.4c0-1.1-.9-2-2-2H4.8c-1.1 0-2 .9-2 2v3.4h18.4v-1c0-1.1-.9-2-2-2h-6.1z"}),Object(r.createElement)("path",{fill:"#fff",d:"M14.4 18.7L12 17.4l-2.4 1.3.5-2.6-1.9-1.9 2.6-.4 1.2-2.4 1.2 2.4 2.6.4-1.9 1.9z"}))})},l=function(){return Object(r.createElement)(o.Icon,{className:"material-icon",icon:Object(r.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},Object(r.createElement)("path",{d:"M0 0h24v24H0z",fill:"none"}),Object(r.createElement)("path",{d:"M23 12l-2.44-2.78.34-3.68-3.61-.82-1.89-3.18L12 3 8.6 1.54 6.71 4.72l-3.61.81.34 3.68L1 12l2.44 2.78-.34 3.69 3.61.82 1.89 3.18L12 21l3.4 1.46 1.89-3.18 3.61-.82-.34-3.68L23 12zm-10 5h-2v-2h2v2zm0-4h-2V7h2v6z"}))})},s=function(){return Object(r.createElement)(o.Icon,{icon:Object(r.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},Object(r.createElement)("path",{fill:"#1E8CBE",d:"M12 7c-2.76 0-5 2.24-5 5s2.24 5 5 5 5-2.24 5-5-2.24-5-5-5zm0-5C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"}))})},u=function(){return Object(r.createElement)(o.Icon,{icon:Object(r.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},Object(r.createElement)("path",{fill:"#6C7781",d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"}))})},b=function(e){var t=e.className,n=e.fillColor;return Object(r.createElement)(o.Icon,{className:t,icon:Object(r.createElement)("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},Object(r.createElement)("path",{fill:n,d:"M2.3,17.3h9.3c0.1,0,0.3,0,0.4,0.1l5.9,4.2c0.3,0.2,0.7,0,0.7-0.3v-3.7c0-0.2,0.2-0.4,0.4-0.4H22 c1.1,0,2-0.9,2-2V2.5c0-1.2-0.7-2.2-2-2.2H2.3C0.7,0.2,0,0.9,0,2.5v12.3C0,16.3,0.7,17.3,2.3,17.3z"}),Object(r.createElement)("polygon",{fill:"#ffffff",points:"8.8,12.1 6.5,10.9 4.1,12.1 4.5,9.5 2.6,7.6 5.3,7.2 6.5,4.8 7.6,7.2 10.3,7.6 8.4,9.5"}),Object(r.createElement)("path",{fill:"#ffffff",d:"M20.7,7.9h-7c-0.5,0-0.9-0.4-0.9-0.9S13.2,6,13.7,6h7c0.5,0,0.9,0.4,0.9,0.9S21.2,7.9,20.7,7.9z"}),Object(r.createElement)("path",{fill:"#ffffff",d:"M20.7,11.5h-7c-0.5,0-0.9-0.4-0.9-0.9s0.4-0.9,0.9-0.9h7c0.5,0,0.9,0.4,0.9,0.9S21.2,11.5,20.7,11.5z"}))})},p=function(e){var t=e.className,n=e.fillColor;return Object(r.createElement)(o.Icon,{className:t,icon:Object(r.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 23"},Object(r.createElement)("path",{fill:n,d:"M21.9943 7.0957H2.00638C0.807102 7.0957 -0.0923543 8.0951 0.0075853 9.29437L0.707162 20.3877C0.807102 21.487 1.70656 22.2865 2.70595 22.2865H21.1948C22.2941 22.2865 23.1936 21.487 23.1936 20.3877L23.9931 9.29437C24.093 8.0951 23.0936 7.0957 21.9943 7.0957Z"}),Object(r.createElement)("path",{fill:n,d:"M13.0921 2.39855V1.99879C13.0921 0.899456 12.1926 0 11.0933 0H4.7971C3.69777 0 2.79831 0.899456 2.79831 1.99879V5.39674H21.1872V4.49728C21.1872 3.39795 20.2877 2.49849 19.1884 2.49849H13.0921V2.39855Z"}),Object(r.createElement)("path",{fill:"white",d:"M8.63115 17.126L6.5415 15.9449L4.361 17.126L4.72442 14.6729L2.99819 13.0376L5.45125 12.6742L6.5415 10.4937L7.5409 12.6742L9.99396 13.0376L8.26773 14.6729L8.63115 17.126Z"}),Object(r.createElement)("path",{fill:"white",d:"M19.1907 13.5918H12.9899C12.547 13.5918 12.1926 13.1921 12.1926 12.6924C12.1926 12.1927 12.547 11.7929 12.9899 11.7929H19.1907C19.6336 11.7929 19.9879 12.1927 19.9879 12.6924C19.9879 13.1921 19.6336 13.5918 19.1907 13.5918Z"}),Object(r.createElement)("path",{fill:"white",d:"M19.1907 17.1897H12.9899C12.547 17.1897 12.1926 16.7899 12.1926 16.2902C12.1926 15.7905 12.547 15.3907 12.9899 15.3907H19.1907C19.6336 15.3907 19.9879 15.7905 19.9879 16.2902C19.9879 16.7899 19.6336 17.1897 19.1907 17.1897Z"}))})},d=function(){return Object(r.createElement)(o.Icon,{className:"material-icon",icon:Object(r.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},Object(r.createElement)("path",{d:"M13 13v8h8v-8h-8zM3 21h8v-8H3v8zM3 3v8h8V3H3zm13.66-1.31L11 7.34 16.66 13l5.66-5.66-5.66-5.65z"}),Object(r.createElement)("path",{d:"M0 0h24v24H0z",fill:"none"}))})},g=n(6),f=n.n(g),h=(n(7),function(e){var t=e.size,n=void 0===t?20:t,c=e.className;return Object(r.createElement)(o.Icon,{className:f()("woo-icon",c),icon:Object(r.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",height:n,width:Math.floor(1.67*n),viewBox:"0 0 245 145"},Object(r.createElement)("path",{fill:"#96588A",d:"M22.76 0h199.1a22.77 22.77 0 0 1 22.8 22.76v75.92a22.77 22.77 0 0 1-22.78 22.78h-71.41l9.77 24-43.13-24H22.76C10.1946 121.449.011 111.2654 0 98.7V22.76C.011 10.1946 10.1946.011 22.76 0z"}),Object(r.createElement)("path",{fill:"#FFF",fillRule:"nonzero",d:"M12.32 20.63a8.16 8.16 0 0 1 6.25-3.09c5.0733-.36 7.9867 2.0333 8.74 7.18 3.14 20.86 6.4933 38.5633 10.06 53.11l21.92-41.69c2-3.76 4.49-5.76 7.52-6 4.3867-.3067 7.13 2.49 8.23 8.39a186 186 0 0 0 9.47 34.23c2.62-25.38 7.0133-43.7133 13.18-55a7.73 7.73 0 0 1 6.6-4.43 8.8 8.8 0 0 1 6.32 2 7.75 7.75 0 0 1 3.05 5.74 8.52 8.52 0 0 1-1 4.77c-3.9 7.24-7.12 19.28-9.66 36.12-2.48 16.2533-3.3967 28.9633-2.75 38.13a12.25 12.25 0 0 1-1.16 6.56 6.32 6.32 0 0 1-5.33 3.53c-2.6667.18-5.3033-1.0567-7.91-3.71-9.2933-9.54-16.6567-23.7267-22.09-42.56C57.3 76.7167 52.48 86.3333 49.3 92.76c-5.86 11.3333-10.89 17.13-15.09 17.39-2.7333.1933-5.0667-2.0933-7-6.86-5.1-13.0933-10.5833-38.4033-16.45-75.93a8.56 8.56 0 0 1 1.56-6.73zM227.23 36.34a23.17 23.17 0 0 0-16-11.59 26.25 26.25 0 0 0-5.42-.58c-9.5867 0-17.41 5-23.47 15a53 53 0 0 0-7.78 28.16c0 7.7333 1.6167 14.3333 4.85 19.8a23.15 23.15 0 0 0 16 11.59 26.28 26.28 0 0 0 5.42.59c9.68 0 17.5033-5 23.47-15A53.89 53.89 0 0 0 232.08 56c0-7.7333-1.6167-14.2867-4.85-19.66zm-12.61 27.72c-1.3733 6.56-3.9167 11.5-7.63 14.82-2.9267 2.6667-5.6133 3.7433-8.06 3.23-2.4467-.5133-4.4033-2.6667-5.87-6.46a25.68 25.68 0 0 1-1.76-9.09 35.9 35.9 0 0 1 .73-7.34 33 33 0 0 1 5.28-11.88c3.3333-4.8933 6.8067-6.9467 10.42-6.16 2.44.4867 4.3933 2.64 5.86 6.46a25.68 25.68 0 0 1 1.76 9.12 35.73 35.73 0 0 1-.73 7.33v-.03zM164.57 36.34a23.2 23.2 0 0 0-16-11.59 26.42 26.42 0 0 0-5.43-.58c-9.5933 0-17.4167 5-23.47 15a53 53 0 0 0-7.78 28.16c0 7.7333 1.6133 14.3333 4.84 19.8a23.19 23.19 0 0 0 16 11.59 26.44 26.44 0 0 0 5.43.59c9.68 0 17.5033-5 23.47-15A53.88 53.88 0 0 0 169.4 56c0-7.7333-1.6133-14.2867-4.84-19.66h.01zm-12.61 27.72c-1.3667 6.56-3.91 11.5-7.63 14.82-2.93 2.64-5.63 3.72-8.07 3.23-2.44-.49-4.4-2.64-5.86-6.46a25.7 25.7 0 0 1-1.77-9.09 35.9 35.9 0 0 1 .74-7.34 33 33 0 0 1 5.28-11.88c3.3333-4.8933 6.8067-6.9467 10.42-6.16 2.44.4867 4.3933 2.64 5.86 6.46a25.91 25.91 0 0 1 1.76 9.12 35.73 35.73 0 0 1-.73 7.33v-.03z"}))})});n.d(t,"a",function(){return c}),n.d(t,"b",function(){return i}),n.d(t,"c",function(){return a}),n.d(t,"d",function(){return l}),n.d(t,"e",function(){return s}),n.d(t,"f",function(){return u}),n.d(t,"h",function(){return b}),n.d(t,"g",function(){return p}),n.d(t,"i",function(){return d}),n.d(t,"j",function(){return h})},33:function(e,t){!function(){e.exports=this.wp.keycodes}()},36:function(e,t,n){"use strict";n.d(t,"b",function(){return o});var r=n(5),o=["woocommerce/product-best-sellers","woocommerce/product-category","woocommerce/product-new","woocommerce/product-on-sale","woocommerce/product-top-rated"];t.a={columns:{type:"number",default:r.DEFAULT_COLUMNS},rows:{type:"number",default:r.DEFAULT_ROWS},alignButtons:{type:"boolean",default:!1},categories:{type:"array",default:[]},catOperator:{type:"string",default:"any"},contentVisibility:{type:"object",default:{title:!0,price:!0,rating:!0,button:!0}}}},37:function(e,t,n){"use strict";var r=n(20),o=n.n(r),c=n(0),i=n(1),a=(n(7),n(2));function l(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function s(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?l(n,!0).forEach(function(t){o()(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):l(n).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}t.a=function(e){var t=e.onChange,n=e.settings,r=n.button,o=n.price,l=n.rating,u=n.title;return Object(c.createElement)(c.Fragment,null,Object(c.createElement)(a.ToggleControl,{label:Object(i.__)("Product title","woo-gutenberg-products-block"),help:u?Object(i.__)("Product title is visible.","woo-gutenberg-products-block"):Object(i.__)("Product title is hidden.","woo-gutenberg-products-block"),checked:u,onChange:function(){return t(s({},n,{title:!u}))}}),Object(c.createElement)(a.ToggleControl,{label:Object(i.__)("Product price","woo-gutenberg-products-block"),help:o?Object(i.__)("Product price is visible.","woo-gutenberg-products-block"):Object(i.__)("Product price is hidden.","woo-gutenberg-products-block"),checked:o,onChange:function(){return t(s({},n,{price:!o}))}}),Object(c.createElement)(a.ToggleControl,{label:Object(i.__)("Product rating","woo-gutenberg-products-block"),help:l?Object(i.__)("Product rating is visible.","woo-gutenberg-products-block"):Object(i.__)("Product rating is hidden.","woo-gutenberg-products-block"),checked:l,onChange:function(){return t(s({},n,{rating:!l}))}}),Object(c.createElement)(a.ToggleControl,{label:Object(i.__)("Add to Cart button","woo-gutenberg-products-block"),help:r?Object(i.__)("Add to Cart button is visible.","woo-gutenberg-products-block"):Object(i.__)("Add to Cart button is hidden.","woo-gutenberg-products-block"),checked:r,onChange:function(){return t(s({},n,{button:!r}))}}))}},4:function(e,t){!function(){e.exports=this.lodash}()},41:function(e,t,n){"use strict";var r=n(16),o=n.n(r),c=n(8),i=n.n(c),a=n(9),l=n.n(a),s=n(10),u=n.n(s),b=n(11),p=n.n(b),d=n(15),g=n.n(d),f=n(12),h=n.n(f),m=n(0),w=n(1),O=n(19),j=n(17),v=n.n(j),y=n(4),_=(n(7),n(26)),E=n(2),C=n(5),k=(n(86),function(e){function t(){var e;return i()(this,t),(e=u()(this,p()(t).apply(this,arguments))).state={list:[],loading:!0},e.renderItem=e.renderItem.bind(g()(e)),e}return h()(t,e),l()(t,[{key:"componentDidMount",value:function(){var e=this;v()({path:Object(O.addQueryArgs)("".concat(C.ENDPOINTS.products,"/categories"),{per_page:-1})}).then(function(t){e.setState({list:t,loading:!1})}).catch(function(){e.setState({list:[],loading:!1})})}},{key:"renderItem",value:function(e){var t=e.item,n=e.search,r=e.depth,c=void 0===r?0:r,i=["woocommerce-product-categories__item"];n.length&&i.push("is-searching"),0===c&&0!==t.parent&&i.push("is-skip-level");var a=t.breadcrumbs.length?"".concat(t.breadcrumbs.join(", "),", ").concat(t.name):t.name;return Object(m.createElement)(_.b,o()({className:i.join(" ")},e,{showCount:!0,"aria-label":Object(w.sprintf)(Object(w._n)("%s, has %d product","%s, has %d products",t.count,"woo-gutenberg-products-block"),a,t.count)}))}},{key:"render",value:function(){var e=this.state,t=e.list,n=e.loading,r=this.props,o=r.onChange,c=r.onOperatorChange,i=r.operator,a=r.selected,l=r.isSingle,s={clear:Object(w.__)("Clear all product categories","woo-gutenberg-products-block"),list:Object(w.__)("Product Categories","woo-gutenberg-products-block"),noItems:Object(w.__)("Your store doesn't have any product categories.","woo-gutenberg-products-block"),search:Object(w.__)("Search for product categories","woo-gutenberg-products-block"),selected:function(e){return Object(w.sprintf)(Object(w._n)("%d category selected","%d categories selected",e,"woo-gutenberg-products-block"),e)},updated:Object(w.__)("Category search results updated.","woo-gutenberg-products-block")};return Object(m.createElement)(m.Fragment,null,Object(m.createElement)(_.a,{className:"woocommerce-product-categories",list:t,isLoading:n,selected:a.map(function(e){return Object(y.find)(t,{id:e})}).filter(Boolean),onChange:o,renderItem:this.renderItem,messages:s,isHierarchical:!0,isSingle:l}),!!c&&Object(m.createElement)("div",{className:a.length<2?"screen-reader-text":""},Object(m.createElement)(E.SelectControl,{className:"woocommerce-product-categories__operator",label:Object(w.__)("Display products matching","woo-gutenberg-products-block"),help:Object(w.__)("Pick at least two categories to use this setting.","woo-gutenberg-products-block"),value:i,onChange:c,options:[{label:Object(w.__)("Any selected categories","woo-gutenberg-products-block"),value:"any"},{label:Object(w.__)("All selected categories","woo-gutenberg-products-block"),value:"all"}]})))}}]),t}(m.Component));k.defaultProps={operator:"any",isSingle:!1},t.a=k},44:function(e,t){!function(){e.exports=this.ReactDOM}()},45:function(e,t,n){"use strict";var r=n(0),o=n(1),c=n(4),i=(n(7),n(2)),a=n(5);t.a=function(e){var t=e.columns,n=e.rows,l=e.setAttributes,s=e.alignButtons;return Object(r.createElement)(r.Fragment,null,Object(r.createElement)(i.RangeControl,{label:Object(o.__)("Columns","woo-gutenberg-products-block"),value:t,onChange:function(e){var t=Object(c.clamp)(e,a.MIN_COLUMNS,a.MAX_COLUMNS);l({columns:Object(c.isNaN)(t)?"":t})},min:a.MIN_COLUMNS,max:a.MAX_COLUMNS}),Object(r.createElement)(i.RangeControl,{label:Object(o.__)("Rows","woo-gutenberg-products-block"),value:n,onChange:function(e){var t=Object(c.clamp)(e,a.MIN_ROWS,a.MAX_ROWS);l({rows:Object(c.isNaN)(t)?"":t})},min:a.MIN_ROWS,max:a.MAX_ROWS}),Object(r.createElement)(i.ToggleControl,{label:Object(o.__)("Align Add to Cart buttons","woo-gutenberg-products-block"),help:s?Object(o.__)("Buttons are aligned vertically.","woo-gutenberg-products-block"):Object(o.__)("Buttons follow content.","woo-gutenberg-products-block"),checked:s,onChange:function(){return l({alignButtons:!s})}}))}},46:function(e,t,n){"use strict";var r=n(0),o=n(6),c=n.n(o),i=n(58),a=n.n(i),l=n(5);n.d(t,"a",function(){return s});var s=function(e){return function(t){var n=t.attributes,o=n.align,i=n.contentVisibility,s=c()(o?"align".concat(o):"",{"is-hidden-title":!i.title,"is-hidden-price":!i.price,"is-hidden-rating":!i.rating,"is-hidden-button":!i.button});return Object(r.createElement)(r.RawHTML,{className:s},function(e,t){var n=e.attributes,r=n.attributes,o=n.attrOperator,c=n.categories,i=n.catOperator,s=n.orderby,u=n.products,b=n.columns||l.DEFAULT_COLUMNS,p=n.rows||l.DEFAULT_ROWS,d=new Map;switch(d.set("limit",p*b),d.set("columns",b),c&&c.length&&(d.set("category",c.join(",")),i&&"all"===i&&d.set("cat_operator","AND")),r&&r.length&&(d.set("terms",r.map(function(e){return e.id}).join(",")),d.set("attribute",r[0].attr_slug),o&&"all"===o&&d.set("terms_operator","AND")),s&&("price_desc"===s?(d.set("orderby","price"),d.set("order","DESC")):"price_asc"===s?(d.set("orderby","price"),d.set("order","ASC")):"date"===s?(d.set("orderby","date"),d.set("order","DESC")):d.set("orderby",s)),t){case"woocommerce/product-best-sellers":d.set("best_selling","1");break;case"woocommerce/product-top-rated":d.set("orderby","rating");break;case"woocommerce/product-on-sale":d.set("on_sale","1");break;case"woocommerce/product-new":d.set("orderby","date"),d.set("order","DESC");break;case"woocommerce/handpicked-products":if(!u.length)return"";d.set("ids",u.join(",")),d.set("limit",u.length);break;case"woocommerce/product-category":if(!c||!c.length)return"";break;case"woocommerce/products-by-attribute":if(!r||!r.length)return""}var g="[products",f=!0,h=!1,m=void 0;try{for(var w,O=d[Symbol.iterator]();!(f=(w=O.next()).done);f=!0){var j=a()(w.value,2);g+=" "+j[0]+'="'+j[1]+'"'}}catch(e){h=!0,m=e}finally{try{f||null==O.return||O.return()}finally{if(h)throw m}}return g+="]"}(t,e))}}},47:function(e,t){!function(){e.exports=this.wp.viewport}()},5:function(e,t){!function(){e.exports=this.wc["wc-block-settings"]}()},51:function(e,t){!function(){e.exports=this.wp.hooks}()},53:function(e,t){!function(){e.exports=this.wp.htmlEntities}()},54:function(e,t){!function(){e.exports=this.wp.date}()},556:function(e,t,n){"use strict";n.r(t);var r=n(20),o=n.n(r),c=n(0),i=n(1),a=n(23),l=n(4),s=n(8),u=n.n(s),b=n(9),p=n.n(b),d=n(10),g=n.n(d),f=n(11),h=n.n(f),m=n(12),w=n.n(m),O=n(2),j=n(18),v=(n(7),n(37)),y=n(45),_=n(41),E=function(e){function t(){return u()(this,t),g()(this,h()(t).apply(this,arguments))}return w()(t,e),p()(t,[{key:"getInspectorControls",value:function(){var e=this.props,t=e.attributes,n=e.setAttributes,r=t.categories,o=t.catOperator,a=t.columns,l=t.contentVisibility,s=t.rows,u=t.alignButtons;return Object(c.createElement)(j.InspectorControls,{key:"inspector"},Object(c.createElement)(O.PanelBody,{title:Object(i.__)("Layout","woo-gutenberg-products-block"),initialOpen:!0},Object(c.createElement)(y.a,{columns:a,rows:s,alignButtons:u,setAttributes:n})),Object(c.createElement)(O.PanelBody,{title:Object(i.__)("Content","woo-gutenberg-products-block"),initialOpen:!0},Object(c.createElement)(v.a,{settings:l,onChange:function(e){return n({contentVisibility:e})}})),Object(c.createElement)(O.PanelBody,{title:Object(i.__)("Filter by Product Category","woo-gutenberg-products-block"),initialOpen:!1},Object(c.createElement)(_.a,{selected:r,onChange:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=e.map(function(e){return e.id});n({categories:t})},operator:o,onOperatorChange:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"any";return n({catOperator:e})}})))}},{key:"render",value:function(){var e=this.props,t=e.attributes,n=e.name;return Object(c.createElement)(c.Fragment,null,this.getInspectorControls(),Object(c.createElement)(O.Disabled,null,Object(c.createElement)(j.ServerSideRender,{block:n,attributes:t})))}}]),t}(c.Component),C=n(46),k=n(24),M=n(36);function x(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}Object(a.registerBlockType)("woocommerce/product-new",{title:Object(i.__)("Newest Products","woo-gutenberg-products-block"),icon:{src:Object(c.createElement)(k.d,null),foreground:"#96588a"},category:"woocommerce",keywords:[Object(i.__)("WooCommerce","woo-gutenberg-products-block")],description:Object(i.__)("Display a grid of your newest products.","woo-gutenberg-products-block"),supports:{align:["wide","full"],html:!1},attributes:function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?x(n,!0).forEach(function(t){o()(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):x(n).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}({},M.a),transforms:{from:[{type:"block",blocks:Object(l.without)(M.b,"woocommerce/product-new"),transform:function(e){return Object(a.createBlock)("woocommerce/product-new",e)}}]},deprecated:[{attributes:M.a,save:Object(C.a)("woocommerce/product-new")}],edit:function(e){return Object(c.createElement)(E,e)},save:function(){return null}})},61:function(e,t){!function(){e.exports=this.wp.dom}()},64:function(e,t){},65:function(e,t){},67:function(e,t){},68:function(e,t){}});
|
1 |
+
this.wc=this.wc||{},this.wc.blocks=this.wc.blocks||{},this.wc.blocks["product-new"]=function(e){function t(t){for(var r,i,a=t[0],l=t[1],s=t[2],b=0,p=[];b<a.length;b++)i=a[b],Object.prototype.hasOwnProperty.call(o,i)&&o[i]&&p.push(o[i][0]),o[i]=0;for(r in l)Object.prototype.hasOwnProperty.call(l,r)&&(e[r]=l[r]);for(u&&u(t);p.length;)p.shift()();return c.push.apply(c,s||[]),n()}function n(){for(var e,t=0;t<c.length;t++){for(var n=c[t],r=!0,a=1;a<n.length;a++){var l=n[a];0!==o[l]&&(r=!1)}r&&(c.splice(t--,1),e=i(i.s=n[0]))}return e}var r={},o={11:0},c=[];function i(t){if(r[t])return r[t].exports;var n=r[t]={i:t,l:!1,exports:{}};return e[t].call(n.exports,n,n.exports,i),n.l=!0,n.exports}i.m=e,i.c=r,i.d=function(e,t,n){i.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},i.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},i.t=function(e,t){if(1&t&&(e=i(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(i.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)i.d(n,r,function(t){return e[t]}.bind(null,r));return n},i.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return i.d(t,"a",t),t},i.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},i.p="";var a=window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[],l=a.push.bind(a);a.push=t,a=a.slice();for(var s=0;s<a.length;s++)t(a[s]);var u=l;return c.push([570,1,0]),n()}({0:function(e,t){!function(){e.exports=this.wp.element}()},1:function(e,t){!function(){e.exports=this.wp.i18n}()},12:function(e,t){!function(){e.exports=this.React}()},13:function(e,t){!function(){e.exports=this.moment}()},16:function(e,t){!function(){e.exports=this.wp.apiFetch}()},17:function(e,t){!function(){e.exports=this.wp.editor}()},18:function(e,t){!function(){e.exports=this.wp.url}()},20:function(e,t){!function(){e.exports=this.wp.compose}()},22:function(e,t){!function(){e.exports=this.wp.blocks}()},23:function(e,t,n){"use strict";var r=n(0),o=n(3),c=function(e){var t=e.className,n=e.fillColor;return Object(r.createElement)(o.Icon,{className:t,icon:Object(r.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 22.41"},Object(r.createElement)("g",null,Object(r.createElement)("g",null,Object(r.createElement)("path",{fill:n,d:"M16.55 0H1.75C.56 0 0 .52 0 1.68v9.24c0 1.15.56 1.92 1.75 1.92H2V4.76a2.51 2.51 0 0 1 2.74-2.68H18v-.4A1.51 1.51 0 0 0 16.55 0z"}),Object(r.createElement)("path",{fill:n,d:"M19.54 3.11H4.74C3.55 3.11 3 3.64 3 4.79V14c0 1.19.55 2 1.74 2H5V7.88A2.51 2.51 0 0 1 7.73 5.2H21v-.41a1.51 1.51 0 0 0-1.46-1.68z"}),Object(r.createElement)("path",{fill:n,d:"M22.53 6.23H7.73C6.54 6.23 6 6.75 6 7.91v9.24c0 1.15.56 1.92 1.75 1.92h7a.59.59 0 0 1 .32.11l1.61 1.15 2.83 2a.31.31 0 0 0 .18.05.3.3 0 0 0 .31-.3v-2.73a.3.3 0 0 1 .28-.28h2.31A1.47 1.47 0 0 0 24 17.6V7.91a1.52 1.52 0 0 0-1.47-1.68z"}),Object(r.createElement)("path",{fill:"#ffffff",d:"M10.2 10.92l1.06-2.14 1.05 2.14 2.37.35-1.71 1.66.4 2.36-2.11-1.11-.17.09-.52.27-.51.26-.92.49.18-1.02.09-.57.1-.56.03-.21-1.71-1.66 2.37-.35zM21.46 14.25h-4.4a.69.69 0 0 1-.69-.69.68.68 0 0 1 .69-.68h4.4a.68.68 0 0 1 .69.68.69.69 0 0 1-.69.69zM21.46 11.19h-4.4a.69.69 0 1 1 0-1.37h4.4a.69.69 0 1 1 0 1.37z"}))))})},i=function(){return Object(r.createElement)(o.Icon,{icon:Object(r.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},Object(r.createElement)("path",{fillRule:"nonzero",d:"M21.913 7.0946H2.0254c-1.1708 0-2.0984.9908-2.0205 2.16l.741 11.0724c.0714 1.0638.9552 1.8892 2.0206 1.8892h18.4054c1.0654 0 1.9492-.8254 2.0205-1.8892l.7411-11.0724c.0779-1.1692-.8497-2.16-2.0205-2.16zm-8.8006-4.6573h5.987c1.119 0 2.0255.9065 2.0255 2.0254v.934H2.8103V2.0255C2.8103.9064 3.7168 0 4.8357 0h6.2513c1.119 0 2.0254.9065 2.0254 2.0254v.4119zm-7.0589 11.619a.926.926 0 1 1 0-1.852h11.8297a.926.926 0 1 1 0 1.852H6.0535z"}))})},a=function(){return Object(r.createElement)(o.Icon,{icon:Object(r.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},Object(r.createElement)("path",{d:"M22 7.5H2c-1.2 0-2.1 1-2 2.2l.7 11.1c.1 1.1 1 1.9 2 1.9h18.5c1.1 0 2-.8 2-1.9L24 9.6c.1-1.1-.9-2.1-2-2.1zM13.1 2.8v-.4c0-1.1-.9-2-2-2H4.8c-1.1 0-2 .9-2 2v3.4h18.4v-1c0-1.1-.9-2-2-2h-6.1z"}),Object(r.createElement)("path",{fill:"#fff",d:"M14.4 18.7L12 17.4l-2.4 1.3.5-2.6-1.9-1.9 2.6-.4 1.2-2.4 1.2 2.4 2.6.4-1.9 1.9z"}))})},l=function(){return Object(r.createElement)(o.Icon,{className:"material-icon",icon:Object(r.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},Object(r.createElement)("path",{d:"M0 0h24v24H0z",fill:"none"}),Object(r.createElement)("path",{d:"M23 12l-2.44-2.78.34-3.68-3.61-.82-1.89-3.18L12 3 8.6 1.54 6.71 4.72l-3.61.81.34 3.68L1 12l2.44 2.78-.34 3.69 3.61.82 1.89 3.18L12 21l3.4 1.46 1.89-3.18 3.61-.82-.34-3.68L23 12zm-10 5h-2v-2h2v2zm0-4h-2V7h2v6z"}))})},s=function(){return Object(r.createElement)(o.Icon,{icon:Object(r.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},Object(r.createElement)("path",{fill:"#1E8CBE",d:"M12 7c-2.76 0-5 2.24-5 5s2.24 5 5 5 5-2.24 5-5-2.24-5-5-5zm0-5C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"}))})},u=function(){return Object(r.createElement)(o.Icon,{icon:Object(r.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},Object(r.createElement)("path",{fill:"#6C7781",d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"}))})},b=function(e){var t=e.className,n=e.fillColor;return Object(r.createElement)(o.Icon,{className:t,icon:Object(r.createElement)("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},Object(r.createElement)("path",{fill:n,d:"M2.3,17.3h9.3c0.1,0,0.3,0,0.4,0.1l5.9,4.2c0.3,0.2,0.7,0,0.7-0.3v-3.7c0-0.2,0.2-0.4,0.4-0.4H22 c1.1,0,2-0.9,2-2V2.5c0-1.2-0.7-2.2-2-2.2H2.3C0.7,0.2,0,0.9,0,2.5v12.3C0,16.3,0.7,17.3,2.3,17.3z"}),Object(r.createElement)("polygon",{fill:"#ffffff",points:"8.8,12.1 6.5,10.9 4.1,12.1 4.5,9.5 2.6,7.6 5.3,7.2 6.5,4.8 7.6,7.2 10.3,7.6 8.4,9.5"}),Object(r.createElement)("path",{fill:"#ffffff",d:"M20.7,7.9h-7c-0.5,0-0.9-0.4-0.9-0.9S13.2,6,13.7,6h7c0.5,0,0.9,0.4,0.9,0.9S21.2,7.9,20.7,7.9z"}),Object(r.createElement)("path",{fill:"#ffffff",d:"M20.7,11.5h-7c-0.5,0-0.9-0.4-0.9-0.9s0.4-0.9,0.9-0.9h7c0.5,0,0.9,0.4,0.9,0.9S21.2,11.5,20.7,11.5z"}))})},p=function(e){var t=e.className,n=e.fillColor;return Object(r.createElement)(o.Icon,{className:t,icon:Object(r.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 23"},Object(r.createElement)("path",{fill:n,d:"M21.9943 7.0957H2.00638C0.807102 7.0957 -0.0923543 8.0951 0.0075853 9.29437L0.707162 20.3877C0.807102 21.487 1.70656 22.2865 2.70595 22.2865H21.1948C22.2941 22.2865 23.1936 21.487 23.1936 20.3877L23.9931 9.29437C24.093 8.0951 23.0936 7.0957 21.9943 7.0957Z"}),Object(r.createElement)("path",{fill:n,d:"M13.0921 2.39855V1.99879C13.0921 0.899456 12.1926 0 11.0933 0H4.7971C3.69777 0 2.79831 0.899456 2.79831 1.99879V5.39674H21.1872V4.49728C21.1872 3.39795 20.2877 2.49849 19.1884 2.49849H13.0921V2.39855Z"}),Object(r.createElement)("path",{fill:"white",d:"M8.63115 17.126L6.5415 15.9449L4.361 17.126L4.72442 14.6729L2.99819 13.0376L5.45125 12.6742L6.5415 10.4937L7.5409 12.6742L9.99396 13.0376L8.26773 14.6729L8.63115 17.126Z"}),Object(r.createElement)("path",{fill:"white",d:"M19.1907 13.5918H12.9899C12.547 13.5918 12.1926 13.1921 12.1926 12.6924C12.1926 12.1927 12.547 11.7929 12.9899 11.7929H19.1907C19.6336 11.7929 19.9879 12.1927 19.9879 12.6924C19.9879 13.1921 19.6336 13.5918 19.1907 13.5918Z"}),Object(r.createElement)("path",{fill:"white",d:"M19.1907 17.1897H12.9899C12.547 17.1897 12.1926 16.7899 12.1926 16.2902C12.1926 15.7905 12.547 15.3907 12.9899 15.3907H19.1907C19.6336 15.3907 19.9879 15.7905 19.9879 16.2902C19.9879 16.7899 19.6336 17.1897 19.1907 17.1897Z"}))})},d=function(){return Object(r.createElement)(o.Icon,{className:"material-icon",icon:Object(r.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},Object(r.createElement)("path",{d:"M13 13v8h8v-8h-8zM3 21h8v-8H3v8zM3 3v8h8V3H3zm13.66-1.31L11 7.34 16.66 13l5.66-5.66-5.66-5.65z"}),Object(r.createElement)("path",{d:"M0 0h24v24H0z",fill:"none"}))})},f=n(6),g=n.n(f),h=(n(2),function(e){var t=e.size,n=void 0===t?20:t,c=e.className;return Object(r.createElement)(o.Icon,{className:g()("woo-icon",c),icon:Object(r.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",height:n,width:Math.floor(1.67*n),viewBox:"0 0 245 145"},Object(r.createElement)("path",{fill:"#96588A",d:"M22.76 0h199.1a22.77 22.77 0 0 1 22.8 22.76v75.92a22.77 22.77 0 0 1-22.78 22.78h-71.41l9.77 24-43.13-24H22.76C10.1946 121.449.011 111.2654 0 98.7V22.76C.011 10.1946 10.1946.011 22.76 0z"}),Object(r.createElement)("path",{fill:"#FFF",fillRule:"nonzero",d:"M12.32 20.63a8.16 8.16 0 0 1 6.25-3.09c5.0733-.36 7.9867 2.0333 8.74 7.18 3.14 20.86 6.4933 38.5633 10.06 53.11l21.92-41.69c2-3.76 4.49-5.76 7.52-6 4.3867-.3067 7.13 2.49 8.23 8.39a186 186 0 0 0 9.47 34.23c2.62-25.38 7.0133-43.7133 13.18-55a7.73 7.73 0 0 1 6.6-4.43 8.8 8.8 0 0 1 6.32 2 7.75 7.75 0 0 1 3.05 5.74 8.52 8.52 0 0 1-1 4.77c-3.9 7.24-7.12 19.28-9.66 36.12-2.48 16.2533-3.3967 28.9633-2.75 38.13a12.25 12.25 0 0 1-1.16 6.56 6.32 6.32 0 0 1-5.33 3.53c-2.6667.18-5.3033-1.0567-7.91-3.71-9.2933-9.54-16.6567-23.7267-22.09-42.56C57.3 76.7167 52.48 86.3333 49.3 92.76c-5.86 11.3333-10.89 17.13-15.09 17.39-2.7333.1933-5.0667-2.0933-7-6.86-5.1-13.0933-10.5833-38.4033-16.45-75.93a8.56 8.56 0 0 1 1.56-6.73zM227.23 36.34a23.17 23.17 0 0 0-16-11.59 26.25 26.25 0 0 0-5.42-.58c-9.5867 0-17.41 5-23.47 15a53 53 0 0 0-7.78 28.16c0 7.7333 1.6167 14.3333 4.85 19.8a23.15 23.15 0 0 0 16 11.59 26.28 26.28 0 0 0 5.42.59c9.68 0 17.5033-5 23.47-15A53.89 53.89 0 0 0 232.08 56c0-7.7333-1.6167-14.2867-4.85-19.66zm-12.61 27.72c-1.3733 6.56-3.9167 11.5-7.63 14.82-2.9267 2.6667-5.6133 3.7433-8.06 3.23-2.4467-.5133-4.4033-2.6667-5.87-6.46a25.68 25.68 0 0 1-1.76-9.09 35.9 35.9 0 0 1 .73-7.34 33 33 0 0 1 5.28-11.88c3.3333-4.8933 6.8067-6.9467 10.42-6.16 2.44.4867 4.3933 2.64 5.86 6.46a25.68 25.68 0 0 1 1.76 9.12 35.73 35.73 0 0 1-.73 7.33v-.03zM164.57 36.34a23.2 23.2 0 0 0-16-11.59 26.42 26.42 0 0 0-5.43-.58c-9.5933 0-17.4167 5-23.47 15a53 53 0 0 0-7.78 28.16c0 7.7333 1.6133 14.3333 4.84 19.8a23.19 23.19 0 0 0 16 11.59 26.44 26.44 0 0 0 5.43.59c9.68 0 17.5033-5 23.47-15A53.88 53.88 0 0 0 169.4 56c0-7.7333-1.6133-14.2867-4.84-19.66h.01zm-12.61 27.72c-1.3667 6.56-3.91 11.5-7.63 14.82-2.93 2.64-5.63 3.72-8.07 3.23-2.44-.49-4.4-2.64-5.86-6.46a25.7 25.7 0 0 1-1.77-9.09 35.9 35.9 0 0 1 .74-7.34 33 33 0 0 1 5.28-11.88c3.3333-4.8933 6.8067-6.9467 10.42-6.16 2.44.4867 4.3933 2.64 5.86 6.46a25.91 25.91 0 0 1 1.76 9.12 35.73 35.73 0 0 1-.73 7.33v-.03z"}))})});n.d(t,"a",(function(){return c})),n.d(t,"b",(function(){return i})),n.d(t,"c",(function(){return a})),n.d(t,"d",(function(){return l})),n.d(t,"e",(function(){return s})),n.d(t,"f",(function(){return u})),n.d(t,"h",(function(){return b})),n.d(t,"g",(function(){return p})),n.d(t,"i",(function(){return d})),n.d(t,"j",(function(){return h}))},3:function(e,t){!function(){e.exports=this.wp.components}()},32:function(e,t){!function(){e.exports=this.wp.keycodes}()},35:function(e,t,n){"use strict";n.d(t,"b",(function(){return o}));var r=n(5),o=["woocommerce/product-best-sellers","woocommerce/product-category","woocommerce/product-new","woocommerce/product-on-sale","woocommerce/product-top-rated"];t.a={columns:{type:"number",default:r.DEFAULT_COLUMNS},rows:{type:"number",default:r.DEFAULT_ROWS},alignButtons:{type:"boolean",default:!1},categories:{type:"array",default:[]},catOperator:{type:"string",default:"any"},contentVisibility:{type:"object",default:{title:!0,price:!0,rating:!0,button:!0}}}},36:function(e,t,n){"use strict";var r=n(19),o=n.n(r),c=n(0),i=n(1),a=(n(2),n(3));function l(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function s(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?l(n,!0).forEach((function(t){o()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):l(n).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}t.a=function(e){var t=e.onChange,n=e.settings,r=n.button,o=n.price,l=n.rating,u=n.title;return Object(c.createElement)(c.Fragment,null,Object(c.createElement)(a.ToggleControl,{label:Object(i.__)("Product title","woo-gutenberg-products-block"),help:u?Object(i.__)("Product title is visible.","woo-gutenberg-products-block"):Object(i.__)("Product title is hidden.","woo-gutenberg-products-block"),checked:u,onChange:function(){return t(s({},n,{title:!u}))}}),Object(c.createElement)(a.ToggleControl,{label:Object(i.__)("Product price","woo-gutenberg-products-block"),help:o?Object(i.__)("Product price is visible.","woo-gutenberg-products-block"):Object(i.__)("Product price is hidden.","woo-gutenberg-products-block"),checked:o,onChange:function(){return t(s({},n,{price:!o}))}}),Object(c.createElement)(a.ToggleControl,{label:Object(i.__)("Product rating","woo-gutenberg-products-block"),help:l?Object(i.__)("Product rating is visible.","woo-gutenberg-products-block"):Object(i.__)("Product rating is hidden.","woo-gutenberg-products-block"),checked:l,onChange:function(){return t(s({},n,{rating:!l}))}}),Object(c.createElement)(a.ToggleControl,{label:Object(i.__)("Add to Cart button","woo-gutenberg-products-block"),help:r?Object(i.__)("Add to Cart button is visible.","woo-gutenberg-products-block"):Object(i.__)("Add to Cart button is hidden.","woo-gutenberg-products-block"),checked:r,onChange:function(){return t(s({},n,{button:!r}))}}))}},4:function(e,t){!function(){e.exports=this.lodash}()},40:function(e,t,n){"use strict";var r=n(15),o=n.n(r),c=n(7),i=n.n(c),a=n(8),l=n.n(a),s=n(9),u=n.n(s),b=n(10),p=n.n(b),d=n(14),f=n.n(d),g=n(11),h=n.n(g),m=n(0),w=n(1),O=n(18),j=n(16),v=n.n(j),y=n(4),_=(n(2),n(25)),E=n(3),C=n(5),k=(n(89),function(e){function t(){var e;return i()(this,t),(e=u()(this,p()(t).apply(this,arguments))).state={list:[],loading:!0},e.renderItem=e.renderItem.bind(f()(e)),e}return h()(t,e),l()(t,[{key:"componentDidMount",value:function(){var e=this;v()({path:Object(O.addQueryArgs)("".concat(C.ENDPOINTS.products,"/categories"),{per_page:-1})}).then((function(t){e.setState({list:t,loading:!1})})).catch((function(){e.setState({list:[],loading:!1})}))}},{key:"renderItem",value:function(e){var t=e.item,n=e.search,r=e.depth,c=void 0===r?0:r,i=["woocommerce-product-categories__item"];n.length&&i.push("is-searching"),0===c&&0!==t.parent&&i.push("is-skip-level");var a=t.breadcrumbs.length?"".concat(t.breadcrumbs.join(", "),", ").concat(t.name):t.name;return Object(m.createElement)(_.b,o()({className:i.join(" ")},e,{showCount:!0,"aria-label":Object(w.sprintf)(Object(w._n)("%s, has %d product","%s, has %d products",t.count,"woo-gutenberg-products-block"),a,t.count)}))}},{key:"render",value:function(){var e=this.state,t=e.list,n=e.loading,r=this.props,o=r.onChange,c=r.onOperatorChange,i=r.operator,a=r.selected,l=r.isSingle,s={clear:Object(w.__)("Clear all product categories","woo-gutenberg-products-block"),list:Object(w.__)("Product Categories","woo-gutenberg-products-block"),noItems:Object(w.__)("Your store doesn't have any product categories.","woo-gutenberg-products-block"),search:Object(w.__)("Search for product categories","woo-gutenberg-products-block"),selected:function(e){return Object(w.sprintf)(Object(w._n)("%d category selected","%d categories selected",e,"woo-gutenberg-products-block"),e)},updated:Object(w.__)("Category search results updated.","woo-gutenberg-products-block")};return Object(m.createElement)(m.Fragment,null,Object(m.createElement)(_.a,{className:"woocommerce-product-categories",list:t,isLoading:n,selected:a.map((function(e){return Object(y.find)(t,{id:e})})).filter(Boolean),onChange:o,renderItem:this.renderItem,messages:s,isHierarchical:!0,isSingle:l}),!!c&&Object(m.createElement)("div",{className:a.length<2?"screen-reader-text":""},Object(m.createElement)(E.SelectControl,{className:"woocommerce-product-categories__operator",label:Object(w.__)("Display products matching","woo-gutenberg-products-block"),help:Object(w.__)("Pick at least two categories to use this setting.","woo-gutenberg-products-block"),value:i,onChange:c,options:[{label:Object(w.__)("Any selected categories","woo-gutenberg-products-block"),value:"any"},{label:Object(w.__)("All selected categories","woo-gutenberg-products-block"),value:"all"}]})))}}]),t}(m.Component));k.defaultProps={operator:"any",isSingle:!1},t.a=k},43:function(e,t){!function(){e.exports=this.ReactDOM}()},44:function(e,t,n){"use strict";var r=n(0),o=n(1),c=n(4),i=(n(2),n(3)),a=n(5);t.a=function(e){var t=e.columns,n=e.rows,l=e.setAttributes,s=e.alignButtons;return Object(r.createElement)(r.Fragment,null,Object(r.createElement)(i.RangeControl,{label:Object(o.__)("Columns","woo-gutenberg-products-block"),value:t,onChange:function(e){var t=Object(c.clamp)(e,a.MIN_COLUMNS,a.MAX_COLUMNS);l({columns:Object(c.isNaN)(t)?"":t})},min:a.MIN_COLUMNS,max:a.MAX_COLUMNS}),Object(r.createElement)(i.RangeControl,{label:Object(o.__)("Rows","woo-gutenberg-products-block"),value:n,onChange:function(e){var t=Object(c.clamp)(e,a.MIN_ROWS,a.MAX_ROWS);l({rows:Object(c.isNaN)(t)?"":t})},min:a.MIN_ROWS,max:a.MAX_ROWS}),Object(r.createElement)(i.ToggleControl,{label:Object(o.__)("Align Add to Cart buttons","woo-gutenberg-products-block"),help:s?Object(o.__)("Buttons are aligned vertically.","woo-gutenberg-products-block"):Object(o.__)("Buttons follow content.","woo-gutenberg-products-block"),checked:s,onChange:function(){return l({alignButtons:!s})}}))}},45:function(e,t,n){"use strict";var r=n(0),o=n(6),c=n.n(o),i=n(56),a=n.n(i),l=n(5);n.d(t,"a",(function(){return s}));var s=function(e){return function(t){var n=t.attributes,o=n.align,i=n.contentVisibility,s=c()(o?"align".concat(o):"",{"is-hidden-title":!i.title,"is-hidden-price":!i.price,"is-hidden-rating":!i.rating,"is-hidden-button":!i.button});return Object(r.createElement)(r.RawHTML,{className:s},function(e,t){var n=e.attributes,r=n.attributes,o=n.attrOperator,c=n.categories,i=n.catOperator,s=n.orderby,u=n.products,b=n.columns||l.DEFAULT_COLUMNS,p=n.rows||l.DEFAULT_ROWS,d=new Map;switch(d.set("limit",p*b),d.set("columns",b),c&&c.length&&(d.set("category",c.join(",")),i&&"all"===i&&d.set("cat_operator","AND")),r&&r.length&&(d.set("terms",r.map((function(e){return e.id})).join(",")),d.set("attribute",r[0].attr_slug),o&&"all"===o&&d.set("terms_operator","AND")),s&&("price_desc"===s?(d.set("orderby","price"),d.set("order","DESC")):"price_asc"===s?(d.set("orderby","price"),d.set("order","ASC")):"date"===s?(d.set("orderby","date"),d.set("order","DESC")):d.set("orderby",s)),t){case"woocommerce/product-best-sellers":d.set("best_selling","1");break;case"woocommerce/product-top-rated":d.set("orderby","rating");break;case"woocommerce/product-on-sale":d.set("on_sale","1");break;case"woocommerce/product-new":d.set("orderby","date"),d.set("order","DESC");break;case"woocommerce/handpicked-products":if(!u.length)return"";d.set("ids",u.join(",")),d.set("limit",u.length);break;case"woocommerce/product-category":if(!c||!c.length)return"";break;case"woocommerce/products-by-attribute":if(!r||!r.length)return""}var f="[products",g=!0,h=!1,m=void 0;try{for(var w,O=d[Symbol.iterator]();!(g=(w=O.next()).done);g=!0){var j=a()(w.value,2);f+=" "+j[0]+'="'+j[1]+'"'}}catch(e){h=!0,m=e}finally{try{g||null==O.return||O.return()}finally{if(h)throw m}}return f+="]"}(t,e))}}},46:function(e,t){!function(){e.exports=this.wp.viewport}()},5:function(e,t){!function(){e.exports=this.wc["wc-block-settings"]}()},50:function(e,t){!function(){e.exports=this.wp.hooks}()},52:function(e,t){!function(){e.exports=this.wp.htmlEntities}()},53:function(e,t){!function(){e.exports=this.wp.date}()},570:function(e,t,n){"use strict";n.r(t);var r=n(19),o=n.n(r),c=n(0),i=n(1),a=n(22),l=n(4),s=n(7),u=n.n(s),b=n(8),p=n.n(b),d=n(9),f=n.n(d),g=n(10),h=n.n(g),m=n(11),w=n.n(m),O=n(3),j=n(17),v=(n(2),n(36)),y=n(44),_=n(40),E=function(e){function t(){return u()(this,t),f()(this,h()(t).apply(this,arguments))}return w()(t,e),p()(t,[{key:"getInspectorControls",value:function(){var e=this.props,t=e.attributes,n=e.setAttributes,r=t.categories,o=t.catOperator,a=t.columns,l=t.contentVisibility,s=t.rows,u=t.alignButtons;return Object(c.createElement)(j.InspectorControls,{key:"inspector"},Object(c.createElement)(O.PanelBody,{title:Object(i.__)("Layout","woo-gutenberg-products-block"),initialOpen:!0},Object(c.createElement)(y.a,{columns:a,rows:s,alignButtons:u,setAttributes:n})),Object(c.createElement)(O.PanelBody,{title:Object(i.__)("Content","woo-gutenberg-products-block"),initialOpen:!0},Object(c.createElement)(v.a,{settings:l,onChange:function(e){return n({contentVisibility:e})}})),Object(c.createElement)(O.PanelBody,{title:Object(i.__)("Filter by Product Category","woo-gutenberg-products-block"),initialOpen:!1},Object(c.createElement)(_.a,{selected:r,onChange:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=e.map((function(e){return e.id}));n({categories:t})},operator:o,onOperatorChange:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"any";return n({catOperator:e})}})))}},{key:"render",value:function(){var e=this.props,t=e.attributes,n=e.name;return Object(c.createElement)(c.Fragment,null,this.getInspectorControls(),Object(c.createElement)(O.Disabled,null,Object(c.createElement)(j.ServerSideRender,{block:n,attributes:t})))}}]),t}(c.Component),C=n(45),k=n(23),M=n(35);function x(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}Object(a.registerBlockType)("woocommerce/product-new",{title:Object(i.__)("Newest Products","woo-gutenberg-products-block"),icon:{src:Object(c.createElement)(k.d,null),foreground:"#96588a"},category:"woocommerce",keywords:[Object(i.__)("WooCommerce","woo-gutenberg-products-block")],description:Object(i.__)("Display a grid of your newest products.","woo-gutenberg-products-block"),supports:{align:["wide","full"],html:!1},attributes:function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?x(n,!0).forEach((function(t){o()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):x(n).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({},M.a),transforms:{from:[{type:"block",blocks:Object(l.without)(M.b,"woocommerce/product-new"),transform:function(e){return Object(a.createBlock)("woocommerce/product-new",e)}}]},deprecated:[{attributes:M.a,save:Object(C.a)("woocommerce/product-new")}],edit:function(e){return Object(c.createElement)(E,e)},save:function(){return null}})},59:function(e,t){!function(){e.exports=this.wp.dom}()},62:function(e,t){},63:function(e,t){},64:function(e,t){},66:function(e,t){},67:function(e,t){}});
|
build/product-on-sale.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
this.wc=this.wc||{},this.wc.blocks=this.wc.blocks||{},this.wc.blocks["product-on-sale"]=function(e){function t(t){for(var r,i,u=t[0],s=t[1],a=t[2],b=0,p=[];b<u.length;b++)i=u[b],Object.prototype.hasOwnProperty.call(n,i)&&n[i]&&p.push(n[i][0]),n[i]=0;for(r in s)Object.prototype.hasOwnProperty.call(s,r)&&(e[r]=s[r]);for(l&&l(t);p.length;)p.shift()();return c.push.apply(c,a||[]),o()}function o(){for(var e,t=0;t<c.length;t++){for(var o=c[t],r=!0,u=1;u<o.length;u++){var s=o[u];0!==n[s]&&(r=!1)}r&&(c.splice(t--,1),e=i(i.s=o[0]))}return e}var r={},n={12:0},c=[];function i(t){if(r[t])return r[t].exports;var o=r[t]={i:t,l:!1,exports:{}};return e[t].call(o.exports,o,o.exports,i),o.l=!0,o.exports}i.m=e,i.c=r,i.d=function(e,t,o){i.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:o})},i.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},i.t=function(e,t){if(1&t&&(e=i(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var o=Object.create(null);if(i.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)i.d(o,r,function(t){return e[t]}.bind(null,r));return o},i.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return i.d(t,"a",t),t},i.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},i.p="";var u=window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[],s=u.push.bind(u);u.push=t,u=u.slice();for(var a=0;a<u.length;a++)t(u[a]);var l=s;return c.push([557,1,0]),o()}({0:function(e,t){!function(){e.exports=this.wp.element}()},1:function(e,t){!function(){e.exports=this.wp.i18n}()},13:function(e,t){!function(){e.exports=this.React}()},14:function(e,t){!function(){e.exports=this.moment}()},17:function(e,t){!function(){e.exports=this.wp.apiFetch}()},18:function(e,t){!function(){e.exports=this.wp.editor}()},19:function(e,t){!function(){e.exports=this.wp.url}()},2:function(e,t){!function(){e.exports=this.wp.components}()},21:function(e,t){!function(){e.exports=this.wp.compose}()},23:function(e,t){!function(){e.exports=this.wp.blocks}()},33:function(e,t){!function(){e.exports=this.wp.keycodes}()},36:function(e,t,o){"use strict";o.d(t,"b",function(){return n});var r=o(5),n=["woocommerce/product-best-sellers","woocommerce/product-category","woocommerce/product-new","woocommerce/product-on-sale","woocommerce/product-top-rated"];t.a={columns:{type:"number",default:r.DEFAULT_COLUMNS},rows:{type:"number",default:r.DEFAULT_ROWS},alignButtons:{type:"boolean",default:!1},categories:{type:"array",default:[]},catOperator:{type:"string",default:"any"},contentVisibility:{type:"object",default:{title:!0,price:!0,rating:!0,button:!0}}}},37:function(e,t,o){"use strict";var r=o(20),n=o.n(r),c=o(0),i=o(1),u=(o(7),o(2));function s(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),o.push.apply(o,r)}return o}function a(e){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?s(o,!0).forEach(function(t){n()(e,t,o[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):s(o).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(o,t))})}return e}t.a=function(e){var t=e.onChange,o=e.settings,r=o.button,n=o.price,s=o.rating,l=o.title;return Object(c.createElement)(c.Fragment,null,Object(c.createElement)(u.ToggleControl,{label:Object(i.__)("Product title","woo-gutenberg-products-block"),help:l?Object(i.__)("Product title is visible.","woo-gutenberg-products-block"):Object(i.__)("Product title is hidden.","woo-gutenberg-products-block"),checked:l,onChange:function(){return t(a({},o,{title:!l}))}}),Object(c.createElement)(u.ToggleControl,{label:Object(i.__)("Product price","woo-gutenberg-products-block"),help:n?Object(i.__)("Product price is visible.","woo-gutenberg-products-block"):Object(i.__)("Product price is hidden.","woo-gutenberg-products-block"),checked:n,onChange:function(){return t(a({},o,{price:!n}))}}),Object(c.createElement)(u.ToggleControl,{label:Object(i.__)("Product rating","woo-gutenberg-products-block"),help:s?Object(i.__)("Product rating is visible.","woo-gutenberg-products-block"):Object(i.__)("Product rating is hidden.","woo-gutenberg-products-block"),checked:s,onChange:function(){return t(a({},o,{rating:!s}))}}),Object(c.createElement)(u.ToggleControl,{label:Object(i.__)("Add to Cart button","woo-gutenberg-products-block"),help:r?Object(i.__)("Add to Cart button is visible.","woo-gutenberg-products-block"):Object(i.__)("Add to Cart button is hidden.","woo-gutenberg-products-block"),checked:r,onChange:function(){return t(a({},o,{button:!r}))}}))}},4:function(e,t){!function(){e.exports=this.lodash}()},41:function(e,t,o){"use strict";var r=o(16),n=o.n(r),c=o(8),i=o.n(c),u=o(9),s=o.n(u),a=o(10),l=o.n(a),b=o(11),p=o.n(b),d=o(15),g=o.n(d),f=o(12),O=o.n(f),m=o(0),h=o(1),w=o(19),j=o(17),_=o.n(j),y=o(4),v=(o(7),o(26)),k=o(2),C=o(5),P=(o(86),function(e){function t(){var e;return i()(this,t),(e=l()(this,p()(t).apply(this,arguments))).state={list:[],loading:!0},e.renderItem=e.renderItem.bind(g()(e)),e}return O()(t,e),s()(t,[{key:"componentDidMount",value:function(){var e=this;_()({path:Object(w.addQueryArgs)("".concat(C.ENDPOINTS.products,"/categories"),{per_page:-1})}).then(function(t){e.setState({list:t,loading:!1})}).catch(function(){e.setState({list:[],loading:!1})})}},{key:"renderItem",value:function(e){var t=e.item,o=e.search,r=e.depth,c=void 0===r?0:r,i=["woocommerce-product-categories__item"];o.length&&i.push("is-searching"),0===c&&0!==t.parent&&i.push("is-skip-level");var u=t.breadcrumbs.length?"".concat(t.breadcrumbs.join(", "),", ").concat(t.name):t.name;return Object(m.createElement)(v.b,n()({className:i.join(" ")},e,{showCount:!0,"aria-label":Object(h.sprintf)(Object(h._n)("%s, has %d product","%s, has %d products",t.count,"woo-gutenberg-products-block"),u,t.count)}))}},{key:"render",value:function(){var e=this.state,t=e.list,o=e.loading,r=this.props,n=r.onChange,c=r.onOperatorChange,i=r.operator,u=r.selected,s=r.isSingle,a={clear:Object(h.__)("Clear all product categories","woo-gutenberg-products-block"),list:Object(h.__)("Product Categories","woo-gutenberg-products-block"),noItems:Object(h.__)("Your store doesn't have any product categories.","woo-gutenberg-products-block"),search:Object(h.__)("Search for product categories","woo-gutenberg-products-block"),selected:function(e){return Object(h.sprintf)(Object(h._n)("%d category selected","%d categories selected",e,"woo-gutenberg-products-block"),e)},updated:Object(h.__)("Category search results updated.","woo-gutenberg-products-block")};return Object(m.createElement)(m.Fragment,null,Object(m.createElement)(v.a,{className:"woocommerce-product-categories",list:t,isLoading:o,selected:u.map(function(e){return Object(y.find)(t,{id:e})}).filter(Boolean),onChange:n,renderItem:this.renderItem,messages:a,isHierarchical:!0,isSingle:s}),!!c&&Object(m.createElement)("div",{className:u.length<2?"screen-reader-text":""},Object(m.createElement)(k.SelectControl,{className:"woocommerce-product-categories__operator",label:Object(h.__)("Display products matching","woo-gutenberg-products-block"),help:Object(h.__)("Pick at least two categories to use this setting.","woo-gutenberg-products-block"),value:i,onChange:c,options:[{label:Object(h.__)("Any selected categories","woo-gutenberg-products-block"),value:"any"},{label:Object(h.__)("All selected categories","woo-gutenberg-products-block"),value:"all"}]})))}}]),t}(m.Component));P.defaultProps={operator:"any",isSingle:!1},t.a=P},44:function(e,t){!function(){e.exports=this.ReactDOM}()},45:function(e,t,o){"use strict";var r=o(0),n=o(1),c=o(4),i=(o(7),o(2)),u=o(5);t.a=function(e){var t=e.columns,o=e.rows,s=e.setAttributes,a=e.alignButtons;return Object(r.createElement)(r.Fragment,null,Object(r.createElement)(i.RangeControl,{label:Object(n.__)("Columns","woo-gutenberg-products-block"),value:t,onChange:function(e){var t=Object(c.clamp)(e,u.MIN_COLUMNS,u.MAX_COLUMNS);s({columns:Object(c.isNaN)(t)?"":t})},min:u.MIN_COLUMNS,max:u.MAX_COLUMNS}),Object(r.createElement)(i.RangeControl,{label:Object(n.__)("Rows","woo-gutenberg-products-block"),value:o,onChange:function(e){var t=Object(c.clamp)(e,u.MIN_ROWS,u.MAX_ROWS);s({rows:Object(c.isNaN)(t)?"":t})},min:u.MIN_ROWS,max:u.MAX_ROWS}),Object(r.createElement)(i.ToggleControl,{label:Object(n.__)("Align Add to Cart buttons","woo-gutenberg-products-block"),help:a?Object(n.__)("Buttons are aligned vertically.","woo-gutenberg-products-block"):Object(n.__)("Buttons follow content.","woo-gutenberg-products-block"),checked:a,onChange:function(){return s({alignButtons:!a})}}))}},46:function(e,t,o){"use strict";var r=o(0),n=o(6),c=o.n(n),i=o(58),u=o.n(i),s=o(5);o.d(t,"a",function(){return a});var a=function(e){return function(t){var o=t.attributes,n=o.align,i=o.contentVisibility,a=c()(n?"align".concat(n):"",{"is-hidden-title":!i.title,"is-hidden-price":!i.price,"is-hidden-rating":!i.rating,"is-hidden-button":!i.button});return Object(r.createElement)(r.RawHTML,{className:a},function(e,t){var o=e.attributes,r=o.attributes,n=o.attrOperator,c=o.categories,i=o.catOperator,a=o.orderby,l=o.products,b=o.columns||s.DEFAULT_COLUMNS,p=o.rows||s.DEFAULT_ROWS,d=new Map;switch(d.set("limit",p*b),d.set("columns",b),c&&c.length&&(d.set("category",c.join(",")),i&&"all"===i&&d.set("cat_operator","AND")),r&&r.length&&(d.set("terms",r.map(function(e){return e.id}).join(",")),d.set("attribute",r[0].attr_slug),n&&"all"===n&&d.set("terms_operator","AND")),a&&("price_desc"===a?(d.set("orderby","price"),d.set("order","DESC")):"price_asc"===a?(d.set("orderby","price"),d.set("order","ASC")):"date"===a?(d.set("orderby","date"),d.set("order","DESC")):d.set("orderby",a)),t){case"woocommerce/product-best-sellers":d.set("best_selling","1");break;case"woocommerce/product-top-rated":d.set("orderby","rating");break;case"woocommerce/product-on-sale":d.set("on_sale","1");break;case"woocommerce/product-new":d.set("orderby","date"),d.set("order","DESC");break;case"woocommerce/handpicked-products":if(!l.length)return"";d.set("ids",l.join(",")),d.set("limit",l.length);break;case"woocommerce/product-category":if(!c||!c.length)return"";break;case"woocommerce/products-by-attribute":if(!r||!r.length)return""}var g="[products",f=!0,O=!1,m=void 0;try{for(var h,w=d[Symbol.iterator]();!(f=(h=w.next()).done);f=!0){var j=u()(h.value,2);g+=" "+j[0]+'="'+j[1]+'"'}}catch(e){O=!0,m=e}finally{try{f||null==w.return||w.return()}finally{if(O)throw m}}return g+="]"}(t,e))}}},47:function(e,t){!function(){e.exports=this.wp.viewport}()},5:function(e,t){!function(){e.exports=this.wc["wc-block-settings"]}()},51:function(e,t){!function(){e.exports=this.wp.hooks}()},53:function(e,t){!function(){e.exports=this.wp.htmlEntities}()},54:function(e,t){!function(){e.exports=this.wp.date}()},557:function(e,t,o){"use strict";o.r(t);var r=o(20),n=o.n(r),c=o(0),i=o(1),u=o(23),s=o(4),a=o(29),l=o.n(a),b=o(8),p=o.n(b),d=o(9),g=o.n(d),f=o(10),O=o.n(f),m=o(11),h=o.n(m),w=o(12),j=o.n(w),_=o(2),y=o(18),v=(o(7),o(37)),k=o(45),C=o(41),P=o(57),E=function(e){function t(){return p()(this,t),O()(this,h()(t).apply(this,arguments))}return j()(t,e),g()(t,[{key:"getInspectorControls",value:function(){var e=this.props,t=e.attributes,o=e.setAttributes,r=t.categories,n=t.catOperator,u=t.columns,s=t.contentVisibility,a=t.rows,l=t.orderby,b=t.alignButtons;return Object(c.createElement)(y.InspectorControls,{key:"inspector"},Object(c.createElement)(_.PanelBody,{title:Object(i.__)("Layout","woo-gutenberg-products-block"),initialOpen:!0},Object(c.createElement)(k.a,{columns:u,rows:a,alignButtons:b,setAttributes:o})),Object(c.createElement)(_.PanelBody,{title:Object(i.__)("Content","woo-gutenberg-products-block"),initialOpen:!0},Object(c.createElement)(v.a,{settings:s,onChange:function(e){return o({contentVisibility:e})}})),Object(c.createElement)(_.PanelBody,{title:Object(i.__)("Order By","woo-gutenberg-products-block"),initialOpen:!1},Object(c.createElement)(P.a,{setAttributes:o,value:l})),Object(c.createElement)(_.PanelBody,{title:Object(i.__)("Filter by Product Category","woo-gutenberg-products-block"),initialOpen:!1},Object(c.createElement)(C.a,{selected:r,onChange:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=e.map(function(e){return e.id});o({categories:t})},operator:n,onOperatorChange:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"any";return o({catOperator:e})}})))}},{key:"render",value:function(){var e=this.props,t=e.attributes,o=e.name;return Object(c.createElement)(c.Fragment,null,this.getInspectorControls(),Object(c.createElement)(_.Disabled,null,Object(c.createElement)(y.ServerSideRender,{block:o,attributes:t})))}}]),t}(c.Component),S=o(46),x=o(36);function A(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),o.push.apply(o,r)}return o}function N(e){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?A(o,!0).forEach(function(t){n()(e,t,o[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):A(o).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(o,t))})}return e}Object(u.registerBlockType)("woocommerce/product-on-sale",{title:Object(i.__)("On Sale Products","woo-gutenberg-products-block"),icon:{src:Object(c.createElement)(l.a,{icon:"tag"}),foreground:"#96588a"},category:"woocommerce",keywords:[Object(i.__)("WooCommerce","woo-gutenberg-products-block")],description:Object(i.__)("Display a grid of on sale products.","woo-gutenberg-products-block"),supports:{align:["wide","full"],html:!1},attributes:N({},x.a,{orderby:{type:"string",default:"date"}}),transforms:{from:[{type:"block",blocks:Object(s.without)(x.b,"woocommerce/product-on-sale"),transform:function(e){return Object(u.createBlock)("woocommerce/product-on-sale",e)}}]},deprecated:[{attributes:N({},x.a,{orderby:{type:"string",default:"date"}}),save:Object(S.a)("woocommerce/product-on-sale")}],edit:function(e){return Object(c.createElement)(E,e)},save:function(){return null}})},57:function(e,t,o){"use strict";var r=o(0),n=o(1),c=o(2);o(7);t.a=function(e){var t=e.value,o=e.setAttributes;return Object(r.createElement)(c.SelectControl,{label:Object(n.__)("Order products by","woo-gutenberg-products-block"),value:t,options:[{label:Object(n.__)("Newness - newest first","woo-gutenberg-products-block"),value:"date"},{label:Object(n.__)("Price - low to high","woo-gutenberg-products-block"),value:"price_asc"},{label:Object(n.__)("Price - high to low","woo-gutenberg-products-block"),value:"price_desc"},{label:Object(n.__)("Rating - highest first","woo-gutenberg-products-block"),value:"rating"},{label:Object(n.__)("Sales - most first","woo-gutenberg-products-block"),value:"popularity"},{label:Object(n.__)("Title - alphabetical","woo-gutenberg-products-block"),value:"title"},{label:Object(n.__)("Menu Order","woo-gutenberg-products-block"),value:"menu_order"}],onChange:function(e){return o({orderby:e})}})}},61:function(e,t){!function(){e.exports=this.wp.dom}()},64:function(e,t){},65:function(e,t){},67:function(e,t){},68:function(e,t){}});
|
1 |
+
this.wc=this.wc||{},this.wc.blocks=this.wc.blocks||{},this.wc.blocks["product-on-sale"]=function(e){function t(t){for(var r,i,u=t[0],s=t[1],a=t[2],b=0,p=[];b<u.length;b++)i=u[b],Object.prototype.hasOwnProperty.call(n,i)&&n[i]&&p.push(n[i][0]),n[i]=0;for(r in s)Object.prototype.hasOwnProperty.call(s,r)&&(e[r]=s[r]);for(l&&l(t);p.length;)p.shift()();return c.push.apply(c,a||[]),o()}function o(){for(var e,t=0;t<c.length;t++){for(var o=c[t],r=!0,u=1;u<o.length;u++){var s=o[u];0!==n[s]&&(r=!1)}r&&(c.splice(t--,1),e=i(i.s=o[0]))}return e}var r={},n={12:0},c=[];function i(t){if(r[t])return r[t].exports;var o=r[t]={i:t,l:!1,exports:{}};return e[t].call(o.exports,o,o.exports,i),o.l=!0,o.exports}i.m=e,i.c=r,i.d=function(e,t,o){i.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:o})},i.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},i.t=function(e,t){if(1&t&&(e=i(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var o=Object.create(null);if(i.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)i.d(o,r,function(t){return e[t]}.bind(null,r));return o},i.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return i.d(t,"a",t),t},i.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},i.p="";var u=window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[],s=u.push.bind(u);u.push=t,u=u.slice();for(var a=0;a<u.length;a++)t(u[a]);var l=s;return c.push([569,1,0]),o()}({0:function(e,t){!function(){e.exports=this.wp.element}()},1:function(e,t){!function(){e.exports=this.wp.i18n}()},12:function(e,t){!function(){e.exports=this.React}()},13:function(e,t){!function(){e.exports=this.moment}()},16:function(e,t){!function(){e.exports=this.wp.apiFetch}()},17:function(e,t){!function(){e.exports=this.wp.editor}()},18:function(e,t){!function(){e.exports=this.wp.url}()},20:function(e,t){!function(){e.exports=this.wp.compose}()},22:function(e,t){!function(){e.exports=this.wp.blocks}()},3:function(e,t){!function(){e.exports=this.wp.components}()},32:function(e,t){!function(){e.exports=this.wp.keycodes}()},35:function(e,t,o){"use strict";o.d(t,"b",(function(){return n}));var r=o(5),n=["woocommerce/product-best-sellers","woocommerce/product-category","woocommerce/product-new","woocommerce/product-on-sale","woocommerce/product-top-rated"];t.a={columns:{type:"number",default:r.DEFAULT_COLUMNS},rows:{type:"number",default:r.DEFAULT_ROWS},alignButtons:{type:"boolean",default:!1},categories:{type:"array",default:[]},catOperator:{type:"string",default:"any"},contentVisibility:{type:"object",default:{title:!0,price:!0,rating:!0,button:!0}}}},36:function(e,t,o){"use strict";var r=o(19),n=o.n(r),c=o(0),i=o(1),u=(o(2),o(3));function s(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),o.push.apply(o,r)}return o}function a(e){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?s(o,!0).forEach((function(t){n()(e,t,o[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):s(o).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(o,t))}))}return e}t.a=function(e){var t=e.onChange,o=e.settings,r=o.button,n=o.price,s=o.rating,l=o.title;return Object(c.createElement)(c.Fragment,null,Object(c.createElement)(u.ToggleControl,{label:Object(i.__)("Product title","woo-gutenberg-products-block"),help:l?Object(i.__)("Product title is visible.","woo-gutenberg-products-block"):Object(i.__)("Product title is hidden.","woo-gutenberg-products-block"),checked:l,onChange:function(){return t(a({},o,{title:!l}))}}),Object(c.createElement)(u.ToggleControl,{label:Object(i.__)("Product price","woo-gutenberg-products-block"),help:n?Object(i.__)("Product price is visible.","woo-gutenberg-products-block"):Object(i.__)("Product price is hidden.","woo-gutenberg-products-block"),checked:n,onChange:function(){return t(a({},o,{price:!n}))}}),Object(c.createElement)(u.ToggleControl,{label:Object(i.__)("Product rating","woo-gutenberg-products-block"),help:s?Object(i.__)("Product rating is visible.","woo-gutenberg-products-block"):Object(i.__)("Product rating is hidden.","woo-gutenberg-products-block"),checked:s,onChange:function(){return t(a({},o,{rating:!s}))}}),Object(c.createElement)(u.ToggleControl,{label:Object(i.__)("Add to Cart button","woo-gutenberg-products-block"),help:r?Object(i.__)("Add to Cart button is visible.","woo-gutenberg-products-block"):Object(i.__)("Add to Cart button is hidden.","woo-gutenberg-products-block"),checked:r,onChange:function(){return t(a({},o,{button:!r}))}}))}},4:function(e,t){!function(){e.exports=this.lodash}()},40:function(e,t,o){"use strict";var r=o(15),n=o.n(r),c=o(7),i=o.n(c),u=o(8),s=o.n(u),a=o(9),l=o.n(a),b=o(10),p=o.n(b),d=o(14),g=o.n(d),f=o(11),O=o.n(f),m=o(0),h=o(1),w=o(18),j=o(16),_=o.n(j),y=o(4),v=(o(2),o(25)),k=o(3),C=o(5),P=(o(89),function(e){function t(){var e;return i()(this,t),(e=l()(this,p()(t).apply(this,arguments))).state={list:[],loading:!0},e.renderItem=e.renderItem.bind(g()(e)),e}return O()(t,e),s()(t,[{key:"componentDidMount",value:function(){var e=this;_()({path:Object(w.addQueryArgs)("".concat(C.ENDPOINTS.products,"/categories"),{per_page:-1})}).then((function(t){e.setState({list:t,loading:!1})})).catch((function(){e.setState({list:[],loading:!1})}))}},{key:"renderItem",value:function(e){var t=e.item,o=e.search,r=e.depth,c=void 0===r?0:r,i=["woocommerce-product-categories__item"];o.length&&i.push("is-searching"),0===c&&0!==t.parent&&i.push("is-skip-level");var u=t.breadcrumbs.length?"".concat(t.breadcrumbs.join(", "),", ").concat(t.name):t.name;return Object(m.createElement)(v.b,n()({className:i.join(" ")},e,{showCount:!0,"aria-label":Object(h.sprintf)(Object(h._n)("%s, has %d product","%s, has %d products",t.count,"woo-gutenberg-products-block"),u,t.count)}))}},{key:"render",value:function(){var e=this.state,t=e.list,o=e.loading,r=this.props,n=r.onChange,c=r.onOperatorChange,i=r.operator,u=r.selected,s=r.isSingle,a={clear:Object(h.__)("Clear all product categories","woo-gutenberg-products-block"),list:Object(h.__)("Product Categories","woo-gutenberg-products-block"),noItems:Object(h.__)("Your store doesn't have any product categories.","woo-gutenberg-products-block"),search:Object(h.__)("Search for product categories","woo-gutenberg-products-block"),selected:function(e){return Object(h.sprintf)(Object(h._n)("%d category selected","%d categories selected",e,"woo-gutenberg-products-block"),e)},updated:Object(h.__)("Category search results updated.","woo-gutenberg-products-block")};return Object(m.createElement)(m.Fragment,null,Object(m.createElement)(v.a,{className:"woocommerce-product-categories",list:t,isLoading:o,selected:u.map((function(e){return Object(y.find)(t,{id:e})})).filter(Boolean),onChange:n,renderItem:this.renderItem,messages:a,isHierarchical:!0,isSingle:s}),!!c&&Object(m.createElement)("div",{className:u.length<2?"screen-reader-text":""},Object(m.createElement)(k.SelectControl,{className:"woocommerce-product-categories__operator",label:Object(h.__)("Display products matching","woo-gutenberg-products-block"),help:Object(h.__)("Pick at least two categories to use this setting.","woo-gutenberg-products-block"),value:i,onChange:c,options:[{label:Object(h.__)("Any selected categories","woo-gutenberg-products-block"),value:"any"},{label:Object(h.__)("All selected categories","woo-gutenberg-products-block"),value:"all"}]})))}}]),t}(m.Component));P.defaultProps={operator:"any",isSingle:!1},t.a=P},43:function(e,t){!function(){e.exports=this.ReactDOM}()},44:function(e,t,o){"use strict";var r=o(0),n=o(1),c=o(4),i=(o(2),o(3)),u=o(5);t.a=function(e){var t=e.columns,o=e.rows,s=e.setAttributes,a=e.alignButtons;return Object(r.createElement)(r.Fragment,null,Object(r.createElement)(i.RangeControl,{label:Object(n.__)("Columns","woo-gutenberg-products-block"),value:t,onChange:function(e){var t=Object(c.clamp)(e,u.MIN_COLUMNS,u.MAX_COLUMNS);s({columns:Object(c.isNaN)(t)?"":t})},min:u.MIN_COLUMNS,max:u.MAX_COLUMNS}),Object(r.createElement)(i.RangeControl,{label:Object(n.__)("Rows","woo-gutenberg-products-block"),value:o,onChange:function(e){var t=Object(c.clamp)(e,u.MIN_ROWS,u.MAX_ROWS);s({rows:Object(c.isNaN)(t)?"":t})},min:u.MIN_ROWS,max:u.MAX_ROWS}),Object(r.createElement)(i.ToggleControl,{label:Object(n.__)("Align Add to Cart buttons","woo-gutenberg-products-block"),help:a?Object(n.__)("Buttons are aligned vertically.","woo-gutenberg-products-block"):Object(n.__)("Buttons follow content.","woo-gutenberg-products-block"),checked:a,onChange:function(){return s({alignButtons:!a})}}))}},45:function(e,t,o){"use strict";var r=o(0),n=o(6),c=o.n(n),i=o(56),u=o.n(i),s=o(5);o.d(t,"a",(function(){return a}));var a=function(e){return function(t){var o=t.attributes,n=o.align,i=o.contentVisibility,a=c()(n?"align".concat(n):"",{"is-hidden-title":!i.title,"is-hidden-price":!i.price,"is-hidden-rating":!i.rating,"is-hidden-button":!i.button});return Object(r.createElement)(r.RawHTML,{className:a},function(e,t){var o=e.attributes,r=o.attributes,n=o.attrOperator,c=o.categories,i=o.catOperator,a=o.orderby,l=o.products,b=o.columns||s.DEFAULT_COLUMNS,p=o.rows||s.DEFAULT_ROWS,d=new Map;switch(d.set("limit",p*b),d.set("columns",b),c&&c.length&&(d.set("category",c.join(",")),i&&"all"===i&&d.set("cat_operator","AND")),r&&r.length&&(d.set("terms",r.map((function(e){return e.id})).join(",")),d.set("attribute",r[0].attr_slug),n&&"all"===n&&d.set("terms_operator","AND")),a&&("price_desc"===a?(d.set("orderby","price"),d.set("order","DESC")):"price_asc"===a?(d.set("orderby","price"),d.set("order","ASC")):"date"===a?(d.set("orderby","date"),d.set("order","DESC")):d.set("orderby",a)),t){case"woocommerce/product-best-sellers":d.set("best_selling","1");break;case"woocommerce/product-top-rated":d.set("orderby","rating");break;case"woocommerce/product-on-sale":d.set("on_sale","1");break;case"woocommerce/product-new":d.set("orderby","date"),d.set("order","DESC");break;case"woocommerce/handpicked-products":if(!l.length)return"";d.set("ids",l.join(",")),d.set("limit",l.length);break;case"woocommerce/product-category":if(!c||!c.length)return"";break;case"woocommerce/products-by-attribute":if(!r||!r.length)return""}var g="[products",f=!0,O=!1,m=void 0;try{for(var h,w=d[Symbol.iterator]();!(f=(h=w.next()).done);f=!0){var j=u()(h.value,2);g+=" "+j[0]+'="'+j[1]+'"'}}catch(e){O=!0,m=e}finally{try{f||null==w.return||w.return()}finally{if(O)throw m}}return g+="]"}(t,e))}}},46:function(e,t){!function(){e.exports=this.wp.viewport}()},5:function(e,t){!function(){e.exports=this.wc["wc-block-settings"]}()},50:function(e,t){!function(){e.exports=this.wp.hooks}()},52:function(e,t){!function(){e.exports=this.wp.htmlEntities}()},53:function(e,t){!function(){e.exports=this.wp.date}()},55:function(e,t,o){"use strict";var r=o(0),n=o(1),c=o(3);o(2);t.a=function(e){var t=e.value,o=e.setAttributes;return Object(r.createElement)(c.SelectControl,{label:Object(n.__)("Order products by","woo-gutenberg-products-block"),value:t,options:[{label:Object(n.__)("Newness - newest first","woo-gutenberg-products-block"),value:"date"},{label:Object(n.__)("Price - low to high","woo-gutenberg-products-block"),value:"price_asc"},{label:Object(n.__)("Price - high to low","woo-gutenberg-products-block"),value:"price_desc"},{label:Object(n.__)("Rating - highest first","woo-gutenberg-products-block"),value:"rating"},{label:Object(n.__)("Sales - most first","woo-gutenberg-products-block"),value:"popularity"},{label:Object(n.__)("Title - alphabetical","woo-gutenberg-products-block"),value:"title"},{label:Object(n.__)("Menu Order","woo-gutenberg-products-block"),value:"menu_order"}],onChange:function(e){return o({orderby:e})}})}},569:function(e,t,o){"use strict";o.r(t);var r=o(19),n=o.n(r),c=o(0),i=o(1),u=o(22),s=o(4),a=o(27),l=o.n(a),b=o(7),p=o.n(b),d=o(8),g=o.n(d),f=o(9),O=o.n(f),m=o(10),h=o.n(m),w=o(11),j=o.n(w),_=o(3),y=o(17),v=(o(2),o(36)),k=o(44),C=o(40),P=o(55),E=function(e){function t(){return p()(this,t),O()(this,h()(t).apply(this,arguments))}return j()(t,e),g()(t,[{key:"getInspectorControls",value:function(){var e=this.props,t=e.attributes,o=e.setAttributes,r=t.categories,n=t.catOperator,u=t.columns,s=t.contentVisibility,a=t.rows,l=t.orderby,b=t.alignButtons;return Object(c.createElement)(y.InspectorControls,{key:"inspector"},Object(c.createElement)(_.PanelBody,{title:Object(i.__)("Layout","woo-gutenberg-products-block"),initialOpen:!0},Object(c.createElement)(k.a,{columns:u,rows:a,alignButtons:b,setAttributes:o})),Object(c.createElement)(_.PanelBody,{title:Object(i.__)("Content","woo-gutenberg-products-block"),initialOpen:!0},Object(c.createElement)(v.a,{settings:s,onChange:function(e){return o({contentVisibility:e})}})),Object(c.createElement)(_.PanelBody,{title:Object(i.__)("Order By","woo-gutenberg-products-block"),initialOpen:!1},Object(c.createElement)(P.a,{setAttributes:o,value:l})),Object(c.createElement)(_.PanelBody,{title:Object(i.__)("Filter by Product Category","woo-gutenberg-products-block"),initialOpen:!1},Object(c.createElement)(C.a,{selected:r,onChange:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=e.map((function(e){return e.id}));o({categories:t})},operator:n,onOperatorChange:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"any";return o({catOperator:e})}})))}},{key:"render",value:function(){var e=this.props,t=e.attributes,o=e.name;return Object(c.createElement)(c.Fragment,null,this.getInspectorControls(),Object(c.createElement)(_.Disabled,null,Object(c.createElement)(y.ServerSideRender,{block:o,attributes:t})))}}]),t}(c.Component),S=o(45),x=o(35);function A(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),o.push.apply(o,r)}return o}function N(e){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?A(o,!0).forEach((function(t){n()(e,t,o[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):A(o).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(o,t))}))}return e}Object(u.registerBlockType)("woocommerce/product-on-sale",{title:Object(i.__)("On Sale Products","woo-gutenberg-products-block"),icon:{src:Object(c.createElement)(l.a,{icon:"tag"}),foreground:"#96588a"},category:"woocommerce",keywords:[Object(i.__)("WooCommerce","woo-gutenberg-products-block")],description:Object(i.__)("Display a grid of on sale products.","woo-gutenberg-products-block"),supports:{align:["wide","full"],html:!1},attributes:N({},x.a,{orderby:{type:"string",default:"date"}}),transforms:{from:[{type:"block",blocks:Object(s.without)(x.b,"woocommerce/product-on-sale"),transform:function(e){return Object(u.createBlock)("woocommerce/product-on-sale",e)}}]},deprecated:[{attributes:N({},x.a,{orderby:{type:"string",default:"date"}}),save:Object(S.a)("woocommerce/product-on-sale")}],edit:function(e){return Object(c.createElement)(E,e)},save:function(){return null}})},59:function(e,t){!function(){e.exports=this.wp.dom}()},62:function(e,t){},63:function(e,t){},64:function(e,t){},66:function(e,t){},67:function(e,t){}});
|
build/product-search.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
this.wc=this.wc||{},this.wc.blocks=this.wc.blocks||{},this.wc.blocks["product-search"]=function(e){function t(t){for(var c,l,a=t[0],s=t[1],i=t[2],b=0,p=[];b<a.length;b++)l=a[b],Object.prototype.hasOwnProperty.call(o,l)&&o[l]&&p.push(o[l][0]),o[l]=0;for(c in s)Object.prototype.hasOwnProperty.call(s,c)&&(e[c]=s[c]);for(u&&u(t);p.length;)p.shift()();return n.push.apply(n,i||[]),r()}function r(){for(var e,t=0;t<n.length;t++){for(var r=n[t],c=!0,a=1;a<r.length;a++){var s=r[a];0!==o[s]&&(c=!1)}c&&(n.splice(t--,1),e=l(l.s=r[0]))}return e}var c={},o={13:0},n=[];function l(t){if(c[t])return c[t].exports;var r=c[t]={i:t,l:!1,exports:{}};return e[t].call(r.exports,r,r.exports,l),r.l=!0,r.exports}l.m=e,l.c=c,l.d=function(e,t,r){l.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},l.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},l.t=function(e,t){if(1&t&&(e=l(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(l.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var c in e)l.d(r,c,function(t){return e[t]}.bind(null,c));return r},l.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return l.d(t,"a",t),t},l.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},l.p="";var a=window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[],s=a.push.bind(a);a.push=t,a=a.slice();for(var i=0;i<a.length;i++)t(a[i]);var u=s;return n.push([
|
1 |
+
this.wc=this.wc||{},this.wc.blocks=this.wc.blocks||{},this.wc.blocks["product-search"]=function(e){function t(t){for(var c,l,a=t[0],s=t[1],i=t[2],b=0,p=[];b<a.length;b++)l=a[b],Object.prototype.hasOwnProperty.call(o,l)&&o[l]&&p.push(o[l][0]),o[l]=0;for(c in s)Object.prototype.hasOwnProperty.call(s,c)&&(e[c]=s[c]);for(u&&u(t);p.length;)p.shift()();return n.push.apply(n,i||[]),r()}function r(){for(var e,t=0;t<n.length;t++){for(var r=n[t],c=!0,a=1;a<r.length;a++){var s=r[a];0!==o[s]&&(c=!1)}c&&(n.splice(t--,1),e=l(l.s=r[0]))}return e}var c={},o={13:0},n=[];function l(t){if(c[t])return c[t].exports;var r=c[t]={i:t,l:!1,exports:{}};return e[t].call(r.exports,r,r.exports,l),r.l=!0,r.exports}l.m=e,l.c=c,l.d=function(e,t,r){l.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},l.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},l.t=function(e,t){if(1&t&&(e=l(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(l.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var c in e)l.d(r,c,function(t){return e[t]}.bind(null,c));return r},l.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return l.d(t,"a",t),t},l.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},l.p="";var a=window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[],s=a.push.bind(a);a.push=t,a=a.slice();for(var i=0;i<a.length;i++)t(a[i]);var u=s;return n.push([572,2,1,0]),r()}({0:function(e,t){!function(){e.exports=this.wp.element}()},1:function(e,t){!function(){e.exports=this.wp.i18n}()},17:function(e,t){!function(){e.exports=this.wp.editor}()},20:function(e,t){!function(){e.exports=this.wp.compose}()},22:function(e,t){!function(){e.exports=this.wp.blocks}()},296:function(e,t,r){var c=r(551);"string"==typeof c&&(c=[[e.i,c,""]]);var o={insert:"head",singleton:!1};r(34)(c,o);c.locals&&(e.exports=c.locals)},3:function(e,t){!function(){e.exports=this.wp.components}()},5:function(e,t){!function(){e.exports=this.wc["wc-block-settings"]}()},551:function(e,t,r){},572:function(e,t,r){"use strict";r.r(t);var c=r(15),o=r.n(c),n=r(0),l=r(1),a=r(22),s=r(17),i=r(3),u=(r(295),r(296),r(7)),b=r.n(u),p=r(8),d=r.n(p),h=r(9),f=r.n(h),m=r(10),w=r.n(m),g=r(11),_=r.n(g),O=r(6),j=r.n(O),v=(r(2),r(20)),k=r(5),y=function(e){function t(){return b()(this,t),f()(this,w()(t).apply(this,arguments))}return _()(t,e),d()(t,[{key:"renderView",value:function(){var e=this.props.attributes,t=e.label,r=e.placeholder,c=e.formId,o=e.className,a=e.hasLabel,s=e.align,i=j()("wc-block-product-search",s?"align"+s:"",o);return Object(n.createElement)("div",{className:i},Object(n.createElement)("form",{role:"search",method:"get",action:k.HOME_URL},Object(n.createElement)("label",{htmlFor:c,className:a?"wc-block-product-search__label":"wc-block-product-search__label screen-reader-text"},t),Object(n.createElement)("div",{className:"wc-block-product-search__fields"},Object(n.createElement)("input",{type:"search",id:c,className:"wc-block-product-search__field",placeholder:r,name:"s"}),Object(n.createElement)("input",{type:"hidden",name:"post_type",value:"product"}),Object(n.createElement)("button",{type:"submit",className:"wc-block-product-search__button",label:Object(l.__)("Search","woo-gutenberg-products-block")},Object(n.createElement)("svg",{"aria-hidden":"true",role:"img",focusable:"false",className:"dashicon dashicons-arrow-right-alt2",xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 20 20"},Object(n.createElement)("path",{d:"M6 15l5-5-5-5 1-2 7 7-7 7z"}))))))}},{key:"renderEdit",value:function(){var e=this.props,t=e.attributes,r=e.setAttributes,c=e.instanceId,o=t.label,a=t.placeholder,i=t.formId,u=t.className,b=t.hasLabel,p=t.align,d=j()("wc-block-product-search",p?"align"+p:"",u);return i||r({formId:"wc-block-product-search-".concat(c)}),Object(n.createElement)("div",{className:d},!!b&&Object(n.createElement)(s.PlainText,{className:"wc-block-product-search__label",value:o,onChange:function(e){return r({label:e})}}),Object(n.createElement)("div",{className:"wc-block-product-search__fields"},Object(n.createElement)(s.PlainText,{className:"wc-block-product-search__field input-control",value:a,onChange:function(e){return r({placeholder:e})}}),Object(n.createElement)("button",{type:"submit",className:"wc-block-product-search__button",label:Object(l.__)("Search","woo-gutenberg-products-block"),onClick:function(e){return e.preventDefault()},tabIndex:"-1"},Object(n.createElement)("svg",{"aria-hidden":"true",role:"img",focusable:"false",className:"dashicon dashicons-arrow-right-alt2",xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 20 20"},Object(n.createElement)("path",{d:"M6 15l5-5-5-5 1-2 7 7-7 7z"})))))}},{key:"render",value:function(){return this.props.isPreview?this.renderEdit():this.renderView()}}]),t}(n.Component),E=Object(v.compose)([v.withInstanceId])(y);Object(a.registerBlockType)("woocommerce/product-search",{title:Object(l.__)("Product Search","woo-gutenberg-products-block"),icon:{src:"search",foreground:"#96588a"},category:"woocommerce",keywords:[Object(l.__)("WooCommerce","woo-gutenberg-products-block")],description:Object(l.__)("Help visitors find your products.","woo-gutenberg-products-block"),supports:{align:["wide","full"]},attributes:{hasLabel:{type:"boolean",default:!0},label:{type:"string",default:Object(l.__)("Search","woo-gutenberg-products-block"),source:"text",selector:"label"},placeholder:{type:"string",default:Object(l.__)("Search products...","woo-gutenberg-products-block"),source:"attribute",selector:"input.wc-block-product-search__field",attribute:"placeholder"},formId:{type:"string",default:""}},edit:function(e){var t=e.attributes,r=e.setAttributes,c=t.hasLabel;return Object(n.createElement)(n.Fragment,null,Object(n.createElement)(s.InspectorControls,{key:"inspector"},Object(n.createElement)(i.PanelBody,{title:Object(l.__)("Content","woo-gutenberg-products-block"),initialOpen:!0},Object(n.createElement)(i.ToggleControl,{label:Object(l.__)("Show search field label","woo-gutenberg-products-block"),help:c?Object(l.__)("Label is visible.","woo-gutenberg-products-block"):Object(l.__)("Label is hidden.","woo-gutenberg-products-block"),checked:c,onChange:function(){return r({hasLabel:!c})}}))),Object(n.createElement)(E,o()({},e,{isPreview:!0})))},save:function(e){return Object(n.createElement)("div",null,Object(n.createElement)(E,e))}})}});
|
build/product-tag.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
this.wc=this.wc||{},this.wc.blocks=this.wc.blocks||{},this.wc.blocks["product-tag"]=function(t){function e(e){for(var n,i,s=e[0],a=e[1],u=e[2],b=0,d=[];b<s.length;b++)i=s[b],Object.prototype.hasOwnProperty.call(r,i)&&r[i]&&d.push(r[i][0]),r[i]=0;for(n in a)Object.prototype.hasOwnProperty.call(a,n)&&(t[n]=a[n]);for(l&&l(e);d.length;)d.shift()();return c.push.apply(c,u||[]),o()}function o(){for(var t,e=0;e<c.length;e++){for(var o=c[e],n=!0,s=1;s<o.length;s++){var a=o[s];0!==r[a]&&(n=!1)}n&&(c.splice(e--,1),t=i(i.s=o[0]))}return t}var n={},r={14:0},c=[];function i(e){if(n[e])return n[e].exports;var o=n[e]={i:e,l:!1,exports:{}};return t[e].call(o.exports,o,o.exports,i),o.l=!0,o.exports}i.m=t,i.c=n,i.d=function(t,e,o){i.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:o})},i.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},i.t=function(t,e){if(1&e&&(t=i(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var o=Object.create(null);if(i.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var n in t)i.d(o,n,function(e){return t[e]}.bind(null,n));return o},i.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return i.d(e,"a",e),e},i.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},i.p="";var s=window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[],a=s.push.bind(s);s.push=e,s=s.slice();for(var u=0;u<s.length;u++)e(s[u]);var l=a;return c.push([553,2,1,0]),o()}({0:function(t,e){!function(){t.exports=this.wp.element}()},1:function(t,e){!function(){t.exports=this.wp.i18n}()},13:function(t,e){!function(){t.exports=this.React}()},14:function(t,e){!function(){t.exports=this.moment}()},17:function(t,e){!function(){t.exports=this.wp.apiFetch}()},18:function(t,e){!function(){t.exports=this.wp.editor}()},19:function(t,e){!function(){t.exports=this.wp.url}()},2:function(t,e){!function(){t.exports=this.wp.components}()},21:function(t,e){!function(){t.exports=this.wp.compose}()},23:function(t,e){!function(){t.exports=this.wp.blocks}()},25:function(t,e,o){"use strict";o.d(e,"d",function(){return d}),o.d(e,"b",function(){return g}),o.d(e,"c",function(){return p}),o.d(e,"a",function(){return f});var n=o(20),r=o.n(n),c=o(19),i=o(17),s=o.n(i),a=o(4),u=o(5);function l(t,e){var o=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),o.push.apply(o,n)}return o}function b(t){for(var e=1;e<arguments.length;e++){var o=null!=arguments[e]?arguments[e]:{};e%2?l(o,!0).forEach(function(e){r()(t,e,o[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(o)):l(o).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(o,e))})}return t}var d=function(t){var e=t.selected,o=void 0===e?[]:e,n=t.search,r=void 0===n?"":n,i=t.queryArgs,l=function(t){var e=t.selected,o=void 0===e?[]:e,n=t.search,r=void 0===n?"":n,i=t.queryArgs,s=void 0===i?[]:i,a={per_page:u.IS_LARGE_CATALOG?100:-1,catalog_visibility:"any",status:"publish",search:r,orderby:"title",order:"asc"},l=[Object(c.addQueryArgs)(u.ENDPOINTS.products,b({},a,{},s))];return u.IS_LARGE_CATALOG&&o.length&&l.push(Object(c.addQueryArgs)(u.ENDPOINTS.products,{catalog_visibility:"any",status:"publish",include:o})),l}({selected:o,search:r,queryArgs:void 0===i?[]:i});return Promise.all(l.map(function(t){return s()({path:t})})).then(function(t){return Object(a.uniqBy)(Object(a.flatten)(t),"id")})},g=function(t){return s()({path:"".concat(u.ENDPOINTS.products,"/").concat(t)})},p=function(t){var e=t.selected,o=function(t){var e=t.selected,o=void 0===e?[]:e,n=t.search,r=[Object(c.addQueryArgs)("".concat(u.ENDPOINTS.products,"/tags"),{per_page:u.LIMIT_TAGS?100:-1,orderby:u.LIMIT_TAGS?"count":"name",order:u.LIMIT_TAGS?"desc":"asc",search:n})];return u.LIMIT_TAGS&&o.length&&r.push(Object(c.addQueryArgs)("".concat(u.ENDPOINTS.products,"/tags"),{include:o})),r}({selected:void 0===e?[]:e,search:t.search});return Promise.all(o.map(function(t){return s()({path:t})})).then(function(t){return Object(a.uniqBy)(Object(a.flatten)(t),"id")})},f=function(t){return s()({path:"".concat(u.ENDPOINTS.categories,"/").concat(t)})}},33:function(t,e){!function(){t.exports=this.wp.keycodes}()},37:function(t,e,o){"use strict";var n=o(20),r=o.n(n),c=o(0),i=o(1),s=(o(7),o(2));function a(t,e){var o=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),o.push.apply(o,n)}return o}function u(t){for(var e=1;e<arguments.length;e++){var o=null!=arguments[e]?arguments[e]:{};e%2?a(o,!0).forEach(function(e){r()(t,e,o[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(o)):a(o).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(o,e))})}return t}e.a=function(t){var e=t.onChange,o=t.settings,n=o.button,r=o.price,a=o.rating,l=o.title;return Object(c.createElement)(c.Fragment,null,Object(c.createElement)(s.ToggleControl,{label:Object(i.__)("Product title","woo-gutenberg-products-block"),help:l?Object(i.__)("Product title is visible.","woo-gutenberg-products-block"):Object(i.__)("Product title is hidden.","woo-gutenberg-products-block"),checked:l,onChange:function(){return e(u({},o,{title:!l}))}}),Object(c.createElement)(s.ToggleControl,{label:Object(i.__)("Product price","woo-gutenberg-products-block"),help:r?Object(i.__)("Product price is visible.","woo-gutenberg-products-block"):Object(i.__)("Product price is hidden.","woo-gutenberg-products-block"),checked:r,onChange:function(){return e(u({},o,{price:!r}))}}),Object(c.createElement)(s.ToggleControl,{label:Object(i.__)("Product rating","woo-gutenberg-products-block"),help:a?Object(i.__)("Product rating is visible.","woo-gutenberg-products-block"):Object(i.__)("Product rating is hidden.","woo-gutenberg-products-block"),checked:a,onChange:function(){return e(u({},o,{rating:!a}))}}),Object(c.createElement)(s.ToggleControl,{label:Object(i.__)("Add to Cart button","woo-gutenberg-products-block"),help:n?Object(i.__)("Add to Cart button is visible.","woo-gutenberg-products-block"):Object(i.__)("Add to Cart button is hidden.","woo-gutenberg-products-block"),checked:n,onChange:function(){return e(u({},o,{button:!n}))}}))}},4:function(t,e){!function(){t.exports=this.lodash}()},44:function(t,e){!function(){t.exports=this.ReactDOM}()},45:function(t,e,o){"use strict";var n=o(0),r=o(1),c=o(4),i=(o(7),o(2)),s=o(5);e.a=function(t){var e=t.columns,o=t.rows,a=t.setAttributes,u=t.alignButtons;return Object(n.createElement)(n.Fragment,null,Object(n.createElement)(i.RangeControl,{label:Object(r.__)("Columns","woo-gutenberg-products-block"),value:e,onChange:function(t){var e=Object(c.clamp)(t,s.MIN_COLUMNS,s.MAX_COLUMNS);a({columns:Object(c.isNaN)(e)?"":e})},min:s.MIN_COLUMNS,max:s.MAX_COLUMNS}),Object(n.createElement)(i.RangeControl,{label:Object(r.__)("Rows","woo-gutenberg-products-block"),value:o,onChange:function(t){var e=Object(c.clamp)(t,s.MIN_ROWS,s.MAX_ROWS);a({rows:Object(c.isNaN)(e)?"":e})},min:s.MIN_ROWS,max:s.MAX_ROWS}),Object(n.createElement)(i.ToggleControl,{label:Object(r.__)("Align Add to Cart buttons","woo-gutenberg-products-block"),help:u?Object(r.__)("Buttons are aligned vertically.","woo-gutenberg-products-block"):Object(r.__)("Buttons follow content.","woo-gutenberg-products-block"),checked:u,onChange:function(){return a({alignButtons:!u})}}))}},47:function(t,e){!function(){t.exports=this.wp.viewport}()},5:function(t,e){!function(){t.exports=this.wc["wc-block-settings"]}()},51:function(t,e){!function(){t.exports=this.wp.hooks}()},53:function(t,e){!function(){t.exports=this.wp.htmlEntities}()},537:function(t,e,o){var n=o(538);"string"==typeof n&&(n=[[t.i,n,""]]);var r={insert:"head",singleton:!1};o(35)(n,r);n.locals&&(t.exports=n.locals)},538:function(t,e,o){},54:function(t,e){!function(){t.exports=this.wp.date}()},553:function(t,e,o){"use strict";o.r(e);var n=o(0),r=o(1),c=o(23),i=o(5),s=(o(537),o(20)),a=o.n(s),u=o(8),l=o.n(u),b=o(9),d=o.n(b),g=o(10),p=o.n(g),f=o(11),h=o.n(f),O=o(15),j=o.n(O),_=o(12),w=o.n(_),m=o(18),y=o(2),v=(o(7),o(37)),k=o(45),E=o(16),P=o.n(E),S=o(4),C=o(26),A=o(25),T=(o(539),function(t){function e(){var t;return l()(this,e),(t=p()(this,h()(e).apply(this,arguments))).state={list:[],loading:!0},t.renderItem=t.renderItem.bind(j()(t)),t.debouncedOnSearch=Object(S.debounce)(t.onSearch.bind(j()(t)),400),t}return w()(e,t),d()(e,[{key:"componentDidMount",value:function(){var t=this,e=this.props.selected;Object(A.c)({selected:e}).then(function(e){t.setState({list:e,loading:!1})}).catch(function(){t.setState({list:[],loading:!1})})}},{key:"onSearch",value:function(t){var e=this,o=this.props.selected;this.setState({loading:!0}),Object(A.c)({selected:o,search:t}).then(function(t){e.setState({list:t,loading:!1})}).catch(function(){e.setState({list:[],loading:!1})})}},{key:"renderItem",value:function(t){var e=t.item,o=t.search,c=t.depth,i=void 0===c?0:c,s=["woocommerce-product-tags__item"];o.length&&s.push("is-searching"),0===i&&0!==e.parent&&s.push("is-skip-level");var a=e.breadcrumbs.length?"".concat(e.breadcrumbs.join(", "),", ").concat(e.name):e.name;return Object(n.createElement)(C.b,P()({className:s.join(" ")},t,{showCount:!0,"aria-label":Object(r.sprintf)(Object(r._n)("%d product tagged as %s","%d products tagged as %s",e.count,"woo-gutenberg-products-block"),e.count,a)}))}},{key:"render",value:function(){var t=this.state,e=t.list,o=t.loading,c=this.props,s=c.onChange,a=c.onOperatorChange,u=c.operator,l=c.selected,b={clear:Object(r.__)("Clear all product tags","woo-gutenberg-products-block"),list:Object(r.__)("Product Tags","woo-gutenberg-products-block"),noItems:Object(r.__)("Your store doesn't have any product tags.","woo-gutenberg-products-block"),search:Object(r.__)("Search for product tags","woo-gutenberg-products-block"),selected:function(t){return Object(r.sprintf)(Object(r._n)("%d tag selected","%d tags selected",t,"woo-gutenberg-products-block"),t)},updated:Object(r.__)("Tag search results updated.","woo-gutenberg-products-block")};return Object(n.createElement)(n.Fragment,null,Object(n.createElement)(C.a,{className:"woocommerce-product-tags",list:e,isLoading:o,selected:l.map(function(t){return Object(S.find)(e,{id:t})}).filter(Boolean),onChange:s,onSearch:i.LIMIT_TAGS?this.debouncedOnSearch:null,renderItem:this.renderItem,messages:b,isHierarchical:!0}),!!a&&Object(n.createElement)("div",{className:l.length<2?"screen-reader-text":""},Object(n.createElement)(y.SelectControl,{className:"woocommerce-product-tags__operator",label:Object(r.__)("Display products matching","woo-gutenberg-products-block"),help:Object(r.__)("Pick at least two tags to use this setting.","woo-gutenberg-products-block"),value:u,onChange:a,options:[{label:Object(r.__)("Any selected tags","woo-gutenberg-products-block"),value:"any"},{label:Object(r.__)("All selected tags","woo-gutenberg-products-block"),value:"all"}]})))}}]),e}(n.Component));T.defaultProps={operator:"any"};var N=T,I=o(57);function M(t,e){var o=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),o.push.apply(o,n)}return o}function D(t){for(var e=1;e<arguments.length;e++){var o=null!=arguments[e]?arguments[e]:{};e%2?M(o,!0).forEach(function(e){a()(t,e,o[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(o)):M(o).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(o,e))})}return t}var x=function(t){function e(){var t;return l()(this,e),(t=p()(this,h()(e).apply(this,arguments))).state={changedAttributes:{},isEditing:!1},t.startEditing=t.startEditing.bind(j()(t)),t.stopEditing=t.stopEditing.bind(j()(t)),t.setChangedAttributes=t.setChangedAttributes.bind(j()(t)),t.save=t.save.bind(j()(t)),t}return w()(e,t),d()(e,[{key:"componentDidMount",value:function(){this.props.attributes.tags.length||this.setState({isEditing:!0})}},{key:"startEditing",value:function(){this.setState({isEditing:!0,changedAttributes:{}})}},{key:"stopEditing",value:function(){this.setState({isEditing:!1,changedAttributes:{}})}},{key:"setChangedAttributes",value:function(t){this.setState(function(e){return{changedAttributes:D({},e.changedAttributes,{},t)}})}},{key:"save",value:function(){var t=this.state.changedAttributes;(0,this.props.setAttributes)(t),this.stopEditing()}},{key:"getInspectorControls",value:function(){var t=this.props,e=t.attributes,o=t.setAttributes,c=this.state.isEditing,i=e.columns,s=e.tagOperator,a=e.contentVisibility,u=e.orderby,l=e.rows,b=e.alignButtons;return Object(n.createElement)(m.InspectorControls,{key:"inspector"},Object(n.createElement)(y.PanelBody,{title:Object(r.__)("Product Tag","woo-gutenberg-products-block"),initialOpen:!e.tags.length&&!c},Object(n.createElement)(N,{selected:e.tags,onChange:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],e=t.map(function(t){return t.id});o({tags:e})},operator:s,onOperatorChange:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"any";return o({tagOperator:t})}})),Object(n.createElement)(y.PanelBody,{title:Object(r.__)("Layout","woo-gutenberg-products-block"),initialOpen:!0},Object(n.createElement)(k.a,{columns:i,rows:l,alignButtons:b,setAttributes:o})),Object(n.createElement)(y.PanelBody,{title:Object(r.__)("Content","woo-gutenberg-products-block"),initialOpen:!0},Object(n.createElement)(v.a,{settings:a,onChange:function(t){return o({contentVisibility:t})}})),Object(n.createElement)(y.PanelBody,{title:Object(r.__)("Order By","woo-gutenberg-products-block"),initialOpen:!1},Object(n.createElement)(I.a,{setAttributes:o,value:u})))}},{key:"renderEditMode",value:function(){var t=this,e=this.props,o=e.attributes,c=e.debouncedSpeak,i=D({},o,{},this.state.changedAttributes);return Object(n.createElement)(y.Placeholder,{icon:"tag",label:Object(r.__)("Products by Tag","woo-gutenberg-products-block"),className:"wc-block-products-grid wc-block-product-tag"},Object(r.__)("Display a grid of products from your selected tags.","woo-gutenberg-products-block"),Object(n.createElement)("div",{className:"wc-block-product-tag__selection"},Object(n.createElement)(N,{selected:i.tags,onChange:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],o=e.map(function(t){return t.id});t.setChangedAttributes({tags:o})},operator:i.tagOperator,onOperatorChange:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"any";return t.setChangedAttributes({tagOperator:e})}}),Object(n.createElement)(y.Button,{isDefault:!0,onClick:function(){t.save(),c(Object(r.__)("Showing Products by Tag block preview.","woo-gutenberg-products-block"))}},Object(r.__)("Done","woo-gutenberg-products-block")),Object(n.createElement)(y.Button,{className:"wc-block-product-tag__cancel-button",isTertiary:!0,onClick:function(){t.stopEditing(),c(Object(r.__)("Showing Products by Tag block preview.","woo-gutenberg-products-block"))}},Object(r.__)("Cancel","woo-gutenberg-products-block"))))}},{key:"renderViewMode",value:function(){var t=this.props,e=t.attributes,o=t.name,c=e.tags.length;return Object(n.createElement)(y.Disabled,null,c?Object(n.createElement)(m.ServerSideRender,{block:o,attributes:e}):Object(n.createElement)(y.Placeholder,{icon:"tag",label:Object(r.__)("Products by Tag","woo-gutenberg-products-block"),className:"wc-block-products-grid wc-block-product-tag"},Object(r.__)("This block displays products from selected tags. Select at least one tag to display its products.","woo-gutenberg-products-block")))}},{key:"render",value:function(){var t=this,e=this.state.isEditing;return Object(n.createElement)(n.Fragment,null,i.HAS_TAGS?Object(n.createElement)(n.Fragment,null,Object(n.createElement)(m.BlockControls,null,Object(n.createElement)(y.Toolbar,{controls:[{icon:"edit",title:Object(r.__)("Edit"),onClick:function(){return e?t.stopEditing():t.startEditing()},isActive:e}]})),this.getInspectorControls(),e?this.renderEditMode():this.renderViewMode()):Object(n.createElement)(y.Placeholder,{icon:"tag",label:Object(r.__)("Products by Tag","woo-gutenberg-products-block"),className:"wc-block-products-grid wc-block-product-tag"},Object(r.__)("This block displays products from selected tags. In order to preview this you'll first need to create a product and assign it some tags.","woo-gutenberg-products-block")))}}]),e}(n.Component),B=Object(y.withSpokenMessages)(x);Object(c.registerBlockType)("woocommerce/product-tag",{title:Object(r.__)("Products by Tag","woo-gutenberg-products-block"),icon:{src:"tag",foreground:"#96588a"},category:"woocommerce",keywords:[Object(r.__)("WooCommerce","woo-gutenberg-products-block")],description:Object(r.__)("Display a grid of products from your selected tags.","woo-gutenberg-products-block"),supports:{align:["wide","full"],html:!1},attributes:{columns:{type:"number",default:i.DEFAULT_COLUMNS},rows:{type:"number",default:i.DEFAULT_ROWS},alignButtons:{type:"boolean",default:!1},contentVisibility:{type:"object",default:{title:!0,price:!0,rating:!0,button:!0}},tags:{type:"array",default:[]},tagOperator:{type:"string",default:"any"},orderby:{type:"string",default:"date"}},edit:function(t){return Object(n.createElement)(B,t)},save:function(){return null}})},57:function(t,e,o){"use strict";var n=o(0),r=o(1),c=o(2);o(7);e.a=function(t){var e=t.value,o=t.setAttributes;return Object(n.createElement)(c.SelectControl,{label:Object(r.__)("Order products by","woo-gutenberg-products-block"),value:e,options:[{label:Object(r.__)("Newness - newest first","woo-gutenberg-products-block"),value:"date"},{label:Object(r.__)("Price - low to high","woo-gutenberg-products-block"),value:"price_asc"},{label:Object(r.__)("Price - high to low","woo-gutenberg-products-block"),value:"price_desc"},{label:Object(r.__)("Rating - highest first","woo-gutenberg-products-block"),value:"rating"},{label:Object(r.__)("Sales - most first","woo-gutenberg-products-block"),value:"popularity"},{label:Object(r.__)("Title - alphabetical","woo-gutenberg-products-block"),value:"title"},{label:Object(r.__)("Menu Order","woo-gutenberg-products-block"),value:"menu_order"}],onChange:function(t){return o({orderby:t})}})}},61:function(t,e){!function(){t.exports=this.wp.dom}()},64:function(t,e){},65:function(t,e){},67:function(t,e){},68:function(t,e){}});
|
1 |
+
this.wc=this.wc||{},this.wc.blocks=this.wc.blocks||{},this.wc.blocks["product-tag"]=function(t){function e(e){for(var n,i,s=e[0],u=e[1],a=e[2],b=0,d=[];b<s.length;b++)i=s[b],Object.prototype.hasOwnProperty.call(r,i)&&r[i]&&d.push(r[i][0]),r[i]=0;for(n in u)Object.prototype.hasOwnProperty.call(u,n)&&(t[n]=u[n]);for(l&&l(e);d.length;)d.shift()();return c.push.apply(c,a||[]),o()}function o(){for(var t,e=0;e<c.length;e++){for(var o=c[e],n=!0,s=1;s<o.length;s++){var u=o[s];0!==r[u]&&(n=!1)}n&&(c.splice(e--,1),t=i(i.s=o[0]))}return t}var n={},r={14:0},c=[];function i(e){if(n[e])return n[e].exports;var o=n[e]={i:e,l:!1,exports:{}};return t[e].call(o.exports,o,o.exports,i),o.l=!0,o.exports}i.m=t,i.c=n,i.d=function(t,e,o){i.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:o})},i.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},i.t=function(t,e){if(1&e&&(t=i(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var o=Object.create(null);if(i.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var n in t)i.d(o,n,function(e){return t[e]}.bind(null,n));return o},i.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return i.d(e,"a",e),e},i.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},i.p="";var s=window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[],u=s.push.bind(s);s.push=e,s=s.slice();for(var a=0;a<s.length;a++)e(s[a]);var l=u;return c.push([568,2,1,0]),o()}({0:function(t,e){!function(){t.exports=this.wp.element}()},1:function(t,e){!function(){t.exports=this.wp.i18n}()},12:function(t,e){!function(){t.exports=this.React}()},13:function(t,e){!function(){t.exports=this.moment}()},16:function(t,e){!function(){t.exports=this.wp.apiFetch}()},17:function(t,e){!function(){t.exports=this.wp.editor}()},18:function(t,e){!function(){t.exports=this.wp.url}()},20:function(t,e){!function(){t.exports=this.wp.compose}()},22:function(t,e){!function(){t.exports=this.wp.blocks}()},24:function(t,e,o){"use strict";o.d(e,"d",(function(){return d})),o.d(e,"b",(function(){return g})),o.d(e,"c",(function(){return p})),o.d(e,"a",(function(){return f}));var n=o(19),r=o.n(n),c=o(18),i=o(16),s=o.n(i),u=o(4),a=o(5);function l(t,e){var o=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),o.push.apply(o,n)}return o}function b(t){for(var e=1;e<arguments.length;e++){var o=null!=arguments[e]?arguments[e]:{};e%2?l(o,!0).forEach((function(e){r()(t,e,o[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(o)):l(o).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(o,e))}))}return t}var d=function(t){var e=t.selected,o=void 0===e?[]:e,n=t.search,r=void 0===n?"":n,i=t.queryArgs,l=function(t){var e=t.selected,o=void 0===e?[]:e,n=t.search,r=void 0===n?"":n,i=t.queryArgs,s=void 0===i?[]:i,u={per_page:a.IS_LARGE_CATALOG?100:-1,catalog_visibility:"any",status:"publish",search:r,orderby:"title",order:"asc"},l=[Object(c.addQueryArgs)(a.ENDPOINTS.products,b({},u,{},s))];return a.IS_LARGE_CATALOG&&o.length&&l.push(Object(c.addQueryArgs)(a.ENDPOINTS.products,{catalog_visibility:"any",status:"publish",include:o})),l}({selected:o,search:r,queryArgs:void 0===i?[]:i});return Promise.all(l.map((function(t){return s()({path:t})}))).then((function(t){return Object(u.uniqBy)(Object(u.flatten)(t),"id")}))},g=function(t){return s()({path:"".concat(a.ENDPOINTS.products,"/").concat(t)})},p=function(t){var e=t.selected,o=function(t){var e=t.selected,o=void 0===e?[]:e,n=t.search,r=[Object(c.addQueryArgs)("".concat(a.ENDPOINTS.products,"/tags"),{per_page:a.LIMIT_TAGS?100:-1,orderby:a.LIMIT_TAGS?"count":"name",order:a.LIMIT_TAGS?"desc":"asc",search:n})];return a.LIMIT_TAGS&&o.length&&r.push(Object(c.addQueryArgs)("".concat(a.ENDPOINTS.products,"/tags"),{include:o})),r}({selected:void 0===e?[]:e,search:t.search});return Promise.all(o.map((function(t){return s()({path:t})}))).then((function(t){return Object(u.uniqBy)(Object(u.flatten)(t),"id")}))},f=function(t){return s()({path:"".concat(a.ENDPOINTS.categories,"/").concat(t)})}},3:function(t,e){!function(){t.exports=this.wp.components}()},32:function(t,e){!function(){t.exports=this.wp.keycodes}()},36:function(t,e,o){"use strict";var n=o(19),r=o.n(n),c=o(0),i=o(1),s=(o(2),o(3));function u(t,e){var o=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),o.push.apply(o,n)}return o}function a(t){for(var e=1;e<arguments.length;e++){var o=null!=arguments[e]?arguments[e]:{};e%2?u(o,!0).forEach((function(e){r()(t,e,o[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(o)):u(o).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(o,e))}))}return t}e.a=function(t){var e=t.onChange,o=t.settings,n=o.button,r=o.price,u=o.rating,l=o.title;return Object(c.createElement)(c.Fragment,null,Object(c.createElement)(s.ToggleControl,{label:Object(i.__)("Product title","woo-gutenberg-products-block"),help:l?Object(i.__)("Product title is visible.","woo-gutenberg-products-block"):Object(i.__)("Product title is hidden.","woo-gutenberg-products-block"),checked:l,onChange:function(){return e(a({},o,{title:!l}))}}),Object(c.createElement)(s.ToggleControl,{label:Object(i.__)("Product price","woo-gutenberg-products-block"),help:r?Object(i.__)("Product price is visible.","woo-gutenberg-products-block"):Object(i.__)("Product price is hidden.","woo-gutenberg-products-block"),checked:r,onChange:function(){return e(a({},o,{price:!r}))}}),Object(c.createElement)(s.ToggleControl,{label:Object(i.__)("Product rating","woo-gutenberg-products-block"),help:u?Object(i.__)("Product rating is visible.","woo-gutenberg-products-block"):Object(i.__)("Product rating is hidden.","woo-gutenberg-products-block"),checked:u,onChange:function(){return e(a({},o,{rating:!u}))}}),Object(c.createElement)(s.ToggleControl,{label:Object(i.__)("Add to Cart button","woo-gutenberg-products-block"),help:n?Object(i.__)("Add to Cart button is visible.","woo-gutenberg-products-block"):Object(i.__)("Add to Cart button is hidden.","woo-gutenberg-products-block"),checked:n,onChange:function(){return e(a({},o,{button:!n}))}}))}},4:function(t,e){!function(){t.exports=this.lodash}()},43:function(t,e){!function(){t.exports=this.ReactDOM}()},44:function(t,e,o){"use strict";var n=o(0),r=o(1),c=o(4),i=(o(2),o(3)),s=o(5);e.a=function(t){var e=t.columns,o=t.rows,u=t.setAttributes,a=t.alignButtons;return Object(n.createElement)(n.Fragment,null,Object(n.createElement)(i.RangeControl,{label:Object(r.__)("Columns","woo-gutenberg-products-block"),value:e,onChange:function(t){var e=Object(c.clamp)(t,s.MIN_COLUMNS,s.MAX_COLUMNS);u({columns:Object(c.isNaN)(e)?"":e})},min:s.MIN_COLUMNS,max:s.MAX_COLUMNS}),Object(n.createElement)(i.RangeControl,{label:Object(r.__)("Rows","woo-gutenberg-products-block"),value:o,onChange:function(t){var e=Object(c.clamp)(t,s.MIN_ROWS,s.MAX_ROWS);u({rows:Object(c.isNaN)(e)?"":e})},min:s.MIN_ROWS,max:s.MAX_ROWS}),Object(n.createElement)(i.ToggleControl,{label:Object(r.__)("Align Add to Cart buttons","woo-gutenberg-products-block"),help:a?Object(r.__)("Buttons are aligned vertically.","woo-gutenberg-products-block"):Object(r.__)("Buttons follow content.","woo-gutenberg-products-block"),checked:a,onChange:function(){return u({alignButtons:!a})}}))}},46:function(t,e){!function(){t.exports=this.wp.viewport}()},5:function(t,e){!function(){t.exports=this.wc["wc-block-settings"]}()},50:function(t,e){!function(){t.exports=this.wp.hooks}()},52:function(t,e){!function(){t.exports=this.wp.htmlEntities}()},53:function(t,e){!function(){t.exports=this.wp.date}()},55:function(t,e,o){"use strict";var n=o(0),r=o(1),c=o(3);o(2);e.a=function(t){var e=t.value,o=t.setAttributes;return Object(n.createElement)(c.SelectControl,{label:Object(r.__)("Order products by","woo-gutenberg-products-block"),value:e,options:[{label:Object(r.__)("Newness - newest first","woo-gutenberg-products-block"),value:"date"},{label:Object(r.__)("Price - low to high","woo-gutenberg-products-block"),value:"price_asc"},{label:Object(r.__)("Price - high to low","woo-gutenberg-products-block"),value:"price_desc"},{label:Object(r.__)("Rating - highest first","woo-gutenberg-products-block"),value:"rating"},{label:Object(r.__)("Sales - most first","woo-gutenberg-products-block"),value:"popularity"},{label:Object(r.__)("Title - alphabetical","woo-gutenberg-products-block"),value:"title"},{label:Object(r.__)("Menu Order","woo-gutenberg-products-block"),value:"menu_order"}],onChange:function(t){return o({orderby:t})}})}},552:function(t,e,o){var n=o(553);"string"==typeof n&&(n=[[t.i,n,""]]);var r={insert:"head",singleton:!1};o(34)(n,r);n.locals&&(t.exports=n.locals)},553:function(t,e,o){},568:function(t,e,o){"use strict";o.r(e);var n=o(0),r=o(1),c=o(22),i=o(5),s=(o(552),o(19)),u=o.n(s),a=o(7),l=o.n(a),b=o(8),d=o.n(b),g=o(9),p=o.n(g),f=o(10),h=o.n(f),O=o(14),j=o.n(O),_=o(11),w=o.n(_),m=o(17),y=o(3),v=(o(2),o(36)),k=o(44),E=o(15),P=o.n(E),S=o(4),C=o(25),A=o(24),T=(o(554),function(t){function e(){var t;return l()(this,e),(t=p()(this,h()(e).apply(this,arguments))).state={list:[],loading:!0},t.renderItem=t.renderItem.bind(j()(t)),t.debouncedOnSearch=Object(S.debounce)(t.onSearch.bind(j()(t)),400),t}return w()(e,t),d()(e,[{key:"componentDidMount",value:function(){var t=this,e=this.props.selected;Object(A.c)({selected:e}).then((function(e){t.setState({list:e,loading:!1})})).catch((function(){t.setState({list:[],loading:!1})}))}},{key:"onSearch",value:function(t){var e=this,o=this.props.selected;this.setState({loading:!0}),Object(A.c)({selected:o,search:t}).then((function(t){e.setState({list:t,loading:!1})})).catch((function(){e.setState({list:[],loading:!1})}))}},{key:"renderItem",value:function(t){var e=t.item,o=t.search,c=t.depth,i=void 0===c?0:c,s=["woocommerce-product-tags__item"];o.length&&s.push("is-searching"),0===i&&0!==e.parent&&s.push("is-skip-level");var u=e.breadcrumbs.length?"".concat(e.breadcrumbs.join(", "),", ").concat(e.name):e.name;return Object(n.createElement)(C.b,P()({className:s.join(" ")},t,{showCount:!0,"aria-label":Object(r.sprintf)(Object(r._n)("%d product tagged as %s","%d products tagged as %s",e.count,"woo-gutenberg-products-block"),e.count,u)}))}},{key:"render",value:function(){var t=this.state,e=t.list,o=t.loading,c=this.props,s=c.onChange,u=c.onOperatorChange,a=c.operator,l=c.selected,b={clear:Object(r.__)("Clear all product tags","woo-gutenberg-products-block"),list:Object(r.__)("Product Tags","woo-gutenberg-products-block"),noItems:Object(r.__)("Your store doesn't have any product tags.","woo-gutenberg-products-block"),search:Object(r.__)("Search for product tags","woo-gutenberg-products-block"),selected:function(t){return Object(r.sprintf)(Object(r._n)("%d tag selected","%d tags selected",t,"woo-gutenberg-products-block"),t)},updated:Object(r.__)("Tag search results updated.","woo-gutenberg-products-block")};return Object(n.createElement)(n.Fragment,null,Object(n.createElement)(C.a,{className:"woocommerce-product-tags",list:e,isLoading:o,selected:l.map((function(t){return Object(S.find)(e,{id:t})})).filter(Boolean),onChange:s,onSearch:i.LIMIT_TAGS?this.debouncedOnSearch:null,renderItem:this.renderItem,messages:b,isHierarchical:!0}),!!u&&Object(n.createElement)("div",{className:l.length<2?"screen-reader-text":""},Object(n.createElement)(y.SelectControl,{className:"woocommerce-product-tags__operator",label:Object(r.__)("Display products matching","woo-gutenberg-products-block"),help:Object(r.__)("Pick at least two tags to use this setting.","woo-gutenberg-products-block"),value:a,onChange:u,options:[{label:Object(r.__)("Any selected tags","woo-gutenberg-products-block"),value:"any"},{label:Object(r.__)("All selected tags","woo-gutenberg-products-block"),value:"all"}]})))}}]),e}(n.Component));T.defaultProps={operator:"any"};var N=T,I=o(55);function M(t,e){var o=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),o.push.apply(o,n)}return o}function D(t){for(var e=1;e<arguments.length;e++){var o=null!=arguments[e]?arguments[e]:{};e%2?M(o,!0).forEach((function(e){u()(t,e,o[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(o)):M(o).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(o,e))}))}return t}var x=function(t){function e(){var t;return l()(this,e),(t=p()(this,h()(e).apply(this,arguments))).state={changedAttributes:{},isEditing:!1},t.startEditing=t.startEditing.bind(j()(t)),t.stopEditing=t.stopEditing.bind(j()(t)),t.setChangedAttributes=t.setChangedAttributes.bind(j()(t)),t.save=t.save.bind(j()(t)),t}return w()(e,t),d()(e,[{key:"componentDidMount",value:function(){this.props.attributes.tags.length||this.setState({isEditing:!0})}},{key:"startEditing",value:function(){this.setState({isEditing:!0,changedAttributes:{}})}},{key:"stopEditing",value:function(){this.setState({isEditing:!1,changedAttributes:{}})}},{key:"setChangedAttributes",value:function(t){this.setState((function(e){return{changedAttributes:D({},e.changedAttributes,{},t)}}))}},{key:"save",value:function(){var t=this.state.changedAttributes;(0,this.props.setAttributes)(t),this.stopEditing()}},{key:"getInspectorControls",value:function(){var t=this.props,e=t.attributes,o=t.setAttributes,c=this.state.isEditing,i=e.columns,s=e.tagOperator,u=e.contentVisibility,a=e.orderby,l=e.rows,b=e.alignButtons;return Object(n.createElement)(m.InspectorControls,{key:"inspector"},Object(n.createElement)(y.PanelBody,{title:Object(r.__)("Product Tag","woo-gutenberg-products-block"),initialOpen:!e.tags.length&&!c},Object(n.createElement)(N,{selected:e.tags,onChange:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],e=t.map((function(t){return t.id}));o({tags:e})},operator:s,onOperatorChange:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"any";return o({tagOperator:t})}})),Object(n.createElement)(y.PanelBody,{title:Object(r.__)("Layout","woo-gutenberg-products-block"),initialOpen:!0},Object(n.createElement)(k.a,{columns:i,rows:l,alignButtons:b,setAttributes:o})),Object(n.createElement)(y.PanelBody,{title:Object(r.__)("Content","woo-gutenberg-products-block"),initialOpen:!0},Object(n.createElement)(v.a,{settings:u,onChange:function(t){return o({contentVisibility:t})}})),Object(n.createElement)(y.PanelBody,{title:Object(r.__)("Order By","woo-gutenberg-products-block"),initialOpen:!1},Object(n.createElement)(I.a,{setAttributes:o,value:a})))}},{key:"renderEditMode",value:function(){var t=this,e=this.props,o=e.attributes,c=e.debouncedSpeak,i=D({},o,{},this.state.changedAttributes);return Object(n.createElement)(y.Placeholder,{icon:"tag",label:Object(r.__)("Products by Tag","woo-gutenberg-products-block"),className:"wc-block-products-grid wc-block-product-tag"},Object(r.__)("Display a grid of products from your selected tags.","woo-gutenberg-products-block"),Object(n.createElement)("div",{className:"wc-block-product-tag__selection"},Object(n.createElement)(N,{selected:i.tags,onChange:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],o=e.map((function(t){return t.id}));t.setChangedAttributes({tags:o})},operator:i.tagOperator,onOperatorChange:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"any";return t.setChangedAttributes({tagOperator:e})}}),Object(n.createElement)(y.Button,{isDefault:!0,onClick:function(){t.save(),c(Object(r.__)("Showing Products by Tag block preview.","woo-gutenberg-products-block"))}},Object(r.__)("Done","woo-gutenberg-products-block")),Object(n.createElement)(y.Button,{className:"wc-block-product-tag__cancel-button",isTertiary:!0,onClick:function(){t.stopEditing(),c(Object(r.__)("Showing Products by Tag block preview.","woo-gutenberg-products-block"))}},Object(r.__)("Cancel","woo-gutenberg-products-block"))))}},{key:"renderViewMode",value:function(){var t=this.props,e=t.attributes,o=t.name,c=e.tags.length;return Object(n.createElement)(y.Disabled,null,c?Object(n.createElement)(m.ServerSideRender,{block:o,attributes:e}):Object(n.createElement)(y.Placeholder,{icon:"tag",label:Object(r.__)("Products by Tag","woo-gutenberg-products-block"),className:"wc-block-products-grid wc-block-product-tag"},Object(r.__)("This block displays products from selected tags. Select at least one tag to display its products.","woo-gutenberg-products-block")))}},{key:"render",value:function(){var t=this,e=this.state.isEditing;return Object(n.createElement)(n.Fragment,null,i.HAS_TAGS?Object(n.createElement)(n.Fragment,null,Object(n.createElement)(m.BlockControls,null,Object(n.createElement)(y.Toolbar,{controls:[{icon:"edit",title:Object(r.__)("Edit"),onClick:function(){return e?t.stopEditing():t.startEditing()},isActive:e}]})),this.getInspectorControls(),e?this.renderEditMode():this.renderViewMode()):Object(n.createElement)(y.Placeholder,{icon:"tag",label:Object(r.__)("Products by Tag","woo-gutenberg-products-block"),className:"wc-block-products-grid wc-block-product-tag"},Object(r.__)("This block displays products from selected tags. In order to preview this you'll first need to create a product and assign it some tags.","woo-gutenberg-products-block")))}}]),e}(n.Component),B=Object(y.withSpokenMessages)(x);Object(c.registerBlockType)("woocommerce/product-tag",{title:Object(r.__)("Products by Tag","woo-gutenberg-products-block"),icon:{src:"tag",foreground:"#96588a"},category:"woocommerce",keywords:[Object(r.__)("WooCommerce","woo-gutenberg-products-block")],description:Object(r.__)("Display a grid of products from your selected tags.","woo-gutenberg-products-block"),supports:{align:["wide","full"],html:!1},attributes:{columns:{type:"number",default:i.DEFAULT_COLUMNS},rows:{type:"number",default:i.DEFAULT_ROWS},alignButtons:{type:"boolean",default:!1},contentVisibility:{type:"object",default:{title:!0,price:!0,rating:!0,button:!0}},tags:{type:"array",default:[]},tagOperator:{type:"string",default:"any"},orderby:{type:"string",default:"date"}},edit:function(t){return Object(n.createElement)(B,t)},save:function(){return null}})},59:function(t,e){!function(){t.exports=this.wp.dom}()},62:function(t,e){},63:function(t,e){},64:function(t,e){},66:function(t,e){},67:function(t,e){}});
|
build/product-top-rated.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
this.wc=this.wc||{},this.wc.blocks=this.wc.blocks||{},this.wc.blocks["product-top-rated"]=function(e){function t(t){for(var r,i,s=t[0],u=t[1],a=t[2],b=0,p=[];b<s.length;b++)i=s[b],Object.prototype.hasOwnProperty.call(n,i)&&n[i]&&p.push(n[i][0]),n[i]=0;for(r in u)Object.prototype.hasOwnProperty.call(u,r)&&(e[r]=u[r]);for(l&&l(t);p.length;)p.shift()();return c.push.apply(c,a||[]),o()}function o(){for(var e,t=0;t<c.length;t++){for(var o=c[t],r=!0,s=1;s<o.length;s++){var u=o[s];0!==n[u]&&(r=!1)}r&&(c.splice(t--,1),e=i(i.s=o[0]))}return e}var r={},n={15:0},c=[];function i(t){if(r[t])return r[t].exports;var o=r[t]={i:t,l:!1,exports:{}};return e[t].call(o.exports,o,o.exports,i),o.l=!0,o.exports}i.m=e,i.c=r,i.d=function(e,t,o){i.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:o})},i.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},i.t=function(e,t){if(1&t&&(e=i(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var o=Object.create(null);if(i.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)i.d(o,r,function(t){return e[t]}.bind(null,r));return o},i.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return i.d(t,"a",t),t},i.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},i.p="";var s=window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[],u=s.push.bind(s);s.push=t,s=s.slice();for(var a=0;a<s.length;a++)t(s[a]);var l=u;return c.push([558,1,0]),o()}({0:function(e,t){!function(){e.exports=this.wp.element}()},1:function(e,t){!function(){e.exports=this.wp.i18n}()},13:function(e,t){!function(){e.exports=this.React}()},14:function(e,t){!function(){e.exports=this.moment}()},17:function(e,t){!function(){e.exports=this.wp.apiFetch}()},18:function(e,t){!function(){e.exports=this.wp.editor}()},19:function(e,t){!function(){e.exports=this.wp.url}()},2:function(e,t){!function(){e.exports=this.wp.components}()},21:function(e,t){!function(){e.exports=this.wp.compose}()},23:function(e,t){!function(){e.exports=this.wp.blocks}()},33:function(e,t){!function(){e.exports=this.wp.keycodes}()},36:function(e,t,o){"use strict";o.d(t,"b",function(){return n});var r=o(5),n=["woocommerce/product-best-sellers","woocommerce/product-category","woocommerce/product-new","woocommerce/product-on-sale","woocommerce/product-top-rated"];t.a={columns:{type:"number",default:r.DEFAULT_COLUMNS},rows:{type:"number",default:r.DEFAULT_ROWS},alignButtons:{type:"boolean",default:!1},categories:{type:"array",default:[]},catOperator:{type:"string",default:"any"},contentVisibility:{type:"object",default:{title:!0,price:!0,rating:!0,button:!0}}}},37:function(e,t,o){"use strict";var r=o(20),n=o.n(r),c=o(0),i=o(1),s=(o(7),o(2));function u(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),o.push.apply(o,r)}return o}function a(e){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?u(o,!0).forEach(function(t){n()(e,t,o[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):u(o).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(o,t))})}return e}t.a=function(e){var t=e.onChange,o=e.settings,r=o.button,n=o.price,u=o.rating,l=o.title;return Object(c.createElement)(c.Fragment,null,Object(c.createElement)(s.ToggleControl,{label:Object(i.__)("Product title","woo-gutenberg-products-block"),help:l?Object(i.__)("Product title is visible.","woo-gutenberg-products-block"):Object(i.__)("Product title is hidden.","woo-gutenberg-products-block"),checked:l,onChange:function(){return t(a({},o,{title:!l}))}}),Object(c.createElement)(s.ToggleControl,{label:Object(i.__)("Product price","woo-gutenberg-products-block"),help:n?Object(i.__)("Product price is visible.","woo-gutenberg-products-block"):Object(i.__)("Product price is hidden.","woo-gutenberg-products-block"),checked:n,onChange:function(){return t(a({},o,{price:!n}))}}),Object(c.createElement)(s.ToggleControl,{label:Object(i.__)("Product rating","woo-gutenberg-products-block"),help:u?Object(i.__)("Product rating is visible.","woo-gutenberg-products-block"):Object(i.__)("Product rating is hidden.","woo-gutenberg-products-block"),checked:u,onChange:function(){return t(a({},o,{rating:!u}))}}),Object(c.createElement)(s.ToggleControl,{label:Object(i.__)("Add to Cart button","woo-gutenberg-products-block"),help:r?Object(i.__)("Add to Cart button is visible.","woo-gutenberg-products-block"):Object(i.__)("Add to Cart button is hidden.","woo-gutenberg-products-block"),checked:r,onChange:function(){return t(a({},o,{button:!r}))}}))}},4:function(e,t){!function(){e.exports=this.lodash}()},41:function(e,t,o){"use strict";var r=o(16),n=o.n(r),c=o(8),i=o.n(c),s=o(9),u=o.n(s),a=o(10),l=o.n(a),b=o(11),p=o.n(b),d=o(15),g=o.n(d),f=o(12),m=o.n(f),O=o(0),h=o(1),w=o(19),j=o(17),y=o.n(j),_=o(4),v=(o(7),o(26)),k=o(2),C=o(5),P=(o(86),function(e){function t(){var e;return i()(this,t),(e=l()(this,p()(t).apply(this,arguments))).state={list:[],loading:!0},e.renderItem=e.renderItem.bind(g()(e)),e}return m()(t,e),u()(t,[{key:"componentDidMount",value:function(){var e=this;y()({path:Object(w.addQueryArgs)("".concat(C.ENDPOINTS.products,"/categories"),{per_page:-1})}).then(function(t){e.setState({list:t,loading:!1})}).catch(function(){e.setState({list:[],loading:!1})})}},{key:"renderItem",value:function(e){var t=e.item,o=e.search,r=e.depth,c=void 0===r?0:r,i=["woocommerce-product-categories__item"];o.length&&i.push("is-searching"),0===c&&0!==t.parent&&i.push("is-skip-level");var s=t.breadcrumbs.length?"".concat(t.breadcrumbs.join(", "),", ").concat(t.name):t.name;return Object(O.createElement)(v.b,n()({className:i.join(" ")},e,{showCount:!0,"aria-label":Object(h.sprintf)(Object(h._n)("%s, has %d product","%s, has %d products",t.count,"woo-gutenberg-products-block"),s,t.count)}))}},{key:"render",value:function(){var e=this.state,t=e.list,o=e.loading,r=this.props,n=r.onChange,c=r.onOperatorChange,i=r.operator,s=r.selected,u=r.isSingle,a={clear:Object(h.__)("Clear all product categories","woo-gutenberg-products-block"),list:Object(h.__)("Product Categories","woo-gutenberg-products-block"),noItems:Object(h.__)("Your store doesn't have any product categories.","woo-gutenberg-products-block"),search:Object(h.__)("Search for product categories","woo-gutenberg-products-block"),selected:function(e){return Object(h.sprintf)(Object(h._n)("%d category selected","%d categories selected",e,"woo-gutenberg-products-block"),e)},updated:Object(h.__)("Category search results updated.","woo-gutenberg-products-block")};return Object(O.createElement)(O.Fragment,null,Object(O.createElement)(v.a,{className:"woocommerce-product-categories",list:t,isLoading:o,selected:s.map(function(e){return Object(_.find)(t,{id:e})}).filter(Boolean),onChange:n,renderItem:this.renderItem,messages:a,isHierarchical:!0,isSingle:u}),!!c&&Object(O.createElement)("div",{className:s.length<2?"screen-reader-text":""},Object(O.createElement)(k.SelectControl,{className:"woocommerce-product-categories__operator",label:Object(h.__)("Display products matching","woo-gutenberg-products-block"),help:Object(h.__)("Pick at least two categories to use this setting.","woo-gutenberg-products-block"),value:i,onChange:c,options:[{label:Object(h.__)("Any selected categories","woo-gutenberg-products-block"),value:"any"},{label:Object(h.__)("All selected categories","woo-gutenberg-products-block"),value:"all"}]})))}}]),t}(O.Component));P.defaultProps={operator:"any",isSingle:!1},t.a=P},44:function(e,t){!function(){e.exports=this.ReactDOM}()},45:function(e,t,o){"use strict";var r=o(0),n=o(1),c=o(4),i=(o(7),o(2)),s=o(5);t.a=function(e){var t=e.columns,o=e.rows,u=e.setAttributes,a=e.alignButtons;return Object(r.createElement)(r.Fragment,null,Object(r.createElement)(i.RangeControl,{label:Object(n.__)("Columns","woo-gutenberg-products-block"),value:t,onChange:function(e){var t=Object(c.clamp)(e,s.MIN_COLUMNS,s.MAX_COLUMNS);u({columns:Object(c.isNaN)(t)?"":t})},min:s.MIN_COLUMNS,max:s.MAX_COLUMNS}),Object(r.createElement)(i.RangeControl,{label:Object(n.__)("Rows","woo-gutenberg-products-block"),value:o,onChange:function(e){var t=Object(c.clamp)(e,s.MIN_ROWS,s.MAX_ROWS);u({rows:Object(c.isNaN)(t)?"":t})},min:s.MIN_ROWS,max:s.MAX_ROWS}),Object(r.createElement)(i.ToggleControl,{label:Object(n.__)("Align Add to Cart buttons","woo-gutenberg-products-block"),help:a?Object(n.__)("Buttons are aligned vertically.","woo-gutenberg-products-block"):Object(n.__)("Buttons follow content.","woo-gutenberg-products-block"),checked:a,onChange:function(){return u({alignButtons:!a})}}))}},46:function(e,t,o){"use strict";var r=o(0),n=o(6),c=o.n(n),i=o(58),s=o.n(i),u=o(5);o.d(t,"a",function(){return a});var a=function(e){return function(t){var o=t.attributes,n=o.align,i=o.contentVisibility,a=c()(n?"align".concat(n):"",{"is-hidden-title":!i.title,"is-hidden-price":!i.price,"is-hidden-rating":!i.rating,"is-hidden-button":!i.button});return Object(r.createElement)(r.RawHTML,{className:a},function(e,t){var o=e.attributes,r=o.attributes,n=o.attrOperator,c=o.categories,i=o.catOperator,a=o.orderby,l=o.products,b=o.columns||u.DEFAULT_COLUMNS,p=o.rows||u.DEFAULT_ROWS,d=new Map;switch(d.set("limit",p*b),d.set("columns",b),c&&c.length&&(d.set("category",c.join(",")),i&&"all"===i&&d.set("cat_operator","AND")),r&&r.length&&(d.set("terms",r.map(function(e){return e.id}).join(",")),d.set("attribute",r[0].attr_slug),n&&"all"===n&&d.set("terms_operator","AND")),a&&("price_desc"===a?(d.set("orderby","price"),d.set("order","DESC")):"price_asc"===a?(d.set("orderby","price"),d.set("order","ASC")):"date"===a?(d.set("orderby","date"),d.set("order","DESC")):d.set("orderby",a)),t){case"woocommerce/product-best-sellers":d.set("best_selling","1");break;case"woocommerce/product-top-rated":d.set("orderby","rating");break;case"woocommerce/product-on-sale":d.set("on_sale","1");break;case"woocommerce/product-new":d.set("orderby","date"),d.set("order","DESC");break;case"woocommerce/handpicked-products":if(!l.length)return"";d.set("ids",l.join(",")),d.set("limit",l.length);break;case"woocommerce/product-category":if(!c||!c.length)return"";break;case"woocommerce/products-by-attribute":if(!r||!r.length)return""}var g="[products",f=!0,m=!1,O=void 0;try{for(var h,w=d[Symbol.iterator]();!(f=(h=w.next()).done);f=!0){var j=s()(h.value,2);g+=" "+j[0]+'="'+j[1]+'"'}}catch(e){m=!0,O=e}finally{try{f||null==w.return||w.return()}finally{if(m)throw O}}return g+="]"}(t,e))}}},47:function(e,t){!function(){e.exports=this.wp.viewport}()},5:function(e,t){!function(){e.exports=this.wc["wc-block-settings"]}()},51:function(e,t){!function(){e.exports=this.wp.hooks}()},53:function(e,t){!function(){e.exports=this.wp.htmlEntities}()},54:function(e,t){!function(){e.exports=this.wp.date}()},558:function(e,t,o){"use strict";o.r(t);var r=o(20),n=o.n(r),c=o(0),i=o(1),s=o(23),u=o(29),a=o.n(u),l=o(4),b=o(8),p=o.n(b),d=o(9),g=o.n(d),f=o(10),m=o.n(f),O=o(11),h=o.n(O),w=o(12),j=o.n(w),y=o(2),_=o(18),v=(o(7),o(37)),k=o(45),C=o(41),P=function(e){function t(){return p()(this,t),m()(this,h()(t).apply(this,arguments))}return j()(t,e),g()(t,[{key:"getInspectorControls",value:function(){var e=this.props,t=e.attributes,o=e.setAttributes,r=t.categories,n=t.catOperator,s=t.columns,u=t.contentVisibility,a=t.rows,l=t.alignButtons;return Object(c.createElement)(_.InspectorControls,{key:"inspector"},Object(c.createElement)(y.PanelBody,{title:Object(i.__)("Layout","woo-gutenberg-products-block"),initialOpen:!0},Object(c.createElement)(k.a,{columns:s,rows:a,alignButtons:l,setAttributes:o})),Object(c.createElement)(y.PanelBody,{title:Object(i.__)("Content","woo-gutenberg-products-block"),initialOpen:!0},Object(c.createElement)(v.a,{settings:u,onChange:function(e){return o({contentVisibility:e})}})),Object(c.createElement)(y.PanelBody,{title:Object(i.__)("Filter by Product Category","woo-gutenberg-products-block"),initialOpen:!1},Object(c.createElement)(C.a,{selected:r,onChange:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=e.map(function(e){return e.id});o({categories:t})},operator:n,onOperatorChange:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"any";return o({catOperator:e})}})))}},{key:"render",value:function(){var e=this.props,t=e.name,o=e.attributes;return Object(c.createElement)(c.Fragment,null,this.getInspectorControls(),Object(c.createElement)(y.Disabled,null,Object(c.createElement)(_.ServerSideRender,{block:t,attributes:o})))}}]),t}(c.Component),E=o(46),S=o(36);function x(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),o.push.apply(o,r)}return o}var D="woocommerce/product-top-rated";Object(s.registerBlockType)(D,{title:Object(i.__)("Top Rated Products","woo-gutenberg-products-block"),icon:{src:Object(c.createElement)(a.a,{icon:"trophy"}),foreground:"#96588a"},category:"woocommerce",keywords:[Object(i.__)("WooCommerce","woo-gutenberg-products-block")],description:Object(i.__)("Display a grid of your top rated products.","woo-gutenberg-products-block"),supports:{align:["wide","full"],html:!1},attributes:function(e){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?x(o,!0).forEach(function(t){n()(e,t,o[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):x(o).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(o,t))})}return e}({},S.a),transforms:{from:[{type:"block",blocks:Object(l.without)(S.b,D),transform:function(e){return Object(s.createBlock)("woocommerce/product-top-rated",e)}}]},deprecated:[{attributes:S.a,save:Object(E.a)(D)}],edit:function(e){return Object(c.createElement)(P,e)},save:function(){return null}})},61:function(e,t){!function(){e.exports=this.wp.dom}()},64:function(e,t){},65:function(e,t){},67:function(e,t){},68:function(e,t){}});
|
1 |
+
this.wc=this.wc||{},this.wc.blocks=this.wc.blocks||{},this.wc.blocks["product-top-rated"]=function(e){function t(t){for(var r,i,s=t[0],u=t[1],a=t[2],b=0,p=[];b<s.length;b++)i=s[b],Object.prototype.hasOwnProperty.call(n,i)&&n[i]&&p.push(n[i][0]),n[i]=0;for(r in u)Object.prototype.hasOwnProperty.call(u,r)&&(e[r]=u[r]);for(l&&l(t);p.length;)p.shift()();return c.push.apply(c,a||[]),o()}function o(){for(var e,t=0;t<c.length;t++){for(var o=c[t],r=!0,s=1;s<o.length;s++){var u=o[s];0!==n[u]&&(r=!1)}r&&(c.splice(t--,1),e=i(i.s=o[0]))}return e}var r={},n={15:0},c=[];function i(t){if(r[t])return r[t].exports;var o=r[t]={i:t,l:!1,exports:{}};return e[t].call(o.exports,o,o.exports,i),o.l=!0,o.exports}i.m=e,i.c=r,i.d=function(e,t,o){i.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:o})},i.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},i.t=function(e,t){if(1&t&&(e=i(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var o=Object.create(null);if(i.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)i.d(o,r,function(t){return e[t]}.bind(null,r));return o},i.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return i.d(t,"a",t),t},i.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},i.p="";var s=window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[],u=s.push.bind(s);s.push=t,s=s.slice();for(var a=0;a<s.length;a++)t(s[a]);var l=u;return c.push([574,1,0]),o()}({0:function(e,t){!function(){e.exports=this.wp.element}()},1:function(e,t){!function(){e.exports=this.wp.i18n}()},12:function(e,t){!function(){e.exports=this.React}()},13:function(e,t){!function(){e.exports=this.moment}()},16:function(e,t){!function(){e.exports=this.wp.apiFetch}()},17:function(e,t){!function(){e.exports=this.wp.editor}()},18:function(e,t){!function(){e.exports=this.wp.url}()},20:function(e,t){!function(){e.exports=this.wp.compose}()},22:function(e,t){!function(){e.exports=this.wp.blocks}()},3:function(e,t){!function(){e.exports=this.wp.components}()},32:function(e,t){!function(){e.exports=this.wp.keycodes}()},35:function(e,t,o){"use strict";o.d(t,"b",(function(){return n}));var r=o(5),n=["woocommerce/product-best-sellers","woocommerce/product-category","woocommerce/product-new","woocommerce/product-on-sale","woocommerce/product-top-rated"];t.a={columns:{type:"number",default:r.DEFAULT_COLUMNS},rows:{type:"number",default:r.DEFAULT_ROWS},alignButtons:{type:"boolean",default:!1},categories:{type:"array",default:[]},catOperator:{type:"string",default:"any"},contentVisibility:{type:"object",default:{title:!0,price:!0,rating:!0,button:!0}}}},36:function(e,t,o){"use strict";var r=o(19),n=o.n(r),c=o(0),i=o(1),s=(o(2),o(3));function u(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),o.push.apply(o,r)}return o}function a(e){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?u(o,!0).forEach((function(t){n()(e,t,o[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):u(o).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(o,t))}))}return e}t.a=function(e){var t=e.onChange,o=e.settings,r=o.button,n=o.price,u=o.rating,l=o.title;return Object(c.createElement)(c.Fragment,null,Object(c.createElement)(s.ToggleControl,{label:Object(i.__)("Product title","woo-gutenberg-products-block"),help:l?Object(i.__)("Product title is visible.","woo-gutenberg-products-block"):Object(i.__)("Product title is hidden.","woo-gutenberg-products-block"),checked:l,onChange:function(){return t(a({},o,{title:!l}))}}),Object(c.createElement)(s.ToggleControl,{label:Object(i.__)("Product price","woo-gutenberg-products-block"),help:n?Object(i.__)("Product price is visible.","woo-gutenberg-products-block"):Object(i.__)("Product price is hidden.","woo-gutenberg-products-block"),checked:n,onChange:function(){return t(a({},o,{price:!n}))}}),Object(c.createElement)(s.ToggleControl,{label:Object(i.__)("Product rating","woo-gutenberg-products-block"),help:u?Object(i.__)("Product rating is visible.","woo-gutenberg-products-block"):Object(i.__)("Product rating is hidden.","woo-gutenberg-products-block"),checked:u,onChange:function(){return t(a({},o,{rating:!u}))}}),Object(c.createElement)(s.ToggleControl,{label:Object(i.__)("Add to Cart button","woo-gutenberg-products-block"),help:r?Object(i.__)("Add to Cart button is visible.","woo-gutenberg-products-block"):Object(i.__)("Add to Cart button is hidden.","woo-gutenberg-products-block"),checked:r,onChange:function(){return t(a({},o,{button:!r}))}}))}},4:function(e,t){!function(){e.exports=this.lodash}()},40:function(e,t,o){"use strict";var r=o(15),n=o.n(r),c=o(7),i=o.n(c),s=o(8),u=o.n(s),a=o(9),l=o.n(a),b=o(10),p=o.n(b),d=o(14),g=o.n(d),f=o(11),m=o.n(f),O=o(0),h=o(1),w=o(18),j=o(16),y=o.n(j),_=o(4),v=(o(2),o(25)),k=o(3),C=o(5),P=(o(89),function(e){function t(){var e;return i()(this,t),(e=l()(this,p()(t).apply(this,arguments))).state={list:[],loading:!0},e.renderItem=e.renderItem.bind(g()(e)),e}return m()(t,e),u()(t,[{key:"componentDidMount",value:function(){var e=this;y()({path:Object(w.addQueryArgs)("".concat(C.ENDPOINTS.products,"/categories"),{per_page:-1})}).then((function(t){e.setState({list:t,loading:!1})})).catch((function(){e.setState({list:[],loading:!1})}))}},{key:"renderItem",value:function(e){var t=e.item,o=e.search,r=e.depth,c=void 0===r?0:r,i=["woocommerce-product-categories__item"];o.length&&i.push("is-searching"),0===c&&0!==t.parent&&i.push("is-skip-level");var s=t.breadcrumbs.length?"".concat(t.breadcrumbs.join(", "),", ").concat(t.name):t.name;return Object(O.createElement)(v.b,n()({className:i.join(" ")},e,{showCount:!0,"aria-label":Object(h.sprintf)(Object(h._n)("%s, has %d product","%s, has %d products",t.count,"woo-gutenberg-products-block"),s,t.count)}))}},{key:"render",value:function(){var e=this.state,t=e.list,o=e.loading,r=this.props,n=r.onChange,c=r.onOperatorChange,i=r.operator,s=r.selected,u=r.isSingle,a={clear:Object(h.__)("Clear all product categories","woo-gutenberg-products-block"),list:Object(h.__)("Product Categories","woo-gutenberg-products-block"),noItems:Object(h.__)("Your store doesn't have any product categories.","woo-gutenberg-products-block"),search:Object(h.__)("Search for product categories","woo-gutenberg-products-block"),selected:function(e){return Object(h.sprintf)(Object(h._n)("%d category selected","%d categories selected",e,"woo-gutenberg-products-block"),e)},updated:Object(h.__)("Category search results updated.","woo-gutenberg-products-block")};return Object(O.createElement)(O.Fragment,null,Object(O.createElement)(v.a,{className:"woocommerce-product-categories",list:t,isLoading:o,selected:s.map((function(e){return Object(_.find)(t,{id:e})})).filter(Boolean),onChange:n,renderItem:this.renderItem,messages:a,isHierarchical:!0,isSingle:u}),!!c&&Object(O.createElement)("div",{className:s.length<2?"screen-reader-text":""},Object(O.createElement)(k.SelectControl,{className:"woocommerce-product-categories__operator",label:Object(h.__)("Display products matching","woo-gutenberg-products-block"),help:Object(h.__)("Pick at least two categories to use this setting.","woo-gutenberg-products-block"),value:i,onChange:c,options:[{label:Object(h.__)("Any selected categories","woo-gutenberg-products-block"),value:"any"},{label:Object(h.__)("All selected categories","woo-gutenberg-products-block"),value:"all"}]})))}}]),t}(O.Component));P.defaultProps={operator:"any",isSingle:!1},t.a=P},43:function(e,t){!function(){e.exports=this.ReactDOM}()},44:function(e,t,o){"use strict";var r=o(0),n=o(1),c=o(4),i=(o(2),o(3)),s=o(5);t.a=function(e){var t=e.columns,o=e.rows,u=e.setAttributes,a=e.alignButtons;return Object(r.createElement)(r.Fragment,null,Object(r.createElement)(i.RangeControl,{label:Object(n.__)("Columns","woo-gutenberg-products-block"),value:t,onChange:function(e){var t=Object(c.clamp)(e,s.MIN_COLUMNS,s.MAX_COLUMNS);u({columns:Object(c.isNaN)(t)?"":t})},min:s.MIN_COLUMNS,max:s.MAX_COLUMNS}),Object(r.createElement)(i.RangeControl,{label:Object(n.__)("Rows","woo-gutenberg-products-block"),value:o,onChange:function(e){var t=Object(c.clamp)(e,s.MIN_ROWS,s.MAX_ROWS);u({rows:Object(c.isNaN)(t)?"":t})},min:s.MIN_ROWS,max:s.MAX_ROWS}),Object(r.createElement)(i.ToggleControl,{label:Object(n.__)("Align Add to Cart buttons","woo-gutenberg-products-block"),help:a?Object(n.__)("Buttons are aligned vertically.","woo-gutenberg-products-block"):Object(n.__)("Buttons follow content.","woo-gutenberg-products-block"),checked:a,onChange:function(){return u({alignButtons:!a})}}))}},45:function(e,t,o){"use strict";var r=o(0),n=o(6),c=o.n(n),i=o(56),s=o.n(i),u=o(5);o.d(t,"a",(function(){return a}));var a=function(e){return function(t){var o=t.attributes,n=o.align,i=o.contentVisibility,a=c()(n?"align".concat(n):"",{"is-hidden-title":!i.title,"is-hidden-price":!i.price,"is-hidden-rating":!i.rating,"is-hidden-button":!i.button});return Object(r.createElement)(r.RawHTML,{className:a},function(e,t){var o=e.attributes,r=o.attributes,n=o.attrOperator,c=o.categories,i=o.catOperator,a=o.orderby,l=o.products,b=o.columns||u.DEFAULT_COLUMNS,p=o.rows||u.DEFAULT_ROWS,d=new Map;switch(d.set("limit",p*b),d.set("columns",b),c&&c.length&&(d.set("category",c.join(",")),i&&"all"===i&&d.set("cat_operator","AND")),r&&r.length&&(d.set("terms",r.map((function(e){return e.id})).join(",")),d.set("attribute",r[0].attr_slug),n&&"all"===n&&d.set("terms_operator","AND")),a&&("price_desc"===a?(d.set("orderby","price"),d.set("order","DESC")):"price_asc"===a?(d.set("orderby","price"),d.set("order","ASC")):"date"===a?(d.set("orderby","date"),d.set("order","DESC")):d.set("orderby",a)),t){case"woocommerce/product-best-sellers":d.set("best_selling","1");break;case"woocommerce/product-top-rated":d.set("orderby","rating");break;case"woocommerce/product-on-sale":d.set("on_sale","1");break;case"woocommerce/product-new":d.set("orderby","date"),d.set("order","DESC");break;case"woocommerce/handpicked-products":if(!l.length)return"";d.set("ids",l.join(",")),d.set("limit",l.length);break;case"woocommerce/product-category":if(!c||!c.length)return"";break;case"woocommerce/products-by-attribute":if(!r||!r.length)return""}var g="[products",f=!0,m=!1,O=void 0;try{for(var h,w=d[Symbol.iterator]();!(f=(h=w.next()).done);f=!0){var j=s()(h.value,2);g+=" "+j[0]+'="'+j[1]+'"'}}catch(e){m=!0,O=e}finally{try{f||null==w.return||w.return()}finally{if(m)throw O}}return g+="]"}(t,e))}}},46:function(e,t){!function(){e.exports=this.wp.viewport}()},5:function(e,t){!function(){e.exports=this.wc["wc-block-settings"]}()},50:function(e,t){!function(){e.exports=this.wp.hooks}()},52:function(e,t){!function(){e.exports=this.wp.htmlEntities}()},53:function(e,t){!function(){e.exports=this.wp.date}()},574:function(e,t,o){"use strict";o.r(t);var r=o(19),n=o.n(r),c=o(0),i=o(1),s=o(22),u=o(27),a=o.n(u),l=o(4),b=o(7),p=o.n(b),d=o(8),g=o.n(d),f=o(9),m=o.n(f),O=o(10),h=o.n(O),w=o(11),j=o.n(w),y=o(3),_=o(17),v=(o(2),o(36)),k=o(44),C=o(40),P=function(e){function t(){return p()(this,t),m()(this,h()(t).apply(this,arguments))}return j()(t,e),g()(t,[{key:"getInspectorControls",value:function(){var e=this.props,t=e.attributes,o=e.setAttributes,r=t.categories,n=t.catOperator,s=t.columns,u=t.contentVisibility,a=t.rows,l=t.alignButtons;return Object(c.createElement)(_.InspectorControls,{key:"inspector"},Object(c.createElement)(y.PanelBody,{title:Object(i.__)("Layout","woo-gutenberg-products-block"),initialOpen:!0},Object(c.createElement)(k.a,{columns:s,rows:a,alignButtons:l,setAttributes:o})),Object(c.createElement)(y.PanelBody,{title:Object(i.__)("Content","woo-gutenberg-products-block"),initialOpen:!0},Object(c.createElement)(v.a,{settings:u,onChange:function(e){return o({contentVisibility:e})}})),Object(c.createElement)(y.PanelBody,{title:Object(i.__)("Filter by Product Category","woo-gutenberg-products-block"),initialOpen:!1},Object(c.createElement)(C.a,{selected:r,onChange:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=e.map((function(e){return e.id}));o({categories:t})},operator:n,onOperatorChange:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"any";return o({catOperator:e})}})))}},{key:"render",value:function(){var e=this.props,t=e.name,o=e.attributes;return Object(c.createElement)(c.Fragment,null,this.getInspectorControls(),Object(c.createElement)(y.Disabled,null,Object(c.createElement)(_.ServerSideRender,{block:t,attributes:o})))}}]),t}(c.Component),E=o(45),S=o(35);function x(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),o.push.apply(o,r)}return o}var D="woocommerce/product-top-rated";Object(s.registerBlockType)(D,{title:Object(i.__)("Top Rated Products","woo-gutenberg-products-block"),icon:{src:Object(c.createElement)(a.a,{icon:"trophy"}),foreground:"#96588a"},category:"woocommerce",keywords:[Object(i.__)("WooCommerce","woo-gutenberg-products-block")],description:Object(i.__)("Display a grid of your top rated products.","woo-gutenberg-products-block"),supports:{align:["wide","full"],html:!1},attributes:function(e){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?x(o,!0).forEach((function(t){n()(e,t,o[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):x(o).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(o,t))}))}return e}({},S.a),transforms:{from:[{type:"block",blocks:Object(l.without)(S.b,D),transform:function(e){return Object(s.createBlock)("woocommerce/product-top-rated",e)}}]},deprecated:[{attributes:S.a,save:Object(E.a)(D)}],edit:function(e){return Object(c.createElement)(P,e)},save:function(){return null}})},59:function(e,t){!function(){e.exports=this.wp.dom}()},62:function(e,t){},63:function(e,t){},64:function(e,t){},66:function(e,t){},67:function(e,t){}});
|
build/products-by-attribute.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
this.wc=this.wc||{},this.wc.blocks=this.wc.blocks||{},this.wc.blocks["products-by-attribute"]=function(t){function e(e){for(var o,i,u=e[0],a=e[1],s=e[2],b=0,d=[];b<u.length;b++)i=u[b],Object.prototype.hasOwnProperty.call(n,i)&&n[i]&&d.push(n[i][0]),n[i]=0;for(o in a)Object.prototype.hasOwnProperty.call(a,o)&&(t[o]=a[o]);for(l&&l(e);d.length;)d.shift()();return c.push.apply(c,s||[]),r()}function r(){for(var t,e=0;e<c.length;e++){for(var r=c[e],o=!0,u=1;u<r.length;u++){var a=r[u];0!==n[a]&&(o=!1)}o&&(c.splice(e--,1),t=i(i.s=r[0]))}return t}var o={},n={16:0},c=[];function i(e){if(o[e])return o[e].exports;var r=o[e]={i:e,l:!1,exports:{}};return t[e].call(r.exports,r,r.exports,i),r.l=!0,r.exports}i.m=t,i.c=o,i.d=function(t,e,r){i.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},i.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},i.t=function(t,e){if(1&e&&(t=i(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(i.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var o in t)i.d(r,o,function(e){return t[e]}.bind(null,o));return r},i.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return i.d(e,"a",e),e},i.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},i.p="";var u=window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[],a=u.push.bind(u);u.push=e,u=u.slice();for(var s=0;s<u.length;s++)e(u[s]);var l=a;return c.push([550,2,1,0]),r()}({0:function(t,e){!function(){t.exports=this.wp.element}()},1:function(t,e){!function(){t.exports=this.wp.i18n}()},13:function(t,e){!function(){t.exports=this.React}()},14:function(t,e){!function(){t.exports=this.moment}()},17:function(t,e){!function(){t.exports=this.wp.apiFetch}()},18:function(t,e){!function(){t.exports=this.wp.editor}()},19:function(t,e){!function(){t.exports=this.wp.url}()},2:function(t,e){!function(){t.exports=this.wp.components}()},21:function(t,e){!function(){t.exports=this.wp.compose}()},23:function(t,e){!function(){t.exports=this.wp.blocks}()},33:function(t,e){!function(){t.exports=this.wp.keycodes}()},37:function(t,e,r){"use strict";var o=r(20),n=r.n(o),c=r(0),i=r(1),u=(r(7),r(2));function a(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);e&&(o=o.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),r.push.apply(r,o)}return r}function s(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?a(r,!0).forEach(function(e){n()(t,e,r[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):a(r).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))})}return t}e.a=function(t){var e=t.onChange,r=t.settings,o=r.button,n=r.price,a=r.rating,l=r.title;return Object(c.createElement)(c.Fragment,null,Object(c.createElement)(u.ToggleControl,{label:Object(i.__)("Product title","woo-gutenberg-products-block"),help:l?Object(i.__)("Product title is visible.","woo-gutenberg-products-block"):Object(i.__)("Product title is hidden.","woo-gutenberg-products-block"),checked:l,onChange:function(){return e(s({},r,{title:!l}))}}),Object(c.createElement)(u.ToggleControl,{label:Object(i.__)("Product price","woo-gutenberg-products-block"),help:n?Object(i.__)("Product price is visible.","woo-gutenberg-products-block"):Object(i.__)("Product price is hidden.","woo-gutenberg-products-block"),checked:n,onChange:function(){return e(s({},r,{price:!n}))}}),Object(c.createElement)(u.ToggleControl,{label:Object(i.__)("Product rating","woo-gutenberg-products-block"),help:a?Object(i.__)("Product rating is visible.","woo-gutenberg-products-block"):Object(i.__)("Product rating is hidden.","woo-gutenberg-products-block"),checked:a,onChange:function(){return e(s({},r,{rating:!a}))}}),Object(c.createElement)(u.ToggleControl,{label:Object(i.__)("Add to Cart button","woo-gutenberg-products-block"),help:o?Object(i.__)("Add to Cart button is visible.","woo-gutenberg-products-block"):Object(i.__)("Add to Cart button is hidden.","woo-gutenberg-products-block"),checked:o,onChange:function(){return e(s({},r,{button:!o}))}}))}},4:function(t,e){!function(){t.exports=this.lodash}()},44:function(t,e){!function(){t.exports=this.ReactDOM}()},45:function(t,e,r){"use strict";var o=r(0),n=r(1),c=r(4),i=(r(7),r(2)),u=r(5);e.a=function(t){var e=t.columns,r=t.rows,a=t.setAttributes,s=t.alignButtons;return Object(o.createElement)(o.Fragment,null,Object(o.createElement)(i.RangeControl,{label:Object(n.__)("Columns","woo-gutenberg-products-block"),value:e,onChange:function(t){var e=Object(c.clamp)(t,u.MIN_COLUMNS,u.MAX_COLUMNS);a({columns:Object(c.isNaN)(e)?"":e})},min:u.MIN_COLUMNS,max:u.MAX_COLUMNS}),Object(o.createElement)(i.RangeControl,{label:Object(n.__)("Rows","woo-gutenberg-products-block"),value:r,onChange:function(t){var e=Object(c.clamp)(t,u.MIN_ROWS,u.MAX_ROWS);a({rows:Object(c.isNaN)(e)?"":e})},min:u.MIN_ROWS,max:u.MAX_ROWS}),Object(o.createElement)(i.ToggleControl,{label:Object(n.__)("Align Add to Cart buttons","woo-gutenberg-products-block"),help:s?Object(n.__)("Buttons are aligned vertically.","woo-gutenberg-products-block"):Object(n.__)("Buttons follow content.","woo-gutenberg-products-block"),checked:s,onChange:function(){return a({alignButtons:!s})}}))}},46:function(t,e,r){"use strict";var o=r(0),n=r(6),c=r.n(n),i=r(58),u=r.n(i),a=r(5);r.d(e,"a",function(){return s});var s=function(t){return function(e){var r=e.attributes,n=r.align,i=r.contentVisibility,s=c()(n?"align".concat(n):"",{"is-hidden-title":!i.title,"is-hidden-price":!i.price,"is-hidden-rating":!i.rating,"is-hidden-button":!i.button});return Object(o.createElement)(o.RawHTML,{className:s},function(t,e){var r=t.attributes,o=r.attributes,n=r.attrOperator,c=r.categories,i=r.catOperator,s=r.orderby,l=r.products,b=r.columns||a.DEFAULT_COLUMNS,d=r.rows||a.DEFAULT_ROWS,p=new Map;switch(p.set("limit",d*b),p.set("columns",b),c&&c.length&&(p.set("category",c.join(",")),i&&"all"===i&&p.set("cat_operator","AND")),o&&o.length&&(p.set("terms",o.map(function(t){return t.id}).join(",")),p.set("attribute",o[0].attr_slug),n&&"all"===n&&p.set("terms_operator","AND")),s&&("price_desc"===s?(p.set("orderby","price"),p.set("order","DESC")):"price_asc"===s?(p.set("orderby","price"),p.set("order","ASC")):"date"===s?(p.set("orderby","date"),p.set("order","DESC")):p.set("orderby",s)),e){case"woocommerce/product-best-sellers":p.set("best_selling","1");break;case"woocommerce/product-top-rated":p.set("orderby","rating");break;case"woocommerce/product-on-sale":p.set("on_sale","1");break;case"woocommerce/product-new":p.set("orderby","date"),p.set("order","DESC");break;case"woocommerce/handpicked-products":if(!l.length)return"";p.set("ids",l.join(",")),p.set("limit",l.length);break;case"woocommerce/product-category":if(!c||!c.length)return"";break;case"woocommerce/products-by-attribute":if(!o||!o.length)return""}var g="[products",f=!0,m=!1,O=void 0;try{for(var h,_=p[Symbol.iterator]();!(f=(h=_.next()).done);f=!0){var j=u()(h.value,2);g+=" "+j[0]+'="'+j[1]+'"'}}catch(t){m=!0,O=t}finally{try{f||null==_.return||_.return()}finally{if(m)throw O}}return g+="]"}(e,t))}}},47:function(t,e){!function(){t.exports=this.wp.viewport}()},5:function(t,e){!function(){t.exports=this.wc["wc-block-settings"]}()},51:function(t,e){!function(){t.exports=this.wp.hooks}()},519:function(t,e,r){var o=r(520);"string"==typeof o&&(o=[[t.i,o,""]]);var n={insert:"head",singleton:!1};r(35)(o,n);o.locals&&(t.exports=o.locals)},520:function(t,e,r){},53:function(t,e){!function(){t.exports=this.wp.htmlEntities}()},54:function(t,e){!function(){t.exports=this.wp.date}()},550:function(t,e,r){"use strict";r.r(e);var o=r(0),n=r(1),c=r(29),i=r.n(c),u=r(23),a=r(5),s=(r(519),r(8)),l=r.n(s),b=r(9),d=r.n(b),p=r(10),g=r.n(p),f=r(11),m=r.n(f),O=r(12),h=r.n(O),_=r(18),j=r(2),y=(r(7),r(37)),w=r(45),v=r(62),k=r.n(v),E=r(16),C=r.n(E),S=r(20),P=r.n(S),A=r(15),M=r.n(A),N=r(19),x=r(17),D=r.n(x),L=r(4),T=r(26);r(521);function B(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);e&&(o=o.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),r.push.apply(r,o)}return r}function I(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?B(r,!0).forEach(function(e){P()(t,e,r[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):B(r).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))})}return t}var R=function(t){function e(){var t;return l()(this,e),(t=g()(this,m()(e).apply(this,arguments))).state={list:[],loading:!0,attribute:0,termsList:{},termsLoading:!0},t.debouncedGetTerms=Object(L.debounce)(t.getTerms.bind(M()(t)),200),t.renderItem=t.renderItem.bind(M()(t)),t.onSelectAttribute=t.onSelectAttribute.bind(M()(t)),t}return h()(e,t),d()(e,[{key:"componentDidMount",value:function(){var t=this,e=this.props.selected;D()({path:Object(N.addQueryArgs)("".concat(a.ENDPOINTS.products,"/attributes"),{per_page:-1})}).then(function(r){r=r.map(function(t){return I({},t,{parent:0})}),t.setState(function(t){var o=t.attribute;if(!o&&e.length>0){var n=Object(L.find)(r,{slug:e[0].attr_slug});o=n?n.id:0}return{list:r,attribute:o,loading:!1}})}).catch(function(){t.setState({list:[],loading:!1})})}},{key:"componentWillUnmount",value:function(){this.debouncedGetTerms.cancel()}},{key:"componentDidUpdate",value:function(t,e){e.attribute!==this.state.attribute&&this.debouncedGetTerms()}},{key:"getTerms",value:function(){var t=this,e=this.state,r=e.attribute,o=e.termsList;r&&(o[r]||this.setState({termsLoading:!0}),D()({path:Object(N.addQueryArgs)("".concat(a.ENDPOINTS.products,"/attributes/").concat(r,"/terms"),{per_page:-1})}).then(function(e){e=e.map(function(t){return I({},t,{parent:r,attr_slug:t.attribute.slug})}),t.setState(function(t){return{termsList:I({},t.termsList,P()({},r,e)),termsLoading:!1}})}).catch(function(){t.setState({termsLoading:!1})}))}},{key:"onSelectAttribute",value:function(t){var e=this;return function(){e.props.onChange([]),e.setState({attribute:t.id===e.state.attribute?0:t.id})}}},{key:"renderItem",value:function(t){var e=t.item,r=t.search,c=t.depth,i=void 0===c?0:c,u=this.state,a=u.attribute,s=u.termsLoading,l=["woocommerce-product-attributes__item","woocommerce-search-list__item"];return r.length&&l.push("is-searching"),0===i&&0!==e.parent&&l.push("is-skip-level"),e.breadcrumbs.length?Object(o.createElement)(T.b,C()({className:l.join(" ")},t,{showCount:!0,"aria-label":"".concat(e.breadcrumbs[0],": ").concat(e.name)})):[Object(o.createElement)(T.b,C()({key:"attr-".concat(e.id)},t,{className:l.join(" "),isSelected:a===e.id,onSelect:this.onSelectAttribute,isSingle:!0,disabled:"0"===e.count,"aria-expanded":a===e.id,"aria-label":Object(n.sprintf)(Object(n._n)("%s, has %d term","%s, has %d terms",e.count,"woo-gutenberg-products-block"),e.name,e.count)})),a===e.id&&s&&Object(o.createElement)("div",{key:"loading",className:"woocommerce-search-list__item woocommerce-product-attributes__itemdepth-1 is-loading is-not-active"},Object(o.createElement)(j.Spinner,null))]}},{key:"render",value:function(){var t=this.state,e=t.attribute,r=t.list,c=t.loading,i=t.termsList,u=this.props,a=u.onChange,s=u.onOperatorChange,l=u.operator,b=u.selected,d=i[e]||[],p=[].concat(k()(r),k()(d)),g={clear:Object(n.__)("Clear all product attributes","woo-gutenberg-products-block"),list:Object(n.__)("Product Attributes","woo-gutenberg-products-block"),noItems:Object(n.__)("Your store doesn't have any product attributes.","woo-gutenberg-products-block"),search:Object(n.__)("Search for product attributes","woo-gutenberg-products-block"),selected:function(t){return Object(n.sprintf)(Object(n._n)("%d attribute selected","%d attributes selected",t,"woo-gutenberg-products-block"),t)},updated:Object(n.__)("Product attribute search results updated.","woo-gutenberg-products-block")};return Object(o.createElement)(o.Fragment,null,Object(o.createElement)(T.a,{className:"woocommerce-product-attributes",list:p,isLoading:c,selected:b.map(function(t){var e=t.id;return Object(L.find)(p,{id:e})}).filter(Boolean),onChange:a,renderItem:this.renderItem,messages:g,isHierarchical:!0}),!!s&&Object(o.createElement)("div",{className:b.length<2?"screen-reader-text":""},Object(o.createElement)(j.SelectControl,{className:"woocommerce-product-attributes__operator",label:Object(n.__)("Display products matching","woo-gutenberg-products-block"),help:Object(n.__)("Pick at least two attributes to use this setting.","woo-gutenberg-products-block"),value:l,onChange:s,options:[{label:Object(n.__)("Any selected attributes","woo-gutenberg-products-block"),value:"any"},{label:Object(n.__)("All selected attributes","woo-gutenberg-products-block"),value:"all"}]})))}}]),e}(o.Component);R.defaultProps={operator:"any"};var U=R,F=r(57),W=function(t){function e(){return l()(this,e),g()(this,m()(e).apply(this,arguments))}return h()(e,t),d()(e,[{key:"getInspectorControls",value:function(){var t=this.props.setAttributes,e=this.props.attributes,r=e.attributes,c=e.attrOperator,i=e.columns,u=e.contentVisibility,a=e.orderby,s=e.rows,l=e.alignButtons;return Object(o.createElement)(_.InspectorControls,{key:"inspector"},Object(o.createElement)(j.PanelBody,{title:Object(n.__)("Layout","woo-gutenberg-products-block"),initialOpen:!0},Object(o.createElement)(w.a,{columns:i,rows:s,alignButtons:l,setAttributes:t})),Object(o.createElement)(j.PanelBody,{title:Object(n.__)("Content","woo-gutenberg-products-block"),initialOpen:!0},Object(o.createElement)(y.a,{settings:u,onChange:function(e){return t({contentVisibility:e})}})),Object(o.createElement)(j.PanelBody,{title:Object(n.__)("Filter by Product Attribute","woo-gutenberg-products-block"),initialOpen:!1},Object(o.createElement)(U,{selected:r,onChange:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],r=e.map(function(t){return{id:t.id,attr_slug:t.attr_slug}});t({attributes:r})},operator:c,onOperatorChange:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"any";return t({attrOperator:e})}})),Object(o.createElement)(j.PanelBody,{title:Object(n.__)("Order By","woo-gutenberg-products-block"),initialOpen:!1},Object(o.createElement)(F.a,{setAttributes:t,value:a})))}},{key:"renderEditMode",value:function(){var t=this.props,e=t.debouncedSpeak,r=t.setAttributes,c=this.props.attributes;return Object(o.createElement)(j.Placeholder,{icon:Object(o.createElement)(i.a,{icon:"custom-post-type"}),label:Object(n.__)("Products by Attribute","woo-gutenberg-products-block"),className:"wc-block-products-grid wc-block-products-by-attribute"},Object(n.__)("Display a grid of products from your selected attributes.","woo-gutenberg-products-block"),Object(o.createElement)("div",{className:"wc-block-products-by-attribute__selection"},Object(o.createElement)(U,{selected:c.attributes,onChange:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],e=t.map(function(t){return{id:t.id,attr_slug:t.attr_slug}});r({attributes:e})},operator:c.attrOperator,onOperatorChange:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"any";return r({attrOperator:t})}}),Object(o.createElement)(j.Button,{isDefault:!0,onClick:function(){r({editMode:!1}),e(Object(n.__)("Showing Products by Attribute block preview.","woo-gutenberg-products-block"))}},Object(n.__)("Done","woo-gutenberg-products-block"))))}},{key:"render",value:function(){var t=this.props,e=t.attributes,r=t.name,c=t.setAttributes,i=e.editMode;return Object(o.createElement)(o.Fragment,null,Object(o.createElement)(_.BlockControls,null,Object(o.createElement)(j.Toolbar,{controls:[{icon:"edit",title:Object(n.__)("Edit"),onClick:function(){return c({editMode:!i})},isActive:i}]})),this.getInspectorControls(),i?this.renderEditMode():Object(o.createElement)(j.Disabled,null,Object(o.createElement)(_.ServerSideRender,{block:r,attributes:e})))}}]),e}(o.Component),V=Object(j.withSpokenMessages)(W),X=r(46);Object(u.registerBlockType)("woocommerce/products-by-attribute",{title:Object(n.__)("Products by Attribute","woo-gutenberg-products-block"),icon:{src:Object(o.createElement)(i.a,{icon:"custom-post-type"}),foreground:"#96588a"},category:"woocommerce",keywords:[Object(n.__)("WooCommerce","woo-gutenberg-products-block")],description:Object(n.__)("Display a grid of products from your selected attributes.","woo-gutenberg-products-block"),supports:{align:["wide","full"],html:!1},attributes:{attributes:{type:"array",default:[]},attrOperator:{type:"string",default:"any"},columns:{type:"number",default:a.DEFAULT_COLUMNS},editMode:{type:"boolean",default:!0},contentVisibility:{type:"object",default:{title:!0,price:!0,rating:!0,button:!0}},orderby:{type:"string",default:"date"},rows:{type:"number",default:a.DEFAULT_ROWS},alignButtons:{type:"boolean",default:!1}},deprecated:[{attributes:{attributes:{type:"array",default:[]},attrOperator:{type:"string",default:"any"},columns:{type:"number",default:a.DEFAULT_COLUMNS},editMode:{type:"boolean",default:!0},contentVisibility:{type:"object",default:{title:!0,price:!0,rating:!0,button:!0}},orderby:{type:"string",default:"date"},rows:{type:"number",default:a.DEFAULT_ROWS}},save:Object(X.a)("woocommerce/products-by-attribute")}],edit:function(t){return Object(o.createElement)(V,t)},save:function(){return null}})},57:function(t,e,r){"use strict";var o=r(0),n=r(1),c=r(2);r(7);e.a=function(t){var e=t.value,r=t.setAttributes;return Object(o.createElement)(c.SelectControl,{label:Object(n.__)("Order products by","woo-gutenberg-products-block"),value:e,options:[{label:Object(n.__)("Newness - newest first","woo-gutenberg-products-block"),value:"date"},{label:Object(n.__)("Price - low to high","woo-gutenberg-products-block"),value:"price_asc"},{label:Object(n.__)("Price - high to low","woo-gutenberg-products-block"),value:"price_desc"},{label:Object(n.__)("Rating - highest first","woo-gutenberg-products-block"),value:"rating"},{label:Object(n.__)("Sales - most first","woo-gutenberg-products-block"),value:"popularity"},{label:Object(n.__)("Title - alphabetical","woo-gutenberg-products-block"),value:"title"},{label:Object(n.__)("Menu Order","woo-gutenberg-products-block"),value:"menu_order"}],onChange:function(t){return r({orderby:t})}})}},61:function(t,e){!function(){t.exports=this.wp.dom}()},64:function(t,e){},65:function(t,e){},67:function(t,e){},68:function(t,e){}});
|
1 |
+
this.wc=this.wc||{},this.wc.blocks=this.wc.blocks||{},this.wc.blocks["products-by-attribute"]=function(t){function e(e){for(var o,i,u=e[0],a=e[1],s=e[2],b=0,d=[];b<u.length;b++)i=u[b],Object.prototype.hasOwnProperty.call(n,i)&&n[i]&&d.push(n[i][0]),n[i]=0;for(o in a)Object.prototype.hasOwnProperty.call(a,o)&&(t[o]=a[o]);for(l&&l(e);d.length;)d.shift()();return c.push.apply(c,s||[]),r()}function r(){for(var t,e=0;e<c.length;e++){for(var r=c[e],o=!0,u=1;u<r.length;u++){var a=r[u];0!==n[a]&&(o=!1)}o&&(c.splice(e--,1),t=i(i.s=r[0]))}return t}var o={},n={16:0},c=[];function i(e){if(o[e])return o[e].exports;var r=o[e]={i:e,l:!1,exports:{}};return t[e].call(r.exports,r,r.exports,i),r.l=!0,r.exports}i.m=t,i.c=o,i.d=function(t,e,r){i.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},i.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},i.t=function(t,e){if(1&e&&(t=i(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(i.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var o in t)i.d(r,o,function(e){return t[e]}.bind(null,o));return r},i.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return i.d(e,"a",e),e},i.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},i.p="";var u=window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[],a=u.push.bind(u);u.push=e,u=u.slice();for(var s=0;s<u.length;s++)e(u[s]);var l=a;return c.push([564,2,1,0]),r()}({0:function(t,e){!function(){t.exports=this.wp.element}()},1:function(t,e){!function(){t.exports=this.wp.i18n}()},12:function(t,e){!function(){t.exports=this.React}()},13:function(t,e){!function(){t.exports=this.moment}()},16:function(t,e){!function(){t.exports=this.wp.apiFetch}()},17:function(t,e){!function(){t.exports=this.wp.editor}()},18:function(t,e){!function(){t.exports=this.wp.url}()},20:function(t,e){!function(){t.exports=this.wp.compose}()},22:function(t,e){!function(){t.exports=this.wp.blocks}()},3:function(t,e){!function(){t.exports=this.wp.components}()},32:function(t,e){!function(){t.exports=this.wp.keycodes}()},36:function(t,e,r){"use strict";var o=r(19),n=r.n(o),c=r(0),i=r(1),u=(r(2),r(3));function a(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);e&&(o=o.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,o)}return r}function s(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?a(r,!0).forEach((function(e){n()(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):a(r).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}e.a=function(t){var e=t.onChange,r=t.settings,o=r.button,n=r.price,a=r.rating,l=r.title;return Object(c.createElement)(c.Fragment,null,Object(c.createElement)(u.ToggleControl,{label:Object(i.__)("Product title","woo-gutenberg-products-block"),help:l?Object(i.__)("Product title is visible.","woo-gutenberg-products-block"):Object(i.__)("Product title is hidden.","woo-gutenberg-products-block"),checked:l,onChange:function(){return e(s({},r,{title:!l}))}}),Object(c.createElement)(u.ToggleControl,{label:Object(i.__)("Product price","woo-gutenberg-products-block"),help:n?Object(i.__)("Product price is visible.","woo-gutenberg-products-block"):Object(i.__)("Product price is hidden.","woo-gutenberg-products-block"),checked:n,onChange:function(){return e(s({},r,{price:!n}))}}),Object(c.createElement)(u.ToggleControl,{label:Object(i.__)("Product rating","woo-gutenberg-products-block"),help:a?Object(i.__)("Product rating is visible.","woo-gutenberg-products-block"):Object(i.__)("Product rating is hidden.","woo-gutenberg-products-block"),checked:a,onChange:function(){return e(s({},r,{rating:!a}))}}),Object(c.createElement)(u.ToggleControl,{label:Object(i.__)("Add to Cart button","woo-gutenberg-products-block"),help:o?Object(i.__)("Add to Cart button is visible.","woo-gutenberg-products-block"):Object(i.__)("Add to Cart button is hidden.","woo-gutenberg-products-block"),checked:o,onChange:function(){return e(s({},r,{button:!o}))}}))}},4:function(t,e){!function(){t.exports=this.lodash}()},43:function(t,e){!function(){t.exports=this.ReactDOM}()},44:function(t,e,r){"use strict";var o=r(0),n=r(1),c=r(4),i=(r(2),r(3)),u=r(5);e.a=function(t){var e=t.columns,r=t.rows,a=t.setAttributes,s=t.alignButtons;return Object(o.createElement)(o.Fragment,null,Object(o.createElement)(i.RangeControl,{label:Object(n.__)("Columns","woo-gutenberg-products-block"),value:e,onChange:function(t){var e=Object(c.clamp)(t,u.MIN_COLUMNS,u.MAX_COLUMNS);a({columns:Object(c.isNaN)(e)?"":e})},min:u.MIN_COLUMNS,max:u.MAX_COLUMNS}),Object(o.createElement)(i.RangeControl,{label:Object(n.__)("Rows","woo-gutenberg-products-block"),value:r,onChange:function(t){var e=Object(c.clamp)(t,u.MIN_ROWS,u.MAX_ROWS);a({rows:Object(c.isNaN)(e)?"":e})},min:u.MIN_ROWS,max:u.MAX_ROWS}),Object(o.createElement)(i.ToggleControl,{label:Object(n.__)("Align Add to Cart buttons","woo-gutenberg-products-block"),help:s?Object(n.__)("Buttons are aligned vertically.","woo-gutenberg-products-block"):Object(n.__)("Buttons follow content.","woo-gutenberg-products-block"),checked:s,onChange:function(){return a({alignButtons:!s})}}))}},45:function(t,e,r){"use strict";var o=r(0),n=r(6),c=r.n(n),i=r(56),u=r.n(i),a=r(5);r.d(e,"a",(function(){return s}));var s=function(t){return function(e){var r=e.attributes,n=r.align,i=r.contentVisibility,s=c()(n?"align".concat(n):"",{"is-hidden-title":!i.title,"is-hidden-price":!i.price,"is-hidden-rating":!i.rating,"is-hidden-button":!i.button});return Object(o.createElement)(o.RawHTML,{className:s},function(t,e){var r=t.attributes,o=r.attributes,n=r.attrOperator,c=r.categories,i=r.catOperator,s=r.orderby,l=r.products,b=r.columns||a.DEFAULT_COLUMNS,d=r.rows||a.DEFAULT_ROWS,p=new Map;switch(p.set("limit",d*b),p.set("columns",b),c&&c.length&&(p.set("category",c.join(",")),i&&"all"===i&&p.set("cat_operator","AND")),o&&o.length&&(p.set("terms",o.map((function(t){return t.id})).join(",")),p.set("attribute",o[0].attr_slug),n&&"all"===n&&p.set("terms_operator","AND")),s&&("price_desc"===s?(p.set("orderby","price"),p.set("order","DESC")):"price_asc"===s?(p.set("orderby","price"),p.set("order","ASC")):"date"===s?(p.set("orderby","date"),p.set("order","DESC")):p.set("orderby",s)),e){case"woocommerce/product-best-sellers":p.set("best_selling","1");break;case"woocommerce/product-top-rated":p.set("orderby","rating");break;case"woocommerce/product-on-sale":p.set("on_sale","1");break;case"woocommerce/product-new":p.set("orderby","date"),p.set("order","DESC");break;case"woocommerce/handpicked-products":if(!l.length)return"";p.set("ids",l.join(",")),p.set("limit",l.length);break;case"woocommerce/product-category":if(!c||!c.length)return"";break;case"woocommerce/products-by-attribute":if(!o||!o.length)return""}var g="[products",f=!0,m=!1,O=void 0;try{for(var h,_=p[Symbol.iterator]();!(f=(h=_.next()).done);f=!0){var j=u()(h.value,2);g+=" "+j[0]+'="'+j[1]+'"'}}catch(t){m=!0,O=t}finally{try{f||null==_.return||_.return()}finally{if(m)throw O}}return g+="]"}(e,t))}}},46:function(t,e){!function(){t.exports=this.wp.viewport}()},5:function(t,e){!function(){t.exports=this.wc["wc-block-settings"]}()},50:function(t,e){!function(){t.exports=this.wp.hooks}()},52:function(t,e){!function(){t.exports=this.wp.htmlEntities}()},53:function(t,e){!function(){t.exports=this.wp.date}()},536:function(t,e,r){var o=r(537);"string"==typeof o&&(o=[[t.i,o,""]]);var n={insert:"head",singleton:!1};r(34)(o,n);o.locals&&(t.exports=o.locals)},537:function(t,e,r){},55:function(t,e,r){"use strict";var o=r(0),n=r(1),c=r(3);r(2);e.a=function(t){var e=t.value,r=t.setAttributes;return Object(o.createElement)(c.SelectControl,{label:Object(n.__)("Order products by","woo-gutenberg-products-block"),value:e,options:[{label:Object(n.__)("Newness - newest first","woo-gutenberg-products-block"),value:"date"},{label:Object(n.__)("Price - low to high","woo-gutenberg-products-block"),value:"price_asc"},{label:Object(n.__)("Price - high to low","woo-gutenberg-products-block"),value:"price_desc"},{label:Object(n.__)("Rating - highest first","woo-gutenberg-products-block"),value:"rating"},{label:Object(n.__)("Sales - most first","woo-gutenberg-products-block"),value:"popularity"},{label:Object(n.__)("Title - alphabetical","woo-gutenberg-products-block"),value:"title"},{label:Object(n.__)("Menu Order","woo-gutenberg-products-block"),value:"menu_order"}],onChange:function(t){return r({orderby:t})}})}},564:function(t,e,r){"use strict";r.r(e);var o=r(0),n=r(1),c=r(27),i=r.n(c),u=r(22),a=r(5),s=(r(536),r(7)),l=r.n(s),b=r(8),d=r.n(b),p=r(9),g=r.n(p),f=r(10),m=r.n(f),O=r(11),h=r.n(O),_=r(17),j=r(3),y=(r(2),r(36)),w=r(44),v=r(60),k=r.n(v),E=r(15),C=r.n(E),S=r(19),P=r.n(S),A=r(14),M=r.n(A),N=r(18),x=r(16),D=r.n(x),L=r(4),T=r(25);r(538);function B(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);e&&(o=o.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,o)}return r}function I(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?B(r,!0).forEach((function(e){P()(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):B(r).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}var R=function(t){function e(){var t;return l()(this,e),(t=g()(this,m()(e).apply(this,arguments))).state={list:[],loading:!0,attribute:0,termsList:{},termsLoading:!0},t.debouncedGetTerms=Object(L.debounce)(t.getTerms.bind(M()(t)),200),t.renderItem=t.renderItem.bind(M()(t)),t.onSelectAttribute=t.onSelectAttribute.bind(M()(t)),t}return h()(e,t),d()(e,[{key:"componentDidMount",value:function(){var t=this,e=this.props.selected;D()({path:Object(N.addQueryArgs)("".concat(a.ENDPOINTS.products,"/attributes"),{per_page:-1})}).then((function(r){r=r.map((function(t){return I({},t,{parent:0})})),t.setState((function(t){var o=t.attribute;if(!o&&e.length>0){var n=Object(L.find)(r,{slug:e[0].attr_slug});o=n?n.id:0}return{list:r,attribute:o,loading:!1}}))})).catch((function(){t.setState({list:[],loading:!1})}))}},{key:"componentWillUnmount",value:function(){this.debouncedGetTerms.cancel()}},{key:"componentDidUpdate",value:function(t,e){e.attribute!==this.state.attribute&&this.debouncedGetTerms()}},{key:"getTerms",value:function(){var t=this,e=this.state,r=e.attribute,o=e.termsList;r&&(o[r]||this.setState({termsLoading:!0}),D()({path:Object(N.addQueryArgs)("".concat(a.ENDPOINTS.products,"/attributes/").concat(r,"/terms"),{per_page:-1})}).then((function(e){e=e.map((function(t){return I({},t,{parent:r,attr_slug:t.attribute.slug})})),t.setState((function(t){return{termsList:I({},t.termsList,P()({},r,e)),termsLoading:!1}}))})).catch((function(){t.setState({termsLoading:!1})})))}},{key:"onSelectAttribute",value:function(t){var e=this;return function(){e.props.onChange([]),e.setState({attribute:t.id===e.state.attribute?0:t.id})}}},{key:"renderItem",value:function(t){var e=t.item,r=t.search,c=t.depth,i=void 0===c?0:c,u=this.state,a=u.attribute,s=u.termsLoading,l=["woocommerce-product-attributes__item","woocommerce-search-list__item"];return r.length&&l.push("is-searching"),0===i&&0!==e.parent&&l.push("is-skip-level"),e.breadcrumbs.length?Object(o.createElement)(T.b,C()({className:l.join(" ")},t,{showCount:!0,"aria-label":"".concat(e.breadcrumbs[0],": ").concat(e.name)})):[Object(o.createElement)(T.b,C()({key:"attr-".concat(e.id)},t,{className:l.join(" "),isSelected:a===e.id,onSelect:this.onSelectAttribute,isSingle:!0,disabled:"0"===e.count,"aria-expanded":a===e.id,"aria-label":Object(n.sprintf)(Object(n._n)("%s, has %d term","%s, has %d terms",e.count,"woo-gutenberg-products-block"),e.name,e.count)})),a===e.id&&s&&Object(o.createElement)("div",{key:"loading",className:"woocommerce-search-list__item woocommerce-product-attributes__itemdepth-1 is-loading is-not-active"},Object(o.createElement)(j.Spinner,null))]}},{key:"render",value:function(){var t=this.state,e=t.attribute,r=t.list,c=t.loading,i=t.termsList,u=this.props,a=u.onChange,s=u.onOperatorChange,l=u.operator,b=u.selected,d=i[e]||[],p=[].concat(k()(r),k()(d)),g={clear:Object(n.__)("Clear all product attributes","woo-gutenberg-products-block"),list:Object(n.__)("Product Attributes","woo-gutenberg-products-block"),noItems:Object(n.__)("Your store doesn't have any product attributes.","woo-gutenberg-products-block"),search:Object(n.__)("Search for product attributes","woo-gutenberg-products-block"),selected:function(t){return Object(n.sprintf)(Object(n._n)("%d attribute selected","%d attributes selected",t,"woo-gutenberg-products-block"),t)},updated:Object(n.__)("Product attribute search results updated.","woo-gutenberg-products-block")};return Object(o.createElement)(o.Fragment,null,Object(o.createElement)(T.a,{className:"woocommerce-product-attributes",list:p,isLoading:c,selected:b.map((function(t){var e=t.id;return Object(L.find)(p,{id:e})})).filter(Boolean),onChange:a,renderItem:this.renderItem,messages:g,isHierarchical:!0}),!!s&&Object(o.createElement)("div",{className:b.length<2?"screen-reader-text":""},Object(o.createElement)(j.SelectControl,{className:"woocommerce-product-attributes__operator",label:Object(n.__)("Display products matching","woo-gutenberg-products-block"),help:Object(n.__)("Pick at least two attributes to use this setting.","woo-gutenberg-products-block"),value:l,onChange:s,options:[{label:Object(n.__)("Any selected attributes","woo-gutenberg-products-block"),value:"any"},{label:Object(n.__)("All selected attributes","woo-gutenberg-products-block"),value:"all"}]})))}}]),e}(o.Component);R.defaultProps={operator:"any"};var U=R,F=r(55),W=function(t){function e(){return l()(this,e),g()(this,m()(e).apply(this,arguments))}return h()(e,t),d()(e,[{key:"getInspectorControls",value:function(){var t=this.props.setAttributes,e=this.props.attributes,r=e.attributes,c=e.attrOperator,i=e.columns,u=e.contentVisibility,a=e.orderby,s=e.rows,l=e.alignButtons;return Object(o.createElement)(_.InspectorControls,{key:"inspector"},Object(o.createElement)(j.PanelBody,{title:Object(n.__)("Layout","woo-gutenberg-products-block"),initialOpen:!0},Object(o.createElement)(w.a,{columns:i,rows:s,alignButtons:l,setAttributes:t})),Object(o.createElement)(j.PanelBody,{title:Object(n.__)("Content","woo-gutenberg-products-block"),initialOpen:!0},Object(o.createElement)(y.a,{settings:u,onChange:function(e){return t({contentVisibility:e})}})),Object(o.createElement)(j.PanelBody,{title:Object(n.__)("Filter by Product Attribute","woo-gutenberg-products-block"),initialOpen:!1},Object(o.createElement)(U,{selected:r,onChange:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],r=e.map((function(t){return{id:t.id,attr_slug:t.attr_slug}}));t({attributes:r})},operator:c,onOperatorChange:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"any";return t({attrOperator:e})}})),Object(o.createElement)(j.PanelBody,{title:Object(n.__)("Order By","woo-gutenberg-products-block"),initialOpen:!1},Object(o.createElement)(F.a,{setAttributes:t,value:a})))}},{key:"renderEditMode",value:function(){var t=this.props,e=t.debouncedSpeak,r=t.setAttributes,c=this.props.attributes;return Object(o.createElement)(j.Placeholder,{icon:Object(o.createElement)(i.a,{icon:"custom-post-type"}),label:Object(n.__)("Products by Attribute","woo-gutenberg-products-block"),className:"wc-block-products-grid wc-block-products-by-attribute"},Object(n.__)("Display a grid of products from your selected attributes.","woo-gutenberg-products-block"),Object(o.createElement)("div",{className:"wc-block-products-by-attribute__selection"},Object(o.createElement)(U,{selected:c.attributes,onChange:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],e=t.map((function(t){return{id:t.id,attr_slug:t.attr_slug}}));r({attributes:e})},operator:c.attrOperator,onOperatorChange:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"any";return r({attrOperator:t})}}),Object(o.createElement)(j.Button,{isDefault:!0,onClick:function(){r({editMode:!1}),e(Object(n.__)("Showing Products by Attribute block preview.","woo-gutenberg-products-block"))}},Object(n.__)("Done","woo-gutenberg-products-block"))))}},{key:"render",value:function(){var t=this.props,e=t.attributes,r=t.name,c=t.setAttributes,i=e.editMode;return Object(o.createElement)(o.Fragment,null,Object(o.createElement)(_.BlockControls,null,Object(o.createElement)(j.Toolbar,{controls:[{icon:"edit",title:Object(n.__)("Edit"),onClick:function(){return c({editMode:!i})},isActive:i}]})),this.getInspectorControls(),i?this.renderEditMode():Object(o.createElement)(j.Disabled,null,Object(o.createElement)(_.ServerSideRender,{block:r,attributes:e})))}}]),e}(o.Component),V=Object(j.withSpokenMessages)(W),X=r(45);Object(u.registerBlockType)("woocommerce/products-by-attribute",{title:Object(n.__)("Products by Attribute","woo-gutenberg-products-block"),icon:{src:Object(o.createElement)(i.a,{icon:"custom-post-type"}),foreground:"#96588a"},category:"woocommerce",keywords:[Object(n.__)("WooCommerce","woo-gutenberg-products-block")],description:Object(n.__)("Display a grid of products from your selected attributes.","woo-gutenberg-products-block"),supports:{align:["wide","full"],html:!1},attributes:{attributes:{type:"array",default:[]},attrOperator:{type:"string",default:"any"},columns:{type:"number",default:a.DEFAULT_COLUMNS},editMode:{type:"boolean",default:!0},contentVisibility:{type:"object",default:{title:!0,price:!0,rating:!0,button:!0}},orderby:{type:"string",default:"date"},rows:{type:"number",default:a.DEFAULT_ROWS},alignButtons:{type:"boolean",default:!1}},deprecated:[{attributes:{attributes:{type:"array",default:[]},attrOperator:{type:"string",default:"any"},columns:{type:"number",default:a.DEFAULT_COLUMNS},editMode:{type:"boolean",default:!0},contentVisibility:{type:"object",default:{title:!0,price:!0,rating:!0,button:!0}},orderby:{type:"string",default:"date"},rows:{type:"number",default:a.DEFAULT_ROWS}},save:Object(X.a)("woocommerce/products-by-attribute")}],edit:function(t){return Object(o.createElement)(V,t)},save:function(){return null}})},59:function(t,e){!function(){t.exports=this.wp.dom}()},62:function(t,e){},63:function(t,e){},64:function(t,e){},66:function(t,e){},67:function(t,e){}});
|
build/reviews-by-category.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
this.wc=this.wc||{},this.wc.blocks=this.wc.blocks||{},this.wc.blocks["reviews-by-category"]=function(e){function t(t){for(var n,a,i=t[0],l=t[1],s=t[2],b=0,d=[];b<i.length;b++)a=i[b],Object.prototype.hasOwnProperty.call(o,a)&&o[a]&&d.push(o[a][0]),o[a]=0;for(n in l)Object.prototype.hasOwnProperty.call(l,n)&&(e[n]=l[n]);for(u&&u(t);d.length;)d.shift()();return c.push.apply(c,s||[]),r()}function r(){for(var e,t=0;t<c.length;t++){for(var r=c[t],n=!0,i=1;i<r.length;i++){var l=r[i];0!==o[l]&&(n=!1)}n&&(c.splice(t--,1),e=a(a.s=r[0]))}return e}var n={},o={17:0},c=[];function a(t){if(n[t])return n[t].exports;var r=n[t]={i:t,l:!1,exports:{}};return e[t].call(r.exports,r,r.exports,a),r.l=!0,r.exports}a.m=e,a.c=n,a.d=function(e,t,r){a.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},a.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},a.t=function(e,t){if(1&t&&(e=a(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(a.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var n in e)a.d(r,n,function(t){return e[t]}.bind(null,n));return r},a.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return a.d(t,"a",t),t},a.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},a.p="";var i=window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[],l=i.push.bind(i);i.push=t,i=i.slice();for(var s=0;s<i.length;s++)t(i[s]);var u=l;return c.push([552,2,1,0]),r()}({0:function(e,t){!function(){e.exports=this.wp.element}()},1:function(e,t){!function(){e.exports=this.wp.i18n}()},114:function(e,t,r){},13:function(e,t){!function(){e.exports=this.React}()},14:function(e,t){!function(){e.exports=this.moment}()},17:function(e,t){!function(){e.exports=this.wp.apiFetch}()},18:function(e,t){!function(){e.exports=this.wp.editor}()},19:function(e,t){!function(){e.exports=this.wp.url}()},2:function(e,t){!function(){e.exports=this.wp.components}()},21:function(e,t){!function(){e.exports=this.wp.compose}()},23:function(e,t){!function(){e.exports=this.wp.blocks}()},24:function(e,t,r){"use strict";var n=r(0),o=r(2),c=function(e){var t=e.className,r=e.fillColor;return Object(n.createElement)(o.Icon,{className:t,icon:Object(n.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 22.41"},Object(n.createElement)("g",null,Object(n.createElement)("g",null,Object(n.createElement)("path",{fill:r,d:"M16.55 0H1.75C.56 0 0 .52 0 1.68v9.24c0 1.15.56 1.92 1.75 1.92H2V4.76a2.51 2.51 0 0 1 2.74-2.68H18v-.4A1.51 1.51 0 0 0 16.55 0z"}),Object(n.createElement)("path",{fill:r,d:"M19.54 3.11H4.74C3.55 3.11 3 3.64 3 4.79V14c0 1.19.55 2 1.74 2H5V7.88A2.51 2.51 0 0 1 7.73 5.2H21v-.41a1.51 1.51 0 0 0-1.46-1.68z"}),Object(n.createElement)("path",{fill:r,d:"M22.53 6.23H7.73C6.54 6.23 6 6.75 6 7.91v9.24c0 1.15.56 1.92 1.75 1.92h7a.59.59 0 0 1 .32.11l1.61 1.15 2.83 2a.31.31 0 0 0 .18.05.3.3 0 0 0 .31-.3v-2.73a.3.3 0 0 1 .28-.28h2.31A1.47 1.47 0 0 0 24 17.6V7.91a1.52 1.52 0 0 0-1.47-1.68z"}),Object(n.createElement)("path",{fill:"#ffffff",d:"M10.2 10.92l1.06-2.14 1.05 2.14 2.37.35-1.71 1.66.4 2.36-2.11-1.11-.17.09-.52.27-.51.26-.92.49.18-1.02.09-.57.1-.56.03-.21-1.71-1.66 2.37-.35zM21.46 14.25h-4.4a.69.69 0 0 1-.69-.69.68.68 0 0 1 .69-.68h4.4a.68.68 0 0 1 .69.68.69.69 0 0 1-.69.69zM21.46 11.19h-4.4a.69.69 0 1 1 0-1.37h4.4a.69.69 0 1 1 0 1.37z"}))))})},a=function(){return Object(n.createElement)(o.Icon,{icon:Object(n.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},Object(n.createElement)("path",{fillRule:"nonzero",d:"M21.913 7.0946H2.0254c-1.1708 0-2.0984.9908-2.0205 2.16l.741 11.0724c.0714 1.0638.9552 1.8892 2.0206 1.8892h18.4054c1.0654 0 1.9492-.8254 2.0205-1.8892l.7411-11.0724c.0779-1.1692-.8497-2.16-2.0205-2.16zm-8.8006-4.6573h5.987c1.119 0 2.0255.9065 2.0255 2.0254v.934H2.8103V2.0255C2.8103.9064 3.7168 0 4.8357 0h6.2513c1.119 0 2.0254.9065 2.0254 2.0254v.4119zm-7.0589 11.619a.926.926 0 1 1 0-1.852h11.8297a.926.926 0 1 1 0 1.852H6.0535z"}))})},i=function(){return Object(n.createElement)(o.Icon,{icon:Object(n.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},Object(n.createElement)("path",{d:"M22 7.5H2c-1.2 0-2.1 1-2 2.2l.7 11.1c.1 1.1 1 1.9 2 1.9h18.5c1.1 0 2-.8 2-1.9L24 9.6c.1-1.1-.9-2.1-2-2.1zM13.1 2.8v-.4c0-1.1-.9-2-2-2H4.8c-1.1 0-2 .9-2 2v3.4h18.4v-1c0-1.1-.9-2-2-2h-6.1z"}),Object(n.createElement)("path",{fill:"#fff",d:"M14.4 18.7L12 17.4l-2.4 1.3.5-2.6-1.9-1.9 2.6-.4 1.2-2.4 1.2 2.4 2.6.4-1.9 1.9z"}))})},l=function(){return Object(n.createElement)(o.Icon,{className:"material-icon",icon:Object(n.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},Object(n.createElement)("path",{d:"M0 0h24v24H0z",fill:"none"}),Object(n.createElement)("path",{d:"M23 12l-2.44-2.78.34-3.68-3.61-.82-1.89-3.18L12 3 8.6 1.54 6.71 4.72l-3.61.81.34 3.68L1 12l2.44 2.78-.34 3.69 3.61.82 1.89 3.18L12 21l3.4 1.46 1.89-3.18 3.61-.82-.34-3.68L23 12zm-10 5h-2v-2h2v2zm0-4h-2V7h2v6z"}))})},s=function(){return Object(n.createElement)(o.Icon,{icon:Object(n.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},Object(n.createElement)("path",{fill:"#1E8CBE",d:"M12 7c-2.76 0-5 2.24-5 5s2.24 5 5 5 5-2.24 5-5-2.24-5-5-5zm0-5C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"}))})},u=function(){return Object(n.createElement)(o.Icon,{icon:Object(n.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},Object(n.createElement)("path",{fill:"#6C7781",d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"}))})},b=function(e){var t=e.className,r=e.fillColor;return Object(n.createElement)(o.Icon,{className:t,icon:Object(n.createElement)("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},Object(n.createElement)("path",{fill:r,d:"M2.3,17.3h9.3c0.1,0,0.3,0,0.4,0.1l5.9,4.2c0.3,0.2,0.7,0,0.7-0.3v-3.7c0-0.2,0.2-0.4,0.4-0.4H22 c1.1,0,2-0.9,2-2V2.5c0-1.2-0.7-2.2-2-2.2H2.3C0.7,0.2,0,0.9,0,2.5v12.3C0,16.3,0.7,17.3,2.3,17.3z"}),Object(n.createElement)("polygon",{fill:"#ffffff",points:"8.8,12.1 6.5,10.9 4.1,12.1 4.5,9.5 2.6,7.6 5.3,7.2 6.5,4.8 7.6,7.2 10.3,7.6 8.4,9.5"}),Object(n.createElement)("path",{fill:"#ffffff",d:"M20.7,7.9h-7c-0.5,0-0.9-0.4-0.9-0.9S13.2,6,13.7,6h7c0.5,0,0.9,0.4,0.9,0.9S21.2,7.9,20.7,7.9z"}),Object(n.createElement)("path",{fill:"#ffffff",d:"M20.7,11.5h-7c-0.5,0-0.9-0.4-0.9-0.9s0.4-0.9,0.9-0.9h7c0.5,0,0.9,0.4,0.9,0.9S21.2,11.5,20.7,11.5z"}))})},d=function(e){var t=e.className,r=e.fillColor;return Object(n.createElement)(o.Icon,{className:t,icon:Object(n.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 23"},Object(n.createElement)("path",{fill:r,d:"M21.9943 7.0957H2.00638C0.807102 7.0957 -0.0923543 8.0951 0.0075853 9.29437L0.707162 20.3877C0.807102 21.487 1.70656 22.2865 2.70595 22.2865H21.1948C22.2941 22.2865 23.1936 21.487 23.1936 20.3877L23.9931 9.29437C24.093 8.0951 23.0936 7.0957 21.9943 7.0957Z"}),Object(n.createElement)("path",{fill:r,d:"M13.0921 2.39855V1.99879C13.0921 0.899456 12.1926 0 11.0933 0H4.7971C3.69777 0 2.79831 0.899456 2.79831 1.99879V5.39674H21.1872V4.49728C21.1872 3.39795 20.2877 2.49849 19.1884 2.49849H13.0921V2.39855Z"}),Object(n.createElement)("path",{fill:"white",d:"M8.63115 17.126L6.5415 15.9449L4.361 17.126L4.72442 14.6729L2.99819 13.0376L5.45125 12.6742L6.5415 10.4937L7.5409 12.6742L9.99396 13.0376L8.26773 14.6729L8.63115 17.126Z"}),Object(n.createElement)("path",{fill:"white",d:"M19.1907 13.5918H12.9899C12.547 13.5918 12.1926 13.1921 12.1926 12.6924C12.1926 12.1927 12.547 11.7929 12.9899 11.7929H19.1907C19.6336 11.7929 19.9879 12.1927 19.9879 12.6924C19.9879 13.1921 19.6336 13.5918 19.1907 13.5918Z"}),Object(n.createElement)("path",{fill:"white",d:"M19.1907 17.1897H12.9899C12.547 17.1897 12.1926 16.7899 12.1926 16.2902C12.1926 15.7905 12.547 15.3907 12.9899 15.3907H19.1907C19.6336 15.3907 19.9879 15.7905 19.9879 16.2902C19.9879 16.7899 19.6336 17.1897 19.1907 17.1897Z"}))})},p=function(){return Object(n.createElement)(o.Icon,{className:"material-icon",icon:Object(n.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},Object(n.createElement)("path",{d:"M13 13v8h8v-8h-8zM3 21h8v-8H3v8zM3 3v8h8V3H3zm13.66-1.31L11 7.34 16.66 13l5.66-5.66-5.66-5.65z"}),Object(n.createElement)("path",{d:"M0 0h24v24H0z",fill:"none"}))})},w=r(6),m=r.n(w),h=(r(7),function(e){var t=e.size,r=void 0===t?20:t,c=e.className;return Object(n.createElement)(o.Icon,{className:m()("woo-icon",c),icon:Object(n.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",height:r,width:Math.floor(1.67*r),viewBox:"0 0 245 145"},Object(n.createElement)("path",{fill:"#96588A",d:"M22.76 0h199.1a22.77 22.77 0 0 1 22.8 22.76v75.92a22.77 22.77 0 0 1-22.78 22.78h-71.41l9.77 24-43.13-24H22.76C10.1946 121.449.011 111.2654 0 98.7V22.76C.011 10.1946 10.1946.011 22.76 0z"}),Object(n.createElement)("path",{fill:"#FFF",fillRule:"nonzero",d:"M12.32 20.63a8.16 8.16 0 0 1 6.25-3.09c5.0733-.36 7.9867 2.0333 8.74 7.18 3.14 20.86 6.4933 38.5633 10.06 53.11l21.92-41.69c2-3.76 4.49-5.76 7.52-6 4.3867-.3067 7.13 2.49 8.23 8.39a186 186 0 0 0 9.47 34.23c2.62-25.38 7.0133-43.7133 13.18-55a7.73 7.73 0 0 1 6.6-4.43 8.8 8.8 0 0 1 6.32 2 7.75 7.75 0 0 1 3.05 5.74 8.52 8.52 0 0 1-1 4.77c-3.9 7.24-7.12 19.28-9.66 36.12-2.48 16.2533-3.3967 28.9633-2.75 38.13a12.25 12.25 0 0 1-1.16 6.56 6.32 6.32 0 0 1-5.33 3.53c-2.6667.18-5.3033-1.0567-7.91-3.71-9.2933-9.54-16.6567-23.7267-22.09-42.56C57.3 76.7167 52.48 86.3333 49.3 92.76c-5.86 11.3333-10.89 17.13-15.09 17.39-2.7333.1933-5.0667-2.0933-7-6.86-5.1-13.0933-10.5833-38.4033-16.45-75.93a8.56 8.56 0 0 1 1.56-6.73zM227.23 36.34a23.17 23.17 0 0 0-16-11.59 26.25 26.25 0 0 0-5.42-.58c-9.5867 0-17.41 5-23.47 15a53 53 0 0 0-7.78 28.16c0 7.7333 1.6167 14.3333 4.85 19.8a23.15 23.15 0 0 0 16 11.59 26.28 26.28 0 0 0 5.42.59c9.68 0 17.5033-5 23.47-15A53.89 53.89 0 0 0 232.08 56c0-7.7333-1.6167-14.2867-4.85-19.66zm-12.61 27.72c-1.3733 6.56-3.9167 11.5-7.63 14.82-2.9267 2.6667-5.6133 3.7433-8.06 3.23-2.4467-.5133-4.4033-2.6667-5.87-6.46a25.68 25.68 0 0 1-1.76-9.09 35.9 35.9 0 0 1 .73-7.34 33 33 0 0 1 5.28-11.88c3.3333-4.8933 6.8067-6.9467 10.42-6.16 2.44.4867 4.3933 2.64 5.86 6.46a25.68 25.68 0 0 1 1.76 9.12 35.73 35.73 0 0 1-.73 7.33v-.03zM164.57 36.34a23.2 23.2 0 0 0-16-11.59 26.42 26.42 0 0 0-5.43-.58c-9.5933 0-17.4167 5-23.47 15a53 53 0 0 0-7.78 28.16c0 7.7333 1.6133 14.3333 4.84 19.8a23.19 23.19 0 0 0 16 11.59 26.44 26.44 0 0 0 5.43.59c9.68 0 17.5033-5 23.47-15A53.88 53.88 0 0 0 169.4 56c0-7.7333-1.6133-14.2867-4.84-19.66h.01zm-12.61 27.72c-1.3667 6.56-3.91 11.5-7.63 14.82-2.93 2.64-5.63 3.72-8.07 3.23-2.44-.49-4.4-2.64-5.86-6.46a25.7 25.7 0 0 1-1.77-9.09 35.9 35.9 0 0 1 .74-7.34 33 33 0 0 1 5.28-11.88c3.3333-4.8933 6.8067-6.9467 10.42-6.16 2.44.4867 4.3933 2.64 5.86 6.46a25.91 25.91 0 0 1 1.76 9.12 35.73 35.73 0 0 1-.73 7.33v-.03z"}))})});r.d(t,"a",function(){return c}),r.d(t,"b",function(){return a}),r.d(t,"c",function(){return i}),r.d(t,"d",function(){return l}),r.d(t,"e",function(){return s}),r.d(t,"f",function(){return u}),r.d(t,"h",function(){return b}),r.d(t,"g",function(){return d}),r.d(t,"i",function(){return p}),r.d(t,"j",function(){return h})},33:function(e,t){!function(){e.exports=this.wp.keycodes}()},39:function(e,t){!function(){e.exports=this.wp.escapeHtml}()},4:function(e,t){!function(){e.exports=this.lodash}()},40:function(e,t,r){"use strict";r.d(t,"b",function(){return l}),r.d(t,"c",function(){return s}),r.d(t,"a",function(){return u});var n=r(17),o=r.n(n),c=r(6),a=r.n(c),i=r(5),l=function(e){if(i.ENABLE_REVIEW_RATING){if("lowest-rating"===e)return{order:"asc",orderby:"rating"};if("highest-rating"===e)return{order:"desc",orderby:"rating"}}return{order:"desc",orderby:"date_gmt"}},s=function(e){return o()({path:"/wc/blocks/products/reviews?"+Object.entries(e).map(function(e){return e.join("=")}).join("&"),parse:!1}).then(function(e){return e.json().then(function(t){return{reviews:t,totalReviews:parseInt(e.headers.get("x-wp-total"),10)}})})},u=function(e,t){var r=t.className,n=t.showReviewDate,o=t.showReviewerName,c=t.showReviewContent,i=t.showProductName,l=t.showReviewImage,s=t.showReviewRating;return a()(e,r,{"has-image":l,"has-name":o,"has-date":n,"has-rating":s,"has-content":c,"has-product-name":i})}},41:function(e,t,r){"use strict";var n=r(16),o=r.n(n),c=r(8),a=r.n(c),i=r(9),l=r.n(i),s=r(10),u=r.n(s),b=r(11),d=r.n(b),p=r(15),w=r.n(p),m=r(12),h=r.n(m),g=r(0),v=r(1),f=r(19),O=r(17),j=r.n(O),y=r(4),_=(r(7),r(26)),E=r(2),k=r(5),R=(r(86),function(e){function t(){var e;return a()(this,t),(e=u()(this,d()(t).apply(this,arguments))).state={list:[],loading:!0},e.renderItem=e.renderItem.bind(w()(e)),e}return h()(t,e),l()(t,[{key:"componentDidMount",value:function(){var e=this;j()({path:Object(f.addQueryArgs)("".concat(k.ENDPOINTS.products,"/categories"),{per_page:-1})}).then(function(t){e.setState({list:t,loading:!1})}).catch(function(){e.setState({list:[],loading:!1})})}},{key:"renderItem",value:function(e){var t=e.item,r=e.search,n=e.depth,c=void 0===n?0:n,a=["woocommerce-product-categories__item"];r.length&&a.push("is-searching"),0===c&&0!==t.parent&&a.push("is-skip-level");var i=t.breadcrumbs.length?"".concat(t.breadcrumbs.join(", "),", ").concat(t.name):t.name;return Object(g.createElement)(_.b,o()({className:a.join(" ")},e,{showCount:!0,"aria-label":Object(v.sprintf)(Object(v._n)("%s, has %d product","%s, has %d products",t.count,"woo-gutenberg-products-block"),i,t.count)}))}},{key:"render",value:function(){var e=this.state,t=e.list,r=e.loading,n=this.props,o=n.onChange,c=n.onOperatorChange,a=n.operator,i=n.selected,l=n.isSingle,s={clear:Object(v.__)("Clear all product categories","woo-gutenberg-products-block"),list:Object(v.__)("Product Categories","woo-gutenberg-products-block"),noItems:Object(v.__)("Your store doesn't have any product categories.","woo-gutenberg-products-block"),search:Object(v.__)("Search for product categories","woo-gutenberg-products-block"),selected:function(e){return Object(v.sprintf)(Object(v._n)("%d category selected","%d categories selected",e,"woo-gutenberg-products-block"),e)},updated:Object(v.__)("Category search results updated.","woo-gutenberg-products-block")};return Object(g.createElement)(g.Fragment,null,Object(g.createElement)(_.a,{className:"woocommerce-product-categories",list:t,isLoading:r,selected:i.map(function(e){return Object(y.find)(t,{id:e})}).filter(Boolean),onChange:o,renderItem:this.renderItem,messages:s,isHierarchical:!0,isSingle:l}),!!c&&Object(g.createElement)("div",{className:i.length<2?"screen-reader-text":""},Object(g.createElement)(E.SelectControl,{className:"woocommerce-product-categories__operator",label:Object(v.__)("Display products matching","woo-gutenberg-products-block"),help:Object(v.__)("Pick at least two categories to use this setting.","woo-gutenberg-products-block"),value:a,onChange:c,options:[{label:Object(v.__)("Any selected categories","woo-gutenberg-products-block"),value:"any"},{label:Object(v.__)("All selected categories","woo-gutenberg-products-block"),value:"all"}]})))}}]),t}(g.Component));R.defaultProps={operator:"any",isSingle:!1},t.a=R},44:function(e,t){!function(){e.exports=this.ReactDOM}()},47:function(e,t){!function(){e.exports=this.wp.viewport}()},5:function(e,t){!function(){e.exports=this.wc["wc-block-settings"]}()},51:function(e,t){!function(){e.exports=this.wp.hooks}()},52:function(e,t,r){"use strict";var n=r(0),o=r(1),c=(r(7),r(29)),a=r.n(c),i=r(6),l=r.n(i),s=r(39),u=r(2);t.a=function(e){var t,r,c=e.className,i=e.error,b=e.isLoading,d=e.onRetry;return Object(n.createElement)(u.Placeholder,{icon:Object(n.createElement)(a.a,{icon:"notice"}),label:Object(o.__)("Sorry, an error occurred","woo-gutenberg-products-block"),className:l()("wc-block-api-error",c)},Object(n.createElement)("div",{className:"wc-block-error__message"},(r=(t=i).apiMessage,t.message||(r?Object(n.createElement)("span",null,Object(o.__)("The following error was returned from the API","woo-gutenberg-products-block"),Object(n.createElement)("br",null),Object(n.createElement)("code",null,Object(s.escapeHTML)(r))):Object(o.__)("An unknown error occurred which prevented the block from being updated.","woo-gutenberg-products-block")))),d&&Object(n.createElement)(n.Fragment,null,b?Object(n.createElement)(u.Spinner,null):Object(n.createElement)(u.Button,{isDefault:!0,onClick:d},Object(o.__)("Retry","woo-gutenberg-products-block"))))}},53:function(e,t){!function(){e.exports=this.wp.htmlEntities}()},54:function(e,t){!function(){e.exports=this.wp.date}()},552:function(e,t,r){"use strict";r.r(t);var n=r(20),o=r.n(n),c=r(0),a=r(1),i=r(23),l=(r(77),r(16)),s=r.n(l),u=r(18),b=r(2),d=r(26),p=(r(7),r(41)),w=r(24),m=r(81),h=function(){return Object(c.createElement)(b.Placeholder,{className:"wc-block-reviews-by-category",icon:Object(c.createElement)(w.g,{className:"block-editor-block-icon"}),label:Object(a.__)("Reviews by Category","woo-gutenberg-products-block")},Object(a.__)("This block lists reviews for products from selected categories. The selected categories do not have any reviews yet, but they will show up here when they do.","woo-gutenberg-products-block"))},g=r(63),v=Object(b.withSpokenMessages)(function(e){var t=e.attributes,r=e.debouncedSpeak,n=e.setAttributes,o=t.editMode,i=t.categoryIds,l=function(e){var t=e.item,r=e.search,n=e.depth,o=void 0===n?0:n,i=["woocommerce-product-categories__item"];r.length&&i.push("is-searching"),0===o&&0!==t.parent&&i.push("is-skip-level");var l=t.breadcrumbs.length?"".concat(t.breadcrumbs.join(", "),", ").concat(t.name):t.name;return Object(c.createElement)(d.b,s()({className:i.join(" ")},e,{showCount:!0,"aria-label":Object(a.sprintf)(Object(a._n)("%s, has %d product","%s, has %d products",t.count,"woo-gutenberg-products-block"),l,t.count)}))};return!i||o?Object(c.createElement)(b.Placeholder,{icon:Object(c.createElement)(w.g,{className:"block-editor-block-icon"}),label:Object(a.__)("Reviews by Category","woo-gutenberg-products-block")},Object(a.__)("Show product reviews from specific categories.","woo-gutenberg-products-block"),Object(c.createElement)("div",{className:"wc-block-reviews__selection"},Object(c.createElement)(p.a,{selected:t.categoryIds,onChange:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=e.map(function(e){return e.id});n({categoryIds:t})}}),Object(c.createElement)(b.Button,{isDefault:!0,onClick:function(){n({editMode:!1}),r(Object(a.__)("Showing Reviews by Category block preview.","woo-gutenberg-products-block"))}},Object(a.__)("Done","woo-gutenberg-products-block")))):Object(c.createElement)(c.Fragment,null,Object(g.a)(o,n),Object(c.createElement)(u.InspectorControls,{key:"inspector"},Object(c.createElement)(b.PanelBody,{title:Object(a.__)("Category","woo-gutenberg-products-block"),initialOpen:!1},Object(c.createElement)(p.a,{selected:t.categoryIds,onChange:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=e.map(function(e){return e.id});n({categoryIds:t})},renderItem:l})),Object(c.createElement)(b.PanelBody,{title:Object(a.__)("Content","woo-gutenberg-products-block")},Object(c.createElement)(b.ToggleControl,{label:Object(a.__)("Product name","woo-gutenberg-products-block"),checked:t.showProductName,onChange:function(){return n({showProductName:!t.showProductName})}}),Object(g.b)(t,n)),Object(c.createElement)(b.PanelBody,{title:Object(a.__)("List Settings","woo-gutenberg-products-block")},Object(g.c)(t,n))),Object(c.createElement)(m.a,{attributes:t,className:"wc-block-reviews-by-category",icon:Object(c.createElement)(w.g,{className:"block-editor-block-icon"}),name:Object(a.__)("Reviews by Category","woo-gutenberg-products-block"),noReviewsPlaceholder:h}))}),f=r(79),O=r(80);function j(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}Object(i.registerBlockType)("woocommerce/reviews-by-category",{title:Object(a.__)("Reviews by Category","woo-gutenberg-products-block"),icon:Object(c.createElement)(w.g,{fillColor:"#96588a"}),category:"woocommerce",keywords:[Object(a.__)("WooCommerce","woo-gutenberg-products-block")],description:Object(a.__)("Show product reviews from specific categories.","woo-gutenberg-products-block"),attributes:function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?j(r,!0).forEach(function(t){o()(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):j(r).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}({},f.a,{categoryIds:{type:"array",default:[]},showProductName:{type:"boolean",default:!0}}),edit:function(e){return Object(c.createElement)(v,e)},save:O.a})},61:function(e,t){!function(){e.exports=this.wp.dom}()},63:function(e,t,r){"use strict";r.d(t,"a",function(){return b}),r.d(t,"b",function(){return d}),r.d(t,"c",function(){return p});var n=r(0),o=r(1),c=r(39),a=r(2),i=r(18),l=r(74),s=r(5),u=r(70),b=function(e,t){return Object(n.createElement)(i.BlockControls,null,Object(n.createElement)(a.Toolbar,{controls:[{icon:"edit",title:Object(o.__)("Edit","woo-gutenberg-products-block"),onClick:function(){return t({editMode:!e})},isActive:e}]}))},d=function(e,t){return Object(n.createElement)(n.Fragment,null,Object(n.createElement)(a.ToggleControl,{label:Object(o.__)("Product rating","woo-gutenberg-products-block"),checked:e.showReviewRating,onChange:function(){return t({showReviewRating:!e.showReviewRating})}}),e.showReviewRating&&!s.ENABLE_REVIEW_RATING&&Object(n.createElement)(a.Notice,{className:"wc-block-reviews__notice",isDismissible:!1},Object(n.createElement)(n.RawHTML,null,Object(o.sprintf)(Object(c.escapeHTML)(Object(o.__)("Product rating is disabled in your %sstore settings%s.","woo-gutenberg-products-block")),'<a href="'.concat(Object(l.a)("admin.php?page=wc-settings&tab=products"),'" target="_blank">'),"</a>"))),Object(n.createElement)(a.ToggleControl,{label:Object(o.__)("Reviewer name","woo-gutenberg-products-block"),checked:e.showReviewerName,onChange:function(){return t({showReviewerName:!e.showReviewerName})}}),Object(n.createElement)(a.ToggleControl,{label:Object(o.__)("Image","woo-gutenberg-products-block"),checked:e.showReviewImage,onChange:function(){return t({showReviewImage:!e.showReviewImage})}}),Object(n.createElement)(a.ToggleControl,{label:Object(o.__)("Review date","woo-gutenberg-products-block"),checked:e.showReviewDate,onChange:function(){return t({showReviewDate:!e.showReviewDate})}}),Object(n.createElement)(a.ToggleControl,{label:Object(o.__)("Review content","woo-gutenberg-products-block"),checked:e.showReviewContent,onChange:function(){return t({showReviewContent:!e.showReviewContent})}}),e.showReviewImage&&Object(n.createElement)(n.Fragment,null,Object(n.createElement)(u.a,{label:Object(o.__)("Review image","woo-gutenberg-products-block"),value:e.imageType,options:[{label:Object(o.__)("Reviewer photo","woo-gutenberg-products-block"),value:"reviewer"},{label:Object(o.__)("Product","woo-gutenberg-products-block"),value:"product"}],onChange:function(e){return t({imageType:e})}}),"reviewer"===e.imageType&&!s.SHOW_AVATARS&&Object(n.createElement)(a.Notice,{className:"wc-block-reviews__notice",isDismissible:!1},Object(n.createElement)(n.RawHTML,null,Object(o.sprintf)(Object(c.escapeHTML)(Object(o.__)("Reviewer photo is disabled in your %ssite settings%s.","woo-gutenberg-products-block")),'<a href="'.concat(Object(l.a)("options-discussion.php"),'" target="_blank">'),"</a>")))))},p=function(e,t){return Object(n.createElement)(n.Fragment,null,Object(n.createElement)(a.ToggleControl,{label:Object(o.__)("Order by","woo-gutenberg-products-block"),checked:e.showOrderby,onChange:function(){return t({showOrderby:!e.showOrderby})}}),Object(n.createElement)(a.SelectControl,{label:Object(o.__)("Order Product Reviews by","woo-gutenberg-products-block"),value:e.orderby,options:[{label:"Most recent",value:"most-recent"},{label:"Highest Rating",value:"highest-rating"},{label:"Lowest Rating",value:"lowest-rating"}],onChange:function(e){return t({orderby:e})}}),Object(n.createElement)(a.RangeControl,{label:Object(o.__)("Starting Number of Reviews","woo-gutenberg-products-block"),value:e.reviewsOnPageLoad,onChange:function(e){return t({reviewsOnPageLoad:e})},max:20,min:1}),Object(n.createElement)(a.ToggleControl,{label:Object(o.__)("Load more","woo-gutenberg-products-block"),checked:e.showLoadMore,onChange:function(){return t({showLoadMore:!e.showLoadMore})}}),e.showLoadMore&&Object(n.createElement)(a.RangeControl,{label:Object(o.__)("Load More Reviews","woo-gutenberg-products-block"),value:e.reviewsOnLoadMore,onChange:function(e){return t({reviewsOnLoadMore:e})},max:20,min:1}))}},64:function(e,t){},65:function(e,t){},67:function(e,t){},68:function(e,t){},69:function(e,t,r){"use strict";var n=r(16),o=r.n(n),c=r(8),a=r.n(c),i=r(9),l=r.n(i),s=r(10),u=r.n(s),b=r(11),d=r.n(b),p=r(12),w=r.n(p),m=r(0),h=r(13),g=[];t.a=function(e){return function(t){function r(){return a()(this,r),u()(this,d()(r).apply(this,arguments))}return w()(r,t),l()(r,[{key:"generateUniqueID",value:function(){var e=r.name;return g[e]||(g[e]=0),g[e]++,g[e]}},{key:"render",value:function(){var t=this.generateUniqueID();return Object(m.createElement)(e,o()({},this.props,{componentId:t}))}}]),r}(h.Component)}},70:function(e,t,r){"use strict";var n=r(16),o=r.n(n),c=r(8),a=r.n(c),i=r(9),l=r.n(i),s=r(10),u=r.n(s),b=r(11),d=r.n(b),p=r(15),w=r.n(p),m=r(12),h=r.n(m),g=r(0),v=r(4),f=r(6),O=r.n(f),j=r(2),y=r(21),_=(r(132),function(e){function t(){var e;return a()(this,t),(e=u()(this,d()(t).apply(this,arguments))).onClick=e.onClick.bind(w()(e)),e}return h()(t,e),l()(t,[{key:"onClick",value:function(e){this.props.onChange&&this.props.onChange(e.target.value)}},{key:"render",value:function(){var e,t=this,r=this.props,n=r.label,c=r.checked,a=r.instanceId,i=r.className,l=r.help,s=r.options,u=r.value,b="inspector-toggle-button-control-".concat(a);return l&&(e=Object(v.isFunction)(l)?l(c):l),Object(g.createElement)(j.BaseControl,{id:b,help:e,className:O()("components-toggle-button-control",i)},Object(g.createElement)("label",{id:b+"__label",htmlFor:b,className:"components-toggle-button-control__label"},n),Object(g.createElement)(j.ButtonGroup,{"aria-labelledby":b+"__label"},s.map(function(e,r){var c={};return u===e.value?(c.isPrimary=!0,c["aria-pressed"]=!0):(c.isDefault=!0,c["aria-pressed"]=!1),Object(g.createElement)(j.Button,o()({key:"".concat(e.label,"-").concat(e.value,"-").concat(r),value:e.value,onClick:t.onClick,"aria-label":n+": "+e.label},c),e.label)})))}}]),t}(g.Component));t.a=Object(y.withInstanceId)(_)},77:function(e,t,r){var n=r(114);"string"==typeof n&&(n=[[e.i,n,""]]);var o={insert:"head",singleton:!1};r(35)(n,o);n.locals&&(e.exports=n.locals)},78:function(e,t){!function(){e.exports=this.wp.isShallowEqual}()},79:function(e,t,r){"use strict";t.a={editMode:{type:"boolean",default:!0},imageType:{type:"string",default:"reviewer"},orderby:{type:"string",default:"most-recent"},reviewsOnLoadMore:{type:"number",default:10},reviewsOnPageLoad:{type:"number",default:10},showLoadMore:{type:"boolean",default:!0},showOrderby:{type:"boolean",default:!0},showReviewDate:{type:"boolean",default:!0},showReviewerName:{type:"boolean",default:!0},showReviewImage:{type:"boolean",default:!0},showReviewRating:{type:"boolean",default:!0},showReviewContent:{type:"boolean",default:!0}}},80:function(e,t,r){"use strict";var n=r(16),o=r.n(n),c=r(0),a=(r(77),r(40));t.a=function(e){var t=e.attributes,r=t.categoryIds,n=t.imageType,i=t.orderby,l=t.productId,s={"data-image-type":n,"data-orderby":i,"data-reviews-on-page-load":t.reviewsOnPageLoad,"data-reviews-on-load-more":t.reviewsOnLoadMore,"data-show-load-more":t.showLoadMore,"data-show-orderby":t.showOrderby},u="wc-block-all-reviews";return l&&(s["data-product-id"]=l,u="wc-block-reviews-by-product"),Array.isArray(r)&&(s["data-category-ids"]=r.join(","),u="wc-block-reviews-by-category"),Object(c.createElement)("div",o()({className:Object(a.a)(u,t)},s))}},81:function(e,t,r){"use strict";var n=r(8),o=r.n(n),c=r(9),a=r.n(c),i=r(10),l=r.n(i),s=r(11),u=r.n(s),b=r(12),d=r.n(b),p=r(0),w=r(1),m=r(13),h=(r(7),r(4)),g=r(2),v=r(5),f=r(52),O=r(20),j=r.n(O),y=r(6),_=r.n(y);function E(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}var k=function(e){var t,r=e.label,n=e.screenReaderLabel,o=e.wrapperElement,c=e.wrapperProps;return!r&&n?(t=o||"span",c=function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?E(r,!0).forEach(function(t){j()(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):E(r).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}({},c,{className:_()(c.className,"screen-reader-text")}),Object(p.createElement)(t,c,n)):(t=o||m.Fragment,r&&n&&r!==n?Object(p.createElement)(t,c,Object(p.createElement)("span",{"aria-hidden":!0},r),Object(p.createElement)("span",{className:"screen-reader-text"},n)):Object(p.createElement)(t,c,r))};k.defaultProps={wrapperProps:{}};var R=k,C=(r(170),function(e){var t=e.onClick,r=e.label,n=e.screenReaderLabel;return Object(p.createElement)("div",{className:"wp-block-button wc-block-load-more"},Object(p.createElement)("button",{className:"wp-block-button__link",onClick:t},Object(p.createElement)(R,{label:r,screenReaderLabel:n})))});C.defaultProps={label:Object(w.__)("Load more","woo-gutenberg-products-block")};var N=C,L=r(15),P=r.n(L),M=r(100),x=r.n(M),I=function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"...",n=x()(e,{suffix:r,limit:t});return n.html},T=function(e,t,r,n){var o=S(e,t,r);return I(e,o-n.length,n)},S=function(e,t,r){for(var n={start:0,middle:0,end:e.length};n.start<=n.end;)n.middle=Math.floor((n.start+n.end)/2),t.innerHTML=I(e,n.middle),n=H(n,t.clientHeight,r);return n.middle},H=function(e,t,r){return t<=r?e.start=e.middle+1:e.end=e.middle-1,e},D=function(e){function t(e){var r;return o()(this,t),(r=l()(this,u()(t).apply(this,arguments))).state={isExpanded:!1,clampEnabled:null,content:e.children,summary:"."},r.reviewSummary=Object(m.createRef)(),r.reviewContent=Object(m.createRef)(),r.getButton=r.getButton.bind(P()(r)),r.onClick=r.onClick.bind(P()(r)),r}return d()(t,e),a()(t,[{key:"componentDidMount",value:function(){if(this.props.children){var e=this.props,t=e.maxLines,r=e.ellipsis,n=(this.reviewSummary.current.clientHeight+1)*t+1,o=this.reviewContent.current.clientHeight+1>n;this.setState({clampEnabled:o}),o&&this.setState({summary:T(this.reviewContent.current.innerHTML,this.reviewSummary.current,n,r)})}}},{key:"getButton",value:function(){var e=this.state.isExpanded,t=this.props,r=t.className,n=t.lessText,o=t.moreText,c=e?n:o;if(c)return Object(p.createElement)("a",{href:"#more",className:r+"__read_more",onClick:this.onClick,"aria-expanded":!e,role:"button"},c)}},{key:"onClick",value:function(e){e.preventDefault();var t=this.state.isExpanded;this.setState({isExpanded:!t})}},{key:"render",value:function(){var e=this.props.className,t=this.state,r=t.content,n=t.summary,o=t.clampEnabled,c=t.isExpanded;return r?!1===o?Object(p.createElement)("div",{className:e},Object(p.createElement)("div",{ref:this.reviewContent},r)):Object(p.createElement)("div",{className:e},(!c||null===o)&&Object(p.createElement)("div",{ref:this.reviewSummary,"aria-hidden":c,dangerouslySetInnerHTML:{__html:n}}),(c||null===o)&&Object(p.createElement)("div",{ref:this.reviewContent,"aria-hidden":!c},r),this.getButton()):null}}]),t}(m.Component);D.defaultProps={maxLines:3,ellipsis:"…",moreText:Object(w.__)("Read more","woo-gutenberg-products-block"),lessText:Object(w.__)("Read less","woo-gutenberg-products-block"),className:"read-more-content"};var A=D;r(171);var z=function(e){var t=e.attributes,r=e.review,n=void 0===r?{}:r,o=t.imageType,c=t.showReviewDate,a=t.showReviewerName,i=t.showReviewImage,l=t.showReviewRating,s=t.showReviewContent,u=t.showProductName,b=n.rating,d=!Object.keys(n).length>0,m=Number.isFinite(b)&&l;return Object(p.createElement)("li",{className:_()("wc-block-review-list-item__item",{"is-loading":d}),"aria-hidden":d},(u||c||a||i||m)&&Object(p.createElement)("div",{className:"wc-block-review-list-item__info"},i&&function(e,t,r){return r||!e?Object(p.createElement)("div",{className:"wc-block-review-list-item__image",width:"48",height:"48"}):Object(p.createElement)("div",{className:"wc-block-review-list-item__image"},"product"===t?Object(p.createElement)("img",{"aria-hidden":"true",alt:"",src:e.product_picture||"",className:"wc-block-review-list-item__image",width:"48",height:"48"}):Object(p.createElement)("img",{"aria-hidden":"true",alt:"",src:e.reviewer_avatar_urls[48]||"",srcSet:e.reviewer_avatar_urls[96]+" 2x",className:"wc-block-review-list-item__image",width:"48",height:"48"}),e.verified&&Object(p.createElement)("div",{className:"wc-block-review-list-item__verified",title:Object(w.__)("Verified buyer","woo-gutenberg-products-block")},Object(w.__)("Verified buyer","woo-gutenberg-products-block")))}(n,o,d),(u||a||m||c)&&Object(p.createElement)("div",{className:"wc-block-review-list-item__meta"},m&&function(e){var t=e.rating,r={width:t/5*100+"%"};return Object(p.createElement)("div",{className:"wc-block-review-list-item__rating"},Object(p.createElement)("div",{className:"wc-block-review-list-item__rating__stars",role:"img"},Object(p.createElement)("span",{style:r},Object(w.sprintf)(Object(w.__)("Rated %d out of 5","woo-gutenberg-products-block"),t))))}(n),u&&function(e){return Object(p.createElement)("div",{className:"wc-block-review-list-item__product"},Object(p.createElement)("a",{href:e.product_permalink},e.product_name))}(n),a&&function(e){var t=e.reviewer,r=void 0===t?"":t;return Object(p.createElement)("div",{className:"wc-block-review-list-item__author"},r)}(n),c&&function(e){var t=e.date_created,r=e.formatted_date_created;return Object(p.createElement)("time",{className:"wc-block-review-list-item__published-date",dateTime:t},r)}(n))),s&&function(e){return Object(p.createElement)(A,{maxLines:10,moreText:Object(w.__)("Read full review","woo-gutenberg-products-block"),lessText:Object(w.__)("Hide full review","woo-gutenberg-products-block"),className:"wc-block-review-list-item__text"},Object(p.createElement)("div",{dangerouslySetInnerHTML:{__html:e.review||""}}))}(n))};r(172);function B(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}var V=function(e){var t=e.attributes,r=e.reviews,n=function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?B(r,!0).forEach(function(t){j()(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):B(r).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}({},t,{showReviewImage:(v.SHOW_AVATARS||"product"===t.imageType)&&t.showReviewImage,showReviewRating:v.ENABLE_REVIEW_RATING&&t.showReviewRating});return Object(p.createElement)("ul",{className:"wc-block-review-list"},0===r.length?Object(p.createElement)(z,{attributes:n}):r.map(function(e,t){return Object(p.createElement)(z,{key:e.id||t,attributes:n,review:e})}))},F=r(69),W=(r(173),Object(F.a)(function(e){var t=e.className,r=e.componentId,n=e.defaultValue,o=e.label,c=e.onChange,a=e.options,i=e.screenReaderLabel,l=e.readOnly,s=e.value,u="wc-block-order-select__select-".concat(r);return Object(p.createElement)("p",{className:_()("wc-block-order-select",t)},Object(p.createElement)(R,{label:o,screenReaderLabel:i,wrapperElement:"label",wrapperProps:{className:"wc-block-order-select__label",htmlFor:u}}),Object(p.createElement)("select",{id:u,className:"wc-block-order-select__select",defaultValue:n,onChange:c,readOnly:l,value:s},a.map(function(e){return Object(p.createElement)("option",{key:e.key,value:e.key},e.label)})))})),G=(r(174),function(e){var t=e.defaultValue,r=e.onChange,n=e.readOnly,o=e.value;return Object(p.createElement)(W,{className:"wc-block-review-order-select",defaultValue:t,label:Object(w.__)("Order by","woo-gutenberg-products-block"),onChange:r,options:[{key:"most-recent",label:Object(w.__)("Most recent","woo-gutenberg-products-block")},{key:"highest-rating",label:Object(w.__)("Highest rating","woo-gutenberg-products-block")},{key:"lowest-rating",label:Object(w.__)("Lowest rating","woo-gutenberg-products-block")}],readOnly:n,screenReaderLabel:Object(w.__)("Order reviews by","woo-gutenberg-products-block"),value:o})}),Z=r(16),U=r.n(Z),q=r(38),J=r.n(q),Q=r(78),Y=r.n(Q),K=r(40),X=function(e){var t=function(t){function r(){var e;return o()(this,r),(e=l()(this,u()(r).apply(this,arguments))).state={error:null,loading:!0,reviews:[],totalReviews:0},e.setError=e.setError.bind(P()(e)),e.delayedAppendReviews=e.props.delayFunction(e.appendReviews),e}return d()(r,t),a()(r,[{key:"componentDidMount",value:function(){this.replaceReviews()}},{key:"componentDidUpdate",value:function(e){e.reviewsToDisplay<this.props.reviewsToDisplay?this.delayedAppendReviews():this.shouldReplaceReviews(e,this.props)&&this.replaceReviews()}},{key:"shouldReplaceReviews",value:function(e,t){return e.orderby!==t.orderby||e.order!==t.order||e.productId!==t.productId||!Y()(e.categoryIds,t.categoryIds)}},{key:"componentWillUnMount",value:function(){this.delayedAppendReviews.cancel&&this.delayedAppendReviews.cancel()}},{key:"getArgs",value:function(e){var t=this.props,r=t.categoryIds,n=t.order,o=t.orderby,c=t.productId,a={order:n,orderby:o,per_page:t.reviewsToDisplay-e,offset:e};return r&&r.length&&(a.category_id=Array.isArray(r)?r.join(","):r),c&&(a.product_id=c),a}},{key:"replaceReviews",value:function(){var e=this.props.onReviewsReplaced;this.updateListOfReviews().then(e)}},{key:"appendReviews",value:function(){var e=this.props,t=e.onReviewsAppended,r=e.reviewsToDisplay,n=this.state.reviews;r<=n.length||this.updateListOfReviews(n).then(t)}},{key:"updateListOfReviews",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],r=this.props.reviewsToDisplay,n=this.state.totalReviews,o=Math.min(n,r)-t.length;return this.setState({loading:!0,reviews:t.concat(Array(o).fill({}))}),Object(K.c)(this.getArgs(t.length)).then(function(r){var n=r.reviews,o=r.totalReviews;return e.setState({reviews:t.filter(function(e){return Object.keys(e).length}).concat(n),totalReviews:o,loading:!1,error:null}),{newReviews:n}}).catch(this.setError)}},{key:"setError",value:function(e){var t=this;e.json().then(function(e){var r=t.props.onReviewsLoadError,n="object"===J()(e)&&e.hasOwnProperty("message")?{apiMessage:e.message}:{apiMessage:null};t.setState({reviews:[],loading:!1,error:n}),r()})}},{key:"render",value:function(){var t=this.props.reviewsToDisplay,r=this.state,n=r.error,o=r.loading,c=r.reviews,a=r.totalReviews;return Object(p.createElement)(e,U()({},this.props,{error:n,isLoading:o,reviews:c.slice(0,t),totalReviews:a}))}}]),r}(m.Component);t.defaultProps={delayFunction:function(e){return e},onReviewsAppended:function(){},onReviewsLoadError:function(){},onReviewsReplaced:function(){}};var r=e.displayName,n=void 0===r?e.name||"Component":r;return t.displayName="WithReviews( ".concat(n," )"),t}(function(e){function t(){return o()(this,t),l()(this,u()(t).apply(this,arguments))}return d()(t,e),a()(t,[{key:"render",value:function(){var e=this.props,t=e.attributes,r=e.error,n=e.isLoading,o=e.noReviewsPlaceholder,c=e.reviews,a=e.totalReviews;return r?Object(p.createElement)(f.a,{className:"wc-block-featured-product-error",error:r,isLoading:n}):0!==c.length||n?Object(p.createElement)(g.Disabled,null,t.showOrderby&&v.ENABLE_REVIEW_RATING&&Object(p.createElement)(G,{readOnly:!0,value:t.orderby}),Object(p.createElement)(V,{attributes:t,reviews:c}),t.showLoadMore&&a>c.length&&Object(p.createElement)(N,{screenReaderLabel:Object(w.__)("Load more reviews","woo-gutenberg-products-block")})):Object(p.createElement)(o,{attributes:t})}}]),t}(m.Component)),$=function(e){function t(){return o()(this,t),l()(this,u()(t).apply(this,arguments))}return d()(t,e),a()(t,[{key:"renderHiddenContentPlaceholder",value:function(){var e=this.props,t=e.icon,r=e.name;return Object(p.createElement)(g.Placeholder,{icon:t,label:r},Object(w.__)("The content for this block is hidden due to block settings.","woo-gutenberg-products-block"))}},{key:"render",value:function(){var e=this.props,t=e.attributes,r=e.className,n=e.noReviewsPlaceholder,o=t.categoryIds,c=t.productId,a=t.reviewsOnPageLoad,i=t.showProductName,l=t.showReviewDate,s=t.showReviewerName,u=t.showReviewContent,b=t.showReviewImage,d=t.showReviewRating,w=Object(K.b)(t.orderby),m=w.order,g=w.orderby;return!(u||d||l||s||b||i)?this.renderHiddenContentPlaceholder():Object(p.createElement)("div",{className:Object(K.a)(r,t)},Object(p.createElement)(X,{attributes:t,categoryIds:o,delayFunction:function(e){return Object(h.debounce)(e,400)},noReviewsPlaceholder:n,orderby:g,order:m,productId:c,reviewsToDisplay:a}))}}]),t}(m.Component);t.a=$}});
|
1 |
+
this.wc=this.wc||{},this.wc.blocks=this.wc.blocks||{},this.wc.blocks["reviews-by-category"]=function(e){function t(t){for(var n,a,i=t[0],l=t[1],s=t[2],b=0,d=[];b<i.length;b++)a=i[b],Object.prototype.hasOwnProperty.call(o,a)&&o[a]&&d.push(o[a][0]),o[a]=0;for(n in l)Object.prototype.hasOwnProperty.call(l,n)&&(e[n]=l[n]);for(u&&u(t);d.length;)d.shift()();return c.push.apply(c,s||[]),r()}function r(){for(var e,t=0;t<c.length;t++){for(var r=c[t],n=!0,i=1;i<r.length;i++){var l=r[i];0!==o[l]&&(n=!1)}n&&(c.splice(t--,1),e=a(a.s=r[0]))}return e}var n={},o={17:0},c=[];function a(t){if(n[t])return n[t].exports;var r=n[t]={i:t,l:!1,exports:{}};return e[t].call(r.exports,r,r.exports,a),r.l=!0,r.exports}a.m=e,a.c=n,a.d=function(e,t,r){a.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},a.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},a.t=function(e,t){if(1&t&&(e=a(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(a.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var n in e)a.d(r,n,function(t){return e[t]}.bind(null,n));return r},a.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return a.d(t,"a",t),t},a.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},a.p="";var i=window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[],l=i.push.bind(i);i.push=t,i=i.slice();for(var s=0;s<i.length;s++)t(i[s]);var u=l;return c.push([567,2,1,0]),r()}({0:function(e,t){!function(){e.exports=this.wp.element}()},1:function(e,t){!function(){e.exports=this.wp.i18n}()},118:function(e,t,r){},12:function(e,t){!function(){e.exports=this.React}()},13:function(e,t){!function(){e.exports=this.moment}()},16:function(e,t){!function(){e.exports=this.wp.apiFetch}()},17:function(e,t){!function(){e.exports=this.wp.editor}()},18:function(e,t){!function(){e.exports=this.wp.url}()},20:function(e,t){!function(){e.exports=this.wp.compose}()},22:function(e,t){!function(){e.exports=this.wp.blocks}()},23:function(e,t,r){"use strict";var n=r(0),o=r(3),c=function(e){var t=e.className,r=e.fillColor;return Object(n.createElement)(o.Icon,{className:t,icon:Object(n.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 22.41"},Object(n.createElement)("g",null,Object(n.createElement)("g",null,Object(n.createElement)("path",{fill:r,d:"M16.55 0H1.75C.56 0 0 .52 0 1.68v9.24c0 1.15.56 1.92 1.75 1.92H2V4.76a2.51 2.51 0 0 1 2.74-2.68H18v-.4A1.51 1.51 0 0 0 16.55 0z"}),Object(n.createElement)("path",{fill:r,d:"M19.54 3.11H4.74C3.55 3.11 3 3.64 3 4.79V14c0 1.19.55 2 1.74 2H5V7.88A2.51 2.51 0 0 1 7.73 5.2H21v-.41a1.51 1.51 0 0 0-1.46-1.68z"}),Object(n.createElement)("path",{fill:r,d:"M22.53 6.23H7.73C6.54 6.23 6 6.75 6 7.91v9.24c0 1.15.56 1.92 1.75 1.92h7a.59.59 0 0 1 .32.11l1.61 1.15 2.83 2a.31.31 0 0 0 .18.05.3.3 0 0 0 .31-.3v-2.73a.3.3 0 0 1 .28-.28h2.31A1.47 1.47 0 0 0 24 17.6V7.91a1.52 1.52 0 0 0-1.47-1.68z"}),Object(n.createElement)("path",{fill:"#ffffff",d:"M10.2 10.92l1.06-2.14 1.05 2.14 2.37.35-1.71 1.66.4 2.36-2.11-1.11-.17.09-.52.27-.51.26-.92.49.18-1.02.09-.57.1-.56.03-.21-1.71-1.66 2.37-.35zM21.46 14.25h-4.4a.69.69 0 0 1-.69-.69.68.68 0 0 1 .69-.68h4.4a.68.68 0 0 1 .69.68.69.69 0 0 1-.69.69zM21.46 11.19h-4.4a.69.69 0 1 1 0-1.37h4.4a.69.69 0 1 1 0 1.37z"}))))})},a=function(){return Object(n.createElement)(o.Icon,{icon:Object(n.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},Object(n.createElement)("path",{fillRule:"nonzero",d:"M21.913 7.0946H2.0254c-1.1708 0-2.0984.9908-2.0205 2.16l.741 11.0724c.0714 1.0638.9552 1.8892 2.0206 1.8892h18.4054c1.0654 0 1.9492-.8254 2.0205-1.8892l.7411-11.0724c.0779-1.1692-.8497-2.16-2.0205-2.16zm-8.8006-4.6573h5.987c1.119 0 2.0255.9065 2.0255 2.0254v.934H2.8103V2.0255C2.8103.9064 3.7168 0 4.8357 0h6.2513c1.119 0 2.0254.9065 2.0254 2.0254v.4119zm-7.0589 11.619a.926.926 0 1 1 0-1.852h11.8297a.926.926 0 1 1 0 1.852H6.0535z"}))})},i=function(){return Object(n.createElement)(o.Icon,{icon:Object(n.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},Object(n.createElement)("path",{d:"M22 7.5H2c-1.2 0-2.1 1-2 2.2l.7 11.1c.1 1.1 1 1.9 2 1.9h18.5c1.1 0 2-.8 2-1.9L24 9.6c.1-1.1-.9-2.1-2-2.1zM13.1 2.8v-.4c0-1.1-.9-2-2-2H4.8c-1.1 0-2 .9-2 2v3.4h18.4v-1c0-1.1-.9-2-2-2h-6.1z"}),Object(n.createElement)("path",{fill:"#fff",d:"M14.4 18.7L12 17.4l-2.4 1.3.5-2.6-1.9-1.9 2.6-.4 1.2-2.4 1.2 2.4 2.6.4-1.9 1.9z"}))})},l=function(){return Object(n.createElement)(o.Icon,{className:"material-icon",icon:Object(n.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},Object(n.createElement)("path",{d:"M0 0h24v24H0z",fill:"none"}),Object(n.createElement)("path",{d:"M23 12l-2.44-2.78.34-3.68-3.61-.82-1.89-3.18L12 3 8.6 1.54 6.71 4.72l-3.61.81.34 3.68L1 12l2.44 2.78-.34 3.69 3.61.82 1.89 3.18L12 21l3.4 1.46 1.89-3.18 3.61-.82-.34-3.68L23 12zm-10 5h-2v-2h2v2zm0-4h-2V7h2v6z"}))})},s=function(){return Object(n.createElement)(o.Icon,{icon:Object(n.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},Object(n.createElement)("path",{fill:"#1E8CBE",d:"M12 7c-2.76 0-5 2.24-5 5s2.24 5 5 5 5-2.24 5-5-2.24-5-5-5zm0-5C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"}))})},u=function(){return Object(n.createElement)(o.Icon,{icon:Object(n.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},Object(n.createElement)("path",{fill:"#6C7781",d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"}))})},b=function(e){var t=e.className,r=e.fillColor;return Object(n.createElement)(o.Icon,{className:t,icon:Object(n.createElement)("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},Object(n.createElement)("path",{fill:r,d:"M2.3,17.3h9.3c0.1,0,0.3,0,0.4,0.1l5.9,4.2c0.3,0.2,0.7,0,0.7-0.3v-3.7c0-0.2,0.2-0.4,0.4-0.4H22 c1.1,0,2-0.9,2-2V2.5c0-1.2-0.7-2.2-2-2.2H2.3C0.7,0.2,0,0.9,0,2.5v12.3C0,16.3,0.7,17.3,2.3,17.3z"}),Object(n.createElement)("polygon",{fill:"#ffffff",points:"8.8,12.1 6.5,10.9 4.1,12.1 4.5,9.5 2.6,7.6 5.3,7.2 6.5,4.8 7.6,7.2 10.3,7.6 8.4,9.5"}),Object(n.createElement)("path",{fill:"#ffffff",d:"M20.7,7.9h-7c-0.5,0-0.9-0.4-0.9-0.9S13.2,6,13.7,6h7c0.5,0,0.9,0.4,0.9,0.9S21.2,7.9,20.7,7.9z"}),Object(n.createElement)("path",{fill:"#ffffff",d:"M20.7,11.5h-7c-0.5,0-0.9-0.4-0.9-0.9s0.4-0.9,0.9-0.9h7c0.5,0,0.9,0.4,0.9,0.9S21.2,11.5,20.7,11.5z"}))})},d=function(e){var t=e.className,r=e.fillColor;return Object(n.createElement)(o.Icon,{className:t,icon:Object(n.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 23"},Object(n.createElement)("path",{fill:r,d:"M21.9943 7.0957H2.00638C0.807102 7.0957 -0.0923543 8.0951 0.0075853 9.29437L0.707162 20.3877C0.807102 21.487 1.70656 22.2865 2.70595 22.2865H21.1948C22.2941 22.2865 23.1936 21.487 23.1936 20.3877L23.9931 9.29437C24.093 8.0951 23.0936 7.0957 21.9943 7.0957Z"}),Object(n.createElement)("path",{fill:r,d:"M13.0921 2.39855V1.99879C13.0921 0.899456 12.1926 0 11.0933 0H4.7971C3.69777 0 2.79831 0.899456 2.79831 1.99879V5.39674H21.1872V4.49728C21.1872 3.39795 20.2877 2.49849 19.1884 2.49849H13.0921V2.39855Z"}),Object(n.createElement)("path",{fill:"white",d:"M8.63115 17.126L6.5415 15.9449L4.361 17.126L4.72442 14.6729L2.99819 13.0376L5.45125 12.6742L6.5415 10.4937L7.5409 12.6742L9.99396 13.0376L8.26773 14.6729L8.63115 17.126Z"}),Object(n.createElement)("path",{fill:"white",d:"M19.1907 13.5918H12.9899C12.547 13.5918 12.1926 13.1921 12.1926 12.6924C12.1926 12.1927 12.547 11.7929 12.9899 11.7929H19.1907C19.6336 11.7929 19.9879 12.1927 19.9879 12.6924C19.9879 13.1921 19.6336 13.5918 19.1907 13.5918Z"}),Object(n.createElement)("path",{fill:"white",d:"M19.1907 17.1897H12.9899C12.547 17.1897 12.1926 16.7899 12.1926 16.2902C12.1926 15.7905 12.547 15.3907 12.9899 15.3907H19.1907C19.6336 15.3907 19.9879 15.7905 19.9879 16.2902C19.9879 16.7899 19.6336 17.1897 19.1907 17.1897Z"}))})},p=function(){return Object(n.createElement)(o.Icon,{className:"material-icon",icon:Object(n.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},Object(n.createElement)("path",{d:"M13 13v8h8v-8h-8zM3 21h8v-8H3v8zM3 3v8h8V3H3zm13.66-1.31L11 7.34 16.66 13l5.66-5.66-5.66-5.65z"}),Object(n.createElement)("path",{d:"M0 0h24v24H0z",fill:"none"}))})},w=r(6),m=r.n(w),h=(r(2),function(e){var t=e.size,r=void 0===t?20:t,c=e.className;return Object(n.createElement)(o.Icon,{className:m()("woo-icon",c),icon:Object(n.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",height:r,width:Math.floor(1.67*r),viewBox:"0 0 245 145"},Object(n.createElement)("path",{fill:"#96588A",d:"M22.76 0h199.1a22.77 22.77 0 0 1 22.8 22.76v75.92a22.77 22.77 0 0 1-22.78 22.78h-71.41l9.77 24-43.13-24H22.76C10.1946 121.449.011 111.2654 0 98.7V22.76C.011 10.1946 10.1946.011 22.76 0z"}),Object(n.createElement)("path",{fill:"#FFF",fillRule:"nonzero",d:"M12.32 20.63a8.16 8.16 0 0 1 6.25-3.09c5.0733-.36 7.9867 2.0333 8.74 7.18 3.14 20.86 6.4933 38.5633 10.06 53.11l21.92-41.69c2-3.76 4.49-5.76 7.52-6 4.3867-.3067 7.13 2.49 8.23 8.39a186 186 0 0 0 9.47 34.23c2.62-25.38 7.0133-43.7133 13.18-55a7.73 7.73 0 0 1 6.6-4.43 8.8 8.8 0 0 1 6.32 2 7.75 7.75 0 0 1 3.05 5.74 8.52 8.52 0 0 1-1 4.77c-3.9 7.24-7.12 19.28-9.66 36.12-2.48 16.2533-3.3967 28.9633-2.75 38.13a12.25 12.25 0 0 1-1.16 6.56 6.32 6.32 0 0 1-5.33 3.53c-2.6667.18-5.3033-1.0567-7.91-3.71-9.2933-9.54-16.6567-23.7267-22.09-42.56C57.3 76.7167 52.48 86.3333 49.3 92.76c-5.86 11.3333-10.89 17.13-15.09 17.39-2.7333.1933-5.0667-2.0933-7-6.86-5.1-13.0933-10.5833-38.4033-16.45-75.93a8.56 8.56 0 0 1 1.56-6.73zM227.23 36.34a23.17 23.17 0 0 0-16-11.59 26.25 26.25 0 0 0-5.42-.58c-9.5867 0-17.41 5-23.47 15a53 53 0 0 0-7.78 28.16c0 7.7333 1.6167 14.3333 4.85 19.8a23.15 23.15 0 0 0 16 11.59 26.28 26.28 0 0 0 5.42.59c9.68 0 17.5033-5 23.47-15A53.89 53.89 0 0 0 232.08 56c0-7.7333-1.6167-14.2867-4.85-19.66zm-12.61 27.72c-1.3733 6.56-3.9167 11.5-7.63 14.82-2.9267 2.6667-5.6133 3.7433-8.06 3.23-2.4467-.5133-4.4033-2.6667-5.87-6.46a25.68 25.68 0 0 1-1.76-9.09 35.9 35.9 0 0 1 .73-7.34 33 33 0 0 1 5.28-11.88c3.3333-4.8933 6.8067-6.9467 10.42-6.16 2.44.4867 4.3933 2.64 5.86 6.46a25.68 25.68 0 0 1 1.76 9.12 35.73 35.73 0 0 1-.73 7.33v-.03zM164.57 36.34a23.2 23.2 0 0 0-16-11.59 26.42 26.42 0 0 0-5.43-.58c-9.5933 0-17.4167 5-23.47 15a53 53 0 0 0-7.78 28.16c0 7.7333 1.6133 14.3333 4.84 19.8a23.19 23.19 0 0 0 16 11.59 26.44 26.44 0 0 0 5.43.59c9.68 0 17.5033-5 23.47-15A53.88 53.88 0 0 0 169.4 56c0-7.7333-1.6133-14.2867-4.84-19.66h.01zm-12.61 27.72c-1.3667 6.56-3.91 11.5-7.63 14.82-2.93 2.64-5.63 3.72-8.07 3.23-2.44-.49-4.4-2.64-5.86-6.46a25.7 25.7 0 0 1-1.77-9.09 35.9 35.9 0 0 1 .74-7.34 33 33 0 0 1 5.28-11.88c3.3333-4.8933 6.8067-6.9467 10.42-6.16 2.44.4867 4.3933 2.64 5.86 6.46a25.91 25.91 0 0 1 1.76 9.12 35.73 35.73 0 0 1-.73 7.33v-.03z"}))})});r.d(t,"a",(function(){return c})),r.d(t,"b",(function(){return a})),r.d(t,"c",(function(){return i})),r.d(t,"d",(function(){return l})),r.d(t,"e",(function(){return s})),r.d(t,"f",(function(){return u})),r.d(t,"h",(function(){return b})),r.d(t,"g",(function(){return d})),r.d(t,"i",(function(){return p})),r.d(t,"j",(function(){return h}))},3:function(e,t){!function(){e.exports=this.wp.components}()},32:function(e,t){!function(){e.exports=this.wp.keycodes}()},38:function(e,t){!function(){e.exports=this.wp.escapeHtml}()},39:function(e,t,r){"use strict";r.d(t,"b",(function(){return l})),r.d(t,"c",(function(){return s})),r.d(t,"a",(function(){return u}));var n=r(16),o=r.n(n),c=r(6),a=r.n(c),i=r(5),l=function(e){if(i.ENABLE_REVIEW_RATING){if("lowest-rating"===e)return{order:"asc",orderby:"rating"};if("highest-rating"===e)return{order:"desc",orderby:"rating"}}return{order:"desc",orderby:"date_gmt"}},s=function(e){return o()({path:"/wc/blocks/products/reviews?"+Object.entries(e).map((function(e){return e.join("=")})).join("&"),parse:!1}).then((function(e){return e.json().then((function(t){return{reviews:t,totalReviews:parseInt(e.headers.get("x-wp-total"),10)}}))}))},u=function(e,t){var r=t.className,n=t.showReviewDate,o=t.showReviewerName,c=t.showReviewContent,i=t.showProductName,l=t.showReviewImage,s=t.showReviewRating;return a()(e,r,{"has-image":l,"has-name":o,"has-date":n,"has-rating":s,"has-content":c,"has-product-name":i})}},4:function(e,t){!function(){e.exports=this.lodash}()},40:function(e,t,r){"use strict";var n=r(15),o=r.n(n),c=r(7),a=r.n(c),i=r(8),l=r.n(i),s=r(9),u=r.n(s),b=r(10),d=r.n(b),p=r(14),w=r.n(p),m=r(11),h=r.n(m),g=r(0),v=r(1),f=r(18),O=r(16),j=r.n(O),y=r(4),_=(r(2),r(25)),E=r(3),k=r(5),R=(r(89),function(e){function t(){var e;return a()(this,t),(e=u()(this,d()(t).apply(this,arguments))).state={list:[],loading:!0},e.renderItem=e.renderItem.bind(w()(e)),e}return h()(t,e),l()(t,[{key:"componentDidMount",value:function(){var e=this;j()({path:Object(f.addQueryArgs)("".concat(k.ENDPOINTS.products,"/categories"),{per_page:-1})}).then((function(t){e.setState({list:t,loading:!1})})).catch((function(){e.setState({list:[],loading:!1})}))}},{key:"renderItem",value:function(e){var t=e.item,r=e.search,n=e.depth,c=void 0===n?0:n,a=["woocommerce-product-categories__item"];r.length&&a.push("is-searching"),0===c&&0!==t.parent&&a.push("is-skip-level");var i=t.breadcrumbs.length?"".concat(t.breadcrumbs.join(", "),", ").concat(t.name):t.name;return Object(g.createElement)(_.b,o()({className:a.join(" ")},e,{showCount:!0,"aria-label":Object(v.sprintf)(Object(v._n)("%s, has %d product","%s, has %d products",t.count,"woo-gutenberg-products-block"),i,t.count)}))}},{key:"render",value:function(){var e=this.state,t=e.list,r=e.loading,n=this.props,o=n.onChange,c=n.onOperatorChange,a=n.operator,i=n.selected,l=n.isSingle,s={clear:Object(v.__)("Clear all product categories","woo-gutenberg-products-block"),list:Object(v.__)("Product Categories","woo-gutenberg-products-block"),noItems:Object(v.__)("Your store doesn't have any product categories.","woo-gutenberg-products-block"),search:Object(v.__)("Search for product categories","woo-gutenberg-products-block"),selected:function(e){return Object(v.sprintf)(Object(v._n)("%d category selected","%d categories selected",e,"woo-gutenberg-products-block"),e)},updated:Object(v.__)("Category search results updated.","woo-gutenberg-products-block")};return Object(g.createElement)(g.Fragment,null,Object(g.createElement)(_.a,{className:"woocommerce-product-categories",list:t,isLoading:r,selected:i.map((function(e){return Object(y.find)(t,{id:e})})).filter(Boolean),onChange:o,renderItem:this.renderItem,messages:s,isHierarchical:!0,isSingle:l}),!!c&&Object(g.createElement)("div",{className:i.length<2?"screen-reader-text":""},Object(g.createElement)(E.SelectControl,{className:"woocommerce-product-categories__operator",label:Object(v.__)("Display products matching","woo-gutenberg-products-block"),help:Object(v.__)("Pick at least two categories to use this setting.","woo-gutenberg-products-block"),value:a,onChange:c,options:[{label:Object(v.__)("Any selected categories","woo-gutenberg-products-block"),value:"any"},{label:Object(v.__)("All selected categories","woo-gutenberg-products-block"),value:"all"}]})))}}]),t}(g.Component));R.defaultProps={operator:"any",isSingle:!1},t.a=R},43:function(e,t){!function(){e.exports=this.ReactDOM}()},46:function(e,t){!function(){e.exports=this.wp.viewport}()},5:function(e,t){!function(){e.exports=this.wc["wc-block-settings"]}()},50:function(e,t){!function(){e.exports=this.wp.hooks}()},51:function(e,t,r){"use strict";var n=r(0),o=r(1),c=(r(2),r(27)),a=r.n(c),i=r(6),l=r.n(i),s=r(38),u=r(3);t.a=function(e){var t,r,c=e.className,i=e.error,b=e.isLoading,d=e.onRetry;return Object(n.createElement)(u.Placeholder,{icon:Object(n.createElement)(a.a,{icon:"notice"}),label:Object(o.__)("Sorry, an error occurred","woo-gutenberg-products-block"),className:l()("wc-block-api-error",c)},Object(n.createElement)("div",{className:"wc-block-error__message"},(r=(t=i).apiMessage,t.message||(r?Object(n.createElement)("span",null,Object(o.__)("The following error was returned from the API","woo-gutenberg-products-block"),Object(n.createElement)("br",null),Object(n.createElement)("code",null,Object(s.escapeHTML)(r))):Object(o.__)("An unknown error occurred which prevented the block from being updated.","woo-gutenberg-products-block")))),d&&Object(n.createElement)(n.Fragment,null,b?Object(n.createElement)(u.Spinner,null):Object(n.createElement)(u.Button,{isDefault:!0,onClick:d},Object(o.__)("Retry","woo-gutenberg-products-block"))))}},52:function(e,t){!function(){e.exports=this.wp.htmlEntities}()},53:function(e,t){!function(){e.exports=this.wp.date}()},567:function(e,t,r){"use strict";r.r(t);var n=r(19),o=r.n(n),c=r(0),a=r(1),i=r(22),l=(r(80),r(15)),s=r.n(l),u=r(17),b=r(3),d=r(25),p=(r(2),r(40)),w=r(23),m=r(84),h=function(){return Object(c.createElement)(b.Placeholder,{className:"wc-block-reviews-by-category",icon:Object(c.createElement)(w.g,{className:"block-editor-block-icon"}),label:Object(a.__)("Reviews by Category","woo-gutenberg-products-block")},Object(a.__)("This block lists reviews for products from selected categories. The selected categories do not have any reviews yet, but they will show up here when they do.","woo-gutenberg-products-block"))},g=r(61),v=Object(b.withSpokenMessages)((function(e){var t=e.attributes,r=e.debouncedSpeak,n=e.setAttributes,o=t.editMode,i=t.categoryIds,l=function(e){var t=e.item,r=e.search,n=e.depth,o=void 0===n?0:n,i=["woocommerce-product-categories__item"];r.length&&i.push("is-searching"),0===o&&0!==t.parent&&i.push("is-skip-level");var l=t.breadcrumbs.length?"".concat(t.breadcrumbs.join(", "),", ").concat(t.name):t.name;return Object(c.createElement)(d.b,s()({className:i.join(" ")},e,{showCount:!0,"aria-label":Object(a.sprintf)(Object(a._n)("%s, has %d product","%s, has %d products",t.count,"woo-gutenberg-products-block"),l,t.count)}))};return!i||o?Object(c.createElement)(b.Placeholder,{icon:Object(c.createElement)(w.g,{className:"block-editor-block-icon"}),label:Object(a.__)("Reviews by Category","woo-gutenberg-products-block")},Object(a.__)("Show product reviews from specific categories.","woo-gutenberg-products-block"),Object(c.createElement)("div",{className:"wc-block-reviews__selection"},Object(c.createElement)(p.a,{selected:t.categoryIds,onChange:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=e.map((function(e){return e.id}));n({categoryIds:t})}}),Object(c.createElement)(b.Button,{isDefault:!0,onClick:function(){n({editMode:!1}),r(Object(a.__)("Showing Reviews by Category block preview.","woo-gutenberg-products-block"))}},Object(a.__)("Done","woo-gutenberg-products-block")))):Object(c.createElement)(c.Fragment,null,Object(g.a)(o,n),Object(c.createElement)(u.InspectorControls,{key:"inspector"},Object(c.createElement)(b.PanelBody,{title:Object(a.__)("Category","woo-gutenberg-products-block"),initialOpen:!1},Object(c.createElement)(p.a,{selected:t.categoryIds,onChange:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=e.map((function(e){return e.id}));n({categoryIds:t})},renderItem:l})),Object(c.createElement)(b.PanelBody,{title:Object(a.__)("Content","woo-gutenberg-products-block")},Object(c.createElement)(b.ToggleControl,{label:Object(a.__)("Product name","woo-gutenberg-products-block"),checked:t.showProductName,onChange:function(){return n({showProductName:!t.showProductName})}}),Object(g.b)(t,n)),Object(c.createElement)(b.PanelBody,{title:Object(a.__)("List Settings","woo-gutenberg-products-block")},Object(g.c)(t,n))),Object(c.createElement)(m.a,{attributes:t,className:"wc-block-reviews-by-category",icon:Object(c.createElement)(w.g,{className:"block-editor-block-icon"}),name:Object(a.__)("Reviews by Category","woo-gutenberg-products-block"),noReviewsPlaceholder:h}))})),f=r(82),O=r(83);function j(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}Object(i.registerBlockType)("woocommerce/reviews-by-category",{title:Object(a.__)("Reviews by Category","woo-gutenberg-products-block"),icon:Object(c.createElement)(w.g,{fillColor:"#96588a"}),category:"woocommerce",keywords:[Object(a.__)("WooCommerce","woo-gutenberg-products-block")],description:Object(a.__)("Show product reviews from specific categories.","woo-gutenberg-products-block"),attributes:function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?j(r,!0).forEach((function(t){o()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):j(r).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}({},f.a,{categoryIds:{type:"array",default:[]},showProductName:{type:"boolean",default:!0}}),edit:function(e){return Object(c.createElement)(v,e)},save:O.a})},59:function(e,t){!function(){e.exports=this.wp.dom}()},61:function(e,t,r){"use strict";r.d(t,"a",(function(){return b})),r.d(t,"b",(function(){return d})),r.d(t,"c",(function(){return p}));var n=r(0),o=r(1),c=r(38),a=r(3),i=r(17),l=r(77),s=r(5),u=r(70),b=function(e,t){return Object(n.createElement)(i.BlockControls,null,Object(n.createElement)(a.Toolbar,{controls:[{icon:"edit",title:Object(o.__)("Edit","woo-gutenberg-products-block"),onClick:function(){return t({editMode:!e})},isActive:e}]}))},d=function(e,t){return Object(n.createElement)(n.Fragment,null,Object(n.createElement)(a.ToggleControl,{label:Object(o.__)("Product rating","woo-gutenberg-products-block"),checked:e.showReviewRating,onChange:function(){return t({showReviewRating:!e.showReviewRating})}}),e.showReviewRating&&!s.ENABLE_REVIEW_RATING&&Object(n.createElement)(a.Notice,{className:"wc-block-reviews__notice",isDismissible:!1},Object(n.createElement)(n.RawHTML,null,Object(o.sprintf)(Object(c.escapeHTML)(Object(o.__)("Product rating is disabled in your %sstore settings%s.","woo-gutenberg-products-block")),'<a href="'.concat(Object(l.a)("admin.php?page=wc-settings&tab=products"),'" target="_blank">'),"</a>"))),Object(n.createElement)(a.ToggleControl,{label:Object(o.__)("Reviewer name","woo-gutenberg-products-block"),checked:e.showReviewerName,onChange:function(){return t({showReviewerName:!e.showReviewerName})}}),Object(n.createElement)(a.ToggleControl,{label:Object(o.__)("Image","woo-gutenberg-products-block"),checked:e.showReviewImage,onChange:function(){return t({showReviewImage:!e.showReviewImage})}}),Object(n.createElement)(a.ToggleControl,{label:Object(o.__)("Review date","woo-gutenberg-products-block"),checked:e.showReviewDate,onChange:function(){return t({showReviewDate:!e.showReviewDate})}}),Object(n.createElement)(a.ToggleControl,{label:Object(o.__)("Review content","woo-gutenberg-products-block"),checked:e.showReviewContent,onChange:function(){return t({showReviewContent:!e.showReviewContent})}}),e.showReviewImage&&Object(n.createElement)(n.Fragment,null,Object(n.createElement)(u.a,{label:Object(o.__)("Review image","woo-gutenberg-products-block"),value:e.imageType,options:[{label:Object(o.__)("Reviewer photo","woo-gutenberg-products-block"),value:"reviewer"},{label:Object(o.__)("Product","woo-gutenberg-products-block"),value:"product"}],onChange:function(e){return t({imageType:e})}}),"reviewer"===e.imageType&&!s.SHOW_AVATARS&&Object(n.createElement)(a.Notice,{className:"wc-block-reviews__notice",isDismissible:!1},Object(n.createElement)(n.RawHTML,null,Object(o.sprintf)(Object(c.escapeHTML)(Object(o.__)("Reviewer photo is disabled in your %ssite settings%s.","woo-gutenberg-products-block")),'<a href="'.concat(Object(l.a)("options-discussion.php"),'" target="_blank">'),"</a>")))))},p=function(e,t){return Object(n.createElement)(n.Fragment,null,Object(n.createElement)(a.ToggleControl,{label:Object(o.__)("Order by","woo-gutenberg-products-block"),checked:e.showOrderby,onChange:function(){return t({showOrderby:!e.showOrderby})}}),Object(n.createElement)(a.SelectControl,{label:Object(o.__)("Order Product Reviews by","woo-gutenberg-products-block"),value:e.orderby,options:[{label:"Most recent",value:"most-recent"},{label:"Highest Rating",value:"highest-rating"},{label:"Lowest Rating",value:"lowest-rating"}],onChange:function(e){return t({orderby:e})}}),Object(n.createElement)(a.RangeControl,{label:Object(o.__)("Starting Number of Reviews","woo-gutenberg-products-block"),value:e.reviewsOnPageLoad,onChange:function(e){return t({reviewsOnPageLoad:e})},max:20,min:1}),Object(n.createElement)(a.ToggleControl,{label:Object(o.__)("Load more","woo-gutenberg-products-block"),checked:e.showLoadMore,onChange:function(){return t({showLoadMore:!e.showLoadMore})}}),e.showLoadMore&&Object(n.createElement)(a.RangeControl,{label:Object(o.__)("Load More Reviews","woo-gutenberg-products-block"),value:e.reviewsOnLoadMore,onChange:function(e){return t({reviewsOnLoadMore:e})},max:20,min:1}))}},62:function(e,t){},63:function(e,t){},64:function(e,t){},66:function(e,t){},67:function(e,t){},69:function(e,t,r){"use strict";var n=r(15),o=r.n(n),c=r(7),a=r.n(c),i=r(8),l=r.n(i),s=r(9),u=r.n(s),b=r(10),d=r.n(b),p=r(11),w=r.n(p),m=r(0),h=r(12),g=[];t.a=function(e){return function(t){function r(){return a()(this,r),u()(this,d()(r).apply(this,arguments))}return w()(r,t),l()(r,[{key:"generateUniqueID",value:function(){var e=r.name;return g[e]||(g[e]=0),g[e]++,g[e]}},{key:"render",value:function(){var t=this.generateUniqueID();return Object(m.createElement)(e,o()({},this.props,{componentId:t}))}}]),r}(h.Component)}},70:function(e,t,r){"use strict";var n=r(15),o=r.n(n),c=r(7),a=r.n(c),i=r(8),l=r.n(i),s=r(9),u=r.n(s),b=r(10),d=r.n(b),p=r(14),w=r.n(p),m=r(11),h=r.n(m),g=r(0),v=r(4),f=r(6),O=r.n(f),j=r(3),y=r(20),_=(r(136),function(e){function t(){var e;return a()(this,t),(e=u()(this,d()(t).apply(this,arguments))).onClick=e.onClick.bind(w()(e)),e}return h()(t,e),l()(t,[{key:"onClick",value:function(e){this.props.onChange&&this.props.onChange(e.target.value)}},{key:"render",value:function(){var e,t=this,r=this.props,n=r.label,c=r.checked,a=r.instanceId,i=r.className,l=r.help,s=r.options,u=r.value,b="inspector-toggle-button-control-".concat(a);return l&&(e=Object(v.isFunction)(l)?l(c):l),Object(g.createElement)(j.BaseControl,{id:b,help:e,className:O()("components-toggle-button-control",i)},Object(g.createElement)("label",{id:b+"__label",htmlFor:b,className:"components-toggle-button-control__label"},n),Object(g.createElement)(j.ButtonGroup,{"aria-labelledby":b+"__label"},s.map((function(e,r){var c={};return u===e.value?(c.isPrimary=!0,c["aria-pressed"]=!0):(c.isDefault=!0,c["aria-pressed"]=!1),Object(g.createElement)(j.Button,o()({key:"".concat(e.label,"-").concat(e.value,"-").concat(r),value:e.value,onClick:t.onClick,"aria-label":n+": "+e.label},c),e.label)}))))}}]),t}(g.Component));t.a=Object(y.withInstanceId)(_)},80:function(e,t,r){var n=r(118);"string"==typeof n&&(n=[[e.i,n,""]]);var o={insert:"head",singleton:!1};r(34)(n,o);n.locals&&(e.exports=n.locals)},81:function(e,t){!function(){e.exports=this.wp.isShallowEqual}()},82:function(e,t,r){"use strict";t.a={editMode:{type:"boolean",default:!0},imageType:{type:"string",default:"reviewer"},orderby:{type:"string",default:"most-recent"},reviewsOnLoadMore:{type:"number",default:10},reviewsOnPageLoad:{type:"number",default:10},showLoadMore:{type:"boolean",default:!0},showOrderby:{type:"boolean",default:!0},showReviewDate:{type:"boolean",default:!0},showReviewerName:{type:"boolean",default:!0},showReviewImage:{type:"boolean",default:!0},showReviewRating:{type:"boolean",default:!0},showReviewContent:{type:"boolean",default:!0}}},83:function(e,t,r){"use strict";var n=r(15),o=r.n(n),c=r(0),a=(r(80),r(39));t.a=function(e){var t=e.attributes,r=t.categoryIds,n=t.imageType,i=t.orderby,l=t.productId,s={"data-image-type":n,"data-orderby":i,"data-reviews-on-page-load":t.reviewsOnPageLoad,"data-reviews-on-load-more":t.reviewsOnLoadMore,"data-show-load-more":t.showLoadMore,"data-show-orderby":t.showOrderby},u="wc-block-all-reviews";return l&&(s["data-product-id"]=l,u="wc-block-reviews-by-product"),Array.isArray(r)&&(s["data-category-ids"]=r.join(","),u="wc-block-reviews-by-category"),Object(c.createElement)("div",o()({className:Object(a.a)(u,t)},s))}},84:function(e,t,r){"use strict";var n=r(7),o=r.n(n),c=r(8),a=r.n(c),i=r(9),l=r.n(i),s=r(10),u=r.n(s),b=r(11),d=r.n(b),p=r(0),w=r(1),m=r(12),h=(r(2),r(4)),g=r(3),v=r(5),f=r(51),O=r(19),j=r.n(O),y=r(6),_=r.n(y);function E(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}var k=function(e){var t,r=e.label,n=e.screenReaderLabel,o=e.wrapperElement,c=e.wrapperProps;return!r&&n?(t=o||"span",c=function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?E(r,!0).forEach((function(t){j()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):E(r).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}({},c,{className:_()(c.className,"screen-reader-text")}),Object(p.createElement)(t,c,n)):(t=o||m.Fragment,r&&n&&r!==n?Object(p.createElement)(t,c,Object(p.createElement)("span",{"aria-hidden":!0},r),Object(p.createElement)("span",{className:"screen-reader-text"},n)):Object(p.createElement)(t,c,r))};k.defaultProps={wrapperProps:{}};var R=k,C=(r(179),function(e){var t=e.onClick,r=e.label,n=e.screenReaderLabel;return Object(p.createElement)("div",{className:"wp-block-button wc-block-load-more"},Object(p.createElement)("button",{className:"wp-block-button__link",onClick:t},Object(p.createElement)(R,{label:r,screenReaderLabel:n})))});C.defaultProps={label:Object(w.__)("Load more","woo-gutenberg-products-block")};var N=C,L=r(14),P=r.n(L),M=r(103),x=r.n(M),I=function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"...",n=x()(e,{suffix:r,limit:t});return n.html},T=function(e,t,r,n){var o=S(e,t,r);return I(e,o-n.length,n)},S=function(e,t,r){for(var n={start:0,middle:0,end:e.length};n.start<=n.end;)n.middle=Math.floor((n.start+n.end)/2),t.innerHTML=I(e,n.middle),n=H(n,t.clientHeight,r);return n.middle},H=function(e,t,r){return t<=r?e.start=e.middle+1:e.end=e.middle-1,e},D=function(e){function t(e){var r;return o()(this,t),(r=l()(this,u()(t).apply(this,arguments))).state={isExpanded:!1,clampEnabled:null,content:e.children,summary:"."},r.reviewSummary=Object(m.createRef)(),r.reviewContent=Object(m.createRef)(),r.getButton=r.getButton.bind(P()(r)),r.onClick=r.onClick.bind(P()(r)),r}return d()(t,e),a()(t,[{key:"componentDidMount",value:function(){if(this.props.children){var e=this.props,t=e.maxLines,r=e.ellipsis,n=(this.reviewSummary.current.clientHeight+1)*t+1,o=this.reviewContent.current.clientHeight+1>n;this.setState({clampEnabled:o}),o&&this.setState({summary:T(this.reviewContent.current.innerHTML,this.reviewSummary.current,n,r)})}}},{key:"getButton",value:function(){var e=this.state.isExpanded,t=this.props,r=t.className,n=t.lessText,o=t.moreText,c=e?n:o;if(c)return Object(p.createElement)("a",{href:"#more",className:r+"__read_more",onClick:this.onClick,"aria-expanded":!e,role:"button"},c)}},{key:"onClick",value:function(e){e.preventDefault();var t=this.state.isExpanded;this.setState({isExpanded:!t})}},{key:"render",value:function(){var e=this.props.className,t=this.state,r=t.content,n=t.summary,o=t.clampEnabled,c=t.isExpanded;return r?!1===o?Object(p.createElement)("div",{className:e},Object(p.createElement)("div",{ref:this.reviewContent},r)):Object(p.createElement)("div",{className:e},(!c||null===o)&&Object(p.createElement)("div",{ref:this.reviewSummary,"aria-hidden":c,dangerouslySetInnerHTML:{__html:n}}),(c||null===o)&&Object(p.createElement)("div",{ref:this.reviewContent,"aria-hidden":!c},r),this.getButton()):null}}]),t}(m.Component);D.defaultProps={maxLines:3,ellipsis:"…",moreText:Object(w.__)("Read more","woo-gutenberg-products-block"),lessText:Object(w.__)("Read less","woo-gutenberg-products-block"),className:"read-more-content"};var A=D;r(180);var z=function(e){var t=e.attributes,r=e.review,n=void 0===r?{}:r,o=t.imageType,c=t.showReviewDate,a=t.showReviewerName,i=t.showReviewImage,l=t.showReviewRating,s=t.showReviewContent,u=t.showProductName,b=n.rating,d=!Object.keys(n).length>0,m=Number.isFinite(b)&&l;return Object(p.createElement)("li",{className:_()("wc-block-review-list-item__item",{"is-loading":d}),"aria-hidden":d},(u||c||a||i||m)&&Object(p.createElement)("div",{className:"wc-block-review-list-item__info"},i&&function(e,t,r){return r||!e?Object(p.createElement)("div",{className:"wc-block-review-list-item__image",width:"48",height:"48"}):Object(p.createElement)("div",{className:"wc-block-review-list-item__image"},"product"===t?Object(p.createElement)("img",{"aria-hidden":"true",alt:"",src:e.product_picture||"",className:"wc-block-review-list-item__image",width:"48",height:"48"}):Object(p.createElement)("img",{"aria-hidden":"true",alt:"",src:e.reviewer_avatar_urls[48]||"",srcSet:e.reviewer_avatar_urls[96]+" 2x",className:"wc-block-review-list-item__image",width:"48",height:"48"}),e.verified&&Object(p.createElement)("div",{className:"wc-block-review-list-item__verified",title:Object(w.__)("Verified buyer","woo-gutenberg-products-block")},Object(w.__)("Verified buyer","woo-gutenberg-products-block")))}(n,o,d),(u||a||m||c)&&Object(p.createElement)("div",{className:"wc-block-review-list-item__meta"},m&&function(e){var t=e.rating,r={width:t/5*100+"%"};return Object(p.createElement)("div",{className:"wc-block-review-list-item__rating"},Object(p.createElement)("div",{className:"wc-block-review-list-item__rating__stars",role:"img"},Object(p.createElement)("span",{style:r},Object(w.sprintf)(Object(w.__)("Rated %d out of 5","woo-gutenberg-products-block"),t))))}(n),u&&function(e){return Object(p.createElement)("div",{className:"wc-block-review-list-item__product"},Object(p.createElement)("a",{href:e.product_permalink},e.product_name))}(n),a&&function(e){var t=e.reviewer,r=void 0===t?"":t;return Object(p.createElement)("div",{className:"wc-block-review-list-item__author"},r)}(n),c&&function(e){var t=e.date_created,r=e.formatted_date_created;return Object(p.createElement)("time",{className:"wc-block-review-list-item__published-date",dateTime:t},r)}(n))),s&&function(e){return Object(p.createElement)(A,{maxLines:10,moreText:Object(w.__)("Read full review","woo-gutenberg-products-block"),lessText:Object(w.__)("Hide full review","woo-gutenberg-products-block"),className:"wc-block-review-list-item__text"},Object(p.createElement)("div",{dangerouslySetInnerHTML:{__html:e.review||""}}))}(n))};r(181);function B(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}var V=function(e){var t=e.attributes,r=e.reviews,n=function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?B(r,!0).forEach((function(t){j()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):B(r).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}({},t,{showReviewImage:(v.SHOW_AVATARS||"product"===t.imageType)&&t.showReviewImage,showReviewRating:v.ENABLE_REVIEW_RATING&&t.showReviewRating});return Object(p.createElement)("ul",{className:"wc-block-review-list"},0===r.length?Object(p.createElement)(z,{attributes:n}):r.map((function(e,t){return Object(p.createElement)(z,{key:e.id||t,attributes:n,review:e})})))},F=r(69),W=(r(182),Object(F.a)((function(e){var t=e.className,r=e.componentId,n=e.defaultValue,o=e.label,c=e.onChange,a=e.options,i=e.screenReaderLabel,l=e.readOnly,s=e.value,u="wc-block-order-select__select-".concat(r);return Object(p.createElement)("p",{className:_()("wc-block-order-select",t)},Object(p.createElement)(R,{label:o,screenReaderLabel:i,wrapperElement:"label",wrapperProps:{className:"wc-block-order-select__label",htmlFor:u}}),Object(p.createElement)("select",{id:u,className:"wc-block-order-select__select",defaultValue:n,onChange:c,readOnly:l,value:s},a.map((function(e){return Object(p.createElement)("option",{key:e.key,value:e.key},e.label)}))))}))),G=(r(183),function(e){var t=e.defaultValue,r=e.onChange,n=e.readOnly,o=e.value;return Object(p.createElement)(W,{className:"wc-block-review-order-select",defaultValue:t,label:Object(w.__)("Order by","woo-gutenberg-products-block"),onChange:r,options:[{key:"most-recent",label:Object(w.__)("Most recent","woo-gutenberg-products-block")},{key:"highest-rating",label:Object(w.__)("Highest rating","woo-gutenberg-products-block")},{key:"lowest-rating",label:Object(w.__)("Lowest rating","woo-gutenberg-products-block")}],readOnly:n,screenReaderLabel:Object(w.__)("Order reviews by","woo-gutenberg-products-block"),value:o})}),Z=r(15),U=r.n(Z),q=r(37),J=r.n(q),Q=r(81),Y=r.n(Q),K=r(39),X=function(e){var t=function(t){function r(){var e;return o()(this,r),(e=l()(this,u()(r).apply(this,arguments))).state={error:null,loading:!0,reviews:[],totalReviews:0},e.setError=e.setError.bind(P()(e)),e.delayedAppendReviews=e.props.delayFunction(e.appendReviews),e}return d()(r,t),a()(r,[{key:"componentDidMount",value:function(){this.replaceReviews()}},{key:"componentDidUpdate",value:function(e){e.reviewsToDisplay<this.props.reviewsToDisplay?this.delayedAppendReviews():this.shouldReplaceReviews(e,this.props)&&this.replaceReviews()}},{key:"shouldReplaceReviews",value:function(e,t){return e.orderby!==t.orderby||e.order!==t.order||e.productId!==t.productId||!Y()(e.categoryIds,t.categoryIds)}},{key:"componentWillUnMount",value:function(){this.delayedAppendReviews.cancel&&this.delayedAppendReviews.cancel()}},{key:"getArgs",value:function(e){var t=this.props,r=t.categoryIds,n=t.order,o=t.orderby,c=t.productId,a={order:n,orderby:o,per_page:t.reviewsToDisplay-e,offset:e};return r&&r.length&&(a.category_id=Array.isArray(r)?r.join(","):r),c&&(a.product_id=c),a}},{key:"replaceReviews",value:function(){var e=this.props.onReviewsReplaced;this.updateListOfReviews().then(e)}},{key:"appendReviews",value:function(){var e=this.props,t=e.onReviewsAppended,r=e.reviewsToDisplay,n=this.state.reviews;r<=n.length||this.updateListOfReviews(n).then(t)}},{key:"updateListOfReviews",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],r=this.props.reviewsToDisplay,n=this.state.totalReviews,o=Math.min(n,r)-t.length;return this.setState({loading:!0,reviews:t.concat(Array(o).fill({}))}),Object(K.c)(this.getArgs(t.length)).then((function(r){var n=r.reviews,o=r.totalReviews;return e.setState({reviews:t.filter((function(e){return Object.keys(e).length})).concat(n),totalReviews:o,loading:!1,error:null}),{newReviews:n}})).catch(this.setError)}},{key:"setError",value:function(e){var t=this;e.json().then((function(e){var r=t.props.onReviewsLoadError,n="object"===J()(e)&&e.hasOwnProperty("message")?{apiMessage:e.message}:{apiMessage:null};t.setState({reviews:[],loading:!1,error:n}),r()}))}},{key:"render",value:function(){var t=this.props.reviewsToDisplay,r=this.state,n=r.error,o=r.loading,c=r.reviews,a=r.totalReviews;return Object(p.createElement)(e,U()({},this.props,{error:n,isLoading:o,reviews:c.slice(0,t),totalReviews:a}))}}]),r}(m.Component);t.defaultProps={delayFunction:function(e){return e},onReviewsAppended:function(){},onReviewsLoadError:function(){},onReviewsReplaced:function(){}};var r=e.displayName,n=void 0===r?e.name||"Component":r;return t.displayName="WithReviews( ".concat(n," )"),t}(function(e){function t(){return o()(this,t),l()(this,u()(t).apply(this,arguments))}return d()(t,e),a()(t,[{key:"render",value:function(){var e=this.props,t=e.attributes,r=e.error,n=e.isLoading,o=e.noReviewsPlaceholder,c=e.reviews,a=e.totalReviews;return r?Object(p.createElement)(f.a,{className:"wc-block-featured-product-error",error:r,isLoading:n}):0!==c.length||n?Object(p.createElement)(g.Disabled,null,t.showOrderby&&v.ENABLE_REVIEW_RATING&&Object(p.createElement)(G,{readOnly:!0,value:t.orderby}),Object(p.createElement)(V,{attributes:t,reviews:c}),t.showLoadMore&&a>c.length&&Object(p.createElement)(N,{screenReaderLabel:Object(w.__)("Load more reviews","woo-gutenberg-products-block")})):Object(p.createElement)(o,{attributes:t})}}]),t}(m.Component)),$=function(e){function t(){return o()(this,t),l()(this,u()(t).apply(this,arguments))}return d()(t,e),a()(t,[{key:"renderHiddenContentPlaceholder",value:function(){var e=this.props,t=e.icon,r=e.name;return Object(p.createElement)(g.Placeholder,{icon:t,label:r},Object(w.__)("The content for this block is hidden due to block settings.","woo-gutenberg-products-block"))}},{key:"render",value:function(){var e=this.props,t=e.attributes,r=e.className,n=e.noReviewsPlaceholder,o=t.categoryIds,c=t.productId,a=t.reviewsOnPageLoad,i=t.showProductName,l=t.showReviewDate,s=t.showReviewerName,u=t.showReviewContent,b=t.showReviewImage,d=t.showReviewRating,w=Object(K.b)(t.orderby),m=w.order,g=w.orderby;return!(u||d||l||s||b||i)?this.renderHiddenContentPlaceholder():Object(p.createElement)("div",{className:Object(K.a)(r,t)},Object(p.createElement)(X,{attributes:t,categoryIds:o,delayFunction:function(e){return Object(h.debounce)(e,400)},noReviewsPlaceholder:n,orderby:g,order:m,productId:c,reviewsToDisplay:a}))}}]),t}(m.Component);t.a=$}});
|
build/reviews-by-product.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
this.wc=this.wc||{},this.wc.blocks=this.wc.blocks||{},this.wc.blocks["reviews-by-product"]=function(e){function t(t){for(var n,a,i=t[0],s=t[1],l=t[2],d=0,b=[];d<i.length;d++)a=i[d],Object.prototype.hasOwnProperty.call(o,a)&&o[a]&&b.push(o[a][0]),o[a]=0;for(n in s)Object.prototype.hasOwnProperty.call(s,n)&&(e[n]=s[n]);for(u&&u(t);b.length;)b.shift()();return c.push.apply(c,l||[]),r()}function r(){for(var e,t=0;t<c.length;t++){for(var r=c[t],n=!0,i=1;i<r.length;i++){var s=r[i];0!==o[s]&&(n=!1)}n&&(c.splice(t--,1),e=a(a.s=r[0]))}return e}var n={},o={18:0},c=[];function a(t){if(n[t])return n[t].exports;var r=n[t]={i:t,l:!1,exports:{}};return e[t].call(r.exports,r,r.exports,a),r.l=!0,r.exports}a.m=e,a.c=n,a.d=function(e,t,r){a.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},a.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},a.t=function(e,t){if(1&t&&(e=a(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(a.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var n in e)a.d(r,n,function(t){return e[t]}.bind(null,n));return r},a.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return a.d(t,"a",t),t},a.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},a.p="";var i=window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[],s=i.push.bind(i);i.push=t,i=i.slice();for(var l=0;l<i.length;l++)t(i[l]);var u=s;return c.push([547,2,1,0]),r()}({0:function(e,t){!function(){e.exports=this.wp.element}()},1:function(e,t){!function(){e.exports=this.wp.i18n}()},114:function(e,t,r){},13:function(e,t){!function(){e.exports=this.React}()},14:function(e,t){!function(){e.exports=this.moment}()},17:function(e,t){!function(){e.exports=this.wp.apiFetch}()},18:function(e,t){!function(){e.exports=this.wp.editor}()},19:function(e,t){!function(){e.exports=this.wp.url}()},2:function(e,t){!function(){e.exports=this.wp.components}()},21:function(e,t){!function(){e.exports=this.wp.compose}()},23:function(e,t){!function(){e.exports=this.wp.blocks}()},24:function(e,t,r){"use strict";var n=r(0),o=r(2),c=function(e){var t=e.className,r=e.fillColor;return Object(n.createElement)(o.Icon,{className:t,icon:Object(n.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 22.41"},Object(n.createElement)("g",null,Object(n.createElement)("g",null,Object(n.createElement)("path",{fill:r,d:"M16.55 0H1.75C.56 0 0 .52 0 1.68v9.24c0 1.15.56 1.92 1.75 1.92H2V4.76a2.51 2.51 0 0 1 2.74-2.68H18v-.4A1.51 1.51 0 0 0 16.55 0z"}),Object(n.createElement)("path",{fill:r,d:"M19.54 3.11H4.74C3.55 3.11 3 3.64 3 4.79V14c0 1.19.55 2 1.74 2H5V7.88A2.51 2.51 0 0 1 7.73 5.2H21v-.41a1.51 1.51 0 0 0-1.46-1.68z"}),Object(n.createElement)("path",{fill:r,d:"M22.53 6.23H7.73C6.54 6.23 6 6.75 6 7.91v9.24c0 1.15.56 1.92 1.75 1.92h7a.59.59 0 0 1 .32.11l1.61 1.15 2.83 2a.31.31 0 0 0 .18.05.3.3 0 0 0 .31-.3v-2.73a.3.3 0 0 1 .28-.28h2.31A1.47 1.47 0 0 0 24 17.6V7.91a1.52 1.52 0 0 0-1.47-1.68z"}),Object(n.createElement)("path",{fill:"#ffffff",d:"M10.2 10.92l1.06-2.14 1.05 2.14 2.37.35-1.71 1.66.4 2.36-2.11-1.11-.17.09-.52.27-.51.26-.92.49.18-1.02.09-.57.1-.56.03-.21-1.71-1.66 2.37-.35zM21.46 14.25h-4.4a.69.69 0 0 1-.69-.69.68.68 0 0 1 .69-.68h4.4a.68.68 0 0 1 .69.68.69.69 0 0 1-.69.69zM21.46 11.19h-4.4a.69.69 0 1 1 0-1.37h4.4a.69.69 0 1 1 0 1.37z"}))))})},a=function(){return Object(n.createElement)(o.Icon,{icon:Object(n.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},Object(n.createElement)("path",{fillRule:"nonzero",d:"M21.913 7.0946H2.0254c-1.1708 0-2.0984.9908-2.0205 2.16l.741 11.0724c.0714 1.0638.9552 1.8892 2.0206 1.8892h18.4054c1.0654 0 1.9492-.8254 2.0205-1.8892l.7411-11.0724c.0779-1.1692-.8497-2.16-2.0205-2.16zm-8.8006-4.6573h5.987c1.119 0 2.0255.9065 2.0255 2.0254v.934H2.8103V2.0255C2.8103.9064 3.7168 0 4.8357 0h6.2513c1.119 0 2.0254.9065 2.0254 2.0254v.4119zm-7.0589 11.619a.926.926 0 1 1 0-1.852h11.8297a.926.926 0 1 1 0 1.852H6.0535z"}))})},i=function(){return Object(n.createElement)(o.Icon,{icon:Object(n.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},Object(n.createElement)("path",{d:"M22 7.5H2c-1.2 0-2.1 1-2 2.2l.7 11.1c.1 1.1 1 1.9 2 1.9h18.5c1.1 0 2-.8 2-1.9L24 9.6c.1-1.1-.9-2.1-2-2.1zM13.1 2.8v-.4c0-1.1-.9-2-2-2H4.8c-1.1 0-2 .9-2 2v3.4h18.4v-1c0-1.1-.9-2-2-2h-6.1z"}),Object(n.createElement)("path",{fill:"#fff",d:"M14.4 18.7L12 17.4l-2.4 1.3.5-2.6-1.9-1.9 2.6-.4 1.2-2.4 1.2 2.4 2.6.4-1.9 1.9z"}))})},s=function(){return Object(n.createElement)(o.Icon,{className:"material-icon",icon:Object(n.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},Object(n.createElement)("path",{d:"M0 0h24v24H0z",fill:"none"}),Object(n.createElement)("path",{d:"M23 12l-2.44-2.78.34-3.68-3.61-.82-1.89-3.18L12 3 8.6 1.54 6.71 4.72l-3.61.81.34 3.68L1 12l2.44 2.78-.34 3.69 3.61.82 1.89 3.18L12 21l3.4 1.46 1.89-3.18 3.61-.82-.34-3.68L23 12zm-10 5h-2v-2h2v2zm0-4h-2V7h2v6z"}))})},l=function(){return Object(n.createElement)(o.Icon,{icon:Object(n.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},Object(n.createElement)("path",{fill:"#1E8CBE",d:"M12 7c-2.76 0-5 2.24-5 5s2.24 5 5 5 5-2.24 5-5-2.24-5-5-5zm0-5C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"}))})},u=function(){return Object(n.createElement)(o.Icon,{icon:Object(n.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},Object(n.createElement)("path",{fill:"#6C7781",d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"}))})},d=function(e){var t=e.className,r=e.fillColor;return Object(n.createElement)(o.Icon,{className:t,icon:Object(n.createElement)("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},Object(n.createElement)("path",{fill:r,d:"M2.3,17.3h9.3c0.1,0,0.3,0,0.4,0.1l5.9,4.2c0.3,0.2,0.7,0,0.7-0.3v-3.7c0-0.2,0.2-0.4,0.4-0.4H22 c1.1,0,2-0.9,2-2V2.5c0-1.2-0.7-2.2-2-2.2H2.3C0.7,0.2,0,0.9,0,2.5v12.3C0,16.3,0.7,17.3,2.3,17.3z"}),Object(n.createElement)("polygon",{fill:"#ffffff",points:"8.8,12.1 6.5,10.9 4.1,12.1 4.5,9.5 2.6,7.6 5.3,7.2 6.5,4.8 7.6,7.2 10.3,7.6 8.4,9.5"}),Object(n.createElement)("path",{fill:"#ffffff",d:"M20.7,7.9h-7c-0.5,0-0.9-0.4-0.9-0.9S13.2,6,13.7,6h7c0.5,0,0.9,0.4,0.9,0.9S21.2,7.9,20.7,7.9z"}),Object(n.createElement)("path",{fill:"#ffffff",d:"M20.7,11.5h-7c-0.5,0-0.9-0.4-0.9-0.9s0.4-0.9,0.9-0.9h7c0.5,0,0.9,0.4,0.9,0.9S21.2,11.5,20.7,11.5z"}))})},b=function(e){var t=e.className,r=e.fillColor;return Object(n.createElement)(o.Icon,{className:t,icon:Object(n.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 23"},Object(n.createElement)("path",{fill:r,d:"M21.9943 7.0957H2.00638C0.807102 7.0957 -0.0923543 8.0951 0.0075853 9.29437L0.707162 20.3877C0.807102 21.487 1.70656 22.2865 2.70595 22.2865H21.1948C22.2941 22.2865 23.1936 21.487 23.1936 20.3877L23.9931 9.29437C24.093 8.0951 23.0936 7.0957 21.9943 7.0957Z"}),Object(n.createElement)("path",{fill:r,d:"M13.0921 2.39855V1.99879C13.0921 0.899456 12.1926 0 11.0933 0H4.7971C3.69777 0 2.79831 0.899456 2.79831 1.99879V5.39674H21.1872V4.49728C21.1872 3.39795 20.2877 2.49849 19.1884 2.49849H13.0921V2.39855Z"}),Object(n.createElement)("path",{fill:"white",d:"M8.63115 17.126L6.5415 15.9449L4.361 17.126L4.72442 14.6729L2.99819 13.0376L5.45125 12.6742L6.5415 10.4937L7.5409 12.6742L9.99396 13.0376L8.26773 14.6729L8.63115 17.126Z"}),Object(n.createElement)("path",{fill:"white",d:"M19.1907 13.5918H12.9899C12.547 13.5918 12.1926 13.1921 12.1926 12.6924C12.1926 12.1927 12.547 11.7929 12.9899 11.7929H19.1907C19.6336 11.7929 19.9879 12.1927 19.9879 12.6924C19.9879 13.1921 19.6336 13.5918 19.1907 13.5918Z"}),Object(n.createElement)("path",{fill:"white",d:"M19.1907 17.1897H12.9899C12.547 17.1897 12.1926 16.7899 12.1926 16.2902C12.1926 15.7905 12.547 15.3907 12.9899 15.3907H19.1907C19.6336 15.3907 19.9879 15.7905 19.9879 16.2902C19.9879 16.7899 19.6336 17.1897 19.1907 17.1897Z"}))})},p=function(){return Object(n.createElement)(o.Icon,{className:"material-icon",icon:Object(n.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},Object(n.createElement)("path",{d:"M13 13v8h8v-8h-8zM3 21h8v-8H3v8zM3 3v8h8V3H3zm13.66-1.31L11 7.34 16.66 13l5.66-5.66-5.66-5.65z"}),Object(n.createElement)("path",{d:"M0 0h24v24H0z",fill:"none"}))})},h=r(6),m=r.n(h),v=(r(7),function(e){var t=e.size,r=void 0===t?20:t,c=e.className;return Object(n.createElement)(o.Icon,{className:m()("woo-icon",c),icon:Object(n.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",height:r,width:Math.floor(1.67*r),viewBox:"0 0 245 145"},Object(n.createElement)("path",{fill:"#96588A",d:"M22.76 0h199.1a22.77 22.77 0 0 1 22.8 22.76v75.92a22.77 22.77 0 0 1-22.78 22.78h-71.41l9.77 24-43.13-24H22.76C10.1946 121.449.011 111.2654 0 98.7V22.76C.011 10.1946 10.1946.011 22.76 0z"}),Object(n.createElement)("path",{fill:"#FFF",fillRule:"nonzero",d:"M12.32 20.63a8.16 8.16 0 0 1 6.25-3.09c5.0733-.36 7.9867 2.0333 8.74 7.18 3.14 20.86 6.4933 38.5633 10.06 53.11l21.92-41.69c2-3.76 4.49-5.76 7.52-6 4.3867-.3067 7.13 2.49 8.23 8.39a186 186 0 0 0 9.47 34.23c2.62-25.38 7.0133-43.7133 13.18-55a7.73 7.73 0 0 1 6.6-4.43 8.8 8.8 0 0 1 6.32 2 7.75 7.75 0 0 1 3.05 5.74 8.52 8.52 0 0 1-1 4.77c-3.9 7.24-7.12 19.28-9.66 36.12-2.48 16.2533-3.3967 28.9633-2.75 38.13a12.25 12.25 0 0 1-1.16 6.56 6.32 6.32 0 0 1-5.33 3.53c-2.6667.18-5.3033-1.0567-7.91-3.71-9.2933-9.54-16.6567-23.7267-22.09-42.56C57.3 76.7167 52.48 86.3333 49.3 92.76c-5.86 11.3333-10.89 17.13-15.09 17.39-2.7333.1933-5.0667-2.0933-7-6.86-5.1-13.0933-10.5833-38.4033-16.45-75.93a8.56 8.56 0 0 1 1.56-6.73zM227.23 36.34a23.17 23.17 0 0 0-16-11.59 26.25 26.25 0 0 0-5.42-.58c-9.5867 0-17.41 5-23.47 15a53 53 0 0 0-7.78 28.16c0 7.7333 1.6167 14.3333 4.85 19.8a23.15 23.15 0 0 0 16 11.59 26.28 26.28 0 0 0 5.42.59c9.68 0 17.5033-5 23.47-15A53.89 53.89 0 0 0 232.08 56c0-7.7333-1.6167-14.2867-4.85-19.66zm-12.61 27.72c-1.3733 6.56-3.9167 11.5-7.63 14.82-2.9267 2.6667-5.6133 3.7433-8.06 3.23-2.4467-.5133-4.4033-2.6667-5.87-6.46a25.68 25.68 0 0 1-1.76-9.09 35.9 35.9 0 0 1 .73-7.34 33 33 0 0 1 5.28-11.88c3.3333-4.8933 6.8067-6.9467 10.42-6.16 2.44.4867 4.3933 2.64 5.86 6.46a25.68 25.68 0 0 1 1.76 9.12 35.73 35.73 0 0 1-.73 7.33v-.03zM164.57 36.34a23.2 23.2 0 0 0-16-11.59 26.42 26.42 0 0 0-5.43-.58c-9.5933 0-17.4167 5-23.47 15a53 53 0 0 0-7.78 28.16c0 7.7333 1.6133 14.3333 4.84 19.8a23.19 23.19 0 0 0 16 11.59 26.44 26.44 0 0 0 5.43.59c9.68 0 17.5033-5 23.47-15A53.88 53.88 0 0 0 169.4 56c0-7.7333-1.6133-14.2867-4.84-19.66h.01zm-12.61 27.72c-1.3667 6.56-3.91 11.5-7.63 14.82-2.93 2.64-5.63 3.72-8.07 3.23-2.44-.49-4.4-2.64-5.86-6.46a25.7 25.7 0 0 1-1.77-9.09 35.9 35.9 0 0 1 .74-7.34 33 33 0 0 1 5.28-11.88c3.3333-4.8933 6.8067-6.9467 10.42-6.16 2.44.4867 4.3933 2.64 5.86 6.46a25.91 25.91 0 0 1 1.76 9.12 35.73 35.73 0 0 1-.73 7.33v-.03z"}))})});r.d(t,"a",function(){return c}),r.d(t,"b",function(){return a}),r.d(t,"c",function(){return i}),r.d(t,"d",function(){return s}),r.d(t,"e",function(){return l}),r.d(t,"f",function(){return u}),r.d(t,"h",function(){return d}),r.d(t,"g",function(){return b}),r.d(t,"i",function(){return p}),r.d(t,"j",function(){return v})},25:function(e,t,r){"use strict";r.d(t,"d",function(){return b}),r.d(t,"b",function(){return p}),r.d(t,"c",function(){return h}),r.d(t,"a",function(){return m});var n=r(20),o=r.n(n),c=r(19),a=r(17),i=r.n(a),s=r(4),l=r(5);function u(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function d(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?u(r,!0).forEach(function(t){o()(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):u(r).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}var b=function(e){var t=e.selected,r=void 0===t?[]:t,n=e.search,o=void 0===n?"":n,a=e.queryArgs,u=function(e){var t=e.selected,r=void 0===t?[]:t,n=e.search,o=void 0===n?"":n,a=e.queryArgs,i=void 0===a?[]:a,s={per_page:l.IS_LARGE_CATALOG?100:-1,catalog_visibility:"any",status:"publish",search:o,orderby:"title",order:"asc"},u=[Object(c.addQueryArgs)(l.ENDPOINTS.products,d({},s,{},i))];return l.IS_LARGE_CATALOG&&r.length&&u.push(Object(c.addQueryArgs)(l.ENDPOINTS.products,{catalog_visibility:"any",status:"publish",include:r})),u}({selected:r,search:o,queryArgs:void 0===a?[]:a});return Promise.all(u.map(function(e){return i()({path:e})})).then(function(e){return Object(s.uniqBy)(Object(s.flatten)(e),"id")})},p=function(e){return i()({path:"".concat(l.ENDPOINTS.products,"/").concat(e)})},h=function(e){var t=e.selected,r=function(e){var t=e.selected,r=void 0===t?[]:t,n=e.search,o=[Object(c.addQueryArgs)("".concat(l.ENDPOINTS.products,"/tags"),{per_page:l.LIMIT_TAGS?100:-1,orderby:l.LIMIT_TAGS?"count":"name",order:l.LIMIT_TAGS?"desc":"asc",search:n})];return l.LIMIT_TAGS&&r.length&&o.push(Object(c.addQueryArgs)("".concat(l.ENDPOINTS.products,"/tags"),{include:r})),o}({selected:void 0===t?[]:t,search:e.search});return Promise.all(r.map(function(e){return i()({path:e})})).then(function(e){return Object(s.uniqBy)(Object(s.flatten)(e),"id")})},m=function(e){return i()({path:"".concat(l.ENDPOINTS.categories,"/").concat(e)})}},33:function(e,t){!function(){e.exports=this.wp.keycodes}()},39:function(e,t){!function(){e.exports=this.wp.escapeHtml}()},4:function(e,t){!function(){e.exports=this.lodash}()},40:function(e,t,r){"use strict";r.d(t,"b",function(){return s}),r.d(t,"c",function(){return l}),r.d(t,"a",function(){return u});var n=r(17),o=r.n(n),c=r(6),a=r.n(c),i=r(5),s=function(e){if(i.ENABLE_REVIEW_RATING){if("lowest-rating"===e)return{order:"asc",orderby:"rating"};if("highest-rating"===e)return{order:"desc",orderby:"rating"}}return{order:"desc",orderby:"date_gmt"}},l=function(e){return o()({path:"/wc/blocks/products/reviews?"+Object.entries(e).map(function(e){return e.join("=")}).join("&"),parse:!1}).then(function(e){return e.json().then(function(t){return{reviews:t,totalReviews:parseInt(e.headers.get("x-wp-total"),10)}})})},u=function(e,t){var r=t.className,n=t.showReviewDate,o=t.showReviewerName,c=t.showReviewContent,i=t.showProductName,s=t.showReviewImage,l=t.showReviewRating;return a()(e,r,{"has-image":s,"has-name":o,"has-date":n,"has-rating":l,"has-content":c,"has-product-name":i})}},44:function(e,t){!function(){e.exports=this.ReactDOM}()},47:function(e,t){!function(){e.exports=this.wp.viewport}()},5:function(e,t){!function(){e.exports=this.wc["wc-block-settings"]}()},51:function(e,t){!function(){e.exports=this.wp.hooks}()},52:function(e,t,r){"use strict";var n=r(0),o=r(1),c=(r(7),r(29)),a=r.n(c),i=r(6),s=r.n(i),l=r(39),u=r(2);t.a=function(e){var t,r,c=e.className,i=e.error,d=e.isLoading,b=e.onRetry;return Object(n.createElement)(u.Placeholder,{icon:Object(n.createElement)(a.a,{icon:"notice"}),label:Object(o.__)("Sorry, an error occurred","woo-gutenberg-products-block"),className:s()("wc-block-api-error",c)},Object(n.createElement)("div",{className:"wc-block-error__message"},(r=(t=i).apiMessage,t.message||(r?Object(n.createElement)("span",null,Object(o.__)("The following error was returned from the API","woo-gutenberg-products-block"),Object(n.createElement)("br",null),Object(n.createElement)("code",null,Object(l.escapeHTML)(r))):Object(o.__)("An unknown error occurred which prevented the block from being updated.","woo-gutenberg-products-block")))),b&&Object(n.createElement)(n.Fragment,null,d?Object(n.createElement)(u.Spinner,null):Object(n.createElement)(u.Button,{isDefault:!0,onClick:b},Object(o.__)("Retry","woo-gutenberg-products-block"))))}},53:function(e,t){!function(){e.exports=this.wp.htmlEntities}()},54:function(e,t){!function(){e.exports=this.wp.date}()},547:function(e,t,r){"use strict";r.r(t);var n=r(20),o=r.n(n),c=r(0),a=r(1),i=r(23),s=(r(77),r(16)),l=r.n(s),u=r(18),d=r(2),b=r(26),p=(r(7),r(99)),h=r(24),m=r(81),v=r(52),g=r(71),w=Object(g.b)(function(e){var t=e.error,r=e.getProduct,n=e.isLoading,o=e.product;if(t)return Object(c.createElement)(v.a,{className:"wc-block-featured-product-error",error:t,isLoading:n,onRetry:r});var i=!o||n?Object(c.createElement)(d.Spinner,null):Object(a.sprintf)(Object(a.__)("This block lists reviews for a selected product. %s doesn't have any reviews yet, but they will show up here when it does.","woo-gutenberg-products-block"),o.name);return Object(c.createElement)(d.Placeholder,{className:"wc-block-reviews-by-product",icon:Object(c.createElement)(h.h,{className:"block-editor-block-icon"}),label:Object(a.__)("Reviews by Product","woo-gutenberg-products-block")},i)}),f=r(63),O=Object(d.withSpokenMessages)(function(e){var t=e.attributes,r=e.debouncedSpeak,n=e.setAttributes,o=t.editMode,i=t.productId,s=function(e){var t=e.item,r=void 0===t?0:t;return Object(c.createElement)(b.b,l()({},e,{countLabel:Object(a.sprintf)(Object(a._n)("%d Review","%d Reviews",r.review_count,"woo-gutenberg-products-block"),r.review_count),showCount:!0,"aria-label":Object(a.sprintf)(Object(a._n)("%s, has %d review","%s, has %d reviews",r.review_count,"woo-gutenberg-products-block"),r.name,r.review_count)}))};return!i||o?Object(c.createElement)(d.Placeholder,{icon:Object(c.createElement)(h.h,{className:"block-editor-block-icon"}),label:Object(a.__)("Reviews by Product","woo-gutenberg-products-block")},Object(a.__)("Show reviews of your product to build trust","woo-gutenberg-products-block"),Object(c.createElement)("div",{className:"wc-block-reviews__selection"},Object(c.createElement)(p.a,{selected:t.productId||0,onChange:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=e[0]?e[0].id:0;n({productId:t})},queryArgs:{orderby:"comment_count",order:"desc"},renderItem:s}),Object(c.createElement)(d.Button,{isDefault:!0,onClick:function(){n({editMode:!1}),r(Object(a.__)("Showing Reviews by Product block preview.","woo-gutenberg-products-block"))}},Object(a.__)("Done","woo-gutenberg-products-block")))):Object(c.createElement)(c.Fragment,null,Object(f.a)(o,n),Object(c.createElement)(u.InspectorControls,{key:"inspector"},Object(c.createElement)(d.PanelBody,{title:Object(a.__)("Product","woo-gutenberg-products-block"),initialOpen:!1},Object(c.createElement)(p.a,{selected:t.productId||0,onChange:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=e[0]?e[0].id:0;n({productId:t})},renderItem:s})),Object(c.createElement)(d.PanelBody,{title:Object(a.__)("Content","woo-gutenberg-products-block")},Object(f.b)(t,n)),Object(c.createElement)(d.PanelBody,{title:Object(a.__)("List Settings","woo-gutenberg-products-block")},Object(f.c)(t,n))),Object(c.createElement)(m.a,{attributes:t,className:"wc-block-all-reviews",icon:Object(c.createElement)(h.h,{className:"block-editor-block-icon"}),name:Object(a.__)("Reviews by Product","woo-gutenberg-products-block"),noReviewsPlaceholder:w}))}),j=r(79),y=r(80);function _(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}Object(i.registerBlockType)("woocommerce/reviews-by-product",{title:Object(a.__)("Reviews by Product","woo-gutenberg-products-block"),icon:Object(c.createElement)(h.h,{fillColor:"#96588a"}),category:"woocommerce",keywords:[Object(a.__)("WooCommerce","woo-gutenberg-products-block")],description:Object(a.__)("Show reviews of your product to build trust.","woo-gutenberg-products-block"),attributes:function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?_(r,!0).forEach(function(t){o()(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):_(r).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}({},j.a,{productId:{type:"number"}}),edit:function(e){return Object(c.createElement)(O,e)},save:y.a})},61:function(e,t){!function(){e.exports=this.wp.dom}()},63:function(e,t,r){"use strict";r.d(t,"a",function(){return d}),r.d(t,"b",function(){return b}),r.d(t,"c",function(){return p});var n=r(0),o=r(1),c=r(39),a=r(2),i=r(18),s=r(74),l=r(5),u=r(70),d=function(e,t){return Object(n.createElement)(i.BlockControls,null,Object(n.createElement)(a.Toolbar,{controls:[{icon:"edit",title:Object(o.__)("Edit","woo-gutenberg-products-block"),onClick:function(){return t({editMode:!e})},isActive:e}]}))},b=function(e,t){return Object(n.createElement)(n.Fragment,null,Object(n.createElement)(a.ToggleControl,{label:Object(o.__)("Product rating","woo-gutenberg-products-block"),checked:e.showReviewRating,onChange:function(){return t({showReviewRating:!e.showReviewRating})}}),e.showReviewRating&&!l.ENABLE_REVIEW_RATING&&Object(n.createElement)(a.Notice,{className:"wc-block-reviews__notice",isDismissible:!1},Object(n.createElement)(n.RawHTML,null,Object(o.sprintf)(Object(c.escapeHTML)(Object(o.__)("Product rating is disabled in your %sstore settings%s.","woo-gutenberg-products-block")),'<a href="'.concat(Object(s.a)("admin.php?page=wc-settings&tab=products"),'" target="_blank">'),"</a>"))),Object(n.createElement)(a.ToggleControl,{label:Object(o.__)("Reviewer name","woo-gutenberg-products-block"),checked:e.showReviewerName,onChange:function(){return t({showReviewerName:!e.showReviewerName})}}),Object(n.createElement)(a.ToggleControl,{label:Object(o.__)("Image","woo-gutenberg-products-block"),checked:e.showReviewImage,onChange:function(){return t({showReviewImage:!e.showReviewImage})}}),Object(n.createElement)(a.ToggleControl,{label:Object(o.__)("Review date","woo-gutenberg-products-block"),checked:e.showReviewDate,onChange:function(){return t({showReviewDate:!e.showReviewDate})}}),Object(n.createElement)(a.ToggleControl,{label:Object(o.__)("Review content","woo-gutenberg-products-block"),checked:e.showReviewContent,onChange:function(){return t({showReviewContent:!e.showReviewContent})}}),e.showReviewImage&&Object(n.createElement)(n.Fragment,null,Object(n.createElement)(u.a,{label:Object(o.__)("Review image","woo-gutenberg-products-block"),value:e.imageType,options:[{label:Object(o.__)("Reviewer photo","woo-gutenberg-products-block"),value:"reviewer"},{label:Object(o.__)("Product","woo-gutenberg-products-block"),value:"product"}],onChange:function(e){return t({imageType:e})}}),"reviewer"===e.imageType&&!l.SHOW_AVATARS&&Object(n.createElement)(a.Notice,{className:"wc-block-reviews__notice",isDismissible:!1},Object(n.createElement)(n.RawHTML,null,Object(o.sprintf)(Object(c.escapeHTML)(Object(o.__)("Reviewer photo is disabled in your %ssite settings%s.","woo-gutenberg-products-block")),'<a href="'.concat(Object(s.a)("options-discussion.php"),'" target="_blank">'),"</a>")))))},p=function(e,t){return Object(n.createElement)(n.Fragment,null,Object(n.createElement)(a.ToggleControl,{label:Object(o.__)("Order by","woo-gutenberg-products-block"),checked:e.showOrderby,onChange:function(){return t({showOrderby:!e.showOrderby})}}),Object(n.createElement)(a.SelectControl,{label:Object(o.__)("Order Product Reviews by","woo-gutenberg-products-block"),value:e.orderby,options:[{label:"Most recent",value:"most-recent"},{label:"Highest Rating",value:"highest-rating"},{label:"Lowest Rating",value:"lowest-rating"}],onChange:function(e){return t({orderby:e})}}),Object(n.createElement)(a.RangeControl,{label:Object(o.__)("Starting Number of Reviews","woo-gutenberg-products-block"),value:e.reviewsOnPageLoad,onChange:function(e){return t({reviewsOnPageLoad:e})},max:20,min:1}),Object(n.createElement)(a.ToggleControl,{label:Object(o.__)("Load more","woo-gutenberg-products-block"),checked:e.showLoadMore,onChange:function(){return t({showLoadMore:!e.showLoadMore})}}),e.showLoadMore&&Object(n.createElement)(a.RangeControl,{label:Object(o.__)("Load More Reviews","woo-gutenberg-products-block"),value:e.reviewsOnLoadMore,onChange:function(e){return t({reviewsOnLoadMore:e})},max:20,min:1}))}},64:function(e,t){},65:function(e,t){},67:function(e,t){},68:function(e,t){},69:function(e,t,r){"use strict";var n=r(16),o=r.n(n),c=r(8),a=r.n(c),i=r(9),s=r.n(i),l=r(10),u=r.n(l),d=r(11),b=r.n(d),p=r(12),h=r.n(p),m=r(0),v=r(13),g=[];t.a=function(e){return function(t){function r(){return a()(this,r),u()(this,b()(r).apply(this,arguments))}return h()(r,t),s()(r,[{key:"generateUniqueID",value:function(){var e=r.name;return g[e]||(g[e]=0),g[e]++,g[e]}},{key:"render",value:function(){var t=this.generateUniqueID();return Object(m.createElement)(e,o()({},this.props,{componentId:t}))}}]),r}(v.Component)}},70:function(e,t,r){"use strict";var n=r(16),o=r.n(n),c=r(8),a=r.n(c),i=r(9),s=r.n(i),l=r(10),u=r.n(l),d=r(11),b=r.n(d),p=r(15),h=r.n(p),m=r(12),v=r.n(m),g=r(0),w=r(4),f=r(6),O=r.n(f),j=r(2),y=r(21),_=(r(132),function(e){function t(){var e;return a()(this,t),(e=u()(this,b()(t).apply(this,arguments))).onClick=e.onClick.bind(h()(e)),e}return v()(t,e),s()(t,[{key:"onClick",value:function(e){this.props.onChange&&this.props.onChange(e.target.value)}},{key:"render",value:function(){var e,t=this,r=this.props,n=r.label,c=r.checked,a=r.instanceId,i=r.className,s=r.help,l=r.options,u=r.value,d="inspector-toggle-button-control-".concat(a);return s&&(e=Object(w.isFunction)(s)?s(c):s),Object(g.createElement)(j.BaseControl,{id:d,help:e,className:O()("components-toggle-button-control",i)},Object(g.createElement)("label",{id:d+"__label",htmlFor:d,className:"components-toggle-button-control__label"},n),Object(g.createElement)(j.ButtonGroup,{"aria-labelledby":d+"__label"},l.map(function(e,r){var c={};return u===e.value?(c.isPrimary=!0,c["aria-pressed"]=!0):(c.isDefault=!0,c["aria-pressed"]=!1),Object(g.createElement)(j.Button,o()({key:"".concat(e.label,"-").concat(e.value,"-").concat(r),value:e.value,onClick:t.onClick,"aria-label":n+": "+e.label},c),e.label)})))}}]),t}(g.Component));t.a=Object(y.withInstanceId)(_)},71:function(e,t,r){"use strict";var n=r(16),o=r.n(n),c=r(38),a=r.n(c),i=r(8),s=r.n(i),l=r(9),u=r.n(l),d=r(10),b=r.n(d),p=r(11),h=r.n(p),m=r(15),v=r.n(m),g=r(12),w=r.n(g),f=r(0),O=r(21),j=r(25),y=Object(O.createHigherOrderComponent)(function(e){return function(t){function r(){var e;return s()(this,r),(e=b()(this,h()(r).apply(this,arguments))).state={error:null,loading:!1,product:null},e.loadProduct=e.loadProduct.bind(v()(e)),e}return w()(r,t),u()(r,[{key:"componentDidMount",value:function(){this.loadProduct()}},{key:"componentDidUpdate",value:function(e){e.attributes.productId!==this.props.attributes.productId&&this.loadProduct()}},{key:"loadProduct",value:function(){var e=this,t=this.props.attributes.productId;t?(this.setState({loading:!0}),Object(j.b)(t).then(function(t){e.setState({product:t,loading:!1,error:null})}).catch(function(t){var r="object"===a()(t)&&t.hasOwnProperty("message")?{apiMessage:t.message}:{apiMessage:null};e.setState({product:null,loading:!1,error:r})})):this.setState({product:null,loading:!1,error:null})}},{key:"render",value:function(){var t=this.state,r=t.error,n=t.loading,c=t.product;return Object(f.createElement)(e,o()({},this.props,{error:r,getProduct:this.loadProduct,isLoading:n,product:c}))}}]),r}(f.Component)},"withProduct"),_=Object(O.createHigherOrderComponent)(function(e){return function(t){function r(){var e;return s()(this,r),(e=b()(this,h()(r).apply(this,arguments))).state={error:null,loading:!1,category:null},e.loadCategory=e.loadCategory.bind(v()(e)),e}return w()(r,t),u()(r,[{key:"componentDidMount",value:function(){this.loadCategory()}},{key:"componentDidUpdate",value:function(e){e.attributes.categoryId!==this.props.attributes.categoryId&&this.loadCategory()}},{key:"loadCategory",value:function(){var e=this,t=this.props.attributes.categoryId;t?(this.setState({loading:!0}),Object(j.a)(t).then(function(t){e.setState({category:t,loading:!1,error:null})}).catch(function(t){var r="object"===a()(t)&&t.hasOwnProperty("message")?{apiMessage:t.message}:{apiMessage:null};e.setState({category:null,loading:!1,error:r})})):this.setState({category:null,loading:!1,error:null})}},{key:"render",value:function(){var t=this.state,r=t.error,n=t.loading,c=t.category;return Object(f.createElement)(e,o()({},this.props,{error:r,getCategory:this.loadCategory,isLoading:n,category:c}))}}]),r}(f.Component)},"withCategory"),E=r(4),k=(r(7),r(5)),R=Object(O.createHigherOrderComponent)(function(e){var t=function(t){function r(){var e;return s()(this,r),(e=b()(this,h()(r).apply(this,arguments))).state={list:[],loading:!0},e.debouncedOnSearch=Object(E.debounce)(e.onSearch.bind(v()(e)),400),e}return w()(r,t),u()(r,[{key:"componentDidMount",value:function(){var e=this,t=this.props.selected;Object(j.d)({selected:t}).then(function(t){e.setState({list:t,loading:!1})}).catch(function(){e.setState({list:[],loading:!1})})}},{key:"componentWillUnmount",value:function(){this.debouncedOnSearch.cancel()}},{key:"onSearch",value:function(e){var t=this,r=this.props.selected;Object(j.d)({selected:r,search:e}).then(function(e){t.setState({list:e,loading:!1})}).catch(function(){t.setState({list:[],loading:!1})})}},{key:"render",value:function(){var t=this.state,r=t.list,n=t.loading,c=this.props.selected;return Object(f.createElement)(e,o()({},this.props,{products:r,isLoading:n,selected:r.filter(function(e){var t=e.id;return c.includes(t)}),onSearch:k.IS_LARGE_CATALOG?this.debouncedOnSearch:null}))}}]),r}(f.Component);return t.defaultProps={selected:[]},t},"withSearchedProducts");r.d(t,"b",function(){return y}),r.d(t,"a",function(){return _}),r.d(t,"c",function(){return R})},77:function(e,t,r){var n=r(114);"string"==typeof n&&(n=[[e.i,n,""]]);var o={insert:"head",singleton:!1};r(35)(n,o);n.locals&&(e.exports=n.locals)},78:function(e,t){!function(){e.exports=this.wp.isShallowEqual}()},79:function(e,t,r){"use strict";t.a={editMode:{type:"boolean",default:!0},imageType:{type:"string",default:"reviewer"},orderby:{type:"string",default:"most-recent"},reviewsOnLoadMore:{type:"number",default:10},reviewsOnPageLoad:{type:"number",default:10},showLoadMore:{type:"boolean",default:!0},showOrderby:{type:"boolean",default:!0},showReviewDate:{type:"boolean",default:!0},showReviewerName:{type:"boolean",default:!0},showReviewImage:{type:"boolean",default:!0},showReviewRating:{type:"boolean",default:!0},showReviewContent:{type:"boolean",default:!0}}},80:function(e,t,r){"use strict";var n=r(16),o=r.n(n),c=r(0),a=(r(77),r(40));t.a=function(e){var t=e.attributes,r=t.categoryIds,n=t.imageType,i=t.orderby,s=t.productId,l={"data-image-type":n,"data-orderby":i,"data-reviews-on-page-load":t.reviewsOnPageLoad,"data-reviews-on-load-more":t.reviewsOnLoadMore,"data-show-load-more":t.showLoadMore,"data-show-orderby":t.showOrderby},u="wc-block-all-reviews";return s&&(l["data-product-id"]=s,u="wc-block-reviews-by-product"),Array.isArray(r)&&(l["data-category-ids"]=r.join(","),u="wc-block-reviews-by-category"),Object(c.createElement)("div",o()({className:Object(a.a)(u,t)},l))}},81:function(e,t,r){"use strict";var n=r(8),o=r.n(n),c=r(9),a=r.n(c),i=r(10),s=r.n(i),l=r(11),u=r.n(l),d=r(12),b=r.n(d),p=r(0),h=r(1),m=r(13),v=(r(7),r(4)),g=r(2),w=r(5),f=r(52),O=r(20),j=r.n(O),y=r(6),_=r.n(y);function E(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}var k=function(e){var t,r=e.label,n=e.screenReaderLabel,o=e.wrapperElement,c=e.wrapperProps;return!r&&n?(t=o||"span",c=function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?E(r,!0).forEach(function(t){j()(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):E(r).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}({},c,{className:_()(c.className,"screen-reader-text")}),Object(p.createElement)(t,c,n)):(t=o||m.Fragment,r&&n&&r!==n?Object(p.createElement)(t,c,Object(p.createElement)("span",{"aria-hidden":!0},r),Object(p.createElement)("span",{className:"screen-reader-text"},n)):Object(p.createElement)(t,c,r))};k.defaultProps={wrapperProps:{}};var R=k,C=(r(170),function(e){var t=e.onClick,r=e.label,n=e.screenReaderLabel;return Object(p.createElement)("div",{className:"wp-block-button wc-block-load-more"},Object(p.createElement)("button",{className:"wp-block-button__link",onClick:t},Object(p.createElement)(R,{label:r,screenReaderLabel:n})))});C.defaultProps={label:Object(h.__)("Load more","woo-gutenberg-products-block")};var P=C,S=r(15),N=r.n(S),L=r(100),I=r.n(L),M=function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"...",n=I()(e,{suffix:r,limit:t});return n.html},x=function(e,t,r,n){var o=T(e,t,r);return M(e,o-n.length,n)},T=function(e,t,r){for(var n={start:0,middle:0,end:e.length};n.start<=n.end;)n.middle=Math.floor((n.start+n.end)/2),t.innerHTML=M(e,n.middle),n=A(n,t.clientHeight,r);return n.middle},A=function(e,t,r){return t<=r?e.start=e.middle+1:e.end=e.middle-1,e},D=function(e){function t(e){var r;return o()(this,t),(r=s()(this,u()(t).apply(this,arguments))).state={isExpanded:!1,clampEnabled:null,content:e.children,summary:"."},r.reviewSummary=Object(m.createRef)(),r.reviewContent=Object(m.createRef)(),r.getButton=r.getButton.bind(N()(r)),r.onClick=r.onClick.bind(N()(r)),r}return b()(t,e),a()(t,[{key:"componentDidMount",value:function(){if(this.props.children){var e=this.props,t=e.maxLines,r=e.ellipsis,n=(this.reviewSummary.current.clientHeight+1)*t+1,o=this.reviewContent.current.clientHeight+1>n;this.setState({clampEnabled:o}),o&&this.setState({summary:x(this.reviewContent.current.innerHTML,this.reviewSummary.current,n,r)})}}},{key:"getButton",value:function(){var e=this.state.isExpanded,t=this.props,r=t.className,n=t.lessText,o=t.moreText,c=e?n:o;if(c)return Object(p.createElement)("a",{href:"#more",className:r+"__read_more",onClick:this.onClick,"aria-expanded":!e,role:"button"},c)}},{key:"onClick",value:function(e){e.preventDefault();var t=this.state.isExpanded;this.setState({isExpanded:!t})}},{key:"render",value:function(){var e=this.props.className,t=this.state,r=t.content,n=t.summary,o=t.clampEnabled,c=t.isExpanded;return r?!1===o?Object(p.createElement)("div",{className:e},Object(p.createElement)("div",{ref:this.reviewContent},r)):Object(p.createElement)("div",{className:e},(!c||null===o)&&Object(p.createElement)("div",{ref:this.reviewSummary,"aria-hidden":c,dangerouslySetInnerHTML:{__html:n}}),(c||null===o)&&Object(p.createElement)("div",{ref:this.reviewContent,"aria-hidden":!c},r),this.getButton()):null}}]),t}(m.Component);D.defaultProps={maxLines:3,ellipsis:"…",moreText:Object(h.__)("Read more","woo-gutenberg-products-block"),lessText:Object(h.__)("Read less","woo-gutenberg-products-block"),className:"read-more-content"};var H=D;r(171);var z=function(e){var t=e.attributes,r=e.review,n=void 0===r?{}:r,o=t.imageType,c=t.showReviewDate,a=t.showReviewerName,i=t.showReviewImage,s=t.showReviewRating,l=t.showReviewContent,u=t.showProductName,d=n.rating,b=!Object.keys(n).length>0,m=Number.isFinite(d)&&s;return Object(p.createElement)("li",{className:_()("wc-block-review-list-item__item",{"is-loading":b}),"aria-hidden":b},(u||c||a||i||m)&&Object(p.createElement)("div",{className:"wc-block-review-list-item__info"},i&&function(e,t,r){return r||!e?Object(p.createElement)("div",{className:"wc-block-review-list-item__image",width:"48",height:"48"}):Object(p.createElement)("div",{className:"wc-block-review-list-item__image"},"product"===t?Object(p.createElement)("img",{"aria-hidden":"true",alt:"",src:e.product_picture||"",className:"wc-block-review-list-item__image",width:"48",height:"48"}):Object(p.createElement)("img",{"aria-hidden":"true",alt:"",src:e.reviewer_avatar_urls[48]||"",srcSet:e.reviewer_avatar_urls[96]+" 2x",className:"wc-block-review-list-item__image",width:"48",height:"48"}),e.verified&&Object(p.createElement)("div",{className:"wc-block-review-list-item__verified",title:Object(h.__)("Verified buyer","woo-gutenberg-products-block")},Object(h.__)("Verified buyer","woo-gutenberg-products-block")))}(n,o,b),(u||a||m||c)&&Object(p.createElement)("div",{className:"wc-block-review-list-item__meta"},m&&function(e){var t=e.rating,r={width:t/5*100+"%"};return Object(p.createElement)("div",{className:"wc-block-review-list-item__rating"},Object(p.createElement)("div",{className:"wc-block-review-list-item__rating__stars",role:"img"},Object(p.createElement)("span",{style:r},Object(h.sprintf)(Object(h.__)("Rated %d out of 5","woo-gutenberg-products-block"),t))))}(n),u&&function(e){return Object(p.createElement)("div",{className:"wc-block-review-list-item__product"},Object(p.createElement)("a",{href:e.product_permalink},e.product_name))}(n),a&&function(e){var t=e.reviewer,r=void 0===t?"":t;return Object(p.createElement)("div",{className:"wc-block-review-list-item__author"},r)}(n),c&&function(e){var t=e.date_created,r=e.formatted_date_created;return Object(p.createElement)("time",{className:"wc-block-review-list-item__published-date",dateTime:t},r)}(n))),l&&function(e){return Object(p.createElement)(H,{maxLines:10,moreText:Object(h.__)("Read full review","woo-gutenberg-products-block"),lessText:Object(h.__)("Hide full review","woo-gutenberg-products-block"),className:"wc-block-review-list-item__text"},Object(p.createElement)("div",{dangerouslySetInnerHTML:{__html:e.review||""}}))}(n))};r(172);function B(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}var V=function(e){var t=e.attributes,r=e.reviews,n=function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?B(r,!0).forEach(function(t){j()(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):B(r).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}({},t,{showReviewImage:(w.SHOW_AVATARS||"product"===t.imageType)&&t.showReviewImage,showReviewRating:w.ENABLE_REVIEW_RATING&&t.showReviewRating});return Object(p.createElement)("ul",{className:"wc-block-review-list"},0===r.length?Object(p.createElement)(z,{attributes:n}):r.map(function(e,t){return Object(p.createElement)(z,{key:e.id||t,attributes:n,review:e})}))},G=r(69),F=(r(173),Object(G.a)(function(e){var t=e.className,r=e.componentId,n=e.defaultValue,o=e.label,c=e.onChange,a=e.options,i=e.screenReaderLabel,s=e.readOnly,l=e.value,u="wc-block-order-select__select-".concat(r);return Object(p.createElement)("p",{className:_()("wc-block-order-select",t)},Object(p.createElement)(R,{label:o,screenReaderLabel:i,wrapperElement:"label",wrapperProps:{className:"wc-block-order-select__label",htmlFor:u}}),Object(p.createElement)("select",{id:u,className:"wc-block-order-select__select",defaultValue:n,onChange:c,readOnly:s,value:l},a.map(function(e){return Object(p.createElement)("option",{key:e.key,value:e.key},e.label)})))})),q=(r(174),function(e){var t=e.defaultValue,r=e.onChange,n=e.readOnly,o=e.value;return Object(p.createElement)(F,{className:"wc-block-review-order-select",defaultValue:t,label:Object(h.__)("Order by","woo-gutenberg-products-block"),onChange:r,options:[{key:"most-recent",label:Object(h.__)("Most recent","woo-gutenberg-products-block")},{key:"highest-rating",label:Object(h.__)("Highest rating","woo-gutenberg-products-block")},{key:"lowest-rating",label:Object(h.__)("Lowest rating","woo-gutenberg-products-block")}],readOnly:n,screenReaderLabel:Object(h.__)("Order reviews by","woo-gutenberg-products-block"),value:o})}),W=r(16),U=r.n(W),Q=r(38),Z=r.n(Q),J=r(78),Y=r.n(J),$=r(40),K=function(e){var t=function(t){function r(){var e;return o()(this,r),(e=s()(this,u()(r).apply(this,arguments))).state={error:null,loading:!0,reviews:[],totalReviews:0},e.setError=e.setError.bind(N()(e)),e.delayedAppendReviews=e.props.delayFunction(e.appendReviews),e}return b()(r,t),a()(r,[{key:"componentDidMount",value:function(){this.replaceReviews()}},{key:"componentDidUpdate",value:function(e){e.reviewsToDisplay<this.props.reviewsToDisplay?this.delayedAppendReviews():this.shouldReplaceReviews(e,this.props)&&this.replaceReviews()}},{key:"shouldReplaceReviews",value:function(e,t){return e.orderby!==t.orderby||e.order!==t.order||e.productId!==t.productId||!Y()(e.categoryIds,t.categoryIds)}},{key:"componentWillUnMount",value:function(){this.delayedAppendReviews.cancel&&this.delayedAppendReviews.cancel()}},{key:"getArgs",value:function(e){var t=this.props,r=t.categoryIds,n=t.order,o=t.orderby,c=t.productId,a={order:n,orderby:o,per_page:t.reviewsToDisplay-e,offset:e};return r&&r.length&&(a.category_id=Array.isArray(r)?r.join(","):r),c&&(a.product_id=c),a}},{key:"replaceReviews",value:function(){var e=this.props.onReviewsReplaced;this.updateListOfReviews().then(e)}},{key:"appendReviews",value:function(){var e=this.props,t=e.onReviewsAppended,r=e.reviewsToDisplay,n=this.state.reviews;r<=n.length||this.updateListOfReviews(n).then(t)}},{key:"updateListOfReviews",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],r=this.props.reviewsToDisplay,n=this.state.totalReviews,o=Math.min(n,r)-t.length;return this.setState({loading:!0,reviews:t.concat(Array(o).fill({}))}),Object($.c)(this.getArgs(t.length)).then(function(r){var n=r.reviews,o=r.totalReviews;return e.setState({reviews:t.filter(function(e){return Object.keys(e).length}).concat(n),totalReviews:o,loading:!1,error:null}),{newReviews:n}}).catch(this.setError)}},{key:"setError",value:function(e){var t=this;e.json().then(function(e){var r=t.props.onReviewsLoadError,n="object"===Z()(e)&&e.hasOwnProperty("message")?{apiMessage:e.message}:{apiMessage:null};t.setState({reviews:[],loading:!1,error:n}),r()})}},{key:"render",value:function(){var t=this.props.reviewsToDisplay,r=this.state,n=r.error,o=r.loading,c=r.reviews,a=r.totalReviews;return Object(p.createElement)(e,U()({},this.props,{error:n,isLoading:o,reviews:c.slice(0,t),totalReviews:a}))}}]),r}(m.Component);t.defaultProps={delayFunction:function(e){return e},onReviewsAppended:function(){},onReviewsLoadError:function(){},onReviewsReplaced:function(){}};var r=e.displayName,n=void 0===r?e.name||"Component":r;return t.displayName="WithReviews( ".concat(n," )"),t}(function(e){function t(){return o()(this,t),s()(this,u()(t).apply(this,arguments))}return b()(t,e),a()(t,[{key:"render",value:function(){var e=this.props,t=e.attributes,r=e.error,n=e.isLoading,o=e.noReviewsPlaceholder,c=e.reviews,a=e.totalReviews;return r?Object(p.createElement)(f.a,{className:"wc-block-featured-product-error",error:r,isLoading:n}):0!==c.length||n?Object(p.createElement)(g.Disabled,null,t.showOrderby&&w.ENABLE_REVIEW_RATING&&Object(p.createElement)(q,{readOnly:!0,value:t.orderby}),Object(p.createElement)(V,{attributes:t,reviews:c}),t.showLoadMore&&a>c.length&&Object(p.createElement)(P,{screenReaderLabel:Object(h.__)("Load more reviews","woo-gutenberg-products-block")})):Object(p.createElement)(o,{attributes:t})}}]),t}(m.Component)),X=function(e){function t(){return o()(this,t),s()(this,u()(t).apply(this,arguments))}return b()(t,e),a()(t,[{key:"renderHiddenContentPlaceholder",value:function(){var e=this.props,t=e.icon,r=e.name;return Object(p.createElement)(g.Placeholder,{icon:t,label:r},Object(h.__)("The content for this block is hidden due to block settings.","woo-gutenberg-products-block"))}},{key:"render",value:function(){var e=this.props,t=e.attributes,r=e.className,n=e.noReviewsPlaceholder,o=t.categoryIds,c=t.productId,a=t.reviewsOnPageLoad,i=t.showProductName,s=t.showReviewDate,l=t.showReviewerName,u=t.showReviewContent,d=t.showReviewImage,b=t.showReviewRating,h=Object($.b)(t.orderby),m=h.order,g=h.orderby;return!(u||b||s||l||d||i)?this.renderHiddenContentPlaceholder():Object(p.createElement)("div",{className:Object($.a)(r,t)},Object(p.createElement)(K,{attributes:t,categoryIds:o,delayFunction:function(e){return Object(v.debounce)(e,400)},noReviewsPlaceholder:n,orderby:g,order:m,productId:c,reviewsToDisplay:a}))}}]),t}(m.Component);t.a=X},99:function(e,t,r){"use strict";var n=r(62),o=r.n(n),c=r(16),a=r.n(c),i=r(20),s=r.n(i),l=r(8),u=r.n(l),d=r(9),b=r.n(d),p=r(10),h=r.n(p),m=r(11),v=r.n(m),g=r(15),w=r.n(g),f=r(12),O=r.n(f),j=r(0),y=r(1),_=r(19),E=r(17),k=r.n(E),R=r(4),C=(r(7),r(26)),P=r(2),S=r(6),N=r.n(S),L=r(5),I=r(25),M=r(24);r(280);function x(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function T(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?x(r,!0).forEach(function(t){s()(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):x(r).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function A(e,t){if(!t)return e;var r=new RegExp(Object(R.escapeRegExp)(t),"ig");return e.replace(r,"<strong>$&</strong>")}var D=function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return e?Object(j.createElement)(M.e,null):Object(j.createElement)(M.f,null)},H=function(e){function t(){var e;return u()(this,t),(e=h()(this,v()(t).apply(this,arguments))).state={products:[],product:0,variationsList:{},variationsLoading:!1,loading:!0},e.debouncedOnSearch=Object(R.debounce)(e.onSearch.bind(w()(e)),400),e.debouncedGetVariations=Object(R.debounce)(e.getVariations.bind(w()(e)),200),e.renderItem=e.renderItem.bind(w()(e)),e.onProductSelect=e.onProductSelect.bind(w()(e)),e}return O()(t,e),b()(t,[{key:"componentWillUnmount",value:function(){this.debouncedOnSearch.cancel(),this.debouncedGetVariations.cancel()}},{key:"componentDidMount",value:function(){var e=this,t=this.props,r=t.selected,n=t.queryArgs;Object(I.d)({selected:r,queryArgs:n}).then(function(t){t=t.map(function(e){return T({},e,{parent:0,count:e.variations?e.variations.length:0})}),e.setState({products:t,loading:!1})}).catch(function(){e.setState({products:[],loading:!1})})}},{key:"componentDidUpdate",value:function(e,t){t.product!==this.state.product&&this.debouncedGetVariations()}},{key:"getVariations",value:function(){var e=this,t=this.state,r=t.product,n=t.products,o=t.variationsList;if(r){var c=n.find(function(e){return e.id===r});c.variations&&0!==c.variations.length&&(o[r]||this.setState({variationsLoading:!0}),k()({path:Object(_.addQueryArgs)("".concat(L.ENDPOINTS.products,"/").concat(r,"/variations"),{per_page:-1})}).then(function(t){t=t.map(function(e){return T({},e,{parent:r})}),e.setState(function(e){return{variationsList:T({},e.variationsList,s()({},r,t)),variationsLoading:!1}})}).catch(function(){e.setState({termsLoading:!1})}))}else this.setState({variationsList:{},variationsLoading:!1})}},{key:"onSearch",value:function(e){var t=this,r=this.props,n=r.selected,o=r.queryArgs;Object(I.d)({selected:n,search:e,queryArgs:o}).then(function(e){t.setState({products:e,loading:!1})}).catch(function(){t.setState({products:[],loading:!1})})}},{key:"onProductSelect",value:function(e,t){var r=this;return function(){r.setState({product:t?0:e.id})}}},{key:"renderItem",value:function(e){var t=this,r=e.item,n=e.search,o=e.depth,c=void 0===o?0:o,i=e.isSelected,s=e.onSelect,l=this.state,u=l.product,d=l.variationsLoading,b=N()("woocommerce-search-product__item","woocommerce-search-list__item","depth-".concat(c),{"is-searching":n.length>0,"is-skip-level":0===c&&0!==r.parent,"is-variable":r.count>0}),p=Object.assign({},e);delete p.isSingle;var h={role:"menuitemradio"};return r.breadcrumbs.length&&(h["aria-label"]="".concat(r.breadcrumbs[0],": ").concat(r.name)),r.count&&(h["aria-expanded"]=r.id===u),r.breadcrumbs.length?(Object(R.isEmpty)(r.variation)||(r.name=r.variation),Object(j.createElement)(C.b,a()({className:b},e,h))):[Object(j.createElement)(P.MenuItem,a()({key:"product-".concat(r.id),isSelected:i},p,h,{className:b,onClick:function(){s(r)(),t.onProductSelect(r,i)()}}),Object(j.createElement)("span",{className:"woocommerce-search-list__item-state"},D(i)),Object(j.createElement)("span",{className:"woocommerce-search-list__item-label"},Object(j.createElement)("span",{className:"woocommerce-search-list__item-name",dangerouslySetInnerHTML:{__html:A(r.name,n)}})),r.count?Object(j.createElement)("span",{className:"woocommerce-search-list__item-variation-count"},Object(y.sprintf)(Object(y._n)("%d variation","%d variations",r.count,"woo-gutenberg-products-block"),r.count)):null),u===r.id&&r.count>0&&d&&Object(j.createElement)("div",{key:"loading",className:"woocommerce-search-list__item woocommerce-search-product__itemdepth-1 is-loading is-not-active"},Object(j.createElement)(P.Spinner,null))]}},{key:"render",value:function(){var e=this.state,t=e.products,r=e.loading,n=e.product,c=e.variationsList,a=this.props,i=a.onChange,s=a.renderItem,l=a.selected,u=c[n]||[],d=[].concat(o()(t),o()(u)),b={list:Object(y.__)("Products","woo-gutenberg-products-block"),noItems:Object(y.__)("Your store doesn't have any products.","woo-gutenberg-products-block"),search:Object(y.__)("Search for a product to display","woo-gutenberg-products-block"),updated:Object(y.__)("Product search results updated.","woo-gutenberg-products-block")},p=l?[Object(R.find)(d,{id:l})]:[];return Object(j.createElement)(j.Fragment,null,Object(j.createElement)(C.a,{className:"woocommerce-products",list:d,isLoading:r,isSingle:!0,selected:p,onChange:i,renderItem:s||this.renderItem,onSearch:L.IS_LARGE_CATALOG?this.debouncedOnSearch:null,messages:b,isHierarchical:!0}))}}]),t}(j.Component);t.a=H}});
|
1 |
+
this.wc=this.wc||{},this.wc.blocks=this.wc.blocks||{},this.wc.blocks["reviews-by-product"]=function(e){function t(t){for(var n,a,i=t[0],s=t[1],l=t[2],d=0,b=[];d<i.length;d++)a=i[d],Object.prototype.hasOwnProperty.call(o,a)&&o[a]&&b.push(o[a][0]),o[a]=0;for(n in s)Object.prototype.hasOwnProperty.call(s,n)&&(e[n]=s[n]);for(u&&u(t);b.length;)b.shift()();return c.push.apply(c,l||[]),r()}function r(){for(var e,t=0;t<c.length;t++){for(var r=c[t],n=!0,i=1;i<r.length;i++){var s=r[i];0!==o[s]&&(n=!1)}n&&(c.splice(t--,1),e=a(a.s=r[0]))}return e}var n={},o={18:0},c=[];function a(t){if(n[t])return n[t].exports;var r=n[t]={i:t,l:!1,exports:{}};return e[t].call(r.exports,r,r.exports,a),r.l=!0,r.exports}a.m=e,a.c=n,a.d=function(e,t,r){a.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},a.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},a.t=function(e,t){if(1&t&&(e=a(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(a.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var n in e)a.d(r,n,function(t){return e[t]}.bind(null,n));return r},a.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return a.d(t,"a",t),t},a.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},a.p="";var i=window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[],s=i.push.bind(i);i.push=t,i=i.slice();for(var l=0;l<i.length;l++)t(i[l]);var u=s;return c.push([562,2,1,0]),r()}({0:function(e,t){!function(){e.exports=this.wp.element}()},1:function(e,t){!function(){e.exports=this.wp.i18n}()},102:function(e,t,r){"use strict";var n=r(60),o=r.n(n),c=r(15),a=r.n(c),i=r(19),s=r.n(i),l=r(7),u=r.n(l),d=r(8),b=r.n(d),p=r(9),h=r.n(p),m=r(10),v=r.n(m),g=r(14),w=r.n(g),f=r(11),O=r.n(f),j=r(0),y=r(1),_=r(18),E=r(16),k=r.n(E),R=r(4),C=(r(2),r(25)),P=r(3),S=r(6),N=r.n(S),L=r(5),I=r(24),M=r(23);r(294);function x(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function T(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?x(r,!0).forEach((function(t){s()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):x(r).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function A(e,t){if(!t)return e;var r=new RegExp(Object(R.escapeRegExp)(t),"ig");return e.replace(r,"<strong>$&</strong>")}var D=function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return e?Object(j.createElement)(M.e,null):Object(j.createElement)(M.f,null)},H=function(e){function t(){var e;return u()(this,t),(e=h()(this,v()(t).apply(this,arguments))).state={products:[],product:0,variationsList:{},variationsLoading:!1,loading:!0},e.debouncedOnSearch=Object(R.debounce)(e.onSearch.bind(w()(e)),400),e.debouncedGetVariations=Object(R.debounce)(e.getVariations.bind(w()(e)),200),e.renderItem=e.renderItem.bind(w()(e)),e.onProductSelect=e.onProductSelect.bind(w()(e)),e}return O()(t,e),b()(t,[{key:"componentWillUnmount",value:function(){this.debouncedOnSearch.cancel(),this.debouncedGetVariations.cancel()}},{key:"componentDidMount",value:function(){var e=this,t=this.props,r=t.selected,n=t.queryArgs;Object(I.d)({selected:r,queryArgs:n}).then((function(t){t=t.map((function(e){return T({},e,{parent:0,count:e.variations?e.variations.length:0})})),e.setState({products:t,loading:!1})})).catch((function(){e.setState({products:[],loading:!1})}))}},{key:"componentDidUpdate",value:function(e,t){t.product!==this.state.product&&this.debouncedGetVariations()}},{key:"getVariations",value:function(){var e=this,t=this.state,r=t.product,n=t.products,o=t.variationsList;if(r){var c=n.find((function(e){return e.id===r}));c.variations&&0!==c.variations.length&&(o[r]||this.setState({variationsLoading:!0}),k()({path:Object(_.addQueryArgs)("".concat(L.ENDPOINTS.products,"/").concat(r,"/variations"),{per_page:-1})}).then((function(t){t=t.map((function(e){return T({},e,{parent:r})})),e.setState((function(e){return{variationsList:T({},e.variationsList,s()({},r,t)),variationsLoading:!1}}))})).catch((function(){e.setState({termsLoading:!1})})))}else this.setState({variationsList:{},variationsLoading:!1})}},{key:"onSearch",value:function(e){var t=this,r=this.props,n=r.selected,o=r.queryArgs;Object(I.d)({selected:n,search:e,queryArgs:o}).then((function(e){t.setState({products:e,loading:!1})})).catch((function(){t.setState({products:[],loading:!1})}))}},{key:"onProductSelect",value:function(e,t){var r=this;return function(){r.setState({product:t?0:e.id})}}},{key:"renderItem",value:function(e){var t=this,r=e.item,n=e.search,o=e.depth,c=void 0===o?0:o,i=e.isSelected,s=e.onSelect,l=this.state,u=l.product,d=l.variationsLoading,b=N()("woocommerce-search-product__item","woocommerce-search-list__item","depth-".concat(c),{"is-searching":n.length>0,"is-skip-level":0===c&&0!==r.parent,"is-variable":r.count>0}),p=Object.assign({},e);delete p.isSingle;var h={role:"menuitemradio"};return r.breadcrumbs.length&&(h["aria-label"]="".concat(r.breadcrumbs[0],": ").concat(r.name)),r.count&&(h["aria-expanded"]=r.id===u),r.breadcrumbs.length?(Object(R.isEmpty)(r.variation)||(r.name=r.variation),Object(j.createElement)(C.b,a()({className:b},e,h))):[Object(j.createElement)(P.MenuItem,a()({key:"product-".concat(r.id),isSelected:i},p,h,{className:b,onClick:function(){s(r)(),t.onProductSelect(r,i)()}}),Object(j.createElement)("span",{className:"woocommerce-search-list__item-state"},D(i)),Object(j.createElement)("span",{className:"woocommerce-search-list__item-label"},Object(j.createElement)("span",{className:"woocommerce-search-list__item-name",dangerouslySetInnerHTML:{__html:A(r.name,n)}})),r.count?Object(j.createElement)("span",{className:"woocommerce-search-list__item-variation-count"},Object(y.sprintf)(Object(y._n)("%d variation","%d variations",r.count,"woo-gutenberg-products-block"),r.count)):null),u===r.id&&r.count>0&&d&&Object(j.createElement)("div",{key:"loading",className:"woocommerce-search-list__item woocommerce-search-product__itemdepth-1 is-loading is-not-active"},Object(j.createElement)(P.Spinner,null))]}},{key:"render",value:function(){var e=this.state,t=e.products,r=e.loading,n=e.product,c=e.variationsList,a=this.props,i=a.onChange,s=a.renderItem,l=a.selected,u=c[n]||[],d=[].concat(o()(t),o()(u)),b={list:Object(y.__)("Products","woo-gutenberg-products-block"),noItems:Object(y.__)("Your store doesn't have any products.","woo-gutenberg-products-block"),search:Object(y.__)("Search for a product to display","woo-gutenberg-products-block"),updated:Object(y.__)("Product search results updated.","woo-gutenberg-products-block")},p=l?[Object(R.find)(d,{id:l})]:[];return Object(j.createElement)(j.Fragment,null,Object(j.createElement)(C.a,{className:"woocommerce-products",list:d,isLoading:r,isSingle:!0,selected:p,onChange:i,renderItem:s||this.renderItem,onSearch:L.IS_LARGE_CATALOG?this.debouncedOnSearch:null,messages:b,isHierarchical:!0}))}}]),t}(j.Component);t.a=H},118:function(e,t,r){},12:function(e,t){!function(){e.exports=this.React}()},13:function(e,t){!function(){e.exports=this.moment}()},16:function(e,t){!function(){e.exports=this.wp.apiFetch}()},17:function(e,t){!function(){e.exports=this.wp.editor}()},18:function(e,t){!function(){e.exports=this.wp.url}()},20:function(e,t){!function(){e.exports=this.wp.compose}()},22:function(e,t){!function(){e.exports=this.wp.blocks}()},23:function(e,t,r){"use strict";var n=r(0),o=r(3),c=function(e){var t=e.className,r=e.fillColor;return Object(n.createElement)(o.Icon,{className:t,icon:Object(n.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 22.41"},Object(n.createElement)("g",null,Object(n.createElement)("g",null,Object(n.createElement)("path",{fill:r,d:"M16.55 0H1.75C.56 0 0 .52 0 1.68v9.24c0 1.15.56 1.92 1.75 1.92H2V4.76a2.51 2.51 0 0 1 2.74-2.68H18v-.4A1.51 1.51 0 0 0 16.55 0z"}),Object(n.createElement)("path",{fill:r,d:"M19.54 3.11H4.74C3.55 3.11 3 3.64 3 4.79V14c0 1.19.55 2 1.74 2H5V7.88A2.51 2.51 0 0 1 7.73 5.2H21v-.41a1.51 1.51 0 0 0-1.46-1.68z"}),Object(n.createElement)("path",{fill:r,d:"M22.53 6.23H7.73C6.54 6.23 6 6.75 6 7.91v9.24c0 1.15.56 1.92 1.75 1.92h7a.59.59 0 0 1 .32.11l1.61 1.15 2.83 2a.31.31 0 0 0 .18.05.3.3 0 0 0 .31-.3v-2.73a.3.3 0 0 1 .28-.28h2.31A1.47 1.47 0 0 0 24 17.6V7.91a1.52 1.52 0 0 0-1.47-1.68z"}),Object(n.createElement)("path",{fill:"#ffffff",d:"M10.2 10.92l1.06-2.14 1.05 2.14 2.37.35-1.71 1.66.4 2.36-2.11-1.11-.17.09-.52.27-.51.26-.92.49.18-1.02.09-.57.1-.56.03-.21-1.71-1.66 2.37-.35zM21.46 14.25h-4.4a.69.69 0 0 1-.69-.69.68.68 0 0 1 .69-.68h4.4a.68.68 0 0 1 .69.68.69.69 0 0 1-.69.69zM21.46 11.19h-4.4a.69.69 0 1 1 0-1.37h4.4a.69.69 0 1 1 0 1.37z"}))))})},a=function(){return Object(n.createElement)(o.Icon,{icon:Object(n.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},Object(n.createElement)("path",{fillRule:"nonzero",d:"M21.913 7.0946H2.0254c-1.1708 0-2.0984.9908-2.0205 2.16l.741 11.0724c.0714 1.0638.9552 1.8892 2.0206 1.8892h18.4054c1.0654 0 1.9492-.8254 2.0205-1.8892l.7411-11.0724c.0779-1.1692-.8497-2.16-2.0205-2.16zm-8.8006-4.6573h5.987c1.119 0 2.0255.9065 2.0255 2.0254v.934H2.8103V2.0255C2.8103.9064 3.7168 0 4.8357 0h6.2513c1.119 0 2.0254.9065 2.0254 2.0254v.4119zm-7.0589 11.619a.926.926 0 1 1 0-1.852h11.8297a.926.926 0 1 1 0 1.852H6.0535z"}))})},i=function(){return Object(n.createElement)(o.Icon,{icon:Object(n.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},Object(n.createElement)("path",{d:"M22 7.5H2c-1.2 0-2.1 1-2 2.2l.7 11.1c.1 1.1 1 1.9 2 1.9h18.5c1.1 0 2-.8 2-1.9L24 9.6c.1-1.1-.9-2.1-2-2.1zM13.1 2.8v-.4c0-1.1-.9-2-2-2H4.8c-1.1 0-2 .9-2 2v3.4h18.4v-1c0-1.1-.9-2-2-2h-6.1z"}),Object(n.createElement)("path",{fill:"#fff",d:"M14.4 18.7L12 17.4l-2.4 1.3.5-2.6-1.9-1.9 2.6-.4 1.2-2.4 1.2 2.4 2.6.4-1.9 1.9z"}))})},s=function(){return Object(n.createElement)(o.Icon,{className:"material-icon",icon:Object(n.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},Object(n.createElement)("path",{d:"M0 0h24v24H0z",fill:"none"}),Object(n.createElement)("path",{d:"M23 12l-2.44-2.78.34-3.68-3.61-.82-1.89-3.18L12 3 8.6 1.54 6.71 4.72l-3.61.81.34 3.68L1 12l2.44 2.78-.34 3.69 3.61.82 1.89 3.18L12 21l3.4 1.46 1.89-3.18 3.61-.82-.34-3.68L23 12zm-10 5h-2v-2h2v2zm0-4h-2V7h2v6z"}))})},l=function(){return Object(n.createElement)(o.Icon,{icon:Object(n.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},Object(n.createElement)("path",{fill:"#1E8CBE",d:"M12 7c-2.76 0-5 2.24-5 5s2.24 5 5 5 5-2.24 5-5-2.24-5-5-5zm0-5C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"}))})},u=function(){return Object(n.createElement)(o.Icon,{icon:Object(n.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},Object(n.createElement)("path",{fill:"#6C7781",d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"}))})},d=function(e){var t=e.className,r=e.fillColor;return Object(n.createElement)(o.Icon,{className:t,icon:Object(n.createElement)("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},Object(n.createElement)("path",{fill:r,d:"M2.3,17.3h9.3c0.1,0,0.3,0,0.4,0.1l5.9,4.2c0.3,0.2,0.7,0,0.7-0.3v-3.7c0-0.2,0.2-0.4,0.4-0.4H22 c1.1,0,2-0.9,2-2V2.5c0-1.2-0.7-2.2-2-2.2H2.3C0.7,0.2,0,0.9,0,2.5v12.3C0,16.3,0.7,17.3,2.3,17.3z"}),Object(n.createElement)("polygon",{fill:"#ffffff",points:"8.8,12.1 6.5,10.9 4.1,12.1 4.5,9.5 2.6,7.6 5.3,7.2 6.5,4.8 7.6,7.2 10.3,7.6 8.4,9.5"}),Object(n.createElement)("path",{fill:"#ffffff",d:"M20.7,7.9h-7c-0.5,0-0.9-0.4-0.9-0.9S13.2,6,13.7,6h7c0.5,0,0.9,0.4,0.9,0.9S21.2,7.9,20.7,7.9z"}),Object(n.createElement)("path",{fill:"#ffffff",d:"M20.7,11.5h-7c-0.5,0-0.9-0.4-0.9-0.9s0.4-0.9,0.9-0.9h7c0.5,0,0.9,0.4,0.9,0.9S21.2,11.5,20.7,11.5z"}))})},b=function(e){var t=e.className,r=e.fillColor;return Object(n.createElement)(o.Icon,{className:t,icon:Object(n.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 23"},Object(n.createElement)("path",{fill:r,d:"M21.9943 7.0957H2.00638C0.807102 7.0957 -0.0923543 8.0951 0.0075853 9.29437L0.707162 20.3877C0.807102 21.487 1.70656 22.2865 2.70595 22.2865H21.1948C22.2941 22.2865 23.1936 21.487 23.1936 20.3877L23.9931 9.29437C24.093 8.0951 23.0936 7.0957 21.9943 7.0957Z"}),Object(n.createElement)("path",{fill:r,d:"M13.0921 2.39855V1.99879C13.0921 0.899456 12.1926 0 11.0933 0H4.7971C3.69777 0 2.79831 0.899456 2.79831 1.99879V5.39674H21.1872V4.49728C21.1872 3.39795 20.2877 2.49849 19.1884 2.49849H13.0921V2.39855Z"}),Object(n.createElement)("path",{fill:"white",d:"M8.63115 17.126L6.5415 15.9449L4.361 17.126L4.72442 14.6729L2.99819 13.0376L5.45125 12.6742L6.5415 10.4937L7.5409 12.6742L9.99396 13.0376L8.26773 14.6729L8.63115 17.126Z"}),Object(n.createElement)("path",{fill:"white",d:"M19.1907 13.5918H12.9899C12.547 13.5918 12.1926 13.1921 12.1926 12.6924C12.1926 12.1927 12.547 11.7929 12.9899 11.7929H19.1907C19.6336 11.7929 19.9879 12.1927 19.9879 12.6924C19.9879 13.1921 19.6336 13.5918 19.1907 13.5918Z"}),Object(n.createElement)("path",{fill:"white",d:"M19.1907 17.1897H12.9899C12.547 17.1897 12.1926 16.7899 12.1926 16.2902C12.1926 15.7905 12.547 15.3907 12.9899 15.3907H19.1907C19.6336 15.3907 19.9879 15.7905 19.9879 16.2902C19.9879 16.7899 19.6336 17.1897 19.1907 17.1897Z"}))})},p=function(){return Object(n.createElement)(o.Icon,{className:"material-icon",icon:Object(n.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},Object(n.createElement)("path",{d:"M13 13v8h8v-8h-8zM3 21h8v-8H3v8zM3 3v8h8V3H3zm13.66-1.31L11 7.34 16.66 13l5.66-5.66-5.66-5.65z"}),Object(n.createElement)("path",{d:"M0 0h24v24H0z",fill:"none"}))})},h=r(6),m=r.n(h),v=(r(2),function(e){var t=e.size,r=void 0===t?20:t,c=e.className;return Object(n.createElement)(o.Icon,{className:m()("woo-icon",c),icon:Object(n.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",height:r,width:Math.floor(1.67*r),viewBox:"0 0 245 145"},Object(n.createElement)("path",{fill:"#96588A",d:"M22.76 0h199.1a22.77 22.77 0 0 1 22.8 22.76v75.92a22.77 22.77 0 0 1-22.78 22.78h-71.41l9.77 24-43.13-24H22.76C10.1946 121.449.011 111.2654 0 98.7V22.76C.011 10.1946 10.1946.011 22.76 0z"}),Object(n.createElement)("path",{fill:"#FFF",fillRule:"nonzero",d:"M12.32 20.63a8.16 8.16 0 0 1 6.25-3.09c5.0733-.36 7.9867 2.0333 8.74 7.18 3.14 20.86 6.4933 38.5633 10.06 53.11l21.92-41.69c2-3.76 4.49-5.76 7.52-6 4.3867-.3067 7.13 2.49 8.23 8.39a186 186 0 0 0 9.47 34.23c2.62-25.38 7.0133-43.7133 13.18-55a7.73 7.73 0 0 1 6.6-4.43 8.8 8.8 0 0 1 6.32 2 7.75 7.75 0 0 1 3.05 5.74 8.52 8.52 0 0 1-1 4.77c-3.9 7.24-7.12 19.28-9.66 36.12-2.48 16.2533-3.3967 28.9633-2.75 38.13a12.25 12.25 0 0 1-1.16 6.56 6.32 6.32 0 0 1-5.33 3.53c-2.6667.18-5.3033-1.0567-7.91-3.71-9.2933-9.54-16.6567-23.7267-22.09-42.56C57.3 76.7167 52.48 86.3333 49.3 92.76c-5.86 11.3333-10.89 17.13-15.09 17.39-2.7333.1933-5.0667-2.0933-7-6.86-5.1-13.0933-10.5833-38.4033-16.45-75.93a8.56 8.56 0 0 1 1.56-6.73zM227.23 36.34a23.17 23.17 0 0 0-16-11.59 26.25 26.25 0 0 0-5.42-.58c-9.5867 0-17.41 5-23.47 15a53 53 0 0 0-7.78 28.16c0 7.7333 1.6167 14.3333 4.85 19.8a23.15 23.15 0 0 0 16 11.59 26.28 26.28 0 0 0 5.42.59c9.68 0 17.5033-5 23.47-15A53.89 53.89 0 0 0 232.08 56c0-7.7333-1.6167-14.2867-4.85-19.66zm-12.61 27.72c-1.3733 6.56-3.9167 11.5-7.63 14.82-2.9267 2.6667-5.6133 3.7433-8.06 3.23-2.4467-.5133-4.4033-2.6667-5.87-6.46a25.68 25.68 0 0 1-1.76-9.09 35.9 35.9 0 0 1 .73-7.34 33 33 0 0 1 5.28-11.88c3.3333-4.8933 6.8067-6.9467 10.42-6.16 2.44.4867 4.3933 2.64 5.86 6.46a25.68 25.68 0 0 1 1.76 9.12 35.73 35.73 0 0 1-.73 7.33v-.03zM164.57 36.34a23.2 23.2 0 0 0-16-11.59 26.42 26.42 0 0 0-5.43-.58c-9.5933 0-17.4167 5-23.47 15a53 53 0 0 0-7.78 28.16c0 7.7333 1.6133 14.3333 4.84 19.8a23.19 23.19 0 0 0 16 11.59 26.44 26.44 0 0 0 5.43.59c9.68 0 17.5033-5 23.47-15A53.88 53.88 0 0 0 169.4 56c0-7.7333-1.6133-14.2867-4.84-19.66h.01zm-12.61 27.72c-1.3667 6.56-3.91 11.5-7.63 14.82-2.93 2.64-5.63 3.72-8.07 3.23-2.44-.49-4.4-2.64-5.86-6.46a25.7 25.7 0 0 1-1.77-9.09 35.9 35.9 0 0 1 .74-7.34 33 33 0 0 1 5.28-11.88c3.3333-4.8933 6.8067-6.9467 10.42-6.16 2.44.4867 4.3933 2.64 5.86 6.46a25.91 25.91 0 0 1 1.76 9.12 35.73 35.73 0 0 1-.73 7.33v-.03z"}))})});r.d(t,"a",(function(){return c})),r.d(t,"b",(function(){return a})),r.d(t,"c",(function(){return i})),r.d(t,"d",(function(){return s})),r.d(t,"e",(function(){return l})),r.d(t,"f",(function(){return u})),r.d(t,"h",(function(){return d})),r.d(t,"g",(function(){return b})),r.d(t,"i",(function(){return p})),r.d(t,"j",(function(){return v}))},24:function(e,t,r){"use strict";r.d(t,"d",(function(){return b})),r.d(t,"b",(function(){return p})),r.d(t,"c",(function(){return h})),r.d(t,"a",(function(){return m}));var n=r(19),o=r.n(n),c=r(18),a=r(16),i=r.n(a),s=r(4),l=r(5);function u(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function d(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?u(r,!0).forEach((function(t){o()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):u(r).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var b=function(e){var t=e.selected,r=void 0===t?[]:t,n=e.search,o=void 0===n?"":n,a=e.queryArgs,u=function(e){var t=e.selected,r=void 0===t?[]:t,n=e.search,o=void 0===n?"":n,a=e.queryArgs,i=void 0===a?[]:a,s={per_page:l.IS_LARGE_CATALOG?100:-1,catalog_visibility:"any",status:"publish",search:o,orderby:"title",order:"asc"},u=[Object(c.addQueryArgs)(l.ENDPOINTS.products,d({},s,{},i))];return l.IS_LARGE_CATALOG&&r.length&&u.push(Object(c.addQueryArgs)(l.ENDPOINTS.products,{catalog_visibility:"any",status:"publish",include:r})),u}({selected:r,search:o,queryArgs:void 0===a?[]:a});return Promise.all(u.map((function(e){return i()({path:e})}))).then((function(e){return Object(s.uniqBy)(Object(s.flatten)(e),"id")}))},p=function(e){return i()({path:"".concat(l.ENDPOINTS.products,"/").concat(e)})},h=function(e){var t=e.selected,r=function(e){var t=e.selected,r=void 0===t?[]:t,n=e.search,o=[Object(c.addQueryArgs)("".concat(l.ENDPOINTS.products,"/tags"),{per_page:l.LIMIT_TAGS?100:-1,orderby:l.LIMIT_TAGS?"count":"name",order:l.LIMIT_TAGS?"desc":"asc",search:n})];return l.LIMIT_TAGS&&r.length&&o.push(Object(c.addQueryArgs)("".concat(l.ENDPOINTS.products,"/tags"),{include:r})),o}({selected:void 0===t?[]:t,search:e.search});return Promise.all(r.map((function(e){return i()({path:e})}))).then((function(e){return Object(s.uniqBy)(Object(s.flatten)(e),"id")}))},m=function(e){return i()({path:"".concat(l.ENDPOINTS.categories,"/").concat(e)})}},3:function(e,t){!function(){e.exports=this.wp.components}()},32:function(e,t){!function(){e.exports=this.wp.keycodes}()},38:function(e,t){!function(){e.exports=this.wp.escapeHtml}()},39:function(e,t,r){"use strict";r.d(t,"b",(function(){return s})),r.d(t,"c",(function(){return l})),r.d(t,"a",(function(){return u}));var n=r(16),o=r.n(n),c=r(6),a=r.n(c),i=r(5),s=function(e){if(i.ENABLE_REVIEW_RATING){if("lowest-rating"===e)return{order:"asc",orderby:"rating"};if("highest-rating"===e)return{order:"desc",orderby:"rating"}}return{order:"desc",orderby:"date_gmt"}},l=function(e){return o()({path:"/wc/blocks/products/reviews?"+Object.entries(e).map((function(e){return e.join("=")})).join("&"),parse:!1}).then((function(e){return e.json().then((function(t){return{reviews:t,totalReviews:parseInt(e.headers.get("x-wp-total"),10)}}))}))},u=function(e,t){var r=t.className,n=t.showReviewDate,o=t.showReviewerName,c=t.showReviewContent,i=t.showProductName,s=t.showReviewImage,l=t.showReviewRating;return a()(e,r,{"has-image":s,"has-name":o,"has-date":n,"has-rating":l,"has-content":c,"has-product-name":i})}},4:function(e,t){!function(){e.exports=this.lodash}()},43:function(e,t){!function(){e.exports=this.ReactDOM}()},46:function(e,t){!function(){e.exports=this.wp.viewport}()},5:function(e,t){!function(){e.exports=this.wc["wc-block-settings"]}()},50:function(e,t){!function(){e.exports=this.wp.hooks}()},51:function(e,t,r){"use strict";var n=r(0),o=r(1),c=(r(2),r(27)),a=r.n(c),i=r(6),s=r.n(i),l=r(38),u=r(3);t.a=function(e){var t,r,c=e.className,i=e.error,d=e.isLoading,b=e.onRetry;return Object(n.createElement)(u.Placeholder,{icon:Object(n.createElement)(a.a,{icon:"notice"}),label:Object(o.__)("Sorry, an error occurred","woo-gutenberg-products-block"),className:s()("wc-block-api-error",c)},Object(n.createElement)("div",{className:"wc-block-error__message"},(r=(t=i).apiMessage,t.message||(r?Object(n.createElement)("span",null,Object(o.__)("The following error was returned from the API","woo-gutenberg-products-block"),Object(n.createElement)("br",null),Object(n.createElement)("code",null,Object(l.escapeHTML)(r))):Object(o.__)("An unknown error occurred which prevented the block from being updated.","woo-gutenberg-products-block")))),b&&Object(n.createElement)(n.Fragment,null,d?Object(n.createElement)(u.Spinner,null):Object(n.createElement)(u.Button,{isDefault:!0,onClick:b},Object(o.__)("Retry","woo-gutenberg-products-block"))))}},52:function(e,t){!function(){e.exports=this.wp.htmlEntities}()},53:function(e,t){!function(){e.exports=this.wp.date}()},562:function(e,t,r){"use strict";r.r(t);var n=r(19),o=r.n(n),c=r(0),a=r(1),i=r(22),s=(r(80),r(15)),l=r.n(s),u=r(17),d=r(3),b=r(25),p=(r(2),r(102)),h=r(23),m=r(84),v=r(51),g=r(71),w=Object(g.b)((function(e){var t=e.error,r=e.getProduct,n=e.isLoading,o=e.product;if(t)return Object(c.createElement)(v.a,{className:"wc-block-featured-product-error",error:t,isLoading:n,onRetry:r});var i=!o||n?Object(c.createElement)(d.Spinner,null):Object(a.sprintf)(Object(a.__)("This block lists reviews for a selected product. %s doesn't have any reviews yet, but they will show up here when it does.","woo-gutenberg-products-block"),o.name);return Object(c.createElement)(d.Placeholder,{className:"wc-block-reviews-by-product",icon:Object(c.createElement)(h.h,{className:"block-editor-block-icon"}),label:Object(a.__)("Reviews by Product","woo-gutenberg-products-block")},i)})),f=r(61),O=Object(d.withSpokenMessages)((function(e){var t=e.attributes,r=e.debouncedSpeak,n=e.setAttributes,o=t.editMode,i=t.productId,s=function(e){var t=e.item,r=void 0===t?0:t;return Object(c.createElement)(b.b,l()({},e,{countLabel:Object(a.sprintf)(Object(a._n)("%d Review","%d Reviews",r.review_count,"woo-gutenberg-products-block"),r.review_count),showCount:!0,"aria-label":Object(a.sprintf)(Object(a._n)("%s, has %d review","%s, has %d reviews",r.review_count,"woo-gutenberg-products-block"),r.name,r.review_count)}))};return!i||o?Object(c.createElement)(d.Placeholder,{icon:Object(c.createElement)(h.h,{className:"block-editor-block-icon"}),label:Object(a.__)("Reviews by Product","woo-gutenberg-products-block")},Object(a.__)("Show reviews of your product to build trust","woo-gutenberg-products-block"),Object(c.createElement)("div",{className:"wc-block-reviews__selection"},Object(c.createElement)(p.a,{selected:t.productId||0,onChange:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=e[0]?e[0].id:0;n({productId:t})},queryArgs:{orderby:"comment_count",order:"desc"},renderItem:s}),Object(c.createElement)(d.Button,{isDefault:!0,onClick:function(){n({editMode:!1}),r(Object(a.__)("Showing Reviews by Product block preview.","woo-gutenberg-products-block"))}},Object(a.__)("Done","woo-gutenberg-products-block")))):Object(c.createElement)(c.Fragment,null,Object(f.a)(o,n),Object(c.createElement)(u.InspectorControls,{key:"inspector"},Object(c.createElement)(d.PanelBody,{title:Object(a.__)("Product","woo-gutenberg-products-block"),initialOpen:!1},Object(c.createElement)(p.a,{selected:t.productId||0,onChange:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=e[0]?e[0].id:0;n({productId:t})},renderItem:s})),Object(c.createElement)(d.PanelBody,{title:Object(a.__)("Content","woo-gutenberg-products-block")},Object(f.b)(t,n)),Object(c.createElement)(d.PanelBody,{title:Object(a.__)("List Settings","woo-gutenberg-products-block")},Object(f.c)(t,n))),Object(c.createElement)(m.a,{attributes:t,className:"wc-block-all-reviews",icon:Object(c.createElement)(h.h,{className:"block-editor-block-icon"}),name:Object(a.__)("Reviews by Product","woo-gutenberg-products-block"),noReviewsPlaceholder:w}))})),j=r(82),y=r(83);function _(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}Object(i.registerBlockType)("woocommerce/reviews-by-product",{title:Object(a.__)("Reviews by Product","woo-gutenberg-products-block"),icon:Object(c.createElement)(h.h,{fillColor:"#96588a"}),category:"woocommerce",keywords:[Object(a.__)("WooCommerce","woo-gutenberg-products-block")],description:Object(a.__)("Show reviews of your product to build trust.","woo-gutenberg-products-block"),attributes:function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?_(r,!0).forEach((function(t){o()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):_(r).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}({},j.a,{productId:{type:"number"}}),edit:function(e){return Object(c.createElement)(O,e)},save:y.a})},59:function(e,t){!function(){e.exports=this.wp.dom}()},61:function(e,t,r){"use strict";r.d(t,"a",(function(){return d})),r.d(t,"b",(function(){return b})),r.d(t,"c",(function(){return p}));var n=r(0),o=r(1),c=r(38),a=r(3),i=r(17),s=r(77),l=r(5),u=r(70),d=function(e,t){return Object(n.createElement)(i.BlockControls,null,Object(n.createElement)(a.Toolbar,{controls:[{icon:"edit",title:Object(o.__)("Edit","woo-gutenberg-products-block"),onClick:function(){return t({editMode:!e})},isActive:e}]}))},b=function(e,t){return Object(n.createElement)(n.Fragment,null,Object(n.createElement)(a.ToggleControl,{label:Object(o.__)("Product rating","woo-gutenberg-products-block"),checked:e.showReviewRating,onChange:function(){return t({showReviewRating:!e.showReviewRating})}}),e.showReviewRating&&!l.ENABLE_REVIEW_RATING&&Object(n.createElement)(a.Notice,{className:"wc-block-reviews__notice",isDismissible:!1},Object(n.createElement)(n.RawHTML,null,Object(o.sprintf)(Object(c.escapeHTML)(Object(o.__)("Product rating is disabled in your %sstore settings%s.","woo-gutenberg-products-block")),'<a href="'.concat(Object(s.a)("admin.php?page=wc-settings&tab=products"),'" target="_blank">'),"</a>"))),Object(n.createElement)(a.ToggleControl,{label:Object(o.__)("Reviewer name","woo-gutenberg-products-block"),checked:e.showReviewerName,onChange:function(){return t({showReviewerName:!e.showReviewerName})}}),Object(n.createElement)(a.ToggleControl,{label:Object(o.__)("Image","woo-gutenberg-products-block"),checked:e.showReviewImage,onChange:function(){return t({showReviewImage:!e.showReviewImage})}}),Object(n.createElement)(a.ToggleControl,{label:Object(o.__)("Review date","woo-gutenberg-products-block"),checked:e.showReviewDate,onChange:function(){return t({showReviewDate:!e.showReviewDate})}}),Object(n.createElement)(a.ToggleControl,{label:Object(o.__)("Review content","woo-gutenberg-products-block"),checked:e.showReviewContent,onChange:function(){return t({showReviewContent:!e.showReviewContent})}}),e.showReviewImage&&Object(n.createElement)(n.Fragment,null,Object(n.createElement)(u.a,{label:Object(o.__)("Review image","woo-gutenberg-products-block"),value:e.imageType,options:[{label:Object(o.__)("Reviewer photo","woo-gutenberg-products-block"),value:"reviewer"},{label:Object(o.__)("Product","woo-gutenberg-products-block"),value:"product"}],onChange:function(e){return t({imageType:e})}}),"reviewer"===e.imageType&&!l.SHOW_AVATARS&&Object(n.createElement)(a.Notice,{className:"wc-block-reviews__notice",isDismissible:!1},Object(n.createElement)(n.RawHTML,null,Object(o.sprintf)(Object(c.escapeHTML)(Object(o.__)("Reviewer photo is disabled in your %ssite settings%s.","woo-gutenberg-products-block")),'<a href="'.concat(Object(s.a)("options-discussion.php"),'" target="_blank">'),"</a>")))))},p=function(e,t){return Object(n.createElement)(n.Fragment,null,Object(n.createElement)(a.ToggleControl,{label:Object(o.__)("Order by","woo-gutenberg-products-block"),checked:e.showOrderby,onChange:function(){return t({showOrderby:!e.showOrderby})}}),Object(n.createElement)(a.SelectControl,{label:Object(o.__)("Order Product Reviews by","woo-gutenberg-products-block"),value:e.orderby,options:[{label:"Most recent",value:"most-recent"},{label:"Highest Rating",value:"highest-rating"},{label:"Lowest Rating",value:"lowest-rating"}],onChange:function(e){return t({orderby:e})}}),Object(n.createElement)(a.RangeControl,{label:Object(o.__)("Starting Number of Reviews","woo-gutenberg-products-block"),value:e.reviewsOnPageLoad,onChange:function(e){return t({reviewsOnPageLoad:e})},max:20,min:1}),Object(n.createElement)(a.ToggleControl,{label:Object(o.__)("Load more","woo-gutenberg-products-block"),checked:e.showLoadMore,onChange:function(){return t({showLoadMore:!e.showLoadMore})}}),e.showLoadMore&&Object(n.createElement)(a.RangeControl,{label:Object(o.__)("Load More Reviews","woo-gutenberg-products-block"),value:e.reviewsOnLoadMore,onChange:function(e){return t({reviewsOnLoadMore:e})},max:20,min:1}))}},62:function(e,t){},63:function(e,t){},64:function(e,t){},66:function(e,t){},67:function(e,t){},69:function(e,t,r){"use strict";var n=r(15),o=r.n(n),c=r(7),a=r.n(c),i=r(8),s=r.n(i),l=r(9),u=r.n(l),d=r(10),b=r.n(d),p=r(11),h=r.n(p),m=r(0),v=r(12),g=[];t.a=function(e){return function(t){function r(){return a()(this,r),u()(this,b()(r).apply(this,arguments))}return h()(r,t),s()(r,[{key:"generateUniqueID",value:function(){var e=r.name;return g[e]||(g[e]=0),g[e]++,g[e]}},{key:"render",value:function(){var t=this.generateUniqueID();return Object(m.createElement)(e,o()({},this.props,{componentId:t}))}}]),r}(v.Component)}},70:function(e,t,r){"use strict";var n=r(15),o=r.n(n),c=r(7),a=r.n(c),i=r(8),s=r.n(i),l=r(9),u=r.n(l),d=r(10),b=r.n(d),p=r(14),h=r.n(p),m=r(11),v=r.n(m),g=r(0),w=r(4),f=r(6),O=r.n(f),j=r(3),y=r(20),_=(r(136),function(e){function t(){var e;return a()(this,t),(e=u()(this,b()(t).apply(this,arguments))).onClick=e.onClick.bind(h()(e)),e}return v()(t,e),s()(t,[{key:"onClick",value:function(e){this.props.onChange&&this.props.onChange(e.target.value)}},{key:"render",value:function(){var e,t=this,r=this.props,n=r.label,c=r.checked,a=r.instanceId,i=r.className,s=r.help,l=r.options,u=r.value,d="inspector-toggle-button-control-".concat(a);return s&&(e=Object(w.isFunction)(s)?s(c):s),Object(g.createElement)(j.BaseControl,{id:d,help:e,className:O()("components-toggle-button-control",i)},Object(g.createElement)("label",{id:d+"__label",htmlFor:d,className:"components-toggle-button-control__label"},n),Object(g.createElement)(j.ButtonGroup,{"aria-labelledby":d+"__label"},l.map((function(e,r){var c={};return u===e.value?(c.isPrimary=!0,c["aria-pressed"]=!0):(c.isDefault=!0,c["aria-pressed"]=!1),Object(g.createElement)(j.Button,o()({key:"".concat(e.label,"-").concat(e.value,"-").concat(r),value:e.value,onClick:t.onClick,"aria-label":n+": "+e.label},c),e.label)}))))}}]),t}(g.Component));t.a=Object(y.withInstanceId)(_)},71:function(e,t,r){"use strict";var n=r(15),o=r.n(n),c=r(37),a=r.n(c),i=r(7),s=r.n(i),l=r(8),u=r.n(l),d=r(9),b=r.n(d),p=r(10),h=r.n(p),m=r(14),v=r.n(m),g=r(11),w=r.n(g),f=r(0),O=r(20),j=r(24),y=Object(O.createHigherOrderComponent)((function(e){return function(t){function r(){var e;return s()(this,r),(e=b()(this,h()(r).apply(this,arguments))).state={error:null,loading:!1,product:null},e.loadProduct=e.loadProduct.bind(v()(e)),e}return w()(r,t),u()(r,[{key:"componentDidMount",value:function(){this.loadProduct()}},{key:"componentDidUpdate",value:function(e){e.attributes.productId!==this.props.attributes.productId&&this.loadProduct()}},{key:"loadProduct",value:function(){var e=this,t=this.props.attributes.productId;t?(this.setState({loading:!0}),Object(j.b)(t).then((function(t){e.setState({product:t,loading:!1,error:null})})).catch((function(t){var r="object"===a()(t)&&t.hasOwnProperty("message")?{apiMessage:t.message}:{apiMessage:null};e.setState({product:null,loading:!1,error:r})}))):this.setState({product:null,loading:!1,error:null})}},{key:"render",value:function(){var t=this.state,r=t.error,n=t.loading,c=t.product;return Object(f.createElement)(e,o()({},this.props,{error:r,getProduct:this.loadProduct,isLoading:n,product:c}))}}]),r}(f.Component)}),"withProduct"),_=Object(O.createHigherOrderComponent)((function(e){return function(t){function r(){var e;return s()(this,r),(e=b()(this,h()(r).apply(this,arguments))).state={error:null,loading:!1,category:null},e.loadCategory=e.loadCategory.bind(v()(e)),e}return w()(r,t),u()(r,[{key:"componentDidMount",value:function(){this.loadCategory()}},{key:"componentDidUpdate",value:function(e){e.attributes.categoryId!==this.props.attributes.categoryId&&this.loadCategory()}},{key:"loadCategory",value:function(){var e=this,t=this.props.attributes.categoryId;t?(this.setState({loading:!0}),Object(j.a)(t).then((function(t){e.setState({category:t,loading:!1,error:null})})).catch((function(t){var r="object"===a()(t)&&t.hasOwnProperty("message")?{apiMessage:t.message}:{apiMessage:null};e.setState({category:null,loading:!1,error:r})}))):this.setState({category:null,loading:!1,error:null})}},{key:"render",value:function(){var t=this.state,r=t.error,n=t.loading,c=t.category;return Object(f.createElement)(e,o()({},this.props,{error:r,getCategory:this.loadCategory,isLoading:n,category:c}))}}]),r}(f.Component)}),"withCategory"),E=r(4),k=(r(2),r(5)),R=Object(O.createHigherOrderComponent)((function(e){var t=function(t){function r(){var e;return s()(this,r),(e=b()(this,h()(r).apply(this,arguments))).state={list:[],loading:!0},e.debouncedOnSearch=Object(E.debounce)(e.onSearch.bind(v()(e)),400),e}return w()(r,t),u()(r,[{key:"componentDidMount",value:function(){var e=this,t=this.props.selected;Object(j.d)({selected:t}).then((function(t){e.setState({list:t,loading:!1})})).catch((function(){e.setState({list:[],loading:!1})}))}},{key:"componentWillUnmount",value:function(){this.debouncedOnSearch.cancel()}},{key:"onSearch",value:function(e){var t=this,r=this.props.selected;Object(j.d)({selected:r,search:e}).then((function(e){t.setState({list:e,loading:!1})})).catch((function(){t.setState({list:[],loading:!1})}))}},{key:"render",value:function(){var t=this.state,r=t.list,n=t.loading,c=this.props.selected;return Object(f.createElement)(e,o()({},this.props,{products:r,isLoading:n,selected:r.filter((function(e){var t=e.id;return c.includes(t)})),onSearch:k.IS_LARGE_CATALOG?this.debouncedOnSearch:null}))}}]),r}(f.Component);return t.defaultProps={selected:[]},t}),"withSearchedProducts");r.d(t,"b",(function(){return y})),r.d(t,"a",(function(){return _})),r.d(t,"c",(function(){return R}))},80:function(e,t,r){var n=r(118);"string"==typeof n&&(n=[[e.i,n,""]]);var o={insert:"head",singleton:!1};r(34)(n,o);n.locals&&(e.exports=n.locals)},81:function(e,t){!function(){e.exports=this.wp.isShallowEqual}()},82:function(e,t,r){"use strict";t.a={editMode:{type:"boolean",default:!0},imageType:{type:"string",default:"reviewer"},orderby:{type:"string",default:"most-recent"},reviewsOnLoadMore:{type:"number",default:10},reviewsOnPageLoad:{type:"number",default:10},showLoadMore:{type:"boolean",default:!0},showOrderby:{type:"boolean",default:!0},showReviewDate:{type:"boolean",default:!0},showReviewerName:{type:"boolean",default:!0},showReviewImage:{type:"boolean",default:!0},showReviewRating:{type:"boolean",default:!0},showReviewContent:{type:"boolean",default:!0}}},83:function(e,t,r){"use strict";var n=r(15),o=r.n(n),c=r(0),a=(r(80),r(39));t.a=function(e){var t=e.attributes,r=t.categoryIds,n=t.imageType,i=t.orderby,s=t.productId,l={"data-image-type":n,"data-orderby":i,"data-reviews-on-page-load":t.reviewsOnPageLoad,"data-reviews-on-load-more":t.reviewsOnLoadMore,"data-show-load-more":t.showLoadMore,"data-show-orderby":t.showOrderby},u="wc-block-all-reviews";return s&&(l["data-product-id"]=s,u="wc-block-reviews-by-product"),Array.isArray(r)&&(l["data-category-ids"]=r.join(","),u="wc-block-reviews-by-category"),Object(c.createElement)("div",o()({className:Object(a.a)(u,t)},l))}},84:function(e,t,r){"use strict";var n=r(7),o=r.n(n),c=r(8),a=r.n(c),i=r(9),s=r.n(i),l=r(10),u=r.n(l),d=r(11),b=r.n(d),p=r(0),h=r(1),m=r(12),v=(r(2),r(4)),g=r(3),w=r(5),f=r(51),O=r(19),j=r.n(O),y=r(6),_=r.n(y);function E(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}var k=function(e){var t,r=e.label,n=e.screenReaderLabel,o=e.wrapperElement,c=e.wrapperProps;return!r&&n?(t=o||"span",c=function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?E(r,!0).forEach((function(t){j()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):E(r).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}({},c,{className:_()(c.className,"screen-reader-text")}),Object(p.createElement)(t,c,n)):(t=o||m.Fragment,r&&n&&r!==n?Object(p.createElement)(t,c,Object(p.createElement)("span",{"aria-hidden":!0},r),Object(p.createElement)("span",{className:"screen-reader-text"},n)):Object(p.createElement)(t,c,r))};k.defaultProps={wrapperProps:{}};var R=k,C=(r(179),function(e){var t=e.onClick,r=e.label,n=e.screenReaderLabel;return Object(p.createElement)("div",{className:"wp-block-button wc-block-load-more"},Object(p.createElement)("button",{className:"wp-block-button__link",onClick:t},Object(p.createElement)(R,{label:r,screenReaderLabel:n})))});C.defaultProps={label:Object(h.__)("Load more","woo-gutenberg-products-block")};var P=C,S=r(14),N=r.n(S),L=r(103),I=r.n(L),M=function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"...",n=I()(e,{suffix:r,limit:t});return n.html},x=function(e,t,r,n){var o=T(e,t,r);return M(e,o-n.length,n)},T=function(e,t,r){for(var n={start:0,middle:0,end:e.length};n.start<=n.end;)n.middle=Math.floor((n.start+n.end)/2),t.innerHTML=M(e,n.middle),n=A(n,t.clientHeight,r);return n.middle},A=function(e,t,r){return t<=r?e.start=e.middle+1:e.end=e.middle-1,e},D=function(e){function t(e){var r;return o()(this,t),(r=s()(this,u()(t).apply(this,arguments))).state={isExpanded:!1,clampEnabled:null,content:e.children,summary:"."},r.reviewSummary=Object(m.createRef)(),r.reviewContent=Object(m.createRef)(),r.getButton=r.getButton.bind(N()(r)),r.onClick=r.onClick.bind(N()(r)),r}return b()(t,e),a()(t,[{key:"componentDidMount",value:function(){if(this.props.children){var e=this.props,t=e.maxLines,r=e.ellipsis,n=(this.reviewSummary.current.clientHeight+1)*t+1,o=this.reviewContent.current.clientHeight+1>n;this.setState({clampEnabled:o}),o&&this.setState({summary:x(this.reviewContent.current.innerHTML,this.reviewSummary.current,n,r)})}}},{key:"getButton",value:function(){var e=this.state.isExpanded,t=this.props,r=t.className,n=t.lessText,o=t.moreText,c=e?n:o;if(c)return Object(p.createElement)("a",{href:"#more",className:r+"__read_more",onClick:this.onClick,"aria-expanded":!e,role:"button"},c)}},{key:"onClick",value:function(e){e.preventDefault();var t=this.state.isExpanded;this.setState({isExpanded:!t})}},{key:"render",value:function(){var e=this.props.className,t=this.state,r=t.content,n=t.summary,o=t.clampEnabled,c=t.isExpanded;return r?!1===o?Object(p.createElement)("div",{className:e},Object(p.createElement)("div",{ref:this.reviewContent},r)):Object(p.createElement)("div",{className:e},(!c||null===o)&&Object(p.createElement)("div",{ref:this.reviewSummary,"aria-hidden":c,dangerouslySetInnerHTML:{__html:n}}),(c||null===o)&&Object(p.createElement)("div",{ref:this.reviewContent,"aria-hidden":!c},r),this.getButton()):null}}]),t}(m.Component);D.defaultProps={maxLines:3,ellipsis:"…",moreText:Object(h.__)("Read more","woo-gutenberg-products-block"),lessText:Object(h.__)("Read less","woo-gutenberg-products-block"),className:"read-more-content"};var H=D;r(180);var z=function(e){var t=e.attributes,r=e.review,n=void 0===r?{}:r,o=t.imageType,c=t.showReviewDate,a=t.showReviewerName,i=t.showReviewImage,s=t.showReviewRating,l=t.showReviewContent,u=t.showProductName,d=n.rating,b=!Object.keys(n).length>0,m=Number.isFinite(d)&&s;return Object(p.createElement)("li",{className:_()("wc-block-review-list-item__item",{"is-loading":b}),"aria-hidden":b},(u||c||a||i||m)&&Object(p.createElement)("div",{className:"wc-block-review-list-item__info"},i&&function(e,t,r){return r||!e?Object(p.createElement)("div",{className:"wc-block-review-list-item__image",width:"48",height:"48"}):Object(p.createElement)("div",{className:"wc-block-review-list-item__image"},"product"===t?Object(p.createElement)("img",{"aria-hidden":"true",alt:"",src:e.product_picture||"",className:"wc-block-review-list-item__image",width:"48",height:"48"}):Object(p.createElement)("img",{"aria-hidden":"true",alt:"",src:e.reviewer_avatar_urls[48]||"",srcSet:e.reviewer_avatar_urls[96]+" 2x",className:"wc-block-review-list-item__image",width:"48",height:"48"}),e.verified&&Object(p.createElement)("div",{className:"wc-block-review-list-item__verified",title:Object(h.__)("Verified buyer","woo-gutenberg-products-block")},Object(h.__)("Verified buyer","woo-gutenberg-products-block")))}(n,o,b),(u||a||m||c)&&Object(p.createElement)("div",{className:"wc-block-review-list-item__meta"},m&&function(e){var t=e.rating,r={width:t/5*100+"%"};return Object(p.createElement)("div",{className:"wc-block-review-list-item__rating"},Object(p.createElement)("div",{className:"wc-block-review-list-item__rating__stars",role:"img"},Object(p.createElement)("span",{style:r},Object(h.sprintf)(Object(h.__)("Rated %d out of 5","woo-gutenberg-products-block"),t))))}(n),u&&function(e){return Object(p.createElement)("div",{className:"wc-block-review-list-item__product"},Object(p.createElement)("a",{href:e.product_permalink},e.product_name))}(n),a&&function(e){var t=e.reviewer,r=void 0===t?"":t;return Object(p.createElement)("div",{className:"wc-block-review-list-item__author"},r)}(n),c&&function(e){var t=e.date_created,r=e.formatted_date_created;return Object(p.createElement)("time",{className:"wc-block-review-list-item__published-date",dateTime:t},r)}(n))),l&&function(e){return Object(p.createElement)(H,{maxLines:10,moreText:Object(h.__)("Read full review","woo-gutenberg-products-block"),lessText:Object(h.__)("Hide full review","woo-gutenberg-products-block"),className:"wc-block-review-list-item__text"},Object(p.createElement)("div",{dangerouslySetInnerHTML:{__html:e.review||""}}))}(n))};r(181);function B(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}var V=function(e){var t=e.attributes,r=e.reviews,n=function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?B(r,!0).forEach((function(t){j()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):B(r).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}({},t,{showReviewImage:(w.SHOW_AVATARS||"product"===t.imageType)&&t.showReviewImage,showReviewRating:w.ENABLE_REVIEW_RATING&&t.showReviewRating});return Object(p.createElement)("ul",{className:"wc-block-review-list"},0===r.length?Object(p.createElement)(z,{attributes:n}):r.map((function(e,t){return Object(p.createElement)(z,{key:e.id||t,attributes:n,review:e})})))},G=r(69),F=(r(182),Object(G.a)((function(e){var t=e.className,r=e.componentId,n=e.defaultValue,o=e.label,c=e.onChange,a=e.options,i=e.screenReaderLabel,s=e.readOnly,l=e.value,u="wc-block-order-select__select-".concat(r);return Object(p.createElement)("p",{className:_()("wc-block-order-select",t)},Object(p.createElement)(R,{label:o,screenReaderLabel:i,wrapperElement:"label",wrapperProps:{className:"wc-block-order-select__label",htmlFor:u}}),Object(p.createElement)("select",{id:u,className:"wc-block-order-select__select",defaultValue:n,onChange:c,readOnly:s,value:l},a.map((function(e){return Object(p.createElement)("option",{key:e.key,value:e.key},e.label)}))))}))),q=(r(183),function(e){var t=e.defaultValue,r=e.onChange,n=e.readOnly,o=e.value;return Object(p.createElement)(F,{className:"wc-block-review-order-select",defaultValue:t,label:Object(h.__)("Order by","woo-gutenberg-products-block"),onChange:r,options:[{key:"most-recent",label:Object(h.__)("Most recent","woo-gutenberg-products-block")},{key:"highest-rating",label:Object(h.__)("Highest rating","woo-gutenberg-products-block")},{key:"lowest-rating",label:Object(h.__)("Lowest rating","woo-gutenberg-products-block")}],readOnly:n,screenReaderLabel:Object(h.__)("Order reviews by","woo-gutenberg-products-block"),value:o})}),W=r(15),U=r.n(W),Q=r(37),Z=r.n(Q),J=r(81),Y=r.n(J),$=r(39),K=function(e){var t=function(t){function r(){var e;return o()(this,r),(e=s()(this,u()(r).apply(this,arguments))).state={error:null,loading:!0,reviews:[],totalReviews:0},e.setError=e.setError.bind(N()(e)),e.delayedAppendReviews=e.props.delayFunction(e.appendReviews),e}return b()(r,t),a()(r,[{key:"componentDidMount",value:function(){this.replaceReviews()}},{key:"componentDidUpdate",value:function(e){e.reviewsToDisplay<this.props.reviewsToDisplay?this.delayedAppendReviews():this.shouldReplaceReviews(e,this.props)&&this.replaceReviews()}},{key:"shouldReplaceReviews",value:function(e,t){return e.orderby!==t.orderby||e.order!==t.order||e.productId!==t.productId||!Y()(e.categoryIds,t.categoryIds)}},{key:"componentWillUnMount",value:function(){this.delayedAppendReviews.cancel&&this.delayedAppendReviews.cancel()}},{key:"getArgs",value:function(e){var t=this.props,r=t.categoryIds,n=t.order,o=t.orderby,c=t.productId,a={order:n,orderby:o,per_page:t.reviewsToDisplay-e,offset:e};return r&&r.length&&(a.category_id=Array.isArray(r)?r.join(","):r),c&&(a.product_id=c),a}},{key:"replaceReviews",value:function(){var e=this.props.onReviewsReplaced;this.updateListOfReviews().then(e)}},{key:"appendReviews",value:function(){var e=this.props,t=e.onReviewsAppended,r=e.reviewsToDisplay,n=this.state.reviews;r<=n.length||this.updateListOfReviews(n).then(t)}},{key:"updateListOfReviews",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],r=this.props.reviewsToDisplay,n=this.state.totalReviews,o=Math.min(n,r)-t.length;return this.setState({loading:!0,reviews:t.concat(Array(o).fill({}))}),Object($.c)(this.getArgs(t.length)).then((function(r){var n=r.reviews,o=r.totalReviews;return e.setState({reviews:t.filter((function(e){return Object.keys(e).length})).concat(n),totalReviews:o,loading:!1,error:null}),{newReviews:n}})).catch(this.setError)}},{key:"setError",value:function(e){var t=this;e.json().then((function(e){var r=t.props.onReviewsLoadError,n="object"===Z()(e)&&e.hasOwnProperty("message")?{apiMessage:e.message}:{apiMessage:null};t.setState({reviews:[],loading:!1,error:n}),r()}))}},{key:"render",value:function(){var t=this.props.reviewsToDisplay,r=this.state,n=r.error,o=r.loading,c=r.reviews,a=r.totalReviews;return Object(p.createElement)(e,U()({},this.props,{error:n,isLoading:o,reviews:c.slice(0,t),totalReviews:a}))}}]),r}(m.Component);t.defaultProps={delayFunction:function(e){return e},onReviewsAppended:function(){},onReviewsLoadError:function(){},onReviewsReplaced:function(){}};var r=e.displayName,n=void 0===r?e.name||"Component":r;return t.displayName="WithReviews( ".concat(n," )"),t}(function(e){function t(){return o()(this,t),s()(this,u()(t).apply(this,arguments))}return b()(t,e),a()(t,[{key:"render",value:function(){var e=this.props,t=e.attributes,r=e.error,n=e.isLoading,o=e.noReviewsPlaceholder,c=e.reviews,a=e.totalReviews;return r?Object(p.createElement)(f.a,{className:"wc-block-featured-product-error",error:r,isLoading:n}):0!==c.length||n?Object(p.createElement)(g.Disabled,null,t.showOrderby&&w.ENABLE_REVIEW_RATING&&Object(p.createElement)(q,{readOnly:!0,value:t.orderby}),Object(p.createElement)(V,{attributes:t,reviews:c}),t.showLoadMore&&a>c.length&&Object(p.createElement)(P,{screenReaderLabel:Object(h.__)("Load more reviews","woo-gutenberg-products-block")})):Object(p.createElement)(o,{attributes:t})}}]),t}(m.Component)),X=function(e){function t(){return o()(this,t),s()(this,u()(t).apply(this,arguments))}return b()(t,e),a()(t,[{key:"renderHiddenContentPlaceholder",value:function(){var e=this.props,t=e.icon,r=e.name;return Object(p.createElement)(g.Placeholder,{icon:t,label:r},Object(h.__)("The content for this block is hidden due to block settings.","woo-gutenberg-products-block"))}},{key:"render",value:function(){var e=this.props,t=e.attributes,r=e.className,n=e.noReviewsPlaceholder,o=t.categoryIds,c=t.productId,a=t.reviewsOnPageLoad,i=t.showProductName,s=t.showReviewDate,l=t.showReviewerName,u=t.showReviewContent,d=t.showReviewImage,b=t.showReviewRating,h=Object($.b)(t.orderby),m=h.order,g=h.orderby;return!(u||b||s||l||d||i)?this.renderHiddenContentPlaceholder():Object(p.createElement)("div",{className:Object($.a)(r,t)},Object(p.createElement)(K,{attributes:t,categoryIds:o,delayFunction:function(e){return Object(v.debounce)(e,400)},noReviewsPlaceholder:n,orderby:g,order:m,productId:c,reviewsToDisplay:a}))}}]),t}(m.Component);t.a=X}});
|
build/reviews-frontend.js
CHANGED
@@ -3,4 +3,4 @@
|
|
3 |
Copyright (c) 2017 Jed Watson.
|
4 |
Licensed under the MIT License (MIT), see
|
5 |
http://jedwatson.github.io/classnames
|
6 |
-
*/!function(){"use strict";var r={}.hasOwnProperty;function o(){for(var e=[],t=0;t<arguments.length;t++){var n=arguments[t];if(n){var i=typeof n;if("string"===i||"number"===i)e.push(n);else if(Array.isArray(n)&&n.length){var a=o.apply(null,n);a&&e.push(a)}else if("object"===i)for(var s in n)r.call(n,s)&&n[s]&&e.push(s)}}return e.join(" ")}e.exports?(o.default=o,e.exports=o):void 0===(n=function(){return o}.apply(t,[]))||(e.exports=n)}()},function(e,t,r){e.exports=r(25)()},function(e,t){e.exports=function(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}},function(e,t){function r(){return e.exports=r=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},r.apply(this,arguments)}e.exports=r},function(e,t){function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function n(t){return"function"==typeof Symbol&&"symbol"===r(Symbol.iterator)?e.exports=n=function(e){return r(e)}:e.exports=n=function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":r(e)},n(t)}e.exports=n},function(e,t){!function(){e.exports=this.ReactDOM}()},function(e,t,r){"use strict";var n=r(12),o=r.n(n),i=r(3),a=r.n(i),s=r(4),c=r.n(s),l=r(5),u=r.n(l),p=r(6),d=r.n(p),f=r(7),v=r.n(f),b=r(1),w=[];t.a=function(e){return function(t){function r(){return a()(this,r),u()(this,d()(r).apply(this,arguments))}return v()(r,t),c()(r,[{key:"generateUniqueID",value:function(){var e=r.name;return w[e]||(w[e]=0),w[e]++,w[e]}},{key:"render",value:function(){var t=this.generateUniqueID();return React.createElement(e,o()({},this.props,{componentId:t}))}}]),r}(b.Component)}},function(e,t){!function(){e.exports=this.wp.a11y}()},function(e,t){function r(t,n){return e.exports=r=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},r(t,n)}e.exports=r},,function(e,t){!function(){e.exports=this.wp.apiFetch}()},function(e,t,r){function n(e){for(var t,r,n=[],o=0;o<rowCut.length;o++)(t=rowCut.substring(o).match(/^&[a-z0-9#]+;/))?(r=t[0],n.push(r),o+=r.length-1):n.push(rowCut[o]);return n}e.exports&&(e.exports=function(e,t){for(var r,o,i,a,s,c=(t=t||{}).limit||100,l=void 0===t.preserveTags||t.preserveTags,u=void 0!==t.wordBreak&&t.wordBreak,p=t.suffix||"...",d=t.moreLink||"",f=t.moreText||"»",v=t.preserveWhiteSpace||!1,b=e.replace(/</g,"\n<").replace(/>/g,">\n").replace(/\n\n/g,"\n").replace(/^\n/g,"").replace(/\n$/g,"").split("\n"),w=0,m=[],h=!1,y=0;y<b.length;y++)if(r=b[y],rowCut=v?r:r.replace(/[ ]+/g," "),r.length){var g=n(rowCut);if("<"!==r[0])if(w>=c)r="";else if(w+g.length>=c){if(" "===g[(o=c-w)-1])for(;o&&" "===g[(o-=1)-1];);else i=g.slice(o).indexOf(" "),u||(-1!==i?o+=i:o=r.length);r=g.slice(0,o).join("")+p,d&&(r+='<a href="'+d+'" style="display:inline">'+f+"</a>"),w=c,h=!0}else w+=g.length;else if(l){if(w>=c)if(s=(a=r.match(/[a-zA-Z]+/))?a[0]:"")if("</"!==r.substring(0,2))m.push(s),r="";else{for(;m[m.length-1]!==s&&m.length;)m.pop();m.length&&(r=""),m.pop()}else r=""}else r="";b[y]=r}return{html:b.join("\n").replace(/\n/g,""),more:h}})},function(e,t){!function(){e.exports=this.wp.isShallowEqual}()},,,,function(e,t,r){"use strict";var n=r(26);function o(){}function i(){}i.resetWarningCache=o,e.exports=function(){function e(e,t,r,o,i,a){if(a!==n){var s=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw s.name="Invariant Violation",s}}function t(){return e}e.isRequired=e;var r={array:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:i,resetWarningCache:o};return r.PropTypes=r,r}},function(e,t,r){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t,r){"use strict";r.r(t);var n=r(11),o=r.n(n),i=r(14),a=r(3),s=r.n(a),c=r(4),l=r.n(c),u=r(5),p=r.n(u),d=r(6),f=r.n(d),v=r(2),b=r.n(v),w=r(7),m=r.n(w),h=r(0),y=r(16),g=r(1),R=r.n(g),O=(r(10),r(19)),_=r.n(O),k=r(9),E=r.n(k),j=r(8),x=function(e){return _()({path:"/wc/blocks/products/reviews?"+Object.entries(e).map(function(e){return e.join("=")}).join("&"),parse:!1}).then(function(e){return e.json().then(function(t){return{reviews:t,totalReviews:parseInt(e.headers.get("x-wp-total"),10)}})})};function P(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}var T=function(e){var t,r=e.label,n=e.screenReaderLabel,i=e.wrapperElement,a=e.wrapperProps;return!r&&n?(t=i||"span",a=function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?P(r,!0).forEach(function(t){o()(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):P(r).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}({},a,{className:E()(a.className,"screen-reader-text")}),React.createElement(t,a,n)):(t=i||g.Fragment,r&&n&&r!==n?React.createElement(t,a,React.createElement("span",{"aria-hidden":!0},r),React.createElement("span",{className:"screen-reader-text"},n)):React.createElement(t,a,r))};T.defaultProps={wrapperProps:{}};var S=T,N=(r(27),function(e){var t=e.onClick,r=e.label,n=e.screenReaderLabel;return React.createElement("div",{className:"wp-block-button wc-block-load-more"},React.createElement("button",{className:"wp-block-button__link",onClick:t},React.createElement(S,{label:r,screenReaderLabel:n})))});N.defaultProps={label:Object(h.__)("Load more","woo-gutenberg-products-block")};var L=N,C=r(15),A=(r(28),Object(C.a)(function(e){var t=e.className,r=e.componentId,n=e.defaultValue,o=e.label,i=e.onChange,a=e.options,s=e.screenReaderLabel,c=e.readOnly,l=e.value,u="wc-block-order-select__select-".concat(r);return React.createElement("p",{className:E()("wc-block-order-select",t)},React.createElement(S,{label:o,screenReaderLabel:s,wrapperElement:"label",wrapperProps:{className:"wc-block-order-select__label",htmlFor:u}}),React.createElement("select",{id:u,className:"wc-block-order-select__select",defaultValue:n,onChange:i,readOnly:c,value:l},a.map(function(e){return React.createElement("option",{key:e.key,value:e.key},e.label)})))})),D=(r(29),function(e){var t=e.defaultValue,r=e.onChange,n=e.readOnly,o=e.value;return React.createElement(A,{className:"wc-block-review-order-select",defaultValue:t,label:Object(h.__)("Order by","woo-gutenberg-products-block"),onChange:r,options:[{key:"most-recent",label:Object(h.__)("Most recent","woo-gutenberg-products-block")},{key:"highest-rating",label:Object(h.__)("Highest rating","woo-gutenberg-products-block")},{key:"lowest-rating",label:Object(h.__)("Lowest rating","woo-gutenberg-products-block")}],readOnly:n,screenReaderLabel:Object(h.__)("Order reviews by","woo-gutenberg-products-block"),value:o})}),I=r(20),M=r.n(I),V=function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"...",n=M()(e,{suffix:r,limit:t});return n.html},H=function(e,t,r,n){var o=B(e,t,r);return V(e,o-n.length,n)},B=function(e,t,r){for(var n={start:0,middle:0,end:e.length};n.start<=n.end;)n.middle=Math.floor((n.start+n.end)/2),t.innerHTML=V(e,n.middle),n=W(n,t.clientHeight,r);return n.middle},W=function(e,t,r){return t<=r?e.start=e.middle+1:e.end=e.middle-1,e},F=function(e){function t(e){var r;return s()(this,t),(r=p()(this,f()(t).apply(this,arguments))).state={isExpanded:!1,clampEnabled:null,content:e.children,summary:"."},r.reviewSummary=Object(g.createRef)(),r.reviewContent=Object(g.createRef)(),r.getButton=r.getButton.bind(b()(r)),r.onClick=r.onClick.bind(b()(r)),r}return m()(t,e),l()(t,[{key:"componentDidMount",value:function(){if(this.props.children){var e=this.props,t=e.maxLines,r=e.ellipsis,n=(this.reviewSummary.current.clientHeight+1)*t+1,o=this.reviewContent.current.clientHeight+1>n;this.setState({clampEnabled:o}),o&&this.setState({summary:H(this.reviewContent.current.innerHTML,this.reviewSummary.current,n,r)})}}},{key:"getButton",value:function(){var e=this.state.isExpanded,t=this.props,r=t.className,n=t.lessText,o=t.moreText,i=e?n:o;if(i)return R.a.createElement("a",{href:"#more",className:r+"__read_more",onClick:this.onClick,"aria-expanded":!e,role:"button"},i)}},{key:"onClick",value:function(e){e.preventDefault();var t=this.state.isExpanded;this.setState({isExpanded:!t})}},{key:"render",value:function(){var e=this.props.className,t=this.state,r=t.content,n=t.summary,o=t.clampEnabled,i=t.isExpanded;return r?!1===o?R.a.createElement("div",{className:e},R.a.createElement("div",{ref:this.reviewContent},r)):R.a.createElement("div",{className:e},(!i||null===o)&&R.a.createElement("div",{ref:this.reviewSummary,"aria-hidden":i,dangerouslySetInnerHTML:{__html:n}}),(i||null===o)&&R.a.createElement("div",{ref:this.reviewContent,"aria-hidden":!i},r),this.getButton()):null}}]),t}(g.Component);F.defaultProps={maxLines:3,ellipsis:"…",moreText:Object(h.__)("Read more","woo-gutenberg-products-block"),lessText:Object(h.__)("Read less","woo-gutenberg-products-block"),className:"read-more-content"};var U=F;r(30);var q=function(e){var t=e.attributes,r=e.review,n=void 0===r?{}:r,o=t.imageType,i=t.showReviewDate,a=t.showReviewerName,s=t.showReviewImage,c=t.showReviewRating,l=t.showReviewContent,u=t.showProductName,p=n.rating,d=!Object.keys(n).length>0,f=Number.isFinite(p)&&c;return React.createElement("li",{className:E()("wc-block-review-list-item__item",{"is-loading":d}),"aria-hidden":d},(u||i||a||s||f)&&React.createElement("div",{className:"wc-block-review-list-item__info"},s&&function(e,t,r){return r||!e?React.createElement("div",{className:"wc-block-review-list-item__image",width:"48",height:"48"}):React.createElement("div",{className:"wc-block-review-list-item__image"},"product"===t?React.createElement("img",{"aria-hidden":"true",alt:"",src:e.product_picture||"",className:"wc-block-review-list-item__image",width:"48",height:"48"}):React.createElement("img",{"aria-hidden":"true",alt:"",src:e.reviewer_avatar_urls[48]||"",srcSet:e.reviewer_avatar_urls[96]+" 2x",className:"wc-block-review-list-item__image",width:"48",height:"48"}),e.verified&&React.createElement("div",{className:"wc-block-review-list-item__verified",title:Object(h.__)("Verified buyer","woo-gutenberg-products-block")},Object(h.__)("Verified buyer","woo-gutenberg-products-block")))}(n,o,d),(u||a||f||i)&&React.createElement("div",{className:"wc-block-review-list-item__meta"},f&&function(e){var t=e.rating,r={width:t/5*100+"%"};return React.createElement("div",{className:"wc-block-review-list-item__rating"},React.createElement("div",{className:"wc-block-review-list-item__rating__stars",role:"img"},React.createElement("span",{style:r},Object(h.sprintf)(Object(h.__)("Rated %d out of 5","woo-gutenberg-products-block"),t))))}(n),u&&function(e){return React.createElement("div",{className:"wc-block-review-list-item__product"},React.createElement("a",{href:e.product_permalink},e.product_name))}(n),a&&function(e){var t=e.reviewer,r=void 0===t?"":t;return React.createElement("div",{className:"wc-block-review-list-item__author"},r)}(n),i&&function(e){var t=e.date_created,r=e.formatted_date_created;return React.createElement("time",{className:"wc-block-review-list-item__published-date",dateTime:t},r)}(n))),l&&function(e){return React.createElement(U,{maxLines:10,moreText:Object(h.__)("Read full review","woo-gutenberg-products-block"),lessText:Object(h.__)("Hide full review","woo-gutenberg-products-block"),className:"wc-block-review-list-item__text"},React.createElement("div",{dangerouslySetInnerHTML:{__html:e.review||""}}))}(n))};r(31);function G(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}var z=function(e){var t=e.attributes,r=e.reviews,n=function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?G(r,!0).forEach(function(t){o()(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):G(r).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}({},t,{showReviewImage:(j.SHOW_AVATARS||"product"===t.imageType)&&t.showReviewImage,showReviewRating:j.ENABLE_REVIEW_RATING&&t.showReviewRating});return React.createElement("ul",{className:"wc-block-review-list"},0===r.length?React.createElement(q,{attributes:n}):r.map(function(e,t){return React.createElement(q,{key:e.id||t,attributes:n,review:e})}))},Y=r(12),Z=r.n(Y),$=r(13),J=r.n($),K=r(21),Q=r.n(K),X=function(e){var t=function(t){function r(){var e;return s()(this,r),(e=p()(this,f()(r).apply(this,arguments))).state={error:null,loading:!0,reviews:[],totalReviews:0},e.setError=e.setError.bind(b()(e)),e.delayedAppendReviews=e.props.delayFunction(e.appendReviews),e}return m()(r,t),l()(r,[{key:"componentDidMount",value:function(){this.replaceReviews()}},{key:"componentDidUpdate",value:function(e){e.reviewsToDisplay<this.props.reviewsToDisplay?this.delayedAppendReviews():this.shouldReplaceReviews(e,this.props)&&this.replaceReviews()}},{key:"shouldReplaceReviews",value:function(e,t){return e.orderby!==t.orderby||e.order!==t.order||e.productId!==t.productId||!Q()(e.categoryIds,t.categoryIds)}},{key:"componentWillUnMount",value:function(){this.delayedAppendReviews.cancel&&this.delayedAppendReviews.cancel()}},{key:"getArgs",value:function(e){var t=this.props,r=t.categoryIds,n=t.order,o=t.orderby,i=t.productId,a={order:n,orderby:o,per_page:t.reviewsToDisplay-e,offset:e};return r&&r.length&&(a.category_id=Array.isArray(r)?r.join(","):r),i&&(a.product_id=i),a}},{key:"replaceReviews",value:function(){var e=this.props.onReviewsReplaced;this.updateListOfReviews().then(e)}},{key:"appendReviews",value:function(){var e=this.props,t=e.onReviewsAppended,r=e.reviewsToDisplay,n=this.state.reviews;r<=n.length||this.updateListOfReviews(n).then(t)}},{key:"updateListOfReviews",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],r=this.props.reviewsToDisplay,n=this.state.totalReviews,o=Math.min(n,r)-t.length;return this.setState({loading:!0,reviews:t.concat(Array(o).fill({}))}),x(this.getArgs(t.length)).then(function(r){var n=r.reviews,o=r.totalReviews;return e.setState({reviews:t.filter(function(e){return Object.keys(e).length}).concat(n),totalReviews:o,loading:!1,error:null}),{newReviews:n}}).catch(this.setError)}},{key:"setError",value:function(e){var t=this;e.json().then(function(e){var r=t.props.onReviewsLoadError,n="object"===J()(e)&&e.hasOwnProperty("message")?{apiMessage:e.message}:{apiMessage:null};t.setState({reviews:[],loading:!1,error:n}),r()})}},{key:"render",value:function(){var t=this.props.reviewsToDisplay,r=this.state,n=r.error,o=r.loading,i=r.reviews,a=r.totalReviews;return React.createElement(e,Z()({},this.props,{error:n,isLoading:o,reviews:i.slice(0,t),totalReviews:a}))}}]),r}(g.Component);t.defaultProps={delayFunction:function(e){return e},onReviewsAppended:function(){},onReviewsLoadError:function(){},onReviewsReplaced:function(){}};var r=e.displayName,n=void 0===r?e.name||"Component":r;return t.displayName="WithReviews( ".concat(n," )"),t}(function(e){var t=e.attributes,r=e.onAppendReviews,n=e.onChangeOrderby,o=e.reviews,i=e.totalReviews,a=t.orderby;return 0===o.length?null:React.createElement(g.Fragment,null,"false"!==t.showOrderby&&j.ENABLE_REVIEW_RATING&&React.createElement(D,{defaultValue:a,onChange:n}),React.createElement(z,{attributes:t,reviews:o}),"false"!==t.showLoadMore&&i>o.length&&React.createElement(L,{onClick:r,screenReaderLabel:Object(h.__)("Load more reviews","woo-gutenberg-products-block")}))}),ee=function(e){function t(){var e;s()(this,t);var r=(e=p()(this,f()(t).apply(this,arguments))).props.attributes;return e.state={orderby:r.orderby,reviewsToDisplay:parseInt(r.reviewsOnPageLoad,10)},e.onAppendReviews=e.onAppendReviews.bind(b()(e)),e.onChangeOrderby=e.onChangeOrderby.bind(b()(e)),e}return m()(t,e),l()(t,[{key:"onAppendReviews",value:function(){var e=this.props.attributes,t=this.state.reviewsToDisplay;this.setState({reviewsToDisplay:t+parseInt(e.reviewsOnLoadMore,10)})}},{key:"onChangeOrderby",value:function(e){var t=this.props.attributes;this.setState({orderby:e.target.value,reviewsToDisplay:parseInt(t.reviewsOnPageLoad,10)})}},{key:"onReviewsAppended",value:function(e){var t=e.newReviews;Object(y.speak)(Object(h.sprintf)(Object(h._n)("%d review loaded.","%d reviews loaded.",t.length,"woo-gutenberg-products-block"),t.length))}},{key:"onReviewsReplaced",value:function(){Object(y.speak)(Object(h.__)("Reviews list updated.","woo-gutenberg-products-block"))}},{key:"onReviewsLoadError",value:function(){Object(y.speak)(Object(h.__)("There was an error loading the reviews.","woo-gutenberg-products-block"))}},{key:"render",value:function(){var e=this.props.attributes,t=e.categoryIds,r=e.productId,n=this.state.reviewsToDisplay,o=function(e){if(j.ENABLE_REVIEW_RATING){if("lowest-rating"===e)return{order:"asc",orderby:"rating"};if("highest-rating"===e)return{order:"desc",orderby:"rating"}}return{order:"desc",orderby:"date_gmt"}}(this.state.orderby),i=o.order,a=o.orderby;return React.createElement(X,{attributes:e,categoryIds:t,onAppendReviews:this.onAppendReviews,onChangeOrderby:this.onChangeOrderby,onReviewsAppended:this.onReviewsAppended,onReviewsLoadError:this.onReviewsLoadError,onReviewsReplaced:this.onReviewsReplaced,order:i,orderby:a,productId:r,reviewsToDisplay:n})}}]),t}(g.Component);function te(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}var re=document.querySelectorAll("\n\t.wp-block-woocommerce-all-reviews,\n\t.wp-block-woocommerce-reviews-by-product,\n\t.wp-block-woocommerce-reviews-by-category\n");re.length&&Array.prototype.forEach.call(re,function(e){var t=function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?te(r,!0).forEach(function(t){o()(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):te(r).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}({},e.dataset,{showReviewDate:e.classList.contains("has-date"),showReviewerName:e.classList.contains("has-name"),showReviewImage:e.classList.contains("has-image"),showReviewRating:e.classList.contains("has-rating"),showReviewContent:e.classList.contains("has-content"),showProductName:e.classList.contains("has-product-name")});Object(i.render)(React.createElement(ee,{attributes:t}),e)})}]);
|
3 |
Copyright (c) 2017 Jed Watson.
|
4 |
Licensed under the MIT License (MIT), see
|
5 |
http://jedwatson.github.io/classnames
|
6 |
+
*/!function(){"use strict";var r={}.hasOwnProperty;function o(){for(var e=[],t=0;t<arguments.length;t++){var n=arguments[t];if(n){var i=typeof n;if("string"===i||"number"===i)e.push(n);else if(Array.isArray(n)&&n.length){var a=o.apply(null,n);a&&e.push(a)}else if("object"===i)for(var s in n)r.call(n,s)&&n[s]&&e.push(s)}}return e.join(" ")}e.exports?(o.default=o,e.exports=o):void 0===(n=function(){return o}.apply(t,[]))||(e.exports=n)}()},function(e,t,r){e.exports=r(25)()},function(e,t){e.exports=function(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}},function(e,t){function r(){return e.exports=r=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},r.apply(this,arguments)}e.exports=r},function(e,t){function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function n(t){return"function"==typeof Symbol&&"symbol"===r(Symbol.iterator)?e.exports=n=function(e){return r(e)}:e.exports=n=function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":r(e)},n(t)}e.exports=n},function(e,t){!function(){e.exports=this.ReactDOM}()},function(e,t,r){"use strict";var n=r(12),o=r.n(n),i=r(3),a=r.n(i),s=r(4),c=r.n(s),l=r(5),u=r.n(l),p=r(6),d=r.n(p),f=r(7),v=r.n(f),b=r(1),w=[];t.a=function(e){return function(t){function r(){return a()(this,r),u()(this,d()(r).apply(this,arguments))}return v()(r,t),c()(r,[{key:"generateUniqueID",value:function(){var e=r.name;return w[e]||(w[e]=0),w[e]++,w[e]}},{key:"render",value:function(){var t=this.generateUniqueID();return React.createElement(e,o()({},this.props,{componentId:t}))}}]),r}(b.Component)}},function(e,t){!function(){e.exports=this.wp.a11y}()},function(e,t){function r(t,n){return e.exports=r=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},r(t,n)}e.exports=r},,function(e,t){!function(){e.exports=this.wp.apiFetch}()},function(e,t,r){function n(e){for(var t,r,n=[],o=0;o<rowCut.length;o++)(t=rowCut.substring(o).match(/^&[a-z0-9#]+;/))?(r=t[0],n.push(r),o+=r.length-1):n.push(rowCut[o]);return n}e.exports&&(e.exports=function(e,t){for(var r,o,i,a,s,c=(t=t||{}).limit||100,l=void 0===t.preserveTags||t.preserveTags,u=void 0!==t.wordBreak&&t.wordBreak,p=t.suffix||"...",d=t.moreLink||"",f=t.moreText||"»",v=t.preserveWhiteSpace||!1,b=e.replace(/</g,"\n<").replace(/>/g,">\n").replace(/\n\n/g,"\n").replace(/^\n/g,"").replace(/\n$/g,"").split("\n"),w=0,m=[],h=!1,y=0;y<b.length;y++)if(r=b[y],rowCut=v?r:r.replace(/[ ]+/g," "),r.length){var g=n(rowCut);if("<"!==r[0])if(w>=c)r="";else if(w+g.length>=c){if(" "===g[(o=c-w)-1])for(;o&&" "===g[(o-=1)-1];);else i=g.slice(o).indexOf(" "),u||(-1!==i?o+=i:o=r.length);r=g.slice(0,o).join("")+p,d&&(r+='<a href="'+d+'" style="display:inline">'+f+"</a>"),w=c,h=!0}else w+=g.length;else if(l){if(w>=c)if(s=(a=r.match(/[a-zA-Z]+/))?a[0]:"")if("</"!==r.substring(0,2))m.push(s),r="";else{for(;m[m.length-1]!==s&&m.length;)m.pop();m.length&&(r=""),m.pop()}else r=""}else r="";b[y]=r}return{html:b.join("\n").replace(/\n/g,""),more:h}})},function(e,t){!function(){e.exports=this.wp.isShallowEqual}()},,,,function(e,t,r){"use strict";var n=r(26);function o(){}function i(){}i.resetWarningCache=o,e.exports=function(){function e(e,t,r,o,i,a){if(a!==n){var s=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw s.name="Invariant Violation",s}}function t(){return e}e.isRequired=e;var r={array:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:i,resetWarningCache:o};return r.PropTypes=r,r}},function(e,t,r){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t,r){"use strict";r.r(t);var n=r(11),o=r.n(n),i=r(14),a=r(3),s=r.n(a),c=r(4),l=r.n(c),u=r(5),p=r.n(u),d=r(6),f=r.n(d),v=r(2),b=r.n(v),w=r(7),m=r.n(w),h=r(0),y=r(16),g=r(1),R=r.n(g),O=(r(10),r(19)),_=r.n(O),k=r(9),E=r.n(k),j=r(8),x=function(e){return _()({path:"/wc/blocks/products/reviews?"+Object.entries(e).map((function(e){return e.join("=")})).join("&"),parse:!1}).then((function(e){return e.json().then((function(t){return{reviews:t,totalReviews:parseInt(e.headers.get("x-wp-total"),10)}}))}))};function P(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}var T=function(e){var t,r=e.label,n=e.screenReaderLabel,i=e.wrapperElement,a=e.wrapperProps;return!r&&n?(t=i||"span",a=function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?P(r,!0).forEach((function(t){o()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):P(r).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}({},a,{className:E()(a.className,"screen-reader-text")}),React.createElement(t,a,n)):(t=i||g.Fragment,r&&n&&r!==n?React.createElement(t,a,React.createElement("span",{"aria-hidden":!0},r),React.createElement("span",{className:"screen-reader-text"},n)):React.createElement(t,a,r))};T.defaultProps={wrapperProps:{}};var S=T,N=(r(27),function(e){var t=e.onClick,r=e.label,n=e.screenReaderLabel;return React.createElement("div",{className:"wp-block-button wc-block-load-more"},React.createElement("button",{className:"wp-block-button__link",onClick:t},React.createElement(S,{label:r,screenReaderLabel:n})))});N.defaultProps={label:Object(h.__)("Load more","woo-gutenberg-products-block")};var L=N,C=r(15),A=(r(28),Object(C.a)((function(e){var t=e.className,r=e.componentId,n=e.defaultValue,o=e.label,i=e.onChange,a=e.options,s=e.screenReaderLabel,c=e.readOnly,l=e.value,u="wc-block-order-select__select-".concat(r);return React.createElement("p",{className:E()("wc-block-order-select",t)},React.createElement(S,{label:o,screenReaderLabel:s,wrapperElement:"label",wrapperProps:{className:"wc-block-order-select__label",htmlFor:u}}),React.createElement("select",{id:u,className:"wc-block-order-select__select",defaultValue:n,onChange:i,readOnly:c,value:l},a.map((function(e){return React.createElement("option",{key:e.key,value:e.key},e.label)}))))}))),D=(r(29),function(e){var t=e.defaultValue,r=e.onChange,n=e.readOnly,o=e.value;return React.createElement(A,{className:"wc-block-review-order-select",defaultValue:t,label:Object(h.__)("Order by","woo-gutenberg-products-block"),onChange:r,options:[{key:"most-recent",label:Object(h.__)("Most recent","woo-gutenberg-products-block")},{key:"highest-rating",label:Object(h.__)("Highest rating","woo-gutenberg-products-block")},{key:"lowest-rating",label:Object(h.__)("Lowest rating","woo-gutenberg-products-block")}],readOnly:n,screenReaderLabel:Object(h.__)("Order reviews by","woo-gutenberg-products-block"),value:o})}),I=r(20),M=r.n(I),V=function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"...",n=M()(e,{suffix:r,limit:t});return n.html},H=function(e,t,r,n){var o=B(e,t,r);return V(e,o-n.length,n)},B=function(e,t,r){for(var n={start:0,middle:0,end:e.length};n.start<=n.end;)n.middle=Math.floor((n.start+n.end)/2),t.innerHTML=V(e,n.middle),n=W(n,t.clientHeight,r);return n.middle},W=function(e,t,r){return t<=r?e.start=e.middle+1:e.end=e.middle-1,e},F=function(e){function t(e){var r;return s()(this,t),(r=p()(this,f()(t).apply(this,arguments))).state={isExpanded:!1,clampEnabled:null,content:e.children,summary:"."},r.reviewSummary=Object(g.createRef)(),r.reviewContent=Object(g.createRef)(),r.getButton=r.getButton.bind(b()(r)),r.onClick=r.onClick.bind(b()(r)),r}return m()(t,e),l()(t,[{key:"componentDidMount",value:function(){if(this.props.children){var e=this.props,t=e.maxLines,r=e.ellipsis,n=(this.reviewSummary.current.clientHeight+1)*t+1,o=this.reviewContent.current.clientHeight+1>n;this.setState({clampEnabled:o}),o&&this.setState({summary:H(this.reviewContent.current.innerHTML,this.reviewSummary.current,n,r)})}}},{key:"getButton",value:function(){var e=this.state.isExpanded,t=this.props,r=t.className,n=t.lessText,o=t.moreText,i=e?n:o;if(i)return R.a.createElement("a",{href:"#more",className:r+"__read_more",onClick:this.onClick,"aria-expanded":!e,role:"button"},i)}},{key:"onClick",value:function(e){e.preventDefault();var t=this.state.isExpanded;this.setState({isExpanded:!t})}},{key:"render",value:function(){var e=this.props.className,t=this.state,r=t.content,n=t.summary,o=t.clampEnabled,i=t.isExpanded;return r?!1===o?R.a.createElement("div",{className:e},R.a.createElement("div",{ref:this.reviewContent},r)):R.a.createElement("div",{className:e},(!i||null===o)&&R.a.createElement("div",{ref:this.reviewSummary,"aria-hidden":i,dangerouslySetInnerHTML:{__html:n}}),(i||null===o)&&R.a.createElement("div",{ref:this.reviewContent,"aria-hidden":!i},r),this.getButton()):null}}]),t}(g.Component);F.defaultProps={maxLines:3,ellipsis:"…",moreText:Object(h.__)("Read more","woo-gutenberg-products-block"),lessText:Object(h.__)("Read less","woo-gutenberg-products-block"),className:"read-more-content"};var U=F;r(30);var q=function(e){var t=e.attributes,r=e.review,n=void 0===r?{}:r,o=t.imageType,i=t.showReviewDate,a=t.showReviewerName,s=t.showReviewImage,c=t.showReviewRating,l=t.showReviewContent,u=t.showProductName,p=n.rating,d=!Object.keys(n).length>0,f=Number.isFinite(p)&&c;return React.createElement("li",{className:E()("wc-block-review-list-item__item",{"is-loading":d}),"aria-hidden":d},(u||i||a||s||f)&&React.createElement("div",{className:"wc-block-review-list-item__info"},s&&function(e,t,r){return r||!e?React.createElement("div",{className:"wc-block-review-list-item__image",width:"48",height:"48"}):React.createElement("div",{className:"wc-block-review-list-item__image"},"product"===t?React.createElement("img",{"aria-hidden":"true",alt:"",src:e.product_picture||"",className:"wc-block-review-list-item__image",width:"48",height:"48"}):React.createElement("img",{"aria-hidden":"true",alt:"",src:e.reviewer_avatar_urls[48]||"",srcSet:e.reviewer_avatar_urls[96]+" 2x",className:"wc-block-review-list-item__image",width:"48",height:"48"}),e.verified&&React.createElement("div",{className:"wc-block-review-list-item__verified",title:Object(h.__)("Verified buyer","woo-gutenberg-products-block")},Object(h.__)("Verified buyer","woo-gutenberg-products-block")))}(n,o,d),(u||a||f||i)&&React.createElement("div",{className:"wc-block-review-list-item__meta"},f&&function(e){var t=e.rating,r={width:t/5*100+"%"};return React.createElement("div",{className:"wc-block-review-list-item__rating"},React.createElement("div",{className:"wc-block-review-list-item__rating__stars",role:"img"},React.createElement("span",{style:r},Object(h.sprintf)(Object(h.__)("Rated %d out of 5","woo-gutenberg-products-block"),t))))}(n),u&&function(e){return React.createElement("div",{className:"wc-block-review-list-item__product"},React.createElement("a",{href:e.product_permalink},e.product_name))}(n),a&&function(e){var t=e.reviewer,r=void 0===t?"":t;return React.createElement("div",{className:"wc-block-review-list-item__author"},r)}(n),i&&function(e){var t=e.date_created,r=e.formatted_date_created;return React.createElement("time",{className:"wc-block-review-list-item__published-date",dateTime:t},r)}(n))),l&&function(e){return React.createElement(U,{maxLines:10,moreText:Object(h.__)("Read full review","woo-gutenberg-products-block"),lessText:Object(h.__)("Hide full review","woo-gutenberg-products-block"),className:"wc-block-review-list-item__text"},React.createElement("div",{dangerouslySetInnerHTML:{__html:e.review||""}}))}(n))};r(31);function G(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}var z=function(e){var t=e.attributes,r=e.reviews,n=function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?G(r,!0).forEach((function(t){o()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):G(r).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}({},t,{showReviewImage:(j.SHOW_AVATARS||"product"===t.imageType)&&t.showReviewImage,showReviewRating:j.ENABLE_REVIEW_RATING&&t.showReviewRating});return React.createElement("ul",{className:"wc-block-review-list"},0===r.length?React.createElement(q,{attributes:n}):r.map((function(e,t){return React.createElement(q,{key:e.id||t,attributes:n,review:e})})))},Y=r(12),Z=r.n(Y),$=r(13),J=r.n($),K=r(21),Q=r.n(K),X=function(e){var t=function(t){function r(){var e;return s()(this,r),(e=p()(this,f()(r).apply(this,arguments))).state={error:null,loading:!0,reviews:[],totalReviews:0},e.setError=e.setError.bind(b()(e)),e.delayedAppendReviews=e.props.delayFunction(e.appendReviews),e}return m()(r,t),l()(r,[{key:"componentDidMount",value:function(){this.replaceReviews()}},{key:"componentDidUpdate",value:function(e){e.reviewsToDisplay<this.props.reviewsToDisplay?this.delayedAppendReviews():this.shouldReplaceReviews(e,this.props)&&this.replaceReviews()}},{key:"shouldReplaceReviews",value:function(e,t){return e.orderby!==t.orderby||e.order!==t.order||e.productId!==t.productId||!Q()(e.categoryIds,t.categoryIds)}},{key:"componentWillUnMount",value:function(){this.delayedAppendReviews.cancel&&this.delayedAppendReviews.cancel()}},{key:"getArgs",value:function(e){var t=this.props,r=t.categoryIds,n=t.order,o=t.orderby,i=t.productId,a={order:n,orderby:o,per_page:t.reviewsToDisplay-e,offset:e};return r&&r.length&&(a.category_id=Array.isArray(r)?r.join(","):r),i&&(a.product_id=i),a}},{key:"replaceReviews",value:function(){var e=this.props.onReviewsReplaced;this.updateListOfReviews().then(e)}},{key:"appendReviews",value:function(){var e=this.props,t=e.onReviewsAppended,r=e.reviewsToDisplay,n=this.state.reviews;r<=n.length||this.updateListOfReviews(n).then(t)}},{key:"updateListOfReviews",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],r=this.props.reviewsToDisplay,n=this.state.totalReviews,o=Math.min(n,r)-t.length;return this.setState({loading:!0,reviews:t.concat(Array(o).fill({}))}),x(this.getArgs(t.length)).then((function(r){var n=r.reviews,o=r.totalReviews;return e.setState({reviews:t.filter((function(e){return Object.keys(e).length})).concat(n),totalReviews:o,loading:!1,error:null}),{newReviews:n}})).catch(this.setError)}},{key:"setError",value:function(e){var t=this;e.json().then((function(e){var r=t.props.onReviewsLoadError,n="object"===J()(e)&&e.hasOwnProperty("message")?{apiMessage:e.message}:{apiMessage:null};t.setState({reviews:[],loading:!1,error:n}),r()}))}},{key:"render",value:function(){var t=this.props.reviewsToDisplay,r=this.state,n=r.error,o=r.loading,i=r.reviews,a=r.totalReviews;return React.createElement(e,Z()({},this.props,{error:n,isLoading:o,reviews:i.slice(0,t),totalReviews:a}))}}]),r}(g.Component);t.defaultProps={delayFunction:function(e){return e},onReviewsAppended:function(){},onReviewsLoadError:function(){},onReviewsReplaced:function(){}};var r=e.displayName,n=void 0===r?e.name||"Component":r;return t.displayName="WithReviews( ".concat(n," )"),t}((function(e){var t=e.attributes,r=e.onAppendReviews,n=e.onChangeOrderby,o=e.reviews,i=e.totalReviews,a=t.orderby;return 0===o.length?null:React.createElement(g.Fragment,null,"false"!==t.showOrderby&&j.ENABLE_REVIEW_RATING&&React.createElement(D,{defaultValue:a,onChange:n}),React.createElement(z,{attributes:t,reviews:o}),"false"!==t.showLoadMore&&i>o.length&&React.createElement(L,{onClick:r,screenReaderLabel:Object(h.__)("Load more reviews","woo-gutenberg-products-block")}))})),ee=function(e){function t(){var e;s()(this,t);var r=(e=p()(this,f()(t).apply(this,arguments))).props.attributes;return e.state={orderby:r.orderby,reviewsToDisplay:parseInt(r.reviewsOnPageLoad,10)},e.onAppendReviews=e.onAppendReviews.bind(b()(e)),e.onChangeOrderby=e.onChangeOrderby.bind(b()(e)),e}return m()(t,e),l()(t,[{key:"onAppendReviews",value:function(){var e=this.props.attributes,t=this.state.reviewsToDisplay;this.setState({reviewsToDisplay:t+parseInt(e.reviewsOnLoadMore,10)})}},{key:"onChangeOrderby",value:function(e){var t=this.props.attributes;this.setState({orderby:e.target.value,reviewsToDisplay:parseInt(t.reviewsOnPageLoad,10)})}},{key:"onReviewsAppended",value:function(e){var t=e.newReviews;Object(y.speak)(Object(h.sprintf)(Object(h._n)("%d review loaded.","%d reviews loaded.",t.length,"woo-gutenberg-products-block"),t.length))}},{key:"onReviewsReplaced",value:function(){Object(y.speak)(Object(h.__)("Reviews list updated.","woo-gutenberg-products-block"))}},{key:"onReviewsLoadError",value:function(){Object(y.speak)(Object(h.__)("There was an error loading the reviews.","woo-gutenberg-products-block"))}},{key:"render",value:function(){var e=this.props.attributes,t=e.categoryIds,r=e.productId,n=this.state.reviewsToDisplay,o=function(e){if(j.ENABLE_REVIEW_RATING){if("lowest-rating"===e)return{order:"asc",orderby:"rating"};if("highest-rating"===e)return{order:"desc",orderby:"rating"}}return{order:"desc",orderby:"date_gmt"}}(this.state.orderby),i=o.order,a=o.orderby;return React.createElement(X,{attributes:e,categoryIds:t,onAppendReviews:this.onAppendReviews,onChangeOrderby:this.onChangeOrderby,onReviewsAppended:this.onReviewsAppended,onReviewsLoadError:this.onReviewsLoadError,onReviewsReplaced:this.onReviewsReplaced,order:i,orderby:a,productId:r,reviewsToDisplay:n})}}]),t}(g.Component);function te(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}var re=document.querySelectorAll("\n\t.wp-block-woocommerce-all-reviews,\n\t.wp-block-woocommerce-reviews-by-product,\n\t.wp-block-woocommerce-reviews-by-category\n");re.length&&Array.prototype.forEach.call(re,(function(e){var t=function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?te(r,!0).forEach((function(t){o()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):te(r).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}({},e.dataset,{showReviewDate:e.classList.contains("has-date"),showReviewerName:e.classList.contains("has-name"),showReviewImage:e.classList.contains("has-image"),showReviewRating:e.classList.contains("has-rating"),showReviewContent:e.classList.contains("has-content"),showProductName:e.classList.contains("has-product-name")});Object(i.render)(React.createElement(ee,{attributes:t}),e)}))}]);
|
build/style.css
CHANGED
@@ -1,15 +1,15 @@
|
|
1 |
-
@-webkit-keyframes loading-fade{0%{opacity:.7}50%{opacity:1}to{opacity:.7}}@keyframes loading-fade{0%{opacity:.7}50%{opacity:1}to{opacity:.7}}.wc-block-grid__products{display
|
2 |
-
@-webkit-keyframes loading-fade{0%{opacity:.7}50%{opacity:1}to{opacity:.7}}@keyframes loading-fade{0%{opacity:.7}50%{opacity:1}to{opacity:.7}}.wc-block-featured-category{position:relative;background-color:#24292d;background-size:cover;background-position:50%;width:100%;margin:0 0 1.5em
|
3 |
@-webkit-keyframes loading-fade{0%{opacity:.7}50%{opacity:1}to{opacity:.7}}@keyframes loading-fade{0%{opacity:.7}50%{opacity:1}to{opacity:.7}}.woocommerce-product-categories__operator .components-base-control__help{clip:rect(1px,1px,1px,1px);-webkit-clip-path:inset(50%);clip-path:inset(50%);height:1px;width:1px;margin:-1px;overflow:hidden;overflow-wrap:normal!important;word-wrap:normal!important}.components-panel .woocommerce-product-categories__operator.components-base-control{margin-top:16px}.components-panel .woocommerce-product-categories__operator.components-base-control .components-select-control__input{margin-left:0;min-width:100%}
|
4 |
-
@-webkit-keyframes loading-fade{0%{opacity:.7}50%{opacity:1}to{opacity:.7}}@keyframes loading-fade{0%{opacity:.7}50%{opacity:1}to{opacity:.7}}.wc-block-product-categories{margin-bottom:1em}.wc-block-product-categories.is-dropdown{display
|
5 |
-
@-webkit-keyframes loading-fade{0%{opacity:.7}50%{opacity:1}to{opacity:.7}}@keyframes loading-fade{0%{opacity:.7}50%{opacity:1}to{opacity:.7}}.woocommerce-product-attributes__operator .components-base-control__help{clip:rect(1px,1px,1px,1px);-webkit-clip-path:inset(50%);clip-path:inset(50%);height:1px;width:1px;margin:-1px;overflow:hidden;overflow-wrap:normal!important;word-wrap:normal!important}.components-panel .woocommerce-product-attributes__operator.components-base-control{margin-top:16px}.components-panel .woocommerce-product-attributes__operator.components-base-control .components-select-control__input{margin-left:0;min-width:100%}.woocommerce-search-list__item.woocommerce-product-attributes__item.is-searching .woocommerce-search-list__item-prefix:after,.woocommerce-search-list__item.woocommerce-product-attributes__item.is-skip-level .woocommerce-search-list__item-prefix:after{content:":"}.woocommerce-search-list__item.woocommerce-product-attributes__item.is-not-active:active,.woocommerce-search-list__item.woocommerce-product-attributes__item.is-not-active:focus,.woocommerce-search-list__item.woocommerce-product-attributes__item.is-not-active:hover{background:#fff}.woocommerce-search-list__item.woocommerce-product-attributes__item.is-loading{
|
6 |
-
@-webkit-keyframes loading-fade{0%{opacity:.7}50%{opacity:1}to{opacity:.7}}@keyframes loading-fade{0%{opacity:.7}50%{opacity:1}to{opacity:.7}}.wc-block-featured-product{position:relative;background-color:#24292d;background-size:cover;background-position:50%;width:100%;margin:0 0 1.5em}.wc-block-featured-product,.wc-block-featured-product .wc-block-featured-product__wrapper{display
|
7 |
-
@-webkit-keyframes loading-fade{0%{opacity:.7}50%{opacity:1}to{opacity:.7}}@keyframes loading-fade{0%{opacity:.7}50%{opacity:1}to{opacity:.7}}.woocommerce-search-product__item .woocommerce-search-list__item-name .description{display:block}.woocommerce-search-product__item.is-searching .woocommerce-search-list__item-prefix:after,.woocommerce-search-product__item.is-skip-level .woocommerce-search-list__item-prefix:after{content:":"}.woocommerce-search-product__item.is-not-active:active,.woocommerce-search-product__item.is-not-active:focus,.woocommerce-search-product__item.is-not-active:hover{background:#fff}.woocommerce-search-product__item.is-loading{
|
8 |
@-webkit-keyframes loading-fade{0%{opacity:.7}50%{opacity:1}to{opacity:.7}}@keyframes loading-fade{0%{opacity:.7}50%{opacity:1}to{opacity:.7}}.wc-block-load-more{text-align:center;width:100%}
|
9 |
-
@-webkit-keyframes loading-fade{0%{opacity:.7}50%{opacity:1}to{opacity:.7}}@keyframes loading-fade{0%{opacity:.7}50%{opacity:1}to{opacity:.7}}.is-loading .wc-block-review-list-item__text{-webkit-animation:loading-fade 1.6s ease-in-out infinite;animation:loading-fade 1.6s ease-in-out infinite;background-color:#e2e4e7;color:transparent;display:block;width:60%}.is-loading .wc-block-review-list-item__text:after{content:"\00a0"}@media screen and (prefers-reduced-motion:reduce){.is-loading .wc-block-review-list-item__text{-webkit-animation:none;animation:none}}.is-loading .wc-block-review-list-item__info .wc-block-review-list-item__image{-webkit-animation:loading-fade 1.6s ease-in-out infinite;animation:loading-fade 1.6s ease-in-out infinite;background-color:#e2e4e7;color:transparent}.is-loading .wc-block-review-list-item__info .wc-block-review-list-item__image:after{content:"\00a0"}@media screen and (prefers-reduced-motion:reduce){.is-loading .wc-block-review-list-item__info .wc-block-review-list-item__image{-webkit-animation:none;animation:none}}.is-loading .wc-block-review-list-item__info .wc-block-review-list-item__meta .wc-block-review-list-item__author{-webkit-animation:loading-fade 1.6s ease-in-out infinite;animation:loading-fade 1.6s ease-in-out infinite;background-color:#e2e4e7;color:transparent;font-size:1em;width:80px}.is-loading .wc-block-review-list-item__info .wc-block-review-list-item__meta .wc-block-review-list-item__author:after{content:"\00a0"}@media screen and (prefers-reduced-motion:reduce){.is-loading .wc-block-review-list-item__info .wc-block-review-list-item__meta .wc-block-review-list-item__author{-webkit-animation:none;animation:none}}.is-loading .wc-block-review-list-item__info .wc-block-review-list-item__meta .wc-block-review-list-item__product
|
10 |
@-webkit-keyframes loading-fade{0%{opacity:.7}50%{opacity:1}to{opacity:.7}}@keyframes loading-fade{0%{opacity:.7}50%{opacity:1}to{opacity:.7}}.editor-styles .wc-block-review-list,.wc-block-review-list{margin:0}
|
11 |
@-webkit-keyframes loading-fade{0%{opacity:.7}50%{opacity:1}to{opacity:.7}}@keyframes loading-fade{0%{opacity:.7}50%{opacity:1}to{opacity:.7}}.wc-block-order-select{margin-bottom:12px}.wc-block-order-select__label{margin-right:12px;display:inline-block;font-weight:400}
|
12 |
@-webkit-keyframes loading-fade{0%{opacity:.7}50%{opacity:1}to{opacity:.7}}@keyframes loading-fade{0%{opacity:.7}50%{opacity:1}to{opacity:.7}}.wc-block-review-order-select{text-align:right}
|
13 |
@-webkit-keyframes loading-fade{0%{opacity:.7}50%{opacity:1}to{opacity:.7}}@keyframes loading-fade{0%{opacity:.7}50%{opacity:1}to{opacity:.7}}.components-toggle-button-control .components-base-control__field{flex-wrap:wrap}.components-toggle-button-control .components-toggle-button-control__label{width:100%;margin-bottom:8px;display:block}.components-toggle-button-control .components-base-control__help{margin-top:0}
|
14 |
-
@-webkit-keyframes loading-fade{0%{opacity:.7}50%{opacity:1}to{opacity:.7}}@keyframes loading-fade{0%{opacity:.7}50%{opacity:1}to{opacity:.7}}.wc-block-product-search .wc-block-product-search__fields{display:-webkit-box;display:flex}.wc-block-product-search .wc-block-product-search__field{padding:6px 8px;line-height:1.8;-webkit-box-flex:1;flex-grow:1}.wc-block-product-search .wc-block-product-search__button{display:-webkit-box;display:flex;-webkit-box-align:center;align-items:center;text-decoration:none;font-size:13px;margin:0 0 0 6px;border:none;cursor:pointer;background:none;padding:8px;color:#555d66;position:relative;overflow:hidden;border-radius:4px}.wc-block-product-search .wc-block-product-search__button svg{fill:currentColor;outline:none}.wc-block-product-search .wc-block-product-search__button:active{color:currentColor}.wc-block-product-search .wc-block-product-search__button:disabled,.wc-block-product-sear
|
1 |
+
@-webkit-keyframes loading-fade{0%{opacity:.7}50%{opacity:1}to{opacity:.7}}@keyframes loading-fade{0%{opacity:.7}50%{opacity:1}to{opacity:.7}}.wc-block-grid__products{display:flex;flex-wrap:wrap;list-style:none;padding:0;margin:0 0 24px}.wc-block-grid__product{box-sizing:border-box;padding:0 16px 0 0;margin:0 0 24px;float:none;width:auto;position:relative;text-align:center}.wc-block-grid__product-link{text-decoration:none;border:0}.wc-block-grid__product-image{text-decoration:none;margin-bottom:16px;display:block}.wc-block-grid__product-image img{vertical-align:middle;margin-left:auto;margin-right:auto}.wc-block-grid__product-title{line-height:1.2;font-weight:700}.wc-block-grid__product-price,.wc-block-grid__product-rating,.wc-block-grid__product-title{margin-bottom:12px;display:block}.wc-block-grid__product-add-to-cart,.wc-block-grid__product-add-to-cart a{margin:0;word-break:break-word;white-space:normal}.wc-block-grid__product-add-to-cart a.loading{opacity:.25;padding-right:2.618em}.wc-block-grid__product-add-to-cart a.loading:after{font-family:WooCommerce;content:"\e01c";vertical-align:top;font-weight:400;position:absolute;top:.618em;right:1em;-webkit-animation:spin 2s linear infinite;animation:spin 2s linear infinite}.wc-block-grid__product-add-to-cart a.added:after{font-family:WooCommerce;content:"\e017";margin-left:.53em;vertical-align:bottom}.wc-block-grid__product-add-to-cart .added_to_cart{text-align:center}.wc-block-grid__product-onsale{font-weight:700;position:absolute;text-align:center;top:0;left:0;margin:0;background-color:#000;color:#fff;display:inline-block;font-size:.75em;padding:.5em;z-index:9;text-transform:uppercase}.wc-block-grid__product-rating .star-rating{overflow:hidden;position:relative;width:5.3em;height:1.618em;line-height:1.618;font-size:1em;font-family:star;font-weight:400;display:inline-block;margin:0 auto;text-align:left}.wc-block-grid__product-rating .star-rating:before{content:"\53\53\53\53\53";top:0;left:0;right:0;position:absolute;opacity:.5;color:#aaa}.wc-block-grid__product-rating .star-rating span{overflow:hidden;top:0;left:0;right:0;position:absolute;padding-top:1.5em}.wc-block-grid__product-rating .star-rating span:before{content:"\53\53\53\53\53";top:0;left:0;right:0;position:absolute;color:#000}.wc-block-grid.has-aligned-buttons .wc-block-grid__product{display:flex;flex-direction:column}.wc-block-grid.has-aligned-buttons .wc-block-grid__product-add-to-cart{margin-top:auto!important}.wc-block-grid.has-1-columns .wc-block-grid__products{display:block}.wc-block-grid.has-1-columns .wc-block-grid__product{margin-left:auto;margin-right:auto}.wc-block-grid.has-2-columns .wc-block-grid__product{flex:1 0 50%;max-width:50%}.wc-block-grid.has-3-columns .wc-block-grid__product{flex:1 0 33.33333%;max-width:33.33333%}.wc-block-grid.has-4-columns .wc-block-grid__product{flex:1 0 25%;max-width:25%}.wc-block-grid.has-5-columns .wc-block-grid__product{flex:1 0 20%;max-width:20%}.wc-block-grid.has-6-columns .wc-block-grid__product{flex:1 0 16.66667%;max-width:16.66667%}.wc-block-grid.has-7-columns .wc-block-grid__product{flex:1 0 14.28571%;max-width:14.28571%}.wc-block-grid.has-8-columns .wc-block-grid__product{flex:1 0 12.5%;max-width:12.5%}.wc-block-grid.has-4-columns:not(.alignwide):not(.alignfull) .wc-block-grid__product,.wc-block-grid.has-5-columns:not(.alignfull) .wc-block-grid__product,.wc-block-grid.has-6-columns:not(.alignfull) .wc-block-grid__product,.wc-block-grid.has-7-columns .wc-block-grid__product,.wc-block-grid.has-8-columns .wc-block-grid__product{font-size:.8em}.theme-twentysixteen .wc-block-grid .price ins{color:#77a464}.theme-twentynineteen .wc-block-grid__product{font-size:.88889em}.theme-twentynineteen .wc-block-grid__product-onsale,.theme-twentynineteen .wc-block-grid__product-title{font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,Fira Sans,Droid Sans,Helvetica Neue,sans-serif}.theme-twentynineteen .wc-block-grid__product-onsale{line-height:1}
|
2 |
+
@-webkit-keyframes loading-fade{0%{opacity:.7}50%{opacity:1}to{opacity:.7}}@keyframes loading-fade{0%{opacity:.7}50%{opacity:1}to{opacity:.7}}.wc-block-featured-category{position:relative;background-color:#24292d;background-size:cover;background-position:50%;width:100%;margin:0 0 1.5em;display:flex;justify-content:center;align-items:center;flex-wrap:wrap;align-content:center}.wc-block-featured-category .wc-block-featured-category__wrapper{overflow:hidden;height:100%;display:flex;justify-content:center;align-items:center;flex-wrap:wrap;align-content:center}.wc-block-featured-category.has-left-content{justify-content:flex-start}.wc-block-featured-category.has-left-content .wc-block-featured-category__description,.wc-block-featured-category.has-left-content .wc-block-featured-category__price,.wc-block-featured-category.has-left-content .wc-block-featured-category__title{margin-left:0;text-align:left}.wc-block-featured-category.has-right-content{justify-content:flex-end}.wc-block-featured-category.has-right-content .wc-block-featured-category__description,.wc-block-featured-category.has-right-content .wc-block-featured-category__price,.wc-block-featured-category.has-right-content .wc-block-featured-category__title{margin-right:0;text-align:right}.wc-block-featured-category .wc-block-featured-category__description,.wc-block-featured-category .wc-block-featured-category__price,.wc-block-featured-category .wc-block-featured-category__title{color:#fff;line-height:1.25;margin-bottom:0;text-align:center}.wc-block-featured-category .wc-block-featured-category__description a,.wc-block-featured-category .wc-block-featured-category__description a:active,.wc-block-featured-category .wc-block-featured-category__description a:focus,.wc-block-featured-category .wc-block-featured-category__description a:hover,.wc-block-featured-category .wc-block-featured-category__price a,.wc-block-featured-category .wc-block-featured-category__price a:active,.wc-block-featured-category .wc-block-featured-category__price a:focus,.wc-block-featured-category .wc-block-featured-category__price a:hover,.wc-block-featured-category .wc-block-featured-category__title a,.wc-block-featured-category .wc-block-featured-category__title a:active,.wc-block-featured-category .wc-block-featured-category__title a:focus,.wc-block-featured-category .wc-block-featured-category__title a:hover{color:#fff}.wc-block-featured-category .wc-block-featured-category__description,.wc-block-featured-category .wc-block-featured-category__link,.wc-block-featured-category .wc-block-featured-category__price,.wc-block-featured-category .wc-block-featured-category__title{width:100%;padding:0 48px 16px;z-index:1}.wc-block-featured-category .wc-block-featured-category__title{margin-top:0}.wc-block-featured-category .wc-block-featured-category__title:before{display:none}.wc-block-featured-category .wc-block-featured-category__description p{margin:0}.wc-block-featured-category.has-background-dim:before{content:"";position:absolute;top:0;left:0;bottom:0;right:0;background-color:inherit;opacity:.5;z-index:1}.wc-block-featured-category.has-background-dim.has-background-dim-10:before{opacity:.1}.wc-block-featured-category.has-background-dim.has-background-dim-20:before{opacity:.2}.wc-block-featured-category.has-background-dim.has-background-dim-30:before{opacity:.3}.wc-block-featured-category.has-background-dim.has-background-dim-40:before{opacity:.4}.wc-block-featured-category.has-background-dim.has-background-dim-50:before{opacity:.5}.wc-block-featured-category.has-background-dim.has-background-dim-60:before{opacity:.6}.wc-block-featured-category.has-background-dim.has-background-dim-70:before{opacity:.7}.wc-block-featured-category.has-background-dim.has-background-dim-80:before{opacity:.8}.wc-block-featured-category.has-background-dim.has-background-dim-90:before{opacity:.9}.wc-block-featured-category.has-background-dim.has-background-dim-100:before{opacity:1}.wc-block-featured-category.alignleft,.wc-block-featured-category.alignright{max-width:305px;width:100%}.wc-block-featured-category:after{display:block;content:"";font-size:0;min-height:inherit}@supports ((position:-webkit-sticky) or (position:sticky)){.wc-block-featured-category:after{content:none}}.wc-block-featured-category.aligncenter,.wc-block-featured-category.alignleft,.wc-block-featured-category.alignright{display:flex}
|
3 |
@-webkit-keyframes loading-fade{0%{opacity:.7}50%{opacity:1}to{opacity:.7}}@keyframes loading-fade{0%{opacity:.7}50%{opacity:1}to{opacity:.7}}.woocommerce-product-categories__operator .components-base-control__help{clip:rect(1px,1px,1px,1px);-webkit-clip-path:inset(50%);clip-path:inset(50%);height:1px;width:1px;margin:-1px;overflow:hidden;overflow-wrap:normal!important;word-wrap:normal!important}.components-panel .woocommerce-product-categories__operator.components-base-control{margin-top:16px}.components-panel .woocommerce-product-categories__operator.components-base-control .components-select-control__input{margin-left:0;min-width:100%}
|
4 |
+
@-webkit-keyframes loading-fade{0%{opacity:.7}50%{opacity:1}to{opacity:.7}}@keyframes loading-fade{0%{opacity:.7}50%{opacity:1}to{opacity:.7}}.wc-block-product-categories{margin-bottom:1em}.wc-block-product-categories.is-dropdown{display:flex}.wc-block-product-categories select{margin-right:.5em}.wp-block-woocommerce-product-categories.is-loading .wc-block-product-categories__placeholder{display:inline-block;height:1em;width:50%;min-width:200px;background:currentColor;opacity:.2}.wc-block-product-categories__button{display:flex;align-items:center;text-decoration:none;font-size:13px;margin:0;border:none;cursor:pointer;background:none;padding:8px;color:#555d66;position:relative;overflow:hidden;border-radius:4px}.wc-block-product-categories__button svg{fill:currentColor;outline:none}.wc-block-product-categories__button:active{color:currentColor}.wc-block-product-categories__button:disabled,.wc-block-product-categories__button[aria-disabled=true]{cursor:default;opacity:.3}.wc-block-product-categories__button:focus:enabled{background-color:#fff;color:#191e23;box-shadow:inset 0 0 0 1px #6c7781,inset 0 0 0 2px #fff;outline:2px solid transparent;outline-offset:-2px}.wc-block-product-categories__button:not(:disabled):not([aria-disabled=true]):hover{background-color:#fff;color:#191e23;box-shadow:inset 0 0 0 1px #e2e4e7,inset 0 0 0 2px #fff,0 1px 1px rgba(25,30,35,.2)}.wc-block-product-categories__button:not(:disabled):not([aria-disabled=true]):active{outline:none;background-color:#fff;color:#191e23;box-shadow:inset 0 0 0 1px #ccd0d4,inset 0 0 0 2px #fff}.wc-block-product-categories__button:disabled:focus,.wc-block-product-categories__button[aria-disabled=true]:focus{box-shadow:none}
|
5 |
+
@-webkit-keyframes loading-fade{0%{opacity:.7}50%{opacity:1}to{opacity:.7}}@keyframes loading-fade{0%{opacity:.7}50%{opacity:1}to{opacity:.7}}.woocommerce-product-attributes__operator .components-base-control__help{clip:rect(1px,1px,1px,1px);-webkit-clip-path:inset(50%);clip-path:inset(50%);height:1px;width:1px;margin:-1px;overflow:hidden;overflow-wrap:normal!important;word-wrap:normal!important}.components-panel .woocommerce-product-attributes__operator.components-base-control{margin-top:16px}.components-panel .woocommerce-product-attributes__operator.components-base-control .components-select-control__input{margin-left:0;min-width:100%}.woocommerce-search-list__item.woocommerce-product-attributes__item.is-searching .woocommerce-search-list__item-prefix:after,.woocommerce-search-list__item.woocommerce-product-attributes__item.is-skip-level .woocommerce-search-list__item-prefix:after{content:":"}.woocommerce-search-list__item.woocommerce-product-attributes__item.is-not-active:active,.woocommerce-search-list__item.woocommerce-product-attributes__item.is-not-active:focus,.woocommerce-search-list__item.woocommerce-product-attributes__item.is-not-active:hover{background:#fff}.woocommerce-search-list__item.woocommerce-product-attributes__item.is-loading{justify-content:center}.woocommerce-search-list__item.woocommerce-product-attributes__item.is-loading .components-spinner{margin-bottom:12px}.woocommerce-search-list__item.woocommerce-product-attributes__item.depth-0:after{margin-left:8px;content:"";height:24px;width:24px;background-image:url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path d="M7.41 15.41L12 10.83l4.59 4.58L18 14l-6-6-6 6z" fill="{$core-grey-dark-300}" /></svg>');background-repeat:no-repeat;background-position:100%;background-size:contain}.woocommerce-search-list__item.woocommerce-product-attributes__item.depth-0[aria-expanded=true]:after{background-image:url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path d="M7.41 8.59L12 13.17l4.59-4.58L18 10l-6 6-6-6 1.41-1.41z" fill="{$core-grey-dark-300}" /></svg>')}.woocommerce-search-list__item.woocommerce-product-attributes__item[disabled].depth-0:after{margin-left:0;width:auto;background:none}
|
6 |
+
@-webkit-keyframes loading-fade{0%{opacity:.7}50%{opacity:1}to{opacity:.7}}@keyframes loading-fade{0%{opacity:.7}50%{opacity:1}to{opacity:.7}}.wc-block-featured-product{position:relative;background-color:#24292d;background-size:cover;background-position:50%;width:100%;margin:0 0 1.5em}.wc-block-featured-product,.wc-block-featured-product .wc-block-featured-product__wrapper{display:flex;justify-content:center;align-items:center;flex-wrap:wrap;align-content:center}.wc-block-featured-product .wc-block-featured-product__wrapper{overflow:hidden;height:100%}.wc-block-featured-product.has-left-content{justify-content:flex-start}.wc-block-featured-product.has-left-content .wc-block-featured-product__description,.wc-block-featured-product.has-left-content .wc-block-featured-product__price,.wc-block-featured-product.has-left-content .wc-block-featured-product__title,.wc-block-featured-product.has-left-content .wc-block-featured-product__variation{margin-left:0;text-align:left}.wc-block-featured-product.has-right-content{justify-content:flex-end}.wc-block-featured-product.has-right-content .wc-block-featured-product__description,.wc-block-featured-product.has-right-content .wc-block-featured-product__price,.wc-block-featured-product.has-right-content .wc-block-featured-product__title,.wc-block-featured-product.has-right-content .wc-block-featured-product__variation{margin-right:0;text-align:right}.wc-block-featured-product .wc-block-featured-product__description,.wc-block-featured-product .wc-block-featured-product__price,.wc-block-featured-product .wc-block-featured-product__title,.wc-block-featured-product .wc-block-featured-product__variation{color:#fff;line-height:1.25;margin-bottom:0;text-align:center}.wc-block-featured-product .wc-block-featured-product__description a,.wc-block-featured-product .wc-block-featured-product__description a:active,.wc-block-featured-product .wc-block-featured-product__description a:focus,.wc-block-featured-product .wc-block-featured-product__description a:hover,.wc-block-featured-product .wc-block-featured-product__price a,.wc-block-featured-product .wc-block-featured-product__price a:active,.wc-block-featured-product .wc-block-featured-product__price a:focus,.wc-block-featured-product .wc-block-featured-product__price a:hover,.wc-block-featured-product .wc-block-featured-product__title a,.wc-block-featured-product .wc-block-featured-product__title a:active,.wc-block-featured-product .wc-block-featured-product__title a:focus,.wc-block-featured-product .wc-block-featured-product__title a:hover,.wc-block-featured-product .wc-block-featured-product__variation a,.wc-block-featured-product .wc-block-featured-product__variation a:active,.wc-block-featured-product .wc-block-featured-product__variation a:focus,.wc-block-featured-product .wc-block-featured-product__variation a:hover{color:#fff}.wc-block-featured-product .wc-block-featured-product__description,.wc-block-featured-product .wc-block-featured-product__link,.wc-block-featured-product .wc-block-featured-product__price,.wc-block-featured-product .wc-block-featured-product__title,.wc-block-featured-product .wc-block-featured-product__variation{width:100%;padding:16px 48px 0;z-index:1}.wc-block-featured-product .wc-block-featured-product__title,.wc-block-featured-product .wc-block-featured-product__variation{margin-top:0;border:0}.wc-block-featured-product .wc-block-featured-product__title:before,.wc-block-featured-product .wc-block-featured-product__variation:before{display:none}.wc-block-featured-product .wc-block-featured-product__variation{font-style:italic;padding-top:0}.wc-block-featured-product .wc-block-featured-product__description p{margin:0;line-height:1.5em}.wc-block-featured-product.has-background-dim:before{content:"";position:absolute;top:0;left:0;bottom:0;right:0;background-color:inherit;opacity:.5;z-index:1}.wc-block-featured-product.has-background-dim.has-background-dim-10:before{opacity:.1}.wc-block-featured-product.has-background-dim.has-background-dim-20:before{opacity:.2}.wc-block-featured-product.has-background-dim.has-background-dim-30:before{opacity:.3}.wc-block-featured-product.has-background-dim.has-background-dim-40:before{opacity:.4}.wc-block-featured-product.has-background-dim.has-background-dim-50:before{opacity:.5}.wc-block-featured-product.has-background-dim.has-background-dim-60:before{opacity:.6}.wc-block-featured-product.has-background-dim.has-background-dim-70:before{opacity:.7}.wc-block-featured-product.has-background-dim.has-background-dim-80:before{opacity:.8}.wc-block-featured-product.has-background-dim.has-background-dim-90:before{opacity:.9}.wc-block-featured-product.has-background-dim.has-background-dim-100:before{opacity:1}.wc-block-featured-product.alignleft,.wc-block-featured-product.alignright{max-width:305px;width:100%}.wc-block-featured-product:after{display:block;content:"";font-size:0;min-height:inherit}@supports ((position:-webkit-sticky) or (position:sticky)){.wc-block-featured-product:after{content:none}}.wc-block-featured-product.aligncenter,.wc-block-featured-product.alignleft,.wc-block-featured-product.alignright{display:flex}
|
7 |
+
@-webkit-keyframes loading-fade{0%{opacity:.7}50%{opacity:1}to{opacity:.7}}@keyframes loading-fade{0%{opacity:.7}50%{opacity:1}to{opacity:.7}}.woocommerce-search-product__item .woocommerce-search-list__item-name .description{display:block}.woocommerce-search-product__item.is-searching .woocommerce-search-list__item-prefix:after,.woocommerce-search-product__item.is-skip-level .woocommerce-search-list__item-prefix:after{content:":"}.woocommerce-search-product__item.is-not-active:active,.woocommerce-search-product__item.is-not-active:focus,.woocommerce-search-product__item.is-not-active:hover{background:#fff}.woocommerce-search-product__item.is-loading{justify-content:center}.woocommerce-search-product__item.is-loading .components-spinner{margin-bottom:12px}.woocommerce-search-product__item.depth-0.is-variable:after{margin-left:8px;content:"";height:24px;width:24px;background-image:url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path d="M7.41 8.59L12 13.17l4.59-4.58L18 10l-6 6-6-6 1.41-1.41z" fill="{$core-grey-dark-300}" /></svg>');background-repeat:no-repeat;background-position:100%;background-size:contain}.woocommerce-search-product__item.depth-0.is-variable[aria-expanded=true]:after{background-image:url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path d="M7.41 15.41L12 10.83l4.59 4.58L18 14l-6-6-6 6z" fill="{$core-grey-dark-300}" /></svg>')}
|
8 |
@-webkit-keyframes loading-fade{0%{opacity:.7}50%{opacity:1}to{opacity:.7}}@keyframes loading-fade{0%{opacity:.7}50%{opacity:1}to{opacity:.7}}.wc-block-load-more{text-align:center;width:100%}
|
9 |
+
@-webkit-keyframes loading-fade{0%{opacity:.7}50%{opacity:1}to{opacity:.7}}@keyframes loading-fade{0%{opacity:.7}50%{opacity:1}to{opacity:.7}}.is-loading .wc-block-review-list-item__text{-webkit-animation:loading-fade 1.6s ease-in-out infinite;animation:loading-fade 1.6s ease-in-out infinite;background-color:#e2e4e7;color:transparent;display:block;width:60%}.is-loading .wc-block-review-list-item__text:after{content:"\00a0"}@media screen and (prefers-reduced-motion:reduce){.is-loading .wc-block-review-list-item__text{-webkit-animation:none;animation:none}}.is-loading .wc-block-review-list-item__info .wc-block-review-list-item__image{-webkit-animation:loading-fade 1.6s ease-in-out infinite;animation:loading-fade 1.6s ease-in-out infinite;background-color:#e2e4e7;color:transparent}.is-loading .wc-block-review-list-item__info .wc-block-review-list-item__image:after{content:"\00a0"}@media screen and (prefers-reduced-motion:reduce){.is-loading .wc-block-review-list-item__info .wc-block-review-list-item__image{-webkit-animation:none;animation:none}}.is-loading .wc-block-review-list-item__info .wc-block-review-list-item__meta .wc-block-review-list-item__author{-webkit-animation:loading-fade 1.6s ease-in-out infinite;animation:loading-fade 1.6s ease-in-out infinite;background-color:#e2e4e7;color:transparent;font-size:1em;width:80px}.is-loading .wc-block-review-list-item__info .wc-block-review-list-item__meta .wc-block-review-list-item__author:after{content:"\00a0"}@media screen and (prefers-reduced-motion:reduce){.is-loading .wc-block-review-list-item__info .wc-block-review-list-item__meta .wc-block-review-list-item__author{-webkit-animation:none;animation:none}}.is-loading .wc-block-review-list-item__info .wc-block-review-list-item__meta .wc-block-review-list-item__product,.is-loading .wc-block-review-list-item__info .wc-block-review-list-item__meta .wc-block-review-list-item__rating .wc-block-review-list-item__rating__stars>span{display:none}.is-loading .wc-block-review-list-item__info .wc-block-review-list-item__published-date{-webkit-animation:loading-fade 1.6s ease-in-out infinite;animation:loading-fade 1.6s ease-in-out infinite;background-color:#e2e4e7;color:transparent;height:1em;width:120px}.is-loading .wc-block-review-list-item__info .wc-block-review-list-item__published-date:after{content:"\00a0"}@media screen and (prefers-reduced-motion:reduce){.is-loading .wc-block-review-list-item__info .wc-block-review-list-item__published-date{-webkit-animation:none;animation:none}}.editor-styles-wrapper .wc-block-review-list-item__item,.wc-block-review-list-item__item{margin:0 0 48px;list-style:none}.wc-block-review-list-item__info{display:-ms-grid;display:grid;-ms-grid-columns:1fr;grid-template-columns:1fr;margin-bottom:24px}.wc-block-review-list-item__meta{-ms-grid-column:1;grid-column:1;-ms-grid-row:1;grid-row:1}.has-image .wc-block-review-list-item__info{-ms-grid-columns:64px 1fr;grid-template-columns:64px 1fr}.has-image .wc-block-review-list-item__meta{-ms-grid-column:2;grid-column:2}.wc-block-review-list-item__image{height:48px;-ms-grid-column:1;grid-column:1;-ms-grid-row:1;-ms-grid-row-span:2;grid-row:1/3;width:48px;position:relative}.wc-block-review-list-item__image img{width:100%;height:100%;display:block}.wc-block-review-list-item__verified{width:21px;height:21px;text-indent:21px;margin:0;line-height:21px;overflow:hidden;position:absolute;right:-7px;bottom:-7px}.wc-block-review-list-item__verified:before{width:21px;height:21px;background:transparent url('data:image/svg+xml;utf8,%3Csvg xmlns="http://www.w3.org/2000/svg" width="21" height="21" fill="none"%3E%3Ccircle cx="10.5" cy="10.5" r="10.5" fill="%23fff"/%3E%3Cpath fill="%23008A21" fill-rule="evenodd" d="M2.1667 10.5003c0-4.6 3.7333-8.3333 8.3333-8.3333s8.3334 3.7333 8.3334 8.3333S15.1 18.8337 10.5 18.8337s-8.3333-3.7334-8.3333-8.3334zm2.5 0l4.1666 4.1667 7.5001-7.5-1.175-1.1833-6.325 6.325-2.9917-2.9834-1.175 1.175z" clip-rule="evenodd"/%3E%3Cmask id="a" width="17" height="17" x="2" y="2" maskUnits="userSpaceOnUse"%3E%3Cpath fill="%23fff" fill-rule="evenodd" d="M2.1667 10.5003c0-4.6 3.7333-8.3333 8.3333-8.3333s8.3334 3.7333 8.3334 8.3333S15.1 18.8337 10.5 18.8337s-8.3333-3.7334-8.3333-8.3334zm2.5 0l4.1666 4.1667 7.5001-7.5-1.175-1.1833-6.325 6.325-2.9917-2.9834-1.175 1.175z" clip-rule="evenodd"/%3E%3C/mask%3E%3Cg mask="url(%23a)"%3E%3Cpath fill="%23008A21" d="M.5.5h20v20H.5z"/%3E%3C/g%3E%3C/svg%3E') 50% no-repeat;display:block;content:""}.wc-block-review-list-item__meta{display:flex;align-items:center;flex-flow:row wrap}.wc-block-review-list-item__meta:after{order:3;content:"";flex-basis:100%}.wc-block-review-list-item__author,.wc-block-review-list-item__product{display:block;font-weight:700;order:1;margin-right:8px}.wc-block-review-list-item__product+.wc-block-review-list-item__author{font-weight:400;color:grey;order:4}.wc-block-review-list-item__published-date{color:grey;order:5}.wc-block-review-list-item__author+.wc-block-review-list-item__published-date:before{content:"";display:inline-block;margin-right:8px;border-right:1px solid #ddd;height:1em;vertical-align:middle}.wc-block-review-list-item__author:first-child+.wc-block-review-list-item__published-date:before,.wc-block-review-list-item__rating+.wc-block-review-list-item__author+.wc-block-review-list-item__published-date:before{display:none}.wc-block-review-list-item__rating{order:2}.wc-block-review-list-item__rating>.wc-block-review-list-item__rating__stars{display:inline-block;top:0;overflow:hidden;position:relative;height:1.618em;line-height:1.618;font-size:1em;width:5.3em;font-family:star;font-weight:400;vertical-align:top}.wc-block-review-list-item__rating>.wc-block-review-list-item__rating__stars:before{content:"\53\53\53\53\53";opacity:.25;float:left;top:0;left:0;position:absolute}.wc-block-review-list-item__rating>.wc-block-review-list-item__rating__stars span{overflow:hidden;float:left;top:0;left:0;position:absolute;padding-top:1.5em}.wc-block-review-list-item__rating>.wc-block-review-list-item__rating__stars span:before{content:"\53\53\53\53\53";top:0;position:absolute;left:0;color:#e6a237}
|
10 |
@-webkit-keyframes loading-fade{0%{opacity:.7}50%{opacity:1}to{opacity:.7}}@keyframes loading-fade{0%{opacity:.7}50%{opacity:1}to{opacity:.7}}.editor-styles .wc-block-review-list,.wc-block-review-list{margin:0}
|
11 |
@-webkit-keyframes loading-fade{0%{opacity:.7}50%{opacity:1}to{opacity:.7}}@keyframes loading-fade{0%{opacity:.7}50%{opacity:1}to{opacity:.7}}.wc-block-order-select{margin-bottom:12px}.wc-block-order-select__label{margin-right:12px;display:inline-block;font-weight:400}
|
12 |
@-webkit-keyframes loading-fade{0%{opacity:.7}50%{opacity:1}to{opacity:.7}}@keyframes loading-fade{0%{opacity:.7}50%{opacity:1}to{opacity:.7}}.wc-block-review-order-select{text-align:right}
|
13 |
@-webkit-keyframes loading-fade{0%{opacity:.7}50%{opacity:1}to{opacity:.7}}@keyframes loading-fade{0%{opacity:.7}50%{opacity:1}to{opacity:.7}}.components-toggle-button-control .components-base-control__field{flex-wrap:wrap}.components-toggle-button-control .components-toggle-button-control__label{width:100%;margin-bottom:8px;display:block}.components-toggle-button-control .components-base-control__help{margin-top:0}
|
|