/******/ (function() { // webpackBootstrap
/******/ 	"use strict";
/******/ 	var __webpack_modules__ = ({

/***/ "./src/atomic-wind/blocks/box/block.json":
/*!***********************************************!*\
  !*** ./src/atomic-wind/blocks/box/block.json ***!
  \***********************************************/
/***/ (function(module) {

module.exports = /*#__PURE__*/JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"atomic-wind/box","title":"Box","category":"atomic-wind","description":"A generic wrapper element with tag selection and inner blocks. Supports details and summary tags for native disclosure widgets.","keywords":["box","container","wrapper","div","section","details","summary"],"textdomain":"atomic-wind","attributes":{"tagName":{"type":"string","default":"div"},"metadata":{"type":"object"}},"supports":{"align":["wide","full"],"anchor":true,"html":false,"color":false,"typography":false,"spacing":false},"editorScript":"file:./index.js"}');

/***/ }),

/***/ "./src/atomic-wind/blocks/box/edit.js":
/*!********************************************!*\
  !*** ./src/atomic-wind/blocks/box/edit.js ***!
  \********************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": function() { return /* binding */ Edit; }
/* harmony export */ });
/* harmony import */ var _wordpress_block_editor__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/block-editor */ "@wordpress/block-editor");
/* harmony import */ var _wordpress_block_editor__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components");
/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n");
/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__);
/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @wordpress/data */ "@wordpress/data");
/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_wordpress_data__WEBPACK_IMPORTED_MODULE_3__);
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element");
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_4__);
/* harmony import */ var _wordpress_blocks__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @wordpress/blocks */ "@wordpress/blocks");
/* harmony import */ var _wordpress_blocks__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_wordpress_blocks__WEBPACK_IMPORTED_MODULE_5__);
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! react/jsx-runtime */ "react/jsx-runtime");
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__);







const TAG_OPTIONS = [{
  label: 'div',
  value: 'div'
}, {
  label: 'span',
  value: 'span'
}, {
  label: 'section',
  value: 'section'
}, {
  label: 'article',
  value: 'article'
}, {
  label: 'main',
  value: 'main'
}, {
  label: 'aside',
  value: 'aside'
}, {
  label: 'header',
  value: 'header'
}, {
  label: 'footer',
  value: 'footer'
}, {
  label: 'nav',
  value: 'nav'
}, {
  label: 'details',
  value: 'details'
}, {
  label: 'summary',
  value: 'summary'
}];
function escapeHtml(str) {
  return str.replace(/&/g, '&amp;').replace(/</g, '&lt;').replace(/>/g, '&gt;').replace(/"/g, '&quot;');
}
function renderBlockPreview(block, post) {
  const {
    name,
    attributes,
    innerBlocks: nested
  } = block;
  const cls = attributes.className || '';
  const postField = attributes.postField || '';
  let inner = '';
  if (nested?.length) {
    inner = nested.map(child => renderBlockPreview(child, post)).join('');
  }
  switch (name) {
    case 'atomic-wind/box':
      {
        const tag = attributes.tagName || 'div';
        return `<${tag} class="${cls}">${inner}</${tag}>`;
      }
    case 'atomic-wind/text':
      {
        const tag = attributes.tagName || 'p';
        let content = attributes.content || '';
        if (postField && post) {
          switch (postField) {
            case 'title':
              content = post.title?.rendered || content;
              break;
            case 'excerpt':
              {
                const tmp = document.createElement('div');
                tmp.innerHTML = post.excerpt?.rendered || '';
                const text = tmp.textContent;
                content = text ? escapeHtml(text) : content;
                break;
              }
            case 'date':
              {
                const d = post.date ? new Date(post.date).toLocaleDateString() : '';
                content = d ? escapeHtml(d) : content;
                break;
              }
            case 'author':
              {
                const authorName = post._embedded?.author?.[0]?.name || '';
                content = authorName ? escapeHtml(authorName) : content;
                break;
              }
            case 'categories':
              {
                const cats = post._embedded?.['wp:term']?.[0];
                if (cats) {
                  content = escapeHtml(cats.map(c => c.name).join(', '));
                }
                break;
              }
            case 'tags':
              {
                const tagsList = post._embedded?.['wp:term']?.[1];
                if (tagsList) {
                  content = escapeHtml(tagsList.map(t => t.name).join(', '));
                }
                break;
              }
            case 'modified_date':
              {
                const md = post.modified ? new Date(post.modified).toLocaleDateString() : '';
                content = md ? escapeHtml(md) : content;
                break;
              }
            case 'comment_count':
              {
                content = escapeHtml(String(post.comment_count ?? 0));
                break;
              }
          }
        }
        return `<${tag} class="${cls}" data-rich-text="">${content}</${tag}>`;
      }
    case 'atomic-wind/image':
      {
        let src = attributes.url || '';
        let alt = attributes.alt || '';
        if (postField === 'featured_image' && post) {
          const media = post._embedded?.['wp:featuredmedia']?.[0];
          if (media) {
            src = media.source_url || src;
            alt = media.alt_text || post.title?.rendered || alt;
          } else {
            return '';
          }
        }
        if (!src) {
          return '';
        }
        return `<img class="${cls}" src="${src}" alt="${escapeHtml(alt)}"/>`;
      }
    case 'atomic-wind/link':
      {
        const text = attributes.text || '';
        return `<a class="${cls}">${inner || text}</a>`;
      }
    default:
      return (0,_wordpress_blocks__WEBPACK_IMPORTED_MODULE_5__.serialize)([block]).replace(/<!--\s+\/?wp:[\s\S]*?-->/g, '').replace(/ href="[^"]*"/g, '');
  }
}
function Edit({
  attributes,
  setAttributes,
  clientId
}) {
  const {
    tagName,
    queryPostType,
    queryCount,
    queryOrderBy,
    queryOrder
  } = attributes;
  const TagName = tagName;
  const blockProps = (0,_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_0__.useBlockProps)();
  const {
    children,
    ...innerBlocksWrapperProps
  } = (0,_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_0__.useInnerBlocksProps)(blockProps);
  const innerBlocks = (0,_wordpress_data__WEBPACK_IMPORTED_MODULE_3__.useSelect)(select => {
    if (!queryPostType) {
      return [];
    }
    return select('core/block-editor').getBlocks(clientId);
  }, [clientId, queryPostType]);
  const posts = (0,_wordpress_data__WEBPACK_IMPORTED_MODULE_3__.useSelect)(select => {
    if (!queryPostType) {
      return null;
    }
    return select('core').getEntityRecords('postType', queryPostType, {
      per_page: queryCount || 3,
      orderby: queryOrderBy || 'date',
      order: (queryOrder || 'desc').toLowerCase(),
      _embed: true
    });
  }, [queryPostType, queryCount, queryOrderBy, queryOrder]);
  const previews = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_4__.useMemo)(() => {
    if (!innerBlocks.length || !queryPostType) {
      return [];
    }

    // Posts still loading — show template duplicates as placeholder.
    if (posts === null) {
      const count = (queryCount || 3) - 1;
      if (count < 1) {
        return [];
      }
      const html = (0,_wordpress_blocks__WEBPACK_IMPORTED_MODULE_5__.serialize)(innerBlocks).replace(/<!--\s+\/?wp:[\s\S]*?-->/g, '').replace(/ href="[^"]*"/g, '');
      return Array.from({
        length: count
      }).map(() => html);
    }

    // Template represents the first post; previews show the rest.
    return posts.slice(1).map(post => innerBlocks.map(block => renderBlockPreview(block, post)).join(''));
  }, [innerBlocks, posts, queryPostType, queryCount]);
  return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__.jsxs)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__.Fragment, {
    children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__.jsx)(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_0__.InspectorControls, {
      children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__.jsx)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.PanelBody, {
        title: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Settings', 'otter-blocks'),
        children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__.jsx)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.SelectControl, {
          label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('HTML Tag', 'otter-blocks'),
          value: tagName,
          options: TAG_OPTIONS,
          onChange: value => setAttributes({
            tagName: value
          })
        })
      })
    }), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__.jsxs)(TagName, {
      ...innerBlocksWrapperProps,
      children: [children, previews.map((html, i) => /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__.jsx)("div", {
        style: {
          pointerEvents: 'none',
          opacity: 0.5
        },
        dangerouslySetInnerHTML: {
          __html: html
        }
      }, i))]
    })]
  });
}

/***/ }),

/***/ "./src/atomic-wind/blocks/box/icon.js":
/*!********************************************!*\
  !*** ./src/atomic-wind/blocks/box/icon.js ***!
  \********************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {

__webpack_require__.r(__webpack_exports__);
/* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/primitives */ "@wordpress/primitives");
/* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react/jsx-runtime */ "react/jsx-runtime");
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__);


/* harmony default export */ __webpack_exports__["default"] = (/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_0__.SVG, {
  width: "20",
  height: "20",
  viewBox: "0 0 20 20",
  fill: "none",
  xmlns: "http://www.w3.org/2000/svg",
  children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_0__.Path, {
    opacity: "0.1",
    d: "M18.7844 15.8093C19.1975 15.8408 19.5064 16.201 19.4749 16.614C19.4167 17.3768 19.1605 18.0866 18.6233 18.6238C18.0861 19.161 17.3763 19.4171 16.6135 19.4754C16.2005 19.5069 15.8404 19.1979 15.8089 18.7849C15.7774 18.372 16.0863 18.0118 16.4993 17.9802C17.0014 17.9419 17.34 17.786 17.5628 17.5632C17.7855 17.3404 17.9415 17.0019 17.9797 16.4998C18.0113 16.0868 18.3715 15.7779 18.7844 15.8093ZM9.68483 15.9216C9.91778 15.5793 10.3844 15.4906 10.7268 15.7234C11.7199 16.3988 12.6798 16.9334 13.5628 17.3132C13.9429 17.4771 14.119 17.9183 13.9553 18.2986C13.7917 18.6789 13.3503 18.8545 12.97 18.6912C11.9845 18.2672 10.9406 17.683 9.88307 16.9636C9.54077 16.7306 9.45193 16.2641 9.68483 15.9216ZM4.73073 11.2849C5.03998 11.0094 5.51376 11.0372 5.78932 11.3464C6.1494 11.7506 6.52919 12.1527 6.92701 12.5506C7.32484 12.9484 7.72701 13.3282 8.13112 13.6882C8.44037 13.9638 8.4682 14.4376 8.19264 14.7468C7.91708 15.056 7.44329 15.0829 7.13405 14.8074C6.70833 14.428 6.28454 14.0292 5.86647 13.6111C5.44839 13.193 5.04952 12.7692 4.67018 12.3435C4.39465 12.0343 4.42152 11.5605 4.73073 11.2849ZM15.9212 9.68532C16.2636 9.45242 16.7301 9.54126 16.9631 9.88356C17.6825 10.9411 18.2667 11.9849 18.6907 12.9705C18.854 13.3508 18.6784 13.7922 18.2981 13.9558C17.9178 14.1195 17.4766 13.9434 17.3128 13.5632C16.9329 12.6803 16.3983 11.7204 15.7229 10.7273C15.4901 10.3849 15.5788 9.91827 15.9212 9.68532ZM1.17897 5.52223C1.55931 5.3586 2.00046 5.53464 2.16432 5.91481C2.5442 6.79777 3.07874 7.7577 3.75416 8.75075C3.98699 9.0932 3.8983 9.55979 3.55592 9.79274C3.21351 10.0256 2.74694 9.93679 2.51393 9.5945C1.79462 8.53694 1.21039 7.4931 0.78639 6.50758C0.623086 6.12724 0.798726 5.6859 1.17897 5.52223ZM11.2844 4.73121C11.56 4.42201 12.0338 4.39514 12.343 4.67067C12.7688 5.05001 13.1925 5.44887 13.6106 5.86696C14.0287 6.28503 14.4276 6.70882 14.8069 7.13453C15.0824 7.44378 15.0556 7.91757 14.7464 8.19313C14.4371 8.46869 13.9633 8.44086 13.6878 8.13161C13.3277 7.7275 12.9479 7.32533 12.5501 6.9275C12.1522 6.52968 11.7501 6.14989 11.346 5.78981C11.0367 5.51424 11.0089 5.04047 11.2844 4.73121ZM5.52174 1.17946C5.68541 0.799214 6.12676 0.623574 6.50709 0.786878C7.49261 1.21088 8.53645 1.79511 9.59401 2.51442C9.9363 2.74743 10.0251 3.21399 9.79225 3.55641C9.5593 3.89879 9.09271 3.98748 8.75026 3.75465C7.75722 3.07923 6.79729 2.54469 5.91432 2.16481C5.53415 2.00095 5.35811 1.55979 5.52174 1.17946ZM2.86354 0.00269843C3.27655 -0.0288019 3.63673 0.280114 3.66823 0.693128C3.6997 1.10611 3.39078 1.4663 2.9778 1.49782C2.47567 1.53611 2.1371 1.69203 1.91432 1.91481C1.69154 2.13759 1.53562 2.47616 1.49733 2.97828C1.46581 3.39127 1.10562 3.70019 0.69264 3.66871C0.279626 3.63721 -0.0292901 3.27704 0.00221014 2.86403C0.0604195 2.10125 0.316588 1.39145 0.853773 0.854261C1.39096 0.317077 2.10076 0.0609078 2.86354 0.00269843Z",
    fill: "black"
  }), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_0__.Path, {
    opacity: "0.1",
    d: "M3.66844 18.7844C3.63694 19.1974 3.27677 19.5064 2.86376 19.4749C2.10097 19.4167 1.39118 19.1605 0.85399 18.6233C0.316822 18.0861 0.0606346 17.3763 0.00242733 16.6135C-0.0290725 16.2005 0.279842 15.8404 0.692857 15.8088C1.10583 15.7774 1.46602 16.0863 1.49754 16.4993C1.53584 17.0014 1.69176 17.34 1.91454 17.5628C2.13733 17.7855 2.47589 17.9415 2.97801 17.9797C3.39098 18.0113 3.6999 18.3715 3.66844 18.7844ZM3.55614 9.68483C3.8985 9.91778 3.98721 10.3844 3.75438 10.7268C3.07895 11.7199 2.54442 12.6798 2.16454 13.5628C2.00068 13.9429 1.55952 14.119 1.17919 13.9553C0.798926 13.7917 0.623295 13.3503 0.786607 12.97C1.21061 11.9845 1.79483 10.9406 2.51415 9.88307C2.74716 9.54077 3.21372 9.45193 3.55614 9.68483ZM8.19286 4.73073C8.46842 5.03998 8.44059 5.51376 8.13133 5.78932C7.72723 6.1494 7.32506 6.52919 6.92723 6.92701C6.5294 7.32484 6.14962 7.72701 5.78954 8.13112C5.51397 8.44037 5.0402 8.4682 4.73094 8.19264C4.42174 7.91708 4.39489 7.44329 4.6704 7.13405C5.04974 6.70833 5.4486 6.28454 5.86669 5.86647C6.28477 5.44839 6.70854 5.04952 7.13426 4.67018C7.4435 4.39465 7.9173 4.42152 8.19286 4.73073ZM9.79247 15.9212C10.0254 16.2636 9.93652 16.7301 9.59422 16.9631C8.53666 17.6825 7.49284 18.2667 6.50731 18.6907C6.12696 18.854 5.68562 18.6784 5.52196 18.2981C5.35832 17.9178 5.53436 17.4766 5.91454 17.3128C6.79751 16.9329 7.75743 16.3983 8.75047 15.7229C9.09292 15.4901 9.55951 15.5788 9.79247 15.9212ZM13.9556 1.17897C14.1192 1.5593 13.9431 2.00046 13.563 2.16432C12.68 2.5442 11.7201 3.07874 10.727 3.75416C10.3846 3.98699 9.91799 3.8983 9.68505 3.55592C9.45215 3.21351 9.541 2.74694 9.88329 2.51393C10.9408 1.79462 11.9847 1.21039 12.9702 0.78639C13.3505 0.623085 13.7919 0.798726 13.9556 1.17897ZM14.7466 11.2844C15.0558 11.56 15.0826 12.0338 14.8071 12.343C14.4278 12.7688 14.0289 13.1925 13.6108 13.6106C13.1928 14.0287 12.769 14.4276 12.3432 14.8069C12.034 15.0824 11.5602 15.0556 11.2847 14.7463C11.0091 14.4371 11.0369 13.9633 11.3462 13.6878C11.7503 13.3277 12.1525 12.9479 12.5503 12.5501C12.9481 12.1522 13.3279 11.7501 13.688 11.346C13.9635 11.0367 14.4373 11.0089 14.7466 11.2844ZM18.2983 5.52174C18.6786 5.68541 18.8542 6.12676 18.6909 6.50709C18.2669 7.49261 17.6827 8.53645 16.9634 9.59401C16.7304 9.9363 16.2638 10.0251 15.9214 9.79225C15.579 9.5593 15.4903 9.09271 15.7231 8.75026C16.3986 7.75721 16.9331 6.79728 17.313 5.91432C17.4768 5.53415 17.918 5.35811 18.2983 5.52174ZM19.4751 2.86354C19.5066 3.27655 19.1977 3.63673 18.7847 3.66823C18.3717 3.6997 18.0115 3.39078 17.98 2.9778C17.9417 2.47567 17.7858 2.1371 17.563 1.91432C17.3402 1.69154 17.0016 1.53562 16.4995 1.49733C16.0865 1.46581 15.7776 1.10562 15.8091 0.69264C15.8406 0.279626 16.2007 -0.0292903 16.6138 0.00221001C17.3765 0.0604194 18.0863 0.316588 18.6235 0.853773C19.1607 1.39096 19.4169 2.10076 19.4751 2.86354Z",
    fill: "black"
  }), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_0__.Path, {
    d: "M9.40279 2.85835C9.65422 2.73239 9.95981 2.75729 10.1899 2.93062C13.0592 5.09201 14.4094 6.54029 16.5376 9.27534C16.7423 9.53853 16.7486 9.90556 16.5532 10.1757C15.723 11.3225 14.7343 12.4849 13.6108 13.6084C12.4874 14.7318 11.3249 15.7206 10.1782 16.5507C9.90958 16.745 9.54477 16.7398 9.2817 16.538C6.45611 14.371 5.04442 12.981 2.93307 10.1884C2.73444 9.92553 2.73118 9.56381 2.92428 9.29683C3.75443 8.15009 4.7432 6.98767 5.86666 5.86421C6.99012 4.74075 8.15253 3.75198 9.29928 2.92183L9.40279 2.85835ZM9.73287 4.46773C8.79721 5.17832 7.85019 6.00178 6.92721 6.92476C6.0055 7.84646 5.18302 8.79212 4.47311 9.72652C6.20229 11.967 7.4671 13.2183 9.74947 14.999C10.6832 14.2894 11.6292 13.4688 12.5503 12.5478C13.4707 11.6274 14.2912 10.6821 15.0004 9.74898C13.2462 7.52477 12.0229 6.23313 9.73287 4.46773Z",
    fill: "#F16574"
  }), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_0__.Path, {
    opacity: "0.1",
    d: "M9.74731 8.98877C10.1615 8.98877 10.4973 9.32456 10.4973 9.73877C10.4973 10.153 10.1615 10.4888 9.74731 10.4888H9.73853C9.32431 10.4888 8.98853 10.153 8.98853 9.73877C8.98853 9.32456 9.32431 8.98877 9.73853 8.98877H9.74731Z",
    fill: "black"
  })]
}));

/***/ }),

/***/ "./src/atomic-wind/blocks/box/save.js":
/*!********************************************!*\
  !*** ./src/atomic-wind/blocks/box/save.js ***!
  \********************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": function() { return /* binding */ save; }
/* harmony export */ });
/* harmony import */ var _wordpress_block_editor__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/block-editor */ "@wordpress/block-editor");
/* harmony import */ var _wordpress_block_editor__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react/jsx-runtime */ "react/jsx-runtime");
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__);


function save({
  attributes
}) {
  const {
    tagName
  } = attributes;
  const TagName = tagName;
  const blockProps = _wordpress_block_editor__WEBPACK_IMPORTED_MODULE_0__.useBlockProps.save();
  const innerBlocksProps = _wordpress_block_editor__WEBPACK_IMPORTED_MODULE_0__.useInnerBlocksProps.save(blockProps);
  return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(TagName, {
    ...innerBlocksProps
  });
}

/***/ }),

/***/ "./src/atomic-wind/blocks/labels.js":
/*!******************************************!*\
  !*** ./src/atomic-wind/blocks/labels.js ***!
  \******************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   boxLabel: function() { return /* binding */ boxLabel; },
/* harmony export */   getStructuralLabel: function() { return /* binding */ getStructuralLabel; },
/* harmony export */   iconLabel: function() { return /* binding */ iconLabel; },
/* harmony export */   imageLabel: function() { return /* binding */ imageLabel; },
/* harmony export */   linkLabel: function() { return /* binding */ linkLabel; },
/* harmony export */   textLabel: function() { return /* binding */ textLabel; },
/* harmony export */   toPlainText: function() { return /* binding */ toPlainText; }
/* harmony export */ });
/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n");
/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__);

const LABEL_CONTEXTS = ['list-view', 'breadcrumb'];

// Resolved lazily so locale data registered after module init still applies.
// div and span intentionally have no label so generic wrappers fall through
// to the block title and block variation matching.
const getTagLabel = tagName => {
  switch (tagName) {
    case 'section':
      return (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Section', 'otter-blocks');
    case 'article':
      return (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Article', 'otter-blocks');
    case 'main':
      return (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Main', 'otter-blocks');
    case 'aside':
      return (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Aside', 'otter-blocks');
    case 'header':
      return (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Header', 'otter-blocks');
    case 'footer':
      return (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Footer', 'otter-blocks');
    case 'nav':
      return (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Navigation', 'otter-blocks');
    case 'details':
      return (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Details', 'otter-blocks');
    case 'summary':
      return (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Summary', 'otter-blocks');
    default:
      return undefined;
  }
};
const toPlainText = value => {
  if (!value) {
    return '';
  }
  const text = typeof value === 'string' ? value.replace(/<[^>]+>/g, ' ') : value.toPlainText?.() ?? '';
  return text.replace(/\s+/g, ' ').trim();
};

// Builds an __experimentalLabel callback. The custom name written by the core
// Rename UI (attributes.metadata.name) must win, because defining our own
// label callback prevents core from displaying it; returning undefined when
// there is no better label keeps the block title and variation titles working.
// Content fallbacks return the raw attribute value (string or RichTextData)
// so core converts and decodes it exactly once.
const createLabel = getFallback => (attributes, {
  context
} = {}) => {
  if (!LABEL_CONTEXTS.includes(context)) {
    return undefined;
  }
  const customName = attributes?.metadata?.name;
  if (customName) {
    return customName;
  }
  return getFallback ? getFallback(attributes) : undefined;
};
const boxLabel = createLabel(({
  tagName
}) => getTagLabel(tagName));
const textLabel = createLabel(({
  content
}) => toPlainText(content) ? content : undefined);
const linkLabel = createLabel(({
  mode,
  text
}) => {
  if (mode === 'inner-blocks') {
    return undefined;
  }
  return toPlainText(text) ? text : undefined;
});
const imageLabel = createLabel(({
  alt
}) => toPlainText(alt) || undefined);
const iconLabel = createLabel();
const getStructuralLabel = (blockName, attributes) => {
  if (attributes?.metadata?.name) {
    return attributes.metadata.name;
  }
  return blockName === 'atomic-wind/box' ? getTagLabel(attributes?.tagName) : undefined;
};

/***/ }),

/***/ "@wordpress/block-editor":
/*!*************************************!*\
  !*** external ["wp","blockEditor"] ***!
  \*************************************/
/***/ (function(module) {

module.exports = window["wp"]["blockEditor"];

/***/ }),

/***/ "@wordpress/blocks":
/*!********************************!*\
  !*** external ["wp","blocks"] ***!
  \********************************/
/***/ (function(module) {

module.exports = window["wp"]["blocks"];

/***/ }),

/***/ "@wordpress/components":
/*!************************************!*\
  !*** external ["wp","components"] ***!
  \************************************/
/***/ (function(module) {

module.exports = window["wp"]["components"];

/***/ }),

/***/ "@wordpress/data":
/*!******************************!*\
  !*** external ["wp","data"] ***!
  \******************************/
/***/ (function(module) {

module.exports = window["wp"]["data"];

/***/ }),

/***/ "@wordpress/element":
/*!*********************************!*\
  !*** external ["wp","element"] ***!
  \*********************************/
/***/ (function(module) {

module.exports = window["wp"]["element"];

/***/ }),

/***/ "@wordpress/i18n":
/*!******************************!*\
  !*** external ["wp","i18n"] ***!
  \******************************/
/***/ (function(module) {

module.exports = window["wp"]["i18n"];

/***/ }),

/***/ "@wordpress/primitives":
/*!************************************!*\
  !*** external ["wp","primitives"] ***!
  \************************************/
/***/ (function(module) {

module.exports = window["wp"]["primitives"];

/***/ }),

/***/ "react/jsx-runtime":
/*!**********************************!*\
  !*** external "ReactJSXRuntime" ***!
  \**********************************/
/***/ (function(module) {

module.exports = window["ReactJSXRuntime"];

/***/ })

/******/ 	});
/************************************************************************/
/******/ 	// The module cache
/******/ 	var __webpack_module_cache__ = {};
/******/ 	
/******/ 	// The require function
/******/ 	function __webpack_require__(moduleId) {
/******/ 		// Check if module is in cache
/******/ 		var cachedModule = __webpack_module_cache__[moduleId];
/******/ 		if (cachedModule !== undefined) {
/******/ 			return cachedModule.exports;
/******/ 		}
/******/ 		// Create a new module (and put it into the cache)
/******/ 		var module = __webpack_module_cache__[moduleId] = {
/******/ 			// no module.id needed
/******/ 			// no module.loaded needed
/******/ 			exports: {}
/******/ 		};
/******/ 	
/******/ 		// Execute the module function
/******/ 		__webpack_modules__[moduleId](module, module.exports, __webpack_require__);
/******/ 	
/******/ 		// Return the exports of the module
/******/ 		return module.exports;
/******/ 	}
/******/ 	
/************************************************************************/
/******/ 	/* webpack/runtime/compat get default export */
/******/ 	!function() {
/******/ 		// getDefaultExport function for compatibility with non-harmony modules
/******/ 		__webpack_require__.n = function(module) {
/******/ 			var getter = module && module.__esModule ?
/******/ 				function() { return module['default']; } :
/******/ 				function() { return module; };
/******/ 			__webpack_require__.d(getter, { a: getter });
/******/ 			return getter;
/******/ 		};
/******/ 	}();
/******/ 	
/******/ 	/* webpack/runtime/define property getters */
/******/ 	!function() {
/******/ 		// define getter functions for harmony exports
/******/ 		__webpack_require__.d = function(exports, definition) {
/******/ 			for(var key in definition) {
/******/ 				if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
/******/ 					Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
/******/ 				}
/******/ 			}
/******/ 		};
/******/ 	}();
/******/ 	
/******/ 	/* webpack/runtime/hasOwnProperty shorthand */
/******/ 	!function() {
/******/ 		__webpack_require__.o = function(obj, prop) { return Object.prototype.hasOwnProperty.call(obj, prop); }
/******/ 	}();
/******/ 	
/******/ 	/* webpack/runtime/make namespace object */
/******/ 	!function() {
/******/ 		// 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 });
/******/ 		};
/******/ 	}();
/******/ 	
/************************************************************************/
var __webpack_exports__ = {};
// This entry needs to be wrapped in an IIFE because it needs to be isolated against other modules in the chunk.
!function() {
/*!*********************************************!*\
  !*** ./src/atomic-wind/blocks/box/index.js ***!
  \*********************************************/
__webpack_require__.r(__webpack_exports__);
/* harmony import */ var _wordpress_blocks__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/blocks */ "@wordpress/blocks");
/* harmony import */ var _wordpress_blocks__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_blocks__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _block_json__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./block.json */ "./src/atomic-wind/blocks/box/block.json");
/* harmony import */ var _icon__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./icon */ "./src/atomic-wind/blocks/box/icon.js");
/* harmony import */ var _edit__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./edit */ "./src/atomic-wind/blocks/box/edit.js");
/* harmony import */ var _save__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./save */ "./src/atomic-wind/blocks/box/save.js");
/* harmony import */ var _labels__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../labels */ "./src/atomic-wind/blocks/labels.js");






const {
  name,
  ...settings
} = _block_json__WEBPACK_IMPORTED_MODULE_1__;
(0,_wordpress_blocks__WEBPACK_IMPORTED_MODULE_0__.registerBlockType)(name, {
  ...settings,
  icon: _icon__WEBPACK_IMPORTED_MODULE_2__["default"],
  edit: _edit__WEBPACK_IMPORTED_MODULE_3__["default"],
  save: _save__WEBPACK_IMPORTED_MODULE_4__["default"],
  __experimentalLabel: _labels__WEBPACK_IMPORTED_MODULE_5__.boxLabel
});
}();
/******/ })()
;
//# sourceMappingURL=index.js.map