File "handpicked-products.js"

Full Path: /home/vantageo/public_html/cache/cache/cache/.wp-cli/wp-content/plugins/woocommerce/packages/woocommerce-blocks/build/handpicked-products.js
File size: 20.7 KB
MIME-type: text/plain
Charset: utf-8

this.wc=this.wc||{},this.wc.blocks=this.wc.blocks||{},this.wc.blocks["handpicked-products"]=function(t){function e(e){for(var r,u,i=e[0],s=e[1],a=e[2],p=0,d=[];p<i.length;p++)u=i[p],Object.prototype.hasOwnProperty.call(o,u)&&o[u]&&d.push(o[u][0]),o[u]=0;for(r in s)Object.prototype.hasOwnProperty.call(s,r)&&(t[r]=s[r]);for(l&&l(e);d.length;)d.shift()();return c.push.apply(c,a||[]),n()}function n(){for(var t,e=0;e<c.length;e++){for(var n=c[e],r=!0,i=1;i<n.length;i++){var s=n[i];0!==o[s]&&(r=!1)}r&&(c.splice(e--,1),t=u(u.s=n[0]))}return t}var r={},o={25:0},c=[];function u(e){if(r[e])return r[e].exports;var n=r[e]={i:e,l:!1,exports:{}};return t[e].call(n.exports,n,n.exports,u),n.l=!0,n.exports}u.m=t,u.c=r,u.d=function(t,e,n){u.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},u.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},u.t=function(t,e){if(1&e&&(t=u(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(u.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var r in t)u.d(n,r,function(e){return t[e]}.bind(null,r));return n},u.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return u.d(e,"a",e),e},u.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},u.p="";var i=window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[],s=i.push.bind(i);i.push=e,i=i.slice();for(var a=0;a<i.length;a++)e(i[a]);var l=s;return c.push([573,0]),n()}({0:function(t,e){!function(){t.exports=this.wp.element}()},1:function(t,e){!function(){t.exports=this.wp.i18n}()},106:function(t,e){},107:function(t,e){},108:function(t,e){},109:function(t,e){},110:function(t,e){},111:function(t,e){},112:function(t,e){},113:function(t,e){},114:function(t,e){},115:function(t,e){},116:function(t,e){},117:function(t,e){},118:function(t,e){},12:function(t,e){!function(){t.exports=this.regeneratorRuntime}()},123:function(t,e,n){"use strict";var r=n(0),o=n(1),c=n(3);n(2);e.a=function(t){var e=t.value,n=t.setAttributes;return Object(r.createElement)(c.SelectControl,{label:Object(o.__)("Order products by",'woocommerce'),value:e,options:[{label:Object(o.__)("Newness - newest first",'woocommerce'),value:"date"},{label:Object(o.__)("Price - low to high",'woocommerce'),value:"price_asc"},{label:Object(o.__)("Price - high to low",'woocommerce'),value:"price_desc"},{label:Object(o.__)("Rating - highest first",'woocommerce'),value:"rating"},{label:Object(o.__)("Sales - most first",'woocommerce'),value:"popularity"},{label:Object(o.__)("Title - alphabetical",'woocommerce'),value:"title"},{label:Object(o.__)("Menu Order",'woocommerce'),value:"menu_order"}],onChange:function(t){return n({orderby:t})}})}},14:function(t,e,n){"use strict";n.d(e,"m",(function(){return c})),n.d(e,"k",(function(){return u})),n.d(e,"l",(function(){return i})),n.d(e,"h",(function(){return a})),n.d(e,"c",(function(){return l})),n.d(e,"d",(function(){return p})),n.d(e,"g",(function(){return d})),n.d(e,"f",(function(){return b})),n.d(e,"j",(function(){return f})),n.d(e,"i",(function(){return g})),n.d(e,"a",(function(){return h})),n.d(e,"b",(function(){return O})),n.d(e,"e",(function(){return j})),n.d(e,"p",(function(){return m})),n.d(e,"q",(function(){return v})),n.d(e,"n",(function(){return y})),n.d(e,"o",(function(){return _}));var r,o=n(5),c=Object(o.getSetting)("wcBlocksConfig",{buildPhase:1,pluginUrl:"",productCount:0,restApiRoutes:{},wordCountType:"words"}),u=c.pluginUrl+"assets/",i=c.pluginUrl+"build/",s=c.buildPhase,a=null===(r=o.STORE_PAGES.shop)||void 0===r?void 0:r.permalink,l=o.STORE_PAGES.checkout.id,p=o.STORE_PAGES.checkout.permalink,d=o.STORE_PAGES.privacy.permalink,b=o.STORE_PAGES.privacy.title,f=o.STORE_PAGES.terms.permalink,g=o.STORE_PAGES.terms.title,h=o.STORE_PAGES.cart.id,O=o.STORE_PAGES.cart.permalink,j=o.STORE_PAGES.myaccount.permalink?o.STORE_PAGES.myaccount.permalink:Object(o.getSetting)("wpLoginUrl","/wp-login.php"),w=n(25),m=function(t,e){if(s>2)return Object(w.registerBlockType)(t,e)},v=function(t,e){if(s>1)return Object(w.registerBlockType)(t,e)},y=function(){return s>2},_=function(){return s>1}},175:function(t,e,n){"use strict";n.d(e,"a",(function(){return c}));var r=n(0),o=n(14),c=Object(r.createElement)("img",{src:o.k+"img/grid.svg",alt:"Grid Preview",width:"230",height:"250",style:{width:"100%"}})},19:function(t,e){!function(){t.exports=this.wp.apiFetch}()},20:function(t,e){!function(){t.exports=this.wp.url}()},21:function(t,e){!function(){t.exports=this.wp.data}()},22:function(t,e){!function(){t.exports=this.wp.blockEditor}()},25:function(t,e){!function(){t.exports=this.wp.blocks}()},26:function(t,e){!function(){t.exports=this.wp.htmlEntities}()},27:function(t,e){!function(){t.exports=this.moment}()},285:function(t,e,n){"use strict";var r=n(10),o=n.n(r),c=n(28),u=n.n(c),i=n(15),s=n.n(i),a=n(16),l=n.n(a),p=n(11),d=n.n(p),b=n(17),f=n.n(b),g=n(18),h=n.n(g),O=n(9),j=n.n(O),w=n(0),m=n(12),v=n.n(m),y=n(6),_=n(142),k=(n(2),n(14)),E=n(35),P=n(37);function S(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=j()(t);if(e){var o=j()(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return h()(this,n)}}var x=Object(_.a)((function(t){var e=function(e){f()(c,e);var n,r=S(c);function c(){var t;return s()(this,c),(t=r.apply(this,arguments)).state={list:[],loading:!0},t.setError=t.setError.bind(d()(t)),t.debouncedOnSearch=Object(y.debounce)(t.onSearch.bind(d()(t)),400),t}return l()(c,[{key:"componentDidMount",value:function(){var t=this,e=this.props.selected;Object(E.h)({selected:e}).then((function(e){t.setState({list:e,loading:!1})})).catch(this.setError)}},{key:"componentWillUnmount",value:function(){this.debouncedOnSearch.cancel()}},{key:"onSearch",value:function(t){var e=this,n=this.props.selected;Object(E.h)({selected:n,search:t}).then((function(t){e.setState({list:t,loading:!1})})).catch(this.setError)}},{key:"setError",value:(n=u()(v.a.mark((function t(e){var n;return v.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,Object(P.a)(e);case 2:n=t.sent,this.setState({list:[],loading:!1,error:n});case 4:case"end":return t.stop()}}),t,this)}))),function(t){return n.apply(this,arguments)})},{key:"render",value:function(){var e=this,n=this.state,r=n.error,c=n.list,u=n.loading;return Object(w.createElement)(t,o()({},this.props,{error:r,products:c,isLoading:u,onSearch:k.m.productCount>100?function(t){e.setState({loading:!0}),e.debouncedOnSearch(t)}:null}))}}]),c}(w.Component);return e.defaultProps={selected:[]},e}),"withSearchedProducts");e.a=x},3:function(t,e){!function(){t.exports=this.wp.components}()},31:function(t,e){!function(){t.exports=this.wp.primitives}()},34:function(t,e){!function(){t.exports=this.wp.dataControls}()},35:function(t,e,n){"use strict";n.d(e,"h",(function(){return b})),n.d(e,"e",(function(){return f})),n.d(e,"b",(function(){return g})),n.d(e,"i",(function(){return h})),n.d(e,"f",(function(){return O})),n.d(e,"c",(function(){return j})),n.d(e,"d",(function(){return w})),n.d(e,"g",(function(){return m})),n.d(e,"a",(function(){return v}));var r=n(4),o=n.n(r),c=n(20),u=n(19),i=n.n(u),s=n(6),a=n(5),l=n(14);function p(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function d(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?p(Object(n),!0).forEach((function(e){o()(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):p(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}var b=function(t){var e=t.selected,n=void 0===e?[]:e,r=t.search,o=void 0===r?"":r,u=t.queryArgs,a=function(t){var e=t.selected,n=void 0===e?[]:e,r=t.search,o=void 0===r?"":r,u=t.queryArgs,i=void 0===u?[]:u,s=l.m.productCount>100,a={per_page:s?100:0,catalog_visibility:"any",search:o,orderby:"title",order:"asc"},p=[Object(c.addQueryArgs)("/wc/store/products",d(d({},a),i))];return s&&n.length&&p.push(Object(c.addQueryArgs)("/wc/store/products",{catalog_visibility:"any",include:n})),p}({selected:n,search:o,queryArgs:void 0===u?[]:u});return Promise.all(a.map((function(t){return i()({path:t})}))).then((function(t){return Object(s.uniqBy)(Object(s.flatten)(t),"id").map((function(t){return d(d({},t),{},{parent:0})}))})).catch((function(t){throw t}))},f=function(t){return i()({path:"/wc/store/products/".concat(t)})},g=function(){return i()({path:"wc/store/products/attributes"})},h=function(t){return i()({path:"wc/store/products/attributes/".concat(t,"/terms")})},O=function(t){var e=t.selected,n=function(t){var e=t.selected,n=void 0===e?[]:e,r=t.search,o=Object(a.getSetting)("limitTags",!1),u=[Object(c.addQueryArgs)("wc/store/products/tags",{per_page:o?100:0,orderby:o?"count":"name",order:o?"desc":"asc",search:r})];return o&&n.length&&u.push(Object(c.addQueryArgs)("wc/store/products/tags",{include:n})),u}({selected:void 0===e?[]:e,search:t.search});return Promise.all(n.map((function(t){return i()({path:t})}))).then((function(t){return Object(s.uniqBy)(Object(s.flatten)(t),"id")}))},j=function(t){return i()({path:Object(c.addQueryArgs)("wc/store/products/categories",d({per_page:0},t))})},w=function(t){return i()({path:"wc/store/products/categories/".concat(t)})},m=function(t){return i()({path:Object(c.addQueryArgs)("wc/store/products",{per_page:0,type:"variation",parent:t})})},v=function(t,e){if(!t.title.raw)return t.slug;var n=1===e.filter((function(e){return e.title.raw===t.title.raw})).length;return t.title.raw+(n?"":" - ".concat(t.slug))}},37:function(t,e,n){"use strict";n.d(e,"a",(function(){return s})),n.d(e,"b",(function(){return a}));var r=n(28),o=n.n(r),c=n(12),u=n.n(c),i=n(1),s=function(){var t=o()(u.a.mark((function t(e){var n;return u.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if("function"!=typeof e.json){t.next=11;break}return t.prev=1,t.next=4,e.json();case 4:return n=t.sent,t.abrupt("return",{message:n.message,type:n.type||"api"});case 8:return t.prev=8,t.t0=t.catch(1),t.abrupt("return",{message:t.t0.message,type:"general"});case 11:return t.abrupt("return",{message:e.message,type:e.type||"general"});case 12:case"end":return t.stop()}}),t,null,[[1,8]])})));return function(e){return t.apply(this,arguments)}}(),a=function(t){if(t.data&&"rest_invalid_param"===t.code){var e=Object.values(t.data.params);if(e[0])return e[0]}return(null==t?void 0:t.message)||Object(i.__)("Something went wrong. Please contact us to get assistance.",'woocommerce')}},42:function(t,e){!function(){t.exports=this.wp.escapeHtml}()},43:function(t,e,n){"use strict";var r=n(0),o=n(1),c=(n(2),n(42));e.a=function(t){var e,n,u,i=t.error;return Object(r.createElement)("div",{className:"wc-block-error-message"},(n=(e=i).message,u=e.type,n?"general"===u?Object(r.createElement)("span",null,Object(o.__)("The following error was returned",'woocommerce'),Object(r.createElement)("br",null),Object(r.createElement)("code",null,Object(c.escapeHTML)(n))):"api"===u?Object(r.createElement)("span",null,Object(o.__)("The following error was returned from the API",'woocommerce'),Object(r.createElement)("br",null),Object(r.createElement)("code",null,Object(c.escapeHTML)(n))):n:Object(o.__)("An unknown error occurred which prevented the block from being updated.",'woocommerce')))}},48:function(t,e){!function(){t.exports=this.wp.keycodes}()},5:function(t,e){!function(){t.exports=this.wc.wcSettings}()},54:function(t,e){!function(){t.exports=this.wp.hooks}()},57:function(t,e,n){"use strict";var r=n(4),o=n.n(r),c=n(23),u=n.n(c),i=n(0);function s(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}e.a=function(t){var e=t.srcElement,n=t.size,r=void 0===n?24:n,c=u()(t,["srcElement","size"]);return Object(i.isValidElement)(e)?Object(i.cloneElement)(e,function(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?s(Object(n),!0).forEach((function(e){o()(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):s(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}({width:r,height:r},c)):null}},573:function(t,e,n){t.exports=n(908)},574:function(t,e){},6:function(t,e){!function(){t.exports=this.lodash}()},66:function(t,e){!function(){t.exports=this.wp.deprecated}()},67:function(t,e){!function(){t.exports=this.wp.serverSideRender}()},70:function(t,e){!function(){t.exports=this.wp.dom}()},78:function(t,e){!function(){t.exports=this.ReactDOM}()},79:function(t,e,n){"use strict";var r=n(4),o=n.n(r),c=n(0),u=n(1),i=(n(2),n(3));function s(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function a(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?s(Object(n),!0).forEach((function(e){o()(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):s(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}e.a=function(t){var e=t.onChange,n=t.settings,r=n.button,o=n.price,s=n.rating,l=n.title;return Object(c.createElement)(c.Fragment,null,Object(c.createElement)(i.ToggleControl,{label:Object(u.__)("Product title",'woocommerce'),help:l?Object(u.__)("Product title is visible.",'woocommerce'):Object(u.__)("Product title is hidden.",'woocommerce'),checked:l,onChange:function(){return e(a(a({},n),{},{title:!l}))}}),Object(c.createElement)(i.ToggleControl,{label:Object(u.__)("Product price",'woocommerce'),help:o?Object(u.__)("Product price is visible.",'woocommerce'):Object(u.__)("Product price is hidden.",'woocommerce'),checked:o,onChange:function(){return e(a(a({},n),{},{price:!o}))}}),Object(c.createElement)(i.ToggleControl,{label:Object(u.__)("Product rating",'woocommerce'),help:s?Object(u.__)("Product rating is visible.",'woocommerce'):Object(u.__)("Product rating is hidden.",'woocommerce'),checked:s,onChange:function(){return e(a(a({},n),{},{rating:!s}))}}),Object(c.createElement)(i.ToggleControl,{label:Object(u.__)("Add to Cart button",'woocommerce'),help:r?Object(u.__)("Add to Cart button is visible.",'woocommerce'):Object(u.__)("Add to Cart button is hidden.",'woocommerce'),checked:r,onChange:function(){return e(a(a({},n),{},{button:!r}))}}))}},8:function(t,e){!function(){t.exports=this.React}()},83:function(t,e){!function(){t.exports=this.wp.viewport}()},84:function(t,e){!function(){t.exports=this.wp.date}()},908:function(t,e,n){"use strict";n.r(e);var r=n(0),o=n(1),c=n(25),u=n(5),i=n(57),s=n(31),a=Object(r.createElement)(s.SVG,{xmlns:"http://www.w3.org/2000/SVG",viewBox:"0 0 24 24"},Object(r.createElement)("path",{fill:"none",d:"M0 0h24v24H0V0z"}),Object(r.createElement)("path",{d:"M16.66 4.52l2.83 2.83-2.83 2.83-2.83-2.83 2.83-2.83M9 5v4H5V5h4m10 10v4h-4v-4h4M9 15v4H5v-4h4m7.66-13.31L11 7.34 16.66 13l5.66-5.66-5.66-5.65zM11 3H3v8h8V3zm10 10h-8v8h8v-8zm-10 0H3v8h8v-8z"})),l=(n(574),n(15)),p=n.n(l),d=n(16),b=n.n(d),f=n(17),g=n.n(f),h=n(18),O=n.n(h),j=n(9),w=n.n(j),m=n(22),v=n(67),y=n.n(v),_=n(3),k=(n(2),n(79)),E=n(45),P=n(285),S=n(43),x=function(t){var e=t.error,n=t.onChange,c=t.onSearch,u=t.selected,i=t.products,s=t.isLoading,a={clear:Object(o.__)("Clear all products",'woocommerce'),list:Object(o.__)("Products",'woocommerce'),noItems:Object(o.__)("Your store doesn't have any products.",'woocommerce'),search:Object(o.__)("Search for products to display",'woocommerce'),selected:function(t){return Object(o.sprintf)(Object(o._n)("%d product selected","%d products selected",t,'woocommerce'),t)},updated:Object(o.__)("Product search results updated.",'woocommerce')};return e?Object(r.createElement)(S.a,{error:e}):Object(r.createElement)(E.a,{className:"woocommerce-products",list:i,isLoading:s,selected:i.filter((function(t){var e=t.id;return u.includes(e)})),onSearch:c,onChange:n,messages:a})};x.defaultProps={selected:[],products:[],isLoading:!0};var C=Object(P.a)(x),A=n(123),T=n(175);function R(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=w()(t);if(e){var o=w()(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return O()(this,n)}}var B=function(t){g()(n,t);var e=R(n);function n(){return p()(this,n),e.apply(this,arguments)}return b()(n,[{key:"getInspectorControls",value:function(){var t=this.props,e=t.attributes,n=t.setAttributes,c=e.columns,i=e.contentVisibility,s=e.orderby,a=e.alignButtons;return Object(r.createElement)(m.InspectorControls,{key:"inspector"},Object(r.createElement)(_.PanelBody,{title:Object(o.__)("Layout",'woocommerce'),initialOpen:!0},Object(r.createElement)(_.RangeControl,{label:Object(o.__)("Columns",'woocommerce'),value:c,onChange:function(t){return n({columns:t})},min:Object(u.getSetting)("min_columns",1),max:Object(u.getSetting)("max_columns",6)}),Object(r.createElement)(_.ToggleControl,{label:Object(o.__)("Align Buttons",'woocommerce'),help:a?Object(o.__)("Buttons are aligned vertically.",'woocommerce'):Object(o.__)("Buttons follow content.",'woocommerce'),checked:a,onChange:function(){return n({alignButtons:!a})}})),Object(r.createElement)(_.PanelBody,{title:Object(o.__)("Content",'woocommerce'),initialOpen:!0},Object(r.createElement)(k.a,{settings:i,onChange:function(t){return n({contentVisibility:t})}})),Object(r.createElement)(_.PanelBody,{title:Object(o.__)("Order By",'woocommerce'),initialOpen:!1},Object(r.createElement)(A.a,{setAttributes:n,value:s})),Object(r.createElement)(_.PanelBody,{title:Object(o.__)("Products",'woocommerce'),initialOpen:!1},Object(r.createElement)(C,{selected:e.products,onChange:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],e=t.map((function(t){return t.id}));n({products:e})}})))}},{key:"renderEditMode",value:function(){var t=this.props,e=t.attributes,n=t.debouncedSpeak,c=t.setAttributes;return Object(r.createElement)(_.Placeholder,{icon:Object(r.createElement)(i.a,{srcElement:a}),label:Object(o.__)("Hand-picked Products",'woocommerce'),className:"wc-block-products-grid wc-block-handpicked-products"},Object(o.__)("Display a selection of hand-picked products in a grid.",'woocommerce'),Object(r.createElement)("div",{className:"wc-block-handpicked-products__selection"},Object(r.createElement)(C,{selected:e.products,onChange:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],e=t.map((function(t){return t.id}));c({products:e})}}),Object(r.createElement)(_.Button,{isPrimary:!0,onClick:function(){c({editMode:!1}),n(Object(o.__)("Showing Hand-picked Products block preview.",'woocommerce'))}},Object(o.__)("Done",'woocommerce'))))}},{key:"render",value:function(){var t=this.props,e=t.attributes,n=t.name,c=t.setAttributes,u=e.editMode;return e.isPreview?T.a:Object(r.createElement)(r.Fragment,null,Object(r.createElement)(m.BlockControls,null,Object(r.createElement)(_.ToolbarGroup,{controls:[{icon:"edit",title:Object(o.__)("Edit"),onClick:function(){return c({editMode:!u})},isActive:u}]})),this.getInspectorControls(),u?this.renderEditMode():Object(r.createElement)(_.Disabled,null,Object(r.createElement)(y.a,{block:n,attributes:e})))}}]),n}(r.Component),M=Object(_.withSpokenMessages)(B);Object(c.registerBlockType)("woocommerce/handpicked-products",{title:Object(o.__)("Hand-picked Products",'woocommerce'),icon:{src:Object(r.createElement)(i.a,{srcElement:a}),foreground:"#96588a"},category:"woocommerce",keywords:[Object(o.__)("Handpicked Products",'woocommerce'),Object(o.__)("WooCommerce",'woocommerce')],description:Object(o.__)("Display a selection of hand-picked products in a grid.",'woocommerce'),supports:{align:["wide","full"],html:!1},example:{attributes:{isPreview:!0}},attributes:{align:{type:"string"},columns:{type:"number",default:Object(u.getSetting)("default_columns",3)},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},isPreview:{type:"boolean",default:!1}},edit:function(t){return Object(r.createElement)(M,t)},save:function(){return null}})}});