!function(e){var t={};function r(n){if(t[n])return t[n].exports;var o=t[n]={i:n,l:!1,exports:{}};return e[n].call(o.exports,o,o.exports,r),o.l=!0,o.exports}r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)r.d(n,o,function(t){return e[t]}.bind(null,o));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=8)}([function(e,t){e.exports=wp.i18n},function(e,t){e.exports=wp.date},function(e,t){e.exports=wp.blocks},function(e,t){e.exports=wp.element},function(e,t){e.exports=wp.components},function(e,t){e.exports=wp.editor},,,function(e,t,r){"use strict";r.r(t);var n=r(2),o=r(0),c=r(1),a=r(3),u=r(5),l=r(4);function i(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var r=[],n=!0,o=!1,c=void 0;try{for(var a,u=e[Symbol.iterator]();!(n=(a=u.next()).done)&&(r.push(a.value),!t||r.length!==t);n=!0);}catch(e){o=!0,c=e}finally{try{n||null==u.return||u.return()}finally{if(o)throw c}}return r}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return f(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return f(e,t)}(e,t)||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.")}()}function f(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}var s=function(e){var t=e.attributes,r=e.setAttributes,n=(e.isSelected,t.content),f=i(Object(a.useState)(!1),2),s=(f[0],f[1],i(Object(a.useState)("jS F Y"),2)),p=s[0],m=s[1];return r({content:Object(c.format)(p)}),wp.element.createElement(wp.element.Fragment,null,wp.element.createElement(u.InspectorControls,null,wp.element.createElement(l.PanelBody,{title:Object(o.__)("Format Settings","shortcode-for-current-date")},wp.element.createElement(l.TextControl,{label:Object(o.__)("Date format","shortcode-for-current-date"),value:p,onChange:function(e){m(e),r({content:Object(c.format)(e)})}}),wp.element.createElement("p",null,"Check the"," ",wp.element.createElement("a",{href:"https://www.php.net/manual/en/datetime.formats.date.php",rel:"noopener noreferrer",target:"_blank"},"date formats")," ","you can use."))),wp.element.createElement("span",null,n))};Object(n.registerBlockType)("shortcode-for-current-date/block",{title:Object(o.__)("Current Date","shortcode-for-current-date"),description:Object(o.__)("Displays current date","shortcode-for-current-date"),category:"common",icon:"calendar-alt",attributes:{content:{type:"string",source:"html",selector:"span"}},transforms:{from:[{type:"prefix",prefix:"[current_date]",transform:function(){return Object(n.createBlock)("shortcode-for-current-date/block")}}],to:[{type:"block",blocks:["core/paragraph"],transform:function(e){var t=e.content;return Object(n.createBlock)("core/paragraph",{content:t})}}]},edit:s,save:function(e){var t=e.attributes.content;return wp.element.createElement("span",null,t)}})}]);
//# sourceMappingURL=editor.js.map