/******/ (function(modules) { // webpackBootstrap
/******/ // The module cache
/******/ var installedModules = {};
/******/
/******/ // The require function
/******/ function __webpack_require__(moduleId) {
/******/
/******/ // Check if module is in cache
/******/ if(installedModules[moduleId]) {
/******/ return installedModules[moduleId].exports;
/******/ }
/******/ // Create a new module (and put it into the cache)
/******/ var module = installedModules[moduleId] = {
/******/ i: moduleId,
/******/ l: false,
/******/ exports: {}
/******/ };
/******/
/******/ // Execute the module function
/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
/******/
/******/ // Flag the module as loaded
/******/ module.l = true;
/******/
/******/ // Return the exports of the module
/******/ return module.exports;
/******/ }
/******/
/******/
/******/ // expose the modules object (__webpack_modules__)
/******/ __webpack_require__.m = modules;
/******/
/******/ // expose the module cache
/******/ __webpack_require__.c = installedModules;
/******/
/******/ // define getter function for harmony exports
/******/ __webpack_require__.d = function(exports, name, getter) {
/******/ if(!__webpack_require__.o(exports, name)) {
/******/ Object.defineProperty(exports, name, { enumerable: true, get: getter });
/******/ }
/******/ };
/******/
/******/ // define __esModule on exports
/******/ __webpack_require__.r = function(exports) {
/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
/******/ }
/******/ Object.defineProperty(exports, '__esModule', { value: true });
/******/ };
/******/
/******/ // create a fake namespace object
/******/ // mode & 1: value is a module id, require it
/******/ // mode & 2: merge all properties of value into the ns
/******/ // mode & 4: return value when already ns object
/******/ // mode & 8|1: behave like require
/******/ __webpack_require__.t = function(value, mode) {
/******/ if(mode & 1) value = __webpack_require__(value);
/******/ if(mode & 8) return value;
/******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;
/******/ var ns = Object.create(null);
/******/ __webpack_require__.r(ns);
/******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value });
/******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));
/******/ return ns;
/******/ };
/******/
/******/ // getDefaultExport function for compatibility with non-harmony modules
/******/ __webpack_require__.n = function(module) {
/******/ var getter = module && module.__esModule ?
/******/ function getDefault() { return module['default']; } :
/******/ function getModuleExports() { return module; };
/******/ __webpack_require__.d(getter, 'a', getter);
/******/ return getter;
/******/ };
/******/
/******/ // Object.prototype.hasOwnProperty.call
/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
/******/
/******/ // __webpack_public_path__
/******/ __webpack_require__.p = "";
/******/
/******/
/******/ // Load entry module and return exports
/******/ return __webpack_require__(__webpack_require__.s = 0);
/******/ })
/************************************************************************/
/******/ ({
/***/ "./assets/blocks/accordion/block.jsx":
/*!*******************************************!*\
!*** ./assets/blocks/accordion/block.jsx ***!
\*******************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
eval("\n\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nvar _typeof = typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; };\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nfunction _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } else { return Array.from(arr); } }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\n(function (wpI18n, wpBlocks, wpElement, wpEditor, wpComponents) {\n var __ = wpI18n.__;\n var Component = wpElement.Component,\n Fragment = wpElement.Fragment;\n var registerBlockType = wpBlocks.registerBlockType;\n var InspectorControls = wpEditor.InspectorControls,\n RichText = wpEditor.RichText,\n ColorPalette = wpEditor.ColorPalette;\n var RangeControl = wpComponents.RangeControl,\n PanelBody = wpComponents.PanelBody,\n PanelColor = wpComponents.PanelColor,\n BaseControl = wpComponents.BaseControl,\n SelectControl = wpComponents.SelectControl,\n Dashicon = wpComponents.Dashicon,\n Tooltip = wpComponents.Tooltip;\n\n\n var HEADER_ICONS = {\n plus: React.createElement(\n Fragment,\n null,\n React.createElement(\"path\", { fill: \"none\", d: \"M0,0h24v24H0V0z\" }),\n React.createElement(\"path\", { d: \"M19,13h-6v6h-2v-6H5v-2h6V5h2v6h6V13z\" })\n ),\n plusCircle: React.createElement(\n Fragment,\n null,\n React.createElement(\"path\", { fill: \"none\", d: \"M0,0h24v24H0V0z\" }),\n React.createElement(\"path\", { d: \"M12,2C6.48,2,2,6.48,2,12s4.48,10,10,10s10-4.48,10-10S17.52,2,12,2z M17,13h-4v4h-2v-4H7v-2h4V7h2v4h4V13z\" })\n ),\n plusCircleOutline: React.createElement(\n Fragment,\n null,\n React.createElement(\"path\", { fill: \"none\", d: \"M0,0h24v24H0V0z\" }),\n React.createElement(\"path\", { d: \"M13,7h-2v4H7v2h4v4h2v-4h4v-2h-4V7z M12,2C6.48,2,2,6.48,2,12s4.48,10,10,10s10-4.48,10-10S17.52,2,12,2z M12,20 c-4.41,0-8-3.59-8-8s3.59-8,8-8s8,3.59,8,8S16.41,20,12,20z\" })\n ),\n plusBox: React.createElement(\n Fragment,\n null,\n React.createElement(\"path\", { fill: \"none\", d: \"M0,0h24v24H0V0z\" }),\n React.createElement(\"path\", { d: \"M19,3H5C3.89,3,3,3.9,3,5v14c0,1.1,0.89,2,2,2h14c1.1,0,2-0.9,2-2V5C21,3.9,20.1,3,19,3z M19,19H5V5h14V19z\" }),\n React.createElement(\"polygon\", { points: \"11,17 13,17 13,13 17,13 17,11 13,11 13,7 11,7 11,11 7,11 7,13 11,13\" })\n ),\n unfold: React.createElement(\n Fragment,\n null,\n React.createElement(\"path\", { fill: \"none\", d: \"M0,0h24v24H0V0z\" }),\n React.createElement(\"path\", { d: \"M12,5.83L15.17,9l1.41-1.41L12,3L7.41,7.59L8.83,9L12,5.83z M12,18.17L8.83,15l-1.41,1.41L12,21l4.59-4.59L15.17,15 L12,18.17z\" })\n ),\n threeDots: React.createElement(\n Fragment,\n null,\n React.createElement(\"path\", { fill: \"none\", d: \"M0,0h24v24H0V0z\" }),\n React.createElement(\"path\", { d: \"M6,10c-1.1,0-2,0.9-2,2s0.9,2,2,2s2-0.9,2-2S7.1,10,6,10z M18,10c-1.1,0-2,0.9-2,2s0.9,2,2,2s2-0.9,2-2S19.1,10,18,10z M12,10c-1.1,0-2,0.9-2,2s0.9,2,2,2s2-0.9,2-2S13.1,10,12,10z\" })\n ),\n arrowDown: React.createElement(\n Fragment,\n null,\n React.createElement(\"path\", { opacity: \"0.87\", fill: \"none\", d: \"M24,24H0L0,0l24,0V24z\" }),\n React.createElement(\"path\", { d: \"M16.59,8.59L12,13.17L7.41,8.59L6,10l6,6l6-6L16.59,8.59z\" })\n )\n };\n\n var AdvAccordion = function (_Component) {\n _inherits(AdvAccordion, _Component);\n\n function AdvAccordion() {\n _classCallCheck(this, AdvAccordion);\n\n var _this = _possibleConstructorReturn(this, (AdvAccordion.__proto__ || Object.getPrototypeOf(AdvAccordion)).apply(this, arguments));\n\n _this.state = {\n currentAccordion: null\n };\n return _this;\n }\n\n _createClass(AdvAccordion, [{\n key: \"componentWillMount\",\n value: function componentWillMount() {\n var _props = this.props,\n attributes = _props.attributes,\n setAttributes = _props.setAttributes;\n\n var currentBlockConfig = advgbDefaultConfig['advgb-accordion'];\n\n // No override attributes of blocks inserted before\n if (attributes.changed !== true) {\n if (currentBlockConfig !== undefined && (typeof currentBlockConfig === \"undefined\" ? \"undefined\" : _typeof(currentBlockConfig)) === 'object') {\n Object.keys(currentBlockConfig).map(function (attribute) {\n attributes[attribute] = currentBlockConfig[attribute];\n });\n\n // Finally set changed attribute to true, so we don't modify anything again\n setAttributes({ changed: true });\n }\n }\n }\n }, {\n key: \"componentDidMount\",\n value: function componentDidMount() {\n this.initAccordion();\n }\n }, {\n key: \"componentDidUpdate\",\n value: function componentDidUpdate(prevProps) {\n if (prevProps.attributes.items.length < this.props.attributes.items.length) {\n this.initAccordion(true);\n }\n\n if (this.props.attributes.items.length === 0) {\n this.props.setAttributes({\n items: [{\n header: 'Header 1',\n body: 'At least one accordion must remaining, to remove block use \"Remove Block\" button from right menu.'\n }]\n });\n }\n }\n }, {\n key: \"initAccordion\",\n value: function initAccordion() {\n var refresh = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;\n\n if (typeof jQuery !== \"undefined\") {\n if (!refresh) {\n jQuery(\"#block-\" + this.props.clientId + \" .advgb-accordion-block\").accordion({\n header: \".advgb-accordion-header\",\n heightStyle: \"content\"\n });\n } else {\n jQuery(\"#block-\" + this.props.clientId + \" .advgb-accordion-block\").accordion('refresh');\n }\n\n jQuery(\"#block-\" + this.props.clientId + \" .advgb-accordion-block h4\").on('keydown', function (e) {\n e.stopPropagation();\n });\n }\n }\n }, {\n key: \"updateAccordion\",\n value: function updateAccordion(value, index) {\n var _this2 = this;\n\n var _props2 = this.props,\n attributes = _props2.attributes,\n setAttributes = _props2.setAttributes;\n var items = attributes.items;\n\n\n var newItems = items.map(function (item, thisIndex) {\n if (index === thisIndex) {\n if (value.body) {\n if (value.body.length !== item.body.length) {\n _this2.initAccordion(true);\n }\n }\n\n item = _extends({}, item, value);\n }\n\n return item;\n });\n\n setAttributes({ items: newItems });\n }\n }, {\n key: \"render\",\n value: function render() {\n var _this3 = this;\n\n var _props3 = this.props,\n isSelected = _props3.isSelected,\n attributes = _props3.attributes,\n setAttributes = _props3.setAttributes;\n var items = attributes.items,\n headerBgColor = attributes.headerBgColor,\n headerTextColor = attributes.headerTextColor,\n headerIcon = attributes.headerIcon,\n headerIconColor = attributes.headerIconColor,\n bodyBgColor = attributes.bodyBgColor,\n bodyTextColor = attributes.bodyTextColor,\n borderStyle = attributes.borderStyle,\n borderWidth = attributes.borderWidth,\n borderColor = attributes.borderColor,\n borderRadius = attributes.borderRadius;\n\n\n return React.createElement(\n Fragment,\n null,\n React.createElement(\n InspectorControls,\n null,\n React.createElement(\n PanelBody,\n { title: __('Header Settings') },\n React.createElement(\n PanelColor,\n { title: __('Background Color'), colorValue: headerBgColor, initialOpen: false },\n React.createElement(ColorPalette, {\n value: headerBgColor,\n onChange: function onChange(value) {\n return setAttributes({ headerBgColor: value });\n }\n })\n ),\n React.createElement(\n PanelColor,\n { title: __('Text Color'), colorValue: headerTextColor, initialOpen: false },\n React.createElement(ColorPalette, {\n value: headerTextColor,\n onChange: function onChange(value) {\n return setAttributes({ headerTextColor: value });\n }\n })\n ),\n React.createElement(\n PanelBody,\n { title: __('Header Icon') },\n React.createElement(\n BaseControl,\n { label: __('Icon Style') },\n React.createElement(\n \"div\",\n { className: \"advgb-icon-items-wrapper\" },\n Object.keys(HEADER_ICONS).map(function (key, index) {\n return React.createElement(\n \"div\",\n { className: \"advgb-icon-item\", key: index },\n React.createElement(\n \"span\",\n { className: key === headerIcon ? 'active' : '',\n onClick: function onClick() {\n return setAttributes({ headerIcon: key });\n } },\n React.createElement(\n \"svg\",\n { xmlns: \"http://www.w3.org/2000/svg\", width: \"24\", height: \"24\", viewBox: \"0 0 24 24\" },\n HEADER_ICONS[key]\n )\n )\n );\n })\n )\n ),\n React.createElement(\n PanelColor,\n { title: __('Icon Color'), colorValue: headerIconColor, initialOpen: false },\n React.createElement(ColorPalette, {\n value: headerIconColor,\n onChange: function onChange(value) {\n return setAttributes({ headerIconColor: value });\n }\n })\n )\n )\n ),\n React.createElement(\n PanelBody,\n { title: __('Body Settings'), initialOpen: false },\n React.createElement(\n PanelColor,\n { title: __('Background Color'), colorValue: bodyBgColor, initialOpen: false },\n React.createElement(ColorPalette, {\n value: bodyBgColor,\n onChange: function onChange(value) {\n return setAttributes({ bodyBgColor: value });\n }\n })\n ),\n React.createElement(\n PanelColor,\n { title: __('Text Color'), colorValue: bodyTextColor, initialOpen: false },\n React.createElement(ColorPalette, {\n value: bodyTextColor,\n onChange: function onChange(value) {\n return setAttributes({ bodyTextColor: value });\n }\n })\n )\n ),\n React.createElement(\n PanelBody,\n { title: __('Border Settings'), initialOpen: false },\n React.createElement(SelectControl, {\n label: __('Border Style'),\n value: borderStyle,\n options: [{ label: __('Solid'), value: 'solid' }, { label: __('Dashed'), value: 'dashed' }, { label: __('Dotted'), value: 'dotted' }],\n onChange: function onChange(value) {\n return setAttributes({ borderStyle: value });\n }\n }),\n React.createElement(\n PanelColor,\n { title: __('Border Color'), colorValue: borderColor, initialOpen: false },\n React.createElement(ColorPalette, {\n value: borderColor,\n onChange: function onChange(value) {\n return setAttributes({ borderColor: value });\n }\n })\n ),\n React.createElement(RangeControl, {\n label: __('Border width'),\n value: borderWidth,\n min: 0,\n max: 10,\n onChange: function onChange(value) {\n return setAttributes({ borderWidth: value });\n }\n }),\n React.createElement(RangeControl, {\n label: __('Border radius'),\n value: borderRadius,\n min: 0,\n max: 100,\n onChange: function onChange(value) {\n return setAttributes({ borderRadius: value });\n }\n })\n )\n ),\n React.createElement(\n \"div\",\n { className: \"advgb-accordion-block\" },\n items.map(function (item, index) {\n return React.createElement(\n Fragment,\n { key: index },\n React.createElement(\n \"div\",\n { className: \"advgb-accordion-header\",\n style: {\n backgroundColor: headerBgColor,\n color: headerTextColor,\n borderStyle: borderStyle,\n borderWidth: borderWidth + 'px',\n borderColor: borderColor,\n borderRadius: borderRadius + 'px'\n }\n },\n React.createElement(\n Tooltip,\n { text: __('Remove item') },\n React.createElement(\n \"span\",\n { className: \"advgb-accordion-remove\",\n onClick: function onClick() {\n return setAttributes({ items: items.filter(function (cItem, cIndex) {\n return cIndex !== index;\n }) });\n }\n },\n React.createElement(Dashicon, { icon: \"no\" })\n )\n ),\n React.createElement(\n \"span\",\n { className: \"advgb-accordion-header-icon\" },\n React.createElement(\n \"svg\",\n { fill: headerIconColor, xmlns: \"http://www.w3.org/2000/svg\", width: \"24\", height: \"24\", viewBox: \"0 0 24 24\" },\n HEADER_ICONS[headerIcon]\n )\n ),\n React.createElement(RichText, {\n tagName: \"h4\",\n value: item.header,\n onChange: function onChange(value) {\n return _this3.updateAccordion({ header: value }, index);\n },\n onSplit: function onSplit() {\n return null;\n },\n placeholder: __('Enter header…')\n })\n ),\n React.createElement(\n \"div\",\n { className: \"advgb-accordion-body\",\n style: {\n backgroundColor: bodyBgColor,\n color: bodyTextColor,\n borderStyle: borderStyle,\n borderWidth: borderWidth + 'px',\n borderColor: borderColor,\n borderRadius: borderRadius + 'px'\n }\n },\n React.createElement(RichText, {\n tagName: \"p\",\n value: item.body,\n onChange: function onChange(value) {\n return _this3.updateAccordion({ body: value }, index);\n },\n placeholder: __('Enter text…')\n })\n )\n );\n })\n ),\n isSelected && React.createElement(\n \"div\",\n { className: \"advgb-accordion-controls\" },\n React.createElement(\n \"button\",\n { className: \"button button-large button-primary\",\n onClick: function onClick() {\n return setAttributes({\n items: [].concat(_toConsumableArray(items), [{ header: __('New item'), body: __('New item') }])\n });\n }\n },\n __('Add item')\n )\n )\n );\n }\n }]);\n\n return AdvAccordion;\n }(Component);\n\n var accordionBlockIcon = React.createElement(\n \"svg\",\n { xmlns: \"http://www.w3.org/2000/svg\", width: \"20\", height: \"20\", viewBox: \"2 2 22 22\" },\n React.createElement(\"path\", { fill: \"none\", d: \"M0,0h24v24H0V0z\" }),\n React.createElement(\"rect\", { x: \"3\", y: \"17\", width: \"18\", height: \"2\" }),\n React.createElement(\"path\", { d: \"M19,12v1H5v-1H19 M21,10H3v5h18V10L21,10z\" }),\n React.createElement(\"rect\", { x: \"3\", y: \"6\", width: \"18\", height: \"2\" })\n );\n\n registerBlockType('advgb/accordion', {\n title: __('Accordion'),\n description: __('Easy to create an accordion for your post/page.'),\n icon: {\n src: accordionBlockIcon,\n foreground: typeof advgbBlocks !== 'undefined' ? advgbBlocks.color : undefined\n },\n category: 'formatting',\n keywords: [__('accordion'), __('list'), __('faq')],\n attributes: {\n items: {\n type: 'array',\n default: [{\n header: 'Header 1',\n body: 'Filler text (also placeholder text or dummy text) is text that shares some characteristics of a real written text, but is random or otherwise generated'\n }, {\n header: 'Header 2',\n body: 'Description 2'\n }, {\n header: 'Header 3',\n body: 'Description 3'\n }]\n },\n headerBgColor: {\n type: 'string',\n default: '#000'\n },\n headerTextColor: {\n type: 'string',\n default: '#eee'\n },\n headerIcon: {\n type: 'string',\n default: 'unfold'\n },\n headerIconColor: {\n type: 'string',\n default: '#fff'\n },\n bodyBgColor: {\n type: 'string'\n },\n bodyTextColor: {\n type: 'string'\n },\n borderStyle: {\n type: 'string',\n default: 'solid'\n },\n borderWidth: {\n type: 'number',\n default: 0\n },\n borderColor: {\n type: 'string'\n },\n borderRadius: {\n type: 'number',\n default: 2\n },\n changed: {\n type: 'boolean',\n default: false\n }\n },\n edit: AdvAccordion,\n save: function save(_ref) {\n var attributes = _ref.attributes;\n var items = attributes.items,\n headerBgColor = attributes.headerBgColor,\n headerTextColor = attributes.headerTextColor,\n headerIcon = attributes.headerIcon,\n headerIconColor = attributes.headerIconColor,\n bodyBgColor = attributes.bodyBgColor,\n bodyTextColor = attributes.bodyTextColor,\n borderStyle = attributes.borderStyle,\n borderWidth = attributes.borderWidth,\n borderColor = attributes.borderColor,\n borderRadius = attributes.borderRadius;\n\n\n return React.createElement(\n \"div\",\n { className: \"advgb-accordion-block\" },\n items.map(function (item, index) {\n return React.createElement(\n Fragment,\n { key: index },\n React.createElement(\n \"div\",\n { className: \"advgb-accordion-header\",\n style: {\n backgroundColor: headerBgColor,\n color: headerTextColor,\n borderStyle: borderStyle,\n borderWidth: borderWidth + 'px',\n borderColor: borderColor,\n borderRadius: borderRadius + 'px'\n }\n },\n React.createElement(\n \"span\",\n { className: \"advgb-accordion-header-icon\" },\n React.createElement(\n \"svg\",\n { fill: headerIconColor, xmlns: \"http://www.w3.org/2000/svg\", width: \"24\", height: \"24\", viewBox: \"0 0 24 24\" },\n HEADER_ICONS[headerIcon]\n )\n ),\n React.createElement(\n \"h4\",\n { className: \"advgb-accordion-header-title\" },\n item.header\n )\n ),\n React.createElement(\n \"div\",\n { className: \"advgb-accordion-body\",\n style: {\n backgroundColor: bodyBgColor,\n color: bodyTextColor,\n borderStyle: borderStyle,\n borderWidth: borderWidth + 'px',\n borderColor: borderColor,\n borderRadius: borderRadius + 'px'\n }\n },\n React.createElement(RichText.Content, { tagName: \"p\", value: item.body })\n )\n );\n })\n );\n }\n });\n})(wp.i18n, wp.blocks, wp.element, wp.editor, wp.components);\n\n//# sourceURL=webpack:///./assets/blocks/accordion/block.jsx?");
/***/ }),
/***/ "./assets/blocks/advbutton/block.jsx":
/*!*******************************************!*\
!*** ./assets/blocks/advbutton/block.jsx ***!
\*******************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
eval("\n\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nvar _typeof = typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; };\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\n(function (wpI18n, wpBlocks, wpElement, wpEditor, wpComponents) {\n var __ = wpI18n.__;\n var Component = wpElement.Component,\n Fragment = wpElement.Fragment;\n var registerBlockType = wpBlocks.registerBlockType,\n createBlock = wpBlocks.createBlock;\n var InspectorControls = wpEditor.InspectorControls,\n BlockControls = wpEditor.BlockControls,\n BlockAlignmentToolbar = wpEditor.BlockAlignmentToolbar,\n RichText = wpEditor.RichText,\n ColorPalette = wpEditor.ColorPalette;\n var RangeControl = wpComponents.RangeControl,\n PanelBody = wpComponents.PanelBody,\n PanelColor = wpComponents.PanelColor,\n TextControl = wpComponents.TextControl,\n ToggleControl = wpComponents.ToggleControl,\n SelectControl = wpComponents.SelectControl,\n IconButton = wpComponents.IconButton,\n Toolbar = wpComponents.Toolbar;\n\n var AdvButton = function (_Component) {\n _inherits(AdvButton, _Component);\n\n function AdvButton() {\n _classCallCheck(this, AdvButton);\n\n return _possibleConstructorReturn(this, (AdvButton.__proto__ || Object.getPrototypeOf(AdvButton)).apply(this, arguments));\n }\n\n _createClass(AdvButton, [{\n key: 'componentWillMount',\n value: function componentWillMount() {\n var _props = this.props,\n attributes = _props.attributes,\n setAttributes = _props.setAttributes;\n\n var currentBlockConfig = advgbDefaultConfig['advgb-button'];\n\n // No override attributes of blocks inserted before\n if (attributes.changed !== true) {\n if (currentBlockConfig !== undefined && (typeof currentBlockConfig === 'undefined' ? 'undefined' : _typeof(currentBlockConfig)) === 'object') {\n Object.keys(currentBlockConfig).map(function (attribute) {\n attributes[attribute] = currentBlockConfig[attribute];\n });\n\n // Finally set changed attribute to true, so we don't modify anything again\n setAttributes({ changed: true });\n }\n }\n }\n }, {\n key: 'componentDidMount',\n value: function componentDidMount() {\n var _props2 = this.props,\n attributes = _props2.attributes,\n setAttributes = _props2.setAttributes,\n clientId = _props2.clientId;\n\n\n if (!attributes.id) {\n setAttributes({ id: 'advgbbtn-' + clientId });\n }\n }\n }, {\n key: 'render',\n value: function render() {\n var listBorderStyles = [{ label: __('None'), value: 'none' }, { label: __('Solid'), value: 'solid' }, { label: __('Dotted'), value: 'dotted' }, { label: __('Dashed'), value: 'dashed' }, { label: __('Double'), value: 'double' }, { label: __('Groove'), value: 'groove' }, { label: __('Ridge'), value: 'ridge' }, { label: __('Inset'), value: 'inset' }, { label: __('Outset'), value: 'outset' }];\n var _props3 = this.props,\n attributes = _props3.attributes,\n setAttributes = _props3.setAttributes,\n isSelected = _props3.isSelected,\n className = _props3.className,\n blockID = _props3.clientId;\n var id = attributes.id,\n align = attributes.align,\n url = attributes.url,\n urlOpenNewTab = attributes.urlOpenNewTab,\n title = attributes.title,\n text = attributes.text,\n bgColor = attributes.bgColor,\n textColor = attributes.textColor,\n textSize = attributes.textSize,\n paddingTop = attributes.paddingTop,\n paddingRight = attributes.paddingRight,\n paddingBottom = attributes.paddingBottom,\n paddingLeft = attributes.paddingLeft,\n borderWidth = attributes.borderWidth,\n borderColor = attributes.borderColor,\n borderRadius = attributes.borderRadius,\n borderStyle = attributes.borderStyle,\n hoverTextColor = attributes.hoverTextColor,\n hoverBgColor = attributes.hoverBgColor,\n hoverShadowColor = attributes.hoverShadowColor,\n hoverShadowH = attributes.hoverShadowH,\n hoverShadowV = attributes.hoverShadowV,\n hoverShadowBlur = attributes.hoverShadowBlur,\n hoverShadowSpread = attributes.hoverShadowSpread,\n transitionSpeed = attributes.transitionSpeed;\n\n\n return React.createElement(\n Fragment,\n null,\n React.createElement(\n BlockControls,\n null,\n React.createElement(BlockAlignmentToolbar, { value: align, onChange: function onChange(align) {\n return setAttributes({ align: align });\n } }),\n React.createElement(\n Toolbar,\n null,\n React.createElement(IconButton, {\n label: __('Refresh this button when it conflict with other buttons styles'),\n icon: 'update',\n className: 'components-toolbar__control',\n onClick: function onClick() {\n return setAttributes({ id: 'advgbbutton-' + blockID });\n }\n })\n )\n ),\n React.createElement(\n 'span',\n { style: { display: 'inline-block' } },\n React.createElement(RichText, {\n tagName: 'span',\n placeholder: __('Add text…'),\n value: text,\n onChange: function onChange(value) {\n return setAttributes({ text: value });\n },\n formattingControls: ['bold', 'italic', 'strikethrough'],\n isSelected: isSelected,\n className: 'wp-block-advgb-button_link ' + id,\n keepPlaceholderOnFocus: true\n })\n ),\n React.createElement(\n 'style',\n null,\n '.' + id + ' {\\n font-size: ' + textSize + 'px;\\n color: ' + textColor + ';\\n background-color: ' + bgColor + ';\\n padding: ' + paddingTop + 'px ' + paddingRight + 'px ' + paddingBottom + 'px ' + paddingLeft + 'px;\\n border-width: ' + borderWidth + 'px;\\n border-color: ' + borderColor + ';\\n border-radius: ' + borderRadius + 'px;\\n border-style: ' + borderStyle + ';\\n }\\n .' + id + ':hover {\\n color: ' + hoverTextColor + ';\\n background-color: ' + hoverBgColor + ';\\n box-shadow: ' + hoverShadowH + 'px ' + hoverShadowV + 'px ' + hoverShadowBlur + 'px ' + hoverShadowSpread + 'px ' + hoverShadowColor + ';\\n transition: all ' + transitionSpeed + 's ease;\\n }'\n ),\n React.createElement(\n InspectorControls,\n null,\n React.createElement(\n PanelBody,\n { title: __('Button link') },\n React.createElement(TextControl, {\n label: [__('Link URL'), url && React.createElement(\n 'a',\n { href: url || '#', key: 'link_url', target: '_blank', style: { float: 'right' } },\n __('Preview')\n )],\n value: url || '',\n placeholder: __('Enter URL…'),\n onChange: function onChange(text) {\n return setAttributes({ url: text });\n }\n }),\n React.createElement(ToggleControl, {\n label: __('Open in new tab'),\n checked: !!urlOpenNewTab,\n onChange: function onChange() {\n return setAttributes({ urlOpenNewTab: !attributes.urlOpenNewTab });\n }\n })\n ),\n React.createElement(\n PanelBody,\n { title: __('Text/Color') },\n React.createElement(RangeControl, {\n label: __('Text size'),\n value: textSize || '',\n onChange: function onChange(size) {\n return setAttributes({ textSize: size });\n },\n min: 10,\n max: 100,\n beforeIcon: 'editor-textcolor',\n allowReset: true\n }),\n React.createElement(\n PanelColor,\n {\n title: __('Text color'),\n colorValue: textColor,\n initialOpen: false\n },\n React.createElement(ColorPalette, {\n value: textColor,\n onChange: function onChange(color) {\n return setAttributes({ textColor: color });\n }\n })\n ),\n React.createElement(\n PanelColor,\n {\n title: __('Background color'),\n colorValue: bgColor,\n initialOpen: false\n },\n React.createElement(ColorPalette, {\n value: bgColor,\n onChange: function onChange(color) {\n return setAttributes({ bgColor: color });\n }\n })\n )\n ),\n React.createElement(\n PanelBody,\n { title: __('Border'), initialOpen: false },\n React.createElement(RangeControl, {\n label: __('Border radius'),\n value: borderRadius || '',\n onChange: function onChange(value) {\n return setAttributes({ borderRadius: value });\n },\n min: 0,\n max: 100\n }),\n React.createElement(SelectControl, {\n label: __('Border style'),\n value: borderStyle,\n options: listBorderStyles,\n onChange: function onChange(value) {\n return setAttributes({ borderStyle: value });\n }\n }),\n borderStyle !== 'none' && [React.createElement(\n PanelColor,\n { key: 'border-color', title: __('Border color'), colorValue: borderColor, initialOpen: false },\n React.createElement(ColorPalette, {\n value: borderColor,\n onChange: function onChange(value) {\n return setAttributes({ borderColor: value });\n }\n })\n ), React.createElement(RangeControl, {\n key: 'border-width',\n label: __('Border width'),\n value: borderWidth || '',\n onChange: function onChange(value) {\n return setAttributes({ borderWidth: value });\n },\n min: 0,\n max: 100\n })]\n ),\n React.createElement(\n PanelBody,\n { title: __('Padding'), initialOpen: false },\n React.createElement(RangeControl, {\n label: __('Padding top'),\n value: paddingTop || '',\n onChange: function onChange(value) {\n return setAttributes({ paddingTop: value });\n },\n min: 0,\n max: 100\n }),\n React.createElement(RangeControl, {\n label: __('Padding right'),\n value: paddingRight || '',\n onChange: function onChange(value) {\n return setAttributes({ paddingRight: value });\n },\n min: 0,\n max: 100\n }),\n React.createElement(RangeControl, {\n label: __('Padding bottom'),\n value: paddingBottom || '',\n onChange: function onChange(value) {\n return setAttributes({ paddingBottom: value });\n },\n min: 0,\n max: 100\n }),\n React.createElement(RangeControl, {\n label: __('Padding left'),\n value: paddingLeft || '',\n onChange: function onChange(value) {\n return setAttributes({ paddingLeft: value });\n },\n min: 0,\n max: 100\n })\n ),\n React.createElement(\n PanelBody,\n { title: __('Hover'), initialOpen: false },\n React.createElement(\n PanelColor,\n { title: __('Text color'), colorValue: hoverTextColor, initialOpen: false },\n React.createElement(ColorPalette, {\n value: hoverTextColor,\n onChange: function onChange(value) {\n return setAttributes({ hoverTextColor: value });\n }\n })\n ),\n React.createElement(\n PanelColor,\n { title: __('Background color'), colorValue: hoverBgColor, initialOpen: false },\n React.createElement(ColorPalette, {\n value: hoverBgColor,\n onChange: function onChange(value) {\n return setAttributes({ hoverBgColor: value });\n }\n })\n ),\n React.createElement(\n PanelBody,\n { title: __('Shadow'), initialOpen: false },\n React.createElement(\n PanelColor,\n { title: __('Shadow color'), colorValue: hoverShadowColor, initialOpen: false },\n React.createElement(ColorPalette, {\n value: hoverShadowColor,\n onChange: function onChange(value) {\n return setAttributes({ hoverShadowColor: value });\n }\n })\n ),\n React.createElement(RangeControl, {\n label: __('Shadow H offset'),\n value: hoverShadowH || '',\n onChange: function onChange(value) {\n return setAttributes({ hoverShadowH: value });\n },\n min: -50,\n max: 50\n }),\n React.createElement(RangeControl, {\n label: __('Shadow V offset'),\n value: hoverShadowV || '',\n onChange: function onChange(value) {\n return setAttributes({ hoverShadowV: value });\n },\n min: -50,\n max: 50\n }),\n React.createElement(RangeControl, {\n label: __('Shadow blur'),\n value: hoverShadowBlur || '',\n onChange: function onChange(value) {\n return setAttributes({ hoverShadowBlur: value });\n },\n min: 0,\n max: 50\n }),\n React.createElement(RangeControl, {\n label: __('Shadow spread'),\n value: hoverShadowSpread || '',\n onChange: function onChange(value) {\n return setAttributes({ hoverShadowSpread: value });\n },\n min: 0,\n max: 50\n })\n ),\n React.createElement(RangeControl, {\n label: __('Transition speed'),\n value: transitionSpeed || '',\n onChange: function onChange(value) {\n return setAttributes({ transitionSpeed: value });\n },\n min: 0,\n max: 3\n })\n )\n )\n );\n }\n }]);\n\n return AdvButton;\n }(Component);\n\n var buttonBlockIcon = React.createElement(\n 'svg',\n { height: '20', viewBox: '2 2 22 22', width: '20', xmlns: 'http://www.w3.org/2000/svg' },\n React.createElement('path', { d: 'M0 0h24v24H0V0z', fill: 'none' }),\n React.createElement('path', { d: 'M5 14.5h14v-6H5v6zM11 .55V3.5h2V.55h-2zm8.04 2.5l-1.79 1.79 1.41 1.41 1.8-1.79-1.42-1.41zM13 22.45V19.5h-2v2.95h2zm7.45-3.91l-1.8-1.79-1.41 1.41 1.79 1.8 1.42-1.42zM3.55 4.46l1.79 1.79 1.41-1.41-1.79-1.79-1.41 1.41zm1.41 15.49l1.79-1.8-1.41-1.41-1.79 1.79 1.41 1.42z' })\n );\n\n registerBlockType('advgb/button', {\n title: __('Advanced Button'),\n description: __('New button with more styles.'),\n icon: {\n src: buttonBlockIcon,\n foreground: typeof advgbBlocks !== 'undefined' ? advgbBlocks.color : undefined\n },\n category: 'layout',\n keywords: [__('button'), __('link')],\n attributes: {\n id: {\n type: 'string'\n },\n url: {\n type: 'string'\n },\n urlOpenNewTab: {\n type: 'boolean',\n default: true\n },\n title: {\n type: 'string'\n },\n text: {\n type: 'string',\n source: 'children',\n selector: 'a'\n },\n bgColor: {\n type: 'string',\n default: '#2196f3'\n },\n textColor: {\n type: 'string',\n default: '#fff'\n },\n textSize: {\n type: 'number',\n default: 18\n },\n paddingTop: {\n type: 'number',\n default: 6\n },\n paddingRight: {\n type: 'number',\n default: 12\n },\n paddingBottom: {\n type: 'number',\n default: 6\n },\n paddingLeft: {\n type: 'number',\n default: 12\n },\n borderWidth: {\n type: 'number',\n default: 1\n },\n borderColor: {\n type: 'string',\n default: '#2196f3'\n },\n borderStyle: {\n type: 'string',\n default: 'solid'\n },\n borderRadius: {\n type: 'number',\n default: 50\n },\n hoverTextColor: {\n type: 'string',\n default: '#fff'\n },\n hoverBgColor: {\n type: 'string',\n default: '#2196f3'\n },\n hoverShadowColor: {\n type: 'string',\n default: '#ccc'\n },\n hoverShadowH: {\n type: 'number',\n default: 3\n },\n hoverShadowV: {\n type: 'number',\n default: 3\n },\n hoverShadowBlur: {\n type: 'number',\n default: 1\n },\n hoverShadowSpread: {\n type: 'number',\n default: 0\n },\n transitionSpeed: {\n type: 'number',\n default: 0.2\n },\n align: {\n type: 'string',\n default: 'none'\n },\n changed: {\n type: 'boolean',\n default: false\n }\n },\n transforms: {\n from: [{\n type: 'block',\n blocks: ['core/button'],\n transform: function transform(attributes) {\n return createBlock('advgb/button', _extends({}, attributes, {\n bgColor: attributes.color\n }));\n }\n }],\n to: [{\n type: 'block',\n blocks: ['core/button'],\n transform: function transform(attributes) {\n return createBlock('core/button', _extends({}, attributes, {\n color: attributes.bgColor\n }));\n }\n }]\n },\n edit: AdvButton,\n save: function save(_ref) {\n var attributes = _ref.attributes;\n var id = attributes.id,\n align = attributes.align,\n url = attributes.url,\n urlOpenNewTab = attributes.urlOpenNewTab,\n title = attributes.title,\n text = attributes.text,\n bgColor = attributes.bgColor,\n textColor = attributes.textColor,\n textSize = attributes.textSize,\n paddingTop = attributes.paddingTop,\n paddingRight = attributes.paddingRight,\n paddingBottom = attributes.paddingBottom,\n paddingLeft = attributes.paddingLeft,\n borderWidth = attributes.borderWidth,\n borderColor = attributes.borderColor,\n borderRadius = attributes.borderRadius,\n borderStyle = attributes.borderStyle,\n hoverTextColor = attributes.hoverTextColor,\n hoverBgColor = attributes.hoverBgColor,\n hoverShadowColor = attributes.hoverShadowColor,\n hoverShadowH = attributes.hoverShadowH,\n hoverShadowV = attributes.hoverShadowV,\n hoverShadowBlur = attributes.hoverShadowBlur,\n hoverShadowSpread = attributes.hoverShadowSpread,\n transitionSpeed = attributes.transitionSpeed;\n\n\n return React.createElement(\n 'div',\n { className: 'align' + align },\n React.createElement(\n 'a',\n { className: 'wp-block-advgb-button_link ' + id,\n href: url || '#', title: title,\n target: !urlOpenNewTab ? '_self' : '_blank'\n },\n text\n ),\n React.createElement(\n 'style',\n null,\n '.' + id + ' {\\n font-size: ' + textSize + 'px;\\n color: ' + textColor + ';\\n background-color: ' + bgColor + ';\\n padding: ' + paddingTop + 'px ' + paddingRight + 'px ' + paddingBottom + 'px ' + paddingLeft + 'px;\\n border-width: ' + borderWidth + 'px;\\n border-color: ' + borderColor + ';\\n border-radius: ' + borderRadius + 'px;\\n border-style: ' + borderStyle + ';\\n }\\n .' + id + ':hover {\\n color: ' + hoverTextColor + ';\\n background-color: ' + hoverBgColor + ';\\n box-shadow: ' + hoverShadowH + 'px ' + hoverShadowV + 'px ' + hoverShadowBlur + 'px ' + hoverShadowSpread + 'px ' + hoverShadowColor + ';\\n transition: all ' + transitionSpeed + 's ease;\\n }'\n )\n );\n },\n getEditWrapperProps: function getEditWrapperProps(attributes) {\n var align = attributes.align;\n\n var props = { 'data-resized': true };\n\n if ('left' === align || 'right' === align || 'center' === align) {\n props['data-align'] = align;\n }\n\n return props;\n }\n });\n})(wp.i18n, wp.blocks, wp.element, wp.editor, wp.components);\n\n//# sourceURL=webpack:///./assets/blocks/advbutton/block.jsx?");
/***/ }),
/***/ "./assets/blocks/advimage/block.jsx":
/*!******************************************!*\
!*** ./assets/blocks/advimage/block.jsx ***!
\******************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
eval("\n\nvar _typeof = typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; };\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\n(function (wpI18n, wpBlocks, wpElement, wpEditor, wpComponents) {\n var __ = wpI18n.__;\n var Component = wpElement.Component,\n Fragment = wpElement.Fragment;\n var registerBlockType = wpBlocks.registerBlockType;\n var InspectorControls = wpEditor.InspectorControls,\n BlockControls = wpEditor.BlockControls,\n RichText = wpEditor.RichText,\n ColorPalette = wpEditor.ColorPalette,\n MediaUpload = wpEditor.MediaUpload;\n var RangeControl = wpComponents.RangeControl,\n PanelBody = wpComponents.PanelBody,\n PanelColor = wpComponents.PanelColor,\n ToggleControl = wpComponents.ToggleControl,\n SelectControl = wpComponents.SelectControl,\n TextControl = wpComponents.TextControl,\n IconButton = wpComponents.IconButton,\n Button = wpComponents.Button,\n Toolbar = wpComponents.Toolbar;\n\n var AdvImage = function (_Component) {\n _inherits(AdvImage, _Component);\n\n function AdvImage() {\n _classCallCheck(this, AdvImage);\n\n var _this = _possibleConstructorReturn(this, (AdvImage.__proto__ || Object.getPrototypeOf(AdvImage)).apply(this, arguments));\n\n _this.state = {\n currentEdit: ''\n };\n return _this;\n }\n\n _createClass(AdvImage, [{\n key: 'componentWillMount',\n value: function componentWillMount() {\n var _props = this.props,\n attributes = _props.attributes,\n setAttributes = _props.setAttributes;\n\n var currentBlockConfig = advgbDefaultConfig['advgb-image'];\n\n // No override attributes of blocks inserted before\n if (attributes.changed !== true) {\n if (currentBlockConfig !== undefined && (typeof currentBlockConfig === 'undefined' ? 'undefined' : _typeof(currentBlockConfig)) === 'object') {\n Object.keys(currentBlockConfig).map(function (attribute) {\n attributes[attribute] = currentBlockConfig[attribute];\n });\n\n // Finally set changed attribute to true, so we don't modify anything again\n setAttributes({ changed: true });\n }\n }\n }\n }, {\n key: 'handleSetup',\n value: function handleSetup(editor, area) {\n var _this2 = this;\n\n editor.on('focus', function () {\n return _this2.setState({ currentEdit: area });\n });\n }\n }, {\n key: 'render',\n value: function render() {\n var _this3 = this;\n\n var currentEdit = this.state.currentEdit;\n var _props2 = this.props,\n attributes = _props2.attributes,\n setAttributes = _props2.setAttributes,\n isSelected = _props2.isSelected;\n var openOnClick = attributes.openOnClick,\n openUrl = attributes.openUrl,\n imageUrl = attributes.imageUrl,\n imageID = attributes.imageID,\n title = attributes.title,\n titleColor = attributes.titleColor,\n subtitle = attributes.subtitle,\n subtitleColor = attributes.subtitleColor,\n overlayColor = attributes.overlayColor,\n fullWidth = attributes.fullWidth,\n width = attributes.width,\n height = attributes.height,\n vAlign = attributes.vAlign,\n hAlign = attributes.hAlign;\n\n var blockClassName = ['advgb-image-block', fullWidth && 'full-width'].filter(Boolean).join(' ');\n\n return React.createElement(\n Fragment,\n null,\n imageID && React.createElement(\n BlockControls,\n null,\n React.createElement(\n Toolbar,\n null,\n React.createElement(MediaUpload, {\n type: 'image',\n value: imageID,\n onSelect: function onSelect(image) {\n return setAttributes({ imageUrl: image.url, imageID: image.id });\n },\n render: function render(_ref) {\n var open = _ref.open;\n return React.createElement(IconButton, {\n className: 'components-toolbar__control',\n label: __('Change image'),\n icon: 'edit',\n onClick: open\n });\n }\n }),\n React.createElement(IconButton, {\n className: 'components-toolbar__control',\n label: __('Remove image'),\n icon: 'no',\n onClick: function onClick() {\n return setAttributes({ imageUrl: undefined, imageID: undefined });\n }\n })\n )\n ),\n React.createElement(\n InspectorControls,\n null,\n React.createElement(\n PanelBody,\n { title: __('Advanced Image') },\n React.createElement(SelectControl, {\n label: __('Action on click'),\n value: openOnClick,\n options: [{ label: __('None'), value: 'none' }, { label: __('Open image in lightbox'), value: 'lightbox' }, { label: __('Open custom URL'), value: 'url' }],\n onChange: function onChange(value) {\n return setAttributes({ openOnClick: value });\n }\n }),\n openOnClick === 'url' && React.createElement(TextControl, {\n label: [__('Link URL'), openUrl && React.createElement(\n 'a',\n { href: openUrl || '#', key: 'advgb_image_link_url', target: '_blank', style: { float: 'right' } },\n __('Preview')\n )],\n value: openUrl,\n placeholder: __('Enter URL…'),\n onChange: function onChange(text) {\n return setAttributes({ openUrl: text });\n }\n }),\n React.createElement(\n PanelBody,\n { title: __('Image Size') },\n React.createElement(ToggleControl, {\n label: __('Full width'),\n checked: fullWidth,\n onChange: function onChange() {\n return setAttributes({ fullWidth: !fullWidth });\n }\n }),\n React.createElement(RangeControl, {\n label: __('Height'),\n value: height,\n min: 100,\n max: 1000,\n onChange: function onChange(value) {\n return setAttributes({ height: value });\n }\n }),\n !fullWidth && React.createElement(RangeControl, {\n label: __('Width'),\n value: width,\n min: 200,\n max: 1300,\n onChange: function onChange(value) {\n return setAttributes({ width: value });\n }\n })\n ),\n React.createElement(\n PanelColor,\n { title: __('Title Color'), colorValue: titleColor, initialOpen: false },\n React.createElement(ColorPalette, {\n value: titleColor,\n onChange: function onChange(value) {\n return setAttributes({ titleColor: value });\n }\n })\n ),\n React.createElement(\n PanelColor,\n { title: __('Subtitle Color'), colorValue: subtitleColor, initialOpen: false },\n React.createElement(ColorPalette, {\n value: subtitleColor,\n onChange: function onChange(value) {\n return setAttributes({ subtitleColor: value });\n }\n })\n ),\n React.createElement(\n PanelColor,\n { title: __('Overlay Color'), colorValue: overlayColor, initialOpen: false },\n React.createElement(ColorPalette, {\n value: overlayColor,\n onChange: function onChange(value) {\n return setAttributes({ overlayColor: value });\n }\n })\n ),\n React.createElement(\n PanelBody,\n { title: __('Text Alignment'), initialOpen: false },\n React.createElement(SelectControl, {\n label: __('Vertical Alignment'),\n value: vAlign,\n options: [{ label: __('Top'), value: 'flex-start' }, { label: __('Center'), value: 'center' }, { label: __('Bottom'), value: 'flex-end' }],\n onChange: function onChange(value) {\n return setAttributes({ vAlign: value });\n }\n }),\n React.createElement(SelectControl, {\n label: __('Horizontal Alignment'),\n value: hAlign,\n options: [{ label: __('Left'), value: 'flex-start' }, { label: __('Center'), value: 'center' }, { label: __('Right'), value: 'flex-end' }],\n onChange: function onChange(value) {\n return setAttributes({ hAlign: value });\n }\n })\n )\n )\n ),\n React.createElement(\n 'div',\n { className: blockClassName,\n style: {\n backgroundImage: 'url( ' + imageUrl + ')',\n height: height,\n width: width,\n justifyContent: vAlign,\n alignItems: hAlign\n }\n },\n React.createElement('span', { className: 'advgb-image-overlay',\n style: { backgroundColor: overlayColor }\n }),\n !imageID && React.createElement(MediaUpload, {\n type: 'image',\n value: imageID,\n onSelect: function onSelect(image) {\n return setAttributes({ imageUrl: image.url, imageID: image.id });\n },\n render: function render(_ref2) {\n var open = _ref2.open;\n return React.createElement(\n Button,\n {\n className: 'button button-large',\n onClick: open\n },\n __('Choose image')\n );\n }\n }),\n React.createElement(RichText, {\n tagName: 'h4',\n className: 'advgb-image-title',\n value: title,\n onChange: function onChange(value) {\n return setAttributes({ title: value });\n },\n style: { color: titleColor },\n isSelected: isSelected && currentEdit === 'title',\n unstableOnSetup: function unstableOnSetup(editor) {\n return _this3.handleSetup(editor, 'title');\n },\n placeholder: __('Enter title…')\n }),\n React.createElement(RichText, {\n tagName: 'p',\n className: 'advgb-image-subtitle',\n value: subtitle,\n onChange: function onChange(value) {\n return setAttributes({ subtitle: value });\n },\n style: { color: subtitleColor },\n isSelected: isSelected && currentEdit === 'subtitle',\n unstableOnSetup: function unstableOnSetup(editor) {\n return _this3.handleSetup(editor, 'subtitle');\n },\n placeholder: __('Enter subtitle…')\n })\n )\n );\n }\n }]);\n\n return AdvImage;\n }(Component);\n\n var advImageBlockIcon = React.createElement(\n 'svg',\n { height: '20', viewBox: '2 2 22 22', width: '20', xmlns: 'http://www.w3.org/2000/svg' },\n React.createElement('path', { d: 'M0 0h24v24H0V0z', fill: 'none' }),\n React.createElement('path', { d: 'M1 5h2v14H1zm4 0h2v14H5zm17 0H10c-.55 0-1 .45-1 1v12c0 .55.45 1 1 1h12c.55 0 1-.45 1-1V6c0-.55-.45-1-1-1zM11 17l2.5-3.15L15.29 16l2.5-3.22L21 17H11z' })\n );\n\n registerBlockType('advgb/image', {\n title: __('Advanced Image'),\n description: __('Advanced image/photo block with more options and styles.'),\n icon: {\n src: advImageBlockIcon,\n foreground: typeof advgbBlocks !== 'undefined' ? advgbBlocks.color : undefined\n },\n category: 'common',\n keywords: [__('image'), __('photo'), __('box')],\n attributes: {\n openOnClick: {\n type: 'string',\n default: 'none'\n },\n openUrl: {\n type: 'string'\n },\n imageUrl: {\n type: 'string'\n },\n imageID: {\n type: 'string'\n },\n title: {\n type: 'string',\n default: __('Image title')\n },\n titleColor: {\n type: 'string',\n default: '#fff'\n },\n subtitle: {\n type: 'string',\n default: __('Your subtitle here')\n },\n subtitleColor: {\n type: 'string',\n default: '#fff'\n },\n overlayColor: {\n type: 'string',\n default: '#2196f3'\n },\n fullWidth: {\n type: 'boolean',\n default: false\n },\n width: {\n type: 'number',\n default: 500\n },\n height: {\n type: 'number',\n default: 500\n },\n vAlign: {\n type: 'string',\n default: 'center'\n },\n hAlign: {\n type: 'string',\n default: 'center'\n },\n changed: {\n type: 'boolean',\n default: false\n }\n },\n edit: AdvImage,\n save: function save(_ref3) {\n var attributes = _ref3.attributes;\n var openOnClick = attributes.openOnClick,\n openUrl = attributes.openUrl,\n imageUrl = attributes.imageUrl,\n title = attributes.title,\n titleColor = attributes.titleColor,\n subtitle = attributes.subtitle,\n subtitleColor = attributes.subtitleColor,\n overlayColor = attributes.overlayColor,\n fullWidth = attributes.fullWidth,\n width = attributes.width,\n height = attributes.height,\n vAlign = attributes.vAlign,\n hAlign = attributes.hAlign;\n\n var linkURL = openOnClick === 'url' && !!openUrl ? openUrl : undefined;\n var blockClassName = ['advgb-image-block', fullWidth && 'full-width', openOnClick === 'lightbox' && !!imageUrl && 'advgb-lightbox'].filter(Boolean).join(' ');\n\n return React.createElement(\n 'div',\n { className: blockClassName,\n style: {\n backgroundImage: 'url( ' + imageUrl + ')',\n height: height,\n width: width,\n justifyContent: vAlign,\n alignItems: hAlign\n },\n 'data-image': imageUrl\n },\n React.createElement('a', { className: 'advgb-image-overlay',\n style: { backgroundColor: overlayColor },\n target: '_blank',\n href: linkURL\n }),\n React.createElement(\n 'h4',\n { className: 'advgb-image-title', style: { color: titleColor } },\n title\n ),\n React.createElement(\n 'p',\n { className: 'advgb-image-subtitle', style: { color: subtitleColor } },\n subtitle\n )\n );\n }\n });\n})(wp.i18n, wp.blocks, wp.element, wp.editor, wp.components);\n\n//# sourceURL=webpack:///./assets/blocks/advimage/block.jsx?");
/***/ }),
/***/ "./assets/blocks/advlist/block.jsx":
/*!*****************************************!*\
!*** ./assets/blocks/advlist/block.jsx ***!
\*****************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
eval("\n\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nvar _typeof = typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; };\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nfunction _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } else { return Array.from(arr); } }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\n(function (wpI18n, wpBlocks, wpElement, wpEditor, wpComponents) {\n var __ = wpI18n.__;\n var Component = wpElement.Component,\n Fragment = wpElement.Fragment;\n var registerBlockType = wpBlocks.registerBlockType,\n createBlock = wpBlocks.createBlock;\n var InspectorControls = wpEditor.InspectorControls,\n RichText = wpEditor.RichText,\n ColorPalette = wpEditor.ColorPalette,\n BlockControls = wpEditor.BlockControls;\n var BaseControl = wpComponents.BaseControl,\n RangeControl = wpComponents.RangeControl,\n PanelBody = wpComponents.PanelBody,\n IconButton = wpComponents.IconButton,\n Dashicon = wpComponents.Dashicon,\n Toolbar = wpComponents.Toolbar;\n\n var AdvList = function (_Component) {\n _inherits(AdvList, _Component);\n\n function AdvList() {\n _classCallCheck(this, AdvList);\n\n var _this = _possibleConstructorReturn(this, (AdvList.__proto__ || Object.getPrototypeOf(AdvList)).apply(this, arguments));\n\n _this.getEditorSettings = _this.getEditorSettings.bind(_this);\n _this.setupEditor = _this.setupEditor.bind(_this);\n _this.setNextValues = _this.setNextValues.bind(_this);\n return _this;\n }\n\n _createClass(AdvList, [{\n key: 'componentWillMount',\n value: function componentWillMount() {\n var _props = this.props,\n attributes = _props.attributes,\n setAttributes = _props.setAttributes;\n\n var currentBlockConfig = advgbDefaultConfig['advgb-list'];\n\n // No override attributes of blocks inserted before\n if (attributes.changed !== true) {\n if (currentBlockConfig !== undefined && (typeof currentBlockConfig === 'undefined' ? 'undefined' : _typeof(currentBlockConfig)) === 'object') {\n Object.keys(currentBlockConfig).map(function (attribute) {\n attributes[attribute] = currentBlockConfig[attribute];\n });\n\n // Finally set changed attribute to true, so we don't modify anything again\n setAttributes({ changed: true });\n }\n }\n }\n }, {\n key: 'componentDidMount',\n value: function componentDidMount() {\n var _props2 = this.props,\n attributes = _props2.attributes,\n setAttributes = _props2.setAttributes,\n clientId = _props2.clientId;\n\n\n if (!attributes.id) {\n setAttributes({\n id: 'advgblist-' + clientId\n });\n }\n }\n }, {\n key: 'getEditorSettings',\n value: function getEditorSettings(editorSettings) {\n return _extends({}, editorSettings, {\n plugins: (editorSettings.plugins || []).concat('lists'),\n lists_indent_on_tab: false\n });\n }\n }, {\n key: 'setupEditor',\n value: function setupEditor(editor) {\n // this checks for languages that do not typically have square brackets on their keyboards\n var lang = window.navigator.browserLanguage || window.navigator.language;\n var keyboardHasSqBracket = !/^(?:fr|nl|sv|ru|de|es|it)/.test(lang);\n\n if (keyboardHasSqBracket) {\n // keycode 219 = '[' and keycode 221 = ']'\n editor.shortcuts.add('meta+219', 'Decrease indent', 'Outdent');\n editor.shortcuts.add('meta+221', 'Increase indent', 'Indent');\n } else {\n editor.shortcuts.add('meta+shift+m', 'Decrease indent', 'Outdent');\n editor.shortcuts.add('meta+m', 'Increase indent', 'Indent');\n }\n\n this.editor = editor;\n }\n }, {\n key: 'setNextValues',\n value: function setNextValues(nextValues) {\n this.props.setAttributes({ values: nextValues });\n }\n }, {\n key: 'render',\n value: function render() {\n var listIcons = [{ label: __('None'), value: '' }, { label: __('Pushpin'), value: 'admin-post' }, { label: __('Configuration'), value: 'admin-generic' }, { label: __('Flag'), value: 'flag' }, { label: __('Star'), value: 'star-filled' }, { label: __('Checkmark'), value: 'yes' }, { label: __('Minus'), value: 'minus' }, { label: __('Plus'), value: 'plus' }, { label: __('Play'), value: 'controls-play' }, { label: __('Arrow right'), value: 'arrow-right-alt' }, { label: __('X Cross'), value: 'dismiss' }, { label: __('Warning'), value: 'warning' }, { label: __('Help'), value: 'editor-help' }, { label: __('Info'), value: 'info' }, { label: __('Circle'), value: 'marker' }];\n var _props3 = this.props,\n attributes = _props3.attributes,\n isSelected = _props3.isSelected,\n insertBlocksAfter = _props3.insertBlocksAfter,\n mergeBlocks = _props3.mergeBlocks,\n setAttributes = _props3.setAttributes,\n onReplace = _props3.onReplace,\n className = _props3.className,\n blockID = _props3.clientId;\n var id = attributes.id,\n values = attributes.values,\n icon = attributes.icon,\n iconSize = attributes.iconSize,\n iconColor = attributes.iconColor,\n margin = attributes.margin,\n padding = attributes.padding,\n lineHeight = attributes.lineHeight,\n fontSize = attributes.fontSize;\n\n var listClassName = [className, id, icon && 'advgb-list', icon && 'advgb-list-' + icon].filter(Boolean).join(' ');\n\n return React.createElement(\n Fragment,\n null,\n React.createElement(\n BlockControls,\n null,\n React.createElement(\n Toolbar,\n null,\n React.createElement(IconButton, {\n label: __('Refresh this list when it conflict with other lists styles'),\n icon: 'update',\n className: 'components-toolbar__control',\n onClick: function onClick() {\n return setAttributes({ id: 'advgblist-' + blockID });\n }\n })\n )\n ),\n React.createElement(\n InspectorControls,\n null,\n React.createElement(\n PanelBody,\n { title: __('Text Settings'), initialOpen: false },\n React.createElement(RangeControl, {\n label: __('Text size'),\n value: fontSize || '',\n onChange: function onChange(size) {\n return setAttributes({ fontSize: size });\n },\n min: 10,\n max: 100,\n beforeIcon: 'editor-textcolor',\n allowReset: true\n })\n ),\n React.createElement(\n PanelBody,\n { title: __('Icon Settings') },\n React.createElement(\n BaseControl,\n { label: __('List icon') },\n React.createElement(\n 'div',\n { className: 'advgb-icon-items-wrapper' },\n listIcons.map(function (item, index) {\n return React.createElement(\n 'div',\n { className: 'advgb-icon-item h20', key: index },\n React.createElement(\n 'span',\n { onClick: function onClick() {\n return setAttributes({ icon: item.value });\n },\n className: [item.value === icon && 'active', item.value === '' && 'remove-icon'].filter(Boolean).join(' ')\n },\n React.createElement(Dashicon, { icon: item.value })\n )\n );\n })\n )\n ),\n icon && React.createElement(\n Fragment,\n null,\n React.createElement(\n PanelBody,\n {\n title: [__('Icon color'), React.createElement('span', { key: 'advgb-list-icon-color', className: 'dashicons dashicons-' + icon, style: { color: iconColor, marginLeft: '10px' } })],\n initialOpen: false\n },\n React.createElement(ColorPalette, {\n value: iconColor,\n onChange: function onChange(color) {\n return setAttributes({ iconColor: color });\n }\n })\n ),\n React.createElement(RangeControl, {\n label: __('Icon size'),\n value: iconSize || '',\n onChange: function onChange(size) {\n return setAttributes({ iconSize: size });\n },\n min: 10,\n max: 100,\n allowReset: true\n }),\n React.createElement(RangeControl, {\n label: __('Line height'),\n value: lineHeight || '',\n onChange: function onChange(size) {\n return setAttributes({ lineHeight: size });\n },\n min: 0,\n max: 100,\n allowReset: true\n }),\n React.createElement(RangeControl, {\n label: __('Margin'),\n value: margin || '',\n onChange: function onChange(size) {\n return setAttributes({ margin: size });\n },\n min: 0,\n max: 100,\n allowReset: true\n }),\n React.createElement(RangeControl, {\n label: __('Padding'),\n value: padding || '',\n onChange: function onChange(size) {\n return setAttributes({ padding: size });\n },\n min: 0,\n max: 100,\n allowReset: true\n })\n )\n )\n ),\n React.createElement(RichText, {\n multiline: 'li',\n tagName: 'ul',\n unstableGetSettings: this.getEditorSettings,\n unstableOnSetup: this.setupEditor,\n onChange: this.setNextValues,\n value: values,\n wrapperClassName: 'advgb-list-item',\n className: listClassName,\n placeholder: __('Write advanced list…'),\n onMerge: mergeBlocks,\n onSplit: insertBlocksAfter ? function (before, after) {\n for (var _len = arguments.length, blocks = Array(_len > 2 ? _len - 2 : 0), _key = 2; _key < _len; _key++) {\n blocks[_key - 2] = arguments[_key];\n }\n\n if (!blocks.length) {\n blocks.push(createBlock('core/paragraph'));\n }\n\n if (after.length) {\n blocks.push(createBlock('advgb/list', _extends({}, attributes, {\n values: after,\n id: undefined\n })));\n }\n\n setAttributes({ values: before });\n insertBlocksAfter(blocks);\n } : undefined,\n onRemove: function onRemove() {\n return onReplace([]);\n },\n isSelected: isSelected\n }),\n React.createElement(\n 'div',\n null,\n React.createElement(\n 'style',\n null,\n '.' + id + ' li { font-size: ' + fontSize + 'px }'\n ),\n icon && React.createElement(\n 'style',\n null,\n '.' + id + ' li:before {\\n font-size: ' + iconSize + 'px;\\n color: ' + iconColor + ';\\n line-height: ' + lineHeight + 'px;\\n margin: ' + margin + 'px;\\n padding: ' + padding + 'px;\\n }'\n )\n )\n );\n }\n }]);\n\n return AdvList;\n }(Component);\n\n var listBlockIcon = React.createElement(\n 'svg',\n { height: '20', viewBox: '2 2 22 22', width: '20', xmlns: 'http://www.w3.org/2000/svg' },\n React.createElement('path', { d: 'M3 13h2v-2H3v2zm0 4h2v-2H3v2zm0-8h2V7H3v2zm4 4h14v-2H7v2zm0 4h14v-2H7v2zM7 7v2h14V7H7z' }),\n React.createElement('path', { d: 'M0 0h24v24H0z', fill: 'none' })\n );\n\n registerBlockType('advgb/list', {\n title: __('Advanced List'),\n description: __('List block with custom icons and styles.'),\n icon: {\n src: listBlockIcon,\n foreground: typeof advgbBlocks !== 'undefined' ? advgbBlocks.color : undefined\n },\n category: 'common',\n keywords: [__('list'), __('icon')],\n attributes: {\n id: {\n type: 'string'\n },\n icon: {\n type: 'string'\n },\n iconSize: {\n type: 'number',\n default: 16\n },\n iconColor: {\n type: 'string',\n default: '#000'\n },\n fontSize: {\n type: 'number',\n default: 16\n },\n lineHeight: {\n type: 'number',\n default: 18\n },\n margin: {\n type: 'number',\n default: 2\n },\n padding: {\n type: 'number',\n default: 2\n },\n values: {\n type: 'array',\n source: 'children',\n selector: 'ul',\n default: []\n },\n changed: {\n type: 'boolean',\n default: false\n }\n },\n transforms: {\n from: [{\n type: 'block',\n blocks: ['core/list'],\n transform: function transform(_ref) {\n var values = _ref.values;\n\n return createBlock('advgb/list', {\n values: values,\n icon: 'controls-play',\n iconColor: '#ff0000'\n });\n }\n }],\n to: [{\n type: 'block',\n blocks: ['core/list'],\n transform: function transform(_ref2) {\n var values = _ref2.values;\n\n return createBlock('core/list', {\n nodeName: 'UL',\n values: values\n });\n }\n }]\n },\n merge: function merge(attributes, attributesToMerge) {\n var valuesToMerge = attributesToMerge.values || [];\n\n // Standard text-like block attribute.\n if (attributesToMerge.content) {\n valuesToMerge.push(attributesToMerge.content);\n }\n\n return _extends({}, attributes, {\n values: [].concat(_toConsumableArray(attributes.values), _toConsumableArray(valuesToMerge))\n });\n },\n\n edit: AdvList,\n save: function save(_ref3) {\n var attributes = _ref3.attributes;\n var id = attributes.id,\n values = attributes.values,\n icon = attributes.icon,\n iconSize = attributes.iconSize,\n iconColor = attributes.iconColor,\n margin = attributes.margin,\n padding = attributes.padding,\n lineHeight = attributes.lineHeight,\n fontSize = attributes.fontSize;\n\n var listClassName = [id, icon && 'advgb-list', icon && 'advgb-list-' + icon].filter(Boolean).join(' ');\n\n return React.createElement(\n 'div',\n null,\n React.createElement(\n 'ul',\n { className: listClassName },\n values\n ),\n React.createElement(\n 'style',\n null,\n '.' + id + ' li { font-size: ' + fontSize + 'px }'\n ),\n icon && React.createElement(\n 'style',\n null,\n '.' + id + ' li:before {\\n font-size: ' + iconSize + 'px;\\n color: ' + iconColor + ';\\n line-height: ' + lineHeight + 'px;\\n margin: ' + margin + 'px;\\n padding: ' + padding + 'px;\\n }'\n )\n );\n }\n });\n})(wp.i18n, wp.blocks, wp.element, wp.editor, wp.components);\n\n//# sourceURL=webpack:///./assets/blocks/advlist/block.jsx?");
/***/ }),
/***/ "./assets/blocks/advtable/block.jsx":
/*!******************************************!*\
!*** ./assets/blocks/advtable/block.jsx ***!
\******************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
eval("\n\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nvar _typeof = typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; };\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\n(function (wpI18n, wpBlocks, wpElement, wpEditor, wpComponents) {\n var __ = wpI18n.__;\n var Component = wpElement.Component,\n Fragment = wpElement.Fragment;\n var registerBlockType = wpBlocks.registerBlockType,\n createBlock = wpBlocks.createBlock;\n var InspectorControls = wpEditor.InspectorControls,\n BlockControls = wpEditor.BlockControls,\n RichText = wpEditor.RichText,\n MediaUpload = wpEditor.MediaUpload,\n BlockAlignmentToolbar = wpEditor.BlockAlignmentToolbar,\n ColorPalette = wpEditor.ColorPalette;\n var PanelBody = wpComponents.PanelBody,\n PanelColor = wpComponents.PanelColor,\n BaseControl = wpComponents.BaseControl,\n RangeControl = wpComponents.RangeControl,\n SelectControl = wpComponents.SelectControl,\n IconButton = wpComponents.IconButton,\n Toolbar = wpComponents.Toolbar,\n DropdownMenu = wpComponents.DropdownMenu,\n Tooltip = wpComponents.Tooltip;\n\n\n var tableBlockIcon = React.createElement(\n \"svg\",\n { xmlns: \"http://www.w3.org/2000/svg\", width: \"20\", height: \"20\", viewBox: \"2 2 22 22\" },\n React.createElement(\"path\", { d: \"M3 3v18h18V3H3zm8 16H5v-6h6v6zm0-8H5V5h6v6zm8 8h-6v-6h6v6zm0-8h-6V5h6v6z\" }),\n React.createElement(\"path\", { d: \"M0 0h24v24H0z\", fill: \"none\" })\n );\n\n var AdvTable = function (_Component) {\n _inherits(AdvTable, _Component);\n\n function AdvTable() {\n _classCallCheck(this, AdvTable);\n\n var _this = _possibleConstructorReturn(this, (AdvTable.__proto__ || Object.getPrototypeOf(AdvTable)).apply(this, arguments));\n\n _this.state = {\n editor: null,\n selectedCell: null,\n selectedCellBgColor: null,\n selectedCellTextColor: null,\n selectedCellBorderColor: null,\n selectedCellBorderStyle: '',\n selectedCellBorderWidth: '',\n selectedCellPaddingTop: '',\n selectedCellPaddingRight: '',\n selectedCellPaddingBottom: '',\n selectedCellPaddingLeft: '',\n selectedCellTextAlign: null,\n selectedCellVerticalAlign: null\n };\n\n _this.handleSetup = _this.handleSetup.bind(_this);\n return _this;\n }\n\n _createClass(AdvTable, [{\n key: \"componentWillMount\",\n value: function componentWillMount() {\n var _props = this.props,\n attributes = _props.attributes,\n setAttributes = _props.setAttributes;\n\n var currentBlockConfig = advgbDefaultConfig['advgb-table'];\n\n // No override attributes of blocks inserted before\n if (attributes.changed !== true) {\n if (currentBlockConfig && (typeof currentBlockConfig === \"undefined\" ? \"undefined\" : _typeof(currentBlockConfig)) === 'object') {\n Object.keys(currentBlockConfig).map(function (attribute) {\n attributes[attribute] = currentBlockConfig[attribute];\n });\n\n // Finally set changed attribute to true, so we don't modify anything again\n setAttributes({ changed: true });\n }\n }\n }\n }, {\n key: \"handleSetup\",\n value: function handleSetup(editor, isSelected) {\n var _this2 = this;\n\n editor.on('init', function () {\n if (isSelected) {\n AdvTable.selectFirstCell(editor);\n }\n });\n\n this.setState({ editor: editor });\n\n editor.on('nodeChange', function () {\n var selectedCell = editor.dom.getParent(editor.selection.getStart(), 'td');\n var selectedCellBgColor = editor.dom.getStyle(selectedCell, 'background-color');\n var selectedCellTextColor = editor.dom.getStyle(selectedCell, 'color');\n var selectedCellBorderColor = editor.dom.getAttrib(selectedCell, 'data-border-color');\n var selectedCellBorderStyle = editor.dom.getStyle(selectedCell, 'border-style') || 'solid';\n var selectedCellBorderWidth = editor.dom.getStyle(selectedCell, 'border-width') || '1px';\n selectedCellBorderWidth = parseInt(selectedCellBorderWidth.replace('px', ''));\n var selectedCellPaddingTop = editor.dom.getStyle(selectedCell, 'padding-top');\n var selectedCellPaddingRight = editor.dom.getStyle(selectedCell, 'padding-right');\n var selectedCellPaddingBottom = editor.dom.getStyle(selectedCell, 'padding-bottom');\n var selectedCellPaddingLeft = editor.dom.getStyle(selectedCell, 'padding-left');\n if (selectedCellPaddingTop) selectedCellPaddingTop = selectedCellPaddingTop.replace('px', '');\n if (selectedCellPaddingRight) selectedCellPaddingRight = selectedCellPaddingRight.replace('px', '');\n if (selectedCellPaddingBottom) selectedCellPaddingBottom = selectedCellPaddingBottom.replace('px', '');\n if (selectedCellPaddingLeft) selectedCellPaddingLeft = selectedCellPaddingLeft.replace('px', '');\n var selectedCellTextAlign = editor.dom.getStyle(selectedCell, 'text-align');\n var selectedCellVerticalAlign = editor.dom.getStyle(selectedCell, 'vertical-align');\n\n return _this2.setState({\n selectedCell: selectedCell,\n selectedCellBgColor: selectedCellBgColor,\n selectedCellTextColor: selectedCellTextColor,\n selectedCellBorderColor: selectedCellBorderColor,\n selectedCellBorderStyle: selectedCellBorderStyle,\n selectedCellBorderWidth: selectedCellBorderWidth,\n selectedCellPaddingTop: selectedCellPaddingTop,\n selectedCellPaddingRight: selectedCellPaddingRight,\n selectedCellPaddingBottom: selectedCellPaddingBottom,\n selectedCellPaddingLeft: selectedCellPaddingLeft,\n selectedCellTextAlign: selectedCellTextAlign,\n selectedCellVerticalAlign: selectedCellVerticalAlign\n });\n });\n }\n }, {\n key: \"render\",\n value: function render() {\n var _this3 = this;\n\n var _props2 = this.props,\n isSelected = _props2.isSelected,\n attributes = _props2.attributes,\n setAttributes = _props2.setAttributes,\n className = _props2.className;\n var content = attributes.content,\n align = attributes.align,\n maxWidth = attributes.maxWidth;\n var _state = this.state,\n editor = _state.editor,\n selectedCell = _state.selectedCell,\n selectedCellBgColor = _state.selectedCellBgColor,\n selectedCellTextColor = _state.selectedCellTextColor,\n selectedCellBorderColor = _state.selectedCellBorderColor,\n selectedCellBorderStyle = _state.selectedCellBorderStyle,\n selectedCellBorderWidth = _state.selectedCellBorderWidth,\n selectedCellPaddingTop = _state.selectedCellPaddingTop,\n selectedCellPaddingRight = _state.selectedCellPaddingRight,\n selectedCellPaddingBottom = _state.selectedCellPaddingBottom,\n selectedCellPaddingLeft = _state.selectedCellPaddingLeft,\n selectedCellTextAlign = _state.selectedCellTextAlign,\n selectedCellVerticalAlign = _state.selectedCellVerticalAlign;\n\n\n var TABLE_CONTROLS = [{\n icon: 'table-row-before',\n title: __('Add Row Before'),\n onClick: AdvTable.execCommand('mceTableInsertRowBefore')\n }, {\n icon: 'table-row-after',\n title: __('Add Row After'),\n onClick: AdvTable.execCommand('mceTableInsertRowAfter')\n }, {\n icon: 'table-row-delete',\n title: __('Delete Row'),\n onClick: AdvTable.execCommand('mceTableDeleteRow')\n }, {\n icon: 'table-col-before',\n title: __('Add Column Before'),\n onClick: AdvTable.execCommand('mceTableInsertColBefore')\n }, {\n icon: 'table-col-after',\n title: __('Add Column After'),\n onClick: AdvTable.execCommand('mceTableInsertColAfter')\n }, {\n icon: 'table-col-delete',\n title: __('Delete Column'),\n onClick: AdvTable.execCommand('mceTableDeleteCol')\n }, {\n icon: React.createElement(\n \"svg\",\n { width: \"20\", height: \"20\", viewBox: \"4 2 18 18\", className: \"dashicon\" },\n React.createElement(\"path\", { fill: \"none\", d: \"M0,0h24v24H0V0z\" }),\n React.createElement(\"path\", { d: \"M4,5v13h17V5H4z M14,7v9h-3V7H14z M6,7h3v9H6V7z M19,16h-3V7h3V16z\" })\n ),\n title: __('Split Merged Cells'),\n onClick: AdvTable.execCommand('mceTableSplitCells')\n }, {\n icon: React.createElement(\n \"svg\",\n { width: \"20\", height: \"20\", className: \"dashicon\", viewBox: \"2 2 22 22\" },\n React.createElement(\"path\", { fill: \"none\", d: \"M0,0h24v24H0V0z\" }),\n React.createElement(\"polygon\", { points: \"21,18 2,18 2,20 21,20 21,18\" }),\n React.createElement(\"path\", { d: \"M19,10v4H4v-4H19 M20,8H3C2.45,8,2,8.45,2,9v6c0,0.55,0.45,1,1,1h17c0.55,0,1-0.45,1-1V9C21,8.45,20.55,8,20,8L20,8z\" }),\n React.createElement(\"polygon\", { points: \"21,4 2,4 2,6 21,6 21,4\" })\n ),\n title: __('Merge Cells'),\n onClick: AdvTable.execCommand('mceTableMergeCells')\n }];\n\n var BORDER_SELECT = [{\n title: __('Border Top'),\n icon: React.createElement(\n \"svg\",\n { xmlns: \"http://www.w3.org/2000/svg\", width: \"24\", height: \"24\", viewBox: \"0 0 24 24\" },\n React.createElement(\"path\", { d: \"M7 21h2v-2H7v2zm0-8h2v-2H7v2zm4 0h2v-2h-2v2zm0 8h2v-2h-2v2zm-8-4h2v-2H3v2zm0 4h2v-2H3v2zm0-8h2v-2H3v2zm0-4h2V7H3v2zm8 8h2v-2h-2v2zm8-8h2V7h-2v2zm0 4h2v-2h-2v2zM3 3v2h18V3H3zm16 14h2v-2h-2v2zm-4 4h2v-2h-2v2zM11 9h2V7h-2v2zm8 12h2v-2h-2v2zm-4-8h2v-2h-2v2z\" }),\n React.createElement(\"path\", { d: \"M0 0h24v24H0z\", fill: \"none\" })\n ),\n onClick: function onClick() {\n editor.dom.setStyles(selectedCell, {\n 'border-top-color': selectedCellBorderColor\n });\n editor.fire('change');\n }\n }, {\n title: __('Border Right'),\n icon: React.createElement(\n \"svg\",\n { xmlns: \"http://www.w3.org/2000/svg\", width: \"24\", height: \"24\", viewBox: \"0 0 24 24\" },\n React.createElement(\"path\", { d: \"M7 21h2v-2H7v2zM3 5h2V3H3v2zm4 0h2V3H7v2zm0 8h2v-2H7v2zm-4 8h2v-2H3v2zm8 0h2v-2h-2v2zm-8-8h2v-2H3v2zm0 4h2v-2H3v2zm0-8h2V7H3v2zm8 8h2v-2h-2v2zm4-4h2v-2h-2v2zm4-10v18h2V3h-2zm-4 18h2v-2h-2v2zm0-16h2V3h-2v2zm-4 8h2v-2h-2v2zm0-8h2V3h-2v2zm0 4h2V7h-2v2z\" }),\n React.createElement(\"path\", { d: \"M0 0h24v24H0z\", fill: \"none\" })\n ),\n onClick: function onClick() {\n editor.dom.setStyles(selectedCell, {\n 'border-right-color': selectedCellBorderColor\n });\n editor.fire('change');\n }\n }, {\n title: __('Border Bottom'),\n icon: React.createElement(\n \"svg\",\n { xmlns: \"http://www.w3.org/2000/svg\", width: \"24\", height: \"24\", viewBox: \"0 0 24 24\" },\n React.createElement(\"path\", { d: \"M9 11H7v2h2v-2zm4 4h-2v2h2v-2zM9 3H7v2h2V3zm4 8h-2v2h2v-2zM5 3H3v2h2V3zm8 4h-2v2h2V7zm4 4h-2v2h2v-2zm-4-8h-2v2h2V3zm4 0h-2v2h2V3zm2 10h2v-2h-2v2zm0 4h2v-2h-2v2zM5 7H3v2h2V7zm14-4v2h2V3h-2zm0 6h2V7h-2v2zM5 11H3v2h2v-2zM3 21h18v-2H3v2zm2-6H3v2h2v-2z\" }),\n React.createElement(\"path\", { d: \"M0 0h24v24H0z\", fill: \"none\" })\n ),\n onClick: function onClick() {\n editor.dom.setStyles(selectedCell, {\n 'border-bottom-color': selectedCellBorderColor\n });\n editor.fire('change');\n }\n }, {\n title: __('Border Left'),\n icon: React.createElement(\n \"svg\",\n { xmlns: \"http://www.w3.org/2000/svg\", width: \"24\", height: \"24\", viewBox: \"0 0 24 24\" },\n React.createElement(\"path\", { d: \"M11 21h2v-2h-2v2zm0-4h2v-2h-2v2zm0-12h2V3h-2v2zm0 4h2V7h-2v2zm0 4h2v-2h-2v2zm-4 8h2v-2H7v2zM7 5h2V3H7v2zm0 8h2v-2H7v2zm-4 8h2V3H3v18zM19 9h2V7h-2v2zm-4 12h2v-2h-2v2zm4-4h2v-2h-2v2zm0-14v2h2V3h-2zm0 10h2v-2h-2v2zm0 8h2v-2h-2v2zm-4-8h2v-2h-2v2zm0-8h2V3h-2v2z\" }),\n React.createElement(\"path\", { d: \"M0 0h24v24H0z\", fill: \"none\" })\n ),\n onClick: function onClick() {\n editor.dom.setStyles(selectedCell, {\n 'border-left-color': selectedCellBorderColor\n });\n editor.fire('change');\n }\n }, {\n title: __('Border All'),\n icon: React.createElement(\n \"svg\",\n { xmlns: \"http://www.w3.org/2000/svg\", width: \"24\", height: \"24\", viewBox: \"0 0 24 24\" },\n React.createElement(\"path\", { d: \"M13 7h-2v2h2V7zm0 4h-2v2h2v-2zm4 0h-2v2h2v-2zM3 3v18h18V3H3zm16 16H5V5h14v14zm-6-4h-2v2h2v-2zm-4-4H7v2h2v-2z\" }),\n React.createElement(\"path\", { d: \"M0 0h24v24H0z\", fill: \"none\" })\n ),\n onClick: function onClick() {\n editor.dom.setStyles(selectedCell, {\n 'border-top-color': selectedCellBorderColor,\n 'border-right-color': selectedCellBorderColor,\n 'border-bottom-color': selectedCellBorderColor,\n 'border-left-color': selectedCellBorderColor\n });\n editor.fire('change');\n }\n }, {\n title: __('Border None'),\n icon: React.createElement(\n \"svg\",\n { xmlns: \"http://www.w3.org/2000/svg\", width: \"24\", height: \"24\", viewBox: \"0 0 24 24\" },\n React.createElement(\"path\", { d: \"M7 5h2V3H7v2zm0 8h2v-2H7v2zm0 8h2v-2H7v2zm4-4h2v-2h-2v2zm0 4h2v-2h-2v2zm-8 0h2v-2H3v2zm0-4h2v-2H3v2zm0-4h2v-2H3v2zm0-4h2V7H3v2zm0-4h2V3H3v2zm8 8h2v-2h-2v2zm8 4h2v-2h-2v2zm0-4h2v-2h-2v2zm0 8h2v-2h-2v2zm0-12h2V7h-2v2zm-8 0h2V7h-2v2zm8-6v2h2V3h-2zm-8 2h2V3h-2v2zm4 16h2v-2h-2v2zm0-8h2v-2h-2v2zm0-8h2V3h-2v2z\" }),\n React.createElement(\"path\", { d: \"M0 0h24v24H0z\", fill: \"none\" })\n ),\n onClick: function onClick() {\n editor.dom.setStyles(selectedCell, {\n 'border-top-color': '',\n 'border-right-color': '',\n 'border-bottom-color': '',\n 'border-left-color': ''\n });\n editor.fire('change');\n }\n }];\n\n var HORZ_ALIGNMENT_CONTROLS = [{\n icon: 'editor-alignleft',\n title: __('Align left'),\n align: 'left'\n }, {\n icon: 'editor-aligncenter',\n title: __('Align center'),\n align: 'center'\n }, {\n icon: 'editor-alignright',\n title: __('Align right'),\n align: 'right'\n }, {\n icon: 'editor-justify',\n title: __('Align justify'),\n align: 'justify'\n }];\n\n var VERT_ALIGNMENT_CONTROLS = [{\n icon: React.createElement(\n \"svg\",\n { xmlns: \"http://www.w3.org/2000/svg\", width: \"20\", height: \"20\", viewBox: \"0 0 24 24\" },\n React.createElement(\"path\", { d: \"M8 11h3v10h2V11h3l-4-4-4 4zM4 3v2h16V3H4z\" }),\n React.createElement(\"path\", { d: \"M0 0h24v24H0z\", fill: \"none\" })\n ),\n title: __('Align top'),\n align: 'top'\n }, {\n icon: React.createElement(\n \"svg\",\n { xmlns: \"http://www.w3.org/2000/svg\", width: \"20\", height: \"20\", viewBox: \"0 0 24 24\" },\n React.createElement(\"path\", { d: \"M8 19h3v4h2v-4h3l-4-4-4 4zm8-14h-3V1h-2v4H8l4 4 4-4zM4 11v2h16v-2H4z\" }),\n React.createElement(\"path\", { d: \"M0 0h24v24H0z\", fill: \"none\" })\n ),\n title: __('Align middle'),\n align: 'middle'\n }, {\n icon: React.createElement(\n \"svg\",\n { xmlns: \"http://www.w3.org/2000/svg\", width: \"20\", height: \"20\", viewBox: \"0 0 24 24\" },\n React.createElement(\"path\", { d: \"M16 13h-3V3h-2v10H8l4 4 4-4zM4 19v2h16v-2H4z\" }),\n React.createElement(\"path\", { d: \"M0 0h24v24H0z\", fill: \"none\" })\n ),\n title: __('Align bottom'),\n align: 'bottom'\n }];\n\n return React.createElement(\n Fragment,\n null,\n React.createElement(\n BlockControls,\n null,\n React.createElement(BlockAlignmentToolbar, {\n value: align,\n onChange: function onChange(value) {\n return setAttributes({ align: value });\n }\n }),\n React.createElement(\n Toolbar,\n null,\n React.createElement(DropdownMenu, {\n icon: \"editor-table\",\n label: __('Edit table'),\n controls: TABLE_CONTROLS.map(function (control) {\n return _extends({}, control, {\n onClick: function onClick() {\n return control.onClick(_this3.state.editor);\n }\n });\n })\n }),\n React.createElement(MediaUpload, {\n type: \"image\",\n onSelect: function onSelect(media) {\n return editor.execCommand('mceInsertContent', false, \"\");\n },\n render: function render(_ref) {\n var open = _ref.open;\n\n return React.createElement(IconButton, {\n className: \"components-icon-button components-toolbar__control\",\n icon: \"format-image\",\n label: __('Insert image'),\n onClick: open\n });\n }\n })\n )\n ),\n React.createElement(\n InspectorControls,\n null,\n React.createElement(\n PanelBody,\n { title: __('Table Settings') },\n React.createElement(RangeControl, {\n label: __('Max width (px)'),\n help: __('Set this to 0 to make max-width is 100%'),\n min: 0,\n max: 1999,\n value: maxWidth,\n onChange: function onChange(value) {\n return setAttributes({ maxWidth: value });\n }\n })\n ),\n React.createElement(\n PanelBody,\n { title: __('Single Cell Settings') },\n React.createElement(\n PanelColor,\n { title: __('Background Color'), colorValue: selectedCellBgColor, initialOpen: false },\n React.createElement(ColorPalette, {\n value: selectedCellBgColor,\n onChange: function onChange(value) {\n editor.dom.setStyle(selectedCell, 'background-color', value || '');\n editor.fire('change');\n _this3.setState({ selectedCellBgColor: value });\n }\n })\n ),\n React.createElement(\n PanelColor,\n { title: __('Text Color'), colorValue: selectedCellTextColor, initialOpen: false },\n React.createElement(ColorPalette, {\n value: selectedCellTextColor,\n onChange: function onChange(value) {\n editor.dom.setStyle(selectedCell, 'color', value || '');\n editor.fire('change');\n _this3.setState({ selectedCellTextColor: value });\n }\n })\n ),\n React.createElement(\n PanelBody,\n { title: __('Border'), initialOpen: false },\n React.createElement(SelectControl, {\n label: __('Border Style'),\n value: selectedCellBorderStyle,\n options: [{ label: __('Solid'), value: 'solid' }, { label: __('Dashed'), value: 'dashed' }, { label: __('Dotted'), value: 'dotted' }, { label: __('None'), value: 'none' }],\n onChange: function onChange(value) {\n editor.dom.setStyle(selectedCell, 'border-style', value);\n editor.fire('change');\n _this3.setState({ selectedCellBorderStyle: value });\n }\n }),\n React.createElement(\n PanelColor,\n { title: __('Border Color'), colorValue: selectedCellBorderColor, initialOpen: false },\n React.createElement(ColorPalette, {\n value: selectedCellBorderColor,\n onChange: function onChange(value) {\n editor.dom.setAttrib(selectedCell, 'data-border-color', value || '');\n ['top', 'right', 'bottom', 'left'].map(function (pos) {\n if (editor.dom.getStyle(selectedCell, \"border-\" + pos + \"-color\")) editor.dom.setStyle(selectedCell, \"border-\" + pos + \"-color\", value || '');\n });\n editor.fire('change');\n _this3.setState({ selectedCellBorderColor: value });\n }\n })\n ),\n React.createElement(RangeControl, {\n label: __('Border width'),\n value: selectedCellBorderWidth,\n min: 1,\n max: 10,\n onChange: function onChange(value) {\n editor.dom.setStyle(selectedCell, 'border-width', value);\n editor.fire('change');\n _this3.setState({ selectedCellBorderWidth: value });\n }\n }),\n React.createElement(\n \"div\",\n { className: 'advgb-border-item-wrapper' },\n BORDER_SELECT.map(function (item, index) {\n return React.createElement(\n \"div\",\n { className: 'advgb-border-item', key: index },\n React.createElement(\n Tooltip,\n { text: item.title },\n React.createElement(\n \"span\",\n { onClick: item.onClick },\n item.icon\n )\n )\n );\n })\n )\n ),\n React.createElement(\n PanelBody,\n { title: __('Padding'), initialOpen: false },\n React.createElement(RangeControl, {\n label: __('Padding Top'),\n min: 0,\n max: 50,\n value: selectedCellPaddingTop,\n onChange: function onChange(value) {\n editor.dom.setStyle(selectedCell, 'padding-top', value || '');\n editor.fire('change');\n _this3.setState({ selectedCellPaddingTop: value || '' });\n },\n allowReset: true\n }),\n React.createElement(RangeControl, {\n label: __('Padding Bottom'),\n min: 0,\n max: 50,\n value: selectedCellPaddingBottom,\n onChange: function onChange(value) {\n editor.dom.setStyle(selectedCell, 'padding-bottom', value || '');\n editor.fire('change');\n _this3.setState({ selectedCellPaddingBottom: value || '' });\n },\n allowReset: true\n }),\n React.createElement(RangeControl, {\n label: __('Padding Left'),\n min: 0,\n max: 50,\n value: selectedCellPaddingLeft,\n onChange: function onChange(value) {\n editor.dom.setStyle(selectedCell, 'padding-left', value || '');\n editor.fire('change');\n _this3.setState({ selectedCellPaddingLeft: value || '' });\n },\n allowReset: true\n }),\n React.createElement(RangeControl, {\n label: __('Padding Right'),\n min: 0,\n max: 50,\n value: selectedCellPaddingRight,\n onChange: function onChange(value) {\n editor.dom.setStyle(selectedCell, 'padding-right', value || '');\n editor.fire('change');\n _this3.setState({ selectedCellPaddingRight: value || '' });\n },\n allowReset: true\n })\n ),\n React.createElement(\n PanelBody,\n { title: __('Text Alignment'), initialOpen: false },\n React.createElement(\n BaseControl,\n { label: __('Horizontal Align') },\n React.createElement(Toolbar, {\n controls: HORZ_ALIGNMENT_CONTROLS.map(function (control) {\n var isActive = selectedCellTextAlign === control.align;\n\n return _extends({}, control, {\n isActive: isActive,\n onClick: function onClick() {\n editor.dom.setStyle(selectedCell, 'text-align', isActive ? '' : control.align);\n editor.fire('change');\n }\n });\n })\n })\n ),\n React.createElement(\n BaseControl,\n { label: __('Vertical Align') },\n React.createElement(Toolbar, {\n controls: VERT_ALIGNMENT_CONTROLS.map(function (control) {\n var isActive = selectedCellVerticalAlign === control.align;\n\n return _extends({}, control, {\n isActive: isActive,\n onClick: function onClick() {\n editor.dom.setStyle(selectedCell, 'vertical-align', isActive ? '' : control.align);\n editor.fire('change');\n }\n });\n })\n })\n )\n )\n )\n ),\n React.createElement(RichText, {\n tagName: \"table\",\n wrapperClassName: className,\n unstableGetSettings: function unstableGetSettings(settings) {\n return _extends({}, settings, {\n plugins: (settings.plugins || []).concat('table')\n });\n },\n value: content,\n unstableOnSetup: function unstableOnSetup(editor) {\n return _this3.handleSetup(editor, isSelected);\n },\n onChange: function onChange(value) {\n return setAttributes({ content: value });\n },\n style: { maxWidth: !!maxWidth && maxWidth + 'px' }\n })\n );\n }\n }], [{\n key: \"isTableSelected\",\n value: function isTableSelected(editor) {\n return editor.dom.getParent(editor.selection.getStart(true), 'table', editor.getBody().parentNode);\n }\n }, {\n key: \"selectFirstCell\",\n value: function selectFirstCell(editor) {\n var cell = editor.getBody().querySelector('td,th');\n if (cell) {\n cell.focus();\n editor.selection.select(cell, true);\n editor.selection.collapse(false);\n }\n }\n }, {\n key: \"execCommand\",\n value: function execCommand(command) {\n return function (editor) {\n if (editor) {\n if (!AdvTable.isTableSelected(editor)) {\n AdvTable.selectFirstCell(editor);\n }\n editor.execCommand(command);\n }\n };\n }\n }]);\n\n return AdvTable;\n }(Component);\n\n registerBlockType('advgb/table', {\n title: __('Advanced Table'),\n description: __('Advanced table block with more styles and functions.'),\n icon: {\n src: tableBlockIcon,\n foreground: typeof advgbBlocks !== 'undefined' ? advgbBlocks.color : undefined\n },\n category: 'formatting',\n keywords: [__('table'), __('cell'), __('data')],\n attributes: {\n content: {\n type: 'array',\n source: 'children',\n selector: 'table',\n default: [React.createElement(\n \"tbody\",\n { key: \"a\" },\n React.createElement(\n \"tr\",\n null,\n React.createElement(\n \"td\",\n null,\n React.createElement(\"br\", null)\n ),\n React.createElement(\n \"td\",\n null,\n React.createElement(\"br\", null)\n )\n ),\n React.createElement(\n \"tr\",\n null,\n React.createElement(\n \"td\",\n null,\n React.createElement(\"br\", null)\n ),\n React.createElement(\n \"td\",\n null,\n React.createElement(\"br\", null)\n )\n )\n )]\n },\n align: {\n type: 'string'\n },\n maxWidth: {\n type: 'number',\n default: 0\n },\n changed: {\n type: 'boolean',\n default: false\n }\n },\n edit: AdvTable,\n save: function save(_ref2) {\n var attributes = _ref2.attributes;\n var content = attributes.content,\n align = attributes.align,\n maxWidth = attributes.maxWidth;\n\n return React.createElement(RichText.Content, {\n tagName: \"table\",\n className: 'advgb-table-frontend ' + (align ? \"align\" + align : ''),\n style: { maxWidth: !!maxWidth ? maxWidth + 'px' : undefined },\n value: content\n });\n },\n getEditWrapperProps: function getEditWrapperProps(attributes) {\n var align = attributes.align;\n\n if ('left' === align || 'right' === align || 'wide' === align || 'full' === align) {\n return { 'data-align': align };\n }\n }\n });\n})(wp.i18n, wp.blocks, wp.element, wp.editor, wp.components);\n\n//# sourceURL=webpack:///./assets/blocks/advtable/block.jsx?");
/***/ }),
/***/ "./assets/blocks/advvideo/block.jsx":
/*!******************************************!*\
!*** ./assets/blocks/advvideo/block.jsx ***!
\******************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
eval("\n\nvar _typeof = typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; };\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\n(function (wpI18n, wpBlocks, wpElement, wpEditor, wpComponents) {\n var __ = wpI18n.__;\n var Component = wpElement.Component,\n Fragment = wpElement.Fragment;\n var registerBlockType = wpBlocks.registerBlockType;\n var InspectorControls = wpEditor.InspectorControls,\n BlockControls = wpEditor.BlockControls,\n ColorPalette = wpEditor.ColorPalette,\n MediaUpload = wpEditor.MediaUpload;\n var RangeControl = wpComponents.RangeControl,\n PanelBody = wpComponents.PanelBody,\n PanelColor = wpComponents.PanelColor,\n ToggleControl = wpComponents.ToggleControl,\n BaseControl = wpComponents.BaseControl,\n TextControl = wpComponents.TextControl,\n Button = wpComponents.Button,\n IconButton = wpComponents.IconButton,\n Dashicon = wpComponents.Dashicon,\n Spinner = wpComponents.Spinner,\n Toolbar = wpComponents.Toolbar;\n\n\n var PLAY_BUTTON_STYLE = {\n normal: [React.createElement(\"path\", { key: \"x\", d: \"M8 5v14l11-7z\" }), React.createElement(\"path\", { key: \"y\", d: \"M0 0h24v24H0z\", fill: \"none\" })],\n circleFill: [React.createElement(\"path\", { key: \"x\", d: \"M0 0h24v24H0z\", fill: \"none\" }), React.createElement(\"path\", { key: \"y\", d: \"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm-2 14.5v-9l6 4.5-6 4.5z\" })],\n circleOutline: [React.createElement(\"path\", { key: \"x\", d: \"M0 0h24v24H0z\", fill: \"none\" }), React.createElement(\"path\", { key: \"y\", d: \"M10 16.5l6-4.5-6-4.5v9zM12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8z\" })],\n videoCam: [React.createElement(\"path\", { key: \"x\", d: \"M0 0h24v24H0z\", fill: \"none\" }), React.createElement(\"path\", { key: \"y\", d: \"M17 10.5V7c0-.55-.45-1-1-1H4c-.55 0-1 .45-1 1v10c0 .55.45 1 1 1h12c.55 0 1-.45 1-1v-3.5l4 4v-11l-4 4z\" })],\n squareCurved: [React.createElement(\"path\", { key: \"x\", d: \"M20 8H4V6h16v2zm-2-6H6v2h12V2zm4 10v8c0 1.1-.9 2-2 2H4c-1.1 0-2-.9-2-2v-8c0-1.1.9-2 2-2h16c1.1 0 2 .9 2 2zm-6 4l-6-3.27v6.53L16 16z\" }), React.createElement(\"path\", { key: \"y\", fill: \"none\", d: \"M0 0h24v24H0z\" })],\n starSticker: [React.createElement(\"path\", { key: \"x\", d: \"M0 0h24v24H0z\", fill: \"none\" }), React.createElement(\"path\", { key: \"y\", d: \"M20 12c0-1.1.9-2 2-2V6c0-1.1-.9-2-2-2H4c-1.1 0-1.99.9-1.99 2v4c1.1 0 1.99.9 1.99 2s-.89 2-2 2v4c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2v-4c-1.1 0-2-.9-2-2zm-4.42 4.8L12 14.5l-3.58 2.3 1.08-4.12-3.29-2.69 4.24-.25L12 5.8l1.54 3.95 4.24.25-3.29 2.69 1.09 4.11z\" })]\n };\n\n var AdvVideo = function (_Component) {\n _inherits(AdvVideo, _Component);\n\n function AdvVideo() {\n _classCallCheck(this, AdvVideo);\n\n var _this = _possibleConstructorReturn(this, (AdvVideo.__proto__ || Object.getPrototypeOf(AdvVideo)).apply(this, arguments));\n\n _this.state = {\n fetching: false\n };\n\n _this.fetchVideoInfo = _this.fetchVideoInfo.bind(_this);\n return _this;\n }\n\n _createClass(AdvVideo, [{\n key: \"componentWillMount\",\n value: function componentWillMount() {\n var _props = this.props,\n attributes = _props.attributes,\n setAttributes = _props.setAttributes;\n\n var currentBlockConfig = advgbDefaultConfig['advgb-video'];\n\n // No override attributes of blocks inserted before\n if (attributes.changed !== true) {\n if (currentBlockConfig !== undefined && (typeof currentBlockConfig === \"undefined\" ? \"undefined\" : _typeof(currentBlockConfig)) === 'object') {\n Object.keys(currentBlockConfig).map(function (attribute) {\n attributes[attribute] = currentBlockConfig[attribute];\n });\n\n // Finally set changed attribute to true, so we don't modify anything again\n setAttributes({ changed: true });\n }\n }\n }\n }, {\n key: \"fetchVideoInfo\",\n value: function fetchVideoInfo() {\n var _this2 = this;\n\n var _props2 = this.props,\n attributes = _props2.attributes,\n setAttributes = _props2.setAttributes;\n var videoID = attributes.videoID,\n poster = attributes.poster,\n posterID = attributes.posterID;\n\n var realID = videoID;\n\n if (!!videoID) {\n this.setState({ fetching: true });\n\n var url = '';\n if (videoID.match(/^\\d+$/g)) {\n url = \"https://vimeo.com/\" + videoID;\n } else {\n url = \"https://www.youtube.com/watch?v=\" + videoID;\n }\n\n if (videoID.indexOf('http') > -1) {\n url = videoID;\n }\n\n if (videoID.match(/youtube.com/)) {\n realID = videoID.split('v=');\n realID = realID[1];\n } else if (videoID.match(/youtu.be|vimeo.com/)) {\n realID = videoID.split('/');\n realID = realID[realID.length - 1];\n }\n\n if (realID.indexOf('&') > -1) realID = realID.substring(0, realID.indexOf('&'));\n\n wp.apiFetch({ path: wp.url.addQueryArgs(\"/oembed/1.0/proxy?url=\" + encodeURIComponent(url)) }).then(function (obj) {\n _this2.setState({ fetching: false });\n if (!!obj.title && !!obj.provider_name) {\n setAttributes({\n videoTitle: obj.title,\n poster: !!posterID ? poster : obj.thumbnail_url\n });\n\n switch (obj.provider_name) {\n case 'YouTube':\n setAttributes({\n videoSourceType: 'youtube',\n videoURL: \"https://www.youtube.com/embed/\" + realID + \"?rel=0&wmode=transparent\"\n });\n break;\n case 'Vimeo':\n setAttributes({\n videoSourceType: 'vimeo',\n videoURL: \"https://player.vimeo.com/video/\" + realID\n });\n break;\n default:\n break;\n }\n } else {\n setAttributes({\n videoTitle: 'ADVGB_FAIL_TO_LOAD',\n poster: ''\n });\n }\n });\n }\n }\n }, {\n key: \"render\",\n value: function render() {\n var _props3 = this.props,\n isSelected = _props3.isSelected,\n attributes = _props3.attributes,\n setAttributes = _props3.setAttributes;\n var videoURL = attributes.videoURL,\n videoID = attributes.videoID,\n videoSourceType = attributes.videoSourceType,\n videoTitle = attributes.videoTitle,\n videoFullWidth = attributes.videoFullWidth,\n videoWidth = attributes.videoWidth,\n videoHeight = attributes.videoHeight,\n playButtonIcon = attributes.playButtonIcon,\n playButtonSize = attributes.playButtonSize,\n playButtonColor = attributes.playButtonColor,\n overlayColor = attributes.overlayColor,\n poster = attributes.poster,\n posterID = attributes.posterID,\n openInLightbox = attributes.openInLightbox;\n\n\n var blockClassName = ['advgb-video-block', !!openInLightbox && !!videoURL && 'advgb-video-lightbox'].filter(Boolean).join(' ');\n\n var videoWrapperClass = ['advgb-video-wrapper', !!videoFullWidth && 'full-width'].filter(Boolean).join(' ');\n\n var videoHostIcon = {\n youtube: React.createElement(\n \"svg\",\n { id: \"Social_Icons\", version: \"1.1\", viewBox: \"0 0 128 128\", xmlns: \"http://www.w3.org/2000/svg\" },\n React.createElement(\n \"g\",\n { id: \"_x34__stroke\" },\n React.createElement(\n \"g\",\n { id: \"Youtube_1_\" },\n React.createElement(\"rect\", { clipRule: \"evenodd\", fill: \"none\", height: \"128\", width: \"128\" }),\n React.createElement(\"path\", { clipRule: \"evenodd\", d: \"M126.72,38.224c0,0-1.252-8.883-5.088-12.794 c-4.868-5.136-10.324-5.16-12.824-5.458c-17.912-1.305-44.78-1.305-44.78-1.305h-0.056c0,0-26.868,0-44.78,1.305 c-2.504,0.298-7.956,0.322-12.828,5.458C2.528,29.342,1.28,38.224,1.28,38.224S0,48.658,0,59.087v9.781 c0,10.433,1.28,20.863,1.28,20.863s1.248,8.883,5.084,12.794c4.872,5.136,11.268,4.975,14.116,5.511 c10.24,0.991,43.52,1.297,43.52,1.297s26.896-0.04,44.808-1.345c2.5-0.302,7.956-0.326,12.824-5.462 c3.836-3.912,5.088-12.794,5.088-12.794S128,79.302,128,68.868v-9.781C128,48.658,126.72,38.224,126.72,38.224z M50.784,80.72 L50.78,44.501l34.584,18.172L50.784,80.72z\", fill: \"#CE1312\", fillRule: \"evenodd\", id: \"Youtube\" })\n )\n )\n ),\n vimeo: React.createElement(\n \"svg\",\n { height: \"25\", viewBox: \"0 0 32 32\", width: \"25\", xmlns: \"http://www.w3.org/2000/svg\" },\n React.createElement(\n \"g\",\n null,\n React.createElement(\"circle\", { cx: \"16\", cy: \"16\", id: \"BG\", r: \"16\", fill: \"#5FCCFF\" }),\n React.createElement(\"path\", { d: \"M24,12.4c-0.1,1.6-1.2,3.7-3.3,6.4c-2.2,2.8-4,4.2-5.5,4.2 c-0.9,0-1.7-0.9-2.4-2.6c-0.4-1.6-0.9-3.2-1.3-4.7c-0.5-1.7-1-2.6-1.5-2.6c-0.1,0-0.5,0.3-1.3,0.8l-0.8-1 c0.8-0.7,1.6-1.4,2.3-2.1c1.1-0.9,1.8-1.4,2.4-1.4c1.2-0.1,2,0.7,2.3,2.5c0.3,2,0.5,3.2,0.6,3.7c0.4,1.6,0.8,2.4,1.2,2.4 c0.3,0,0.8-0.5,1.5-1.6c0.7-1.1,1-1.9,1.1-2.4c0.1-0.9-0.3-1.4-1.1-1.4c-0.4,0-0.8,0.1-1.2,0.3c0.8-2.6,2.3-3.8,4.5-3.7 C23.3,9.2,24.1,10.3,24,12.4\", id: \"Vimeo\", fill: \"#FFFFFF\" })\n )\n ),\n local: React.createElement(\n \"svg\",\n { height: \"25\", id: \"Layer_1\", version: \"1.1\", viewBox: \"0 0 24 24\", width: \"25\", xmlns: \"http://www.w3.org/2000/svg\" },\n React.createElement(\"path\", { clipRule: \"evenodd\", d: \"M22.506,21v0.016L17,15.511V19c0,1.105-0.896,2-2,2h-1.5H3H2c-1.104,0-2-0.895-2-2 v-1l0,0V6l0,0V5c0-1.104,0.896-1.999,2-1.999h1l0,0h10.5l0,0H15c1.104,0,2,0.895,2,1.999v3.516l5.5-5.5V3.001 c0.828,0,1.5,0.671,1.5,1.499v15C24,20.327,23.331,20.996,22.506,21z\", fillRule: \"evenodd\" })\n )\n };\n\n return React.createElement(\n Fragment,\n null,\n (!!poster && openInLightbox || !openInLightbox && videoSourceType === 'local') && React.createElement(\n BlockControls,\n null,\n React.createElement(\n Toolbar,\n null,\n React.createElement(MediaUpload, {\n type: 'image',\n value: posterID,\n onSelect: function onSelect(image) {\n return setAttributes({ poster: image.url, posterID: image.id });\n },\n render: function render(_ref) {\n var open = _ref.open;\n return React.createElement(IconButton, {\n className: \"components-toolbar__control\",\n label: __('Change image preview'),\n icon: 'edit',\n onClick: open\n });\n }\n }),\n React.createElement(IconButton, {\n className: \"components-toolbar__control\",\n label: __('Remove image preview'),\n icon: 'no',\n onClick: function onClick() {\n return setAttributes({ poster: undefined, posterID: undefined });\n }\n })\n )\n ),\n React.createElement(\n InspectorControls,\n null,\n React.createElement(\n PanelBody,\n { title: __('Advanced Video Settings') },\n React.createElement(ToggleControl, {\n label: __('Open video in light box'),\n help: __('Lightbox offers additional display options.'),\n checked: openInLightbox,\n onChange: function onChange() {\n return setAttributes({ openInLightbox: !openInLightbox });\n }\n }),\n React.createElement(ToggleControl, {\n label: __('Full width'),\n checked: videoFullWidth,\n onChange: function onChange() {\n return setAttributes({ videoFullWidth: !videoFullWidth });\n }\n }),\n !videoFullWidth && React.createElement(RangeControl, {\n label: __('Video width'),\n value: videoWidth,\n min: 100,\n max: 1000,\n onChange: function onChange(value) {\n return setAttributes({ videoWidth: value });\n }\n }),\n React.createElement(RangeControl, {\n label: __('Video height'),\n value: videoHeight,\n min: 300,\n max: 700,\n onChange: function onChange(value) {\n return setAttributes({ videoHeight: value });\n }\n }),\n !!openInLightbox && React.createElement(\n PanelColor,\n { title: __('Overlay Color'), colorValue: overlayColor, initialOpen: false },\n React.createElement(ColorPalette, {\n value: overlayColor,\n onChange: function onChange(value) {\n return setAttributes({ overlayColor: value });\n }\n })\n ),\n !!openInLightbox && React.createElement(\n PanelBody,\n { title: __('Play Button') },\n React.createElement(\n BaseControl,\n { label: __('Icon Style') },\n React.createElement(\n \"div\",\n { className: \"advgb-icon-items-wrapper\" },\n Object.keys(PLAY_BUTTON_STYLE).map(function (key, index) {\n return React.createElement(\n \"div\",\n { className: \"advgb-icon-item\", key: index },\n React.createElement(\n \"span\",\n { className: key === playButtonIcon ? 'active' : '',\n onClick: function onClick() {\n return setAttributes({ playButtonIcon: key });\n } },\n React.createElement(\n \"svg\",\n { xmlns: \"http://www.w3.org/2000/svg\", width: \"24\", height: \"24\", viewBox: \"0 0 24 24\" },\n PLAY_BUTTON_STYLE[key]\n )\n )\n );\n })\n )\n ),\n React.createElement(RangeControl, {\n label: __('Play Button Size'),\n value: playButtonSize,\n min: 40,\n max: 200,\n onChange: function onChange(value) {\n return setAttributes({ playButtonSize: value });\n }\n }),\n React.createElement(\n PanelColor,\n { title: __('Play Button Color'), colorValue: playButtonColor, initialOpen: false },\n React.createElement(ColorPalette, {\n value: playButtonColor,\n onChange: function onChange(value) {\n return setAttributes({ playButtonColor: value });\n }\n })\n )\n )\n )\n ),\n React.createElement(\n \"div\",\n { className: blockClassName },\n !!openInLightbox && React.createElement(\n \"div\",\n { className: videoWrapperClass, style: { backgroundColor: overlayColor, width: videoWidth } },\n React.createElement(\"div\", { className: 'advgb-video-poster', style: { backgroundImage: \"url(\" + poster + \")\" } }),\n React.createElement(\n \"div\",\n { className: 'advgb-button-wrapper', style: { height: videoHeight } },\n !poster && React.createElement(MediaUpload, {\n onSelect: function onSelect(media) {\n return setAttributes({ poster: media.url, posterID: media.id });\n },\n value: posterID,\n type: \"image\",\n render: function render(_ref2) {\n var open = _ref2.open;\n return React.createElement(\n Button,\n {\n className: 'button button-large',\n onClick: open\n },\n __('Select image preview')\n );\n }\n }),\n React.createElement(\n \"div\",\n { className: 'advgb-play-button' },\n React.createElement(\n \"svg\",\n { xmlns: \"http://www.w3.org/2000/svg\",\n width: playButtonSize,\n height: playButtonSize,\n fill: playButtonColor,\n viewBox: \"0 0 24 24\"\n },\n PLAY_BUTTON_STYLE[playButtonIcon]\n )\n )\n )\n ),\n !openInLightbox && ((videoSourceType === 'youtube' || videoSourceType === 'vimeo') && React.createElement(\"iframe\", { src: videoURL,\n width: videoWidth,\n height: videoHeight,\n frameBorder: \"0\",\n allowFullScreen: true }) || videoSourceType === 'local' && React.createElement(\n \"video\",\n { width: videoWidth,\n height: videoHeight,\n poster: poster,\n controls: true\n },\n React.createElement(\"source\", { src: videoURL }),\n __('Your browser does not support HTML5 video.')\n ) || !videoSourceType && React.createElement(\"div\", { style: { width: videoWidth, height: videoHeight } })),\n isSelected && React.createElement(\n \"div\",\n { className: 'advgb-video-input-block' },\n React.createElement(\n \"div\",\n { className: 'advgb-video-input' },\n React.createElement(Dashicon, { className: \"advgb-video-link-icon\", icon: 'admin-links' }),\n React.createElement(TextControl, {\n placeholder: __('Youtube/Vimeo video URL/ID…'),\n value: videoID,\n onChange: function onChange(value) {\n setAttributes({ videoID: value, videoURL: '', videoTitle: undefined, videoSourceType: '' });\n }\n }),\n React.createElement(\n Button,\n {\n className: \"button button-large\",\n disabled: !videoID || videoSourceType === 'local',\n style: { height: '31px' },\n onClick: this.fetchVideoInfo\n },\n __('Fetch')\n ),\n React.createElement(\n \"span\",\n { style: { margin: 'auto 10px' } },\n __('or use')\n ),\n React.createElement(MediaUpload, {\n type: 'video',\n value: videoID,\n onSelect: function onSelect(video) {\n return setAttributes({ videoURL: video.url, videoID: video.id, videoTitle: video.title, videoSourceType: 'local' });\n },\n render: function render(_ref3) {\n var open = _ref3.open;\n return React.createElement(\n Button,\n {\n className: \"button button-large is-primary\",\n onClick: open\n },\n __('Local video')\n );\n }\n })\n ),\n React.createElement(\n \"div\",\n { className: 'advgb-current-video-desc',\n style: { minWidth: '50%', margin: '10px auto', textAlign: 'center' }\n },\n React.createElement(\n \"strong\",\n null,\n __('Current Video'),\n \":\"\n ),\n React.createElement(\n \"span\",\n { title: videoSourceType,\n style: {\n width: '25px',\n height: '25px',\n display: 'inline-block',\n verticalAlign: 'text-bottom',\n margin: 'auto 7px' }\n },\n videoHostIcon[videoSourceType] || this.state.fetching && React.createElement(Spinner, null)\n ),\n React.createElement(\n \"span\",\n null,\n videoTitle === 'ADVGB_FAIL_TO_LOAD' && React.createElement(\n \"strong\",\n { style: { color: 'red' } },\n __('Wrong video URL/ID. Please try another.')\n ) || videoTitle || __('Not selected yet.')\n )\n )\n )\n )\n );\n }\n }]);\n\n return AdvVideo;\n }(Component);\n\n var advVideoBlockIcon = React.createElement(\n \"svg\",\n { xmlns: \"http://www.w3.org/2000/svg\", width: \"20\", height: \"20\", viewBox: \"2 2 22 22\" },\n React.createElement(\"path\", { d: \"M0 0h24v24H0z\", fill: \"none\" }),\n React.createElement(\"path\", { d: \"M10 16.5l6-4.5-6-4.5v9zM12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8z\" })\n );\n\n registerBlockType('advgb/video', {\n title: __('Advanced Video'),\n description: __('Powerful block for insert and embed video.'),\n icon: {\n src: advVideoBlockIcon,\n foreground: typeof advgbBlocks !== 'undefined' ? advgbBlocks.color : undefined\n },\n category: 'common',\n keywords: [__('video'), __('embed'), __('media')],\n attributes: {\n videoURL: {\n type: 'string'\n },\n videoID: {\n type: 'string'\n },\n videoSourceType: {\n type: 'string'\n },\n videoTitle: {\n type: 'string'\n },\n videoFullWidth: {\n type: 'boolean',\n default: true\n },\n videoWidth: {\n type: 'number'\n },\n videoHeight: {\n type: 'number',\n default: 450\n },\n playButtonIcon: {\n type: 'string',\n default: 'normal'\n },\n playButtonSize: {\n type: 'number',\n default: 80\n },\n playButtonColor: {\n type: 'string',\n default: '#fff'\n },\n overlayColor: {\n type: 'string',\n default: '#EEEEEE'\n },\n poster: {\n type: 'string'\n },\n posterID: {\n type: 'number'\n },\n openInLightbox: {\n type: 'boolean',\n default: true\n },\n changed: {\n type: 'boolean',\n default: false\n }\n },\n edit: AdvVideo,\n save: function save(_ref4) {\n var attributes = _ref4.attributes;\n var videoURL = attributes.videoURL,\n videoSourceType = attributes.videoSourceType,\n videoTitle = attributes.videoTitle,\n videoFullWidth = attributes.videoFullWidth,\n videoWidth = attributes.videoWidth,\n videoHeight = attributes.videoHeight,\n playButtonIcon = attributes.playButtonIcon,\n playButtonSize = attributes.playButtonSize,\n playButtonColor = attributes.playButtonColor,\n overlayColor = attributes.overlayColor,\n poster = attributes.poster,\n openInLightbox = attributes.openInLightbox;\n\n\n var blockClassName = ['advgb-video-block', !!videoFullWidth && 'full-width', !!openInLightbox && !!videoURL && 'advgb-video-lightbox'].filter(Boolean).join(' ');\n\n var videoWrapperClass = ['advgb-video-wrapper', !!videoFullWidth && 'full-width'].filter(Boolean).join(' ');\n\n return React.createElement(\n \"div\",\n { className: blockClassName,\n \"data-video\": videoURL,\n \"data-source\": videoSourceType\n },\n !openInLightbox && ((videoSourceType === 'youtube' || videoSourceType === 'vimeo') && React.createElement(\"iframe\", { src: videoURL,\n width: videoWidth,\n height: videoHeight,\n frameBorder: \"0\",\n allowFullScreen: true }) || videoSourceType === 'local' && React.createElement(\n \"video\",\n { className: videoFullWidth && 'full-width',\n width: videoWidth,\n height: videoHeight,\n poster: poster,\n controls: true\n },\n React.createElement(\"source\", { src: videoURL }),\n __('Your browser does not support HTML5 video.')\n ) || !videoSourceType && React.createElement(\"div\", { style: { width: videoWidth, height: videoHeight } })),\n !!openInLightbox && React.createElement(\n \"div\",\n { className: videoWrapperClass, style: { backgroundColor: overlayColor, width: videoWidth } },\n React.createElement(\"div\", { className: 'advgb-video-poster', style: { backgroundImage: \"url(\" + poster + \")\" } }),\n React.createElement(\n \"div\",\n { className: 'advgb-button-wrapper', style: { height: videoHeight } },\n React.createElement(\n \"div\",\n { className: 'advgb-play-button' },\n React.createElement(\n \"svg\",\n { xmlns: \"http://www.w3.org/2000/svg\",\n width: playButtonSize,\n height: playButtonSize,\n fill: playButtonColor,\n viewBox: \"0 0 24 24\"\n },\n PLAY_BUTTON_STYLE[playButtonIcon]\n )\n )\n )\n )\n );\n }\n });\n})(wp.i18n, wp.blocks, wp.element, wp.editor, wp.components);\n\n//# sourceURL=webpack:///./assets/blocks/advvideo/block.jsx?");
/***/ }),
/***/ "./assets/blocks/count-up/block.jsx":
/*!******************************************!*\
!*** ./assets/blocks/count-up/block.jsx ***!
\******************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
eval("\n\nvar _typeof = typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; };\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\n(function (wpI18n, wpBlocks, wpElement, wpEditor, wpComponents) {\n var __ = wpI18n.__;\n var Component = wpElement.Component,\n Fragment = wpElement.Fragment;\n var registerBlockType = wpBlocks.registerBlockType;\n var InspectorControls = wpEditor.InspectorControls,\n RichText = wpEditor.RichText,\n ColorPalette = wpEditor.ColorPalette;\n var RangeControl = wpComponents.RangeControl,\n PanelBody = wpComponents.PanelBody,\n PanelColor = wpComponents.PanelColor,\n TextControl = wpComponents.TextControl,\n FormToggle = wpComponents.FormToggle;\n\n var AdvCountUp = function (_Component) {\n _inherits(AdvCountUp, _Component);\n\n function AdvCountUp() {\n _classCallCheck(this, AdvCountUp);\n\n var _this = _possibleConstructorReturn(this, (AdvCountUp.__proto__ || Object.getPrototypeOf(AdvCountUp)).apply(this, arguments));\n\n _this.state = {\n currentEdit: ''\n };\n return _this;\n }\n\n _createClass(AdvCountUp, [{\n key: 'componentWillMount',\n value: function componentWillMount() {\n var _props = this.props,\n attributes = _props.attributes,\n setAttributes = _props.setAttributes;\n\n var currentBlockConfig = advgbDefaultConfig['advgb-count-up'];\n\n // No override attributes of blocks inserted before\n if (attributes.changed !== true) {\n if (currentBlockConfig !== undefined && (typeof currentBlockConfig === 'undefined' ? 'undefined' : _typeof(currentBlockConfig)) === 'object') {\n Object.keys(currentBlockConfig).map(function (attribute) {\n attributes[attribute] = currentBlockConfig[attribute];\n });\n\n // Finally set changed attribute to true, so we don't modify anything again\n setAttributes({ changed: true });\n }\n }\n }\n }, {\n key: 'handleSetup',\n value: function handleSetup(editor, area) {\n var _this2 = this;\n\n editor.on('focus', function () {\n return _this2.setState({ currentEdit: area });\n });\n }\n }, {\n key: 'render',\n value: function render() {\n var _this3 = this;\n\n var currentEdit = this.state.currentEdit;\n var _props2 = this.props,\n attributes = _props2.attributes,\n setAttributes = _props2.setAttributes,\n isSelected = _props2.isSelected;\n var headerText = attributes.headerText,\n headerText2 = attributes.headerText2,\n headerText3 = attributes.headerText3,\n headerTextColor = attributes.headerTextColor,\n countUpNumber = attributes.countUpNumber,\n countUpNumber2 = attributes.countUpNumber2,\n countUpNumber3 = attributes.countUpNumber3,\n countUpNumberColor = attributes.countUpNumberColor,\n countUpNumberSize = attributes.countUpNumberSize,\n countUpSymbol = attributes.countUpSymbol,\n countUpSymbol2 = attributes.countUpSymbol2,\n countUpSymbol3 = attributes.countUpSymbol3,\n countUpSymbolAfter = attributes.countUpSymbolAfter,\n countUpSymbolAfter2 = attributes.countUpSymbolAfter2,\n countUpSymbolAfter3 = attributes.countUpSymbolAfter3,\n descText = attributes.descText,\n descText2 = attributes.descText2,\n descText3 = attributes.descText3,\n descTextColor = attributes.descTextColor,\n columns = attributes.columns;\n\n\n return React.createElement(\n Fragment,\n null,\n React.createElement(\n InspectorControls,\n null,\n React.createElement(\n PanelBody,\n { title: __('Count Up Settings') },\n React.createElement(RangeControl, {\n label: __('Columns'),\n min: 1,\n max: 3,\n value: columns,\n onChange: function onChange(value) {\n return setAttributes({ columns: value });\n }\n }),\n React.createElement(\n PanelColor,\n { title: __('Header Color'), colorValue: headerTextColor, initialOpen: false },\n React.createElement(ColorPalette, {\n value: headerTextColor,\n onChange: function onChange(value) {\n return setAttributes({ headerTextColor: value });\n }\n })\n ),\n React.createElement(\n PanelColor,\n { title: __('Count Up Color'), colorValue: countUpNumberColor, initialOpen: false },\n React.createElement(ColorPalette, {\n value: countUpNumberColor,\n onChange: function onChange(value) {\n return setAttributes({ countUpNumberColor: value });\n }\n })\n ),\n React.createElement(\n PanelColor,\n { title: __('Description Color'), colorValue: descTextColor, initialOpen: false },\n React.createElement(ColorPalette, {\n value: descTextColor,\n onChange: function onChange(value) {\n return setAttributes({ descTextColor: value });\n }\n })\n ),\n React.createElement(RangeControl, {\n label: __('Counter Number Size'),\n min: 10,\n max: 100,\n value: countUpNumberSize,\n onChange: function onChange(value) {\n return setAttributes({ countUpNumberSize: value });\n }\n }),\n React.createElement(\n 'div',\n null,\n __('Counter Up Symbol')\n ),\n React.createElement(\n 'div',\n { className: 'advgb-col-3' },\n React.createElement(TextControl, {\n value: countUpSymbol,\n onChange: function onChange(value) {\n return setAttributes({ countUpSymbol: value });\n }\n }),\n React.createElement(FormToggle, {\n checked: countUpSymbolAfter,\n onChange: function onChange() {\n return setAttributes({ countUpSymbolAfter: !countUpSymbolAfter });\n },\n title: !!countUpSymbolAfter ? __('After') : __('Before')\n })\n ),\n parseInt(columns) > 1 && React.createElement(\n 'div',\n { className: 'advgb-col-3' },\n React.createElement(TextControl, {\n value: countUpSymbol2,\n onChange: function onChange(value) {\n return setAttributes({ countUpSymbol2: value });\n }\n }),\n React.createElement(FormToggle, {\n checked: countUpSymbolAfter2,\n onChange: function onChange() {\n return setAttributes({ countUpSymbolAfter2: !countUpSymbolAfter2 });\n },\n title: !!countUpSymbolAfter2 ? __('After') : __('Before')\n })\n ),\n parseInt(columns) > 2 && React.createElement(\n 'div',\n { className: 'advgb-col-3' },\n React.createElement(TextControl, {\n value: countUpSymbol3,\n onChange: function onChange(value) {\n return setAttributes({ countUpSymbol3: value });\n }\n }),\n React.createElement(FormToggle, {\n checked: countUpSymbolAfter3,\n onChange: function onChange() {\n return setAttributes({ countUpSymbolAfter3: !countUpSymbolAfter3 });\n },\n title: !!countUpSymbolAfter3 ? __('After') : __('Before')\n })\n ),\n React.createElement(\n 'p',\n { className: 'components-base-control__help', style: { clear: 'both' } },\n __('Use toggle buttons above to define symbol placement before/after the number (toggle on is after).')\n )\n )\n ),\n React.createElement(\n 'div',\n { className: 'advgb-count-up advgb-column-' + columns, style: { display: 'flex' } },\n React.createElement(\n 'div',\n { className: 'advgb-count-up-columns-one', style: { textAlign: 'center' } },\n React.createElement(RichText, {\n tagName: 'h4',\n value: headerText,\n onChange: function onChange(value) {\n return setAttributes({ headerText: value });\n },\n isSelected: isSelected && currentEdit === 'header',\n unstableOnSetup: function unstableOnSetup(editor) {\n return _this3.handleSetup(editor, 'header');\n },\n style: { color: headerTextColor },\n placeholder: __('Enter text…')\n }),\n React.createElement(RichText, {\n tagName: 'div',\n value: countUpNumber,\n onChange: function onChange(value) {\n return setAttributes({ countUpNumber: value });\n },\n isSelected: isSelected && currentEdit === 'countUp',\n unstableOnSetup: function unstableOnSetup(editor) {\n return _this3.handleSetup(editor, 'countUp');\n },\n style: { fontSize: countUpNumberSize + 'px', color: countUpNumberColor }\n }),\n React.createElement(RichText, {\n tagName: 'p',\n value: descText,\n onChange: function onChange(value) {\n return setAttributes({ descText: value });\n },\n isSelected: isSelected && currentEdit === 'desc',\n unstableOnSetup: function unstableOnSetup(editor) {\n return _this3.handleSetup(editor, 'desc');\n },\n style: { color: descTextColor },\n placeholder: __('Enter text…')\n })\n ),\n React.createElement(\n 'div',\n { className: 'advgb-count-up-columns-two', style: { textAlign: 'center' } },\n React.createElement(RichText, {\n tagName: 'h4',\n value: headerText2,\n onChange: function onChange(value) {\n return setAttributes({ headerText2: value });\n },\n isSelected: isSelected && currentEdit === 'header2',\n unstableOnSetup: function unstableOnSetup(editor) {\n return _this3.handleSetup(editor, 'header2');\n },\n style: { color: headerTextColor },\n placeholder: __('Enter text…')\n }),\n React.createElement(RichText, {\n tagName: 'div',\n value: countUpNumber2,\n onChange: function onChange(value) {\n return setAttributes({ countUpNumber2: value });\n },\n isSelected: isSelected && currentEdit === 'countUp2',\n unstableOnSetup: function unstableOnSetup(editor) {\n return _this3.handleSetup(editor, 'countUp2');\n },\n style: { fontSize: countUpNumberSize + 'px', color: countUpNumberColor }\n }),\n React.createElement(RichText, {\n tagName: 'p',\n value: descText2,\n onChange: function onChange(value) {\n return setAttributes({ descText2: value });\n },\n isSelected: isSelected && currentEdit === 'desc2',\n unstableOnSetup: function unstableOnSetup(editor) {\n return _this3.handleSetup(editor, 'desc2');\n },\n style: { color: descTextColor },\n placeholder: __('Enter text…')\n })\n ),\n React.createElement(\n 'div',\n { className: 'advgb-count-up-columns-three', style: { textAlign: 'center' } },\n React.createElement(RichText, {\n tagName: 'h4',\n value: headerText3,\n onChange: function onChange(value) {\n return setAttributes({ headerText3: value });\n },\n isSelected: isSelected && currentEdit === 'header3',\n unstableOnSetup: function unstableOnSetup(editor) {\n return _this3.handleSetup(editor, 'header3');\n },\n style: { color: headerTextColor },\n placeholder: __('Enter text…')\n }),\n React.createElement(RichText, {\n tagName: 'div',\n value: countUpNumber3,\n onChange: function onChange(value) {\n return setAttributes({ countUpNumber3: value });\n },\n isSelected: isSelected && currentEdit === 'countUp3',\n unstableOnSetup: function unstableOnSetup(editor) {\n return _this3.handleSetup(editor, 'countUp3');\n },\n style: { fontSize: countUpNumberSize + 'px', color: countUpNumberColor }\n }),\n React.createElement(RichText, {\n tagName: 'p',\n value: descText3,\n onChange: function onChange(value) {\n return setAttributes({ descText3: value });\n },\n isSelected: isSelected && currentEdit === 'desc3',\n unstableOnSetup: function unstableOnSetup(editor) {\n return _this3.handleSetup(editor, 'desc3');\n },\n style: { color: descTextColor },\n placeholder: __('Enter text…')\n })\n )\n )\n );\n }\n }]);\n\n return AdvCountUp;\n }(Component);\n\n function AdvCountUpSave(_ref) {\n var attributes = _ref.attributes;\n var headerText = attributes.headerText,\n headerText2 = attributes.headerText2,\n headerText3 = attributes.headerText3,\n headerTextColor = attributes.headerTextColor,\n countUpNumber = attributes.countUpNumber,\n countUpNumber2 = attributes.countUpNumber2,\n countUpNumber3 = attributes.countUpNumber3,\n countUpNumberColor = attributes.countUpNumberColor,\n countUpNumberSize = attributes.countUpNumberSize,\n countUpSymbol = attributes.countUpSymbol,\n countUpSymbol2 = attributes.countUpSymbol2,\n countUpSymbol3 = attributes.countUpSymbol3,\n countUpSymbolAfter = attributes.countUpSymbolAfter,\n countUpSymbolAfter2 = attributes.countUpSymbolAfter2,\n countUpSymbolAfter3 = attributes.countUpSymbolAfter3,\n descText = attributes.descText,\n descText2 = attributes.descText2,\n descText3 = attributes.descText3,\n descTextColor = attributes.descTextColor,\n columns = attributes.columns;\n\n\n var countSymbolElm = countUpSymbol ? React.createElement(\n 'span',\n { className: 'advgb-counter-symbol' },\n countUpSymbol\n ) : '';\n var countSymbolElm2 = countUpSymbol2 ? React.createElement(\n 'span',\n { className: 'advgb-counter-symbol' },\n countUpSymbol2\n ) : '';\n var countSymbolElm3 = countUpSymbol3 ? React.createElement(\n 'span',\n { className: 'advgb-counter-symbol' },\n countUpSymbol3\n ) : '';\n\n return React.createElement(\n 'div',\n { className: 'advgb-count-up', style: { display: 'flex' } },\n React.createElement(\n 'div',\n { className: 'advgb-count-up-columns-one', style: { textAlign: 'center' } },\n React.createElement(\n 'h4',\n { className: 'advgb-count-up-header', style: { color: headerTextColor } },\n headerText\n ),\n React.createElement(\n 'div',\n { className: 'advgb-counter',\n style: { color: countUpNumberColor, fontSize: countUpNumberSize + 'px' }\n },\n !countUpSymbolAfter && countSymbolElm,\n React.createElement(\n 'span',\n { className: 'advgb-counter-number' },\n countUpNumber\n ),\n !!countUpSymbolAfter && countSymbolElm\n ),\n React.createElement(\n 'p',\n { className: 'advgb-count-up-desc', style: { color: descTextColor } },\n descText\n )\n ),\n parseInt(columns) > 1 && React.createElement(\n 'div',\n { className: 'advgb-count-up-columns-two', style: { textAlign: 'center' } },\n React.createElement(\n 'h4',\n { className: 'advgb-count-up-header', style: { color: headerTextColor } },\n headerText2\n ),\n React.createElement(\n 'div',\n { className: 'advgb-counter',\n style: { color: countUpNumberColor, fontSize: countUpNumberSize + 'px' }\n },\n !countUpSymbolAfter2 && countSymbolElm2,\n React.createElement(\n 'span',\n { className: 'advgb-counter-number' },\n countUpNumber2\n ),\n !!countUpSymbolAfter2 && countSymbolElm2\n ),\n React.createElement(\n 'p',\n { className: 'advgb-count-up-desc', style: { color: descTextColor } },\n descText2\n )\n ),\n parseInt(columns) > 2 && React.createElement(\n 'div',\n { className: 'advgb-count-up-columns-three', style: { textAlign: 'center' } },\n React.createElement(\n 'h4',\n { className: 'advgb-count-up-header', style: { color: headerTextColor } },\n headerText3\n ),\n React.createElement(\n 'div',\n { className: 'advgb-counter',\n style: { color: countUpNumberColor, fontSize: countUpNumberSize + 'px' }\n },\n !countUpSymbolAfter3 && countSymbolElm3,\n React.createElement(\n 'span',\n { className: 'advgb-counter-number' },\n countUpNumber3\n ),\n !!countUpSymbolAfter3 && countSymbolElm3\n ),\n React.createElement(\n 'p',\n { className: 'advgb-count-up-desc', style: { color: descTextColor } },\n descText3\n )\n )\n );\n }\n\n var countUpBlockIcon = React.createElement(\n 'svg',\n { height: '20', viewBox: '2 2 22 22', width: '20', xmlns: 'http://www.w3.org/2000/svg' },\n React.createElement('path', { d: 'M0 0h24v24H0zm0 0h24v24H0z', fill: 'none' }),\n React.createElement('path', { d: 'M16.05 16.29l2.86-3.07c.38-.39.72-.79 1.04-1.18.32-.39.59-.78.82-1.17.23-.39.41-.78.54-1.17.13-.39.19-.79.19-1.18 0-.53-.09-1.02-.27-1.46-.18-.44-.44-.81-.78-1.11-.34-.31-.77-.54-1.26-.71-.51-.16-1.08-.24-1.72-.24-.69 0-1.31.11-1.85.32-.54.21-1 .51-1.36.88-.37.37-.65.8-.84 1.3-.18.47-.27.97-.28 1.5h2.14c.01-.31.05-.6.13-.87.09-.29.23-.54.4-.75.18-.21.41-.37.68-.49.27-.12.6-.18.96-.18.31 0 .58.05.81.15.23.1.43.25.59.43.16.18.28.4.37.65.08.25.13.52.13.81 0 .22-.03.43-.08.65-.06.22-.15.45-.29.7-.14.25-.32.53-.56.83-.23.3-.52.65-.88 1.03l-4.17 4.55V18H22v-1.71h-5.95zM8 7H6v4H2v2h4v4h2v-4h4v-2H8V7z' })\n );\n\n registerBlockType('advgb/count-up', {\n title: __('Count Up'),\n description: __('Make a block with animate counting numbers.'),\n icon: {\n src: countUpBlockIcon,\n foreground: typeof advgbBlocks !== 'undefined' ? advgbBlocks.color : undefined\n },\n category: 'common',\n keywords: [__('numbers'), __('count'), __('increase')],\n attributes: {\n headerText: {\n type: 'string',\n default: __('Header text')\n },\n headerText2: {\n type: 'string',\n default: __('Header text')\n },\n headerText3: {\n type: 'string',\n default: __('Header text')\n },\n headerTextColor: {\n type: 'string'\n },\n countUpNumber: {\n type: 'float',\n default: 56789\n },\n countUpNumber2: {\n type: 'float',\n default: 56789\n },\n countUpNumber3: {\n type: 'float',\n default: 56789\n },\n countUpNumberColor: {\n type: 'string'\n },\n countUpNumberSize: {\n type: 'number',\n default: 55\n },\n countUpSymbol: {\n type: 'string'\n },\n countUpSymbol2: {\n type: 'string'\n },\n countUpSymbol3: {\n type: 'string'\n },\n countUpSymbolAfter: {\n type: 'boolean',\n default: false\n },\n countUpSymbolAfter2: {\n type: 'boolean',\n default: false\n },\n countUpSymbolAfter3: {\n type: 'boolean',\n default: false\n },\n descText: {\n type: 'string',\n default: __('and description')\n },\n descText2: {\n type: 'string',\n default: __('and description')\n },\n descText3: {\n type: 'string',\n default: __('and description')\n },\n descTextColor: {\n type: 'string'\n },\n columns: {\n type: 'number',\n default: 1\n },\n changed: {\n type: 'boolean',\n default: false\n }\n },\n edit: AdvCountUp,\n save: AdvCountUpSave\n });\n})(wp.i18n, wp.blocks, wp.element, wp.editor, wp.components);\n\n//# sourceURL=webpack:///./assets/blocks/count-up/block.jsx?");
/***/ }),
/***/ "./assets/blocks/custom-columns/columns.jsx":
/*!**************************************************!*\
!*** ./assets/blocks/custom-columns/columns.jsx ***!
\**************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
eval("\n\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\n(function (wpI18n, wpHooks, wpElement, wpEditor, wpComponents) {\n var addFilter = wpHooks.addFilter;\n var __ = wpI18n.__;\n var Fragment = wpElement.Fragment;\n var InspectorControls = wpEditor.InspectorControls;\n var RangeControl = wpComponents.RangeControl;\n\n // Register extra attributes\n\n addFilter('blocks.registerBlockType', 'advgb/registerExtraColumnsAttrs', function (settings) {\n if (settings.name === 'core/text-columns' || settings.name === 'core/columns') {\n settings.attributes = _extends(settings.attributes, {\n colMargin: {\n type: 'number'\n },\n colPadding: {\n type: 'number'\n },\n blockID: {\n type: 'string'\n }\n });\n }\n\n return settings;\n });\n\n // Add options to edit in backend\n addFilter('editor.BlockEdit', 'advgb/editColumnsAttrs', function (BlockEdit) {\n return function (props) {\n if (props.name === \"core/text-columns\" || props.name === \"core/columns\") {\n var isSelected = props.isSelected,\n attributes = props.attributes,\n setAttributes = props.setAttributes,\n clientId = props.clientId;\n var colMargin = attributes.colMargin,\n colPadding = attributes.colPadding,\n blockID = attributes.blockID;\n\n\n return [React.createElement(BlockEdit, _extends({ key: 'block-edit-custom-columns' }, props)), isSelected && React.createElement(\n InspectorControls,\n { key: 'inspector-custom-columns' },\n React.createElement(RangeControl, {\n label: __('Columns margin'),\n value: colMargin,\n min: 0,\n max: 200,\n onChange: function onChange(value) {\n if (!blockID) setAttributes({ blockID: 'columns-' + clientId });\n return setAttributes({ colMargin: value });\n }\n }),\n React.createElement(RangeControl, {\n label: __('Columns padding'),\n value: colPadding,\n min: 0,\n max: 100,\n onChange: function onChange(value) {\n if (!blockID) setAttributes({ blockID: 'columns-' + clientId });\n return setAttributes({ colPadding: value });\n }\n })\n ), props.name === 'core/columns' && (!!colMargin || !!colPadding) && React.createElement(\n 'style',\n { key: 'custom-columns-styles' },\n '#block-' + clientId + ' .wp-block-columns .editor-block-list__block:not(:first-child) {margin-left: ' + colMargin + 'px;}',\n '#block-' + clientId + ' .wp-block-columns .editor-block-list__block-edit {padding: ' + colPadding + 'px;}'\n ), props.name === 'core/text-columns' && (!!colMargin || !!colPadding) && React.createElement(\n 'style',\n { key: 'custom-text-columns-styles' },\n '#block-' + clientId + ' .wp-block-column:not(:first-child) {margin-left: ' + colMargin + 'px;}',\n '#block-' + clientId + ' .wp-block-column {padding: ' + colPadding + 'px;}'\n )];\n }\n\n return React.createElement(BlockEdit, props);\n };\n });\n\n // Save options to show in frontend\n addFilter('blocks.getSaveContent.extraProps', 'advgb/saveColumnsAttrs', function (extraProps, blockType, attributes) {\n var blockID = attributes.blockID;\n\n\n if (blockType.name === 'core/text-columns' || blockType.name === 'core/columns') {\n extraProps = _extends(extraProps, {\n id: blockID\n });\n }\n\n return extraProps;\n });\n\n // Save option to show in frontend\n addFilter('blocks.getSaveElement', 'advgb/saveTextColumnsElm', function (SaveElm, blockType, attributes) {\n if (blockType.name === 'core/text-columns' || blockType.name === 'core/columns') {\n var colMargin = attributes.colMargin,\n colPadding = attributes.colPadding,\n blockID = attributes.blockID;\n\n\n return React.createElement(\n Fragment,\n null,\n SaveElm,\n blockID && (!!colMargin || !!colPadding) && React.createElement(\n 'style',\n null,\n '#' + blockID + ' .wp-block-column:not(:first-child) {\\n margin-left: ' + colMargin + 'px;\\n }\\n #' + blockID + ' .wp-block-column {\\n padding: ' + colPadding + 'px;\\n }'\n )\n );\n }\n\n return SaveElm;\n });\n})(wp.i18n, wp.hooks, wp.element, wp.editor, wp.components);\n\n//# sourceURL=webpack:///./assets/blocks/custom-columns/columns.jsx?");
/***/ }),
/***/ "./assets/blocks/custom-separator/separator.jsx":
/*!******************************************************!*\
!*** ./assets/blocks/custom-separator/separator.jsx ***!
\******************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
eval("\n\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\n(function (wpI18n, wpHooks, wpEditor, wpComponents) {\n var addFilter = wpHooks.addFilter;\n var __ = wpI18n.__;\n var InspectorControls = wpEditor.InspectorControls,\n ColorPalette = wpEditor.ColorPalette;\n var SelectControl = wpComponents.SelectControl,\n PanelColor = wpComponents.PanelColor,\n PanelBody = wpComponents.PanelBody,\n RangeControl = wpComponents.RangeControl;\n\n // Register extra attributes to separator blocks\n\n addFilter('blocks.registerBlockType', 'advgb/registerExtraSeparatorAttrs', function (settings) {\n if (settings.name === 'core/separator') {\n settings.attributes = _extends(settings.attributes, {\n borderColor: {\n type: 'string'\n },\n borderSize: {\n type: 'number'\n },\n borderStyle: {\n type: 'string'\n },\n borderWidth: {\n type: 'number'\n }\n });\n }\n\n return settings;\n });\n\n // Add option to select styles for separator\n addFilter('editor.BlockEdit', 'advgb/customSeparatorStyles', function (BlockEdit) {\n return function (props) {\n if (props.name === \"core/separator\") {\n var isSelected = props.isSelected,\n attributes = props.attributes,\n setAttributes = props.setAttributes,\n clientId = props.clientId;\n var borderColor = attributes.borderColor,\n borderSize = attributes.borderSize,\n borderStyle = attributes.borderStyle,\n borderWidth = attributes.borderWidth;\n\n\n return [React.createElement(BlockEdit, _extends({ key: 'block-edit-custom-separator' }, props)), isSelected && React.createElement(\n InspectorControls,\n { key: 'inspector-custom-separator' },\n React.createElement(\n PanelBody,\n { title: __('Separator Settings') },\n React.createElement(\n PanelColor,\n { title: __('Color'), colorValue: borderColor, initialOpen: false },\n React.createElement(ColorPalette, {\n value: borderColor,\n onChange: function onChange(value) {\n return setAttributes({ borderColor: value });\n }\n })\n ),\n React.createElement(SelectControl, {\n label: __('Styles'),\n value: borderStyle,\n options: [{ label: __('Solid'), value: 'solid' }, { label: __('Dotted'), value: 'dotted' }, { label: __('Dashed'), value: 'dashed' }, { label: __('Double'), value: 'double' }],\n onChange: function onChange(value) {\n return setAttributes({ borderStyle: value });\n }\n }),\n React.createElement(RangeControl, {\n label: __('Thick'),\n value: borderWidth,\n min: 1,\n max: 20,\n onChange: function onChange(value) {\n return setAttributes({ borderWidth: value });\n }\n }),\n React.createElement(RangeControl, {\n label: __('Width'),\n value: borderSize,\n min: 50,\n max: 1000,\n onChange: function onChange(value) {\n return setAttributes({ borderSize: value });\n }\n })\n )\n ), React.createElement(\n 'style',\n { key: 'custom-separator-styles' },\n '#block-' + clientId + ' hr {\\n border-bottom-color: ' + borderColor + ';\\n border-bottom-style: ' + borderStyle + ';\\n border-bottom-width: ' + borderWidth + 'px;\\n max-width: ' + borderSize + 'px;\\n }'\n )];\n }\n\n return React.createElement(BlockEdit, props);\n };\n });\n\n // Apply custom styles on front-end\n addFilter('blocks.getSaveContent.extraProps', 'advgb/saveSeparatorStyles', function (extraProps, blockType, attributes) {\n if (blockType.name === 'core/separator') {\n var borderColor = attributes.borderColor,\n borderSize = attributes.borderSize,\n borderStyle = attributes.borderStyle,\n borderWidth = attributes.borderWidth;\n\n\n extraProps = _extends(extraProps, {\n style: {\n borderBottomColor: borderColor,\n borderBottomWidth: borderWidth ? borderWidth + 'px' : undefined,\n borderBottomStyle: borderStyle,\n maxWidth: borderSize ? borderSize + 'px' : undefined\n }\n });\n }\n\n return extraProps;\n });\n})(wp.i18n, wp.hooks, wp.editor, wp.components);\n\n//# sourceURL=webpack:///./assets/blocks/custom-separator/separator.jsx?");
/***/ }),
/***/ "./assets/blocks/customstyles/custom-styles.jsx":
/*!******************************************************!*\
!*** ./assets/blocks/customstyles/custom-styles.jsx ***!
\******************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
eval("\n\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\n(function (wpI18n, wpHooks, wpBlocks, wpEditor, wpComponents) {\n var addFilter = wpHooks.addFilter;\n var __ = wpI18n.__;\n var hasBlockSupport = wpBlocks.hasBlockSupport;\n var InspectorControls = wpEditor.InspectorControls;\n var SelectControl = wpComponents.SelectControl;\n\n // Register custom styles to blocks attributes\n\n addFilter('blocks.registerBlockType', 'advgb/registerCustomStyleClass', function (settings) {\n if (settings.name === 'core/paragraph') {\n settings.attributes = _extends(settings.attributes, {\n customStyle: {\n type: 'string'\n },\n identifyColor: {\n type: 'string'\n }\n });\n }\n\n return settings;\n });\n\n // Add option to return to default style\n if (typeof advGb_CS !== 'undefined' && advGb_CS) {\n advGb_CS.unshift({\n id: 0,\n label: __('Paragraph'),\n value: '',\n identifyColor: ''\n });\n }\n\n // Add option to select custom styles for paragraph blocks\n addFilter('editor.BlockEdit', 'advgb/customStyles', function (BlockEdit) {\n return function (props) {\n return [React.createElement(BlockEdit, _extends({ key: 'block-edit-custom-class-name' }, props)), props.isSelected && props.name === \"core/paragraph\" && React.createElement(\n InspectorControls,\n { key: 'advgb-custom-controls' },\n React.createElement(SelectControl, {\n label: [__('Custom styles'), React.createElement('span', { className: 'components-panel__color-area',\n key: 'customstyle-identify',\n style: {\n background: props.attributes.identifyColor,\n verticalAlign: 'text-bottom',\n borderRadius: '50%',\n border: 'none',\n width: '16px',\n height: '16px'\n } })],\n help: __('This option let you add custom style for current paragraph. (Front-end only!)'),\n value: props.attributes.customStyle,\n options: advGb_CS.map(function (cstyle, index) {\n if (cstyle.title) advGb_CS[index].label = cstyle.title;\n if (cstyle.name) advGb_CS[index].value = cstyle.name;\n\n return cstyle;\n }),\n onChange: function onChange(cstyle) {\n var identifyColor = advGb_CS.filter(function (style) {\n return style.value === cstyle;\n })[0].identifyColor;\n\n props.setAttributes({\n customStyle: cstyle,\n identifyColor: identifyColor,\n backgroundColor: undefined,\n textColor: undefined,\n fontSize: undefined\n });\n }\n })\n )];\n };\n });\n\n // Apply custom styles on front-end\n addFilter('blocks.getSaveContent.extraProps', 'advgb/loadFrontendCustomStyles', function (extraProps, blockType, attributes) {\n if (hasBlockSupport(blockType, 'customStyle', true) && attributes.customStyle) {\n if (typeof extraProps.className === 'undefined') {\n extraProps.className = attributes.customStyle;\n } else {\n extraProps.className += ' ' + attributes.customStyle;\n extraProps.className = extraProps.className.trim();\n }\n }\n\n return extraProps;\n });\n})(wp.i18n, wp.hooks, wp.blocks, wp.editor, wp.components);\n\n//# sourceURL=webpack:///./assets/blocks/customstyles/custom-styles.jsx?");
/***/ }),
/***/ "./assets/blocks/map/block.jsx":
/*!*************************************!*\
!*** ./assets/blocks/map/block.jsx ***!
\*************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
eval("\n\nvar _typeof = typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; };\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\n(function (wpI18n, wpBlocks, wpElement, wpEditor, wpComponents) {\n var __ = wpI18n.__;\n var Component = wpElement.Component,\n Fragment = wpElement.Fragment;\n var registerBlockType = wpBlocks.registerBlockType;\n var InspectorControls = wpEditor.InspectorControls,\n MediaUpload = wpEditor.MediaUpload;\n var PanelBody = wpComponents.PanelBody,\n TextControl = wpComponents.TextControl,\n TextareaControl = wpComponents.TextareaControl,\n RangeControl = wpComponents.RangeControl,\n BaseControl = wpComponents.BaseControl,\n Button = wpComponents.Button,\n Placeholder = wpComponents.Placeholder,\n Spinner = wpComponents.Spinner;\n\n\n var mapBlockIcon = React.createElement(\n \"svg\",\n { xmlns: \"http://www.w3.org/2000/svg\", width: \"20\", height: \"20\", viewBox: \"2 2 22 22\" },\n React.createElement(\"path\", { d: \"M20.5 3l-.16.03L15 5.1 9 3 3.36 4.9c-.21.07-.36.25-.36.48V20.5c0 .28.22.5.5.5l.16-.03L9 18.9l6 2.1 5.64-1.9c.21-.07.36-.25.36-.48V3.5c0-.28-.22-.5-.5-.5zM15 19l-6-2.11V5l6 2.11V19z\" }),\n React.createElement(\"path\", { d: \"M0 0h24v24H0z\", fill: \"none\" })\n );\n\n var mapWillUpdate = null;\n\n var AdvMap = function (_Component) {\n _inherits(AdvMap, _Component);\n\n function AdvMap() {\n _classCallCheck(this, AdvMap);\n\n var _this = _possibleConstructorReturn(this, (AdvMap.__proto__ || Object.getPrototypeOf(AdvMap)).apply(this, arguments));\n\n _this.state = {\n currentAddress: '',\n currentMap: null,\n currentMarker: null,\n currentInfo: null,\n fetching: false\n };\n\n _this.initMap = _this.initMap.bind(_this);\n _this.fetchLocation = _this.fetchLocation.bind(_this);\n return _this;\n }\n\n _createClass(AdvMap, [{\n key: \"componentWillMount\",\n value: function componentWillMount() {\n var _props = this.props,\n attributes = _props.attributes,\n setAttributes = _props.setAttributes;\n\n var currentBlockConfig = advgbDefaultConfig['advgb-map'];\n\n // No override attributes of blocks inserted before\n if (attributes.changed !== true) {\n if (currentBlockConfig !== undefined && (typeof currentBlockConfig === \"undefined\" ? \"undefined\" : _typeof(currentBlockConfig)) === 'object') {\n Object.keys(currentBlockConfig).map(function (attribute) {\n attributes[attribute] = currentBlockConfig[attribute];\n });\n\n // Finally set changed attribute to true, so we don't modify anything again\n setAttributes({ changed: true });\n }\n }\n }\n }, {\n key: \"componentDidMount\",\n value: function componentDidMount() {\n var _props2 = this.props,\n attributes = _props2.attributes,\n setAttributes = _props2.setAttributes,\n clientId = _props2.clientId;\n\n\n if (!attributes.mapID) {\n setAttributes({ mapID: 'advgbmap-' + clientId });\n }\n\n this.initMap();\n }\n }, {\n key: \"componentDidUpdate\",\n value: function componentDidUpdate(prevProps, prevState) {\n var _prevProps$attributes = prevProps.attributes,\n prevAddr = _prevProps$attributes.address,\n prevUseLatLng = _prevProps$attributes.useLatLng;\n var _props$attributes = this.props.attributes,\n address = _props$attributes.address,\n useLatLng = _props$attributes.useLatLng;\n\n\n if (prevAddr !== address || prevUseLatLng !== useLatLng || prevState !== this.state) return null;\n\n if (prevProps.attributes !== this.props.attributes) {\n clearTimeout(mapWillUpdate);\n mapWillUpdate = setTimeout(this.initMap, 1000);\n }\n }\n }, {\n key: \"initMap\",\n value: function initMap() {\n if (typeof google === \"undefined\" || !this.props.attributes.mapID) return null;\n\n var DEFAULT_MARKER = 'https://maps.gstatic.com/mapfiles/api-3/images/spotlight-poi2.png';\n var _state = this.state,\n currentMap = _state.currentMap,\n currentMarker = _state.currentMarker,\n currentInfo = _state.currentInfo;\n var _props$attributes2 = this.props.attributes,\n mapID = _props$attributes2.mapID,\n lat = _props$attributes2.lat,\n lng = _props$attributes2.lng,\n zoom = _props$attributes2.zoom,\n markerTitle = _props$attributes2.markerTitle,\n markerIcon = _props$attributes2.markerIcon,\n markerDesc = _props$attributes2.markerDesc;\n\n var location = { lat: parseFloat(lat), lng: parseFloat(lng) };\n var that = this;\n var formattedDesc = markerDesc.replace(/\\n/g, '
');\n var map = currentMap;\n var marker = currentMarker;\n var infoWindow = currentInfo;\n\n if (!map) {\n map = new google.maps.Map(document.getElementById(mapID), {\n zoom: zoom,\n center: location,\n gestureHandling: 'cooperative'\n });\n this.setState({ currentMap: map });\n }\n\n map.setCenter(location);\n map.setZoom(zoom);\n\n if (!infoWindow) {\n infoWindow = new google.maps.InfoWindow({\n content: \"
\" + (formattedDesc || '') + \"
\\n\" + (formattedDesc || '') + \"
\\n\" + (formattedDesc || '') + \"