!function(e){var t={};function n(o){if(t[o])return t[o].exports;var r=t[o]={i:o,l:!1,exports:{}};return e[o].call(r.exports,r,r.exports,n),r.l=!0,r.exports}n.m=e,n.c=t,n.d=function(e,t,o){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:o})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var o=Object.create(null);if(n.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)n.d(o,r,function(t){return e[t]}.bind(null,r));return o},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=16)}([function(e,t){e.exports=window.wp.element},function(e,t){e.exports=window.wp.components},function(e,t){e.exports=window.wp.i18n},function(e,t){e.exports=window.wp.blocks},function(e,t,n){var o=n(10),r=n(11),u=n(12),l=n(14);e.exports=function(e,t){return o(e)||r(e,t)||u(e,t)||l()},e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t){e.exports=function(e){throw new TypeError('"'+e+'" is read-only')},e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t){e.exports=window.wp.serverSideRender},function(e,t){e.exports=window.wp.editor},function(e,t){e.exports=window.wp.date},function(e,t){e.exports=window.wp.compose},function(e,t){e.exports=function(e){if(Array.isArray(e))return e},e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t){e.exports=function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var o,r,u=[],l=!0,s=!1;try{for(n=n.call(e);!(l=(o=n.next()).done)&&(u.push(o.value),!t||u.length!==t);l=!0);}catch(e){s=!0,r=e}finally{try{l||null==n.return||n.return()}finally{if(s)throw r}}return u}},e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t,n){var o=n(13);e.exports=function(e,t){if(e){if("string"==typeof e)return o(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?o(e,t):void 0}},e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t){e.exports=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=new Array(t);n<t;n++)o[n]=e[n];return o},e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t){e.exports=function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")},e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t){e.exports=window.wp.data},function(e,t,n){"use strict";n.r(t);var o=n(3),r=n(2),u=(n(8),n(9),n(4)),l=n.n(u),s=n(5),a=n.n(s),i=n(0),c=n(6),p=n.n(c),f=n(1),b=n(7),d=(n(15),wp.compose.withState,[{label:"Select your networks",value:null},{label:"LinkedIn",value:"linkedin"},{label:"Twitter",value:"twitter"},{label:"Facebook",value:"facebook"},{label:"Mix",value:"mix"}]),y=function(e){var t=e.attributes,n=t.counters,o=t.buttons,u=(t.network,t.url),s=(e.className,e.setAttributes),c=Object(i.useState)(!1),y=l()(c,2),x=y[0],w=y[1];Object(i.createElement)(b.InspectorControls,{key:"inspector"},Object(i.createElement)(f.PanelBody,{key:"formating-option",title:Object(r.__)("Buttons Options")},Object(i.createElement)(f.PanelRow,{key:"counters"},Object(i.createElement)(f.ToggleControl,{key:"counters-options",help:x?"Displays counters.":"Does not display counters.",label:Object(r.__)("Display Counters"),checked:x,value:n,onLoad:function(){Object(i.useState)(!1),a()("hasCounters")},onChange:function(){w((function(e){return!e}))}})),Object(i.createElement)(f.PanelRow,{key:"buttons"},Object(i.createElement)(f.CustomSelectControl,{__nextUnconstrainedWidth:!0,key:"buttons-options",multiple:!0,label:Object(r.__)("Buttons"),value:o,options:d,onChange:function(t){e.setAttributes({buttons:t}),console.log(t)}})),Object(i.createElement)(f.PanelRow,{key:"url-to-share-row"},Object(i.createElement)(f.TextControl,{key:"url-to-share",label:Object(r.__)("URL of the page to share (current post by default)"),value:u||"",onChange:function(e){return s({url:e})}}))));return[Object(i.createElement)("div",{key:"nobs-container",className:e.className},Object(i.createElement)(p.a,{block:"nobs/share-buttons",attributes:e.attributes}))]};Object(o.registerBlockType)("nobs/share-buttons",{title:"Nobs • Share Buttons (beta)",icon:"share",category:"layout",attributes:{counters:{type:"number",default:0},buttons:{type:"array",default:[]},network:{type:"string",default:""},url:{type:"string",default:""}},edit:y,save:function(){return null}})}]);