Gutenberg - Version 10.1.0

Version Description

Download this release

Release Info

Developer gutenbergplugin
Plugin Icon 128x128 Gutenberg
Version 10.1.0
Comparing to
See all releases

Code changes from version 10.0.2 to 10.1.0

README.md CHANGED
@@ -1,11 +1,11 @@
1
  # Gutenberg
2
 
3
- [![End-to-End Tests](https://github.com/WordPress/gutenberg/workflows/End-to-End%20Tests/badge.svg)](https://github.com/WordPress/gutenberg/actions?query=workflow%3A%22End-to-End+Tests%22+branch%3Amaster)
4
- [![Static Analysis (Linting, License, Type checks...)](https://github.com/WordPress/gutenberg/workflows/Static%20Analysis%20(Linting,%20License,%20Type%20checks...)/badge.svg)](https://github.com/WordPress/gutenberg/actions?query=workflow%3A%22Static+Analysis+%28Linting%2C+License%2C+Type+checks...%29%22+branch%3Amaster)
5
- [![Unit Tests](https://github.com/WordPress/gutenberg/workflows/Unit%20Tests/badge.svg)](https://github.com/WordPress/gutenberg/actions?query=workflow%3A%22Unit+Tests%22+branch%3Amaster)
6
- [![Create Block](https://github.com/WordPress/gutenberg/workflows/Create%20Block/badge.svg)](https://github.com/WordPress/gutenberg/actions?query=workflow%3A%22Create+Block%22+branch%3Amaster)
7
- [![React Native E2E Tests (iOS)](https://github.com/WordPress/gutenberg/workflows/React%20Native%20E2E%20Tests%20(iOS)/badge.svg)](https://github.com/WordPress/gutenberg/actions?query=workflow%3A%22React+Native+E2E+Tests+%28iOS%29%22+branch%3Amaster)
8
- [![React Native E2E Tests (Android)](https://github.com/WordPress/gutenberg/workflows/React%20Native%20E2E%20Tests%20(Android)/badge.svg)](https://github.com/WordPress/gutenberg/actions?query=workflow%3A%22React+Native+E2E+Tests+%28Android%29%22+branch%3Amaster)
9
 
10
  [![lerna](https://img.shields.io/badge/maintained%20with-lerna-cc00ff.svg)](https://lerna.js.org)
11
 
1
  # Gutenberg
2
 
3
+ [![End-to-End Tests](https://github.com/WordPress/gutenberg/workflows/End-to-End%20Tests/badge.svg)](https://github.com/WordPress/gutenberg/actions?query=workflow%3A%22End-to-End+Tests%22+branch%3Atrunk)
4
+ [![Static Analysis (Linting, License, Type checks...)](https://github.com/WordPress/gutenberg/workflows/Static%20Analysis%20(Linting,%20License,%20Type%20checks...)/badge.svg)](https://github.com/WordPress/gutenberg/actions?query=workflow%3A%22Static+Analysis+%28Linting%2C+License%2C+Type+checks...%29%22+branch%3Atrunk)
5
+ [![Unit Tests](https://github.com/WordPress/gutenberg/workflows/Unit%20Tests/badge.svg)](https://github.com/WordPress/gutenberg/actions?query=workflow%3A%22Unit+Tests%22+branch%3Atrunk)
6
+ [![Create Block](https://github.com/WordPress/gutenberg/workflows/Create%20Block/badge.svg)](https://github.com/WordPress/gutenberg/actions?query=workflow%3A%22Create+Block%22+branch%3Atrunk)
7
+ [![React Native E2E Tests (iOS)](https://github.com/WordPress/gutenberg/workflows/React%20Native%20E2E%20Tests%20(iOS)/badge.svg)](https://github.com/WordPress/gutenberg/actions?query=workflow%3A%22React+Native+E2E+Tests+%28iOS%29%22+branch%3Atrunk)
8
+ [![React Native E2E Tests (Android)](https://github.com/WordPress/gutenberg/workflows/React%20Native%20E2E%20Tests%20(Android)/badge.svg)](https://github.com/WordPress/gutenberg/actions?query=workflow%3A%22React+Native+E2E+Tests+%28Android%29%22+branch%3Atrunk)
9
 
10
  [![lerna](https://img.shields.io/badge/maintained%20with-lerna-cc00ff.svg)](https://lerna.js.org)
11
 
build/a11y/index.asset.php CHANGED
@@ -1 +1 @@
1
- <?php return array('dependencies' => array('wp-dom-ready', 'wp-i18n', 'wp-polyfill'), 'version' => '325d4881eb48f3d16b0dc75b4aad6231');
1
+ <?php return array('dependencies' => array('wp-dom-ready', 'wp-i18n', 'wp-polyfill'), 'version' => '3ec3104fb1bf0c0d63bce166175c2bc5');
build/a11y/index.js CHANGED
@@ -1 +1 @@
1
- window.wp=window.wp||{},window.wp.a11y=function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)n.d(r,i,function(t){return e[t]}.bind(null,i));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=528)}({1:function(e,t){e.exports=window.wp.i18n},325:function(e,t){e.exports=window.wp.domReady},528:function(e,t,n){"use strict";n.r(t),n.d(t,"setup",(function(){return p})),n.d(t,"speak",(function(){return u}));var r=n(325),i=n.n(r),o=n(1);function a(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"polite",t=document.createElement("div");t.id="a11y-speak-".concat(e),t.className="a11y-speak-region",t.setAttribute("style","position: absolute;margin: -1px;padding: 0;height: 1px;width: 1px;overflow: hidden;clip: rect(1px, 1px, 1px, 1px);-webkit-clip-path: inset(50%);clip-path: inset(50%);border: 0;word-wrap: normal !important;"),t.setAttribute("aria-live",e),t.setAttribute("aria-relevant","additions text"),t.setAttribute("aria-atomic","true");var n=document,r=n.body;return r&&r.appendChild(t),t}var d="";function p(){var e=document.getElementById("a11y-speak-intro-text"),t=document.getElementById("a11y-speak-assertive"),n=document.getElementById("a11y-speak-polite");null===e&&function(){var e=document.createElement("p");e.id="a11y-speak-intro-text",e.className="a11y-speak-intro-text",e.textContent=Object(o.__)("Notifications"),e.setAttribute("style","position: absolute;margin: -1px;padding: 0;height: 1px;width: 1px;overflow: hidden;clip: rect(1px, 1px, 1px, 1px);-webkit-clip-path: inset(50%);clip-path: inset(50%);border: 0;word-wrap: normal !important;"),e.setAttribute("hidden","hidden");var t=document.body;t&&t.appendChild(e)}(),null===t&&a("assertive"),null===n&&a("polite")}function u(e,t){!function(){for(var e=document.getElementsByClassName("a11y-speak-region"),t=document.getElementById("a11y-speak-intro-text"),n=0;n<e.length;n++)e[n].textContent="";t&&t.setAttribute("hidden","hidden")}(),e=function(e){return e=e.replace(/<[^<>]+>/g," "),d===e&&(e+=" "),d=e,e}(e);var n=document.getElementById("a11y-speak-intro-text"),r=document.getElementById("a11y-speak-assertive"),i=document.getElementById("a11y-speak-polite");r&&"assertive"===t?r.textContent=e:i&&(i.textContent=e),n&&n.removeAttribute("hidden")}i()(p)}});
1
+ window.wp=window.wp||{},window.wp.a11y=function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)n.d(r,i,function(t){return e[t]}.bind(null,i));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=547)}({1:function(e,t){e.exports=window.wp.i18n},341:function(e,t){e.exports=window.wp.domReady},547:function(e,t,n){"use strict";n.r(t),n.d(t,"setup",(function(){return p})),n.d(t,"speak",(function(){return u}));var r=n(341),i=n.n(r),o=n(1);function a(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"polite",t=document.createElement("div");t.id="a11y-speak-".concat(e),t.className="a11y-speak-region",t.setAttribute("style","position: absolute;margin: -1px;padding: 0;height: 1px;width: 1px;overflow: hidden;clip: rect(1px, 1px, 1px, 1px);-webkit-clip-path: inset(50%);clip-path: inset(50%);border: 0;word-wrap: normal !important;"),t.setAttribute("aria-live",e),t.setAttribute("aria-relevant","additions text"),t.setAttribute("aria-atomic","true");var n=document,r=n.body;return r&&r.appendChild(t),t}var d="";function p(){var e=document.getElementById("a11y-speak-intro-text"),t=document.getElementById("a11y-speak-assertive"),n=document.getElementById("a11y-speak-polite");null===e&&function(){var e=document.createElement("p");e.id="a11y-speak-intro-text",e.className="a11y-speak-intro-text",e.textContent=Object(o.__)("Notifications"),e.setAttribute("style","position: absolute;margin: -1px;padding: 0;height: 1px;width: 1px;overflow: hidden;clip: rect(1px, 1px, 1px, 1px);-webkit-clip-path: inset(50%);clip-path: inset(50%);border: 0;word-wrap: normal !important;"),e.setAttribute("hidden","hidden");var t=document.body;t&&t.appendChild(e)}(),null===t&&a("assertive"),null===n&&a("polite")}function u(e,t){!function(){for(var e=document.getElementsByClassName("a11y-speak-region"),t=document.getElementById("a11y-speak-intro-text"),n=0;n<e.length;n++)e[n].textContent="";t&&t.setAttribute("hidden","hidden")}(),e=function(e){return e=e.replace(/<[^<>]+>/g," "),d===e&&(e+=" "),d=e,e}(e);var n=document.getElementById("a11y-speak-intro-text"),r=document.getElementById("a11y-speak-assertive"),i=document.getElementById("a11y-speak-polite");r&&"assertive"===t?r.textContent=e:i&&(i.textContent=e),n&&n.removeAttribute("hidden")}i()(p)}});
build/annotations/index.asset.php CHANGED
@@ -1 +1 @@
1
- <?php return array('dependencies' => array('lodash', 'wp-data', 'wp-hooks', 'wp-i18n', 'wp-polyfill', 'wp-rich-text'), 'version' => '2c99cc244014c752adf6f8565a840cf1');
1
+ <?php return array('dependencies' => array('lodash', 'wp-data', 'wp-hooks', 'wp-i18n', 'wp-polyfill', 'wp-rich-text'), 'version' => 'e7a120cb6a65c635f935c24b441d9952');
build/annotations/index.js CHANGED
@@ -1 +1 @@
1
- window.wp=window.wp||{},window.wp.annotations=function(t){var e={};function n(r){if(e[r])return e[r].exports;var o=e[r]={i:r,l:!1,exports:{}};return t[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var o in t)n.d(r,o,function(e){return t[e]}.bind(null,o));return r},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=518)}({1:function(t,e){t.exports=window.wp.i18n},13:function(t,e,n){"use strict";n.d(e,"a",(function(){return o}));var r=n(48);function o(t,e){if(null==t)return{};var n,o,a=Object(r.a)(t,e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(o=0;o<i.length;o++)n=i[o],e.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(t,n)&&(a[n]=t[n])}return a}},15:function(t,e,n){"use strict";n.d(e,"a",(function(){return i}));var r=n(25),o=n(40),a=n(30);function i(t){return function(t){if(Array.isArray(t))return Object(r.a)(t)}(t)||Object(o.a)(t)||Object(a.a)(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}},189:function(t,e,n){"use strict";var r="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto),o=new Uint8Array(16);function a(){if(!r)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return r(o)}for(var i=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i,u=function(t){return"string"==typeof t&&i.test(t)},c=[],l=0;l<256;++l)c.push((l+256).toString(16).substr(1));e.a=function(t,e,n){var r=(t=t||{}).random||(t.rng||a)();if(r[6]=15&r[6]|64,r[8]=63&r[8]|128,e){n=n||0;for(var o=0;o<16;++o)e[n+o]=r[o];return e}return function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=(c[t[e+0]]+c[t[e+1]]+c[t[e+2]]+c[t[e+3]]+"-"+c[t[e+4]]+c[t[e+5]]+"-"+c[t[e+6]]+c[t[e+7]]+"-"+c[t[e+8]]+c[t[e+9]]+"-"+c[t[e+10]]+c[t[e+11]]+c[t[e+12]]+c[t[e+13]]+c[t[e+14]]+c[t[e+15]]).toLowerCase();if(!u(n))throw TypeError("Stringified UUID is invalid");return n}(r)}},2:function(t,e){t.exports=window.lodash},24:function(t,e){t.exports=window.wp.richText},25:function(t,e,n){"use strict";function r(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}n.d(e,"a",(function(){return r}))},30:function(t,e,n){"use strict";n.d(e,"a",(function(){return o}));var r=n(25);function o(t,e){if(t){if("string"==typeof t)return Object(r.a)(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Object(r.a)(t,e):void 0}}},34:function(t,e){t.exports=window.wp.hooks},4:function(t,e){t.exports=window.wp.data},40:function(t,e,n){"use strict";function r(t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(t))return Array.from(t)}n.d(e,"a",(function(){return r}))},48:function(t,e,n){"use strict";function r(t,e){if(null==t)return{};var n,r,o={},a=Object.keys(t);for(r=0;r<a.length;r++)n=a[r],e.indexOf(n)>=0||(o[n]=t[n]);return o}n.d(e,"a",(function(){return r}))},49:function(t,e,n){"use strict";var r,o;function a(t){return[t]}function i(){var t={clear:function(){t.head=null}};return t}function u(t,e,n){var r;if(t.length!==e.length)return!1;for(r=n;r<t.length;r++)if(t[r]!==e[r])return!1;return!0}r={},o="undefined"!=typeof WeakMap,e.a=function(t,e){var n,c;function l(){n=o?new WeakMap:i()}function f(){var n,r,o,a,i,l=arguments.length;for(a=new Array(l),o=0;o<l;o++)a[o]=arguments[o];for(i=e.apply(null,a),(n=c(i)).isUniqueByDependants||(n.lastDependants&&!u(i,n.lastDependants,0)&&n.clear(),n.lastDependants=i),r=n.head;r;){if(u(r.args,a,1))return r!==n.head&&(r.prev.next=r.next,r.next&&(r.next.prev=r.prev),r.next=n.head,r.prev=null,n.head.prev=r,n.head=r),r.val;r=r.next}return r={val:t.apply(null,a)},a[0]=null,r.args=a,n.head&&(n.head.prev=r,r.next=n.head),n.head=r,r.val}return e||(e=a),c=o?function(t){var e,o,a,u,c,l=n,f=!0;for(e=0;e<t.length;e++){if(!(c=o=t[e])||"object"!=typeof c){f=!1;break}l.has(o)?l=l.get(o):(a=new WeakMap,l.set(o,a),l=a)}return l.has(r)||((u=i()).isUniqueByDependants=f,l.set(r,u)),l.get(r)}:function(){return n},f.getDependants=e,f.clear=l,l(),f}},5:function(t,e,n){"use strict";function r(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}n.d(e,"a",(function(){return r}))},518:function(t,e,n){"use strict";n.r(e),n.d(e,"store",(function(){return k}));var r={};n.r(r),n.d(r,"__experimentalGetAnnotationsForBlock",(function(){return _})),n.d(r,"__experimentalGetAllAnnotationsForBlock",(function(){return T})),n.d(r,"__experimentalGetAnnotationsForRichText",(function(){return N})),n.d(r,"__experimentalGetAnnotations",(function(){return P}));var o={};n.r(o),n.d(o,"__experimentalAddAnnotation",(function(){return I})),n.d(o,"__experimentalRemoveAnnotation",(function(){return R})),n.d(o,"__experimentalUpdateAnnotationRange",(function(){return S})),n.d(o,"__experimentalRemoveAnnotationsBySource",(function(){return D}));var a=n(13),i=n(24),u=n(1),c="core/annotations",l={name:"core/annotation",title:Object(u.__)("Annotation"),tagName:"mark",className:"annotation-text",attributes:{className:"class",id:"id"},edit:function(){return null},__experimentalGetPropsForEditableTreePreparation:function(t,e){var n=e.richTextIdentifier,r=e.blockClientId;return{annotations:t(c).__experimentalGetAnnotationsForRichText(r,n)}},__experimentalCreatePrepareEditableTree:function(t){var e=t.annotations;return function(t,n){if(0===e.length)return t;var r={formats:t,text:n};return(r=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return e.forEach((function(e){var n=e.start,r=e.end;n>t.text.length&&(n=t.text.length),r>t.text.length&&(r=t.text.length);var o="annotation-text-"+e.source,a="annotation-text-"+e.id;t=Object(i.applyFormat)(t,{type:"core/annotation",attributes:{className:o,id:a}},n,r)})),t}(r,e)).formats}},__experimentalGetPropsForEditableTreeChangeHandler:function(t){return{removeAnnotation:t(c).__experimentalRemoveAnnotation,updateAnnotationRange:t(c).__experimentalUpdateAnnotationRange}},__experimentalCreateOnChangeEditableValue:function(t){return function(e){var n=function(t){var e={};return t.forEach((function(t,n){(t=(t=t||[]).filter((function(t){return"core/annotation"===t.type}))).forEach((function(t){var r=t.attributes.id;r=r.replace("annotation-text-",""),e.hasOwnProperty(r)||(e[r]={start:n}),e[r].end=n+1}))})),e}(e),r=t.removeAnnotation,o=t.updateAnnotationRange;!function(t,e,n){var r=n.removeAnnotation,o=n.updateAnnotationRange;t.forEach((function(t){var n=e[t.id];if(n){var a=t.start,i=t.end;a===n.start&&i===n.end||o(t.id,n.start,n.end)}else r(t.id)}))}(t.annotations,n,{removeAnnotation:r,updateAnnotationRange:o})}}},f=l.name,s=Object(a.a)(l,["name"]);Object(i.registerFormatType)(f,s);var d=n(34),p=n(4);Object(d.addFilter)("editor.BlockListBlock","core/annotations",(function(t){return Object(p.withSelect)((function(t,e){var n=e.clientId,r=e.className;return{className:t(c).__experimentalGetAnnotationsForBlock(n).map((function(t){return"is-annotated-by-"+t.source})).concat(r).filter(Boolean).join(" ")}}))(t)}));var b=n(15),v=n(5),O=n(2);function y(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function g(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?y(Object(n),!0).forEach((function(e){Object(v.a)(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):y(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function m(t,e){var n=t.filter(e);return t.length===n.length?t:n}function h(t){return Object(O.isNumber)(t.start)&&Object(O.isNumber)(t.end)&&t.start<=t.end}var j=n(49);function x(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function A(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?x(Object(n),!0).forEach((function(e){Object(v.a)(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):x(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}var w=[],_=Object(j.a)((function(t,e){var n;return(null!==(n=null==t?void 0:t[e])&&void 0!==n?n:[]).filter((function(t){return"block"===t.selector}))}),(function(t,e){var n;return[null!==(n=null==t?void 0:t[e])&&void 0!==n?n:w]}));function T(t,e){var n;return null!==(n=null==t?void 0:t[e])&&void 0!==n?n:w}var N=Object(j.a)((function(t,e,n){var r;return(null!==(r=null==t?void 0:t[e])&&void 0!==r?r:[]).filter((function(t){return"range"===t.selector&&n===t.richTextIdentifier})).map((function(t){var e=t.range,n=Object(a.a)(t,["range"]);return A(A({},e),n)}))}),(function(t,e){var n;return[null!==(n=null==t?void 0:t[e])&&void 0!==n?n:w]}));function P(t){return Object(O.flatMap)(t,(function(t){return t}))}var E=n(189);function I(t){var e=t.blockClientId,n=t.richTextIdentifier,r=void 0===n?null:n,o=t.range,a=void 0===o?null:o,i=t.selector,u=void 0===i?"range":i,c=t.source,l=void 0===c?"default":c,f=t.id,s={type:"ANNOTATION_ADD",id:void 0===f?Object(E.a)():f,blockClientId:e,richTextIdentifier:r,source:l,selector:u};return"range"===u&&(s.range=a),s}function R(t){return{type:"ANNOTATION_REMOVE",annotationId:t}}function S(t,e,n){return{type:"ANNOTATION_UPDATE_RANGE",annotationId:t,start:e,end:n}}function D(t){return{type:"ANNOTATION_REMOVE_SOURCE",source:t}}var k=Object(p.createReduxStore)(c,{reducer:function(){var t,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;switch(n.type){case"ANNOTATION_ADD":var r=n.blockClientId,o={id:n.id,blockClientId:r,richTextIdentifier:n.richTextIdentifier,source:n.source,selector:n.selector,range:n.range};if("range"===o.selector&&!h(o.range))return e;var a=null!==(t=null==e?void 0:e[r])&&void 0!==t?t:[];return g(g({},e),{},Object(v.a)({},r,[].concat(Object(b.a)(a),[o])));case"ANNOTATION_REMOVE":return Object(O.mapValues)(e,(function(t){return m(t,(function(t){return t.id!==n.annotationId}))}));case"ANNOTATION_UPDATE_RANGE":return Object(O.mapValues)(e,(function(t){var e=!1,r=t.map((function(t){return t.id===n.annotationId?(e=!0,g(g({},t),{},{range:{start:n.start,end:n.end}})):t}));return e?r:t}));case"ANNOTATION_REMOVE_SOURCE":return Object(O.mapValues)(e,(function(t){return m(t,(function(t){return t.source!==n.source}))}))}return e},selectors:r,actions:o});Object(p.register)(k)}});
1
+ window.wp=window.wp||{},window.wp.annotations=function(t){var e={};function n(r){if(e[r])return e[r].exports;var o=e[r]={i:r,l:!1,exports:{}};return t[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var o in t)n.d(r,o,function(e){return t[e]}.bind(null,o));return r},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=537)}({1:function(t,e){t.exports=window.wp.i18n},13:function(t,e,n){"use strict";n.d(e,"a",(function(){return o}));var r=n(48);function o(t,e){if(null==t)return{};var n,o,a=Object(r.a)(t,e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(o=0;o<i.length;o++)n=i[o],e.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(t,n)&&(a[n]=t[n])}return a}},15:function(t,e,n){"use strict";n.d(e,"a",(function(){return i}));var r=n(24),o=n(42),a=n(30);function i(t){return function(t){if(Array.isArray(t))return Object(r.a)(t)}(t)||Object(o.a)(t)||Object(a.a)(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}},2:function(t,e){t.exports=window.lodash},204:function(t,e,n){"use strict";var r="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto),o=new Uint8Array(16);function a(){if(!r)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return r(o)}for(var i=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i,u=function(t){return"string"==typeof t&&i.test(t)},c=[],l=0;l<256;++l)c.push((l+256).toString(16).substr(1));e.a=function(t,e,n){var r=(t=t||{}).random||(t.rng||a)();if(r[6]=15&r[6]|64,r[8]=63&r[8]|128,e){n=n||0;for(var o=0;o<16;++o)e[n+o]=r[o];return e}return function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=(c[t[e+0]]+c[t[e+1]]+c[t[e+2]]+c[t[e+3]]+"-"+c[t[e+4]]+c[t[e+5]]+"-"+c[t[e+6]]+c[t[e+7]]+"-"+c[t[e+8]]+c[t[e+9]]+"-"+c[t[e+10]]+c[t[e+11]]+c[t[e+12]]+c[t[e+13]]+c[t[e+14]]+c[t[e+15]]).toLowerCase();if(!u(n))throw TypeError("Stringified UUID is invalid");return n}(r)}},24:function(t,e,n){"use strict";function r(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}n.d(e,"a",(function(){return r}))},25:function(t,e){t.exports=window.wp.richText},30:function(t,e,n){"use strict";n.d(e,"a",(function(){return o}));var r=n(24);function o(t,e){if(t){if("string"==typeof t)return Object(r.a)(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Object(r.a)(t,e):void 0}}},35:function(t,e){t.exports=window.wp.hooks},4:function(t,e){t.exports=window.wp.data},42:function(t,e,n){"use strict";function r(t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(t))return Array.from(t)}n.d(e,"a",(function(){return r}))},48:function(t,e,n){"use strict";function r(t,e){if(null==t)return{};var n,r,o={},a=Object.keys(t);for(r=0;r<a.length;r++)n=a[r],e.indexOf(n)>=0||(o[n]=t[n]);return o}n.d(e,"a",(function(){return r}))},49:function(t,e,n){"use strict";var r,o;function a(t){return[t]}function i(){var t={clear:function(){t.head=null}};return t}function u(t,e,n){var r;if(t.length!==e.length)return!1;for(r=n;r<t.length;r++)if(t[r]!==e[r])return!1;return!0}r={},o="undefined"!=typeof WeakMap,e.a=function(t,e){var n,c;function l(){n=o?new WeakMap:i()}function f(){var n,r,o,a,i,l=arguments.length;for(a=new Array(l),o=0;o<l;o++)a[o]=arguments[o];for(i=e.apply(null,a),(n=c(i)).isUniqueByDependants||(n.lastDependants&&!u(i,n.lastDependants,0)&&n.clear(),n.lastDependants=i),r=n.head;r;){if(u(r.args,a,1))return r!==n.head&&(r.prev.next=r.next,r.next&&(r.next.prev=r.prev),r.next=n.head,r.prev=null,n.head.prev=r,n.head=r),r.val;r=r.next}return r={val:t.apply(null,a)},a[0]=null,r.args=a,n.head&&(n.head.prev=r,r.next=n.head),n.head=r,r.val}return e||(e=a),c=o?function(t){var e,o,a,u,c,l=n,f=!0;for(e=0;e<t.length;e++){if(!(c=o=t[e])||"object"!=typeof c){f=!1;break}l.has(o)?l=l.get(o):(a=new WeakMap,l.set(o,a),l=a)}return l.has(r)||((u=i()).isUniqueByDependants=f,l.set(r,u)),l.get(r)}:function(){return n},f.getDependants=e,f.clear=l,l(),f}},5:function(t,e,n){"use strict";function r(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}n.d(e,"a",(function(){return r}))},537:function(t,e,n){"use strict";n.r(e),n.d(e,"store",(function(){return k}));var r={};n.r(r),n.d(r,"__experimentalGetAnnotationsForBlock",(function(){return _})),n.d(r,"__experimentalGetAllAnnotationsForBlock",(function(){return T})),n.d(r,"__experimentalGetAnnotationsForRichText",(function(){return N})),n.d(r,"__experimentalGetAnnotations",(function(){return P}));var o={};n.r(o),n.d(o,"__experimentalAddAnnotation",(function(){return I})),n.d(o,"__experimentalRemoveAnnotation",(function(){return R})),n.d(o,"__experimentalUpdateAnnotationRange",(function(){return S})),n.d(o,"__experimentalRemoveAnnotationsBySource",(function(){return D}));var a=n(13),i=n(25),u=n(1),c="core/annotations",l={name:"core/annotation",title:Object(u.__)("Annotation"),tagName:"mark",className:"annotation-text",attributes:{className:"class",id:"id"},edit:function(){return null},__experimentalGetPropsForEditableTreePreparation:function(t,e){var n=e.richTextIdentifier,r=e.blockClientId;return{annotations:t(c).__experimentalGetAnnotationsForRichText(r,n)}},__experimentalCreatePrepareEditableTree:function(t){var e=t.annotations;return function(t,n){if(0===e.length)return t;var r={formats:t,text:n};return(r=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return e.forEach((function(e){var n=e.start,r=e.end;n>t.text.length&&(n=t.text.length),r>t.text.length&&(r=t.text.length);var o="annotation-text-"+e.source,a="annotation-text-"+e.id;t=Object(i.applyFormat)(t,{type:"core/annotation",attributes:{className:o,id:a}},n,r)})),t}(r,e)).formats}},__experimentalGetPropsForEditableTreeChangeHandler:function(t){return{removeAnnotation:t(c).__experimentalRemoveAnnotation,updateAnnotationRange:t(c).__experimentalUpdateAnnotationRange}},__experimentalCreateOnChangeEditableValue:function(t){return function(e){var n=function(t){var e={};return t.forEach((function(t,n){(t=(t=t||[]).filter((function(t){return"core/annotation"===t.type}))).forEach((function(t){var r=t.attributes.id;r=r.replace("annotation-text-",""),e.hasOwnProperty(r)||(e[r]={start:n}),e[r].end=n+1}))})),e}(e),r=t.removeAnnotation,o=t.updateAnnotationRange;!function(t,e,n){var r=n.removeAnnotation,o=n.updateAnnotationRange;t.forEach((function(t){var n=e[t.id];if(n){var a=t.start,i=t.end;a===n.start&&i===n.end||o(t.id,n.start,n.end)}else r(t.id)}))}(t.annotations,n,{removeAnnotation:r,updateAnnotationRange:o})}}},f=l.name,s=Object(a.a)(l,["name"]);Object(i.registerFormatType)(f,s);var d=n(35),p=n(4);Object(d.addFilter)("editor.BlockListBlock","core/annotations",(function(t){return Object(p.withSelect)((function(t,e){var n=e.clientId,r=e.className;return{className:t(c).__experimentalGetAnnotationsForBlock(n).map((function(t){return"is-annotated-by-"+t.source})).concat(r).filter(Boolean).join(" ")}}))(t)}));var b=n(15),v=n(5),O=n(2);function y(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function g(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?y(Object(n),!0).forEach((function(e){Object(v.a)(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):y(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function m(t,e){var n=t.filter(e);return t.length===n.length?t:n}function h(t){return Object(O.isNumber)(t.start)&&Object(O.isNumber)(t.end)&&t.start<=t.end}var j=n(49);function x(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function A(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?x(Object(n),!0).forEach((function(e){Object(v.a)(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):x(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}var w=[],_=Object(j.a)((function(t,e){var n;return(null!==(n=null==t?void 0:t[e])&&void 0!==n?n:[]).filter((function(t){return"block"===t.selector}))}),(function(t,e){var n;return[null!==(n=null==t?void 0:t[e])&&void 0!==n?n:w]}));function T(t,e){var n;return null!==(n=null==t?void 0:t[e])&&void 0!==n?n:w}var N=Object(j.a)((function(t,e,n){var r;return(null!==(r=null==t?void 0:t[e])&&void 0!==r?r:[]).filter((function(t){return"range"===t.selector&&n===t.richTextIdentifier})).map((function(t){var e=t.range,n=Object(a.a)(t,["range"]);return A(A({},e),n)}))}),(function(t,e){var n;return[null!==(n=null==t?void 0:t[e])&&void 0!==n?n:w]}));function P(t){return Object(O.flatMap)(t,(function(t){return t}))}var E=n(204);function I(t){var e=t.blockClientId,n=t.richTextIdentifier,r=void 0===n?null:n,o=t.range,a=void 0===o?null:o,i=t.selector,u=void 0===i?"range":i,c=t.source,l=void 0===c?"default":c,f=t.id,s={type:"ANNOTATION_ADD",id:void 0===f?Object(E.a)():f,blockClientId:e,richTextIdentifier:r,source:l,selector:u};return"range"===u&&(s.range=a),s}function R(t){return{type:"ANNOTATION_REMOVE",annotationId:t}}function S(t,e,n){return{type:"ANNOTATION_UPDATE_RANGE",annotationId:t,start:e,end:n}}function D(t){return{type:"ANNOTATION_REMOVE_SOURCE",source:t}}var k=Object(p.createReduxStore)(c,{reducer:function(){var t,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;switch(n.type){case"ANNOTATION_ADD":var r=n.blockClientId,o={id:n.id,blockClientId:r,richTextIdentifier:n.richTextIdentifier,source:n.source,selector:n.selector,range:n.range};if("range"===o.selector&&!h(o.range))return e;var a=null!==(t=null==e?void 0:e[r])&&void 0!==t?t:[];return g(g({},e),{},Object(v.a)({},r,[].concat(Object(b.a)(a),[o])));case"ANNOTATION_REMOVE":return Object(O.mapValues)(e,(function(t){return m(t,(function(t){return t.id!==n.annotationId}))}));case"ANNOTATION_UPDATE_RANGE":return Object(O.mapValues)(e,(function(t){var e=!1,r=t.map((function(t){return t.id===n.annotationId?(e=!0,g(g({},t),{},{range:{start:n.start,end:n.end}})):t}));return e?r:t}));case"ANNOTATION_REMOVE_SOURCE":return Object(O.mapValues)(e,(function(t){return m(t,(function(t){return t.source!==n.source}))}))}return e},selectors:r,actions:o});Object(p.register)(k)}});
build/api-fetch/index.asset.php CHANGED
@@ -1 +1 @@
1
- <?php return array('dependencies' => array('wp-i18n', 'wp-polyfill', 'wp-url'), 'version' => '1bd61334a839b0a16e308561a1ca3b4b');
1
+ <?php return array('dependencies' => array('wp-i18n', 'wp-polyfill', 'wp-url'), 'version' => '8590c4547fc7b4de3820fcad180e0b65');
build/api-fetch/index.js CHANGED
@@ -1 +1 @@
1
- window.wp=window.wp||{},window.wp.apiFetch=function(e){var t={};function r(n){if(t[n])return t[n].exports;var o=t[n]={i:n,l:!1,exports:{}};return e[n].call(o.exports,o,o.exports,r),o.l=!0,o.exports}return r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)r.d(n,o,function(t){return e[t]}.bind(null,o));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=517)}({1:function(e,t){e.exports=window.wp.i18n},13:function(e,t,r){"use strict";r.d(t,"a",(function(){return o}));var n=r(48);function o(e,t){if(null==e)return{};var r,o,c=Object(n.a)(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(o=0;o<i.length;o++)r=i[o],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(c[r]=e[r])}return c}},16:function(e,t){e.exports=window.regeneratorRuntime},29:function(e,t){e.exports=window.wp.url},46:function(e,t,r){"use strict";function n(e,t,r,n,o,c,i){try{var u=e[c](i),a=u.value}catch(e){return void r(e)}u.done?t(a):Promise.resolve(a).then(n,o)}function o(e){return function(){var t=this,r=arguments;return new Promise((function(o,c){var i=e.apply(t,r);function u(e){n(i,o,c,u,a,"next",e)}function a(e){n(i,o,c,u,a,"throw",e)}u(void 0)}))}}r.d(t,"a",(function(){return o}))},48:function(e,t,r){"use strict";function n(e,t){if(null==e)return{};var r,n,o={},c=Object.keys(e);for(n=0;n<c.length;n++)r=c[n],t.indexOf(r)>=0||(o[r]=e[r]);return o}r.d(t,"a",(function(){return n}))},5:function(e,t,r){"use strict";function n(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}r.d(t,"a",(function(){return n}))},517:function(e,t,r){"use strict";r.r(t);var n=r(5),o=r(13),c=r(1);function i(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function u(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?i(Object(r),!0).forEach((function(t){Object(n.a)(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):i(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function a(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function s(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?a(Object(r),!0).forEach((function(t){Object(n.a)(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):a(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var p=function(e,t){var r,n,o=e.path;return"string"==typeof e.namespace&&"string"==typeof e.endpoint&&(r=e.namespace.replace(/^\/|\/$/g,""),o=(n=e.endpoint.replace(/^\//,""))?r+"/"+n:r),delete e.namespace,delete e.endpoint,t(s(s({},e),{},{path:o}))};function f(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function l(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?f(Object(r),!0).forEach((function(t){Object(n.a)(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):f(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function O(e){var t=e.split("?"),r=t[1],n=t[0];return r?n+"?"+r.split("&").map((function(e){return e.split("=")})).sort((function(e,t){return e[0].localeCompare(t[0])})).map((function(e){return e.join("=")})).join("&"):n}var b=r(16),d=r.n(b),j=r(46),y=r(29);function h(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function v(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?h(Object(r),!0).forEach((function(t){Object(n.a)(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):h(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var w=function(e){return e.json?e.json():Promise.reject(e)},g=function(e){return function(e){if(!e)return{};var t=e.match(/<([^>]+)>; rel="next"/);return t?{next:t[1]}:{}}(e.headers.get("link")).next},P=function(e){var t=e.path&&-1!==e.path.indexOf("per_page=-1"),r=e.url&&-1!==e.url.indexOf("per_page=-1");return t||r},m=function(){var e=Object(j.a)(d.a.mark((function e(t,r){var n,c,i,u,a,s;return d.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!1!==t.parse){e.next=2;break}return e.abrupt("return",r(t));case 2:if(P(t)){e.next=4;break}return e.abrupt("return",r(t));case 4:return e.next=6,I(v(v({},(f={per_page:100},void 0,void 0,l=(p=t).path,O=p.url,v(v({},Object(o.a)(p,["path","url"])),{},{url:O&&Object(y.addQueryArgs)(O,f),path:l&&Object(y.addQueryArgs)(l,f)}))),{},{parse:!1}));case 6:return n=e.sent,e.next=9,w(n);case 9:if(c=e.sent,Array.isArray(c)){e.next=12;break}return e.abrupt("return",c);case 12:if(i=g(n)){e.next=15;break}return e.abrupt("return",c);case 15:u=[].concat(c);case 16:if(!i){e.next=27;break}return e.next=19,I(v(v({},t),{},{path:void 0,url:i,parse:!1}));case 19:return a=e.sent,e.next=22,w(a);case 22:s=e.sent,u=u.concat(s),i=g(a),e.next=16;break;case 27:return e.abrupt("return",u);case 28:case"end":return e.stop()}var p,f,l,O}),e)})));return function(_x,t){return e.apply(this,arguments)}}();function x(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function D(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?x(Object(r),!0).forEach((function(t){Object(n.a)(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):x(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var S=new Set(["PATCH","PUT","DELETE"]),_=function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return t?204===e.status?null:e.json?e.json():Promise.reject(e):e},E=function(e){var t={code:"invalid_json",message:Object(c.__)("The response is not a valid JSON response.")};if(!e||!e.json)throw t;return e.json().catch((function(){throw t}))},k=function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return Promise.resolve(_(e,t)).catch((function(e){return T(e,t)}))};function T(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];if(!t)throw e;return E(e).then((function(e){var t={code:"unknown_error",message:Object(c.__)("An unknown error occurred.")};throw e||t}))}function A(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function M(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?A(Object(r),!0).forEach((function(t){Object(n.a)(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):A(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function C(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function N(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?C(Object(r),!0).forEach((function(t){Object(n.a)(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):C(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var Q={Accept:"application/json, */*;q=0.1"},R={credentials:"include"},L=[function(e,t){return"string"!=typeof e.url||Object(y.hasQueryArg)(e.url,"_locale")||(e.url=Object(y.addQueryArgs)(e.url,{_locale:"user"})),"string"!=typeof e.path||Object(y.hasQueryArg)(e.path,"_locale")||(e.path=Object(y.addQueryArgs)(e.path,{_locale:"user"})),t(e)},p,function(e,t){var r=e.method,n=void 0===r?"GET":r;return S.has(n.toUpperCase())&&(e=D(D({},e),{},{headers:D(D({},e.headers),{},{"X-HTTP-Method-Override":n,"Content-Type":"application/json"}),method:"POST"})),t(e)},m],U=function(e){if(e.status>=200&&e.status<300)return e;throw e},G=function(e){var t=e.url,r=e.path,n=e.data,i=e.parse,u=void 0===i||i,a=Object(o.a)(e,["url","path","data","parse"]),s=e.body,p=e.headers;return p=N(N({},Q),p),n&&(s=JSON.stringify(n),p["Content-Type"]="application/json"),window.fetch(t||r,N(N(N({},R),a),{},{body:s,headers:p})).then((function(e){return Promise.resolve(e).then(U).catch((function(e){return T(e,u)})).then((function(e){return k(e,u)}))}),(function(){throw{code:"fetch_error",message:Object(c.__)("You are probably offline.")}}))};function H(e){return L.reduceRight((function(e,t){return function(r){return t(r,e)}}),G)(e).catch((function(t){return"rest_cookie_invalid_nonce"!==t.code?Promise.reject(t):window.fetch(H.nonceEndpoint).then(U).then((function(e){return e.text()})).then((function(t){return H.nonceMiddleware.nonce=t,H(e)}))}))}H.use=function(e){L.unshift(e)},H.setFetchHandler=function(e){G=e},H.createNonceMiddleware=function(e){function t(e,r){var n=e.headers,o=void 0===n?{}:n;for(var c in o)if("x-wp-nonce"===c.toLowerCase()&&o[c]===t.nonce)return r(e);return r(u(u({},e),{},{headers:u(u({},o),{},{"X-WP-Nonce":t.nonce})}))}return t.nonce=e,t},H.createPreloadingMiddleware=function(e){var t=Object.keys(e).reduce((function(t,r){return t[O(r)]=e[r],t}),{});return function(e,r){var n=e.parse,o=void 0===n||n;if("string"==typeof e.path){var c=e.method||"GET",i=O(e.path);if("GET"===c&&t[i]){var u=t[i];return delete t[i],Promise.resolve(o?u.body:new window.Response(JSON.stringify(u.body),{status:200,statusText:"OK",headers:u.headers}))}if("OPTIONS"===c&&t[c]&&t[c][i])return Promise.resolve(t[c][i])}return r(e)}},H.createRootURLMiddleware=function(e){return function(t,r){return p(t,(function(t){var n,o=t.url,c=t.path;return"string"==typeof c&&(n=e,-1!==e.indexOf("?")&&(c=c.replace("?","&")),c=c.replace(/^\//,""),"string"==typeof n&&-1!==n.indexOf("?")&&(c=c.replace("?","&")),o=n+c),r(l(l({},t),{},{url:o}))}))}},H.fetchAllMiddleware=m,H.mediaUploadMiddleware=function(e,t){if(!(e.path&&-1!==e.path.indexOf("/wp/v2/media")||e.url&&-1!==e.url.indexOf("/wp/v2/media")))return t(e,t);var r=0;return t(M(M({},e),{},{parse:!1})).catch((function(n){var o=n.headers.get("x-wp-upload-attachment-id");return n.status>=500&&n.status<600&&o?function e(n){return r++,t({path:"/wp/v2/media/".concat(n,"/post-process"),method:"POST",data:{action:"create-image-subsizes"},parse:!1}).catch((function(){return r<5?e(n):(t({path:"/wp/v2/media/".concat(n,"?force=true"),method:"DELETE"}),Promise.reject())}))}(o).catch((function(){return!1!==e.parse?Promise.reject({code:"post_process",message:Object(c.__)("Media upload failed. If this is a photo or a large image, please scale it down and try again.")}):Promise.reject(n)})):T(n,e.parse)})).then((function(t){return k(t,e.parse)}))};var I=t.default=H}}).default;
1
+ window.wp=window.wp||{},window.wp.apiFetch=function(e){var t={};function r(n){if(t[n])return t[n].exports;var o=t[n]={i:n,l:!1,exports:{}};return e[n].call(o.exports,o,o.exports,r),o.l=!0,o.exports}return r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)r.d(n,o,function(t){return e[t]}.bind(null,o));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=536)}({1:function(e,t){e.exports=window.wp.i18n},13:function(e,t,r){"use strict";r.d(t,"a",(function(){return o}));var n=r(48);function o(e,t){if(null==e)return{};var r,o,c=Object(n.a)(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(o=0;o<i.length;o++)r=i[o],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(c[r]=e[r])}return c}},16:function(e,t){e.exports=window.regeneratorRuntime},31:function(e,t){e.exports=window.wp.url},45:function(e,t,r){"use strict";function n(e,t,r,n,o,c,i){try{var u=e[c](i),a=u.value}catch(e){return void r(e)}u.done?t(a):Promise.resolve(a).then(n,o)}function o(e){return function(){var t=this,r=arguments;return new Promise((function(o,c){var i=e.apply(t,r);function u(e){n(i,o,c,u,a,"next",e)}function a(e){n(i,o,c,u,a,"throw",e)}u(void 0)}))}}r.d(t,"a",(function(){return o}))},48:function(e,t,r){"use strict";function n(e,t){if(null==e)return{};var r,n,o={},c=Object.keys(e);for(n=0;n<c.length;n++)r=c[n],t.indexOf(r)>=0||(o[r]=e[r]);return o}r.d(t,"a",(function(){return n}))},5:function(e,t,r){"use strict";function n(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}r.d(t,"a",(function(){return n}))},536:function(e,t,r){"use strict";r.r(t);var n=r(5),o=r(13),c=r(1);function i(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function u(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?i(Object(r),!0).forEach((function(t){Object(n.a)(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):i(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function a(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function s(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?a(Object(r),!0).forEach((function(t){Object(n.a)(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):a(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var p=function(e,t){var r,n,o=e.path;return"string"==typeof e.namespace&&"string"==typeof e.endpoint&&(r=e.namespace.replace(/^\/|\/$/g,""),o=(n=e.endpoint.replace(/^\//,""))?r+"/"+n:r),delete e.namespace,delete e.endpoint,t(s(s({},e),{},{path:o}))};function f(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function l(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?f(Object(r),!0).forEach((function(t){Object(n.a)(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):f(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function O(e){var t=e.split("?"),r=t[1],n=t[0];return r?n+"?"+r.split("&").map((function(e){return e.split("=")})).sort((function(e,t){return e[0].localeCompare(t[0])})).map((function(e){return e.join("=")})).join("&"):n}var b=r(16),d=r.n(b),j=r(45),y=r(31);function h(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function v(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?h(Object(r),!0).forEach((function(t){Object(n.a)(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):h(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var w=function(e){return e.json?e.json():Promise.reject(e)},g=function(e){return function(e){if(!e)return{};var t=e.match(/<([^>]+)>; rel="next"/);return t?{next:t[1]}:{}}(e.headers.get("link")).next},P=function(e){var t=e.path&&-1!==e.path.indexOf("per_page=-1"),r=e.url&&-1!==e.url.indexOf("per_page=-1");return t||r},m=function(){var e=Object(j.a)(d.a.mark((function e(t,r){var n,c,i,u,a,s;return d.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!1!==t.parse){e.next=2;break}return e.abrupt("return",r(t));case 2:if(P(t)){e.next=4;break}return e.abrupt("return",r(t));case 4:return e.next=6,I(v(v({},(f={per_page:100},void 0,void 0,l=(p=t).path,O=p.url,v(v({},Object(o.a)(p,["path","url"])),{},{url:O&&Object(y.addQueryArgs)(O,f),path:l&&Object(y.addQueryArgs)(l,f)}))),{},{parse:!1}));case 6:return n=e.sent,e.next=9,w(n);case 9:if(c=e.sent,Array.isArray(c)){e.next=12;break}return e.abrupt("return",c);case 12:if(i=g(n)){e.next=15;break}return e.abrupt("return",c);case 15:u=[].concat(c);case 16:if(!i){e.next=27;break}return e.next=19,I(v(v({},t),{},{path:void 0,url:i,parse:!1}));case 19:return a=e.sent,e.next=22,w(a);case 22:s=e.sent,u=u.concat(s),i=g(a),e.next=16;break;case 27:return e.abrupt("return",u);case 28:case"end":return e.stop()}var p,f,l,O}),e)})));return function(_x,t){return e.apply(this,arguments)}}();function x(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function D(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?x(Object(r),!0).forEach((function(t){Object(n.a)(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):x(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var S=new Set(["PATCH","PUT","DELETE"]),_=function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return t?204===e.status?null:e.json?e.json():Promise.reject(e):e},E=function(e){var t={code:"invalid_json",message:Object(c.__)("The response is not a valid JSON response.")};if(!e||!e.json)throw t;return e.json().catch((function(){throw t}))},k=function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return Promise.resolve(_(e,t)).catch((function(e){return T(e,t)}))};function T(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];if(!t)throw e;return E(e).then((function(e){var t={code:"unknown_error",message:Object(c.__)("An unknown error occurred.")};throw e||t}))}function A(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function M(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?A(Object(r),!0).forEach((function(t){Object(n.a)(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):A(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function C(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function N(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?C(Object(r),!0).forEach((function(t){Object(n.a)(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):C(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var Q={Accept:"application/json, */*;q=0.1"},R={credentials:"include"},L=[function(e,t){return"string"!=typeof e.url||Object(y.hasQueryArg)(e.url,"_locale")||(e.url=Object(y.addQueryArgs)(e.url,{_locale:"user"})),"string"!=typeof e.path||Object(y.hasQueryArg)(e.path,"_locale")||(e.path=Object(y.addQueryArgs)(e.path,{_locale:"user"})),t(e)},p,function(e,t){var r=e.method,n=void 0===r?"GET":r;return S.has(n.toUpperCase())&&(e=D(D({},e),{},{headers:D(D({},e.headers),{},{"X-HTTP-Method-Override":n,"Content-Type":"application/json"}),method:"POST"})),t(e)},m],U=function(e){if(e.status>=200&&e.status<300)return e;throw e},G=function(e){var t=e.url,r=e.path,n=e.data,i=e.parse,u=void 0===i||i,a=Object(o.a)(e,["url","path","data","parse"]),s=e.body,p=e.headers;return p=N(N({},Q),p),n&&(s=JSON.stringify(n),p["Content-Type"]="application/json"),window.fetch(t||r,N(N(N({},R),a),{},{body:s,headers:p})).then((function(e){return Promise.resolve(e).then(U).catch((function(e){return T(e,u)})).then((function(e){return k(e,u)}))}),(function(){throw{code:"fetch_error",message:Object(c.__)("You are probably offline.")}}))};function H(e){return L.reduceRight((function(e,t){return function(r){return t(r,e)}}),G)(e).catch((function(t){return"rest_cookie_invalid_nonce"!==t.code?Promise.reject(t):window.fetch(H.nonceEndpoint).then(U).then((function(e){return e.text()})).then((function(t){return H.nonceMiddleware.nonce=t,H(e)}))}))}H.use=function(e){L.unshift(e)},H.setFetchHandler=function(e){G=e},H.createNonceMiddleware=function(e){function t(e,r){var n=e.headers,o=void 0===n?{}:n;for(var c in o)if("x-wp-nonce"===c.toLowerCase()&&o[c]===t.nonce)return r(e);return r(u(u({},e),{},{headers:u(u({},o),{},{"X-WP-Nonce":t.nonce})}))}return t.nonce=e,t},H.createPreloadingMiddleware=function(e){var t=Object.keys(e).reduce((function(t,r){return t[O(r)]=e[r],t}),{});return function(e,r){var n=e.parse,o=void 0===n||n;if("string"==typeof e.path){var c=e.method||"GET",i=O(e.path);if("GET"===c&&t[i]){var u=t[i];return delete t[i],Promise.resolve(o?u.body:new window.Response(JSON.stringify(u.body),{status:200,statusText:"OK",headers:u.headers}))}if("OPTIONS"===c&&t[c]&&t[c][i])return Promise.resolve(t[c][i])}return r(e)}},H.createRootURLMiddleware=function(e){return function(t,r){return p(t,(function(t){var n,o=t.url,c=t.path;return"string"==typeof c&&(n=e,-1!==e.indexOf("?")&&(c=c.replace("?","&")),c=c.replace(/^\//,""),"string"==typeof n&&-1!==n.indexOf("?")&&(c=c.replace("?","&")),o=n+c),r(l(l({},t),{},{url:o}))}))}},H.fetchAllMiddleware=m,H.mediaUploadMiddleware=function(e,t){if(!(e.path&&-1!==e.path.indexOf("/wp/v2/media")||e.url&&-1!==e.url.indexOf("/wp/v2/media")))return t(e,t);var r=0;return t(M(M({},e),{},{parse:!1})).catch((function(n){var o=n.headers.get("x-wp-upload-attachment-id");return n.status>=500&&n.status<600&&o?function e(n){return r++,t({path:"/wp/v2/media/".concat(n,"/post-process"),method:"POST",data:{action:"create-image-subsizes"},parse:!1}).catch((function(){return r<5?e(n):(t({path:"/wp/v2/media/".concat(n,"?force=true"),method:"DELETE"}),Promise.reject())}))}(o).catch((function(){return!1!==e.parse?Promise.reject({code:"post_process",message:Object(c.__)("Media upload failed. If this is a photo or a large image, please scale it down and try again.")}):Promise.reject(n)})):T(n,e.parse)})).then((function(t){return k(t,e.parse)}))};var I=t.default=H}}).default;
build/autop/index.asset.php CHANGED
@@ -1 +1 @@
1
- <?php return array('dependencies' => array('wp-polyfill'), 'version' => '6ce27bb9b19fa037a9864cb301a7ea27');
1
+ <?php return array('dependencies' => array('wp-polyfill'), 'version' => '67b2fb628c85e1a7b06e196ed66d6b61');
build/autop/index.js CHANGED
@@ -1 +1 @@
1
- window.wp=window.wp||{},window.wp.autop=function(e){var r={};function n(t){if(r[t])return r[t].exports;var p=r[t]={i:t,l:!1,exports:{}};return e[t].call(p.exports,p,p.exports,n),p.l=!0,p.exports}return n.m=e,n.c=r,n.d=function(e,r,t){n.o(e,r)||Object.defineProperty(e,r,{enumerable:!0,get:t})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,r){if(1&r&&(e=n(e)),8&r)return e;if(4&r&&"object"==typeof e&&e&&e.__esModule)return e;var t=Object.create(null);if(n.r(t),Object.defineProperty(t,"default",{enumerable:!0,value:e}),2&r&&"string"!=typeof e)for(var p in e)n.d(t,p,function(r){return e[r]}.bind(null,p));return t},n.n=function(e){var r=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(r,"a",r),r},n.o=function(e,r){return Object.prototype.hasOwnProperty.call(e,r)},n.p="",n(n.s=364)}({25:function(e,r,n){"use strict";function t(e,r){(null==r||r>e.length)&&(r=e.length);for(var n=0,t=new Array(r);n<r;n++)t[n]=e[n];return t}n.d(r,"a",(function(){return t}))},30:function(e,r,n){"use strict";n.d(r,"a",(function(){return p}));var t=n(25);function p(e,r){if(e){if("string"==typeof e)return Object(t.a)(e,r);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Object(t.a)(e,r):void 0}}},364:function(e,r,n){"use strict";n.r(r),n.d(r,"autop",(function(){return a})),n.d(r,"removep",(function(){return o}));var t=n(9),p=new RegExp("(<((?=!--|!\\[CDATA\\[)((?=!-)!(?:-(?!->)[^\\-]*)*(?:--\x3e)?|!\\[CDATA\\[[^\\]]*(?:](?!]>)[^\\]]*)*?(?:]]>)?)|[^>]*>?))");function c(e,r){for(var n=function(e){for(var r,n=[],t=e;r=t.match(p);){var c=r.index;n.push(t.slice(0,c)),n.push(r[0]),t=t.slice(c+r[0].length)}return t.length&&n.push(t),n}(e),t=!1,c=Object.keys(r),a=1;a<n.length;a+=2)for(var o=0;o<c.length;o++){var i=c[o];if(-1!==n[a].indexOf(i)){n[a]=n[a].replace(new RegExp(i,"g"),r[i]),t=!0;break}}return t&&(e=n.join("")),e}function a(e){var r=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=[];if(""===e.trim())return"";if(-1!==(e+="\n").indexOf("<pre")){var p=e.split("</pre>"),a=p.pop();e="";for(var o=0;o<p.length;o++){var i=p[o],l=i.indexOf("<pre");if(-1!==l){var u="<pre wp-pre-tag-"+o+"></pre>";n.push([u,i.substr(l)+"</pre>"]),e+=i.substr(0,l)+u}else e+=i}e+=a}var s="(?:table|thead|tfoot|caption|col|colgroup|tbody|tr|td|th|div|dl|dd|dt|ul|ol|li|pre|form|map|area|blockquote|address|math|style|p|h[1-6]|hr|fieldset|legend|section|article|aside|hgroup|header|footer|nav|figure|figcaption|details|menu|summary)";-1!==(e=c(e=(e=(e=(e=e.replace(/<br\s*\/?>\s*<br\s*\/?>/g,"\n\n")).replace(new RegExp("(<"+s+"[\\s/>])","g"),"\n\n$1")).replace(new RegExp("(</"+s+">)","g"),"$1\n\n")).replace(/\r\n|\r/g,"\n"),{"\n":" \x3c!-- wpnl --\x3e "})).indexOf("<option")&&(e=(e=e.replace(/\s*<option/g,"<option")).replace(/<\/option>\s*/g,"</option>")),-1!==e.indexOf("</object>")&&(e=(e=(e=e.replace(/(<object[^>]*>)\s*/g,"$1")).replace(/\s*<\/object>/g,"</object>")).replace(/\s*(<\/?(?:param|embed)[^>]*>)\s*/g,"$1")),-1===e.indexOf("<source")&&-1===e.indexOf("<track")||(e=(e=(e=e.replace(/([<\[](?:audio|video)[^>\]]*[>\]])\s*/g,"$1")).replace(/\s*([<\[]\/(?:audio|video)[>\]])/g,"$1")).replace(/\s*(<(?:source|track)[^>]*>)\s*/g,"$1")),-1!==e.indexOf("<figcaption")&&(e=(e=e.replace(/\s*(<figcaption[^>]*>)/,"$1")).replace(/<\/figcaption>\s*/,"</figcaption>"));var f=(e=e.replace(/\n\n+/g,"\n\n")).split(/\n\s*\n/).filter(Boolean);return e="",f.forEach((function(r){e+="<p>"+r.replace(/^\n*|\n*$/g,"")+"</p>\n"})),e=(e=(e=(e=(e=(e=(e=(e=e.replace(/<p>\s*<\/p>/g,"")).replace(/<p>([^<]+)<\/(div|address|form)>/g,"<p>$1</p></$2>")).replace(new RegExp("<p>\\s*(</?"+s+"[^>]*>)\\s*</p>","g"),"$1")).replace(/<p>(<li.+?)<\/p>/g,"$1")).replace(/<p><blockquote([^>]*)>/gi,"<blockquote$1><p>")).replace(/<\/blockquote><\/p>/g,"</p></blockquote>")).replace(new RegExp("<p>\\s*(</?"+s+"[^>]*>)","g"),"$1")).replace(new RegExp("(</?"+s+"[^>]*>)\\s*</p>","g"),"$1"),r&&(e=(e=(e=(e=e.replace(/<(script|style).*?<\/\\1>/g,(function(e){return e[0].replace(/\n/g,"<WPPreserveNewline />")}))).replace(/<br>|<br\/>/g,"<br />")).replace(/(<br \/>)?\s*\n/g,(function(e,r){return r?e:"<br />\n"}))).replace(/<WPPreserveNewline \/>/g,"\n")),e=(e=(e=e.replace(new RegExp("(</?"+s+"[^>]*>)\\s*<br />","g"),"$1")).replace(/<br \/>(\s*<\/?(?:p|li|div|dl|dd|dt|th|pre|td|ul|ol)[^>]*>)/g,"$1")).replace(/\n<\/p>$/g,"</p>"),n.forEach((function(r){var n=Object(t.a)(r,2),p=n[0],c=n[1];e=e.replace(p,c)})),-1!==e.indexOf("\x3c!-- wpnl --\x3e")&&(e=e.replace(/\s?<!-- wpnl -->\s?/g,"\n")),e}function o(e){var r="blockquote|ul|ol|li|dl|dt|dd|table|thead|tbody|tfoot|tr|th|td|h[1-6]|fieldset|figure",n=r+"|div|p",t=r+"|pre",p=[],c=!1,a=!1;return e?(-1===e.indexOf("<script")&&-1===e.indexOf("<style")||(e=e.replace(/<(script|style)[^>]*>[\s\S]*?<\/\1>/g,(function(e){return p.push(e),"<wp-preserve>"}))),-1!==e.indexOf("<pre")&&(c=!0,e=e.replace(/<pre[^>]*>[\s\S]+?<\/pre>/g,(function(e){return(e=(e=e.replace(/<br ?\/?>(\r\n|\n)?/g,"<wp-line-break>")).replace(/<\/?p( [^>]*)?>(\r\n|\n)?/g,"<wp-line-break>")).replace(/\r?\n/g,"<wp-line-break>")}))),-1!==e.indexOf("[caption")&&(a=!0,e=e.replace(/\[caption[\s\S]+?\[\/caption\]/g,(function(e){return e.replace(/<br([^>]*)>/g,"<wp-temp-br$1>").replace(/[\r\n\t]+/,"")}))),-1!==(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=e.replace(new RegExp("\\s*</("+n+")>\\s*","g"),"</$1>\n")).replace(new RegExp("\\s*<((?:"+n+")(?: [^>]*)?)>","g"),"\n<$1>")).replace(/(<p [^>]+>[\s\S]*?)<\/p>/g,"$1</p#>")).replace(/<div( [^>]*)?>\s*<p>/gi,"<div$1>\n\n")).replace(/\s*<p>/gi,"")).replace(/\s*<\/p>\s*/gi,"\n\n")).replace(/\n[\s\u00a0]+\n/g,"\n\n")).replace(/(\s*)<br ?\/?>\s*/gi,(function(e,r){return r&&-1!==r.indexOf("\n")?"\n\n":"\n"}))).replace(/\s*<div/g,"\n<div")).replace(/<\/div>\s*/g,"</div>\n")).replace(/\s*\[caption([^\[]+)\[\/caption\]\s*/gi,"\n\n[caption$1[/caption]\n\n")).replace(/caption\]\n\n+\[caption/g,"caption]\n\n[caption")).replace(new RegExp("\\s*<((?:"+t+")(?: [^>]*)?)\\s*>","g"),"\n<$1>")).replace(new RegExp("\\s*</("+t+")>\\s*","g"),"</$1>\n")).replace(/<((li|dt|dd)[^>]*)>/g," \t<$1>")).indexOf("<option")&&(e=(e=e.replace(/\s*<option/g,"\n<option")).replace(/\s*<\/select>/g,"\n</select>")),-1!==e.indexOf("<hr")&&(e=e.replace(/\s*<hr( [^>]*)?>\s*/g,"\n\n<hr$1>\n\n")),-1!==e.indexOf("<object")&&(e=e.replace(/<object[\s\S]+?<\/object>/g,(function(e){return e.replace(/[\r\n]+/g,"")}))),e=(e=(e=(e=e.replace(/<\/p#>/g,"</p>\n")).replace(/\s*(<p [^>]+>[\s\S]*?<\/p>)/g,"\n$1")).replace(/^\s+/,"")).replace(/[\s\u00a0]+$/,""),c&&(e=e.replace(/<wp-line-break>/g,"\n")),a&&(e=e.replace(/<wp-temp-br([^>]*)>/g,"<br$1>")),p.length&&(e=e.replace(/<wp-preserve>/g,(function(){return p.shift()}))),e):""}},41:function(e,r,n){"use strict";function t(e){if(Array.isArray(e))return e}n.d(r,"a",(function(){return t}))},42:function(e,r,n){"use strict";function t(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}n.d(r,"a",(function(){return t}))},9:function(e,r,n){"use strict";n.d(r,"a",(function(){return a}));var t=n(41),p=n(30),c=n(42);function a(e,r){return Object(t.a)(e)||function(e,r){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e)){var n=[],_n=!0,t=!1,p=void 0;try{for(var c,a=e[Symbol.iterator]();!(_n=(c=a.next()).done)&&(n.push(c.value),!r||n.length!==r);_n=!0);}catch(e){t=!0,p=e}finally{try{_n||null==a.return||a.return()}finally{if(t)throw p}}return n}}(e,r)||Object(p.a)(e,r)||Object(c.a)()}}});
1
+ window.wp=window.wp||{},window.wp.autop=function(e){var r={};function n(t){if(r[t])return r[t].exports;var p=r[t]={i:t,l:!1,exports:{}};return e[t].call(p.exports,p,p.exports,n),p.l=!0,p.exports}return n.m=e,n.c=r,n.d=function(e,r,t){n.o(e,r)||Object.defineProperty(e,r,{enumerable:!0,get:t})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,r){if(1&r&&(e=n(e)),8&r)return e;if(4&r&&"object"==typeof e&&e&&e.__esModule)return e;var t=Object.create(null);if(n.r(t),Object.defineProperty(t,"default",{enumerable:!0,value:e}),2&r&&"string"!=typeof e)for(var p in e)n.d(t,p,function(r){return e[r]}.bind(null,p));return t},n.n=function(e){var r=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(r,"a",r),r},n.o=function(e,r){return Object.prototype.hasOwnProperty.call(e,r)},n.p="",n(n.s=382)}({24:function(e,r,n){"use strict";function t(e,r){(null==r||r>e.length)&&(r=e.length);for(var n=0,t=new Array(r);n<r;n++)t[n]=e[n];return t}n.d(r,"a",(function(){return t}))},30:function(e,r,n){"use strict";n.d(r,"a",(function(){return p}));var t=n(24);function p(e,r){if(e){if("string"==typeof e)return Object(t.a)(e,r);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Object(t.a)(e,r):void 0}}},382:function(e,r,n){"use strict";n.r(r),n.d(r,"autop",(function(){return a})),n.d(r,"removep",(function(){return o}));var t=n(8),p=new RegExp("(<((?=!--|!\\[CDATA\\[)((?=!-)!(?:-(?!->)[^\\-]*)*(?:--\x3e)?|!\\[CDATA\\[[^\\]]*(?:](?!]>)[^\\]]*)*?(?:]]>)?)|[^>]*>?))");function c(e,r){for(var n=function(e){for(var r,n=[],t=e;r=t.match(p);){var c=r.index;n.push(t.slice(0,c)),n.push(r[0]),t=t.slice(c+r[0].length)}return t.length&&n.push(t),n}(e),t=!1,c=Object.keys(r),a=1;a<n.length;a+=2)for(var o=0;o<c.length;o++){var i=c[o];if(-1!==n[a].indexOf(i)){n[a]=n[a].replace(new RegExp(i,"g"),r[i]),t=!0;break}}return t&&(e=n.join("")),e}function a(e){var r=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=[];if(""===e.trim())return"";if(-1!==(e+="\n").indexOf("<pre")){var p=e.split("</pre>"),a=p.pop();e="";for(var o=0;o<p.length;o++){var i=p[o],l=i.indexOf("<pre");if(-1!==l){var u="<pre wp-pre-tag-"+o+"></pre>";n.push([u,i.substr(l)+"</pre>"]),e+=i.substr(0,l)+u}else e+=i}e+=a}var s="(?:table|thead|tfoot|caption|col|colgroup|tbody|tr|td|th|div|dl|dd|dt|ul|ol|li|pre|form|map|area|blockquote|address|math|style|p|h[1-6]|hr|fieldset|legend|section|article|aside|hgroup|header|footer|nav|figure|figcaption|details|menu|summary)";-1!==(e=c(e=(e=(e=(e=e.replace(/<br\s*\/?>\s*<br\s*\/?>/g,"\n\n")).replace(new RegExp("(<"+s+"[\\s/>])","g"),"\n\n$1")).replace(new RegExp("(</"+s+">)","g"),"$1\n\n")).replace(/\r\n|\r/g,"\n"),{"\n":" \x3c!-- wpnl --\x3e "})).indexOf("<option")&&(e=(e=e.replace(/\s*<option/g,"<option")).replace(/<\/option>\s*/g,"</option>")),-1!==e.indexOf("</object>")&&(e=(e=(e=e.replace(/(<object[^>]*>)\s*/g,"$1")).replace(/\s*<\/object>/g,"</object>")).replace(/\s*(<\/?(?:param|embed)[^>]*>)\s*/g,"$1")),-1===e.indexOf("<source")&&-1===e.indexOf("<track")||(e=(e=(e=e.replace(/([<\[](?:audio|video)[^>\]]*[>\]])\s*/g,"$1")).replace(/\s*([<\[]\/(?:audio|video)[>\]])/g,"$1")).replace(/\s*(<(?:source|track)[^>]*>)\s*/g,"$1")),-1!==e.indexOf("<figcaption")&&(e=(e=e.replace(/\s*(<figcaption[^>]*>)/,"$1")).replace(/<\/figcaption>\s*/,"</figcaption>"));var f=(e=e.replace(/\n\n+/g,"\n\n")).split(/\n\s*\n/).filter(Boolean);return e="",f.forEach((function(r){e+="<p>"+r.replace(/^\n*|\n*$/g,"")+"</p>\n"})),e=(e=(e=(e=(e=(e=(e=(e=e.replace(/<p>\s*<\/p>/g,"")).replace(/<p>([^<]+)<\/(div|address|form)>/g,"<p>$1</p></$2>")).replace(new RegExp("<p>\\s*(</?"+s+"[^>]*>)\\s*</p>","g"),"$1")).replace(/<p>(<li.+?)<\/p>/g,"$1")).replace(/<p><blockquote([^>]*)>/gi,"<blockquote$1><p>")).replace(/<\/blockquote><\/p>/g,"</p></blockquote>")).replace(new RegExp("<p>\\s*(</?"+s+"[^>]*>)","g"),"$1")).replace(new RegExp("(</?"+s+"[^>]*>)\\s*</p>","g"),"$1"),r&&(e=(e=(e=(e=e.replace(/<(script|style).*?<\/\\1>/g,(function(e){return e[0].replace(/\n/g,"<WPPreserveNewline />")}))).replace(/<br>|<br\/>/g,"<br />")).replace(/(<br \/>)?\s*\n/g,(function(e,r){return r?e:"<br />\n"}))).replace(/<WPPreserveNewline \/>/g,"\n")),e=(e=(e=e.replace(new RegExp("(</?"+s+"[^>]*>)\\s*<br />","g"),"$1")).replace(/<br \/>(\s*<\/?(?:p|li|div|dl|dd|dt|th|pre|td|ul|ol)[^>]*>)/g,"$1")).replace(/\n<\/p>$/g,"</p>"),n.forEach((function(r){var n=Object(t.a)(r,2),p=n[0],c=n[1];e=e.replace(p,c)})),-1!==e.indexOf("\x3c!-- wpnl --\x3e")&&(e=e.replace(/\s?<!-- wpnl -->\s?/g,"\n")),e}function o(e){var r="blockquote|ul|ol|li|dl|dt|dd|table|thead|tbody|tfoot|tr|th|td|h[1-6]|fieldset|figure",n=r+"|div|p",t=r+"|pre",p=[],c=!1,a=!1;return e?(-1===e.indexOf("<script")&&-1===e.indexOf("<style")||(e=e.replace(/<(script|style)[^>]*>[\s\S]*?<\/\1>/g,(function(e){return p.push(e),"<wp-preserve>"}))),-1!==e.indexOf("<pre")&&(c=!0,e=e.replace(/<pre[^>]*>[\s\S]+?<\/pre>/g,(function(e){return(e=(e=e.replace(/<br ?\/?>(\r\n|\n)?/g,"<wp-line-break>")).replace(/<\/?p( [^>]*)?>(\r\n|\n)?/g,"<wp-line-break>")).replace(/\r?\n/g,"<wp-line-break>")}))),-1!==e.indexOf("[caption")&&(a=!0,e=e.replace(/\[caption[\s\S]+?\[\/caption\]/g,(function(e){return e.replace(/<br([^>]*)>/g,"<wp-temp-br$1>").replace(/[\r\n\t]+/,"")}))),-1!==(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=e.replace(new RegExp("\\s*</("+n+")>\\s*","g"),"</$1>\n")).replace(new RegExp("\\s*<((?:"+n+")(?: [^>]*)?)>","g"),"\n<$1>")).replace(/(<p [^>]+>[\s\S]*?)<\/p>/g,"$1</p#>")).replace(/<div( [^>]*)?>\s*<p>/gi,"<div$1>\n\n")).replace(/\s*<p>/gi,"")).replace(/\s*<\/p>\s*/gi,"\n\n")).replace(/\n[\s\u00a0]+\n/g,"\n\n")).replace(/(\s*)<br ?\/?>\s*/gi,(function(e,r){return r&&-1!==r.indexOf("\n")?"\n\n":"\n"}))).replace(/\s*<div/g,"\n<div")).replace(/<\/div>\s*/g,"</div>\n")).replace(/\s*\[caption([^\[]+)\[\/caption\]\s*/gi,"\n\n[caption$1[/caption]\n\n")).replace(/caption\]\n\n+\[caption/g,"caption]\n\n[caption")).replace(new RegExp("\\s*<((?:"+t+")(?: [^>]*)?)\\s*>","g"),"\n<$1>")).replace(new RegExp("\\s*</("+t+")>\\s*","g"),"</$1>\n")).replace(/<((li|dt|dd)[^>]*)>/g," \t<$1>")).indexOf("<option")&&(e=(e=e.replace(/\s*<option/g,"\n<option")).replace(/\s*<\/select>/g,"\n</select>")),-1!==e.indexOf("<hr")&&(e=e.replace(/\s*<hr( [^>]*)?>\s*/g,"\n\n<hr$1>\n\n")),-1!==e.indexOf("<object")&&(e=e.replace(/<object[\s\S]+?<\/object>/g,(function(e){return e.replace(/[\r\n]+/g,"")}))),e=(e=(e=(e=e.replace(/<\/p#>/g,"</p>\n")).replace(/\s*(<p [^>]+>[\s\S]*?<\/p>)/g,"\n$1")).replace(/^\s+/,"")).replace(/[\s\u00a0]+$/,""),c&&(e=e.replace(/<wp-line-break>/g,"\n")),a&&(e=e.replace(/<wp-temp-br([^>]*)>/g,"<br$1>")),p.length&&(e=e.replace(/<wp-preserve>/g,(function(){return p.shift()}))),e):""}},39:function(e,r,n){"use strict";function t(e){if(Array.isArray(e))return e}n.d(r,"a",(function(){return t}))},40:function(e,r,n){"use strict";function t(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}n.d(r,"a",(function(){return t}))},8:function(e,r,n){"use strict";n.d(r,"a",(function(){return a}));var t=n(39),p=n(30),c=n(40);function a(e,r){return Object(t.a)(e)||function(e,r){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e)){var n=[],_n=!0,t=!1,p=void 0;try{for(var c,a=e[Symbol.iterator]();!(_n=(c=a.next()).done)&&(n.push(c.value),!r||n.length!==r);_n=!0);}catch(e){t=!0,p=e}finally{try{_n||null==a.return||a.return()}finally{if(t)throw p}}return n}}(e,r)||Object(p.a)(e,r)||Object(c.a)()}}});
build/blob/index.asset.php CHANGED
@@ -1 +1 @@
1
- <?php return array('dependencies' => array('wp-polyfill'), 'version' => '5db42b6aa8ad20a568d55d969c0fb323');
1
+ <?php return array('dependencies' => array('wp-polyfill'), 'version' => 'ad2fe2d0f23607a4e73743880388eab7');
build/blob/index.js CHANGED
@@ -1 +1 @@
1
- window.wp=window.wp||{},window.wp.blob=function(e){var n={};function t(r){if(n[r])return n[r].exports;var o=n[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,t),o.l=!0,o.exports}return t.m=e,t.c=n,t.d=function(e,n,r){t.o(e,n)||Object.defineProperty(e,n,{enumerable:!0,get:r})},t.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},t.t=function(e,n){if(1&n&&(e=t(e)),8&n)return e;if(4&n&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(t.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&n&&"string"!=typeof e)for(var o in e)t.d(r,o,function(n){return e[n]}.bind(null,o));return r},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,n){return Object.prototype.hasOwnProperty.call(e,n)},t.p="",t(t.s=365)}({365:function(e,n,t){"use strict";t.r(n),t.d(n,"createBlobURL",(function(){return f})),t.d(n,"getBlobByURL",(function(){return c})),t.d(n,"getBlobTypeByURL",(function(){return l})),t.d(n,"revokeBlobURL",(function(){return d})),t.d(n,"isBlobURL",(function(){return a}));var r=window.URL,o=r.createObjectURL,u=r.revokeObjectURL,i={};function f(e){var n=o(e);return i[n]=e,n}function c(e){return i[e]}function l(e){var n;return null===(n=c(e))||void 0===n?void 0:n.type.split("/")[0]}function d(e){i[e]&&u(e),delete i[e]}function a(e){return!(!e||!e.indexOf)&&0===e.indexOf("blob:")}}});
1
+ window.wp=window.wp||{},window.wp.blob=function(e){var n={};function t(r){if(n[r])return n[r].exports;var o=n[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,t),o.l=!0,o.exports}return t.m=e,t.c=n,t.d=function(e,n,r){t.o(e,n)||Object.defineProperty(e,n,{enumerable:!0,get:r})},t.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},t.t=function(e,n){if(1&n&&(e=t(e)),8&n)return e;if(4&n&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(t.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&n&&"string"!=typeof e)for(var o in e)t.d(r,o,function(n){return e[n]}.bind(null,o));return r},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,n){return Object.prototype.hasOwnProperty.call(e,n)},t.p="",t(t.s=383)}({383:function(e,n,t){"use strict";t.r(n),t.d(n,"createBlobURL",(function(){return f})),t.d(n,"getBlobByURL",(function(){return c})),t.d(n,"getBlobTypeByURL",(function(){return l})),t.d(n,"revokeBlobURL",(function(){return d})),t.d(n,"isBlobURL",(function(){return a}));var r=window.URL,o=r.createObjectURL,u=r.revokeObjectURL,i={};function f(e){var n=o(e);return i[n]=e,n}function c(e){return i[e]}function l(e){var n;return null===(n=c(e))||void 0===n?void 0:n.type.split("/")[0]}function d(e){i[e]&&u(e),delete i[e]}function a(e){return!(!e||!e.indexOf)&&0===e.indexOf("blob:")}}});
build/block-directory/index.asset.php CHANGED
@@ -1 +1 @@
1
- <?php return array('dependencies' => array('lodash', 'wp-a11y', 'wp-api-fetch', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-core-data', 'wp-data', 'wp-data-controls', 'wp-edit-post', 'wp-editor', 'wp-element', 'wp-hooks', 'wp-html-entities', 'wp-i18n', 'wp-notices', 'wp-plugins', 'wp-polyfill', 'wp-primitives'), 'version' => 'bba5f74dc860c9e3dac9e256afd1ed87');
1
+ <?php return array('dependencies' => array('lodash', 'wp-a11y', 'wp-api-fetch', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-core-data', 'wp-data', 'wp-data-controls', 'wp-edit-post', 'wp-editor', 'wp-element', 'wp-hooks', 'wp-html-entities', 'wp-i18n', 'wp-notices', 'wp-plugins', 'wp-polyfill', 'wp-primitives'), 'version' => '059a5072a0407908ce3be18b4c043182');
build/block-directory/index.js CHANGED
@@ -1,21 +1,21 @@
1
- window.wp=window.wp||{},window.wp.blockDirectory=function(e){var t={};function n(r){if(t[r])return t[r].exports;var c=t[r]={i:r,l:!1,exports:{}};return e[r].call(c.exports,c,c.exports,n),c.l=!0,c.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var c in e)n.d(r,c,function(t){return e[t]}.bind(null,c));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=509)}({0:function(e,t){e.exports=window.wp.element},1:function(e,t){e.exports=window.wp.i18n},10:function(e,t,n){"use strict";function r(){return(r=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}n.d(t,"a",(function(){return r}))},11:function(e,t){e.exports=window.wp.blocks},13:function(e,t,n){"use strict";n.d(t,"a",(function(){return c}));var r=n(48);function c(e,t){if(null==e)return{};var n,c,o=Object(r.a)(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(c=0;c<a.length;c++)n=a[c],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}},14:function(e,t){e.exports=window.wp.compose},145:function(e,t,n){"use strict";var r=n(5),c=n(13),o=n(0);function a(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}t.a=function(e){var t=e.icon,n=e.size,i=void 0===n?24:n,l=Object(c.a)(e,["icon","size"]);return Object(o.cloneElement)(t,function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?a(Object(n),!0).forEach((function(t){Object(r.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):a(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({width:i,height:i},l))}},15:function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var r=n(25),c=n(40),o=n(30);function a(e){return function(e){if(Array.isArray(e))return Object(r.a)(e)}(e)||Object(c.a)(e)||Object(o.a)(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}},16:function(e,t){e.exports=window.regeneratorRuntime},179:function(e,t,n){"use strict";var r=n(0),c=n(7),o=Object(r.createElement)(c.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(r.createElement)(c.Path,{d:"M19 8h-1V6h-5v2h-2V6H6v2H5c-1.1 0-2 .9-2 2v8c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2v-8c0-1.1-.9-2-2-2zm.5 10c0 .3-.2.5-.5.5H5c-.3 0-.5-.2-.5-.5v-8c0-.3.2-.5.5-.5h14c.3 0 .5.2.5.5v8z"}));t.a=o},2:function(e,t){e.exports=window.lodash},204:function(e,t,n){"use strict";var r=n(0),c=n(7),o=Object(r.createElement)(c.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(r.createElement)(c.Path,{d:"M11.776 4.454a.25.25 0 01.448 0l2.069 4.192a.25.25 0 00.188.137l4.626.672a.25.25 0 01.139.426l-3.348 3.263a.25.25 0 00-.072.222l.79 4.607a.25.25 0 01-.362.263l-4.138-2.175a.25.25 0 00-.232 0l-4.138 2.175a.25.25 0 01-.363-.263l.79-4.607a.25.25 0 00-.071-.222L4.754 9.881a.25.25 0 01.139-.426l4.626-.672a.25.25 0 00.188-.137l2.069-4.192z"}));t.a=o},205:function(e,t,n){"use strict";var r=n(0),c=n(7),o=Object(r.createElement)(c.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(r.createElement)(c.Path,{fillRule:"evenodd",d:"M9.706 8.646a.25.25 0 01-.188.137l-4.626.672a.25.25 0 00-.139.427l3.348 3.262a.25.25 0 01.072.222l-.79 4.607a.25.25 0 00.362.264l4.138-2.176a.25.25 0 01.233 0l4.137 2.175a.25.25 0 00.363-.263l-.79-4.607a.25.25 0 01.072-.222l3.347-3.262a.25.25 0 00-.139-.427l-4.626-.672a.25.25 0 01-.188-.137l-2.069-4.192a.25.25 0 00-.448 0L9.706 8.646zM12 7.39l-.948 1.921a1.75 1.75 0 01-1.317.957l-2.12.308 1.534 1.495c.412.402.6.982.503 1.55l-.362 2.11 1.896-.997a1.75 1.75 0 011.629 0l1.895.997-.362-2.11a1.75 1.75 0 01.504-1.55l1.533-1.495-2.12-.308a1.75 1.75 0 01-1.317-.957L12 7.39z",clipRule:"evenodd"}));t.a=o},25:function(e,t,n){"use strict";function r(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}n.d(t,"a",(function(){return r}))},3:function(e,t){e.exports=window.wp.components},30:function(e,t,n){"use strict";n.d(t,"a",(function(){return c}));var r=n(25);function c(e,t){if(e){if("string"==typeof e)return Object(r.a)(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Object(r.a)(e,t):void 0}}},326:function(e,t){e.exports=window.wp.editPost},34:function(e,t){e.exports=window.wp.hooks},36:function(e,t){e.exports=window.wp.editor},366:function(e,t,n){"use strict";var r=n(0),c=n(7),o=Object(r.createElement)(c.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"-2 -2 24 24"},Object(r.createElement)(c.Path,{d:"M10.2 3.28c3.53 0 6.43 2.61 6.92 6h2.08l-3.5 4-3.5-4h2.32c-.45-1.97-2.21-3.45-4.32-3.45-1.45 0-2.73.71-3.54 1.78L4.95 5.66C6.23 4.2 8.11 3.28 10.2 3.28zm-.4 13.44c-3.52 0-6.43-2.61-6.92-6H.8l3.5-4c1.17 1.33 2.33 2.67 3.5 4H5.48c.45 1.97 2.21 3.45 4.32 3.45 1.45 0 2.73-.71 3.54-1.78l1.71 1.95c-1.28 1.46-3.15 2.38-5.25 2.38z"}));t.a=o},39:function(e,t){e.exports=window.wp.coreData},4:function(e,t){e.exports=window.wp.data},40:function(e,t,n){"use strict";function r(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}n.d(t,"a",(function(){return r}))},41:function(e,t,n){"use strict";function r(e){if(Array.isArray(e))return e}n.d(t,"a",(function(){return r}))},42:function(e,t,n){"use strict";function r(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}n.d(t,"a",(function(){return r}))},46:function(e,t,n){"use strict";function r(e,t,n,r,c,o,a){try{var i=e[o](a),l=i.value}catch(e){return void n(e)}i.done?t(l):Promise.resolve(l).then(r,c)}function c(e){return function(){var t=this,n=arguments;return new Promise((function(c,o){var a=e.apply(t,n);function i(e){r(a,c,o,i,l,"next",e)}function l(e){r(a,c,o,i,l,"throw",e)}i(void 0)}))}}n.d(t,"a",(function(){return c}))},47:function(e,t){e.exports=window.wp.apiFetch},48:function(e,t,n){"use strict";function r(e,t){if(null==e)return{};var n,r,c={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(c[n]=e[n]);return c}n.d(t,"a",(function(){return r}))},5:function(e,t,n){"use strict";function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}n.d(t,"a",(function(){return r}))},509:function(e,t,n){"use strict";n.r(t),n.d(t,"store",(function(){return ce}));var r={};n.r(r),n.d(r,"isRequestingDownloadableBlocks",(function(){return k})),n.d(r,"getDownloadableBlocks",(function(){return w})),n.d(r,"getInstalledBlockTypes",(function(){return g})),n.d(r,"getNewBlockTypes",(function(){return h})),n.d(r,"getUnusedBlockTypes",(function(){return E})),n.d(r,"isInstalling",(function(){return _})),n.d(r,"getErrorNotices",(function(){return B})),n.d(r,"getErrorNoticeForBlock",(function(){return x}));var c={};n.r(c),n.d(c,"fetchDownloadableBlocks",(function(){return W})),n.d(c,"receiveDownloadableBlocks",(function(){return Y})),n.d(c,"installBlockType",(function(){return $})),n.d(c,"uninstallBlockType",(function(){return G})),n.d(c,"addInstalledBlockType",(function(){return q})),n.d(c,"removeInstalledBlockType",(function(){return J})),n.d(c,"setIsInstalling",(function(){return Q})),n.d(c,"setErrorNotice",(function(){return X})),n.d(c,"clearErrorNotice",(function(){return Z}));var o=n(0),a=n(65),i=n(34),l=n(11),s=n(4),u=n(36),b=n(5),d=n(55),f=n(15),p=n(2);function O(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function m(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?O(Object(n),!0).forEach((function(t){Object(b.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):O(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var j=Object(s.combineReducers)({downloadableBlocks:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"FETCH_DOWNLOADABLE_BLOCKS":return m(m({},e),{},Object(b.a)({},t.filterValue,{isRequesting:!0}));case"RECEIVE_DOWNLOADABLE_BLOCKS":return m(m({},e),{},Object(b.a)({},t.filterValue,{results:t.downloadableBlocks,isRequesting:!1}))}return e},blockManagement:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{installedBlockTypes:[],isInstalling:{}},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"ADD_INSTALLED_BLOCK_TYPE":return m(m({},e),{},{installedBlockTypes:[].concat(Object(f.a)(e.installedBlockTypes),[t.item])});case"REMOVE_INSTALLED_BLOCK_TYPE":return m(m({},e),{},{installedBlockTypes:e.installedBlockTypes.filter((function(e){return e.name!==t.item.name}))});case"SET_INSTALLING_BLOCK":return m(m({},e),{},{isInstalling:m(m({},e.isInstalling),{},Object(b.a)({},t.blockId,t.isInstalling))})}return e},errorNotices:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"SET_ERROR_NOTICE":return m(m({},e),{},Object(b.a)({},t.blockId,{message:t.message,isFatal:t.isFatal}));case"CLEAR_ERROR_NOTICE":return Object(p.omit)(e,t.blockId)}return e}}),y=n(6);function v(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];if(!t.length)return!1;if(t.some((function(t){return t.name===e.name})))return!0;for(var n=0;n<t.length;n++)if(v(e,t[n].innerBlocks))return!0;return!1}function k(e,t){return!(!e.downloadableBlocks[t]||!e.downloadableBlocks[t].isRequesting)&&e.downloadableBlocks[t].isRequesting}function w(e,t){return e.downloadableBlocks[t]&&e.downloadableBlocks[t].results?e.downloadableBlocks[t].results:[]}function g(e){return e.blockManagement.installedBlockTypes}var h=Object(s.createRegistrySelector)((function(e){return function(t){var n=e(y.store).getBlocks();return g(t).filter((function(e){return v(e,n)}))}})),E=Object(s.createRegistrySelector)((function(e){return function(t){var n=e(y.store).getBlocks();return g(t).filter((function(e){return!v(e,n)}))}}));function _(e,t){return e.blockManagement.isInstalling[t]||!1}function B(e){return e.errorNotices}function x(e,t){return e.errorNotices[t]}var S=n(16),P=n.n(S),N=n(1),T=n(51),I=n(46),L=n(47),C=n.n(L);function D(e,t){var n;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return A(e,void 0);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?A(e,void 0):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,c=function(){};return{s:c,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:c}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,i=!1;return{s:function(){n=e[Symbol.iterator]()},n:function(){var e=n.next();return a=e.done,e},e:function(e){i=!0,o=e},f:function(){try{a||null==n.return||n.return()}finally{if(i)throw o}}}}function A(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var R=function(e){return new Promise((function(t,n){var r=document.createElement(e.nodeName);["id","rel","src","href","type"].forEach((function(t){e[t]&&(r[t]=e[t])})),e.innerHTML&&r.appendChild(document.createTextNode(e.innerHTML)),r.onload=function(){return t(!0)},r.onerror=function(){return n(new Error("Error loading asset."))},document.body.appendChild(r),("link"===r.nodeName.toLowerCase()||"script"===r.nodeName.toLowerCase()&&!r.src)&&t()}))};function M(e){return{type:"LOAD_ASSETS",assets:e}}var F={LOAD_ASSETS:function(){return Object(I.a)(P.a.mark((function e(){var t,n,r,c,o,a,i;return P.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,C()({url:document.location.href,parse:!1});case 2:return t=e.sent,e.next=5,t.text();case 5:n=e.sent,r=(new window.DOMParser).parseFromString(n,"text/html"),c=Array.from(r.querySelectorAll('link[rel="stylesheet"],script')).filter((function(e){return e.id&&!document.getElementById(e.id)})),o=D(c),e.prev=9,o.s();case 11:if((a=o.n()).done){e.next=17;break}return i=a.value,e.next=15,R(i);case 15:e.next=11;break;case 17:e.next=22;break;case 19:e.prev=19,e.t0=e.catch(9),o.e(e.t0);case 22:return e.prev=22,o.f(),e.finish(22);case 25:case"end":return e.stop()}}),e,null,[[9,19,22,25]])})))()}};function V(e){if(!e)return!1;var t=e.links["wp:plugin"]||e.links.self;return!(!t||!t.length)&&t[0].href}var z=P.a.mark($),H=P.a.mark(G);function U(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function K(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?U(Object(n),!0).forEach((function(t){Object(b.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):U(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function W(e){return{type:"FETCH_DOWNLOADABLE_BLOCKS",filterValue:e}}function Y(e,t){return{type:"RECEIVE_DOWNLOADABLE_BLOCKS",downloadableBlocks:e,filterValue:t}}function $(e){var t,n,r,c,o,a,i,u,b;return P.a.wrap((function(f){for(;;)switch(f.prev=f.next){case 0:return t=e.id,n=e.assets,r=!1,f.next=4,Z(t);case 4:return f.prev=4,f.next=7,Q(e.id,!0);case 7:if(c=V(e),o={},!c){f.next=14;break}return f.next=12,Object(d.apiFetch)({url:c,data:{status:"active"},method:"PUT"});case 12:f.next=18;break;case 14:return f.next=16,Object(d.apiFetch)({path:"wp/v2/plugins",data:{slug:e.id,status:"active"},method:"POST"});case 16:a=f.sent,o=a._links;case 18:return f.next=20,q(K(K({},e),{},{links:K(K({},e.links),o)}));case 20:return f.next=22,M(n);case 22:return f.next=24,s.controls.select(l.store.name,"getBlockTypes");case 24:if(f.sent.some((function(t){return t.name===e.name}))){f.next=27;break}throw new Error(Object(N.__)("Error registering block. Try reloading the page."));case 27:r=!0,f.next=38;break;case 30:return f.prev=30,f.t0=f.catch(4),i=f.t0.message||Object(N.__)("An error occurred."),u=f.t0 instanceof Error,(b={folder_exists:Object(N.__)("This block is already installed. Try reloading the page."),unable_to_connect_to_filesystem:Object(N.__)("Error installing block. You can reload the page and try again.")})[f.t0.code]&&(u=!0,i=b[f.t0.code]),f.next=38,X(t,i,u);case 38:return f.next=40,Q(e.id,!1);case 40:return f.abrupt("return",r);case 41:case"end":return f.stop()}}),z,null,[[4,30]])}function G(e){return P.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,Object(d.apiFetch)({url:V(e),data:{status:"inactive"},method:"PUT"});case 3:return t.next=5,Object(d.apiFetch)({url:V(e),method:"DELETE"});case 5:return t.next=7,J(e);case 7:t.next=13;break;case 9:return t.prev=9,t.t0=t.catch(0),t.next=13,s.controls.dispatch(T.store,"createErrorNotice",t.t0.message||Object(N.__)("An error occurred."));case 13:case"end":return t.stop()}}),H,null,[[0,9]])}function q(e){return{type:"ADD_INSTALLED_BLOCK_TYPE",item:e}}function J(e){return{type:"REMOVE_INSTALLED_BLOCK_TYPE",item:e}}function Q(e,t){return{type:"SET_INSTALLING_BLOCK",blockId:e,isInstalling:t}}function X(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return{type:"SET_ERROR_NOTICE",blockId:e,message:t,isFatal:n}}function Z(e){return{type:"CLEAR_ERROR_NOTICE",blockId:e}}var ee={getDownloadableBlocks:P.a.mark((function e(t){var n,r;return P.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t){e.next=2;break}return e.abrupt("return");case 2:return e.prev=2,e.next=5,W(t);case 5:return e.next=7,Object(d.apiFetch)({path:"wp/v2/block-directory/search?term=".concat(t)});case 7:return n=e.sent,r=n.map((function(e){return Object(p.mapKeys)(e,(function(e,t){return Object(p.camelCase)(t)}))})),e.next=11,Y(r,t);case 11:e.next=15;break;case 13:e.prev=13,e.t0=e.catch(2);case 15:case"end":return e.stop()}}),e,null,[[2,13]])}))};function te(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function ne(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?te(Object(n),!0).forEach((function(t){Object(b.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):te(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var re={reducer:j,selectors:r,actions:c,controls:ne(ne({},d.controls),F),resolvers:ee},ce=Object(s.createReduxStore)("core/block-directory",re);function oe(){var e=Object(s.useDispatch)(ce).uninstallBlockType,t=Object(s.useSelect)((function(e){var t=e(u.store),n=t.isAutosavingPost;return(0,t.isSavingPost)()&&!n()}),[]),n=Object(s.useSelect)((function(e){return e(ce).getUnusedBlockTypes()}),[]);return Object(o.useEffect)((function(){t&&n.length&&n.forEach((function(t){e(t),Object(l.unregisterBlockType)(t.name)}))}),[t]),null}Object(s.register)(ce);var ae=n(9),ie=n(14),le=n(3),se=n(54),ue=n(39),be=function(e){var t=e.author,n=e.authorBlockCount,r=e.authorBlockRating;return Object(o.createElement)(o.Fragment,null,Object(o.createElement)("span",{className:"block-directory-downloadable-block-author-info__content-author"},Object(N.sprintf)(
2
  /* translators: %s: author name. */
3
  Object(N.__)("Authored by %s"),t)),Object(o.createElement)("span",{className:"block-directory-downloadable-block-author-info__content"},r>0?Object(N.sprintf)(
4
  /* translators: 1: number of blocks. 2: average rating. */
5
  Object(N._n)("This author has %1$d block, with an average rating of %2$.1f.","This author has %1$d blocks, with an average rating of %2$.1f.",n),n,r):Object(N.sprintf)(
6
  /* translators: 1: number of blocks. */
7
- Object(N._n)("This author has %1$d block.","This author has %1$d blocks.",n),n)))},de=n(68),fe=n(145),pe=n(204),Oe=n(7),me=Object(o.createElement)(Oe.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(o.createElement)(Oe.Path,{d:"M9.518 8.783a.25.25 0 00.188-.137l2.069-4.192a.25.25 0 01.448 0l2.07 4.192a.25.25 0 00.187.137l4.626.672a.25.25 0 01.139.427l-3.347 3.262a.25.25 0 00-.072.222l.79 4.607a.25.25 0 01-.363.264l-4.137-2.176a.25.25 0 00-.233 0l-4.138 2.175a.25.25 0 01-.362-.263l.79-4.607a.25.25 0 00-.072-.222L4.753 9.882a.25.25 0 01.14-.427l4.625-.672zM12 14.533c.28 0 .559.067.814.2l1.895.997-.362-2.11a1.75 1.75 0 01.504-1.55l1.533-1.495-2.12-.308a1.75 1.75 0 01-1.317-.957L12 7.39v7.143z"})),je=n(205),ye=function(e){var t=e.rating,n=.5*Math.round(t/.5),r=Math.floor(t),c=Math.ceil(t-r),a=5-(r+c);return Object(o.createElement)("div",{"aria-label":Object(N.sprintf)(
8
  /* translators: %s: number of stars. */
9
  Object(N.__)("%s out of 5 stars"),n)},Object(p.times)(r,(function(e){return Object(o.createElement)(fe.a,{key:"full_stars_".concat(e),icon:pe.a,size:16})})),Object(p.times)(c,(function(e){return Object(o.createElement)(fe.a,{key:"half_stars_".concat(e),icon:me,size:16})})),Object(p.times)(a,(function(e){return Object(o.createElement)(fe.a,{key:"empty_stars_".concat(e),icon:je.a,size:16})})))},ve=function(e){var t=e.rating,n=e.ratingCount;return Object(o.createElement)("div",{className:"block-directory-block-ratings"},Object(o.createElement)(ye,{rating:t}),Object(o.createElement)("span",{className:"block-directory-block-ratings__rating-count","aria-label":Object(N.sprintf)(// translators: %d: number of ratings (number).
10
  Object(N._n)("%d total rating","%d total ratings",n),n)},"(",n,")"))},ke=function(e){var t=e.icon,n=e.title;return Object(o.createElement)("div",{className:"block-directory-downloadable-block-icon"},null!==t.match(/\.(jpeg|jpg|gif|png|svg)(?:\?.*)?$/)?Object(o.createElement)("img",{src:t,alt:Object(N.sprintf)(// translators: %s: Name of the plugin e.g: "Akismet".
11
- Object(N.__)("%s block icon"),n)}):Object(o.createElement)(y.BlockIcon,{icon:t,showColors:!0}))},we=function(e){var t=e.icon,n=e.title,r=e.rating,c=e.ratingCount,a=e.isLoading,i=void 0!==a&&a,l=e.isInstallable,s=void 0===l||l,u=e.onClick;return Object(o.createElement)("div",{className:"block-directory-downloadable-block-header__row"},Object(o.createElement)(ke,{icon:t,title:n}),Object(o.createElement)("div",{className:"block-directory-downloadable-block-header__column"},Object(o.createElement)("h2",{className:"block-directory-downloadable-block-header__title"},Object(de.decodeEntities)(n)),Object(o.createElement)(ve,{rating:r,ratingCount:c})),Object(o.createElement)(le.Button,{isSecondary:!0,isBusy:i,disabled:i||!s,onClick:function(e){e.preventDefault(),!i&&s&&u()}},i?Object(N.__)("Adding…"):Object(N.__)("Add block")))},ge=Object(o.createElement)(Oe.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"-2 -2 24 24"},Object(o.createElement)(Oe.Path,{d:"M18 3.5c0 .62-.38 1.16-.92 1.38v13.11H1.99l4.22-6.73c-.13-.23-.21-.48-.21-.76C6 9.67 6.67 9 7.5 9S9 9.67 9 10.5c0 .13-.02.25-.05.37l1.44.63c.27-.3.67-.5 1.11-.5.18 0 .35.04.51.09l3.58-6.41c-.36-.27-.59-.7-.59-1.18 0-.83.67-1.5 1.5-1.5.19 0 .36.04.53.1l.05-.09v.11c.54.22.92.76.92 1.38zm-1.92 13.49V5.85l-3.29 5.89c.13.23.21.48.21.76 0 .83-.67 1.5-1.5 1.5s-1.5-.67-1.5-1.5l.01-.07-1.63-.72c-.25.18-.55.29-.88.29-.18 0-.35-.04-.51-.1l-3.2 5.09h12.29z"})),he=n(366),Ee=function(e){var t,n=e.activeInstalls,r=e.description,c=e.humanizedUpdated;return t=n>1e6?Object(N.sprintf)(
12
  /* translators: %d: number of active installations. */
13
  Object(N.__)("%d+ Million active installations"),Math.floor(n/1e6)):0===n?Object(N.__)("Less than 10 active installations"):Object(N.sprintf)(
14
  /* translators: %d: number of active installations. */
15
  Object(N.__)("%d+ active installations"),n),Object(o.createElement)(o.Fragment,null,Object(o.createElement)("p",{className:"block-directory-downloadable-block-info__content"},Object(de.decodeEntities)(r)),Object(o.createElement)("div",{className:"block-directory-downloadable-block-info__meta"},Object(o.createElement)(fe.a,{className:"block-directory-downloadable-block-info__icon",icon:ge}),t),Object(o.createElement)("div",{className:"block-directory-downloadable-block-info__meta"},Object(o.createElement)(fe.a,{className:"block-directory-downloadable-block-info__icon",icon:he.a}),// translators: %s: Humanized date of last update e.g: "2 months ago".
16
  Object(N.sprintf)(Object(N.__)("Updated %s"),c)))},_e=function(e){var t=e.block,n=e.onClick,r=Object(s.useSelect)((function(e){return e(ce).getErrorNoticeForBlock(t.id)}),[t]);return r?Object(o.createElement)(le.Notice,{status:"error",isDismissible:!1,className:"block-directory-downloadable-block-notice"},Object(o.createElement)("div",{className:"block-directory-downloadable-block-notice__content"},r.message),Object(o.createElement)(le.Button,{isSmall:!0,isPrimary:!0,onClick:function(){if(r.isFatal)return window.location.reload(),!1;n(t)}},r.isFatal?Object(N.__)("Reload"):Object(N.__)("Retry"))):null};function Be(e){var t=e.item,n=e.onClick,r=Object(s.useSelect)((function(e){var n=e(ce),r=n.isInstalling,c=(0,n.getErrorNoticeForBlock)(t.id),o=c&&c.isFatal;return{isLoading:r(t.id),isInstallable:!o}}),[t]),c=r.isLoading,a=r.isInstallable,i=t.icon,l=t.title,u=t.description,b=t.rating,d=t.activeInstalls,f=t.ratingCount,p=t.author,O=t.humanizedUpdated,m=t.authorBlockCount,j=t.authorBlockRating;return Object(o.createElement)("li",{className:"block-directory-downloadable-block-list-item"},Object(o.createElement)("article",{className:"block-directory-downloadable-block-list-item__panel"},Object(o.createElement)("header",{className:"block-directory-downloadable-block-list-item__header"},Object(o.createElement)(we,{icon:i,onClick:n,title:l,rating:b,ratingCount:f,isLoading:c,isInstallable:a})),Object(o.createElement)("section",{className:"block-directory-downloadable-block-list-item__body"},Object(o.createElement)(_e,{onClick:n,block:t}),Object(o.createElement)(Ee,{activeInstalls:d,description:u,humanizedUpdated:O})),Object(o.createElement)("footer",{className:"block-directory-downloadable-block-list-item__footer"},Object(o.createElement)(be,{author:p,authorBlockCount:m,authorBlockRating:j}))))}var xe=function(e){var t=e.items,n=e.onHover,r=void 0===n?p.noop:n,c=e.onSelect,a=Object(s.useDispatch)(ce).installBlockType;return t.length?Object(o.createElement)("ul",{role:"list",className:"block-directory-downloadable-blocks-list"},t.map((function(e){return Object(o.createElement)(Be,{key:e.id,onClick:function(){Object(l.getBlockType)(e.name)?c(e):a(e).then((function(t){t&&c(e)})),r(null)},item:e})}))):null},Se=Object(ie.compose)([Object(s.withSelect)((function(e,t){var n=t.filterValue,r=t.rootClientId,c=void 0===r?null:r,o=e(ce),a=o.getDownloadableBlocks,i=o.isRequestingDownloadableBlocks,l=e(y.store).canInsertBlockType,s=e(ue.store).canUser("read","block-directory/search");return{downloadableItems:s?a(n).filter((function(e){return l(e,c,!0)})):[],hasPermission:s,isLoading:i(n)}}))])((function(e){var t=e.downloadableItems,n=e.onSelect,r=e.onHover,c=e.hasPermission,a=e.isLoading,i=e.isWaiting,l=Object(ie.useDebounce)(se.speak,500);return!1===c?(l(Object(N.__)("No blocks found in your library.")),Object(o.createElement)("p",{className:"block-directory-downloadable-blocks-panel__description has-no-results"},Object(N.__)("No blocks found in your library."))):void 0===c||a||i?Object(o.createElement)("p",{className:"block-directory-downloadable-blocks-panel__description has-no-results"},Object(o.createElement)(le.Spinner,null)):t.length?(l(Object(N.sprintf)(
17
  /* translators: %s: number of available blocks. */
18
- Object(N._n)("No blocks found in your library. We did find %d block available for download.","No blocks found in your library. We did find %d blocks available for download.",t.length),t.length)),Object(o.createElement)(o.Fragment,null,Object(o.createElement)("p",{className:"block-directory-downloadable-blocks-panel__description"},Object(N.__)("No blocks found in your library. These blocks can be downloaded and installed:")),Object(o.createElement)(xe,{items:t,onSelect:n,onHover:r}))):Object(o.createElement)("p",{className:"block-directory-downloadable-blocks-panel__description has-no-results"},Object(N.__)("No blocks found in your library."))})),Pe=function(){var e=Object(o.useState)(""),t=Object(ae.a)(e,2),n=t[0],r=t[1],c=Object(p.debounce)(r,400);return Object(o.createElement)(y.__experimentalInserterMenuExtension,null,(function(e){var t=e.onSelect,r=e.onHover,a=e.filterValue,i=e.hasItems,l=e.rootClientId;return i||!a?null:(n!==a&&c(a),Object(o.createElement)(Se,{onSelect:t,onHover:r,rootClientId:l,filterValue:n,isWaiting:a!==n}))}))},Ne=n(326),Te=n(179);function Ie(e){var t=e.items;return t.length?Object(o.createElement)("ul",{className:"block-directory-compact-list"},t.map((function(e){var t=e.icon,n=e.id,r=e.title,c=e.author;return Object(o.createElement)("li",{key:n,className:"block-directory-compact-list__item"},Object(o.createElement)(ke,{icon:t,title:r}),Object(o.createElement)("div",{className:"block-directory-compact-list__item-details"},Object(o.createElement)("div",{className:"block-directory-compact-list__item-title"},r),Object(o.createElement)("div",{className:"block-directory-compact-list__item-author"},Object(N.sprintf)(
19
  /* translators: %s: Name of the block author. */
20
  Object(N.__)("By %s"),c))))}))):null}function Le(){var e=Object(s.useSelect)((function(e){return e(ce).getNewBlockTypes()}),[]);return e.length?Object(o.createElement)(Ne.PluginPrePublishPanel,{icon:Te.a,title:Object(N.sprintf)(// translators: %d: number of blocks (number).
21
  Object(N._n)("Added: %d block","Added: %d blocks",e.length),e.length),initialOpen:!0},Object(o.createElement)("p",{className:"installed-blocks-pre-publish-panel__copy"},Object(N._n)("The following block has been added to your site.","The following blocks have been added to your site.",e.length)),Object(o.createElement)(Ie,{items:e})):null}var Ce=n(13),De=n(10);function Ae(e){var t=e.attributes,n=e.block,r=e.clientId,c=Object(s.useSelect)((function(e){return e(ce).isInstalling(n.id)})),a=Object(s.useDispatch)(ce).installBlockType,i=Object(s.useDispatch)(y.store).replaceBlock;return Object(o.createElement)(le.Button,{onClick:function(){return a(n).then((function(e){if(e){var c=Object(l.getBlockType)(n.name),o=Object(l.parse)(t.originalContent),a=Object(ae.a)(o,1)[0];a&&i(r,Object(l.createBlock)(c.name,a.attributes,a.innerBlocks))}}))},disabled:c,isBusy:c,isPrimary:!0},Object(N.sprintf)(
@@ -24,4 +24,4 @@ Object(N.__)("Install %s"),n.title))}var Re=function(e){var t=e.originalBlock,n=
24
  /* translators: %s: block name */
25
  Object(N.__)("Your site doesn’t include support for the %s block. You can try installing the block or remove it entirely!"),t.title||c),f=[Object(o.createElement)(Ae,{key:"install",block:t,attributes:n.attributes,clientId:n.clientId})];return u&&b&&(d=Object(N.sprintf)(
26
  /* translators: %s: block name */
27
- Object(N.__)("Your site doesn’t include support for the %s block. You can try installing the block, convert it to a Custom HTML block, or remove it entirely."),t.title||c),f.push(Object(o.createElement)(le.Button,{key:"convert",onClick:function(){i(n.clientId,Object(l.createBlock)("core/html",{content:a}))},isLink:!0},Object(N.__)("Keep as HTML")))),Object(o.createElement)("div",Object(y.useBlockProps)(),Object(o.createElement)(y.Warning,{actions:f},d),Object(o.createElement)(o.RawHTML,null,a))};Object(a.registerPlugin)("block-directory",{render:function(){return Object(o.createElement)(o.Fragment,null,Object(o.createElement)(oe,null),Object(o.createElement)(Pe,null),Object(o.createElement)(Le,null))}}),Object(i.addFilter)("blocks.registerBlockType","block-directory/fallback",(function(e,t){return"core/missing"!==t||(e.edit=(n=e.edit,function(e){var t=e.attributes.originalName,r=Object(s.useSelect)((function(e){var n=(0,e(ce).getDownloadableBlocks)("block:"+t).filter((function(e){var n=e.name;return t===n}));return{hasPermission:e(ue.store).canUser("read","block-directory/search"),block:n.length&&n[0]}}),[t]),c=r.block;return r.hasPermission&&c?Object(o.createElement)(Re,Object(De.a)({},e,{originalBlock:c})):Object(o.createElement)(n,e)})),e;var n}))},51:function(e,t){e.exports=window.wp.notices},54:function(e,t){e.exports=window.wp.a11y},55:function(e,t){e.exports=window.wp.dataControls},6:function(e,t){e.exports=window.wp.blockEditor},65:function(e,t){e.exports=window.wp.plugins},68:function(e,t){e.exports=window.wp.htmlEntities},7:function(e,t){e.exports=window.wp.primitives},9:function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var r=n(41),c=n(30),o=n(42);function a(e,t){return Object(r.a)(e)||function(e,t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e)){var n=[],_n=!0,r=!1,c=void 0;try{for(var o,a=e[Symbol.iterator]();!(_n=(o=a.next()).done)&&(n.push(o.value),!t||n.length!==t);_n=!0);}catch(e){r=!0,c=e}finally{try{_n||null==a.return||a.return()}finally{if(r)throw c}}return n}}(e,t)||Object(c.a)(e,t)||Object(o.a)()}}});
1
+ window.wp=window.wp||{},window.wp.blockDirectory=function(e){var t={};function n(r){if(t[r])return t[r].exports;var c=t[r]={i:r,l:!1,exports:{}};return e[r].call(c.exports,c,c.exports,n),c.l=!0,c.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var c in e)n.d(r,c,function(t){return e[t]}.bind(null,c));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=528)}({0:function(e,t){e.exports=window.wp.element},1:function(e,t){e.exports=window.wp.i18n},10:function(e,t,n){"use strict";function r(){return(r=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}n.d(t,"a",(function(){return r}))},11:function(e,t){e.exports=window.wp.blocks},13:function(e,t,n){"use strict";n.d(t,"a",(function(){return c}));var r=n(48);function c(e,t){if(null==e)return{};var n,c,o=Object(r.a)(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(c=0;c<a.length;c++)n=a[c],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}},14:function(e,t){e.exports=window.wp.compose},15:function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var r=n(24),c=n(42),o=n(30);function a(e){return function(e){if(Array.isArray(e))return Object(r.a)(e)}(e)||Object(c.a)(e)||Object(o.a)(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}},156:function(e,t,n){"use strict";var r=n(5),c=n(13),o=n(0);function a(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}t.a=function(e){var t=e.icon,n=e.size,i=void 0===n?24:n,l=Object(c.a)(e,["icon","size"]);return Object(o.cloneElement)(t,function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?a(Object(n),!0).forEach((function(t){Object(r.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):a(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({width:i,height:i},l))}},16:function(e,t){e.exports=window.regeneratorRuntime},194:function(e,t,n){"use strict";var r=n(0),c=n(7),o=Object(r.createElement)(c.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(r.createElement)(c.Path,{d:"M19 8h-1V6h-5v2h-2V6H6v2H5c-1.1 0-2 .9-2 2v8c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2v-8c0-1.1-.9-2-2-2zm.5 10c0 .3-.2.5-.5.5H5c-.3 0-.5-.2-.5-.5v-8c0-.3.2-.5.5-.5h14c.3 0 .5.2.5.5v8z"}));t.a=o},2:function(e,t){e.exports=window.lodash},219:function(e,t,n){"use strict";var r=n(0),c=n(7),o=Object(r.createElement)(c.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(r.createElement)(c.Path,{d:"M11.776 4.454a.25.25 0 01.448 0l2.069 4.192a.25.25 0 00.188.137l4.626.672a.25.25 0 01.139.426l-3.348 3.263a.25.25 0 00-.072.222l.79 4.607a.25.25 0 01-.362.263l-4.138-2.175a.25.25 0 00-.232 0l-4.138 2.175a.25.25 0 01-.363-.263l.79-4.607a.25.25 0 00-.071-.222L4.754 9.881a.25.25 0 01.139-.426l4.626-.672a.25.25 0 00.188-.137l2.069-4.192z"}));t.a=o},220:function(e,t,n){"use strict";var r=n(0),c=n(7),o=Object(r.createElement)(c.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(r.createElement)(c.Path,{fillRule:"evenodd",d:"M9.706 8.646a.25.25 0 01-.188.137l-4.626.672a.25.25 0 00-.139.427l3.348 3.262a.25.25 0 01.072.222l-.79 4.607a.25.25 0 00.362.264l4.138-2.176a.25.25 0 01.233 0l4.137 2.175a.25.25 0 00.363-.263l-.79-4.607a.25.25 0 01.072-.222l3.347-3.262a.25.25 0 00-.139-.427l-4.626-.672a.25.25 0 01-.188-.137l-2.069-4.192a.25.25 0 00-.448 0L9.706 8.646zM12 7.39l-.948 1.921a1.75 1.75 0 01-1.317.957l-2.12.308 1.534 1.495c.412.402.6.982.503 1.55l-.362 2.11 1.896-.997a1.75 1.75 0 011.629 0l1.895.997-.362-2.11a1.75 1.75 0 01.504-1.55l1.533-1.495-2.12-.308a1.75 1.75 0 01-1.317-.957L12 7.39z",clipRule:"evenodd"}));t.a=o},24:function(e,t,n){"use strict";function r(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}n.d(t,"a",(function(){return r}))},27:function(e,t){e.exports=window.wp.coreData},3:function(e,t){e.exports=window.wp.components},30:function(e,t,n){"use strict";n.d(t,"a",(function(){return c}));var r=n(24);function c(e,t){if(e){if("string"==typeof e)return Object(r.a)(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Object(r.a)(e,t):void 0}}},342:function(e,t){e.exports=window.wp.editPost},35:function(e,t){e.exports=window.wp.hooks},36:function(e,t){e.exports=window.wp.editor},384:function(e,t,n){"use strict";var r=n(0),c=n(7),o=Object(r.createElement)(c.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"-2 -2 24 24"},Object(r.createElement)(c.Path,{d:"M10.2 3.28c3.53 0 6.43 2.61 6.92 6h2.08l-3.5 4-3.5-4h2.32c-.45-1.97-2.21-3.45-4.32-3.45-1.45 0-2.73.71-3.54 1.78L4.95 5.66C6.23 4.2 8.11 3.28 10.2 3.28zm-.4 13.44c-3.52 0-6.43-2.61-6.92-6H.8l3.5-4c1.17 1.33 2.33 2.67 3.5 4H5.48c.45 1.97 2.21 3.45 4.32 3.45 1.45 0 2.73-.71 3.54-1.78l1.71 1.95c-1.28 1.46-3.15 2.38-5.25 2.38z"}));t.a=o},39:function(e,t,n){"use strict";function r(e){if(Array.isArray(e))return e}n.d(t,"a",(function(){return r}))},4:function(e,t){e.exports=window.wp.data},40:function(e,t,n){"use strict";function r(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}n.d(t,"a",(function(){return r}))},42:function(e,t,n){"use strict";function r(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}n.d(t,"a",(function(){return r}))},45:function(e,t,n){"use strict";function r(e,t,n,r,c,o,a){try{var i=e[o](a),l=i.value}catch(e){return void n(e)}i.done?t(l):Promise.resolve(l).then(r,c)}function c(e){return function(){var t=this,n=arguments;return new Promise((function(c,o){var a=e.apply(t,n);function i(e){r(a,c,o,i,l,"next",e)}function l(e){r(a,c,o,i,l,"throw",e)}i(void 0)}))}}n.d(t,"a",(function(){return c}))},47:function(e,t){e.exports=window.wp.apiFetch},48:function(e,t,n){"use strict";function r(e,t){if(null==e)return{};var n,r,c={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(c[n]=e[n]);return c}n.d(t,"a",(function(){return r}))},5:function(e,t,n){"use strict";function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}n.d(t,"a",(function(){return r}))},51:function(e,t){e.exports=window.wp.notices},528:function(e,t,n){"use strict";n.r(t),n.d(t,"store",(function(){return ce}));var r={};n.r(r),n.d(r,"isRequestingDownloadableBlocks",(function(){return k})),n.d(r,"getDownloadableBlocks",(function(){return w})),n.d(r,"getInstalledBlockTypes",(function(){return g})),n.d(r,"getNewBlockTypes",(function(){return h})),n.d(r,"getUnusedBlockTypes",(function(){return E})),n.d(r,"isInstalling",(function(){return _})),n.d(r,"getErrorNotices",(function(){return B})),n.d(r,"getErrorNoticeForBlock",(function(){return x}));var c={};n.r(c),n.d(c,"fetchDownloadableBlocks",(function(){return W})),n.d(c,"receiveDownloadableBlocks",(function(){return Y})),n.d(c,"installBlockType",(function(){return $})),n.d(c,"uninstallBlockType",(function(){return G})),n.d(c,"addInstalledBlockType",(function(){return q})),n.d(c,"removeInstalledBlockType",(function(){return J})),n.d(c,"setIsInstalling",(function(){return Q})),n.d(c,"setErrorNotice",(function(){return X})),n.d(c,"clearErrorNotice",(function(){return Z}));var o=n(0),a=n(67),i=n(35),l=n(11),s=n(4),u=n(36),b=n(5),d=n(55),f=n(15),p=n(2);function O(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function m(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?O(Object(n),!0).forEach((function(t){Object(b.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):O(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var j=Object(s.combineReducers)({downloadableBlocks:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"FETCH_DOWNLOADABLE_BLOCKS":return m(m({},e),{},Object(b.a)({},t.filterValue,{isRequesting:!0}));case"RECEIVE_DOWNLOADABLE_BLOCKS":return m(m({},e),{},Object(b.a)({},t.filterValue,{results:t.downloadableBlocks,isRequesting:!1}))}return e},blockManagement:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{installedBlockTypes:[],isInstalling:{}},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"ADD_INSTALLED_BLOCK_TYPE":return m(m({},e),{},{installedBlockTypes:[].concat(Object(f.a)(e.installedBlockTypes),[t.item])});case"REMOVE_INSTALLED_BLOCK_TYPE":return m(m({},e),{},{installedBlockTypes:e.installedBlockTypes.filter((function(e){return e.name!==t.item.name}))});case"SET_INSTALLING_BLOCK":return m(m({},e),{},{isInstalling:m(m({},e.isInstalling),{},Object(b.a)({},t.blockId,t.isInstalling))})}return e},errorNotices:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"SET_ERROR_NOTICE":return m(m({},e),{},Object(b.a)({},t.blockId,{message:t.message,isFatal:t.isFatal}));case"CLEAR_ERROR_NOTICE":return Object(p.omit)(e,t.blockId)}return e}}),y=n(6);function v(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];if(!t.length)return!1;if(t.some((function(t){return t.name===e.name})))return!0;for(var n=0;n<t.length;n++)if(v(e,t[n].innerBlocks))return!0;return!1}function k(e,t){return!(!e.downloadableBlocks[t]||!e.downloadableBlocks[t].isRequesting)&&e.downloadableBlocks[t].isRequesting}function w(e,t){return e.downloadableBlocks[t]&&e.downloadableBlocks[t].results?e.downloadableBlocks[t].results:[]}function g(e){return e.blockManagement.installedBlockTypes}var h=Object(s.createRegistrySelector)((function(e){return function(t){var n=e(y.store).getBlocks();return g(t).filter((function(e){return v(e,n)}))}})),E=Object(s.createRegistrySelector)((function(e){return function(t){var n=e(y.store).getBlocks();return g(t).filter((function(e){return!v(e,n)}))}}));function _(e,t){return e.blockManagement.isInstalling[t]||!1}function B(e){return e.errorNotices}function x(e,t){return e.errorNotices[t]}var S=n(16),P=n.n(S),N=n(1),T=n(51),I=n(45),L=n(47),C=n.n(L);function D(e,t){var n;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return A(e,void 0);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?A(e,void 0):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,c=function(){};return{s:c,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:c}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,i=!1;return{s:function(){n=e[Symbol.iterator]()},n:function(){var e=n.next();return a=e.done,e},e:function(e){i=!0,o=e},f:function(){try{a||null==n.return||n.return()}finally{if(i)throw o}}}}function A(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var R=function(e){return new Promise((function(t,n){var r=document.createElement(e.nodeName);["id","rel","src","href","type"].forEach((function(t){e[t]&&(r[t]=e[t])})),e.innerHTML&&r.appendChild(document.createTextNode(e.innerHTML)),r.onload=function(){return t(!0)},r.onerror=function(){return n(new Error("Error loading asset."))},document.body.appendChild(r),("link"===r.nodeName.toLowerCase()||"script"===r.nodeName.toLowerCase()&&!r.src)&&t()}))};function M(e){return{type:"LOAD_ASSETS",assets:e}}var F={LOAD_ASSETS:function(){return Object(I.a)(P.a.mark((function e(){var t,n,r,c,o,a,i;return P.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,C()({url:document.location.href,parse:!1});case 2:return t=e.sent,e.next=5,t.text();case 5:n=e.sent,r=(new window.DOMParser).parseFromString(n,"text/html"),c=Array.from(r.querySelectorAll('link[rel="stylesheet"],script')).filter((function(e){return e.id&&!document.getElementById(e.id)})),o=D(c),e.prev=9,o.s();case 11:if((a=o.n()).done){e.next=17;break}return i=a.value,e.next=15,R(i);case 15:e.next=11;break;case 17:e.next=22;break;case 19:e.prev=19,e.t0=e.catch(9),o.e(e.t0);case 22:return e.prev=22,o.f(),e.finish(22);case 25:case"end":return e.stop()}}),e,null,[[9,19,22,25]])})))()}};function V(e){if(!e)return!1;var t=e.links["wp:plugin"]||e.links.self;return!(!t||!t.length)&&t[0].href}var z=P.a.mark($),H=P.a.mark(G);function U(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function K(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?U(Object(n),!0).forEach((function(t){Object(b.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):U(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function W(e){return{type:"FETCH_DOWNLOADABLE_BLOCKS",filterValue:e}}function Y(e,t){return{type:"RECEIVE_DOWNLOADABLE_BLOCKS",downloadableBlocks:e,filterValue:t}}function $(e){var t,n,r,c,o,a,i,u,b;return P.a.wrap((function(f){for(;;)switch(f.prev=f.next){case 0:return t=e.id,n=e.assets,r=!1,f.next=4,Z(t);case 4:return f.prev=4,f.next=7,Q(e.id,!0);case 7:if(c=V(e),o={},!c){f.next=14;break}return f.next=12,Object(d.apiFetch)({url:c,data:{status:"active"},method:"PUT"});case 12:f.next=18;break;case 14:return f.next=16,Object(d.apiFetch)({path:"wp/v2/plugins",data:{slug:e.id,status:"active"},method:"POST"});case 16:a=f.sent,o=a._links;case 18:return f.next=20,q(K(K({},e),{},{links:K(K({},e.links),o)}));case 20:return f.next=22,M(n);case 22:return f.next=24,s.controls.select(l.store.name,"getBlockTypes");case 24:if(f.sent.some((function(t){return t.name===e.name}))){f.next=27;break}throw new Error(Object(N.__)("Error registering block. Try reloading the page."));case 27:r=!0,f.next=38;break;case 30:return f.prev=30,f.t0=f.catch(4),i=f.t0.message||Object(N.__)("An error occurred."),u=f.t0 instanceof Error,(b={folder_exists:Object(N.__)("This block is already installed. Try reloading the page."),unable_to_connect_to_filesystem:Object(N.__)("Error installing block. You can reload the page and try again.")})[f.t0.code]&&(u=!0,i=b[f.t0.code]),f.next=38,X(t,i,u);case 38:return f.next=40,Q(e.id,!1);case 40:return f.abrupt("return",r);case 41:case"end":return f.stop()}}),z,null,[[4,30]])}function G(e){return P.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,Object(d.apiFetch)({url:V(e),data:{status:"inactive"},method:"PUT"});case 3:return t.next=5,Object(d.apiFetch)({url:V(e),method:"DELETE"});case 5:return t.next=7,J(e);case 7:t.next=13;break;case 9:return t.prev=9,t.t0=t.catch(0),t.next=13,s.controls.dispatch(T.store,"createErrorNotice",t.t0.message||Object(N.__)("An error occurred."));case 13:case"end":return t.stop()}}),H,null,[[0,9]])}function q(e){return{type:"ADD_INSTALLED_BLOCK_TYPE",item:e}}function J(e){return{type:"REMOVE_INSTALLED_BLOCK_TYPE",item:e}}function Q(e,t){return{type:"SET_INSTALLING_BLOCK",blockId:e,isInstalling:t}}function X(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return{type:"SET_ERROR_NOTICE",blockId:e,message:t,isFatal:n}}function Z(e){return{type:"CLEAR_ERROR_NOTICE",blockId:e}}var ee={getDownloadableBlocks:P.a.mark((function e(t){var n,r;return P.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t){e.next=2;break}return e.abrupt("return");case 2:return e.prev=2,e.next=5,W(t);case 5:return e.next=7,Object(d.apiFetch)({path:"wp/v2/block-directory/search?term=".concat(t)});case 7:return n=e.sent,r=n.map((function(e){return Object(p.mapKeys)(e,(function(e,t){return Object(p.camelCase)(t)}))})),e.next=11,Y(r,t);case 11:e.next=15;break;case 13:e.prev=13,e.t0=e.catch(2);case 15:case"end":return e.stop()}}),e,null,[[2,13]])}))};function te(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function ne(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?te(Object(n),!0).forEach((function(t){Object(b.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):te(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var re={reducer:j,selectors:r,actions:c,controls:ne(ne({},d.controls),F),resolvers:ee},ce=Object(s.createReduxStore)("core/block-directory",re);function oe(){var e=Object(s.useDispatch)(ce).uninstallBlockType,t=Object(s.useSelect)((function(e){var t=e(u.store),n=t.isAutosavingPost;return(0,t.isSavingPost)()&&!n()}),[]),n=Object(s.useSelect)((function(e){return e(ce).getUnusedBlockTypes()}),[]);return Object(o.useEffect)((function(){t&&n.length&&n.forEach((function(t){e(t),Object(l.unregisterBlockType)(t.name)}))}),[t]),null}Object(s.register)(ce);var ae=n(8),ie=n(14),le=n(3),se=n(54),ue=n(27),be=function(e){var t=e.author,n=e.authorBlockCount,r=e.authorBlockRating;return Object(o.createElement)(o.Fragment,null,Object(o.createElement)("span",{className:"block-directory-downloadable-block-author-info__content-author"},Object(N.sprintf)(
2
  /* translators: %s: author name. */
3
  Object(N.__)("Authored by %s"),t)),Object(o.createElement)("span",{className:"block-directory-downloadable-block-author-info__content"},r>0?Object(N.sprintf)(
4
  /* translators: 1: number of blocks. 2: average rating. */
5
  Object(N._n)("This author has %1$d block, with an average rating of %2$.1f.","This author has %1$d blocks, with an average rating of %2$.1f.",n),n,r):Object(N.sprintf)(
6
  /* translators: 1: number of blocks. */
7
+ Object(N._n)("This author has %1$d block.","This author has %1$d blocks.",n),n)))},de=n(71),fe=n(156),pe=n(219),Oe=n(7),me=Object(o.createElement)(Oe.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(o.createElement)(Oe.Path,{d:"M9.518 8.783a.25.25 0 00.188-.137l2.069-4.192a.25.25 0 01.448 0l2.07 4.192a.25.25 0 00.187.137l4.626.672a.25.25 0 01.139.427l-3.347 3.262a.25.25 0 00-.072.222l.79 4.607a.25.25 0 01-.363.264l-4.137-2.176a.25.25 0 00-.233 0l-4.138 2.175a.25.25 0 01-.362-.263l.79-4.607a.25.25 0 00-.072-.222L4.753 9.882a.25.25 0 01.14-.427l4.625-.672zM12 14.533c.28 0 .559.067.814.2l1.895.997-.362-2.11a1.75 1.75 0 01.504-1.55l1.533-1.495-2.12-.308a1.75 1.75 0 01-1.317-.957L12 7.39v7.143z"})),je=n(220),ye=function(e){var t=e.rating,n=.5*Math.round(t/.5),r=Math.floor(t),c=Math.ceil(t-r),a=5-(r+c);return Object(o.createElement)("div",{"aria-label":Object(N.sprintf)(
8
  /* translators: %s: number of stars. */
9
  Object(N.__)("%s out of 5 stars"),n)},Object(p.times)(r,(function(e){return Object(o.createElement)(fe.a,{key:"full_stars_".concat(e),icon:pe.a,size:16})})),Object(p.times)(c,(function(e){return Object(o.createElement)(fe.a,{key:"half_stars_".concat(e),icon:me,size:16})})),Object(p.times)(a,(function(e){return Object(o.createElement)(fe.a,{key:"empty_stars_".concat(e),icon:je.a,size:16})})))},ve=function(e){var t=e.rating,n=e.ratingCount;return Object(o.createElement)("div",{className:"block-directory-block-ratings"},Object(o.createElement)(ye,{rating:t}),Object(o.createElement)("span",{className:"block-directory-block-ratings__rating-count","aria-label":Object(N.sprintf)(// translators: %d: number of ratings (number).
10
  Object(N._n)("%d total rating","%d total ratings",n),n)},"(",n,")"))},ke=function(e){var t=e.icon,n=e.title;return Object(o.createElement)("div",{className:"block-directory-downloadable-block-icon"},null!==t.match(/\.(jpeg|jpg|gif|png|svg)(?:\?.*)?$/)?Object(o.createElement)("img",{src:t,alt:Object(N.sprintf)(// translators: %s: Name of the plugin e.g: "Akismet".
11
+ Object(N.__)("%s block icon"),n)}):Object(o.createElement)(y.BlockIcon,{icon:t,showColors:!0}))},we=function(e){var t=e.icon,n=e.title,r=e.rating,c=e.ratingCount,a=e.isLoading,i=void 0!==a&&a,l=e.isInstallable,s=void 0===l||l,u=e.onClick;return Object(o.createElement)("div",{className:"block-directory-downloadable-block-header__row"},Object(o.createElement)(ke,{icon:t,title:n}),Object(o.createElement)("div",{className:"block-directory-downloadable-block-header__column"},Object(o.createElement)("h2",{className:"block-directory-downloadable-block-header__title"},Object(de.decodeEntities)(n)),Object(o.createElement)(ve,{rating:r,ratingCount:c})),Object(o.createElement)(le.Button,{isSecondary:!0,isBusy:i,disabled:i||!s,onClick:function(e){e.preventDefault(),!i&&s&&u()}},i?Object(N.__)("Adding…"):Object(N.__)("Add block")))},ge=Object(o.createElement)(Oe.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"-2 -2 24 24"},Object(o.createElement)(Oe.Path,{d:"M18 3.5c0 .62-.38 1.16-.92 1.38v13.11H1.99l4.22-6.73c-.13-.23-.21-.48-.21-.76C6 9.67 6.67 9 7.5 9S9 9.67 9 10.5c0 .13-.02.25-.05.37l1.44.63c.27-.3.67-.5 1.11-.5.18 0 .35.04.51.09l3.58-6.41c-.36-.27-.59-.7-.59-1.18 0-.83.67-1.5 1.5-1.5.19 0 .36.04.53.1l.05-.09v.11c.54.22.92.76.92 1.38zm-1.92 13.49V5.85l-3.29 5.89c.13.23.21.48.21.76 0 .83-.67 1.5-1.5 1.5s-1.5-.67-1.5-1.5l.01-.07-1.63-.72c-.25.18-.55.29-.88.29-.18 0-.35-.04-.51-.1l-3.2 5.09h12.29z"})),he=n(384),Ee=function(e){var t,n=e.activeInstalls,r=e.description,c=e.humanizedUpdated;return t=n>1e6?Object(N.sprintf)(
12
  /* translators: %d: number of active installations. */
13
  Object(N.__)("%d+ Million active installations"),Math.floor(n/1e6)):0===n?Object(N.__)("Less than 10 active installations"):Object(N.sprintf)(
14
  /* translators: %d: number of active installations. */
15
  Object(N.__)("%d+ active installations"),n),Object(o.createElement)(o.Fragment,null,Object(o.createElement)("p",{className:"block-directory-downloadable-block-info__content"},Object(de.decodeEntities)(r)),Object(o.createElement)("div",{className:"block-directory-downloadable-block-info__meta"},Object(o.createElement)(fe.a,{className:"block-directory-downloadable-block-info__icon",icon:ge}),t),Object(o.createElement)("div",{className:"block-directory-downloadable-block-info__meta"},Object(o.createElement)(fe.a,{className:"block-directory-downloadable-block-info__icon",icon:he.a}),// translators: %s: Humanized date of last update e.g: "2 months ago".
16
  Object(N.sprintf)(Object(N.__)("Updated %s"),c)))},_e=function(e){var t=e.block,n=e.onClick,r=Object(s.useSelect)((function(e){return e(ce).getErrorNoticeForBlock(t.id)}),[t]);return r?Object(o.createElement)(le.Notice,{status:"error",isDismissible:!1,className:"block-directory-downloadable-block-notice"},Object(o.createElement)("div",{className:"block-directory-downloadable-block-notice__content"},r.message),Object(o.createElement)(le.Button,{isSmall:!0,isPrimary:!0,onClick:function(){if(r.isFatal)return window.location.reload(),!1;n(t)}},r.isFatal?Object(N.__)("Reload"):Object(N.__)("Retry"))):null};function Be(e){var t=e.item,n=e.onClick,r=Object(s.useSelect)((function(e){var n=e(ce),r=n.isInstalling,c=(0,n.getErrorNoticeForBlock)(t.id),o=c&&c.isFatal;return{isLoading:r(t.id),isInstallable:!o}}),[t]),c=r.isLoading,a=r.isInstallable,i=t.icon,l=t.title,u=t.description,b=t.rating,d=t.activeInstalls,f=t.ratingCount,p=t.author,O=t.humanizedUpdated,m=t.authorBlockCount,j=t.authorBlockRating;return Object(o.createElement)("li",{className:"block-directory-downloadable-block-list-item"},Object(o.createElement)("article",{className:"block-directory-downloadable-block-list-item__panel"},Object(o.createElement)("header",{className:"block-directory-downloadable-block-list-item__header"},Object(o.createElement)(we,{icon:i,onClick:n,title:l,rating:b,ratingCount:f,isLoading:c,isInstallable:a})),Object(o.createElement)("section",{className:"block-directory-downloadable-block-list-item__body"},Object(o.createElement)(_e,{onClick:n,block:t}),Object(o.createElement)(Ee,{activeInstalls:d,description:u,humanizedUpdated:O})),Object(o.createElement)("footer",{className:"block-directory-downloadable-block-list-item__footer"},Object(o.createElement)(be,{author:p,authorBlockCount:m,authorBlockRating:j}))))}var xe=function(e){var t=e.items,n=e.onHover,r=void 0===n?p.noop:n,c=e.onSelect,a=Object(s.useDispatch)(ce).installBlockType;return t.length?Object(o.createElement)("ul",{role:"list",className:"block-directory-downloadable-blocks-list"},t.map((function(e){return Object(o.createElement)(Be,{key:e.id,onClick:function(){Object(l.getBlockType)(e.name)?c(e):a(e).then((function(t){t&&c(e)})),r(null)},item:e})}))):null},Se=Object(ie.compose)([Object(s.withSelect)((function(e,t){var n=t.filterValue,r=t.rootClientId,c=void 0===r?null:r,o=e(ce),a=o.getDownloadableBlocks,i=o.isRequestingDownloadableBlocks,l=e(y.store).canInsertBlockType,s=e(ue.store).canUser("read","block-directory/search");return{downloadableItems:s?a(n).filter((function(e){return l(e,c,!0)})):[],hasPermission:s,isLoading:i(n)}}))])((function(e){var t=e.downloadableItems,n=e.onSelect,r=e.onHover,c=e.hasPermission,a=e.isLoading,i=e.isWaiting,l=Object(ie.useDebounce)(se.speak,500);return!1===c?(l(Object(N.__)("No blocks found in your library.")),Object(o.createElement)("p",{className:"block-directory-downloadable-blocks-panel__description has-no-results"},Object(N.__)("No blocks found in your library."))):void 0===c||a||i?Object(o.createElement)("p",{className:"block-directory-downloadable-blocks-panel__description has-no-results"},Object(o.createElement)(le.Spinner,null)):t.length?(l(Object(N.sprintf)(
17
  /* translators: %s: number of available blocks. */
18
+ Object(N._n)("No blocks found in your library. We did find %d block available for download.","No blocks found in your library. We did find %d blocks available for download.",t.length),t.length)),Object(o.createElement)(o.Fragment,null,Object(o.createElement)("p",{className:"block-directory-downloadable-blocks-panel__description"},Object(N.__)("No blocks found in your library. These blocks can be downloaded and installed:")),Object(o.createElement)(xe,{items:t,onSelect:n,onHover:r}))):Object(o.createElement)("p",{className:"block-directory-downloadable-blocks-panel__description has-no-results"},Object(N.__)("No blocks found in your library."))})),Pe=function(){var e=Object(o.useState)(""),t=Object(ae.a)(e,2),n=t[0],r=t[1],c=Object(p.debounce)(r,400);return Object(o.createElement)(y.__experimentalInserterMenuExtension,null,(function(e){var t=e.onSelect,r=e.onHover,a=e.filterValue,i=e.hasItems,l=e.rootClientId;return i||!a?null:(n!==a&&c(a),Object(o.createElement)(Se,{onSelect:t,onHover:r,rootClientId:l,filterValue:n,isWaiting:a!==n}))}))},Ne=n(342),Te=n(194);function Ie(e){var t=e.items;return t.length?Object(o.createElement)("ul",{className:"block-directory-compact-list"},t.map((function(e){var t=e.icon,n=e.id,r=e.title,c=e.author;return Object(o.createElement)("li",{key:n,className:"block-directory-compact-list__item"},Object(o.createElement)(ke,{icon:t,title:r}),Object(o.createElement)("div",{className:"block-directory-compact-list__item-details"},Object(o.createElement)("div",{className:"block-directory-compact-list__item-title"},r),Object(o.createElement)("div",{className:"block-directory-compact-list__item-author"},Object(N.sprintf)(
19
  /* translators: %s: Name of the block author. */
20
  Object(N.__)("By %s"),c))))}))):null}function Le(){var e=Object(s.useSelect)((function(e){return e(ce).getNewBlockTypes()}),[]);return e.length?Object(o.createElement)(Ne.PluginPrePublishPanel,{icon:Te.a,title:Object(N.sprintf)(// translators: %d: number of blocks (number).
21
  Object(N._n)("Added: %d block","Added: %d blocks",e.length),e.length),initialOpen:!0},Object(o.createElement)("p",{className:"installed-blocks-pre-publish-panel__copy"},Object(N._n)("The following block has been added to your site.","The following blocks have been added to your site.",e.length)),Object(o.createElement)(Ie,{items:e})):null}var Ce=n(13),De=n(10);function Ae(e){var t=e.attributes,n=e.block,r=e.clientId,c=Object(s.useSelect)((function(e){return e(ce).isInstalling(n.id)})),a=Object(s.useDispatch)(ce).installBlockType,i=Object(s.useDispatch)(y.store).replaceBlock;return Object(o.createElement)(le.Button,{onClick:function(){return a(n).then((function(e){if(e){var c=Object(l.getBlockType)(n.name),o=Object(l.parse)(t.originalContent),a=Object(ae.a)(o,1)[0];a&&i(r,Object(l.createBlock)(c.name,a.attributes,a.innerBlocks))}}))},disabled:c,isBusy:c,isPrimary:!0},Object(N.sprintf)(
24
  /* translators: %s: block name */
25
  Object(N.__)("Your site doesn’t include support for the %s block. You can try installing the block or remove it entirely!"),t.title||c),f=[Object(o.createElement)(Ae,{key:"install",block:t,attributes:n.attributes,clientId:n.clientId})];return u&&b&&(d=Object(N.sprintf)(
26
  /* translators: %s: block name */
27
+ Object(N.__)("Your site doesn’t include support for the %s block. You can try installing the block, convert it to a Custom HTML block, or remove it entirely."),t.title||c),f.push(Object(o.createElement)(le.Button,{key:"convert",onClick:function(){i(n.clientId,Object(l.createBlock)("core/html",{content:a}))},isLink:!0},Object(N.__)("Keep as HTML")))),Object(o.createElement)("div",Object(y.useBlockProps)(),Object(o.createElement)(y.Warning,{actions:f},d),Object(o.createElement)(o.RawHTML,null,a))};Object(a.registerPlugin)("block-directory",{render:function(){return Object(o.createElement)(o.Fragment,null,Object(o.createElement)(oe,null),Object(o.createElement)(Pe,null),Object(o.createElement)(Le,null))}}),Object(i.addFilter)("blocks.registerBlockType","block-directory/fallback",(function(e,t){return"core/missing"!==t||(e.edit=(n=e.edit,function(e){var t=e.attributes.originalName,r=Object(s.useSelect)((function(e){var n=(0,e(ce).getDownloadableBlocks)("block:"+t).filter((function(e){var n=e.name;return t===n}));return{hasPermission:e(ue.store).canUser("read","block-directory/search"),block:n.length&&n[0]}}),[t]),c=r.block;return r.hasPermission&&c?Object(o.createElement)(Re,Object(De.a)({},e,{originalBlock:c})):Object(o.createElement)(n,e)})),e;var n}))},54:function(e,t){e.exports=window.wp.a11y},55:function(e,t){e.exports=window.wp.dataControls},6:function(e,t){e.exports=window.wp.blockEditor},67:function(e,t){e.exports=window.wp.plugins},7:function(e,t){e.exports=window.wp.primitives},71:function(e,t){e.exports=window.wp.htmlEntities},8:function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var r=n(39),c=n(30),o=n(40);function a(e,t){return Object(r.a)(e)||function(e,t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e)){var n=[],_n=!0,r=!1,c=void 0;try{for(var o,a=e[Symbol.iterator]();!(_n=(o=a.next()).done)&&(n.push(o.value),!t||n.length!==t);_n=!0);}catch(e){r=!0,c=e}finally{try{_n||null==a.return||a.return()}finally{if(r)throw c}}return n}}(e,t)||Object(c.a)(e,t)||Object(o.a)()}}});
build/block-editor/index.asset.php CHANGED
@@ -1 +1 @@
1
- <?php return array('dependencies' => array('lodash', 'react', 'wp-a11y', 'wp-blob', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-data', 'wp-deprecated', 'wp-dom', 'wp-element', 'wp-hooks', 'wp-html-entities', 'wp-i18n', 'wp-is-shallow-equal', 'wp-keyboard-shortcuts', 'wp-keycodes', 'wp-notices', 'wp-polyfill', 'wp-primitives', 'wp-rich-text', 'wp-shortcode', 'wp-token-list', 'wp-url', 'wp-wordcount'), 'version' => '70ac8606f31bdfa98fad85a2821ec265');
1
+ <?php return array('dependencies' => array('lodash', 'react', 'wp-a11y', 'wp-blob', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-data', 'wp-deprecated', 'wp-dom', 'wp-element', 'wp-hooks', 'wp-html-entities', 'wp-i18n', 'wp-is-shallow-equal', 'wp-keyboard-shortcuts', 'wp-keycodes', 'wp-notices', 'wp-polyfill', 'wp-primitives', 'wp-rich-text', 'wp-shortcode', 'wp-token-list', 'wp-url', 'wp-wordcount'), 'version' => 'f8cfd9aa314e0b96bab9912bdf1ea7a6');
build/block-editor/index.js CHANGED
@@ -1,14 +1,14 @@
1
- window.wp=window.wp||{},window.wp.blockEditor=function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=500)}({0:function(e,t){e.exports=window.wp.element},1:function(e,t){e.exports=window.wp.i18n},10:function(e,t,n){"use strict";function r(){return(r=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}n.d(t,"a",(function(){return r}))},106:function(e,t,n){"use strict";t.__esModule=!0;var r=n(210);t.default=r.TextareaAutosize},11:function(e,t){e.exports=window.wp.blocks},12:function(e,t,n){var r;!function(){"use strict";var n={}.hasOwnProperty;function o(){for(var e=[],t=0;t<arguments.length;t++){var r=arguments[t];if(r){var c=typeof r;if("string"===c||"number"===c)e.push(r);else if(Array.isArray(r))e.push(o.apply(null,r));else if("object"===c)for(var i in r)n.call(r,i)&&r[i]&&e.push(i)}}return e.join(" ")}e.exports?e.exports=o:void 0===(r=function(){return o}.apply(t,[]))||(e.exports=r)}()},125:function(e,t,n){"use strict";function r(e){return e&&"object"==typeof e&&"default"in e?e.default:e}Object.defineProperty(t,"__esModule",{value:!0});var o=r(n(206)),c=r(n(207)),i=n(8),a=r(i),l=r(n(180)),s=r(n(208)),u={arr:Array.isArray,obj:function(e){return"[object Object]"===Object.prototype.toString.call(e)},fun:function(e){return"function"==typeof e},str:function(e){return"string"==typeof e},num:function(e){return"number"==typeof e},und:function(e){return void 0===e},nul:function(e){return null===e},set:function(e){return e instanceof Set},map:function(e){return e instanceof Map},equ:function(e,t){if(typeof e!=typeof t)return!1;if(u.str(e)||u.num(e))return e===t;if(u.obj(e)&&u.obj(t)&&Object.keys(e).length+Object.keys(t).length===0)return!0;var n;for(n in e)if(!(n in t))return!1;for(n in t)if(e[n]!==t[n])return!1;return!u.und(n)||e===t}};function d(){var e=i.useState(!1)[1];return i.useCallback((function(){return e((function(e){return!e}))}),[])}function b(e,t){return u.und(e)||u.nul(e)?t:e}function f(e){return u.und(e)?[]:u.arr(e)?e:[e]}function p(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return u.fun(e)?e.apply(void 0,n):e}function m(e){var t=function(e){return e.to,e.from,e.config,e.onStart,e.onRest,e.onFrame,e.children,e.reset,e.reverse,e.force,e.immediate,e.delay,e.attach,e.destroyed,e.interpolateTo,e.ref,e.lazy,c(e,["to","from","config","onStart","onRest","onFrame","children","reset","reverse","force","immediate","delay","attach","destroyed","interpolateTo","ref","lazy"])}(e);if(u.und(t))return o({to:t},e);var n=Object.keys(e).reduce((function(n,r){var c;return u.und(t[r])?o({},n,((c={})[r]=e[r],c)):n}),{});return o({to:t},n)}var v,g,O=function(){function e(){this.payload=void 0,this.children=[]}var t=e.prototype;return t.getAnimatedValue=function(){return this.getValue()},t.getPayload=function(){return this.payload||this},t.attach=function(){},t.detach=function(){},t.getChildren=function(){return this.children},t.addChild=function(e){0===this.children.length&&this.attach(),this.children.push(e)},t.removeChild=function(e){var t=this.children.indexOf(e);this.children.splice(t,1),0===this.children.length&&this.detach()},e}(),h=function(e){function t(){for(var t,n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return(t=e.call.apply(e,[this].concat(r))||this).payload=[],t.attach=function(){return t.payload.forEach((function(e){return e instanceof O&&e.addChild(s(t))}))},t.detach=function(){return t.payload.forEach((function(e){return e instanceof O&&e.removeChild(s(t))}))},t}return l(t,e),t}(O),j=function(e){function t(){for(var t,n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return(t=e.call.apply(e,[this].concat(r))||this).payload={},t.attach=function(){return Object.values(t.payload).forEach((function(e){return e instanceof O&&e.addChild(s(t))}))},t.detach=function(){return Object.values(t.payload).forEach((function(e){return e instanceof O&&e.removeChild(s(t))}))},t}l(t,e);var n=t.prototype;return n.getValue=function(e){void 0===e&&(e=!1);var t={};for(var n in this.payload){var r=this.payload[n];(!e||r instanceof O)&&(t[n]=r instanceof O?r[e?"getAnimatedValue":"getValue"]():r)}return t},n.getAnimatedValue=function(){return this.getValue(!0)},t}(O);function k(e,t){v={fn:e,transform:t}}function y(e){g=e}var _,E=function(e){return"undefined"!=typeof window?window.requestAnimationFrame(e):-1},w=function(e){"undefined"!=typeof window&&window.cancelAnimationFrame(e)};function C(e){_=e}var S,B=function(){return Date.now()};function I(e){S=e}var x,P,T=function(e){return e.current};function N(e){x=e}var D=Object.freeze({get applyAnimatedValues(){return v},injectApplyAnimatedValues:k,get colorNames(){return g},injectColorNames:y,get requestFrame(){return E},get cancelFrame(){return w},injectFrame:function(e,t){E=e,w=t},get interpolation(){return _},injectStringInterpolator:C,get now(){return B},injectNow:function(e){B=e},get defaultElement(){return S},injectDefaultElement:I,get animatedApi(){return T},injectAnimatedApi:function(e){T=e},get createAnimatedStyle(){return x},injectCreateAnimatedStyle:N,get manualFrameloop(){return P},injectManualFrameloop:function(e){P=e}}),A=function(e){function t(t,n){var r;return(r=e.call(this)||this).update=void 0,r.payload=t.style?o({},t,{style:x(t.style)}):t,r.update=n,r.attach(),r}return l(t,e),t}(j),R=!1,L=new Set,M=function e(){if(!R)return!1;var t=B(),n=L,r=Array.isArray(n),o=0;for(n=r?n:n[Symbol.iterator]();;){var c;if(r){if(o>=n.length)break;c=n[o++]}else{if((o=n.next()).done)break;c=o.value}for(var i=c,a=!1,l=0;l<i.configs.length;l++){for(var s=i.configs[l],u=void 0,d=void 0,b=0;b<s.animatedValues.length;b++){var f=s.animatedValues[b];if(!f.done){var p=s.fromValues[b],m=s.toValues[b],v=f.lastPosition,g=m instanceof O,h=Array.isArray(s.initialVelocity)?s.initialVelocity[b]:s.initialVelocity;if(g&&(m=m.getValue()),s.immediate)f.setValue(m),f.done=!0;else if("string"!=typeof p&&"string"!=typeof m){if(void 0!==s.duration)v=p+s.easing((t-f.startTime)/s.duration)*(m-p),u=t>=f.startTime+s.duration;else if(s.decay)v=p+h/(1-.998)*(1-Math.exp(-(1-.998)*(t-f.startTime))),(u=Math.abs(f.lastPosition-v)<.1)&&(m=v);else{d=void 0!==f.lastTime?f.lastTime:t,h=void 0!==f.lastVelocity?f.lastVelocity:s.initialVelocity,t>d+64&&(d=t);for(var j=Math.floor(t-d),k=0;k<j;++k)v+=1*(h+=(-s.tension*(v-m)+-s.friction*h)/s.mass*1/1e3)/1e3;var y=!(!s.clamp||0===s.tension)&&(p<m?v>m:v<m),_=Math.abs(h)<=s.precision,w=0===s.tension||Math.abs(m-v)<=s.precision;u=y||_&&w,f.lastVelocity=h,f.lastTime=t}g&&!s.toValues[b].done&&(u=!1),u?(f.value!==m&&(v=m),f.done=!0):a=!0,f.setValue(v),f.lastPosition=v}else f.setValue(m),f.done=!0}}i.props.onFrame&&(i.values[s.name]=s.interpolation.getValue())}i.props.onFrame&&i.props.onFrame(i.values),a||(L.delete(i),i.stop(!0))}return L.size?P?P():E(e):R=!1,R};function F(e,t,n){if("function"==typeof e)return e;if(Array.isArray(e))return F({range:e,output:t,extrapolate:n});if(_&&"string"==typeof e.output[0])return _(e);var r=e,o=r.output,c=r.range||[0,1],i=r.extrapolateLeft||r.extrapolate||"extend",a=r.extrapolateRight||r.extrapolate||"extend",l=r.easing||function(e){return e};return function(e){var t=function(e,t){for(var n=1;n<t.length-1&&!(t[n]>=e);++n);return n-1}(e,c);return function(e,t,n,r,o,c,i,a,l){var s=l?l(e):e;if(s<t){if("identity"===i)return s;"clamp"===i&&(s=t)}if(s>n){if("identity"===a)return s;"clamp"===a&&(s=n)}return r===o?r:t===n?e<=t?r:o:(t===-1/0?s=-s:n===1/0?s-=t:s=(s-t)/(n-t),s=c(s),r===-1/0?s=-s:o===1/0?s+=r:s=s*(o-r)+r,s)}(e,c[t],c[t+1],o[t],o[t+1],l,i,a,r.map)}}var V=function(e){function t(n,r,o){var c;return(c=e.call(this)||this).calc=void 0,c.payload=n instanceof h&&!(n instanceof t)?n.getPayload():Array.isArray(n)?n:[n],c.calc=F(r,o),c}l(t,e);var n=t.prototype;return n.getValue=function(){return this.calc.apply(this,this.payload.map((function(e){return e.getValue()})))},n.updateConfig=function(e,t){this.calc=F(e,t)},n.interpolate=function(e,n){return new t(this,e,n)},t}(h),H=function(e){function t(t){var n;return(n=e.call(this)||this).animatedStyles=new Set,n.value=void 0,n.startPosition=void 0,n.lastPosition=void 0,n.lastVelocity=void 0,n.startTime=void 0,n.lastTime=void 0,n.done=!1,n.setValue=function(e,t){void 0===t&&(t=!0),n.value=e,t&&n.flush()},n.value=t,n.startPosition=t,n.lastPosition=t,n}l(t,e);var n=t.prototype;return n.flush=function(){0===this.animatedStyles.size&&function e(t,n){"update"in t?n.add(t):t.getChildren().forEach((function(t){return e(t,n)}))}(this,this.animatedStyles),this.animatedStyles.forEach((function(e){return e.update()}))},n.clearStyles=function(){this.animatedStyles.clear()},n.getValue=function(){return this.value},n.interpolate=function(e,t){return new V(this,e,t)},t}(O),z=function(e){function t(t){var n;return(n=e.call(this)||this).payload=t.map((function(e){return new H(e)})),n}l(t,e);var n=t.prototype;return n.setValue=function(e,t){var n=this;void 0===t&&(t=!0),Array.isArray(e)?e.length===this.payload.length&&e.forEach((function(e,r){return n.payload[r].setValue(e,t)})):this.payload.forEach((function(n){return n.setValue(e,t)}))},n.getValue=function(){return this.payload.map((function(e){return e.getValue()}))},n.interpolate=function(e,t){return new V(this,e,t)},t}(h),G=0,U=function(){function e(){var e=this;this.id=void 0,this.idle=!0,this.hasChanged=!1,this.guid=0,this.local=0,this.props={},this.merged={},this.animations={},this.interpolations={},this.values={},this.configs=[],this.listeners=[],this.queue=[],this.localQueue=void 0,this.getValues=function(){return e.interpolations},this.id=G++}var t=e.prototype;return t.update=function(e){if(!e)return this;var t=m(e),n=t.delay,r=void 0===n?0:n,i=t.to,a=c(t,["delay","to"]);if(u.arr(i)||u.fun(i))this.queue.push(o({},a,{delay:r,to:i}));else if(i){var l={};Object.entries(i).forEach((function(e){var t,n=e[0],c=e[1],i=o({to:(t={},t[n]=c,t),delay:p(r,n)},a),s=l[i.delay]&&l[i.delay].to;l[i.delay]=o({},l[i.delay],i,{to:o({},s,i.to)})})),this.queue=Object.values(l)}return this.queue=this.queue.sort((function(e,t){return e.delay-t.delay})),this.diff(a),this},t.start=function(e){var t=this;if(this.queue.length){this.idle=!1,this.localQueue&&this.localQueue.forEach((function(e){var n=e.from,r=void 0===n?{}:n,c=e.to,i=void 0===c?{}:c;u.obj(r)&&(t.merged=o({},r,t.merged)),u.obj(i)&&(t.merged=o({},t.merged,i))}));var n=this.local=++this.guid,r=this.localQueue=this.queue;this.queue=[],r.forEach((function(o,i){var a=o.delay,l=c(o,["delay"]),s=function(o){i===r.length-1&&n===t.guid&&o&&(t.idle=!0,t.props.onRest&&t.props.onRest(t.merged)),e&&e()},d=u.arr(l.to)||u.fun(l.to);a?setTimeout((function(){n===t.guid&&(d?t.runAsync(l,s):t.diff(l).start(s))}),a):d?t.runAsync(l,s):t.diff(l).start(s)}))}else u.fun(e)&&this.listeners.push(e),this.props.onStart&&this.props.onStart(),this,L.has(this)||L.add(this),R||(R=!0,E(P||M));return this},t.stop=function(e){return this.listeners.forEach((function(t){return t(e)})),this.listeners=[],this},t.pause=function(e){return this.stop(!0),e&&(this,L.has(this)&&L.delete(this)),this},t.runAsync=function(e,t){var n=this,r=(e.delay,c(e,["delay"])),i=this.local,a=Promise.resolve(void 0);if(u.arr(r.to))for(var l=function(e){var t=e,c=o({},r,m(r.to[t]));u.arr(c.config)&&(c.config=c.config[t]),a=a.then((function(){if(i===n.guid)return new Promise((function(e){return n.diff(c).start(e)}))}))},s=0;s<r.to.length;s++)l(s);else if(u.fun(r.to)){var d,b=0;a=a.then((function(){return r.to((function(e){var t=o({},r,m(e));if(u.arr(t.config)&&(t.config=t.config[b]),b++,i===n.guid)return d=new Promise((function(e){return n.diff(t).start(e)}))}),(function(e){return void 0===e&&(e=!0),n.stop(e)})).then((function(){return d}))}))}a.then(t)},t.diff=function(e){var t=this;this.props=o({},this.props,e);var n=this.props,r=n.from,c=void 0===r?{}:r,i=n.to,a=void 0===i?{}:i,l=n.config,s=void 0===l?{}:l,d=n.reverse,m=n.attach,v=n.reset,O=n.immediate;if(d){var h=[a,c];c=h[0],a=h[1]}this.merged=o({},c,this.merged,a),this.hasChanged=!1;var j=m&&m(this);if(this.animations=Object.entries(this.merged).reduce((function(e,n){var r=n[0],i=n[1],a=e[r]||{},l=u.num(i),d=u.str(i)&&!i.startsWith("#")&&!/\d/.test(i)&&!g[i],m=u.arr(i),h=!l&&!m&&!d,k=u.und(c[r])?i:c[r],y=l||m||d?i:1,E=p(s,r);j&&(y=j.animations[r].parent);var w,C=a.parent,S=a.interpolation,I=f(j?y.getPayload():y),x=i;h&&(x=_({range:[0,1],output:[i,i]})(1));var P,T=S&&S.getValue(),N=!u.und(C)&&a.animatedValues.some((function(e){return!e.done})),D=!u.equ(x,T),A=!u.equ(x,a.previous),R=!u.equ(E,a.config);if(v||A&&D||R){var L;if(l||d)C=S=a.parent||new H(k);else if(m)C=S=a.parent||new z(k);else if(h){var M=a.interpolation&&a.interpolation.calc(a.parent.value);M=void 0===M||v?k:M,a.parent?(C=a.parent).setValue(0,!1):C=new H(0);var F={output:[M,i]};a.interpolation?(S=a.interpolation,a.interpolation.updateConfig(F)):S=C.interpolate(F)}return I=f(j?y.getPayload():y),w=f(C.getPayload()),v&&!h&&C.setValue(k,!1),t.hasChanged=!0,w.forEach((function(e){e.startPosition=e.value,e.lastPosition=e.value,e.lastVelocity=N?e.lastVelocity:void 0,e.lastTime=N?e.lastTime:void 0,e.startTime=B(),e.done=!1,e.animatedStyles.clear()})),p(O,r)&&C.setValue(h?y:i,!1),o({},e,((L={})[r]=o({},a,{name:r,parent:C,interpolation:S,animatedValues:w,toValues:I,previous:x,config:E,fromValues:f(C.getValue()),immediate:p(O,r),initialVelocity:b(E.velocity,0),clamp:b(E.clamp,!1),precision:b(E.precision,.01),tension:b(E.tension,170),friction:b(E.friction,26),mass:b(E.mass,1),duration:E.duration,easing:b(E.easing,(function(e){return e})),decay:E.decay}),L))}return D?e:(h&&(C.setValue(1,!1),S.updateConfig({output:[x,x]})),C.done=!0,t.hasChanged=!0,o({},e,((P={})[r]=o({},e[r],{previous:x}),P)))}),this.animations),this.hasChanged)for(var k in this.configs=Object.values(this.animations),this.values={},this.interpolations={},this.animations)this.interpolations[k]=this.animations[k].interpolation,this.values[k]=this.animations[k].interpolation.getValue();return this},t.destroy=function(){this.stop(),this.props={},this.merged={},this.animations={},this.interpolations={},this.values={},this.configs=[],this.local=0},e}(),W=function(e,t){var n=i.useRef(!1),r=i.useRef(),o=u.fun(t),c=i.useMemo((function(){var n;return r.current&&(r.current.map((function(e){return e.destroy()})),r.current=void 0),[new Array(e).fill().map((function(e,r){var c=new U,i=o?p(t,r,c):t[r];return 0===r&&(n=i.ref),c.update(i),n||c.start(),c})),n]}),[e]),a=c[0],l=c[1];r.current=a,i.useImperativeHandle(l,(function(){return{start:function(){return Promise.all(r.current.map((function(e){return new Promise((function(t){return e.start(t)}))})))},stop:function(e){return r.current.forEach((function(t){return t.stop(e)}))},get controllers(){return r.current}}}));var s=i.useMemo((function(){return function(e){return r.current.map((function(t,n){t.update(o?p(e,n,t):e[n]),l||t.start()}))}}),[e]);i.useEffect((function(){n.current?o||s(t):l||r.current.forEach((function(e){return e.start()}))})),i.useEffect((function(){return n.current=!0,function(){return r.current.forEach((function(e){return e.destroy()}))}}),[]);var d=r.current.map((function(e){return e.getValues()}));return o?[d,s,function(e){return r.current.forEach((function(t){return t.pause(e)}))}]:d},K=0,q=function(e,t){return("function"==typeof t?e.map(t):f(t)).map(String)},$=function(e){var t=e.items,n=e.keys,r=void 0===n?function(e){return e}:n,i=c(e,["items","keys"]);return t=f(void 0!==t?t:null),o({items:t,keys:q(t,r)},i)};function Y(e,t){var n=function(){if(o){if(c>=r.length)return"break";i=r[c++]}else{if((c=r.next()).done)return"break";i=c.value}var n=i.key,a=function(e){return e.key!==n};(u.und(t)||t===n)&&(e.current.instances.delete(n),e.current.transitions=e.current.transitions.filter(a),e.current.deleted=e.current.deleted.filter(a))},r=e.current.deleted,o=Array.isArray(r),c=0;for(r=o?r:r[Symbol.iterator]();;){var i;if("break"===n())break}e.current.forceUpdate()}var X=function(e){function t(t){var n;return void 0===t&&(t={}),n=e.call(this)||this,!t.transform||t.transform instanceof O||(t=v.transform(t)),n.payload=t,n}return l(t,e),t}(j),Q={transparent:0,aliceblue:4042850303,antiquewhite:4209760255,aqua:16777215,aquamarine:2147472639,azure:4043309055,beige:4126530815,bisque:4293182719,black:255,blanchedalmond:4293643775,blue:65535,blueviolet:2318131967,brown:2771004159,burlywood:3736635391,burntsienna:3934150143,cadetblue:1604231423,chartreuse:2147418367,chocolate:3530104575,coral:4286533887,cornflowerblue:1687547391,cornsilk:4294499583,crimson:3692313855,cyan:16777215,darkblue:35839,darkcyan:9145343,darkgoldenrod:3095792639,darkgray:2846468607,darkgreen:6553855,darkgrey:2846468607,darkkhaki:3182914559,darkmagenta:2332068863,darkolivegreen:1433087999,darkorange:4287365375,darkorchid:2570243327,darkred:2332033279,darksalmon:3918953215,darkseagreen:2411499519,darkslateblue:1211993087,darkslategray:793726975,darkslategrey:793726975,darkturquoise:13554175,darkviolet:2483082239,deeppink:4279538687,deepskyblue:12582911,dimgray:1768516095,dimgrey:1768516095,dodgerblue:512819199,firebrick:2988581631,floralwhite:4294635775,forestgreen:579543807,fuchsia:4278255615,gainsboro:3705462015,ghostwhite:4177068031,gold:4292280575,goldenrod:3668254975,gray:2155905279,green:8388863,greenyellow:2919182335,grey:2155905279,honeydew:4043305215,hotpink:4285117695,indianred:3445382399,indigo:1258324735,ivory:4294963455,khaki:4041641215,lavender:3873897215,lavenderblush:4293981695,lawngreen:2096890111,lemonchiffon:4294626815,lightblue:2916673279,lightcoral:4034953471,lightcyan:3774873599,lightgoldenrodyellow:4210742015,lightgray:3553874943,lightgreen:2431553791,lightgrey:3553874943,lightpink:4290167295,lightsalmon:4288707327,lightseagreen:548580095,lightskyblue:2278488831,lightslategray:2005441023,lightslategrey:2005441023,lightsteelblue:2965692159,lightyellow:4294959359,lime:16711935,limegreen:852308735,linen:4210091775,magenta:4278255615,maroon:2147483903,mediumaquamarine:1724754687,mediumblue:52735,mediumorchid:3126187007,mediumpurple:2473647103,mediumseagreen:1018393087,mediumslateblue:2070474495,mediumspringgreen:16423679,mediumturquoise:1221709055,mediumvioletred:3340076543,midnightblue:421097727,mintcream:4127193855,mistyrose:4293190143,moccasin:4293178879,navajowhite:4292783615,navy:33023,oldlace:4260751103,olive:2155872511,olivedrab:1804477439,orange:4289003775,orangered:4282712319,orchid:3664828159,palegoldenrod:4008225535,palegreen:2566625535,paleturquoise:2951671551,palevioletred:3681588223,papayawhip:4293907967,peachpuff:4292524543,peru:3448061951,pink:4290825215,plum:3718307327,powderblue:2967529215,purple:2147516671,rebeccapurple:1714657791,red:4278190335,rosybrown:3163525119,royalblue:1097458175,saddlebrown:2336560127,salmon:4202722047,sandybrown:4104413439,seagreen:780883967,seashell:4294307583,sienna:2689740287,silver:3233857791,skyblue:2278484991,slateblue:1784335871,slategray:1887473919,slategrey:1887473919,snow:4294638335,springgreen:16744447,steelblue:1182971135,tan:3535047935,teal:8421631,thistle:3636451583,tomato:4284696575,turquoise:1088475391,violet:4001558271,wheat:4125012991,white:4294967295,whitesmoke:4126537215,yellow:4294902015,yellowgreen:2597139199},Z="[-+]?\\d*\\.?\\d+";function J(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return"\\(\\s*("+t.join(")\\s*,\\s*(")+")\\s*\\)"}var ee=new RegExp("rgb"+J(Z,Z,Z)),te=new RegExp("rgba"+J(Z,Z,Z,Z)),ne=new RegExp("hsl"+J(Z,"[-+]?\\d*\\.?\\d+%","[-+]?\\d*\\.?\\d+%")),re=new RegExp("hsla"+J(Z,"[-+]?\\d*\\.?\\d+%","[-+]?\\d*\\.?\\d+%",Z)),oe=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,ce=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,ie=/^#([0-9a-fA-F]{6})$/,ae=/^#([0-9a-fA-F]{8})$/;function le(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+6*(t-e)*n:n<.5?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function se(e,t,n){var r=n<.5?n*(1+t):n+t-n*t,o=2*n-r,c=le(o,r,e+1/3),i=le(o,r,e),a=le(o,r,e-1/3);return Math.round(255*c)<<24|Math.round(255*i)<<16|Math.round(255*a)<<8}function ue(e){var t=parseInt(e,10);return t<0?0:t>255?255:t}function de(e){return(parseFloat(e)%360+360)%360/360}function be(e){var t=parseFloat(e);return t<0?0:t>1?255:Math.round(255*t)}function fe(e){var t=parseFloat(e);return t<0?0:t>100?1:t/100}function pe(e){var t,n,r="number"==typeof(t=e)?t>>>0===t&&t>=0&&t<=4294967295?t:null:(n=ie.exec(t))?parseInt(n[1]+"ff",16)>>>0:Q.hasOwnProperty(t)?Q[t]:(n=ee.exec(t))?(ue(n[1])<<24|ue(n[2])<<16|ue(n[3])<<8|255)>>>0:(n=te.exec(t))?(ue(n[1])<<24|ue(n[2])<<16|ue(n[3])<<8|be(n[4]))>>>0:(n=oe.exec(t))?parseInt(n[1]+n[1]+n[2]+n[2]+n[3]+n[3]+"ff",16)>>>0:(n=ae.exec(t))?parseInt(n[1],16)>>>0:(n=ce.exec(t))?parseInt(n[1]+n[1]+n[2]+n[2]+n[3]+n[3]+n[4]+n[4],16)>>>0:(n=ne.exec(t))?(255|se(de(n[1]),fe(n[2]),fe(n[3])))>>>0:(n=re.exec(t))?(se(de(n[1]),fe(n[2]),fe(n[3]))|be(n[4]))>>>0:null;return null===r?e:"rgba("+((4278190080&(r=r||0))>>>24)+", "+((16711680&r)>>>16)+", "+((65280&r)>>>8)+", "+(255&r)/255+")"}var me=/[+\-]?(?:0|[1-9]\d*)(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,ve=/(#(?:[0-9a-f]{2}){2,4}|(#[0-9a-f]{3})|(rgb|hsl)a?\((-?\d+%?[,\s]+){2,3}\s*[\d\.]+%?\))/gi,ge=new RegExp("("+Object.keys(Q).join("|")+")","g"),Oe={animationIterationCount:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},he=["Webkit","Ms","Moz","O"];function je(e,t,n){return null==t||"boolean"==typeof t||""===t?"":n||"number"!=typeof t||0===t||Oe.hasOwnProperty(e)&&Oe[e]?(""+t).trim():t+"px"}Oe=Object.keys(Oe).reduce((function(e,t){return he.forEach((function(n){return e[function(e,t){return e+t.charAt(0).toUpperCase()+t.substring(1)}(n,t)]=e[t]})),e}),Oe);var ke={};N((function(e){return new X(e)})),I("div"),C((function(e){var t=e.output.map((function(e){return e.replace(ve,pe)})).map((function(e){return e.replace(ge,pe)})),n=t[0].match(me).map((function(){return[]}));t.forEach((function(e){e.match(me).forEach((function(e,t){return n[t].push(+e)}))}));var r=t[0].match(me).map((function(t,r){return F(o({},e,{output:n[r]}))}));return function(e){var n=0;return t[0].replace(me,(function(){return r[n++](e)})).replace(/rgba\(([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+)\)/gi,(function(e,t,n,r,o){return"rgba("+Math.round(t)+", "+Math.round(n)+", "+Math.round(r)+", "+o+")"}))}})),y(Q),k((function(e,t){if(!e.nodeType||void 0===e.setAttribute)return!1;var n=t.style,r=t.children,o=t.scrollTop,i=t.scrollLeft,a=c(t,["style","children","scrollTop","scrollLeft"]),l="filter"===e.nodeName||e.parentNode&&"filter"===e.parentNode.nodeName;for(var s in void 0!==o&&(e.scrollTop=o),void 0!==i&&(e.scrollLeft=i),void 0!==r&&(e.textContent=r),n)if(n.hasOwnProperty(s)){var u=0===s.indexOf("--"),d=je(s,n[s],u);"float"===s&&(s="cssFloat"),u?e.style.setProperty(s,d):e.style[s]=d}for(var b in a){var f=l?b:ke[b]||(ke[b]=b.replace(/([A-Z])/g,(function(e){return"-"+e.toLowerCase()})));void 0!==e.getAttribute(f)&&e.setAttribute(f,a[b])}}),(function(e){return e}));var ye,_e,Ee=(ye=function(e){return i.forwardRef((function(t,n){var r=d(),l=i.useRef(!0),s=i.useRef(null),b=i.useRef(null),f=i.useCallback((function(e){var t=s.current;s.current=new A(e,(function(){b.current&&!1===v.fn(b.current,s.current.getAnimatedValue())&&r()})),t&&t.detach()}),[]);i.useEffect((function(){return function(){l.current=!1,s.current&&s.current.detach()}}),[]),i.useImperativeHandle(n,(function(){return T(b,l,r)})),f(t);var p=s.current.getValue(),m=(p.scrollTop,p.scrollLeft,c(p,["scrollTop","scrollLeft"]));return a.createElement(e,o({},m,{ref:function(e){return b.current=(t=e,(r=n)&&(u.fun(r)?r(t):u.obj(r)&&(r.current=t)),t);var t,r}}))}))},void 0===(_e=!1)&&(_e=!0),function(e){return(u.arr(e)?e:Object.keys(e)).reduce((function(e,t){var n=_e?t[0].toLowerCase()+t.substring(1):t;return e[n]=ye(n),e}),ye)}),we=Ee(["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","tspan"]);t.apply=Ee,t.config={default:{tension:170,friction:26},gentle:{tension:120,friction:14},wobbly:{tension:180,friction:12},stiff:{tension:210,friction:20},slow:{tension:280,friction:60},molasses:{tension:280,friction:120}},t.update=M,t.animated=we,t.a=we,t.interpolate=function(e,t,n){return e&&new V(e,t,n)},t.Globals=D,t.useSpring=function(e){var t=u.fun(e),n=W(1,t?e:[e]),r=n[0],o=n[1],c=n[2];return t?[r[0],o,c]:r},t.useTrail=function(e,t){var n=i.useRef(!1),r=u.fun(t),c=p(t),a=i.useRef(),l=W(e,(function(e,t){return 0===e&&(a.current=[]),a.current.push(t),o({},c,{config:p(c.config,e),attach:e>0&&function(){return a.current[e-1]}})})),s=l[0],d=l[1],b=l[2],f=i.useMemo((function(){return function(e){return d((function(t,n){e.reverse;var r=e.reverse?t+1:t-1,i=a.current[r];return o({},e,{config:p(e.config||c.config,t),attach:i&&function(){return i}})}))}}),[e,c.reverse]);return i.useEffect((function(){n.current&&!r&&f(t)})),i.useEffect((function(){n.current=!0}),[]),r?[s,f,b]:s},t.useTransition=function(e,t,n){var r=o({items:e,keys:t||function(e){return e}},n),a=$(r),l=a.lazy,s=void 0!==l&&l,u=(a.unique,a.reset),b=void 0!==u&&u,f=(a.enter,a.leave,a.update,a.onDestroyed),m=(a.keys,a.items,a.onFrame),v=a.onRest,g=a.onStart,O=a.ref,h=c(a,["lazy","unique","reset","enter","leave","update","onDestroyed","keys","items","onFrame","onRest","onStart","ref"]),j=d(),k=i.useRef(!1),y=i.useRef({mounted:!1,first:!0,deleted:[],current:{},transitions:[],prevProps:{},paused:!!r.ref,instances:!k.current&&new Map,forceUpdate:j});return i.useImperativeHandle(r.ref,(function(){return{start:function(){return Promise.all(Array.from(y.current.instances).map((function(e){var t=e[1];return new Promise((function(e){return t.start(e)}))})))},stop:function(e){return Array.from(y.current.instances).forEach((function(t){return t[1].stop(e)}))},get controllers(){return Array.from(y.current.instances).map((function(e){return e[1]}))}}})),y.current=function(e,t){for(var n=e.first,r=e.prevProps,i=c(e,["first","prevProps"]),a=$(t),l=a.items,s=a.keys,u=a.initial,d=a.from,b=a.enter,f=a.leave,m=a.update,v=a.trail,g=void 0===v?0:v,O=a.unique,h=a.config,j=a.order,k=void 0===j?["enter","leave","update"]:j,y=$(r),_=y.keys,E=y.items,w=o({},i.current),C=[].concat(i.deleted),S=Object.keys(w),B=new Set(S),I=new Set(s),x=s.filter((function(e){return!B.has(e)})),P=i.transitions.filter((function(e){return!e.destroyed&&!I.has(e.originalKey)})).map((function(e){return e.originalKey})),T=s.filter((function(e){return B.has(e)})),N=-g;k.length;)switch(k.shift()){case"enter":x.forEach((function(e,t){O&&C.find((function(t){return t.originalKey===e}))&&(C=C.filter((function(t){return t.originalKey!==e})));var r=s.indexOf(e),o=l[r],c=n&&void 0!==u?"initial":"enter";w[e]={slot:c,originalKey:e,key:O?String(e):K++,item:o,trail:N+=g,config:p(h,o,c),from:p(n&&void 0!==u?u||{}:d,o),to:p(b,o)}}));break;case"leave":P.forEach((function(e){var t=_.indexOf(e),n=E[t];C.unshift(o({},w[e],{slot:"leave",destroyed:!0,left:_[Math.max(0,t-1)],right:_[Math.min(_.length,t+1)],trail:N+=g,config:p(h,n,"leave"),to:p(f,n)})),delete w[e]}));break;case"update":T.forEach((function(e){var t=s.indexOf(e),n=l[t];w[e]=o({},w[e],{item:n,slot:"update",trail:N+=g,config:p(h,n,"update"),to:p(m,n)})}))}var D=s.map((function(e){return w[e]}));return C.forEach((function(e){var t,n=e.left,r=(e.right,c(e,["left","right"]));-1!==(t=D.findIndex((function(e){return e.originalKey===n})))&&(t+=1),t=Math.max(0,t),D=[].concat(D.slice(0,t),[r],D.slice(t))})),o({},i,{changed:x.length||P.length||T.length,first:n&&0===x.length,transitions:D,current:w,deleted:C,prevProps:t})}(y.current,r),y.current.changed&&y.current.transitions.forEach((function(e){var t=e.slot,n=e.from,r=e.to,c=e.config,i=e.trail,a=e.key,l=e.item;y.current.instances.has(a)||y.current.instances.set(a,new U);var u=y.current.instances.get(a),d=o({},h,{to:r,from:n,config:c,ref:O,onRest:function(n){y.current.mounted&&(e.destroyed&&(O||s||Y(y,a),f&&f(l)),!Array.from(y.current.instances).some((function(e){return!e[1].idle}))&&(O||s)&&y.current.deleted.length>0&&Y(y),v&&v(l,t,n))},onStart:g&&function(){return g(l,t)},onFrame:m&&function(e){return m(l,t,e)},delay:i,reset:b&&"enter"===t});u.update(d),y.current.paused||u.start()})),i.useEffect((function(){return y.current.mounted=k.current=!0,function(){y.current.mounted=k.current=!1,Array.from(y.current.instances).map((function(e){return e[1].destroy()})),y.current.instances.clear()}}),[]),y.current.transitions.map((function(e){var t=e.item,n=e.slot,r=e.key;return{item:t,key:r,state:n,props:y.current.instances.get(r).getValues()}}))},t.useChain=function(e,t,n){void 0===n&&(n=1e3);var r=i.useRef();i.useEffect((function(){u.equ(e,r.current)?e.forEach((function(e){var t=e.current;return t&&t.start()})):t?e.forEach((function(e,r){var c=e.current;if(c){var i=c.controllers;if(i.length){var a=n*t[r];i.forEach((function(e){e.queue=e.queue.map((function(e){return o({},e,{delay:e.delay+a})})),e.start()}))}}})):e.reduce((function(e,t,n){var r=t.current;return e.then((function(){return r.start()}))}),Promise.resolve()),r.current=e}))},t.useSprings=W},13:function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(48);function o(e,t){if(null==e)return{};var n,o,c=Object(r.a)(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(o=0;o<i.length;o++)n=i[o],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(c[n]=e[n])}return c}},138:function(e,t,n){"use strict";e.exports=n(214)},139:function(e,t){e.exports=window.wp.wordcount},14:function(e,t){e.exports=window.wp.compose},143:function(e,t){e.exports=window.wp.shortcode},145:function(e,t,n){"use strict";var r=n(5),o=n(13),c=n(0);function i(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}t.a=function(e){var t=e.icon,n=e.size,a=void 0===n?24:n,l=Object(o.a)(e,["icon","size"]);return Object(c.cloneElement)(t,function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?i(Object(n),!0).forEach((function(t){Object(r.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):i(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({width:a,height:a},l))}},146:function(e,t,n){"use strict";var r=n(0),o=n(7),c=Object(r.createElement)(o.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(r.createElement)(o.Path,{d:"M13 11.9l3.3-3.4-1.1-1-3.2 3.3-3.2-3.3-1.1 1 3.3 3.4-3.5 3.6 1 1L12 13l3.5 3.5 1-1z"}));t.a=c},147:function(e,t,n){"use strict";var r=n(0),o=n(7),c=Object(r.createElement)(o.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(r.createElement)(o.Path,{d:"M13 11.8l6.1-6.3-1-1-6.1 6.2-6.1-6.2-1 1 6.1 6.3-6.5 6.7 1 1 6.5-6.6 6.5 6.6 1-1z"}));t.a=c},148:function(e,t,n){"use strict";var r=n(0),o=n(7),c=Object(r.createElement)(o.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(r.createElement)(o.Path,{d:"M18.3 5.6L9.9 16.9l-4.6-3.4-.9 1.2 5.8 4.3 9.3-12.6z"}));t.a=c},15:function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(25),o=n(40),c=n(30);function i(e){return function(e){if(Array.isArray(e))return Object(r.a)(e)}(e)||Object(o.a)(e)||Object(c.a)(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}},159:function(e,t,n){"use strict";var r=n(160);function o(){}function c(){}c.resetWarningCache=o,e.exports=function(){function e(e,t,n,o,c,i){if(i!==r){var a=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw a.name="Invariant Violation",a}}function t(){return e}e.isRequired=e;var n={array:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:c,resetWarningCache:o};return n.PropTypes=n,n}},16:function(e,t){e.exports=window.regeneratorRuntime},160:function(e,t,n){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},17:function(e,t){e.exports=window.wp.keycodes},172:function(e,t){e.exports=window.wp.tokenList},179:function(e,t,n){"use strict";var r=n(0),o=n(7),c=Object(r.createElement)(o.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(r.createElement)(o.Path,{d:"M19 8h-1V6h-5v2h-2V6H6v2H5c-1.1 0-2 .9-2 2v8c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2v-8c0-1.1-.9-2-2-2zm.5 10c0 .3-.2.5-.5.5H5c-.3 0-.5-.2-.5-.5v-8c0-.3.2-.5.5-.5h14c.3 0 .5.2.5.5v8z"}));t.a=c},180:function(e,t){e.exports=function(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}},181:function(e,t,n){"use strict";var r=n(0),o=n(7),c=Object(r.createElement)(o.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(r.createElement)(o.Path,{d:"M18 11.2h-5.2V6h-1.6v5.2H6v1.6h5.2V18h1.6v-5.2H18z"}));t.a=c},19:function(e,t,n){"use strict";function r(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}n.d(t,"a",(function(){return r}))},195:function(e,t){"function"==typeof Object.create?e.exports=function(e,t){e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})}:e.exports=function(e,t){e.super_=t;var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e}},2:function(e,t){e.exports=window.lodash},206:function(e,t){function n(){return e.exports=n=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},n.apply(this,arguments)}e.exports=n},207:function(e,t){e.exports=function(e,t){if(null==e)return{};var n,r,o={},c=Object.keys(e);for(r=0;r<c.length;r++)n=c[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}},208:function(e,t){e.exports=function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}},209:function(e,t,n){"use strict";var r=n(0),o=n(7),c=Object(r.createElement)(o.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},Object(r.createElement)(o.Path,{d:"M17.5 11.6L12 16l-5.5-4.4.9-1.2L12 14l4.5-3.6 1 1.2z"}));t.a=c},210:function(e,t,n){"use strict";var r,o=this&&this.__extends||(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},function(e,t){function __(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(__.prototype=t.prototype,new __)}),c=this&&this.__assign||Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},i=this&&this.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&(n[r[o]]=e[r[o]])}return n};t.__esModule=!0;var a=n(8),l=n(35),s=n(211),u=n(212),d=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.state={lineHeight:null},t.textarea=null,t.onResize=function(e){t.props.onResize&&t.props.onResize(e)},t.updateLineHeight=function(){t.textarea&&t.setState({lineHeight:u(t.textarea)})},t.onChange=function(e){var n=t.props.onChange;t.currentValue=e.currentTarget.value,n&&n(e)},t}return o(t,e),t.prototype.componentDidMount=function(){var e=this,t=this.props,n=t.maxRows,r=t.async;"number"==typeof n&&this.updateLineHeight(),"number"==typeof n||r?setTimeout((function(){return e.textarea&&s(e.textarea)})):this.textarea&&s(this.textarea),this.textarea&&this.textarea.addEventListener("autosize:resized",this.onResize)},t.prototype.componentWillUnmount=function(){this.textarea&&(this.textarea.removeEventListener("autosize:resized",this.onResize),s.destroy(this.textarea))},t.prototype.render=function(){var e=this,t=this.props,n=(t.onResize,t.maxRows),r=(t.onChange,t.style),o=(t.innerRef,t.children),l=i(t,["onResize","maxRows","onChange","style","innerRef","children"]),s=this.state.lineHeight,u=n&&s?s*n:null;return a.createElement("textarea",c({},l,{onChange:this.onChange,style:u?c({},r,{maxHeight:u}):r,ref:function(t){e.textarea=t,"function"==typeof e.props.innerRef?e.props.innerRef(t):e.props.innerRef&&(e.props.innerRef.current=t)}}),o)},t.prototype.componentDidUpdate=function(){this.textarea&&s.update(this.textarea)},t.defaultProps={rows:1,async:!1},t.propTypes={rows:l.number,maxRows:l.number,onResize:l.func,innerRef:l.any,async:l.bool},t}(a.Component);t.TextareaAutosize=a.forwardRef((function(e,t){return a.createElement(d,c({},e,{innerRef:t}))}))},211:function(e,t,n){var r,o;void 0===(o="function"==typeof(r=function(e,t){"use strict";var n,r,o="function"==typeof Map?new Map:(n=[],r=[],{has:function(e){return n.indexOf(e)>-1},get:function(e){return r[n.indexOf(e)]},set:function(e,t){-1===n.indexOf(e)&&(n.push(e),r.push(t))},delete:function(e){var t=n.indexOf(e);t>-1&&(n.splice(t,1),r.splice(t,1))}}),c=function(e){return new Event(e,{bubbles:!0})};try{new Event("test")}catch(e){c=function(e){var t=document.createEvent("Event");return t.initEvent(e,!0,!1),t}}function i(e){var t=o.get(e);t&&t.destroy()}function a(e){var t=o.get(e);t&&t.update()}var l=null;"undefined"==typeof window||"function"!=typeof window.getComputedStyle?((l=function(e){return e}).destroy=function(e){return e},l.update=function(e){return e}):((l=function(e,t){return e&&Array.prototype.forEach.call(e.length?e:[e],(function(e){return function(e){if(e&&e.nodeName&&"TEXTAREA"===e.nodeName&&!o.has(e)){var t,n=null,r=null,i=null,a=function(){e.clientWidth!==r&&d()},l=function(t){window.removeEventListener("resize",a,!1),e.removeEventListener("input",d,!1),e.removeEventListener("keyup",d,!1),e.removeEventListener("autosize:destroy",l,!1),e.removeEventListener("autosize:update",d,!1),Object.keys(t).forEach((function(n){e.style[n]=t[n]})),o.delete(e)}.bind(e,{height:e.style.height,resize:e.style.resize,overflowY:e.style.overflowY,overflowX:e.style.overflowX,wordWrap:e.style.wordWrap});e.addEventListener("autosize:destroy",l,!1),"onpropertychange"in e&&"oninput"in e&&e.addEventListener("keyup",d,!1),window.addEventListener("resize",a,!1),e.addEventListener("input",d,!1),e.addEventListener("autosize:update",d,!1),e.style.overflowX="hidden",e.style.wordWrap="break-word",o.set(e,{destroy:l,update:d}),"vertical"===(t=window.getComputedStyle(e,null)).resize?e.style.resize="none":"both"===t.resize&&(e.style.resize="horizontal"),n="content-box"===t.boxSizing?-(parseFloat(t.paddingTop)+parseFloat(t.paddingBottom)):parseFloat(t.borderTopWidth)+parseFloat(t.borderBottomWidth),isNaN(n)&&(n=0),d()}function s(t){var n=e.style.width;e.style.width="0px",e.offsetWidth,e.style.width=n,e.style.overflowY=t}function u(){if(0!==e.scrollHeight){var t=function(e){for(var t=[];e&&e.parentNode&&e.parentNode instanceof Element;)e.parentNode.scrollTop&&t.push({node:e.parentNode,scrollTop:e.parentNode.scrollTop}),e=e.parentNode;return t}(e),o=document.documentElement&&document.documentElement.scrollTop;e.style.height="",e.style.height=e.scrollHeight+n+"px",r=e.clientWidth,t.forEach((function(e){e.node.scrollTop=e.scrollTop})),o&&(document.documentElement.scrollTop=o)}}function d(){u();var t=Math.round(parseFloat(e.style.height)),n=window.getComputedStyle(e,null),r="content-box"===n.boxSizing?Math.round(parseFloat(n.height)):e.offsetHeight;if(r<t?"hidden"===n.overflowY&&(s("scroll"),u(),r="content-box"===n.boxSizing?Math.round(parseFloat(window.getComputedStyle(e,null).height)):e.offsetHeight):"hidden"!==n.overflowY&&(s("hidden"),u(),r="content-box"===n.boxSizing?Math.round(parseFloat(window.getComputedStyle(e,null).height)):e.offsetHeight),i!==r){i=r;var o=c("autosize:resized");try{e.dispatchEvent(o)}catch(e){}}}}(e)})),e}).destroy=function(e){return e&&Array.prototype.forEach.call(e.length?e:[e],i),e},l.update=function(e){return e&&Array.prototype.forEach.call(e.length?e:[e],a),e}),t.default=l,e.exports=t.default})?r.apply(t,[e,t]):r)||(e.exports=o)},212:function(e,t,n){var r=n(213);e.exports=function(e){var t=r(e,"line-height"),n=parseFloat(t,10);if(t===n+""){var o=e.style.lineHeight;e.style.lineHeight=t+"em",t=r(e,"line-height"),n=parseFloat(t,10),o?e.style.lineHeight=o:delete e.style.lineHeight}if(-1!==t.indexOf("pt")?(n*=4,n/=3):-1!==t.indexOf("mm")?(n*=96,n/=25.4):-1!==t.indexOf("cm")?(n*=96,n/=2.54):-1!==t.indexOf("in")?n*=96:-1!==t.indexOf("pc")&&(n*=16),n=Math.round(n),"normal"===t){var c=e.nodeName,i=document.createElement(c);i.innerHTML="&nbsp;","TEXTAREA"===c.toUpperCase()&&i.setAttribute("rows","1");var a=r(e,"font-size");i.style.fontSize=a,i.style.padding="0px",i.style.border="0px";var l=document.body;l.appendChild(i),n=i.offsetHeight,l.removeChild(i)}return n}},213:function(e,t){e.exports=function(e,t,n){return((n=window.getComputedStyle)?n(e):e.currentStyle)[t.replace(/-(\w)/gi,(function(e,t){return t.toUpperCase()}))]}},214:function(e,t,n){"use strict";var r=n(215);e.exports=function(e,t,n){n=n||{},9===t.nodeType&&(t=r.getWindow(t));var o=n.allowHorizontalScroll,c=n.onlyScrollIfNeeded,i=n.alignWithTop,a=n.alignWithLeft,l=n.offsetTop||0,s=n.offsetLeft||0,u=n.offsetBottom||0,d=n.offsetRight||0;o=void 0===o||o;var b=r.isWindow(t),f=r.offset(e),p=r.outerHeight(e),m=r.outerWidth(e),v=void 0,g=void 0,O=void 0,h=void 0,j=void 0,k=void 0,y=void 0,_=void 0,E=void 0,w=void 0;b?(y=t,w=r.height(y),E=r.width(y),_={left:r.scrollLeft(y),top:r.scrollTop(y)},j={left:f.left-_.left-s,top:f.top-_.top-l},k={left:f.left+m-(_.left+E)+d,top:f.top+p-(_.top+w)+u},h=_):(v=r.offset(t),g=t.clientHeight,O=t.clientWidth,h={left:t.scrollLeft,top:t.scrollTop},j={left:f.left-(v.left+(parseFloat(r.css(t,"borderLeftWidth"))||0))-s,top:f.top-(v.top+(parseFloat(r.css(t,"borderTopWidth"))||0))-l},k={left:f.left+m-(v.left+O+(parseFloat(r.css(t,"borderRightWidth"))||0))+d,top:f.top+p-(v.top+g+(parseFloat(r.css(t,"borderBottomWidth"))||0))+u}),j.top<0||k.top>0?!0===i?r.scrollTop(t,h.top+j.top):!1===i?r.scrollTop(t,h.top+k.top):j.top<0?r.scrollTop(t,h.top+j.top):r.scrollTop(t,h.top+k.top):c||((i=void 0===i||!!i)?r.scrollTop(t,h.top+j.top):r.scrollTop(t,h.top+k.top)),o&&(j.left<0||k.left>0?!0===a?r.scrollLeft(t,h.left+j.left):!1===a?r.scrollLeft(t,h.left+k.left):j.left<0?r.scrollLeft(t,h.left+j.left):r.scrollLeft(t,h.left+k.left):c||((a=void 0===a||!!a)?r.scrollLeft(t,h.left+j.left):r.scrollLeft(t,h.left+k.left)))}},215:function(e,t,n){"use strict";var r=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol?"symbol":typeof e};function c(e,t){var n=e["page"+(t?"Y":"X")+"Offset"],r="scroll"+(t?"Top":"Left");if("number"!=typeof n){var o=e.document;"number"!=typeof(n=o.documentElement[r])&&(n=o.body[r])}return n}function i(e){return c(e)}function a(e){return c(e,!0)}function l(e){var t=function(e){var t,n=void 0,r=void 0,o=e.ownerDocument,c=o.body,i=o&&o.documentElement;return n=(t=e.getBoundingClientRect()).left,r=t.top,{left:n-=i.clientLeft||c.clientLeft||0,top:r-=i.clientTop||c.clientTop||0}}(e),n=e.ownerDocument,r=n.defaultView||n.parentWindow;return t.left+=i(r),t.top+=a(r),t}var s=new RegExp("^("+/[\-+]?(?:\d*\.|)\d+(?:[eE][\-+]?\d+|)/.source+")(?!px)[a-z%]+$","i"),u=/^(top|right|bottom|left)$/,d="left",b=void 0;function f(e,t){for(var n=0;n<e.length;n++)t(e[n])}function p(e){return"border-box"===b(e,"boxSizing")}"undefined"!=typeof window&&(b=window.getComputedStyle?function(e,t,n){var r="",o=e.ownerDocument,c=n||o.defaultView.getComputedStyle(e,null);return c&&(r=c.getPropertyValue(t)||c[t]),r}:function(e,t){var n=e.currentStyle&&e.currentStyle[t];if(s.test(n)&&!u.test(t)){var r=e.style,o=r[d],c=e.runtimeStyle[d];e.runtimeStyle[d]=e.currentStyle[d],r[d]="fontSize"===t?"1em":n||0,n=r.pixelLeft+"px",r[d]=o,e.runtimeStyle[d]=c}return""===n?"auto":n});var m=["margin","border","padding"];function v(e,t,n){var r={},o=e.style,c=void 0;for(c in t)t.hasOwnProperty(c)&&(r[c]=o[c],o[c]=t[c]);for(c in n.call(e),t)t.hasOwnProperty(c)&&(o[c]=r[c])}function g(e,t,n){var r=0,o=void 0,c=void 0,i=void 0;for(c=0;c<t.length;c++)if(o=t[c])for(i=0;i<n.length;i++){var a;a="border"===o?o+n[i]+"Width":o+n[i],r+=parseFloat(b(e,a))||0}return r}function O(e){return null!=e&&e==e.window}var h={};function j(e,t,n){if(O(e))return"width"===t?h.viewportWidth(e):h.viewportHeight(e);if(9===e.nodeType)return"width"===t?h.docWidth(e):h.docHeight(e);var r="width"===t?["Left","Right"]:["Top","Bottom"],o="width"===t?e.offsetWidth:e.offsetHeight,c=(b(e),p(e)),i=0;(null==o||o<=0)&&(o=void 0,(null==(i=b(e,t))||Number(i)<0)&&(i=e.style[t]||0),i=parseFloat(i)||0),void 0===n&&(n=c?1:-1);var a=void 0!==o||c,l=o||i;if(-1===n)return a?l-g(e,["border","padding"],r):i;if(a){var s=2===n?-g(e,["border"],r):g(e,["margin"],r);return l+(1===n?0:s)}return i+g(e,m.slice(n),r)}f(["Width","Height"],(function(e){h["doc"+e]=function(t){var n=t.document;return Math.max(n.documentElement["scroll"+e],n.body["scroll"+e],h["viewport"+e](n))},h["viewport"+e]=function(t){var n="client"+e,r=t.document,o=r.body,c=r.documentElement[n];return"CSS1Compat"===r.compatMode&&c||o&&o[n]||c}}));var k={position:"absolute",visibility:"hidden",display:"block"};function y(e){var t=void 0,n=arguments;return 0!==e.offsetWidth?t=j.apply(void 0,n):v(e,k,(function(){t=j.apply(void 0,n)})),t}function _(e,t,n){var r=n;if("object"!==(void 0===t?"undefined":o(t)))return void 0!==r?("number"==typeof r&&(r+="px"),void(e.style[t]=r)):b(e,t);for(var c in t)t.hasOwnProperty(c)&&_(e,c,t[c])}f(["width","height"],(function(e){var t=e.charAt(0).toUpperCase()+e.slice(1);h["outer"+t]=function(t,n){return t&&y(t,e,n?0:1)};var n="width"===e?["Left","Right"]:["Top","Bottom"];h[e]=function(t,r){return void 0===r?t&&y(t,e,-1):t?(b(t),p(t)&&(r+=g(t,["padding","border"],n)),_(t,e,r)):void 0}})),e.exports=r({getWindow:function(e){var t=e.ownerDocument||e;return t.defaultView||t.parentWindow},offset:function(e,t){if(void 0===t)return l(e);!function(e,t){"static"===_(e,"position")&&(e.style.position="relative");var n=l(e),r={},o=void 0,c=void 0;for(c in t)t.hasOwnProperty(c)&&(o=parseFloat(_(e,c))||0,r[c]=o+t[c]-n[c]);_(e,r)}(e,t)},isWindow:O,each:f,css:_,clone:function(e){var t={};for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);if(e.overflow)for(var n in e)e.hasOwnProperty(n)&&(t.overflow[n]=e.overflow[n]);return t},scrollLeft:function(e,t){if(O(e)){if(void 0===t)return i(e);window.scrollTo(t,a(e))}else{if(void 0===t)return e.scrollLeft;e.scrollLeft=t}},scrollTop:function(e,t){if(O(e)){if(void 0===t)return a(e);window.scrollTo(i(e),t)}else{if(void 0===t)return e.scrollTop;e.scrollTop=t}},viewportWidth:0,viewportHeight:0},h)},216:function(e,t,n){"use strict";var r=n(0),o=n(7),c=Object(r.createElement)(o.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(r.createElement)(o.Path,{d:"M15.6 7.2H14v1.5h1.6c2 0 3.7 1.7 3.7 3.7s-1.7 3.7-3.7 3.7H14v1.5h1.6c2.8 0 5.2-2.3 5.2-5.2 0-2.9-2.3-5.2-5.2-5.2zM4.7 12.4c0-2 1.7-3.7 3.7-3.7H10V7.2H8.4c-2.9 0-5.2 2.3-5.2 5.2 0 2.9 2.3 5.2 5.2 5.2H10v-1.5H8.4c-2 0-3.7-1.7-3.7-3.7zm4.6.9h5.3v-1.5H9.3v1.5z"}));t.a=c},22:function(e,t,n){"use strict";function r(e){return(r=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}n.d(t,"a",(function(){return r}))},231:function(e,t,n){"use strict";var r=n(0),o=n(7),c=Object(r.createElement)(o.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(r.createElement)(o.Path,{d:"M20.1 5.1L16.9 2 6.2 12.7l-1.3 4.4 4.5-1.3L20.1 5.1zM4 20.8h8v-1.5H4v1.5z"}));t.a=c},24:function(e,t){e.exports=window.wp.richText},25:function(e,t,n){"use strict";function r(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}n.d(t,"a",(function(){return r}))},250:function(e,t,n){"use strict";var r=n(0),o=n(7),c=Object(r.createElement)(o.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(r.createElement)(o.Path,{d:"M13.5 6C10.5 6 8 8.5 8 11.5c0 1.1.3 2.1.9 3l-3.4 3 1 1.1 3.4-2.9c1 .9 2.2 1.4 3.6 1.4 3 0 5.5-2.5 5.5-5.5C19 8.5 16.5 6 13.5 6zm0 9.5c-2.2 0-4-1.8-4-4s1.8-4 4-4 4 1.8 4 4-1.8 4-4 4z"}));t.a=c},251:function(e,t,n){"use strict";var r=n(0),o=n(7),c=Object(r.createElement)(o.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(r.createElement)(o.Path,{d:"M10.6 6L9.4 7l4.6 5-4.6 5 1.2 1 5.4-6z"}));t.a=c},252:function(e,t,n){"use strict";var r=n(0),o=n(7),c=Object(r.createElement)(o.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(r.createElement)(o.Path,{d:"M14.6 7l-1.2-1L8 12l5.4 6 1.2-1-4.6-5z"}));t.a=c},253:function(e,t,n){"use strict";var r=n(0),o=n(7),c=Object(r.createElement)(o.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},Object(r.createElement)(o.Path,{d:"M6.5 12.4L12 8l5.5 4.4-.9 1.2L12 10l-4.5 3.6-1-1.2z"}));t.a=c},254:function(e,t,n){"use strict";var r=n(0),o=n(7),c=Object(r.createElement)(o.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(r.createElement)(o.Path,{d:"M13 19h-2v-2h2v2zm0-6h-2v-2h2v2zm0-6h-2V5h2v2z"}));t.a=c},255:function(e,t,n){"use strict";var r=n(0),o=n(7),c=Object(r.createElement)(o.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"-2 -2 24 24"},Object(r.createElement)(o.Path,{d:"M6.734 16.106l2.176-2.38-1.093-1.028-3.846 4.158 3.846 4.157 1.093-1.027-2.176-2.38h2.811c1.125 0 2.25.03 3.374 0 1.428-.001 3.362-.25 4.963-1.277 1.66-1.065 2.868-2.906 2.868-5.859 0-2.479-1.327-4.896-3.65-5.93-1.82-.813-3.044-.8-4.806-.788l-.567.002v1.5c.184 0 .368 0 .553-.002 1.82-.007 2.704-.014 4.21.657 1.854.827 2.76 2.657 2.76 4.561 0 2.472-.973 3.824-2.178 4.596-1.258.807-2.864 1.04-4.163 1.04h-.02c-1.115.03-2.229 0-3.344 0H6.734z"}));t.a=c},256:function(e,t,n){"use strict";var r=n(0),o=n(7),c=Object(r.createElement)(o.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(r.createElement)(o.Path,{d:"M18.5 15v3.5H13V6.7l4.5 4.1 1-1.1-6.2-5.8-5.8 5.8 1 1.1 4-4v11.7h-6V15H4v5h16v-5z"}));t.a=c},27:function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}n.d(t,"a",(function(){return r}))},28:function(e,t,n){"use strict";function r(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function o(e,t,n){return t&&r(e.prototype,t),n&&r(e,n),e}n.d(t,"a",(function(){return o}))},29:function(e,t){e.exports=window.wp.url},3:function(e,t){e.exports=window.wp.components},30:function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(25);function o(e,t){if(e){if("string"==typeof e)return Object(r.a)(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Object(r.a)(e,t):void 0}}},31:function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(58);function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Object(r.a)(e,t)}},32:function(e,t,n){"use strict";n.d(t,"a",(function(){return c}));var r=n(43),o=n(19);function c(e,t){return!t||"object"!==Object(r.a)(t)&&"function"!=typeof t?Object(o.a)(e):t}},327:function(e,t,n){"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),t.diffChars=function(e,t,n){return o.diff(e,t,n)},t.characterDiff=void 0;var o=new(((r=n(371))&&r.__esModule?r:{default:r}).default);t.characterDiff=o},328:function(e,t,n){"use strict";t.match=function(e,t){return l(e).some((function(e){var n=e.inverse,r="all"===e.type||t.type===e.type;if(r&&n||!r&&!n)return!1;var o=e.expressions.every((function(e){var n=e.feature,r=e.modifier,o=e.value,c=t[n];if(!c)return!1;switch(n){case"orientation":case"scan":return c.toLowerCase()===o.toLowerCase();case"width":case"height":case"device-width":case"device-height":o=d(o),c=d(c);break;case"resolution":o=u(o),c=u(c);break;case"aspect-ratio":case"device-aspect-ratio":case"device-pixel-ratio":o=s(o),c=s(c);break;case"grid":case"color":case"color-index":case"monochrome":o=parseInt(o,10)||1,c=parseInt(c,10)||0}switch(r){case"min":return c>=o;case"max":return c<=o;default:return c===o}}));return o&&!n||!o&&n}))},t.parse=l;var r=/(?:(only|not)?\s*([^\s\(\)]+)(?:\s*and)?\s*)?(.+)?/i,o=/\(\s*([^\s\:\)]+)\s*(?:\:\s*([^\s\)]+))?\s*\)/,c=/^(?:(min|max)-)?(.+)/,i=/(em|rem|px|cm|mm|in|pt|pc)?$/,a=/(dpi|dpcm|dppx)?$/;function l(e){return e.split(",").map((function(e){var t=(e=e.trim()).match(r),n=t[1],i=t[2],a=t[3]||"",l={};return l.inverse=!!n&&"not"===n.toLowerCase(),l.type=i?i.toLowerCase():"all",a=a.match(/\([^\)]+\)/g)||[],l.expressions=a.map((function(e){var t=e.match(o),n=t[1].toLowerCase().match(c);return{modifier:n[1],feature:n[2],value:t[2]}})),l}))}function s(e){var t,n=Number(e);return n||(n=(t=e.match(/^(\d+)\s*\/\s*(\d+)$/))[1]/t[2]),n}function u(e){var t=parseFloat(e);switch(String(e).match(a)[1]){case"dpcm":return t/2.54;case"dppx":return 96*t;default:return t}}function d(e){var t=parseFloat(e);switch(String(e).match(i)[1]){case"em":case"rem":return 16*t;case"cm":return 96*t/2.54;case"mm":return 96*t/2.54/10;case"in":return 96*t;case"pt":return 72*t;case"pc":return 72*t/12;default:return t}}},329:function(e,t){var n=e.exports=function(e){return new r(e)};function r(e){this.value=e}function o(e,t,n){var r=[],o=[],a=!0;return function e(d){var b=n?c(d):d,f={},p=!0,m={node:b,node_:d,path:[].concat(r),parent:o[o.length-1],parents:o,key:r.slice(-1)[0],isRoot:0===r.length,level:r.length,circular:null,update:function(e,t){m.isRoot||(m.parent.node[m.key]=e),m.node=e,t&&(p=!1)},delete:function(e){delete m.parent.node[m.key],e&&(p=!1)},remove:function(e){l(m.parent.node)?m.parent.node.splice(m.key,1):delete m.parent.node[m.key],e&&(p=!1)},keys:null,before:function(e){f.before=e},after:function(e){f.after=e},pre:function(e){f.pre=e},post:function(e){f.post=e},stop:function(){a=!1},block:function(){p=!1}};if(!a)return m;function v(){if("object"==typeof m.node&&null!==m.node){m.keys&&m.node_===m.node||(m.keys=i(m.node)),m.isLeaf=0==m.keys.length;for(var e=0;e<o.length;e++)if(o[e].node_===d){m.circular=o[e];break}}else m.isLeaf=!0,m.keys=null;m.notLeaf=!m.isLeaf,m.notRoot=!m.isRoot}v();var g=t.call(m,m.node);return void 0!==g&&m.update&&m.update(g),f.before&&f.before.call(m,m.node),p?("object"!=typeof m.node||null===m.node||m.circular||(o.push(m),v(),s(m.keys,(function(t,o){r.push(t),f.pre&&f.pre.call(m,m.node[t],t);var c=e(m.node[t]);n&&u.call(m.node,t)&&(m.node[t]=c.node),c.isLast=o==m.keys.length-1,c.isFirst=0==o,f.post&&f.post.call(m,c),r.pop()})),o.pop()),f.after&&f.after.call(m,m.node),m):m}(e).node}function c(e){if("object"==typeof e&&null!==e){var t;if(l(e))t=[];else if("[object Date]"===a(e))t=new Date(e.getTime?e.getTime():e);else if(function(e){return"[object RegExp]"===a(e)}(e))t=new RegExp(e);else if(function(e){return"[object Error]"===a(e)}(e))t={message:e.message};else if(function(e){return"[object Boolean]"===a(e)}(e))t=new Boolean(e);else if(function(e){return"[object Number]"===a(e)}(e))t=new Number(e);else if(function(e){return"[object String]"===a(e)}(e))t=new String(e);else if(Object.create&&Object.getPrototypeOf)t=Object.create(Object.getPrototypeOf(e));else if(e.constructor===Object)t={};else{var n=e.constructor&&e.constructor.prototype||e.__proto__||{},r=function(){};r.prototype=n,t=new r}return s(i(e),(function(n){t[n]=e[n]})),t}return e}r.prototype.get=function(e){for(var t=this.value,n=0;n<e.length;n++){var r=e[n];if(!t||!u.call(t,r)){t=void 0;break}t=t[r]}return t},r.prototype.has=function(e){for(var t=this.value,n=0;n<e.length;n++){var r=e[n];if(!t||!u.call(t,r))return!1;t=t[r]}return!0},r.prototype.set=function(e,t){for(var n=this.value,r=0;r<e.length-1;r++){var o=e[r];u.call(n,o)||(n[o]={}),n=n[o]}return n[e[r]]=t,t},r.prototype.map=function(e){return o(this.value,e,!0)},r.prototype.forEach=function(e){return this.value=o(this.value,e,!1),this.value},r.prototype.reduce=function(e,t){var n=1===arguments.length,r=n?this.value:t;return this.forEach((function(t){this.isRoot&&n||(r=e.call(this,r,t))})),r},r.prototype.paths=function(){var e=[];return this.forEach((function(t){e.push(this.path)})),e},r.prototype.nodes=function(){var e=[];return this.forEach((function(t){e.push(this.node)})),e},r.prototype.clone=function(){var e=[],t=[];return function n(r){for(var o=0;o<e.length;o++)if(e[o]===r)return t[o];if("object"==typeof r&&null!==r){var a=c(r);return e.push(r),t.push(a),s(i(r),(function(e){a[e]=n(r[e])})),e.pop(),t.pop(),a}return r}(this.value)};var i=Object.keys||function(e){var t=[];for(var n in e)t.push(n);return t};function a(e){return Object.prototype.toString.call(e)}var l=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)},s=function(e,t){if(e.forEach)return e.forEach(t);for(var n=0;n<e.length;n++)t(e[n],n,e)};s(i(r.prototype),(function(e){n[e]=function(t){var n=[].slice.call(arguments,1),o=new r(t);return o[e].apply(o,n)}}));var u=Object.hasOwnProperty||function(e,t){return t in e}},33:function(e,t){e.exports=window.wp.dom},34:function(e,t){e.exports=window.wp.hooks},35:function(e,t,n){e.exports=n(159)()},367:function(e,t,n){"use strict";var r=n(0),o=n(7),c=Object(r.createElement)(o.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(r.createElement)(o.Path,{d:"M9.1 9v-.5c0-.6.2-1.1.7-1.4.5-.3 1.2-.5 2-.5.7 0 1.4.1 2.1.3.7.2 1.4.5 2.1.9l.2-1.9c-.6-.3-1.2-.5-1.9-.7-.8-.1-1.6-.2-2.4-.2-1.5 0-2.7.3-3.6 1-.8.7-1.2 1.5-1.2 2.6V9h2zM20 12H4v1h8.3c.3.1.6.2.8.3.5.2.9.5 1.1.8.3.3.4.7.4 1.2 0 .7-.2 1.1-.8 1.5-.5.3-1.2.5-2.1.5-.8 0-1.6-.1-2.4-.3-.8-.2-1.5-.5-2.2-.8L7 18.1c.5.2 1.2.4 2 .6.8.2 1.6.3 2.4.3 1.7 0 3-.3 3.9-1 .9-.7 1.3-1.6 1.3-2.8 0-.9-.2-1.7-.7-2.2H20v-1z"}));t.a=c},368:function(e,t,n){"use strict";var r=n(0),o=n(7),c=Object(r.createElement)(o.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(r.createElement)(o.Path,{d:"M4 19.8h8.9v-1.5H4v1.5zm8.9-15.6H4v1.5h8.9V4.2zm-8.9 7v1.5h16v-1.5H4z"}));t.a=c},369:function(e,t,n){"use strict";var r=n(0),o=n(7),c=Object(r.createElement)(o.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(r.createElement)(o.Path,{d:"M16.4 4.2H7.6v1.5h8.9V4.2zM4 11.2v1.5h16v-1.5H4zm3.6 8.6h8.9v-1.5H7.6v1.5z"}));t.a=c},37:function(e,t){e.exports=window.wp.deprecated},370:function(e,t,n){"use strict";var r=n(0),o=n(7),c=Object(r.createElement)(o.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(r.createElement)(o.Path,{d:"M11.1 19.8H20v-1.5h-8.9v1.5zm0-15.6v1.5H20V4.2h-8.9zM4 12.8h16v-1.5H4v1.5z"}));t.a=c},371:function(e,t,n){"use strict";function r(){}function o(e,t,n,r,o){for(var c=0,i=t.length,a=0,l=0;c<i;c++){var s=t[c];if(s.removed){if(s.value=e.join(r.slice(l,l+s.count)),l+=s.count,c&&t[c-1].added){var u=t[c-1];t[c-1]=t[c],t[c]=u}}else{if(!s.added&&o){var d=n.slice(a,a+s.count);d=d.map((function(e,t){var n=r[l+t];return n.length>e.length?n:e})),s.value=e.join(d)}else s.value=e.join(n.slice(a,a+s.count));a+=s.count,s.added||(l+=s.count)}}var b=t[i-1];return i>1&&"string"==typeof b.value&&(b.added||b.removed)&&e.equals("",b.value)&&(t[i-2].value+=b.value,t.pop()),t}function c(e){return{newPos:e.newPos,components:e.components.slice(0)}}Object.defineProperty(t,"__esModule",{value:!0}),t.default=r,r.prototype={diff:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=n.callback;"function"==typeof n&&(r=n,n={}),this.options=n;var i=this;function a(e){return r?(setTimeout((function(){r(void 0,e)}),0),!0):e}e=this.castInput(e),t=this.castInput(t),e=this.removeEmpty(this.tokenize(e));var l=(t=this.removeEmpty(this.tokenize(t))).length,s=e.length,u=1,d=l+s,b=[{newPos:-1,components:[]}],f=this.extractCommon(b[0],t,e,0);if(b[0].newPos+1>=l&&f+1>=s)return a([{value:this.join(t),count:t.length}]);function p(){for(var n=-1*u;n<=u;n+=2){var r=void 0,d=b[n-1],f=b[n+1],p=(f?f.newPos:0)-n;d&&(b[n-1]=void 0);var m=d&&d.newPos+1<l,v=f&&0<=p&&p<s;if(m||v){if(!m||v&&d.newPos<f.newPos?(r=c(f),i.pushComponent(r.components,void 0,!0)):((r=d).newPos++,i.pushComponent(r.components,!0,void 0)),p=i.extractCommon(r,t,e,n),r.newPos+1>=l&&p+1>=s)return a(o(i,r.components,t,e,i.useLongestToken));b[n]=r}else b[n]=void 0}u++}if(r)!function e(){setTimeout((function(){if(u>d)return r();p()||e()}),0)}();else for(;u<=d;){var m=p();if(m)return m}},pushComponent:function(e,t,n){var r=e[e.length-1];r&&r.added===t&&r.removed===n?e[e.length-1]={count:r.count+1,added:t,removed:n}:e.push({count:1,added:t,removed:n})},extractCommon:function(e,t,n,r){for(var o=t.length,c=n.length,i=e.newPos,a=i-r,l=0;i+1<o&&a+1<c&&this.equals(t[i+1],n[a+1]);)i++,a++,l++;return l&&e.components.push({count:l}),e.newPos=i,a},equals:function(e,t){return this.options.comparator?this.options.comparator(e,t):e===t||this.options.ignoreCase&&e.toLowerCase()===t.toLowerCase()},removeEmpty:function(e){for(var t=[],n=0;n<e.length;n++)e[n]&&t.push(e[n]);return t},castInput:function(e){return e},tokenize:function(e){return e.split("")},join:function(e){return e.join("")}}},372:function(e,t,n){"use strict";var r=n(0),o=n(7),c=Object(r.createElement)(o.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(r.createElement)(o.Path,{d:"M18 5.5H6a.5.5 0 00-.5.5v3h13V6a.5.5 0 00-.5-.5zm.5 5H10v8h8a.5.5 0 00.5-.5v-7.5zm-10 0h-3V18a.5.5 0 00.5.5h2.5v-8zM6 4h12a2 2 0 012 2v12a2 2 0 01-2 2H6a2 2 0 01-2-2V6a2 2 0 012-2z"}));t.a=c},373:function(e,t,n){"use strict";var r=n(0),o=n(7),c=Object(r.createElement)(o.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(r.createElement)(o.Path,{d:"M18.7 3H5.3C4 3 3 4 3 5.3v13.4C3 20 4 21 5.3 21h13.4c1.3 0 2.3-1 2.3-2.3V5.3C21 4 20 3 18.7 3zm.8 15.7c0 .4-.4.8-.8.8H5.3c-.4 0-.8-.4-.8-.8V5.3c0-.4.4-.8.8-.8h13.4c.4 0 .8.4.8.8v13.4zM10 15l5-3-5-3v6z"}));t.a=c},4:function(e,t){e.exports=window.wp.data},40:function(e,t,n){"use strict";function r(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}n.d(t,"a",(function(){return r}))},41:function(e,t,n){"use strict";function r(e){if(Array.isArray(e))return e}n.d(t,"a",(function(){return r}))},42:function(e,t,n){"use strict";function r(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}n.d(t,"a",(function(){return r}))},43:function(e,t,n){"use strict";function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}n.d(t,"a",(function(){return r}))},45:function(e,t){e.exports=window.wp.keyboardShortcuts},46:function(e,t,n){"use strict";function r(e,t,n,r,o,c,i){try{var a=e[c](i),l=a.value}catch(e){return void n(e)}a.done?t(l):Promise.resolve(l).then(r,o)}function o(e){return function(){var t=this,n=arguments;return new Promise((function(o,c){var i=e.apply(t,n);function a(e){r(i,o,c,a,l,"next",e)}function l(e){r(i,o,c,a,l,"throw",e)}a(void 0)}))}}n.d(t,"a",(function(){return o}))},48:function(e,t,n){"use strict";function r(e,t){if(null==e)return{};var n,r,o={},c=Object.keys(e);for(r=0;r<c.length;r++)n=c[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}n.d(t,"a",(function(){return r}))},49:function(e,t,n){"use strict";var r,o;function c(e){return[e]}function i(){var e={clear:function(){e.head=null}};return e}function a(e,t,n){var r;if(e.length!==t.length)return!1;for(r=n;r<e.length;r++)if(e[r]!==t[r])return!1;return!0}r={},o="undefined"!=typeof WeakMap,t.a=function(e,t){var n,l;function s(){n=o?new WeakMap:i()}function u(){var n,r,o,c,i,s=arguments.length;for(c=new Array(s),o=0;o<s;o++)c[o]=arguments[o];for(i=t.apply(null,c),(n=l(i)).isUniqueByDependants||(n.lastDependants&&!a(i,n.lastDependants,0)&&n.clear(),n.lastDependants=i),r=n.head;r;){if(a(r.args,c,1))return r!==n.head&&(r.prev.next=r.next,r.next&&(r.next.prev=r.prev),r.next=n.head,r.prev=null,n.head.prev=r,n.head=r),r.val;r=r.next}return r={val:e.apply(null,c)},c[0]=null,r.args=c,n.head&&(n.head.prev=r,r.next=n.head),n.head=r,r.val}return t||(t=c),l=o?function(e){var t,o,c,a,l,s=n,u=!0;for(t=0;t<e.length;t++){if(!(l=o=e[t])||"object"!=typeof l){u=!1;break}s.has(o)?s=s.get(o):(c=new WeakMap,s.set(o,c),s=c)}return s.has(r)||((a=i()).isUniqueByDependants=u,s.set(r,a)),s.get(r)}:function(){return n},u.getDependants=t,u.clear=s,s(),u}},5:function(e,t,n){"use strict";function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}n.d(t,"a",(function(){return r}))},500:function(e,t,n){"use strict";n.r(t),n.d(t,"getColorClassName",(function(){return wo})),n.d(t,"getColorObjectByAttributeValues",(function(){return _o})),n.d(t,"getColorObjectByColorValue",(function(){return Eo})),n.d(t,"createCustomColorsHOC",(function(){return Fi})),n.d(t,"withColors",(function(){return Vi})),n.d(t,"__experimentalUseColors",(function(){return na})),n.d(t,"__experimentalGetGradientClass",(function(){return So})),n.d(t,"getGradientValueBySlug",(function(){return Bo})),n.d(t,"__experimentalGetGradientObjectByGradientValue",(function(){return Io})),n.d(t,"getGradientSlugByValue",(function(){return xo})),n.d(t,"__experimentalUseGradient",(function(){return Po})),n.d(t,"getFontSize",(function(){return ti})),n.d(t,"getFontSizeClass",(function(){return ri})),n.d(t,"getFontSizeObjectByValue",(function(){return ni})),n.d(t,"FontSizePicker",(function(){return oi})),n.d(t,"withFontSizes",(function(){return aa})),n.d(t,"AlignmentToolbar",(function(){return ma})),n.d(t,"Autocomplete",(function(){return Na})),n.d(t,"BlockAlignmentToolbar",(function(){return Rr})),n.d(t,"__experimentalBlockFullHeightAligmentToolbar",(function(){return Aa})),n.d(t,"__experimentalBlockAlignmentMatrixToolbar",(function(){return Ra})),n.d(t,"BlockBreadcrumb",(function(){return Fa})),n.d(t,"BlockContextProvider",(function(){return Ga})),n.d(t,"BlockControls",(function(){return jr})),n.d(t,"BlockColorsStyleSelector",(function(){return qa})),n.d(t,"BlockEdit",(function(){return Xa})),n.d(t,"useBlockEditContext",(function(){return h})),n.d(t,"BlockFormatControls",(function(){return tl})),n.d(t,"BlockIcon",(function(){return xa})),n.d(t,"BlockNavigationDropdown",(function(){return Kd})),n.d(t,"__experimentalBlockNavigationBlockFill",(function(){return xd})),n.d(t,"__experimentalBlockNavigationEditor",(function(){return ab})),n.d(t,"__experimentalBlockNavigationTree",(function(){return zd})),n.d(t,"__experimentalBlockVariationPicker",(function(){return sb})),n.d(t,"__experimentalBlockVariationTransforms",(function(){return bb})),n.d(t,"BlockVerticalAlignmentToolbar",(function(){return jb})),n.d(t,"ButtonBlockerAppender",(function(){return Ms})),n.d(t,"ColorPalette",(function(){return Eb})),n.d(t,"ColorPaletteControl",(function(){return wb})),n.d(t,"ContrastChecker",(function(){return Zo})),n.d(t,"__experimentalGradientPicker",(function(){return Bb})),n.d(t,"__experimentalGradientPickerControl",(function(){return Ib})),n.d(t,"__experimentalGradientPickerPanel",(function(){return xb})),n.d(t,"__experimentalFontAppearanceControl",(function(){return Hc})),n.d(t,"__experimentalFontFamilyControl",(function(){return $c})),n.d(t,"__experimentalColorGradientControl",(function(){return Ho})),n.d(t,"__experimentalPanelColorGradientSettings",(function(){return Xo})),n.d(t,"__experimentalImageSizeControl",(function(){return Tb})),n.d(t,"InnerBlocks",(function(){return Wb})),n.d(t,"__experimentalUseInnerBlocksProps",(function(){return Ub})),n.d(t,"InspectorAdvancedControls",(function(){return $r})),n.d(t,"InspectorControls",(function(){return Jr})),n.d(t,"JustifyToolbar",(function(){return Qb})),n.d(t,"__experimentalLinkControl",(function(){return If})),n.d(t,"__experimentalLinkControlSearchInput",(function(){return yf})),n.d(t,"__experimentalLinkControlSearchResults",(function(){return df})),n.d(t,"__experimentalLinkControlSearchItem",(function(){return uf})),n.d(t,"LineHeightControl",(function(){return Dc})),n.d(t,"MediaReplaceFlow",(function(){return Df})),n.d(t,"MediaPlaceholder",(function(){return Vf})),n.d(t,"MediaUpload",(function(){return Tf})),n.d(t,"MediaUploadCheck",(function(){return Nf})),n.d(t,"PanelColorSettings",(function(){return Wi})),n.d(t,"PlainText",(function(){return Gf})),n.d(t,"__experimentalResponsiveBlockControl",(function(){return Wf})),n.d(t,"RichText",(function(){return ib})),n.d(t,"RichTextShortcut",(function(){return Kf})),n.d(t,"RichTextToolbarButton",(function(){return qf})),n.d(t,"__unstableRichTextInputEvent",(function(){return $f})),n.d(t,"ToolSelector",(function(){return Xf})),n.d(t,"__experimentalUnitControl",(function(){return pi})),n.d(t,"URLInput",(function(){return af})),n.d(t,"URLInputButton",(function(){return Jf})),n.d(t,"URLPopover",(function(){return Mf})),n.d(t,"__experimentalImageURLInputUI",(function(){return rp})),n.d(t,"withColorContext",(function(){return _b})),n.d(t,"__experimentalBlockSettingsMenuFirstItem",(function(){return Nu})),n.d(t,"__experimentalInserterMenuExtension",(function(){return ws})),n.d(t,"__experimentalPreviewOptions",(function(){return cp})),n.d(t,"__experimentalUseResizeCanvas",(function(){return bp})),n.d(t,"BlockInspector",(function(){return hp})),n.d(t,"BlockList",(function(){return Zu})),n.d(t,"useBlockProps",(function(){return md})),n.d(t,"__experimentalBlock",(function(){return _p})),n.d(t,"BlockMover",(function(){return tu})),n.d(t,"BlockPreview",(function(){return Zl})),n.d(t,"BlockSelectionClearer",(function(){return wp})),n.d(t,"__unstableUseBlockSelectionClearer",(function(){return Ep})),n.d(t,"BlockSettingsMenu",(function(){return Gu})),n.d(t,"BlockSettingsMenuControls",(function(){return Vu})),n.d(t,"BlockTitle",(function(){return Ma})),n.d(t,"BlockToolbar",(function(){return Uu})),n.d(t,"CopyHandler",(function(){return Cu})),n.d(t,"__unstableUseClipboardHandler",(function(){return wu})),n.d(t,"DefaultBlockAppender",(function(){return Ls})),n.d(t,"__unstableEditorStyles",(function(){return Xp})),n.d(t,"Inserter",(function(){return Rs})),n.d(t,"__experimentalLibrary",(function(){return Qp})),n.d(t,"__experimentalSearchForm",(function(){return Gl})),n.d(t,"BlockEditorKeyboardShortcuts",(function(){return Jp})),n.d(t,"MultiSelectScrollIntoView",(function(){return tm})),n.d(t,"__unstableUseScrollMultiSelectionIntoView",(function(){return em})),n.d(t,"NavigableToolbar",(function(){return Js})),n.d(t,"ObserveTyping",(function(){return cm})),n.d(t,"__unstableUseTypingObserver",(function(){return om})),n.d(t,"__unstableUseMouseMoveTypingReset",(function(){return rm})),n.d(t,"PreserveScrollInReorder",(function(){return im})),n.d(t,"SkipToSelectedBlock",(function(){return fp})),n.d(t,"Typewriter",(function(){return um})),n.d(t,"__unstableUseTypewriter",(function(){return sm})),n.d(t,"Warning",(function(){return El})),n.d(t,"WritingFlow",(function(){return dd})),n.d(t,"__unstableUseCanvasClickRedirect",(function(){return bm})),n.d(t,"useBlockDisplayInformation",(function(){return La})),n.d(t,"__unstableIframe",(function(){return mm})),n.d(t,"__experimentalUseNoRecursiveRenders",(function(){return gm})),n.d(t,"BlockEditorProvider",(function(){return Yl})),n.d(t,"__experimentalUseSimulatedMediaQuery",(function(){return dp})),n.d(t,"__experimentalUseEditorFeature",(function(){return uo})),n.d(t,"transformStyles",(function(){return $p})),n.d(t,"validateThemeColors",(function(){return Om})),n.d(t,"validateThemeGradients",(function(){return hm})),n.d(t,"__experimentalGetMatchingVariation",(function(){return ub})),n.d(t,"storeConfig",(function(){return fr})),n.d(t,"store",(function(){return pr})),n.d(t,"SETTINGS_DEFAULTS",(function(){return E}));var r={};n.r(r),n.d(r,"getBlockName",(function(){return Y})),n.d(r,"isBlockValid",(function(){return X})),n.d(r,"getBlockAttributes",(function(){return Q})),n.d(r,"getBlock",(function(){return Z})),n.d(r,"__unstableGetBlockWithoutInnerBlocks",(function(){return J})),n.d(r,"getBlocks",(function(){return ee})),n.d(r,"__unstableGetBlockWithBlockTree",(function(){return te})),n.d(r,"__unstableGetBlockTree",(function(){return ne})),n.d(r,"getClientIdsOfDescendants",(function(){return re})),n.d(r,"getClientIdsWithDescendants",(function(){return oe})),n.d(r,"getGlobalBlockCount",(function(){return ce})),n.d(r,"getBlocksByClientId",(function(){return ie})),n.d(r,"getBlockCount",(function(){return ae})),n.d(r,"getSelectionStart",(function(){return le})),n.d(r,"getSelectionEnd",(function(){return se})),n.d(r,"getBlockSelectionStart",(function(){return ue})),n.d(r,"getBlockSelectionEnd",(function(){return de})),n.d(r,"getSelectedBlockCount",(function(){return be})),n.d(r,"hasSelectedBlock",(function(){return fe})),n.d(r,"getSelectedBlockClientId",(function(){return pe})),n.d(r,"getSelectedBlock",(function(){return me})),n.d(r,"getBlockRootClientId",(function(){return ve})),n.d(r,"getBlockParents",(function(){return ge})),n.d(r,"getBlockParentsByBlockName",(function(){return Oe})),n.d(r,"getBlockHierarchyRootClientId",(function(){return he})),n.d(r,"getLowestCommonAncestorWithSelectedBlock",(function(){return je})),n.d(r,"getAdjacentBlockClientId",(function(){return ke})),n.d(r,"getPreviousBlockClientId",(function(){return ye})),n.d(r,"getNextBlockClientId",(function(){return _e})),n.d(r,"getSelectedBlocksInitialCaretPosition",(function(){return Ee})),n.d(r,"getSelectedBlockClientIds",(function(){return we})),n.d(r,"getMultiSelectedBlockClientIds",(function(){return Ce})),n.d(r,"getMultiSelectedBlocks",(function(){return Se})),n.d(r,"getFirstMultiSelectedBlockClientId",(function(){return Be})),n.d(r,"getLastMultiSelectedBlockClientId",(function(){return Ie})),n.d(r,"isFirstMultiSelectedBlock",(function(){return xe})),n.d(r,"isBlockMultiSelected",(function(){return Pe})),n.d(r,"isAncestorMultiSelected",(function(){return Te})),n.d(r,"getMultiSelectedBlocksStartClientId",(function(){return Ne})),n.d(r,"getMultiSelectedBlocksEndClientId",(function(){return De})),n.d(r,"getBlockOrder",(function(){return Ae})),n.d(r,"getBlockIndex",(function(){return Re})),n.d(r,"isBlockSelected",(function(){return Le})),n.d(r,"hasSelectedInnerBlock",(function(){return Me})),n.d(r,"isBlockWithinSelection",(function(){return Fe})),n.d(r,"hasMultiSelection",(function(){return Ve})),n.d(r,"isMultiSelecting",(function(){return He})),n.d(r,"isSelectionEnabled",(function(){return ze})),n.d(r,"getBlockMode",(function(){return Ge})),n.d(r,"isTyping",(function(){return Ue})),n.d(r,"isDraggingBlocks",(function(){return We})),n.d(r,"getDraggedBlockClientIds",(function(){return Ke})),n.d(r,"isBlockBeingDragged",(function(){return qe})),n.d(r,"isAncestorBeingDragged",(function(){return $e})),n.d(r,"isCaretWithinFormattedText",(function(){return Ye})),n.d(r,"getBlockInsertionPoint",(function(){return Xe})),n.d(r,"isBlockInsertionPointVisible",(function(){return Qe})),n.d(r,"isValidTemplate",(function(){return Ze})),n.d(r,"getTemplate",(function(){return Je})),n.d(r,"getTemplateLock",(function(){return et})),n.d(r,"canInsertBlockType",(function(){return nt})),n.d(r,"canInsertBlocks",(function(){return rt})),n.d(r,"getInserterItems",(function(){return st})),n.d(r,"getBlockTransformItems",(function(){return ut})),n.d(r,"hasInserterItems",(function(){return dt})),n.d(r,"__experimentalGetAllowedBlocks",(function(){return bt})),n.d(r,"__experimentalGetAllowedPatterns",(function(){return pt})),n.d(r,"getBlockListSettings",(function(){return mt})),n.d(r,"getSettings",(function(){return vt})),n.d(r,"isLastBlockChangePersistent",(function(){return gt})),n.d(r,"__experimentalGetBlockListSettingsForBlocks",(function(){return Ot})),n.d(r,"__experimentalGetParsedReusableBlock",(function(){return ht})),n.d(r,"__experimentalGetReusableBlockTitle",(function(){return jt})),n.d(r,"__unstableIsLastBlockChangeIgnored",(function(){return kt})),n.d(r,"__experimentalGetLastBlockAttributeChanges",(function(){return yt})),n.d(r,"isNavigationMode",(function(){return Et})),n.d(r,"hasBlockMovingClientId",(function(){return wt})),n.d(r,"didAutomaticChange",(function(){return Ct})),n.d(r,"isBlockHighlighted",(function(){return St})),n.d(r,"areInnerBlocksControlled",(function(){return Bt})),n.d(r,"__experimentalGetActiveBlockIdByBlockNames",(function(){return It}));var o={};n.r(o),n.d(o,"resetBlocks",(function(){return an})),n.d(o,"validateBlocksToTemplate",(function(){return ln})),n.d(o,"resetSelection",(function(){return sn})),n.d(o,"receiveBlocks",(function(){return un})),n.d(o,"updateBlockAttributes",(function(){return dn})),n.d(o,"updateBlock",(function(){return bn})),n.d(o,"selectBlock",(function(){return fn})),n.d(o,"selectPreviousBlock",(function(){return pn})),n.d(o,"selectNextBlock",(function(){return mn})),n.d(o,"startMultiSelect",(function(){return vn})),n.d(o,"stopMultiSelect",(function(){return gn})),n.d(o,"multiSelect",(function(){return On})),n.d(o,"clearSelectedBlock",(function(){return hn})),n.d(o,"toggleSelection",(function(){return jn})),n.d(o,"replaceBlocks",(function(){return yn})),n.d(o,"replaceBlock",(function(){return En})),n.d(o,"moveBlocksDown",(function(){return Cn})),n.d(o,"moveBlocksUp",(function(){return Sn})),n.d(o,"moveBlocksToPosition",(function(){return Bn})),n.d(o,"moveBlockToPosition",(function(){return In})),n.d(o,"insertBlock",(function(){return xn})),n.d(o,"insertBlocks",(function(){return Pn})),n.d(o,"__unstableSetInsertionPoint",(function(){return Tn})),n.d(o,"showInsertionPoint",(function(){return Nn})),n.d(o,"hideInsertionPoint",(function(){return Dn})),n.d(o,"setTemplateValidity",(function(){return An})),n.d(o,"synchronizeTemplate",(function(){return Rn})),n.d(o,"mergeBlocks",(function(){return Ln})),n.d(o,"removeBlocks",(function(){return Mn})),n.d(o,"removeBlock",(function(){return Fn})),n.d(o,"replaceInnerBlocks",(function(){return Vn})),n.d(o,"toggleBlockMode",(function(){return Hn})),n.d(o,"startTyping",(function(){return zn})),n.d(o,"stopTyping",(function(){return Gn})),n.d(o,"startDraggingBlocks",(function(){return Un})),n.d(o,"stopDraggingBlocks",(function(){return Wn})),n.d(o,"enterFormattedText",(function(){return Kn})),n.d(o,"exitFormattedText",(function(){return qn})),n.d(o,"selectionChange",(function(){return $n})),n.d(o,"insertDefaultBlock",(function(){return Yn})),n.d(o,"updateBlockListSettings",(function(){return Xn})),n.d(o,"updateSettings",(function(){return Qn})),n.d(o,"__unstableSaveReusableBlock",(function(){return Zn})),n.d(o,"__unstableMarkLastChangeAsPersistent",(function(){return Jn})),n.d(o,"__unstableMarkNextChangeAsNotPersistent",(function(){return er})),n.d(o,"__unstableMarkAutomaticChange",(function(){return tr})),n.d(o,"__unstableMarkAutomaticChangeFinal",(function(){return nr})),n.d(o,"setNavigationMode",(function(){return rr})),n.d(o,"setBlockMovingClientId",(function(){return or})),n.d(o,"duplicateBlocks",(function(){return cr})),n.d(o,"insertBeforeBlock",(function(){return ir})),n.d(o,"insertAfterBlock",(function(){return ar})),n.d(o,"toggleBlockHighlight",(function(){return lr})),n.d(o,"flashBlock",(function(){return sr})),n.d(o,"setHasControlledInnerBlocks",(function(){return ur}));var c=n(24),i=n(10),a=n(5),l=n(0),s=n(12),u=n.n(s),d=n(2),b=n(14),f=n(34),p=n(11),m=n(4),v=n(3),g=Object(l.createContext)({name:"",isSelected:!1,focusedElement:null,setFocusedElement:d.noop,clientId:null}),O=g.Provider;function h(){return Object(l.useContext)(g)}var j=n(13),k=n(15),y=n(1),_={insertUsage:{}},E={alignWide:!1,colors:[{name:Object(y.__)("Black"),slug:"black",color:"#000000"},{name:Object(y.__)("Cyan bluish gray"),slug:"cyan-bluish-gray",color:"#abb8c3"},{name:Object(y.__)("White"),slug:"white",color:"#ffffff"},{name:Object(y.__)("Pale pink"),slug:"pale-pink",color:"#f78da7"},{name:Object(y.__)("Vivid red"),slug:"vivid-red",color:"#cf2e2e"},{name:Object(y.__)("Luminous vivid orange"),slug:"luminous-vivid-orange",color:"#ff6900"},{name:Object(y.__)("Luminous vivid amber"),slug:"luminous-vivid-amber",color:"#fcb900"},{name:Object(y.__)("Light green cyan"),slug:"light-green-cyan",color:"#7bdcb5"},{name:Object(y.__)("Vivid green cyan"),slug:"vivid-green-cyan",color:"#00d084"},{name:Object(y.__)("Pale cyan blue"),slug:"pale-cyan-blue",color:"#8ed1fc"},{name:Object(y.__)("Vivid cyan blue"),slug:"vivid-cyan-blue",color:"#0693e3"},{name:Object(y.__)("Vivid purple"),slug:"vivid-purple",color:"#9b51e0"}],fontSizes:[{name:Object(y._x)("Small","font size name"),size:13,slug:"small"},{name:Object(y._x)("Normal","font size name"),size:16,slug:"normal"},{name:Object(y._x)("Medium","font size name"),size:20,slug:"medium"},{name:Object(y._x)("Large","font size name"),size:36,slug:"large"},{name:Object(y._x)("Huge","font size name"),size:42,slug:"huge"}],imageSizes:[{slug:"thumbnail",name:Object(y.__)("Thumbnail")},{slug:"medium",name:Object(y.__)("Medium")},{slug:"large",name:Object(y.__)("Large")},{slug:"full",name:Object(y.__)("Full Size")}],imageEditing:!0,maxWidth:580,allowedBlockTypes:!0,maxUploadFileSize:0,allowedMimeTypes:null,availableLegacyWidgets:{},__experimentalCanUserUseUnfilteredHTML:!1,__experimentalBlockDirectory:!1,__mobileEnablePageTemplates:!1,__experimentalBlockPatterns:[],__experimentalBlockPatternCategories:[],__experimentalSpotlightEntityBlocks:[],gradients:[{name:Object(y.__)("Vivid cyan blue to vivid purple"),gradient:"linear-gradient(135deg,rgba(6,147,227,1) 0%,rgb(155,81,224) 100%)",slug:"vivid-cyan-blue-to-vivid-purple"},{name:Object(y.__)("Light green cyan to vivid green cyan"),gradient:"linear-gradient(135deg,rgb(122,220,180) 0%,rgb(0,208,130) 100%)",slug:"light-green-cyan-to-vivid-green-cyan"},{name:Object(y.__)("Luminous vivid amber to luminous vivid orange"),gradient:"linear-gradient(135deg,rgba(252,185,0,1) 0%,rgba(255,105,0,1) 100%)",slug:"luminous-vivid-amber-to-luminous-vivid-orange"},{name:Object(y.__)("Luminous vivid orange to vivid red"),gradient:"linear-gradient(135deg,rgba(255,105,0,1) 0%,rgb(207,46,46) 100%)",slug:"luminous-vivid-orange-to-vivid-red"},{name:Object(y.__)("Very light gray to cyan bluish gray"),gradient:"linear-gradient(135deg,rgb(238,238,238) 0%,rgb(169,184,195) 100%)",slug:"very-light-gray-to-cyan-bluish-gray"},{name:Object(y.__)("Cool to warm spectrum"),gradient:"linear-gradient(135deg,rgb(74,234,220) 0%,rgb(151,120,209) 20%,rgb(207,42,186) 40%,rgb(238,44,130) 60%,rgb(251,105,98) 80%,rgb(254,248,76) 100%)",slug:"cool-to-warm-spectrum"},{name:Object(y.__)("Blush light purple"),gradient:"linear-gradient(135deg,rgb(255,206,236) 0%,rgb(152,150,240) 100%)",slug:"blush-light-purple"},{name:Object(y.__)("Blush bordeaux"),gradient:"linear-gradient(135deg,rgb(254,205,165) 0%,rgb(254,45,45) 50%,rgb(107,0,62) 100%)",slug:"blush-bordeaux"},{name:Object(y.__)("Luminous dusk"),gradient:"linear-gradient(135deg,rgb(255,203,112) 0%,rgb(199,81,192) 50%,rgb(65,88,208) 100%)",slug:"luminous-dusk"},{name:Object(y.__)("Pale ocean"),gradient:"linear-gradient(135deg,rgb(255,245,203) 0%,rgb(182,227,212) 50%,rgb(51,167,181) 100%)",slug:"pale-ocean"},{name:Object(y.__)("Electric grass"),gradient:"linear-gradient(135deg,rgb(202,248,128) 0%,rgb(113,206,126) 100%)",slug:"electric-grass"},{name:Object(y.__)("Midnight"),gradient:"linear-gradient(135deg,rgb(2,3,129) 0%,rgb(40,116,252) 100%)",slug:"midnight"}]};function w(e,t,n){return[].concat(Object(k.a)(e.slice(0,n)),Object(k.a)(Object(d.castArray)(t)),Object(k.a)(e.slice(n)))}function C(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:1,o=Object(k.a)(e);return o.splice(t,r),w(o,e.slice(t,t+r),n)}function S(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function B(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?S(Object(n),!0).forEach((function(t){Object(a.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):S(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function I(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=Object(a.a)({},t,[]);return e.forEach((function(e){var r=e.clientId,o=e.innerBlocks;n[t].push(r),Object.assign(n,I(o,r))})),n}function x(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return e.reduce((function(e,n){return Object.assign(e,Object(a.a)({},n.clientId,t),x(n.innerBlocks,n.clientId))}),{})}function P(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:d.identity,n={},r=Object(k.a)(e);r.length;){var o=r.shift(),c=o.innerBlocks,i=Object(j.a)(o,["innerBlocks"]);r.push.apply(r,Object(k.a)(c)),n[i.clientId]=t(i)}return n}function T(e){return P(e,(function(e){return Object(d.omit)(e,"attributes")}))}function N(e){return P(e,(function(e){return e.attributes}))}function D(e,t){return e===t?B({},e):t}function A(e,t){return"UPDATE_BLOCK_ATTRIBUTES"===e.type&&void 0!==t&&"UPDATE_BLOCK_ATTRIBUTES"===t.type&&Object(d.isEqual)(e.clientIds,t.clientIds)&&(n=e.attributes,r=t.attributes,Object(d.isEqual)(Object(d.keys)(n),Object(d.keys)(r)));var n,r}var R=function(e){return e.reduce((function(e,t){return e[t]={},e}),{})},L=Object(d.flow)(m.combineReducers,(function(e){return function(t,n){if(t&&"SAVE_REUSABLE_BLOCK_SUCCESS"===n.type){var r=n.id,o=n.updatedId;if(r===o)return t;(t=B({},t)).attributes=Object(d.mapValues)(t.attributes,(function(e,n){return"core/block"===t.byClientId[n].name&&e.ref===r?B(B({},e),{},{ref:o}):e}))}return e(t,n)}}),(function(e){return function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0,r=e(t,n);if(r===t)return t;r.cache=t.cache?t.cache:{};var o=function(e){return e.reduce((function(e,n){var r=n;do{e.push(r),r=t.parents[r]}while(r&&!t.controlledInnerBlocks[r]);return e}),[])};switch(n.type){case"RESET_BLOCKS":r.cache=Object(d.mapValues)(P(n.blocks),(function(){return{}}));break;case"RECEIVE_BLOCKS":case"INSERT_BLOCKS":var c=Object(d.keys)(P(n.blocks));n.rootClientId&&!t.controlledInnerBlocks[n.rootClientId]&&c.push(n.rootClientId),r.cache=B(B({},r.cache),R(o(c)));break;case"UPDATE_BLOCK":r.cache=B(B({},r.cache),R(o([n.clientId])));break;case"UPDATE_BLOCK_ATTRIBUTES":r.cache=B(B({},r.cache),R(o(n.clientIds)));break;case"REPLACE_BLOCKS_AUGMENTED_WITH_CHILDREN":var i=R(o(n.replacedClientIds));r.cache=B(B(B({},Object(d.omit)(r.cache,n.replacedClientIds)),Object(d.omit)(i,n.replacedClientIds)),R(Object(d.keys)(P(n.blocks))));break;case"REMOVE_BLOCKS_AUGMENTED_WITH_CHILDREN":r.cache=B(B({},Object(d.omit)(r.cache,n.removedClientIds)),R(Object(d.difference)(o(n.clientIds),n.clientIds)));break;case"MOVE_BLOCKS_TO_POSITION":var a=Object(k.a)(n.clientIds);n.fromRootClientId&&a.push(n.fromRootClientId),n.toRootClientId&&a.push(n.toRootClientId),r.cache=B(B({},r.cache),R(o(a)));break;case"MOVE_BLOCKS_UP":case"MOVE_BLOCKS_DOWN":var l=[];n.rootClientId&&l.push(n.rootClientId),r.cache=B(B({},r.cache),R(o(l)));break;case"SAVE_REUSABLE_BLOCK_SUCCESS":var s=Object(d.keys)(Object(d.omitBy)(r.attributes,(function(e,t){return"core/block"!==r.byClientId[t].name||e.ref!==n.updatedId})));r.cache=B(B({},r.cache),R(o(s)))}return r}}),(function(e){return function(t,n){var r=function(e){for(var r=e,o=0;o<r.length;o++){var c;!t.order[r[o]]||n.keepControlledInnerBlocks&&n.keepControlledInnerBlocks[r[o]]||(r===e&&(r=Object(k.a)(r)),(c=r).push.apply(c,Object(k.a)(t.order[r[o]])))}return r};if(t)switch(n.type){case"REMOVE_BLOCKS":n=B(B({},n),{},{type:"REMOVE_BLOCKS_AUGMENTED_WITH_CHILDREN",removedClientIds:r(n.clientIds)});break;case"REPLACE_BLOCKS":n=B(B({},n),{},{type:"REPLACE_BLOCKS_AUGMENTED_WITH_CHILDREN",replacedClientIds:r(n.clientIds)})}return e(t,n)}}),(function(e){return function(t,n){if("REPLACE_INNER_BLOCKS"!==n.type)return e(t,n);var r={};if(Object.keys(t.controlledInnerBlocks).length)for(var o=Object(k.a)(n.blocks);o.length;){var c=o.shift(),i=c.innerBlocks,a=Object(j.a)(c,["innerBlocks"]);o.push.apply(o,Object(k.a)(i)),t.controlledInnerBlocks[a.clientId]&&(r[a.clientId]=!0)}var l=t;t.order[n.rootClientId]&&(l=e(l,{type:"REMOVE_BLOCKS",keepControlledInnerBlocks:r,clientIds:t.order[n.rootClientId]}));var s=l;return n.blocks.length&&((s=e(s,B(B({},n),{},{type:"INSERT_BLOCKS",index:0}))).order=B(B({},s.order),Object(d.reduce)(r,(function(e,n,r){return t.order[r]&&(e[r]=t.order[r]),e}),{}))),s}}),(function(e){return function(t,n){if(t&&"RESET_BLOCKS"===n.type){var r=function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return Object(d.reduce)(t[n],(function(n,o){return r[o]?n:[].concat(Object(k.a)(n),[o],Object(k.a)(e(t,o)))}),[])}(t.order,"",t.controlledInnerBlocks),o=Object.keys(Object(d.pickBy)(t.controlledInnerBlocks));return B(B({},t),{},{byClientId:B(B({},Object(d.omit)(t.byClientId,r)),T(n.blocks)),attributes:B(B({},Object(d.omit)(t.attributes,r)),N(n.blocks)),order:B(B({},Object(d.omit)(t.order,r)),Object(d.omit)(I(n.blocks),o)),parents:B(B({},Object(d.omit)(t.parents,r)),x(n.blocks)),cache:B(B({},Object(d.omit)(t.cache,r)),Object(d.omit)(Object(d.mapValues)(P(n.blocks),(function(){return{}})),o))})}return e(t,n)}}),(function(e){var t,n=!1;return function(r,o){var c=e(r,o),i="MARK_LAST_CHANGE_AS_PERSISTENT"===o.type||n;if(r===c&&!i){var a;n="MARK_NEXT_CHANGE_AS_NOT_PERSISTENT"===o.type;var l=null===(a=null==r?void 0:r.isPersistentChange)||void 0===a||a;return r.isPersistentChange===l?r:B(B({},c),{},{isPersistentChange:l})}return c=B(B({},c),{},{isPersistentChange:i?!n:!A(o,t)}),t=o,n="MARK_NEXT_CHANGE_AS_NOT_PERSISTENT"===o.type,c}}),(function(e){var t=new Set(["RECEIVE_BLOCKS"]);return function(n,r){var o=e(n,r);return o!==n&&(o.isIgnoredChange=t.has(r.type)),o}}))({byClientId:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"RESET_BLOCKS":return T(t.blocks);case"RECEIVE_BLOCKS":case"INSERT_BLOCKS":return B(B({},e),T(t.blocks));case"UPDATE_BLOCK":if(!e[t.clientId])return e;var n=Object(d.omit)(t.updates,"attributes");return Object(d.isEmpty)(n)?e:B(B({},e),{},Object(a.a)({},t.clientId,B(B({},e[t.clientId]),n)));case"REPLACE_BLOCKS_AUGMENTED_WITH_CHILDREN":return t.blocks?B(B({},Object(d.omit)(e,t.replacedClientIds)),T(t.blocks)):e;case"REMOVE_BLOCKS_AUGMENTED_WITH_CHILDREN":return Object(d.omit)(e,t.removedClientIds)}return e},attributes:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"RESET_BLOCKS":return N(t.blocks);case"RECEIVE_BLOCKS":case"INSERT_BLOCKS":return B(B({},e),N(t.blocks));case"UPDATE_BLOCK":return e[t.clientId]&&t.updates.attributes?B(B({},e),{},Object(a.a)({},t.clientId,B(B({},e[t.clientId]),t.updates.attributes))):e;case"UPDATE_BLOCK_ATTRIBUTES":if(t.clientIds.every((function(t){return!e[t]})))return e;var n=t.clientIds.reduce((function(n,r){return B(B({},n),{},Object(a.a)({},r,Object(d.reduce)(t.attributes,(function(t,n,o){return n!==t[o]&&((t=D(e[r],t))[o]=n),t}),e[r])))}),{});return t.clientIds.every((function(t){return n[t]===e[t]}))?e:B(B({},e),n);case"REPLACE_BLOCKS_AUGMENTED_WITH_CHILDREN":return t.blocks?B(B({},Object(d.omit)(e,t.replacedClientIds)),N(t.blocks)):e;case"REMOVE_BLOCKS_AUGMENTED_WITH_CHILDREN":return Object(d.omit)(e,t.removedClientIds)}return e},order:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"RESET_BLOCKS":return I(t.blocks);case"RECEIVE_BLOCKS":return B(B({},e),Object(d.omit)(I(t.blocks),""));case"INSERT_BLOCKS":var n=t.rootClientId,r=void 0===n?"":n,o=e[r]||[],c=I(t.blocks,r),i=t.index,l=void 0===i?o.length:i;return B(B(B({},e),c),{},Object(a.a)({},r,w(o,c[r],l)));case"MOVE_BLOCKS_TO_POSITION":var s,u=t.fromRootClientId,b=void 0===u?"":u,f=t.toRootClientId,p=void 0===f?"":f,m=t.clientIds,v=t.index,g=void 0===v?e[p].length:v;if(b===p){var O=e[p],h=O.indexOf(m[0]);return B(B({},e),{},Object(a.a)({},p,C(e[p],h,g,m.length)))}return B(B({},e),{},(s={},Object(a.a)(s,b,d.without.apply(void 0,[e[b]].concat(Object(k.a)(m)))),Object(a.a)(s,p,w(e[p],m,g)),s));case"MOVE_BLOCKS_UP":var j=t.clientIds,y=t.rootClientId,_=void 0===y?"":y,E=Object(d.first)(j),S=e[_];if(!S.length||E===Object(d.first)(S))return e;var x=S.indexOf(E);return B(B({},e),{},Object(a.a)({},_,C(S,x,x-1,j.length)));case"MOVE_BLOCKS_DOWN":var P=t.clientIds,T=t.rootClientId,N=void 0===T?"":T,D=Object(d.first)(P),A=Object(d.last)(P),R=e[N];if(!R.length||A===Object(d.last)(R))return e;var L=R.indexOf(D);return B(B({},e),{},Object(a.a)({},N,C(R,L,L+1,P.length)));case"REPLACE_BLOCKS_AUGMENTED_WITH_CHILDREN":var M=t.clientIds;if(!t.blocks)return e;var F=I(t.blocks);return Object(d.flow)([function(e){return Object(d.omit)(e,t.replacedClientIds)},function(e){return B(B({},e),Object(d.omit)(F,""))},function(e){return Object(d.mapValues)(e,(function(e){return Object(d.reduce)(e,(function(e,t){return t===M[0]?[].concat(Object(k.a)(e),Object(k.a)(F[""])):(-1===M.indexOf(t)&&e.push(t),e)}),[])}))}])(e);case"REMOVE_BLOCKS_AUGMENTED_WITH_CHILDREN":return Object(d.flow)([function(e){return Object(d.omit)(e,t.removedClientIds)},function(e){return Object(d.mapValues)(e,(function(e){return d.without.apply(void 0,[e].concat(Object(k.a)(t.removedClientIds)))}))}])(e)}return e},parents:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"RESET_BLOCKS":return x(t.blocks);case"RECEIVE_BLOCKS":return B(B({},e),x(t.blocks));case"INSERT_BLOCKS":return B(B({},e),x(t.blocks,t.rootClientId||""));case"MOVE_BLOCKS_TO_POSITION":return B(B({},e),t.clientIds.reduce((function(e,n){return e[n]=t.toRootClientId||"",e}),{}));case"REPLACE_BLOCKS_AUGMENTED_WITH_CHILDREN":return B(B({},Object(d.omit)(e,t.replacedClientIds)),x(t.blocks,e[t.clientIds[0]]));case"REMOVE_BLOCKS_AUGMENTED_WITH_CHILDREN":return Object(d.omit)(e,t.removedClientIds)}return e},controlledInnerBlocks:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0,n=t.type,r=t.clientId,o=t.hasControlledInnerBlocks;return"SET_HAS_CONTROLLED_INNER_BLOCKS"===n?B(B({},e),{},Object(a.a)({},r,o)):e}});function M(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"CLEAR_SELECTED_BLOCK":return e.clientId?{}:e;case"SELECT_BLOCK":return t.clientId===e.clientId?e:{clientId:t.clientId};case"REPLACE_INNER_BLOCKS":case"INSERT_BLOCKS":return t.updateSelection&&t.blocks.length?{clientId:t.blocks[0].clientId}:e;case"REMOVE_BLOCKS":return t.clientIds&&t.clientIds.length&&-1!==t.clientIds.indexOf(e.clientId)?{}:e;case"REPLACE_BLOCKS":if(-1===t.clientIds.indexOf(e.clientId))return e;var n=t.indexToSelect||t.blocks.length-1,r=t.blocks[n];if(!r)return{};if(r.clientId===e.clientId)return e;var o={clientId:r.clientId};return"number"==typeof t.initialPosition&&(o.initialPosition=t.initialPosition),o}return e}function F(e,t,n){switch(t.type){case"CLEAR_SELECTED_BLOCK":case"SELECT_BLOCK":case"SELECTION_CHANGE":case"REPLACE_INNER_BLOCKS":case"INSERT_BLOCKS":case"REMOVE_BLOCKS":case"REPLACE_BLOCKS":return n}return e}var V=Object(m.combineReducers)({blocks:L,isTyping:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"START_TYPING":return!0;case"STOP_TYPING":return!1}return e},draggedBlocks:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"START_DRAGGING_BLOCKS":return t.clientIds;case"STOP_DRAGGING_BLOCKS":return[]}return e},isCaretWithinFormattedText:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"ENTER_FORMATTED_TEXT":return!0;case"EXIT_FORMATTED_TEXT":return!1}return e},selection:function(){var e,t,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=arguments.length>1?arguments[1]:void 0;switch(r.type){case"SELECTION_CHANGE":return{selectionStart:{clientId:r.clientId,attributeKey:r.attributeKey,offset:r.startOffset},selectionEnd:{clientId:r.clientId,attributeKey:r.attributeKey,offset:r.endOffset}};case"RESET_SELECTION":var o=r.selectionStart,c=r.selectionEnd;return{selectionStart:o,selectionEnd:c};case"MULTI_SELECT":var i=r.start,a=r.end;return{selectionStart:{clientId:i},selectionEnd:{clientId:a}};case"RESET_BLOCKS":var l=null==n||null===(e=n.selectionStart)||void 0===e?void 0:e.clientId,s=null==n||null===(t=n.selectionEnd)||void 0===t?void 0:t.clientId;if(!l&&!s)return n;if(!r.blocks.some((function(e){return e.clientId===l})))return{selectionStart:{},selectionEnd:{}};if(!r.blocks.some((function(e){return e.clientId===s})))return B(B({},n),{},{selectionEnd:n.selectionStart})}return{selectionStart:M(n.selectionStart,r),selectionEnd:M(n.selectionEnd,r)}},isMultiSelecting:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"START_MULTI_SELECT":return!0;case"STOP_MULTI_SELECT":return!1}return e},isSelectionEnabled:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"TOGGLE_SELECTION":return t.isSelectionEnabled}return e},initialPosition:function(e,t){return"REPLACE_BLOCKS"===t.type&&"number"==typeof t.initialPosition||"SELECT_BLOCK"===t.type?t.initialPosition:"REMOVE_BLOCKS"===t.type||"START_TYPING"===t.type?e:void 0},blocksMode:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;if("TOGGLE_BLOCK_MODE"===t.type){var n=t.clientId;return B(B({},e),{},Object(a.a)({},n,e[n]&&"html"===e[n]?"visual":"html"))}return e},blockListSettings:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"REPLACE_BLOCKS":case"REMOVE_BLOCKS":return Object(d.omit)(e,t.clientIds);case"UPDATE_BLOCK_LIST_SETTINGS":var n=t.clientId;return t.settings?Object(d.isEqual)(e[n],t.settings)?e:B(B({},e),{},Object(a.a)({},n,t.settings)):e.hasOwnProperty(n)?Object(d.omit)(e,n):e}return e},insertionPoint:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"SET_INSERTION_POINT":case"SHOW_INSERTION_POINT":var n=t.rootClientId,r=t.index;return{rootClientId:n,index:r}}return F(e,t,null)},insertionPointVisibility:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"SHOW_INSERTION_POINT":return!0;case"HIDE_INSERTION_POINT":return!1}return F(e,t,!1)},template:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{isValid:!0},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"SET_TEMPLATE_VALIDITY":return B(B({},e),{},{isValid:t.isValid})}return e},settings:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:E,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"UPDATE_SETTINGS":return B(B({},e),t.settings)}return e},preferences:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:_,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"INSERT_BLOCKS":case"REPLACE_BLOCKS":return t.blocks.reduce((function(e,n){var r=n.attributes,o=n.name,c=Object(p.getBlockVariations)(o),i=null==c?void 0:c.find((function(e){var t;return null===(t=e.isActive)||void 0===t?void 0:t.call(e,r,e.attributes)})),l=null!=i&&i.name?"".concat(o,"/").concat(i.name):o,s={name:l};return"core/block"===o&&(s.ref=r.ref,l+="/"+r.ref),B(B({},e),{},{insertUsage:B(B({},e.insertUsage),{},Object(a.a)({},l,{time:t.time,count:e.insertUsage[l]?e.insertUsage[l].count+1:1,insert:s}))})}),e)}return e},lastBlockAttributesChange:function(e,t){switch(t.type){case"UPDATE_BLOCK":if(!t.updates.attributes)break;return Object(a.a)({},t.clientId,t.updates.attributes);case"UPDATE_BLOCK_ATTRIBUTES":return t.clientIds.reduce((function(e,n){return B(B({},e),{},Object(a.a)({},n,t.attributes))}),{})}return null},isNavigationMode:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=arguments.length>1?arguments[1]:void 0;return"INSERT_BLOCKS"!==t.type&&("SET_NAVIGATION_MODE"===t.type?t.isNavigationMode:e)},hasBlockMovingClientId:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=arguments.length>1?arguments[1]:void 0;return"SET_BLOCK_MOVING_MODE"===t.type?t.hasBlockMovingClientId:"SET_NAVIGATION_MODE"===t.type?null:e},automaticChangeStatus:function(e,t){switch(t.type){case"MARK_AUTOMATIC_CHANGE":return"pending";case"MARK_AUTOMATIC_CHANGE_FINAL":return"pending"===e?"final":void 0;case"SELECTION_CHANGE":return"final"!==e?e:void 0;case"START_TYPING":case"STOP_TYPING":return e}},highlightedBlock:function(e,t){switch(t.type){case"TOGGLE_BLOCK_HIGHLIGHT":var n=t.clientId;return t.isHighlighted?n:e===n?null:e;case"SELECT_BLOCK":if(t.clientId!==e)return null}return e}}),H=n(43),z=n(49);function G(e,t){var n;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return U(e,void 0);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?U(e,void 0):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var c,i=!0,a=!1;return{s:function(){n=e[Symbol.iterator]()},n:function(){var e=n.next();return i=e.done,e},e:function(e){a=!0,c=e},f:function(){try{i||null==n.return||n.return()}finally{if(a)throw c}}}}function U(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function W(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function K(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?W(Object(n),!0).forEach((function(t){Object(a.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):W(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var q=Object(l.createElement)(v.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(l.createElement)(v.Rect,{x:"0",fill:"none",width:"24",height:"24"}),Object(l.createElement)(v.G,null,Object(l.createElement)(v.Path,{d:"M19 3H5c-1.105 0-2 .895-2 2v14c0 1.105.895 2 2 2h14c1.105 0 2-.895 2-2V5c0-1.105-.895-2-2-2zM6 6h5v5H6V6zm4.5 13C9.12 19 8 17.88 8 16.5S9.12 14 10.5 14s2.5 1.12 2.5 2.5-1.12 2.5-2.5 2.5zm3-6l3-5 3 5h-6z"}))),$=[];function Y(e,t){var n=e.blocks.byClientId[t];if("web"!==l.Platform.OS&&"core/social-link"===(null==n?void 0:n.name)){var r=e.blocks.attributes[t].service;return r?"".concat("core/social-link","-").concat(r):"core/social-link"}return n?n.name:null}function X(e,t){var n=e.blocks.byClientId[t];return!!n&&n.isValid}function Q(e,t){return e.blocks.byClientId[t]?e.blocks.attributes[t]:null}var Z=Object(z.a)((function(e,t){var n=e.blocks.byClientId[t];return n?K(K({},n),{},{attributes:Q(e,t),innerBlocks:Bt(e,t)?$:ee(e,t)}):null}),(function(e,t){return[e.blocks.cache[t]]})),J=Object(z.a)((function(e,t){var n=e.blocks.byClientId[t];return n?K(K({},n),{},{attributes:Q(e,t)}):null}),(function(e,t){return[e.blocks.byClientId[t],e.blocks.attributes[t]]})),ee=Object(z.a)((function(e,t){return Object(d.map)(Ae(e,t),(function(t){return Z(e,t)}))}),(function(e,t){return Object(d.map)(e.blocks.order[t||""],(function(t){return e.blocks.cache[t]}))})),te=Object(z.a)((function(e,t){var n=e.blocks.byClientId[t];return n?K(K({},n),{},{attributes:Q(e,t),innerBlocks:ne(e,t)}):null}),(function(e){return[e.blocks.byClientId,e.blocks.order,e.blocks.attributes]})),ne=Object(z.a)((function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return Object(d.map)(Ae(e,t),(function(t){return te(e,t)}))}),(function(e){return[e.blocks.byClientId,e.blocks.order,e.blocks.attributes]})),re=function e(t,n){return Object(d.flatMap)(n,(function(n){var r=Ae(t,n);return[].concat(Object(k.a)(r),Object(k.a)(e(t,r)))}))},oe=Object(z.a)((function(e){var t=Ae(e);return[].concat(Object(k.a)(t),Object(k.a)(re(e,t)))}),(function(e){return[e.blocks.order]})),ce=Object(z.a)((function(e,t){var n=oe(e);return t?Object(d.reduce)(n,(function(n,r){return e.blocks.byClientId[r].name===t?n+1:n}),0):n.length}),(function(e){return[e.blocks.order,e.blocks.byClientId]})),ie=Object(z.a)((function(e,t){return Object(d.map)(Object(d.castArray)(t),(function(t){return Z(e,t)}))}),(function(e){return[e.blocks.byClientId,e.blocks.order,e.blocks.attributes]}));function ae(e,t){return Ae(e,t).length}function le(e){return e.selection.selectionStart}function se(e){return e.selection.selectionEnd}function ue(e){return e.selection.selectionStart.clientId}function de(e){return e.selection.selectionEnd.clientId}function be(e){return Ce(e).length||(e.selection.selectionStart.clientId?1:0)}function fe(e){var t=e.selection,n=t.selectionStart,r=t.selectionEnd;return!!n.clientId&&n.clientId===r.clientId}function pe(e){var t=e.selection,n=t.selectionStart,r=t.selectionEnd,o=n.clientId;return o&&o===r.clientId?o:null}function me(e){var t=pe(e);return t?Z(e,t):null}function ve(e,t){return void 0!==e.blocks.parents[t]?e.blocks.parents[t]:null}var ge=Object(z.a)((function(e,t){for(var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=[],o=t;e.blocks.parents[o];)o=e.blocks.parents[o],r.push(o);return n?r:r.reverse()}),(function(e){return[e.blocks.parents]})),Oe=Object(z.a)((function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]&&arguments[3],o=ge(e,t,r);return Object(d.map)(Object(d.filter)(Object(d.map)(o,(function(t){return{id:t,name:Y(e,t)}})),(function(e){var t=e.name;return Array.isArray(n)?n.includes(t):t===n})),(function(e){return e.id}))}),(function(e){return[e.blocks.parents]}));function he(e,t){var n,r=t;do{n=r,r=e.blocks.parents[r]}while(r);return n}function je(e,t){for(var n,r=pe(e),o=[].concat(Object(k.a)(ge(e,t)),[t]),c=[].concat(Object(k.a)(ge(e,r)),[r]),i=Math.min(o.length,c.length),a=0;a<i&&o[a]===c[a];a++)n=o[a];return n}function ke(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;if(void 0===t&&(t=pe(e)),void 0===t&&(t=n<0?Be(e):Ie(e)),!t)return null;var r=ve(e,t);if(null===r)return null;var o=e.blocks.order,c=o[r],i=c.indexOf(t),a=i+1*n;return a<0||a===c.length?null:c[a]}function ye(e,t){return ke(e,t,-1)}function _e(e,t){return ke(e,t,1)}function Ee(e){return e.initialPosition}var we=Object(z.a)((function(e){var t=e.selection,n=t.selectionStart,r=t.selectionEnd;if(void 0===n.clientId||void 0===r.clientId)return $;if(n.clientId===r.clientId)return[n.clientId];var o=ve(e,n.clientId);if(null===o)return $;var c=Ae(e,o),i=c.indexOf(n.clientId),a=c.indexOf(r.clientId);return i>a?c.slice(a,i+1):c.slice(i,a+1)}),(function(e){return[e.blocks.order,e.selection.selectionStart.clientId,e.selection.selectionEnd.clientId]}));function Ce(e){var t=e.selection,n=t.selectionStart,r=t.selectionEnd;return n.clientId===r.clientId?$:we(e)}var Se=Object(z.a)((function(e){var t=Ce(e);return t.length?t.map((function(t){return Z(e,t)})):$}),(function(e){return[].concat(Object(k.a)(we.getDependants(e)),[e.blocks.byClientId,e.blocks.order,e.blocks.attributes])}));function Be(e){return Object(d.first)(Ce(e))||null}function Ie(e){return Object(d.last)(Ce(e))||null}function xe(e,t){return Be(e)===t}function Pe(e,t){return-1!==Ce(e).indexOf(t)}var Te=Object(z.a)((function(e,t){for(var n=t,r=!1;n&&!r;)r=Pe(e,n=ve(e,n));return r}),(function(e){return[e.blocks.order,e.selection.selectionStart.clientId,e.selection.selectionEnd.clientId]}));function Ne(e){var t=e.selection,n=t.selectionStart,r=t.selectionEnd;return n.clientId===r.clientId?null:n.clientId||null}function De(e){var t=e.selection,n=t.selectionStart,r=t.selectionEnd;return n.clientId===r.clientId?null:r.clientId||null}function Ae(e,t){return e.blocks.order[t||""]||$}function Re(e,t,n){return Ae(e,n).indexOf(t)}function Le(e,t){var n=e.selection,r=n.selectionStart,o=n.selectionEnd;return r.clientId===o.clientId&&r.clientId===t}function Me(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return Object(d.some)(Ae(e,t),(function(t){return Le(e,t)||Pe(e,t)||n&&Me(e,t,n)}))}function Fe(e,t){if(!t)return!1;var n=Ce(e),r=n.indexOf(t);return r>-1&&r<n.length-1}function Ve(e){var t=e.selection,n=t.selectionStart,r=t.selectionEnd;return n.clientId!==r.clientId}function He(e){return e.isMultiSelecting}function ze(e){return e.isSelectionEnabled}function Ge(e,t){return e.blocksMode[t]||"visual"}function Ue(e){return e.isTyping}function We(e){return!!e.draggedBlocks.length}function Ke(e){return e.draggedBlocks}function qe(e,t){return e.draggedBlocks.includes(t)}function $e(e,t){if(!We(e))return!1;var n=ge(e,t);return Object(d.some)(n,(function(t){return qe(e,t)}))}function Ye(e){return e.isCaretWithinFormattedText}function Xe(e){var t,n,r=e.insertionPoint,o=e.selection.selectionEnd;if(null!==r)return r;var c=o.clientId;return c?(t=ve(e,c)||void 0,n=Re(e,o.clientId,t)+1):n=Ae(e).length,{rootClientId:t,index:n}}function Qe(e){return e.insertionPointVisibility}function Ze(e){return e.template.isValid}function Je(e){return e.settings.template}function et(e,t){if(!t)return e.settings.templateLock;var n=mt(e,t);return n?n.templateLock:null}var tt=function(e,t){var n,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,o=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;return Object(d.isBoolean)(e)?e:Object(d.isArray)(e)?!(!e.includes("core/post-content")||null!==t)||e.includes(t):n};if(t&&"object"===Object(H.a)(t)?t=(n=t).name:n=Object(p.getBlockType)(t),!n)return!1;var c=vt(e),i=c.allowedBlockTypes,a=o(i,t,!0);if(!a)return!1;var l=!!et(e,r);if(l)return!1;var s=mt(e,r);if(r&&void 0===s)return!1;var u=null==s?void 0:s.allowedBlocks,b=o(u,t),f=n.parent,m=Y(e,r),v=o(f,m);return null!==b&&null!==v?b||v:null!==b?b:null===v||v},nt=Object(z.a)(tt,(function(e,t,n){return[e.blockListSettings[n],e.blocks.byClientId[n],e.settings.allowedBlockTypes,e.settings.templateLock]}));function rt(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;return t.every((function(t){return nt(e,Y(e,t),n)}))}function ot(e,t){var n,r;return null!==(n=null===(r=e.preferences.insertUsage)||void 0===r?void 0:r[t])&&void 0!==n?n:null}var ct=function(e,t,n){return!!Object(p.hasBlockSupport)(t,"inserter",!0)&&tt(e,t.name,n)},it=function(e,t){return function(n){var r="".concat(t.id,"/").concat(n.name),o=ot(e,r)||{},c=o.time,i=o.count,a=void 0===i?0:i;return K(K({},t),{},{id:r,icon:n.icon||t.icon,title:n.title||t.title,description:n.description||t.description,category:n.category||t.category,example:n.hasOwnProperty("example")?n.example:t.example,initialAttributes:K(K({},t.initialAttributes),n.attributes),innerBlocks:n.innerBlocks,keywords:n.keywords||t.keywords,frecency:at(c,a)})}},at=function(e,t){if(!e)return t;var n=Date.now()-e;switch(!0){case n<36e5:return 4*t;case n<864e5:return 2*t;case n<6048e5:return t/2;default:return t/4}},lt=function(e,t){var n=t.buildScope,r=void 0===n?"inserter":n;return function(t){var n=t.name,o=!1;Object(p.hasBlockSupport)(t.name,"multiple",!0)||(o=Object(d.some)(ie(e,oe(e)),{name:t.name}));var c=ot(e,n)||{},i=c.time,a=c.count,l=void 0===a?0:a,s={id:n,name:t.name,title:t.title,icon:t.icon,isDisabled:o,frecency:at(i,l)};if("transform"===r)return s;var u=t.variations.filter((function(e){var t=e.scope;return!t||t.includes("inserter")}));return K(K({},s),{},{initialAttributes:{},description:t.description,category:t.category,keywords:t.keywords,variations:u,example:t.example,utility:1})}},st=Object(z.a)((function(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,r=lt(e,{buildScope:"inserter"}),o=function(t){var n,r="core/block/".concat(t.id),o=ht(e,t.id);1===o.length&&(n=Object(p.getBlockType)(o[0].name));var c=ot(e,r)||{},i=c.time,a=c.count,l=at(i,void 0===a?0:a);return{id:r,name:"core/block",initialAttributes:{ref:t.id},title:t.title.raw,icon:n?n.icon:q,category:"reusable",keywords:[],isDisabled:!1,utility:1,frecency:l}},c=Object(p.getBlockTypes)().filter((function(t){return ct(e,t,n)})).map(r),i=tt(e,"core/block",n)?_t(e).map(o):[],a=c.filter((function(e){var t=e.variations;return!(void 0===t?[]:t).some((function(e){return e.isDefault}))})),l=[],s=G(c);try{for(s.s();!(t=s.n()).done;){var u=t.value,d=u.variations,b=void 0===d?[]:d;if(b.length){var f=it(e,u);l.push.apply(l,Object(k.a)(b.map(f)))}}}catch(e){s.e(e)}finally{s.f()}return[].concat(Object(k.a)(a),l,Object(k.a)(i))}),(function(e,t){return[e.blockListSettings[t],e.blocks.byClientId,e.blocks.order,e.preferences.insertUsage,e.settings.allowedBlockTypes,e.settings.templateLock,_t(e),Object(p.getBlockTypes)()]})),ut=Object(z.a)((function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,r=lt(e,{buildScope:"transform"}),o=Object(p.getBlockTypes)().filter((function(t){return ct(e,t,n)})).map(r),c=Object(d.mapKeys)(o,(function(e){return e.name})),i=Object(p.getPossibleBlockTransformations)(t).reduce((function(e,t){return c[null==t?void 0:t.name]&&e.push(c[t.name]),e}),[]),a=Object(d.orderBy)(i,(function(e){return c[e.name].frecency}),"desc");return a}),(function(e,t){return[e.blockListSettings[t],e.blocks.byClientId,e.preferences.insertUsage,e.settings.allowedBlockTypes,e.settings.templateLock,Object(p.getBlockTypes)()]})),dt=Object(z.a)((function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=Object(d.some)(Object(p.getBlockTypes)(),(function(n){return ct(e,n,t)}));if(n)return!0;var r=tt(e,"core/block",t)&&_t(e).length>0;return r}),(function(e,t){return[e.blockListSettings[t],e.blocks.byClientId,e.settings.allowedBlockTypes,e.settings.templateLock,_t(e),Object(p.getBlockTypes)()]})),bt=Object(z.a)((function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if(t)return Object(d.filter)(Object(p.getBlockTypes)(),(function(n){return ct(e,n,t)}))}),(function(e,t){return[e.blockListSettings[t],e.blocks.byClientId,e.settings.allowedBlockTypes,e.settings.templateLock,Object(p.getBlockTypes)()]})),ft=Object(z.a)((function(e){var t=e.settings.__experimentalBlockPatterns;return Object(d.map)(t,(function(e){return K(K({},e),{},{contentBlocks:Object(p.parse)(e.content)})}))}),(function(e){return[e.settings.__experimentalBlockPatterns]})),pt=Object(z.a)((function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=ft(e);if(!t)return n;var r=Object(d.filter)(n,(function(n){var r=n.contentBlocks;return Object(d.every)(r,(function(n){var r=n.name;return nt(e,r,t)}))}));return r}),(function(e,t){return[e.settings.__experimentalBlockPatterns,e.settings.allowedBlockTypes,e.settings.templateLock,e.blockListSettings[t],e.blocks.byClientId[t]]}));function mt(e,t){return e.blockListSettings[t]}function vt(e){return e.settings}function gt(e){return e.blocks.isPersistentChange}var Ot=Object(z.a)((function(e,t){return Object(d.filter)(e.blockListSettings,(function(e,n){return t.includes(n)}))}),(function(e){return[e.blockListSettings]})),ht=Object(z.a)((function(e,t){var n=Object(d.find)(_t(e),(function(e){return e.id===t}));return n?Object(p.parse)("string"==typeof n.content.raw?n.content.raw:n.content):null}),(function(e){return[_t(e)]})),jt=Object(z.a)((function(e,t){var n,r=Object(d.find)(_t(e),(function(e){return e.id===t}));return r?null===(n=r.title)||void 0===n?void 0:n.raw:null}),(function(e){return[_t(e)]}));function kt(e){return e.blocks.isIgnoredChange}function yt(e){return e.lastBlockAttributesChange}function _t(e){var t,n;return null!==(t=null==e||null===(n=e.settings)||void 0===n?void 0:n.__experimentalReusableBlocks)&&void 0!==t?t:$}function Et(e){return e.isNavigationMode}function wt(e){return e.hasBlockMovingClientId}function Ct(e){return!!e.automaticChangeStatus}function St(e,t){return e.highlightedBlock===t}function Bt(e,t){return!!e.blocks.controlledInnerBlocks[t]}var It=Object(z.a)((function(e,t){if(!t.length)return null;var n=pe(e);if(t.includes(Y(e,n)))return n;var r=Ce(e),o=Oe(e,n||r[0],t);return o?Object(d.last)(o):null}),(function(e,t){return[e.selection.selectionStart.clientId,e.selection.selectionEnd.clientId,t]})),xt=n(16),Pt=n.n(xt),Tt=n(54),Nt={SLEEP:function(e){var t=e.duration;return new Promise((function(e){setTimeout(e,t)}))},MARK_AUTOMATIC_CHANGE_FINAL_CONTROL:Object(m.createRegistryControl)((function(e){return function(){var t=window.requestIdleCallback;(void 0===t?function(e){return setTimeout(e,100)}:t)((function(){return e.dispatch(pr).__unstableMarkAutomaticChangeFinal()}))}}))},Dt="core/block-editor";function At(e,t){var n;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return Rt(e,void 0);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Rt(e,void 0):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var c,i=!0,a=!1;return{s:function(){n=e[Symbol.iterator]()},n:function(){var e=n.next();return i=e.done,e},e:function(e){a=!0,c=e},f:function(){try{i||null==n.return||n.return()}finally{if(a)throw c}}}}function Rt(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Lt(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Mt(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Lt(Object(n),!0).forEach((function(t){Object(a.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Lt(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Ft=Pt.a.mark(cn),Vt=Pt.a.mark(an),Ht=Pt.a.mark(ln),zt=Pt.a.mark(pn),Gt=Pt.a.mark(mn),Ut=Pt.a.mark(On),Wt=Pt.a.mark(yn),Kt=Pt.a.mark(Bn),qt=Pt.a.mark(In),$t=Pt.a.mark(Pn),Yt=Pt.a.mark(Rn),Xt=Pt.a.mark(Ln),Qt=Pt.a.mark(Mn),Zt=Pt.a.mark(tr),Jt=Pt.a.mark(rr),en=Pt.a.mark(or),tn=Pt.a.mark(cr),nn=Pt.a.mark(ir),rn=Pt.a.mark(ar),on=Pt.a.mark(sr);function cn(){return Pt.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,m.controls.select(Dt,"getBlockCount");case 2:if(0!==e.sent){e.next=7;break}return e.next=6,Yn();case 6:return e.abrupt("return",e.sent);case 7:case"end":return e.stop()}}),Ft)}function an(e){return Pt.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,{type:"RESET_BLOCKS",blocks:e};case 2:return t.delegateYield(ln(e),"t0",3);case 3:return t.abrupt("return",t.t0);case 4:case"end":return t.stop()}}),Vt)}function ln(e){var t,n,r,o;return Pt.a.wrap((function(c){for(;;)switch(c.prev=c.next){case 0:return c.next=2,m.controls.select(Dt,"getTemplate");case 2:return t=c.sent,c.next=5,m.controls.select(Dt,"getTemplateLock");case 5:return n=c.sent,r=!t||"all"!==n||Object(p.doBlocksMatchTemplate)(e,t),c.next=9,m.controls.select(Dt,"isValidTemplate");case 9:if(o=c.sent,r===o){c.next=14;break}return c.next=13,An(r);case 13:return c.abrupt("return",r);case 14:case"end":return c.stop()}}),Ht)}function sn(e,t){return{type:"RESET_SELECTION",selectionStart:e,selectionEnd:t}}function un(e){return{type:"RECEIVE_BLOCKS",blocks:e}}function dn(e,t){return{type:"UPDATE_BLOCK_ATTRIBUTES",clientIds:Object(d.castArray)(e),attributes:t}}function bn(e,t){return{type:"UPDATE_BLOCK",clientId:e,updates:t}}function fn(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return{type:"SELECT_BLOCK",initialPosition:t,clientId:e}}function pn(e){var t;return Pt.a.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,m.controls.select(Dt,"getPreviousBlockClientId",e);case 2:if(!(t=n.sent)){n.next=7;break}return n.next=6,fn(t,-1);case 6:return n.abrupt("return",[t]);case 7:case"end":return n.stop()}}),zt)}function mn(e){var t;return Pt.a.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,m.controls.select(Dt,"getNextBlockClientId",e);case 2:if(!(t=n.sent)){n.next=7;break}return n.next=6,fn(t);case 6:return n.abrupt("return",[t]);case 7:case"end":return n.stop()}}),Gt)}function vn(){return{type:"START_MULTI_SELECT"}}function gn(){return{type:"STOP_MULTI_SELECT"}}function On(e,t){var n;return Pt.a.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.next=2,{type:"MULTI_SELECT",start:e,end:t};case 2:return r.next=4,m.controls.select(Dt,"getSelectedBlockCount");case 4:n=r.sent,Object(Tt.speak)(Object(y.sprintf)(
2
  /* translators: %s: number of selected blocks */
3
- Object(y._n)("%s block selected.","%s blocks selected.",n),n),"assertive");case 6:case"end":return r.stop()}}),Ut)}function hn(){return{type:"CLEAR_SELECTED_BLOCK"}}function jn(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];return{type:"TOGGLE_SELECTION",isSelectionEnabled:e}}function kn(e,t){var n,r,o=null!==(n=null==t||null===(r=t.__experimentalPreferredStyleVariations)||void 0===r?void 0:r.value)&&void 0!==n?n:{};return e.map((function(e){var t,n=e.name;if(!Object(p.hasBlockSupport)(n,"defaultStylePicker",!0))return e;if(!o[n])return e;var r=null===(t=e.attributes)||void 0===t?void 0:t.className;if(null!=r&&r.includes("is-style-"))return e;var c=e.attributes,i=void 0===c?{}:c,a=o[n];return Mt(Mt({},e),{},{attributes:Mt(Mt({},i),{},{className:"".concat(r||""," is-style-").concat(a).trim()})})}))}function yn(e,t,n,r,o){var c,i,a;return Pt.a.wrap((function(l){for(;;)switch(l.prev=l.next){case 0:return e=Object(d.castArray)(e),l.t0=kn,l.t1=Object(d.castArray)(t),l.next=5,m.controls.select(Dt,"getSettings");case 5:return l.t2=l.sent,t=(0,l.t0)(l.t1,l.t2),l.next=9,m.controls.select(Dt,"getBlockRootClientId",Object(d.first)(e));case 9:c=l.sent,i=0;case 11:if(!(i<t.length)){l.next=21;break}return a=t[i],l.next=15,m.controls.select(Dt,"canInsertBlockType",a.name,c);case 15:if(l.sent){l.next=18;break}return l.abrupt("return");case 18:i++,l.next=11;break;case 21:return l.next=23,{type:"REPLACE_BLOCKS",clientIds:e,blocks:t,time:Date.now(),indexToSelect:n,initialPosition:r,meta:o};case 23:return l.delegateYield(cn(),"t3",24);case 24:case"end":return l.stop()}}),Wt)}function En(e,t){return yn(e,t)}function wn(e){return function(t,n){return{clientIds:Object(d.castArray)(t),type:e,rootClientId:n}}}var Cn=wn("MOVE_BLOCKS_DOWN"),Sn=wn("MOVE_BLOCKS_UP");function Bn(e){var t,n,r,o,c,i=arguments;return Pt.a.wrap((function(a){for(;;)switch(a.prev=a.next){case 0:return t=i.length>1&&void 0!==i[1]?i[1]:"",n=i.length>2&&void 0!==i[2]?i[2]:"",r=i.length>3?i[3]:void 0,a.next=5,m.controls.select(Dt,"getTemplateLock",t);case 5:if("all"!==(o=a.sent)){a.next=8;break}return a.abrupt("return");case 8:if(c={type:"MOVE_BLOCKS_TO_POSITION",fromRootClientId:t,toRootClientId:n,clientIds:e,index:r},t!==n){a.next=13;break}return a.next=12,c;case 12:return a.abrupt("return");case 13:if("insert"!==o){a.next=15;break}return a.abrupt("return");case 15:return a.next=17,m.controls.select(Dt,"canInsertBlocks",e,n);case 17:if(!a.sent){a.next=21;break}return a.next=21,c;case 21:case"end":return a.stop()}}),Kt)}function In(e){var t,n,r,o=arguments;return Pt.a.wrap((function(c){for(;;)switch(c.prev=c.next){case 0:return t=o.length>1&&void 0!==o[1]?o[1]:"",n=o.length>2&&void 0!==o[2]?o[2]:"",r=o.length>3?o[3]:void 0,c.next=5,Bn([e],t,n,r);case 5:case"end":return c.stop()}}),qt)}function xn(e,t,n){var r=!(arguments.length>3&&void 0!==arguments[3])||arguments[3];return Pn([e],t,n,r)}function Pn(e,t,n){var r,o,c,i,a,l,s=arguments;return Pt.a.wrap((function(u){for(;;)switch(u.prev=u.next){case 0:return r=!(s.length>3&&void 0!==s[3])||s[3],o=s.length>4?s[4]:void 0,u.t0=kn,u.t1=Object(d.castArray)(e),u.next=6,m.controls.select(Dt,"getSettings");case 6:u.t2=u.sent,e=(0,u.t0)(u.t1,u.t2),c=[],i=At(e),u.prev=10,i.s();case 12:if((a=i.n()).done){u.next=20;break}return l=a.value,u.next=16,m.controls.select(Dt,"canInsertBlockType",l.name,n);case 16:u.sent&&c.push(l);case 18:u.next=12;break;case 20:u.next=25;break;case 22:u.prev=22,u.t3=u.catch(10),i.e(u.t3);case 25:return u.prev=25,i.f(),u.finish(25);case 28:if(!c.length){u.next=30;break}return u.abrupt("return",{type:"INSERT_BLOCKS",blocks:c,index:t,rootClientId:n,time:Date.now(),updateSelection:r,meta:o});case 30:case"end":return u.stop()}}),$t,null,[[10,22,25,28]])}function Tn(e,t){return{type:"SET_INSERTION_POINT",rootClientId:e,index:t}}function Nn(e,t){return{type:"SHOW_INSERTION_POINT",rootClientId:e,index:t}}function Dn(){return{type:"HIDE_INSERTION_POINT"}}function An(e){return{type:"SET_TEMPLATE_VALIDITY",isValid:e}}function Rn(){var e,t,n;return Pt.a.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.next=2,{type:"SYNCHRONIZE_TEMPLATE"};case 2:return r.next=4,m.controls.select(Dt,"getBlocks");case 4:return e=r.sent,r.next=7,m.controls.select(Dt,"getTemplate");case 7:return t=r.sent,n=Object(p.synchronizeBlocksWithTemplate)(e,t),r.next=11,an(n);case 11:return r.abrupt("return",r.sent);case 12:case"end":return r.stop()}}),Yt)}function Ln(e,t){var n,r,o,i,a,l,s,u,b,f,v,g,O,h,j,y,_,E,w,C,S,B,I,x,P,T,N,D,A,R,L,M,F,V;return Pt.a.wrap((function(z){for(;;)switch(z.prev=z.next){case 0:return n=[e,t],z.next=3,{type:"MERGE_BLOCKS",blocks:n};case 3:return r=n[0],o=n[1],z.next=6,m.controls.select(Dt,"getBlock",r);case 6:if(i=z.sent,(a=Object(p.getBlockType)(i.name)).merge){z.next=12;break}return z.next=11,fn(i.clientId);case 11:return z.abrupt("return");case 12:return z.next=14,m.controls.select(Dt,"getBlock",o);case 14:return l=z.sent,s=Object(p.getBlockType)(l.name),z.next=18,m.controls.select(Dt,"getSelectionStart");case 18:if(u=z.sent,b=u.clientId,f=u.attributeKey,v=u.offset,g=(b===r?a:s).attributes[f],O=(b===r||b===o)&&void 0!==f&&void 0!==v&&!!g,g||("number"==typeof f?window.console.error("RichText needs an identifier prop that is the block attribute key of the attribute it controls. Its type is expected to be a string, but was ".concat(Object(H.a)(f))):window.console.error("The RichText identifier prop does not match any attributes defined by the block.")),h="†",j=Object(p.cloneBlock)(i),y=Object(p.cloneBlock)(l),O&&(E=(_=b===r?j:y).attributes[f],w=g.multiline,C=g.__unstableMultilineWrapperTags,S=g.__unstablePreserveWhiteSpace,B=Object(c.insert)(Object(c.create)({html:E,multilineTag:w,multilineWrapperTags:C,preserveWhiteSpace:S}),h,v,v),_.attributes[f]=Object(c.toHTMLString)({value:B,multilineTag:w,preserveWhiteSpace:S})),(I=i.name===l.name?[y]:Object(p.switchToBlockType)(y,i.name))&&I.length){z.next=33;break}return z.abrupt("return");case 33:if(x=a.merge(j.attributes,I[0].attributes),!O){z.next=45;break}return P=Object(d.findKey)(x,(function(e){return"string"==typeof e&&-1!==e.indexOf(h)})),T=x[P],N=a.attributes[P],D=N.multiline,A=N.__unstableMultilineWrapperTags,R=N.__unstablePreserveWhiteSpace,L=Object(c.create)({html:T,multilineTag:D,multilineWrapperTags:A,preserveWhiteSpace:R}),M=L.text.indexOf(h),F=Object(c.remove)(L,M,M+1),V=Object(c.toHTMLString)({value:F,multilineTag:D,preserveWhiteSpace:R}),x[P]=V,z.next=45,$n(i.clientId,P,M,M);case 45:return z.delegateYield(yn([i.clientId,l.clientId],[Mt(Mt({},i),{},{attributes:Mt(Mt({},i.attributes),x)})].concat(Object(k.a)(I.slice(1)))),"t0",46);case 46:case"end":return z.stop()}}),Xt)}function Mn(e){var t,n,r,o,c=arguments;return Pt.a.wrap((function(i){for(;;)switch(i.prev=i.next){case 0:if(t=!(c.length>1&&void 0!==c[1])||c[1],e&&e.length){i.next=3;break}return i.abrupt("return");case 3:return e=Object(d.castArray)(e),i.next=6,m.controls.select(Dt,"getBlockRootClientId",e[0]);case 6:return n=i.sent,i.next=9,m.controls.select(Dt,"getTemplateLock",n);case 9:if(!i.sent){i.next=12;break}return i.abrupt("return");case 12:if(!t){i.next=18;break}return i.next=15,pn(e[0]);case 15:r=i.sent,i.next=21;break;case 18:return i.next=20,m.controls.select(Dt,"getPreviousBlockClientId",e[0]);case 20:r=i.sent;case 21:return i.next=23,{type:"REMOVE_BLOCKS",clientIds:e};case 23:return i.delegateYield(cn(),"t0",24);case 24:return o=i.t0,i.abrupt("return",[r||o]);case 26:case"end":return i.stop()}}),Qt)}function Fn(e,t){return Mn([e],t)}function Vn(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return{type:"REPLACE_INNER_BLOCKS",rootClientId:e,blocks:t,updateSelection:n,time:Date.now()}}function Hn(e){return{type:"TOGGLE_BLOCK_MODE",clientId:e}}function zn(){return{type:"START_TYPING"}}function Gn(){return{type:"STOP_TYPING"}}function Un(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return{type:"START_DRAGGING_BLOCKS",clientIds:e}}function Wn(){return{type:"STOP_DRAGGING_BLOCKS"}}function Kn(){return{type:"ENTER_FORMATTED_TEXT"}}function qn(){return{type:"EXIT_FORMATTED_TEXT"}}function $n(e,t,n,r){return{type:"SELECTION_CHANGE",clientId:e,attributeKey:t,startOffset:n,endOffset:r}}function Yn(e,t,n){var r=Object(p.getDefaultBlockName)();if(r)return xn(Object(p.createBlock)(r,e),n,t)}function Xn(e,t){return{type:"UPDATE_BLOCK_LIST_SETTINGS",clientId:e,settings:t}}function Qn(e){return{type:"UPDATE_SETTINGS",settings:e}}function Zn(e,t){return{type:"SAVE_REUSABLE_BLOCK_SUCCESS",id:e,updatedId:t}}function Jn(){return{type:"MARK_LAST_CHANGE_AS_PERSISTENT"}}function er(){return{type:"MARK_NEXT_CHANGE_AS_NOT_PERSISTENT"}}function tr(){return Pt.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,{type:"MARK_AUTOMATIC_CHANGE"};case 2:return e.next=4,{type:"MARK_AUTOMATIC_CHANGE_FINAL_CONTROL"};case 4:case"end":return e.stop()}}),Zt)}function nr(){return{type:"MARK_AUTOMATIC_CHANGE_FINAL"}}function rr(){var e,t=arguments;return Pt.a.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return e=!(t.length>0&&void 0!==t[0])||t[0],n.next=3,{type:"SET_NAVIGATION_MODE",isNavigationMode:e};case 3:e?Object(Tt.speak)(Object(y.__)("You are currently in navigation mode. Navigate blocks using the Tab key and Arrow keys. Use Left and Right Arrow keys to move between nesting levels. To exit navigation mode and edit the selected block, press Enter.")):Object(Tt.speak)(Object(y.__)("You are currently in edit mode. To return to the navigation mode, press Escape."));case 4:case"end":return n.stop()}}),Jt)}function or(){var e,t=arguments;return Pt.a.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return e=t.length>0&&void 0!==t[0]?t[0]:null,n.next=3,{type:"SET_BLOCK_MOVING_MODE",hasBlockMovingClientId:e};case 3:e&&Object(Tt.speak)(Object(y.__)("Use the Tab key and Arrow keys to choose new block location. Use Left and Right Arrow keys to move between nesting levels. Once location is selected press Enter or Space to move the block."));case 4:case"end":return n.stop()}}),en)}function cr(e){var t,n,r,o,c,i,a=arguments;return Pt.a.wrap((function(l){for(;;)switch(l.prev=l.next){case 0:if(t=!(a.length>1&&void 0!==a[1])||a[1],e||e.length){l.next=3;break}return l.abrupt("return");case 3:return l.next=5,m.controls.select(Dt,"getBlocksByClientId",e);case 5:return n=l.sent,l.next=8,m.controls.select(Dt,"getBlockRootClientId",e[0]);case 8:if(r=l.sent,!Object(d.some)(n,(function(e){return!e}))){l.next=11;break}return l.abrupt("return");case 11:if(o=n.map((function(e){return e.name})),!Object(d.some)(o,(function(e){return!Object(p.hasBlockSupport)(e,"multiple",!0)}))){l.next=14;break}return l.abrupt("return");case 14:return l.next=16,m.controls.select(Dt,"getBlockIndex",Object(d.last)(Object(d.castArray)(e)),r);case 16:return c=l.sent,i=n.map((function(e){return Object(p.cloneBlock)(e)})),l.next=20,Pn(i,c+1,r,t);case 20:if(!(i.length>1&&t)){l.next=23;break}return l.next=23,On(Object(d.first)(i).clientId,Object(d.last)(i).clientId);case 23:return l.abrupt("return",i.map((function(e){return e.clientId})));case 24:case"end":return l.stop()}}),tn)}function ir(e){var t,n;return Pt.a.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(e){r.next=2;break}return r.abrupt("return");case 2:return r.next=4,m.controls.select(Dt,"getBlockRootClientId",e);case 4:return t=r.sent,r.next=7,m.controls.select(Dt,"getTemplateLock",t);case 7:if(!r.sent){r.next=10;break}return r.abrupt("return");case 10:return r.next=12,m.controls.select(Dt,"getBlockIndex",e,t);case 12:return n=r.sent,r.next=15,Yn({},t,n);case 15:return r.abrupt("return",r.sent);case 16:case"end":return r.stop()}}),nn)}function ar(e){var t,n;return Pt.a.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(e){r.next=2;break}return r.abrupt("return");case 2:return r.next=4,m.controls.select(Dt,"getBlockRootClientId",e);case 4:return t=r.sent,r.next=7,m.controls.select(Dt,"getTemplateLock",t);case 7:if(!r.sent){r.next=10;break}return r.abrupt("return");case 10:return r.next=12,m.controls.select(Dt,"getBlockIndex",e,t);case 12:return n=r.sent,r.next=15,Yn({},t,n+1);case 15:return r.abrupt("return",r.sent);case 16:case"end":return r.stop()}}),rn)}function lr(e,t){return{type:"TOGGLE_BLOCK_HIGHLIGHT",clientId:e,isHighlighted:t}}function sr(e){return Pt.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,lr(e,!0);case 2:return t.next=4,{type:"SLEEP",duration:150};case 4:return t.next=6,lr(e,!1);case 6:case"end":return t.stop()}}),on)}function ur(e,t){return{type:"SET_HAS_CONTROLLED_INNER_BLOCKS",hasControlledInnerBlocks:t,clientId:e}}function dr(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function br(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?dr(Object(n),!0).forEach((function(t){Object(a.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):dr(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var fr={reducer:V,selectors:r,actions:o,controls:Nt},pr=Object(m.createReduxStore)(Dt,br(br({},fr),{},{persist:["preferences"]}));function mr(){var e=h(),t=e.isSelected,n=e.clientId,r=e.name,o=Object(m.useSelect)((function(e){if(!t){var o=e(pr),c=o.getBlockName,i=o.isFirstMultiSelectedBlock,a=o.getMultiSelectedBlockClientIds;return!!i(n)&&a().every((function(e){return c(e)===r}))}}),[n,t,r]);return t||o}Object(m.registerStore)(Dt,br(br({},fr),{},{persist:["preferences"]}));var vr=Object(v.createSlotFill)("BlockControls"),gr=vr.Fill,Or=vr.Slot,hr=function(e){var t=e.controls,n=e.children;return mr()?Object(l.createElement)(gr,null,(function(e){var r=Object(d.isEmpty)(e)?null:e;return Object(l.createElement)(v.__experimentalToolbarContext.Provider,{value:r},Object(l.createElement)(v.ToolbarGroup,{controls:t}),n)})):null};hr.Slot=function(e){var t=Object(l.useContext)(v.__experimentalToolbarContext);return Object(l.createElement)(Or,Object(i.a)({},e,{fillProps:t}))};var jr=hr,kr=n(7),yr=Object(l.createElement)(kr.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(l.createElement)(kr.Path,{d:"M4 9v6h14V9H4zm8-4.8H4v1.5h8V4.2zM4 19.8h8v-1.5H4v1.5z"})),_r=Object(l.createElement)(kr.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(l.createElement)(kr.Path,{d:"M5 15h14V9H5v6zm0 4.8h14v-1.5H5v1.5zM5 4.2v1.5h14V4.2H5z"})),Er=Object(l.createElement)(kr.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(l.createElement)(kr.Path,{d:"M6 15h14V9H6v6zm6-10.8v1.5h8V4.2h-8zm0 15.6h8v-1.5h-8v1.5z"})),wr=Object(l.createElement)(kr.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(l.createElement)(kr.Path,{d:"M5 9v6h14V9H5zm11-4.8H8v1.5h8V4.2zM8 19.8h8v-1.5H8v1.5z"})),Cr=Object(l.createElement)(kr.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(l.createElement)(kr.Path,{d:"M5 4v11h14V4H5zm3 15.8h8v-1.5H8v1.5z"})),Sr={type:"default"},Br=Object(l.createContext)(Sr),Ir=Br.Provider;function xr(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Pr(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?xr(Object(n),!0).forEach((function(t){Object(a.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):xr(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Tr={left:{icon:yr,title:Object(y.__)("Align left")},center:{icon:_r,title:Object(y.__)("Align center")},right:{icon:Er,title:Object(y.__)("Align right")},wide:{icon:wr,title:Object(y.__)("Wide width")},full:{icon:Cr,title:Object(y.__)("Full width")}},Nr=["left","center","right","wide","full"],Dr=["wide","full"],Ar={isAlternate:!0},Rr=function(e){var t=e.value,n=e.onChange,r=e.controls,o=void 0===r?Nr:r,c=e.isCollapsed,i=void 0===c||c,a=Object(m.useSelect)((function(e){return{wideControlsEnabled:(0,e(pr).getSettings)().alignWide}})).wideControlsEnabled,s=void 0!==a&&a,u=Object(l.useContext)(Br);if("default"!==u.type)return null;var d=u.alignments,b=void 0===d?Nr:d,f=o.filter((function(e){return(s||!Dr.includes(e))&&b.includes(e)}));if(0===f.length)return null;var p=Tr[t],g=Tr.center;return Object(l.createElement)(v.ToolbarGroup,{popoverProps:Ar,isCollapsed:i,icon:p?p.icon:g.icon,label:Object(y.__)("Align"),toggleProps:{describedBy:Object(y.__)("Change alignment")},controls:f.map((function(e){return Pr(Pr({},Tr[e]),{},{isActive:t===e,role:i?"menuitemradio":void 0,onClick:(r=e,function(){return n(t===r?void 0:r)})});var r}))})};function Lr(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Mr(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Lr(Object(n),!0).forEach((function(t){Object(a.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Lr(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Fr=["left","center","right","wide","full"],Vr=["wide","full"];function Hr(e){var t,n=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],r=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];return t=Array.isArray(e)?Fr.filter((function(t){return e.includes(t)})):!0===e?Fr:[],!r||!0===e&&!n?d.without.apply(void 0,[t].concat(Vr)):t}var zr=Object(b.createHigherOrderComponent)((function(e){return function(t){var n=t.name,r=Hr(Object(p.getBlockSupport)(n,"align"),Object(p.hasBlockSupport)(n,"alignWide",!0));return[r.length>0&&t.isSelected&&Object(l.createElement)(jr,{key:"align-controls"},Object(l.createElement)(Rr,{value:t.attributes.align,onChange:function(e){var n,r;e||(null===(n=Object(p.getBlockType)(t.name).attributes)||void 0===n||null===(r=n.align)||void 0===r?void 0:r.default)&&(e=""),t.setAttributes({align:e})},controls:r})),Object(l.createElement)(e,Object(i.a)({key:"edit"},t))]}}),"withToolbarControls"),Gr=Object(b.createHigherOrderComponent)((function(e){return function(t){var n=t.name,r=t.attributes.align,o=Object(m.useSelect)((function(e){return!!e(pr).getSettings().alignWide}),[]);if(void 0===r)return Object(l.createElement)(e,t);var c=Hr(Object(p.getBlockSupport)(n,"align"),Object(p.hasBlockSupport)(n,"alignWide",!0),o),a=t.wrapperProps;return c.includes(r)&&(a=Mr(Mr({},a),{},{"data-align":r})),Object(l.createElement)(e,Object(i.a)({},t,{wrapperProps:a}))}}));Object(f.addFilter)("blocks.registerBlockType","core/align/addAttribute",(function(e){return Object(d.has)(e.attributes,["align","type"])||Object(p.hasBlockSupport)(e,"align")&&(e.attributes=Mr(Mr({},e.attributes),{},{align:{type:"string",enum:[].concat(Fr,[""])}})),e})),Object(f.addFilter)("editor.BlockListBlock","core/editor/align/with-data-align",Gr),Object(f.addFilter)("editor.BlockEdit","core/editor/align/with-toolbar-controls",zr),Object(f.addFilter)("blocks.getSaveContent.extraProps","core/align/addAssignedAlign",(function(e,t,n){var r=n.align;return Hr(Object(p.getBlockSupport)(t,"align"),Object(p.hasBlockSupport)(t,"alignWide",!0)).includes(r)&&(e.className=u()("align".concat(r),e.className)),e}));var Ur=Object(v.createSlotFill)("InspectorAdvancedControls"),Wr=Ur.Fill,Kr=Ur.Slot;function qr(e){var t=e.children;return h().isSelected?Object(l.createElement)(Wr,null,t):null}qr.slotName="InspectorAdvancedControls",qr.Slot=Kr;var $r=qr,Yr=Object(v.createSlotFill)("InspectorControls"),Xr=Yr.Fill,Qr=Yr.Slot;function Zr(e){var t=e.children;return mr()?Object(l.createElement)(Xr,null,t):null}Zr.Slot=Qr;var Jr=Zr;function eo(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function to(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?eo(Object(n),!0).forEach((function(t){Object(a.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):eo(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var no=/[\s#]/g,ro=Object(b.createHigherOrderComponent)((function(e){return function(t){if(Object(p.hasBlockSupport)(t.name,"anchor")&&t.isSelected){var n="web"===l.Platform.OS,r=Object(l.createElement)(v.TextControl,{className:"html-anchor-control",label:Object(y.__)("HTML anchor"),help:Object(l.createElement)(l.Fragment,null,Object(y.__)("Enter a word or two — without spaces — to make a unique web address just for this block, called an “anchor.” Then, you’ll be able to link directly to this section of your page."),Object(l.createElement)(v.ExternalLink,{href:"https://wordpress.org/support/article/page-jumps/"},Object(y.__)("Learn more about anchors"))),value:t.attributes.anchor||"",valuePlaceholder:n?null:Object(y.__)("Add an anchor"),onChange:function(e){e=e.replace(no,"-"),t.setAttributes({anchor:e})},autoCapitalize:"none",autoComplete:"off"});return Object(l.createElement)(l.Fragment,null,Object(l.createElement)(e,t),n&&Object(l.createElement)($r,null,r),!n&&"core/heading"===t.name&&Object(l.createElement)(Jr,null,Object(l.createElement)(v.PanelBody,{title:Object(y.__)("Heading settings")},r)))}return Object(l.createElement)(e,t)}}),"withInspectorControl");function oo(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function co(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?oo(Object(n),!0).forEach((function(t){Object(a.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):oo(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}Object(f.addFilter)("blocks.registerBlockType","core/anchor/attribute",(function(e){return Object(d.has)(e.attributes,["anchor","type"])||Object(p.hasBlockSupport)(e,"anchor")&&(e.attributes=to(to({},e.attributes),{},{anchor:{type:"string",source:"attribute",attribute:"id",selector:"*"}})),e})),Object(f.addFilter)("editor.BlockEdit","core/editor/anchor/with-inspector-control",ro),Object(f.addFilter)("blocks.getSaveContent.extraProps","core/anchor/save-props",(function(e,t,n){return Object(p.hasBlockSupport)(t,"anchor")&&(e.id=""===n.anchor?null:n.anchor),e}));var io=Object(b.createHigherOrderComponent)((function(e){return function(t){return Object(p.hasBlockSupport)(t.name,"customClassName",!0)&&t.isSelected?Object(l.createElement)(l.Fragment,null,Object(l.createElement)(e,t),Object(l.createElement)($r,null,Object(l.createElement)(v.TextControl,{autoComplete:"off",label:Object(y.__)("Additional CSS class(es)"),value:t.attributes.className||"",onChange:function(e){t.setAttributes({className:""!==e?e:void 0})},help:Object(y.__)("Separate multiple classes with spaces.")}))):Object(l.createElement)(e,t)}}),"withInspectorControl");function ao(e){e="<div data-custom-class-name>".concat(e,"</div>");var t=Object(p.parseWithAttributeSchema)(e,{type:"string",source:"attribute",selector:"[data-custom-class-name] > *",attribute:"class"});return t?t.trim().split(/\s+/):[]}Object(f.addFilter)("blocks.registerBlockType","core/custom-class-name/attribute",(function(e){return Object(p.hasBlockSupport)(e,"customClassName",!0)&&(e.attributes=co(co({},e.attributes),{},{className:{type:"string"}})),e})),Object(f.addFilter)("editor.BlockEdit","core/editor/custom-class-name/with-inspector-control",io),Object(f.addFilter)("blocks.getSaveContent.extraProps","core/custom-class-name/save-props",(function(e,t,n){return Object(p.hasBlockSupport)(t,"customClassName",!0)&&n.className&&(e.className=u()(e.className,n.className)),e})),Object(f.addFilter)("blocks.getBlockAttributes","core/custom-class-name/addParsedDifference",(function(e,t,n){if(Object(p.hasBlockSupport)(t,"customClassName",!0)){var r=Object(d.omit)(e,["className"]),o=Object(p.getSaveContent)(t,r),c=ao(o),i=ao(n),a=Object(d.difference)(i,c);a.length?e.className=a.join(" "):o&&delete e.className}return e})),Object(f.addFilter)("blocks.getSaveContent.extraProps","core/generated-class-name/save-props",(function(e,t){return Object(p.hasBlockSupport)(t,"className",!0)&&("string"==typeof e.className?e.className=Object(d.uniq)([Object(p.getBlockDefaultClassName)(t.name)].concat(Object(k.a)(e.className.split(" ")))).join(" ").trim():e.className=Object(p.getBlockDefaultClassName)(t.name)),e}));var lo={"color.palette":function(e){return void 0===e.colors?void 0:e.colors},"color.gradients":function(e){return void 0===e.gradients?void 0:e.gradients},"color.custom":function(e){return void 0===e.disableCustomColors?void 0:!e.disableCustomColors},"color.customGradient":function(e){return void 0===e.disableCustomGradients?void 0:!e.disableCustomGradients},"typography.fontSizes":function(e){return void 0===e.fontSizes?void 0:e.fontSizes},"typography.customFontSize":function(e){return void 0===e.disableCustomFontSizes?void 0:!e.disableCustomFontSizes},"typography.customLineHeight":function(e){return e.enableCustomLineHeight},"spacing.units":function(e){if(void 0!==e.enableCustomUnits)return!0===e.enableCustomUnits?["px","em","rem","vh","vw"]:e.enableCustomUnits},"spacing.customPadding":function(e){return e.enableCustomSpacing}};function so(e,t){for(var n in t)if(t[n]!==e[n])return!1;return!0}function uo(e){var t=h(),n=t.name,r=t.clientId;return Object(m.useSelect)((function(t){var o,c=t(pr),i=c.getBlockAttributes,a=(0,c.getSettings)(),l=t(p.store).getBlockType(n),s=n,u=Object(d.get)(l,["supports","__experimentalSelector"]);if(Object(d.isObject)(u)){var b=i(r)||{};for(var f in u)if(so(b,u[f].attributes)){s=f;break}}var m="__experimentalFeatures.defaults.".concat(e),v="__experimentalFeatures.".concat(s,".").concat(e),g=null!==(o=Object(d.get)(a,v))&&void 0!==o?o:Object(d.get)(a,m);if(void 0!==g)return g;var O=lo[e]?lo[e](a):void 0;return void 0!==O?O:"typography.dropCap"===e||void 0}),[n,r,e])}var bo=function e(t){if(!Object(d.isObject)(t))return t;var n=Object(d.pickBy)(Object(d.mapValues)(t,e),d.identity);return Object(d.isEqual)(n,{})?void 0:n};function fo(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function po(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?fo(Object(n),!0).forEach((function(t){Object(a.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):fo(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function mo(e){var t,n=e.attributes.style,r=e.setAttributes;return go(e)?null:Object(l.createElement)(v.RangeControl,{value:null==n||null===(t=n.border)||void 0===t?void 0:t.radius,label:Object(y.__)("Border radius"),min:0,max:50,initialPosition:0,allowReset:!0,onChange:function(e){var t=po(po({},n),{},{border:po(po({},null==n?void 0:n.border),{},{radius:e})});r({style:bo(t)})}})}function vo(e){var t=Object(p.getBlockSupport)(e,Oo);return!!(!0===t||null!=t&&t.radius)}function go(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.name,n=!uo("border.customRadius");return!vo(t)||n}var Oo="__experimentalBorder";function ho(e){var t=jo(e),n=function(e){if("web"!==l.Platform.OS)return!1;var t=Object(p.getBlockSupport)(e,Oo);return!!(!0===t||null!=t&&t.radius)}(e.name);return t||!n?null:Object(l.createElement)(Jr,null,Object(l.createElement)(v.PanelBody,{title:Object(y.__)("Border settings")},Object(l.createElement)(mo,e)))}var jo=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=[go(e)];return t.every(Boolean)},ko=n(61),yo=n.n(ko),_o=function(e,t,n){if(t){var r=Object(d.find)(e,{slug:t});if(r)return r}return{color:n}},Eo=function(e,t){return Object(d.find)(e,{color:t})};function wo(e,t){if(e&&t)return"has-".concat(Object(d.kebabCase)(t),"-").concat(e)}var Co=[];function So(e){if(e)return"has-".concat(e,"-gradient-background")}function Bo(e,t){var n=Object(d.find)(e,["slug",t]);return n&&n.gradient}function Io(e,t){return Object(d.find)(e,["gradient",t])}function xo(e,t){var n=Io(e,t);return n&&n.slug}function Po(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.gradientAttribute,n=void 0===t?"gradient":t,r=e.customGradientAttribute,o=void 0===r?"customGradient":r,c=h(),i=c.clientId,s=uo("color.gradients")||Co,u=Object(m.useSelect)((function(e){var t=(0,e(pr).getBlockAttributes)(i)||{};return{customGradient:t[o],gradient:t[n]}}),[i,n,o]),d=u.gradient,b=u.customGradient,f=Object(m.useDispatch)(pr),p=f.updateBlockAttributes,v=Object(l.useCallback)((function(e){var t,r,c=xo(s,e);p(i,c?(r={},Object(a.a)(r,n,c),Object(a.a)(r,o,void 0),r):(t={},Object(a.a)(t,n,void 0),Object(a.a)(t,o,e),t))}),[s,i,p]),g=So(d);return{gradientClass:g,gradientValue:d?Bo(s,d):b,setGradient:v}}var To=n(9);function No(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Do(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?No(Object(n),!0).forEach((function(t){Object(a.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):No(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}
4
  // translators: first %s: the color name or value (e.g. red or #ff0000)
5
- var Ao=Object(y.__)("(Color: %s)"),Ro=Object(y.__)("(Gradient: %s)"),Lo=["colors","disableCustomColors","gradients","disableCustomGradients"];// translators: first %s: the gradient name or value (e.g. red to green or linear-gradient(135deg,rgba(6,147,227,1) 0%,rgb(155,81,224) 100%)
6
- function Mo(e){var t,n,r=e.colors,o=e.gradients,c=e.label,i=e.currentTab,a=e.colorValue,s=e.gradientValue;if("color"===i){if(a){var u=Eo(r,t=a),d=u&&u.name;n=Object(y.sprintf)(Ao,d||t)}}else if("gradient"===i&&s){var b=Io(o,t=s),f=b&&b.name;n=Object(y.sprintf)(Ro,f||t)}return Object(l.createElement)(l.Fragment,null,c,!!t&&Object(l.createElement)(v.ColorIndicator,{colorValue:t,"aria-label":n}))}function Fo(e){var t=e.colors,n=e.gradients,r=e.disableCustomColors,o=e.disableCustomGradients,c=e.className,a=e.label,s=e.onColorChange,b=e.onGradientChange,f=e.colorValue,p=e.gradientValue,m=e.clearable,g=s&&(!Object(d.isEmpty)(t)||!r),O=b&&(!Object(d.isEmpty)(n)||!o),h=Object(l.useState)(p?"gradient":!!g&&"color"),j=Object(To.a)(h,2),k=j[0],_=j[1];return g||O?Object(l.createElement)(v.BaseControl,{className:u()("block-editor-color-gradient-control",c)},Object(l.createElement)("fieldset",null,Object(l.createElement)("legend",null,Object(l.createElement)("div",{className:"block-editor-color-gradient-control__color-indicator"},Object(l.createElement)(v.BaseControl.VisualLabel,null,Object(l.createElement)(Mo,{currentTab:k,label:a,colorValue:f,gradientValue:p})))),g&&O&&Object(l.createElement)(v.ButtonGroup,{className:"block-editor-color-gradient-control__button-tabs"},Object(l.createElement)(v.Button,{isSmall:!0,isPressed:"color"===k,onClick:function(){return _("color")}},Object(y.__)("Solid")),Object(l.createElement)(v.Button,{isSmall:!0,isPressed:"gradient"===k,onClick:function(){return _("gradient")}},Object(y.__)("Gradient"))),("color"===k||!O)&&Object(l.createElement)(v.ColorPalette,Object(i.a)({value:f,onChange:O?function(e){s(e),b()}:s},{colors:t,disableCustomColors:r},{clearable:m})),("gradient"===k||!g)&&Object(l.createElement)(v.__experimentalGradientPicker,Object(i.a)({value:p,onChange:g?function(e){b(e),s()}:b},{gradients:n,disableCustomGradients:o},{clearable:m})))):null}function Vo(e){var t={};return t.colors=uo("color.palette"),t.gradients=uo("color.gradients"),t.disableCustomColors=!uo("color.custom"),t.disableCustomGradients=!uo("color.customGradient"),Object(l.createElement)(Fo,Do(Do({},t),e))}var Ho=function(e){return Object(d.every)(Lo,(function(t){return e.hasOwnProperty(t)}))?Object(l.createElement)(Fo,e):Object(l.createElement)(Vo,e)};function zo(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Go(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?zo(Object(n),!0).forEach((function(t){Object(a.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):zo(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}
7
  // translators: first %s: The type of color or gradient (e.g. background, overlay...), second %s: the color name or value (e.g. red or #ff0000)
8
- var Uo=Object(y.__)("(%s: color %s)"),Wo=Object(y.__)("(%s: gradient %s)"),Ko=["colors","disableCustomColors","gradients","disableCustomGradients"],qo=function(e){var t=e.colors,n=e.gradients;return e.settings.map((function(e,r){var o,c=e.colorValue,i=e.gradientValue,a=e.label,s=e.colors,u=e.gradients;if(!c&&!i)return null;if(c){var d=Eo(s||t,c);o=Object(y.sprintf)(Uo,a.toLowerCase(),d&&d.name||c)}else{var b=Io(u||n,c);o=Object(y.sprintf)(Wo,a.toLowerCase(),b&&b.name||i)}return Object(l.createElement)(v.ColorIndicator,{key:r,colorValue:c||i,"aria-label":o})}))},$o=function(e){var t=e.className,n=e.colors,r=e.gradients,o=e.disableCustomColors,c=e.disableCustomGradients,a=e.children,s=e.settings,b=e.title,f=Object(j.a)(e,["className","colors","gradients","disableCustomColors","disableCustomGradients","children","settings","title"]);if(Object(d.isEmpty)(n)&&Object(d.isEmpty)(r)&&o&&c&&Object(d.every)(s,(function(e){return Object(d.isEmpty)(e.colors)&&Object(d.isEmpty)(e.gradients)&&(void 0===e.disableCustomColors||e.disableCustomColors)&&(void 0===e.disableCustomGradients||e.disableCustomGradients)})))return null;var p=Object(l.createElement)("span",{className:"block-editor-panel-color-gradient-settings__panel-title"},b,Object(l.createElement)(qo,{colors:n,gradients:r,settings:s}));return Object(l.createElement)(v.PanelBody,Object(i.a)({className:u()("block-editor-panel-color-gradient-settings",t),title:p},f),s.map((function(e,t){return Object(l.createElement)(Ho,Object(i.a)({key:t},Go({colors:n,gradients:r,disableCustomColors:o,disableCustomGradients:c},e)))})),a)},Yo=function(e){var t={};return t.colors=uo("color.palette"),t.gradients=uo("color.gradients"),t.disableCustomColors=!uo("color.custom"),t.disableCustomGradients=!uo("color.customGradient"),Object(l.createElement)($o,Go(Go({},t),e))},Xo=function(e){return Object(d.every)(Ko,(function(t){return e.hasOwnProperty(t)}))?Object(l.createElement)($o,e):Object(l.createElement)(Yo,e)};// translators: first %s: The type of color or gradient (e.g. background, overlay...), second %s: the color name or value (e.g. red or #ff0000)
9
- function Qo(e){var t=e.tinyBackgroundColor,n=e.tinyTextColor,r=e.backgroundColor,o=e.textColor,c=t.getBrightness()<n.getBrightness()?Object(y.__)("This color combination may be hard for people to read. Try using a darker background color and/or a brighter text color."):Object(y.__)("This color combination may be hard for people to read. Try using a brighter background color and/or a darker text color.");return Object(l.useEffect)((function(){Object(Tt.speak)(Object(y.__)("This color combination may be hard for people to read."))}),[r,o]),Object(l.createElement)("div",{className:"block-editor-contrast-checker"},Object(l.createElement)(v.Notice,{spokenMessage:null,status:"warning",isDismissible:!1},c))}var Zo=function(e){var t=e.backgroundColor,n=e.fallbackBackgroundColor,r=e.fallbackTextColor,o=e.fontSize,c=e.isLargeText,i=e.textColor;if(!t&&!n||!i&&!r)return null;var a=yo()(t||n),s=yo()(i||r);return 1!==a.getAlpha()||1!==s.getAlpha()||yo.a.isReadable(a,s,{level:"AA",size:c||!1!==c&&o>=24?"large":"small"})?null:Object(l.createElement)(Qo,{backgroundColor:t,textColor:i,tinyBackgroundColor:a,tinyTextColor:s})};function Jo(e,t){return t.getElementById("block-"+e)}function ec(e,t){return t.closest(".block-editor-block-list__block")===e}function tc(e){for(;e&&e.nodeType!==e.ELEMENT_NODE;)e=e.parentNode;if(e){var t=e.closest(".block-editor-block-list__block");if(t)return t.id.slice("block-".length)}}function nc(e){return e.ownerDocument.defaultView.getComputedStyle(e)}function rc(e){var t=e.settings,n=e.clientId,r=e.enableContrastChecking,o=void 0===r||r,c=Object(l.useState)(),i=Object(To.a)(c,2),a=i[0],s=i[1],u=Object(l.useState)(),d=Object(To.a)(u,2),b=d[0],f=d[1];return Object(l.useEffect)((function(){if(o){var e=Jo(n,document);if(e){f(nc(e).color);for(var t=e,r=nc(t).backgroundColor;"rgba(0, 0, 0, 0)"===r&&t.parentNode&&t.parentNode.nodeType===t.parentNode.ELEMENT_NODE;)r=nc(t=t.parentNode).backgroundColor;s(r)}}})),Object(l.createElement)(Jr,null,Object(l.createElement)(Xo,{title:Object(y.__)("Color settings"),initialOpen:!1,settings:t},o&&Object(l.createElement)(Zo,{backgroundColor:a,textColor:b})))}function oc(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function cc(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?oc(Object(n),!0).forEach((function(t){Object(a.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):oc(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var ic=[],ac=function(e){var t=Object(p.getBlockSupport)(e,"color");return t&&(!0===t.link||!0===t.gradient||!1!==t.background||!1!==t.text)},lc=function(e){if("web"!==l.Platform.OS)return!1;var t=Object(p.getBlockSupport)(e,"color");return Object(d.isObject)(t)&&!!t.link},sc=function(e){if("web"!==l.Platform.OS)return!1;var t=Object(p.getBlockSupport)(e,"color");return Object(d.isObject)(t)&&!!t.gradients},uc=function(e){var t=Object(p.getBlockSupport)(e,"color");return t&&!1!==t.text};function dc(e,t,n){var r,o,c,i,l,s;if(!ac(t))return e;var d=sc(t),b=n.backgroundColor,f=n.textColor,p=n.gradient,m=n.style,v=wo("background-color",b),g=So(p),O=wo("color",f),h=u()(e.className,O,g,(s={},Object(a.a)(s,v,!(d&&null!=m&&null!==(r=m.color)&&void 0!==r&&r.gradient||!v)),Object(a.a)(s,"has-text-color",f||(null==m||null===(o=m.color)||void 0===o?void 0:o.text)),Object(a.a)(s,"has-background",b||(null==m||null===(c=m.color)||void 0===c?void 0:c.background)||d&&(p||(null==m||null===(i=m.color)||void 0===i?void 0:i.gradient))),Object(a.a)(s,"has-link-color",null==m||null===(l=m.color)||void 0===l?void 0:l.link),s));return e.className=h||void 0,e}var bc=function(e,t){var n=/var:preset\|color\|(.+)/.exec(t);return n&&n[1]?_o(e,n[1]).color:t};function fc(e){var t,n,r,o,c,i,s=e.name,u=e.attributes,d=uo("color.link"),b=uo("color.palette")||ic,f=uo("color.gradients")||ic,m=Object(l.useRef)(u);if(Object(l.useEffect)((function(){m.current=u}),[u]),!ac(s)||"web"!==l.Platform.OS)return null;var v,g,O,h=(v=s,(g=Object(p.getBlockSupport)(v,"color"))&&!1!==g.background),j=sc(s),_=u.style,E=u.textColor,w=u.backgroundColor,C=u.gradient;if(j&&C)O=Bo(f,C);else if(j){var S;O=null==_||null===(S=_.color)||void 0===S?void 0:S.gradient}var B=function(t){return function(n){var r,o,c=Eo(b,n),i=t+"Color",l=cc(cc({},m.current.style),{},{color:cc(cc({},null===(r=m.current)||void 0===r||null===(o=r.style)||void 0===o?void 0:o.color),{},Object(a.a)({},t,null!=c&&c.slug?void 0:n))}),s=null!=c&&c.slug?c.slug:void 0,u=Object(a.a)({style:bo(l)},i,s);e.setAttributes(u),m.current=cc(cc({},m.current),u)}};return Object(l.createElement)(rc,{enableContrastChecking:!("web"!==l.Platform.OS||C||null!=_&&null!==(t=_.color)&&void 0!==t&&t.gradient),clientId:e.clientId,settings:[].concat(Object(k.a)(uc(s)?[{label:Object(y.__)("Text Color"),onColorChange:B("text"),colorValue:_o(b,E,null==_||null===(n=_.color)||void 0===n?void 0:n.text).color}]:[]),Object(k.a)(h||j?[{label:Object(y.__)("Background Color"),onColorChange:h?B("background"):void 0,colorValue:_o(b,w,null==_||null===(r=_.color)||void 0===r?void 0:r.background).color,gradientValue:O,onGradientChange:j?function(t){var n,r=xo(f,t);if(r){var o,c,i,a=cc(cc({},null===(o=m.current)||void 0===o?void 0:o.style),{},{color:cc(cc({},null===(c=m.current)||void 0===c||null===(i=c.style)||void 0===i?void 0:i.color),{},{gradient:void 0})});n={style:bo(a),gradient:r}}else{var l,s,u,d=cc(cc({},null===(l=m.current)||void 0===l?void 0:l.style),{},{color:cc(cc({},null===(s=m.current)||void 0===s||null===(u=s.style)||void 0===u?void 0:u.color),{},{gradient:t})});n={style:bo(d),gradient:void 0}}e.setAttributes(n),m.current=cc(cc({},m.current),n)}:void 0}]:[]),Object(k.a)(d&&lc(s)?[{label:Object(y.__)("Link Color"),onColorChange:function(t){var n,r=Eo(b,t);e.setAttributes({style:cc(cc({},e.attributes.style),{},{color:cc(cc({},null===(n=e.attributes.style)||void 0===n?void 0:n.color),{},{link:null!=r&&r.slug?"var:preset|color|".concat(r.slug):t})})})},colorValue:bc(b,null==_||null===(o=_.color)||void 0===o?void 0:o.link),clearable:!(null===(c=e.attributes.style)||void 0===c||null===(i=c.color)||void 0===i||!i.link)}]:[]))})}var pc=Object(b.createHigherOrderComponent)((function(e){return function(t){var n,r,o,c=t.name,a=t.attributes,s=a.backgroundColor,u=a.textColor,d=uo("color.palette")||ic;if(!ac(c))return Object(l.createElement)(e,t);var b={color:u?null===(n=_o(d,u))||void 0===n?void 0:n.color:void 0,backgroundColor:s?null===(r=_o(d,s))||void 0===r?void 0:r.color:void 0},f=t.wrapperProps;return f=cc(cc({},t.wrapperProps),{},{style:cc(cc({},b),null===(o=t.wrapperProps)||void 0===o?void 0:o.style)}),Object(l.createElement)(e,Object(i.a)({},t,{wrapperProps:f}))}}));Object(f.addFilter)("blocks.registerBlockType","core/color/addAttribute",(function(e){return ac(e)?(e.attributes.backgroundColor||Object.assign(e.attributes,{backgroundColor:{type:"string"}}),e.attributes.textColor||Object.assign(e.attributes,{textColor:{type:"string"}}),sc(e)&&!e.attributes.gradient&&Object.assign(e.attributes,{gradient:{type:"string"}}),e):e})),Object(f.addFilter)("blocks.getSaveContent.extraProps","core/color/addSaveProps",dc),Object(f.addFilter)("blocks.registerBlockType","core/color/addEditProps",(function(e){if(!ac(e))return e;var t=e.getEditWrapperProps;return e.getEditWrapperProps=function(n){var r={};return t&&(r=t(n)),dc(r,e,n)},e})),Object(f.addFilter)("editor.BlockListBlock","core/color/with-color-palette-styles",pc);var mc=Object(l.createElement)(kr.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(l.createElement)(kr.Path,{d:"M7 18v1h10v-1H7zm5-2c1.5 0 2.6-.4 3.4-1.2.8-.8 1.1-2 1.1-3.5V5H15v5.8c0 1.2-.2 2.1-.6 2.8-.4.7-1.2 1-2.4 1s-2-.3-2.4-1c-.4-.7-.6-1.6-.6-2.8V5H7.5v6.2c0 1.5.4 2.7 1.1 3.5.8.9 1.9 1.3 3.4 1.3z"})),vc=n(367),gc=[{name:Object(y.__)("Underline"),value:"underline",icon:mc},{name:Object(y.__)("Strikethrough"),value:"line-through",icon:vc.a}];function Oc(e){var t=e.value,n=e.onChange;return Object(l.createElement)("fieldset",{className:"block-editor-text-decoration-control"},Object(l.createElement)("legend",null,Object(y.__)("Decoration")),Object(l.createElement)("div",{className:"block-editor-text-decoration-control__buttons"},gc.map((function(e){return Object(l.createElement)(v.Button,{key:e.value,icon:e.icon,isSmall:!0,isPressed:e.value===t,onClick:function(){return n(e.value===t?void 0:e.value)},"aria-label":e.name})}))))}function hc(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function jc(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?hc(Object(n),!0).forEach((function(t){Object(a.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):hc(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function kc(e){var t,n=e.attributes.style,r=e.setAttributes;return yc(e)?null:Object(l.createElement)(Oc,{value:null==n||null===(t=n.typography)||void 0===t?void 0:t.textDecoration,onChange:function(e){r({style:bo(jc(jc({},n),{},{typography:jc(jc({},null==n?void 0:n.typography),{},{textDecoration:e})}))})}})}function yc(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.name,n=!Object(p.hasBlockSupport)(t,"__experimentalTextDecoration"),r=uo("typography.customTextDecorations");return n||!r}var _c=Object(l.createElement)(kr.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(l.createElement)(kr.Path,{d:"M6.1 6.8L2.1 18h1.6l1.1-3h4.3l1.1 3h1.6l-4-11.2H6.1zm-.8 6.8L7 8.9l1.7 4.7H5.3zm15.1-.7c-.4-.5-.9-.8-1.6-1 .4-.2.7-.5.8-.9.2-.4.3-.9.3-1.4 0-.9-.3-1.6-.8-2-.6-.5-1.3-.7-2.4-.7h-3.5V18h4.2c1.1 0 2-.3 2.6-.8.6-.6 1-1.4 1-2.4-.1-.8-.3-1.4-.6-1.9zm-5.7-4.7h1.8c.6 0 1.1.1 1.4.4.3.2.5.7.5 1.3 0 .6-.2 1.1-.5 1.3-.3.2-.8.4-1.4.4h-1.8V8.2zm4 8c-.4.3-.9.5-1.5.5h-2.6v-3.8h2.6c1.4 0 2 .6 2 1.9.1.6-.1 1-.5 1.4z"})),Ec=Object(l.createElement)(kr.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(l.createElement)(kr.Path,{d:"M10.8 16.8c-.1-.1-.2-.3-.3-.5v-2.6c0-.9-.1-1.7-.3-2.2-.2-.5-.5-.9-.9-1.1-.4-.3-.9-.4-1.6-.4-.5 0-1 .1-1.5.2s-.9.3-1.2.6l.3 1.2c.4-.3.7-.4 1.1-.5.3-.1.7-.2 1-.2.6 0 1 .1 1.3.4.3.2.4.7.4 1.4-1.2 0-2.3.2-3.3.7s-1.4 1.1-1.4 2.1c0 .7.2 1.2.7 1.6.4.4 1 .6 1.8.6.9 0 1.7-.4 2.4-1.2.1.3.2.5.4.7.1.2.3.3.6.4.3.1.6.1 1.1.1h.1l.2-1.2h-.1c-.5.1-.7 0-.8-.1zM9.1 16c-.2.3-.5.6-.9.8-.4.1-.7.2-1.1.2-.4 0-.7-.1-.9-.3-.2-.2-.3-.5-.3-.9 0-.6.2-1 .7-1.3.5-.3 1.3-.4 2.5-.5v2zm10.5-3.9c-.3-.6-.7-1.1-1.2-1.5-.5-.4-1.2-.6-1.9-.6-.5 0-.9.1-1.4.3-.4.2-.8.5-1.1.8V6h-1.4v12h1.3l.2-1c.2.4.6.6 1 .8.4.2.9.3 1.4.3.7 0 1.2-.2 1.8-.5.5-.4 1-.9 1.3-1.5.3-.6.5-1.3.5-2.1 0-.6-.2-1.3-.5-1.9zm-1.6 4c-.4.5-.9.8-1.6.8s-1.2-.2-1.7-.7c-.5-.5-.7-1.2-.7-2.1 0-.9.2-1.6.7-2.1.4-.5 1-.7 1.7-.7s1.2.3 1.6.8c.4.5.6 1.2.6 2s-.2 1.4-.6 2z"})),wc=Object(l.createElement)(kr.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(l.createElement)(kr.Path,{d:"M7.1 6.8L3.1 18h1.6l1.1-3h4.3l1.1 3h1.6l-4-11.2H7.1zm-.8 6.8L8 8.9l1.7 4.7H6.3zm14.5-1.5c-.3-.6-.7-1.1-1.2-1.5-.6-.4-1.2-.6-1.9-.6-.5 0-.9.1-1.4.3-.4.2-.8.5-1.1.8V6h-1.4v12h1.3l.2-1c.2.4.6.6 1 .8.4.2.9.3 1.4.3.7 0 1.2-.2 1.8-.5.5-.4 1-.9 1.3-1.5.3-.6.5-1.3.5-2.1-.1-.6-.2-1.3-.5-1.9zm-1.7 4c-.4.5-.9.8-1.6.8s-1.2-.2-1.7-.7c-.4-.5-.7-1.2-.7-2.1 0-.9.2-1.6.7-2.1.4-.5 1-.7 1.7-.7s1.2.3 1.6.8c.4.5.6 1.2.6 2 .1.8-.2 1.4-.6 2z"})),Cc=[{name:Object(y.__)("Uppercase"),value:"uppercase",icon:_c},{name:Object(y.__)("Lowercase"),value:"lowercase",icon:Ec},{name:Object(y.__)("Capitalize"),value:"capitalize",icon:wc}];function Sc(e){var t=e.value,n=e.onChange;return Object(l.createElement)("fieldset",{className:"block-editor-text-transform-control"},Object(l.createElement)("legend",null,Object(y.__)("Letter case")),Object(l.createElement)("div",{className:"block-editor-text-transform-control__buttons"},Cc.map((function(e){return Object(l.createElement)(v.Button,{key:e.value,icon:e.icon,isSmall:!0,isPressed:t===e.value,"aria-label":e.name,onClick:function(){return n(t===e.value?void 0:e.value)}})}))))}function Bc(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Ic(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Bc(Object(n),!0).forEach((function(t){Object(a.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Bc(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function xc(e){var t,n=e.attributes.style,r=e.setAttributes;return Pc(e)?null:Object(l.createElement)(Sc,{value:null==n||null===(t=n.typography)||void 0===t?void 0:t.textTransform,onChange:function(e){r({style:bo(Ic(Ic({},n),{},{typography:Ic(Ic({},null==n?void 0:n.typography),{},{textTransform:e})}))})}})}function Pc(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.name,n=!Object(p.hasBlockSupport)(t,"__experimentalTextTransform"),r=uo("typography.customTextTransforms");return n||!r}function Tc(e){var t=!yc(e),n=!Pc(e);return t||n?Object(l.createElement)("div",{className:"block-editor-text-decoration-and-transform"},t&&Object(l.createElement)(kc,e),n&&Object(l.createElement)(xc,e)):null}var Nc=n(17);function Dc(e){var t=e.value,n=e.onChange,r=function(e){return void 0!==e&&""!==e}(t),o=r?t:"";return Object(l.createElement)("div",{className:"block-editor-line-height-control"},Object(l.createElement)(v.TextControl,{autoComplete:"off",onKeyDown:function(e){e.keyCode!==Nc.ZERO||r||(e.preventDefault(),n("0"))},onChange:function(e){if(r)n(e);else{var t=e;switch(e){case"".concat(.1):t=1.6;break;case"0":t=1.4}n(t)}},label:Object(y.__)("Line height"),placeholder:1.5,step:.1,type:"number",value:o,min:0}))}function Ac(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Rc(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Ac(Object(n),!0).forEach((function(t){Object(a.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ac(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Lc(e){var t,n=e.attributes.style;return Mc(e)?null:Object(l.createElement)(Dc,{value:null==n||null===(t=n.typography)||void 0===t?void 0:t.lineHeight,onChange:function(t){var r=Rc(Rc({},n),{},{typography:Rc(Rc({},null==n?void 0:n.typography),{},{lineHeight:t})});e.setAttributes({style:bo(r)})}})}function Mc(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.name,n=!uo("typography.customLineHeight");return!Object(p.hasBlockSupport)(t,"lineHeight")||n}var Fc=[{name:Object(y.__)("Regular"),value:"normal"},{name:Object(y.__)("Italic"),value:"italic"}],Vc=[{name:Object(y.__)("Thin"),value:"100"},{name:Object(y.__)("Extra Light"),value:"200"},{name:Object(y.__)("Light"),value:"300"},{name:Object(y.__)("Regular"),value:"400"},{name:Object(y.__)("Medium"),value:"500"},{name:Object(y.__)("Semi Bold"),value:"600"},{name:Object(y.__)("Bold"),value:"700"},{name:Object(y.__)("Extra Bold"),value:"800"},{name:Object(y.__)("Black"),value:"900"}];function Hc(e){var t=e.onChange,n=e.hasFontStyles,r=void 0===n||n,o=e.hasFontWeights,c=void 0===o||o,i=e.value,a=i.fontStyle,s=i.fontWeight,u=r||c,d={key:"default",name:Object(y.__)("Default"),style:{fontStyle:void 0,fontWeight:void 0}},b=Object(l.useMemo)((function(){return r&&c?(e=[d],Fc.forEach((function(t){var n=t.name,r=t.value;Vc.forEach((function(t){var o=t.name,c=t.value,i="normal"===r?o:Object(y.sprintf)(
10
  /* translators: 1: Font weight name. 2: Font style name. */
11
- Object(y.__)("%1$s %2$s"),o,n);e.push({key:"".concat(r,"-").concat(c),name:i,style:{fontStyle:r,fontWeight:c}})}))})),e):r?function(){var e=[d];return Fc.forEach((function(t){var n=t.name,r=t.value;e.push({key:r,name:n,style:{fontStyle:r,fontWeight:void 0}})})),e}():function(){var e=[d];return Vc.forEach((function(t){var n=t.name,r=t.value;e.push({key:r,name:n,style:{fontStyle:void 0,fontWeight:r}})})),e}();var e}),[e.options]),f=b.find((function(e){return e.style.fontStyle===a&&e.style.fontWeight===s}));return Object(l.createElement)("fieldset",{className:"components-font-appearance-control"},u&&Object(l.createElement)(v.CustomSelectControl,{className:"components-font-appearance-control__select",label:r?c?Object(y.__)("Appearance"):Object(y.__)("Font style"):Object(y.__)("Font weight"),options:b,value:f,onChange:function(e){var n=e.selectedItem;return t(n.style)}}))}function zc(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Gc(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?zc(Object(n),!0).forEach((function(t){Object(a.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):zc(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Uc(e){var t,n,r=e.attributes.style,o=e.setAttributes,c=!Wc(e),i=!Kc(e);if(!c&&!i)return null;var a=null==r||null===(t=r.typography)||void 0===t?void 0:t.fontStyle,s=null==r||null===(n=r.typography)||void 0===n?void 0:n.fontWeight;return Object(l.createElement)(Hc,{onChange:function(e){o({style:bo(Gc(Gc({},r),{},{typography:Gc(Gc({},null==r?void 0:r.typography),{},{fontStyle:e.fontStyle,fontWeight:e.fontWeight})}))})},hasFontStyles:c,hasFontWeights:i,value:{fontStyle:a,fontWeight:s}})}function Wc(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.name,n=Object(p.hasBlockSupport)(t,"__experimentalFontStyle"),r=uo("typography.customFontStyle");return!n||!r}function Kc(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.name,n=Object(p.hasBlockSupport)(t,"__experimentalFontWeight"),r=uo("typography.customFontWeight");return!n||!r}function qc(e){var t=Wc(e),n=Kc(e);return t&&n}function $c(e){var t=e.value,n=void 0===t?"":t,r=e.onChange,o=e.fontFamilies,c=Object(j.a)(e,["value","onChange","fontFamilies"]),a=uo("typography.fontFamilies");if(o||(o=a),Object(d.isEmpty)(o))return null;var s=[{value:"",label:Object(y.__)("Default")}].concat(Object(k.a)(o.map((function(e){var t=e.fontFamily;return{value:t,label:e.name||t}}))));return Object(l.createElement)(v.SelectControl,Object(i.a)({label:Object(y.__)("Font family"),options:s,value:n,onChange:r,labelPosition:"top"},c))}function Yc(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Xc(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Yc(Object(n),!0).forEach((function(t){Object(a.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Yc(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Qc(e){var t,n=e.name,r=e.setAttributes,o=e.attributes.style,c=void 0===o?{}:o,i=uo("typography.fontFamilies");if(Zc({name:n}))return null;var a=function(e,t){var n=/var:preset\|font-family\|(.+)/.exec(t);if(n&&n[1]){var r=Object(d.find)(e,(function(e){return e.slug===n[1]}));if(r)return r.fontFamily}return t}(i,null===(t=c.typography)||void 0===t?void 0:t.fontFamily);return Object(l.createElement)($c,{className:"block-editor-hooks-font-family-control",fontFamilies:i,value:a,onChange:function(e){var t=Object(d.find)(i,(function(t){return t.fontFamily===e}));r({style:bo(Xc(Xc({},c),{},{typography:Xc(Xc({},c.typography||{}),{},{fontFamily:t?"var:preset|font-family|".concat(t.slug):e||void 0})}))})}})}function Zc(e){var t=e.name,n=uo("typography.fontFamilies");return!n||0===n.length||!Object(p.hasBlockSupport)(t,"__experimentalFontFamily")}var Jc=n(172),ei=n.n(Jc),ti=function(e,t,n){if(t){var r=Object(d.find)(e,{slug:t});if(r)return r}return{size:n}};function ni(e,t){return Object(d.find)(e,{size:t})||{size:t}}function ri(e){if(e)return"has-".concat(Object(d.kebabCase)(e),"-font-size")}var oi=function(e){var t=uo("typography.fontSizes"),n=!uo("typography.customFontSize");return Object(l.createElement)(v.FontSizePicker,Object(i.a)({},e,{fontSizes:t,disableCustomFontSizes:n}))};function ci(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function ii(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ci(Object(n),!0).forEach((function(t){Object(a.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ci(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function ai(e,t,n){if(!Object(p.hasBlockSupport)(t,"fontSize"))return e;var r=new ei.a(e.className);r.add(ri(n.fontSize));var o=r.value;return e.className=o||void 0,e}function li(e){var t,n,r=e.attributes,o=r.fontSize,c=r.style,i=e.setAttributes,a=si(e),s=uo("typography.fontSizes");if(a)return null;var u=ti(s,o,null==c||null===(t=c.typography)||void 0===t?void 0:t.fontSize),d=(null==u?void 0:u.size)||(null==c||null===(n=c.typography)||void 0===n?void 0:n.fontSize)||o;return Object(l.createElement)(oi,{onChange:function(e){var t=ni(s,e).slug;i({style:bo(ii(ii({},c),{},{typography:ii(ii({},null==c?void 0:c.typography),{},{fontSize:t?void 0:e})})),fontSize:t})},value:d})}function si(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.name,n=uo("typography.fontSizes"),r=!(null==n||!n.length);return!Object(p.hasBlockSupport)(t,"fontSize")||!r}var ui=Object(b.createHigherOrderComponent)((function(e){return function(t){var n,r=uo("typography.fontSizes"),o=t.name,c=t.attributes,i=c.fontSize,a=c.style,s=t.wrapperProps,u=ii({},t);if(Object(p.hasBlockSupport)(o,"fontSize")&&i&&(null==a||null===(n=a.typography)||void 0===n||!n.fontSize)){var d,b=ti(r,i,null==a||null===(d=a.typography)||void 0===d?void 0:d.fontSize).size;u.wrapperProps=ii(ii({},s),{},{style:ii({fontSize:b},null==s?void 0:s.style)})}return Object(l.createElement)(e,u)}}),"withFontSizeInlineStyles");Object(f.addFilter)("blocks.registerBlockType","core/font/addAttribute",(function(e){return Object(p.hasBlockSupport)(e,"fontSize")?(e.attributes.fontSize||Object.assign(e.attributes,{fontSize:{type:"string"}}),e):e})),Object(f.addFilter)("blocks.getSaveContent.extraProps","core/font/addSaveProps",ai),Object(f.addFilter)("blocks.registerBlockType","core/font/addEditProps",(function(e){if(!Object(p.hasBlockSupport)(e,"fontSize"))return e;var t=e.getEditWrapperProps;return e.getEditWrapperProps=function(n){var r={};return t&&(r=t(n)),ai(r,e,n)},e})),Object(f.addFilter)("editor.BlockListBlock","core/font-size/with-font-size-inline-styles",ui);var di=["lineHeight","fontSize","__experimentalFontStyle","__experimentalFontWeight","__experimentalFontFamily","__experimentalTextDecoration","__experimentalTextTransform"];function bi(e){var t=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=[qc(e),si(e),Mc(e),Zc(e),yc(e),Pc(e)];return t.filter(Boolean).length===t.length}(e),n=fi(e.name);return t||!n?null:Object(l.createElement)(Jr,null,Object(l.createElement)(v.PanelBody,{title:Object(y.__)("Typography")},Object(l.createElement)(v.__unstableComponentSystemProvider,{__unstableNextInclude:["WPComponentsFontSizePicker"]},Object(l.createElement)(Qc,e),Object(l.createElement)(li,e),Object(l.createElement)(Uc,e),Object(l.createElement)(Lc,e),Object(l.createElement)(Tc,e))))}var fi=function(e){return"web"===l.Platform.OS&&di.some((function(t){return Object(p.hasBlockSupport)(e,t)}))};function pi(e){var t=e.units,n=Object(j.a)(e,["units"]),r=mi(t);return Object(l.createElement)(v.__experimentalUnitControl,Object(i.a)({units:r},n))}function mi(e){var t=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return t.filter((function(t){return e.includes(t.value)}))}(uo("spacing.units")||[],e);return 0!==t.length&&t}function vi(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function gi(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?vi(Object(n),!0).forEach((function(t){Object(a.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):vi(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Oi(e){var t,n=e.name,r=e.attributes.style,o=e.setAttributes,c=mi();return function(e){var t=Object(p.getBlockSupport)(e,"spacing");return t&&!1!==t.padding}(n)?l.Platform.select({web:Object(l.createElement)(l.Fragment,null,Object(l.createElement)(v.__experimentalBoxControl,{values:null==r||null===(t=r.spacing)||void 0===t?void 0:t.padding,onChange:function(e){var t=gi(gi({},r),{},{spacing:{padding:e}});o({style:bo(t)})},onChangeShowVisualizer:function(e){var t=gi(gi({},r),{},{visualizers:{padding:e}});o({style:bo(t)})},label:Object(y.__)("Padding"),units:c})),native:null}):null}function hi(e){var t=e.children,n=Object(j.a)(e,["children"]);return uo("spacing.customPadding")?Object(l.createElement)(Jr,n,Object(l.createElement)(v.PanelBody,{title:Object(y.__)("Spacing")},t)):null}function ji(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function ki(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ji(Object(n),!0).forEach((function(t){Object(a.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ji(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var yi=[].concat(Object(k.a)(di),[Oo,"color","spacing"]),_i=function(e){return yi.some((function(t){return Object(p.hasBlockSupport)(e,t)}))};function Ei(e){if(Object(d.startsWith)(e,"var:")){var t=e.slice("var:".length).split("|").join("--");return"var(--wp--".concat(t,")")}return e}function wi(e,t,n){if(!_i(t))return e;var r=n.style;return e.style=ki(ki({},function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t={};return Object.keys(p.__EXPERIMENTAL_STYLE_PROPERTY).forEach((function(n){var r=p.__EXPERIMENTAL_STYLE_PROPERTY[n].value,o=p.__EXPERIMENTAL_STYLE_PROPERTY[n].properties;Object(d.has)(e,r)&&(o?o.forEach((function(o){t[n+Object(d.capitalize)(o)]=Ei(Object(d.get)(e,[].concat(Object(k.a)(r),[o])))})):t[n]=Ei(Object(d.get)(e,r)))})),t}(r)),e.style),e}var Ci=Object(b.createHigherOrderComponent)((function(e){return function(t){var n=t.name,r=Object(p.hasBlockSupport)(n,"spacing");return[Object(l.createElement)(bi,Object(i.a)({key:"typography"},t)),Object(l.createElement)(ho,Object(i.a)({key:"border"},t)),Object(l.createElement)(fc,Object(i.a)({key:"colors"},t)),Object(l.createElement)(e,Object(i.a)({key:"edit"},t)),r&&Object(l.createElement)(hi,{key:"spacing"},Object(l.createElement)(Oi,t))]}}),"withToolbarControls");Object(f.addFilter)("blocks.registerBlockType","core/style/addAttribute",(function(e){return _i(e)?(e.attributes.style||Object.assign(e.attributes,{style:{type:"object"}}),e):e})),Object(f.addFilter)("blocks.getSaveContent.extraProps","core/style/addSaveProps",wi),Object(f.addFilter)("blocks.registerBlockType","core/style/addEditProps",(function(e){if(!_i(e))return e;var t=e.getEditWrapperProps;return e.getEditWrapperProps=function(n){var r={};return t&&(r=t(n)),wi(r,e,n)},e})),Object(f.addFilter)("editor.BlockEdit","core/style/with-block-controls",Ci);var Si=n(27),Bi=n(28),Ii=n(19),xi=n(31),Pi=n(32),Ti=n(22);function Ni(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Di(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Ni(Object(n),!0).forEach((function(t){Object(a.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ni(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Ai=[],Ri=function(e){return Object(b.createHigherOrderComponent)((function(t){return function(n){return Object(l.createElement)(t,Object(i.a)({},n,{colors:e}))}}),"withCustomColorPalette")},Li=function(){return Object(b.createHigherOrderComponent)((function(e){return function(t){var n=uo("color.palette")||Ai;return Object(l.createElement)(e,Object(i.a)({},t,{colors:n}))}}),"withEditorColorPalette")};function Mi(e,t){var n=Object(d.reduce)(e,(function(e,t){return Di(Di({},e),Object(d.isString)(t)?Object(a.a)({},t,Object(d.kebabCase)(t)):t)}),{});return Object(b.compose)([t,function(e){return function(t){Object(xi.a)(i,t);var r,o,c=(r=i,o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=Object(Ti.a)(r);if(o){var n=Object(Ti.a)(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return Object(Pi.a)(this,e)});function i(e){var t;return Object(Si.a)(this,i),(t=c.call(this,e)).setters=t.createSetters(),t.colorUtils={getMostReadableColor:t.getMostReadableColor.bind(Object(Ii.a)(t))},t.state={},t}return Object(Bi.a)(i,[{key:"getMostReadableColor",value:function(e){return function(e,t){return yo.a.mostReadable(t,Object(d.map)(e,"color")).toHexString()}(this.props.colors,e)}},{key:"createSetters",value:function(){var e=this;return Object(d.reduce)(n,(function(t,n,r){var o=Object(d.upperFirst)(r),c="custom".concat(o);return t["set".concat(o)]=e.createSetColor(r,c),t}),{})}},{key:"createSetColor",value:function(e,t){var n=this;return function(r){var o,c=Eo(n.props.colors,r);n.props.setAttributes((o={},Object(a.a)(o,e,c&&c.slug?c.slug:void 0),Object(a.a)(o,t,c&&c.slug?void 0:r),o))}}},{key:"render",value:function(){return Object(l.createElement)(e,Di(Di(Di(Di({},this.props),{},{colors:void 0},this.state),this.setters),{},{colorUtils:this.colorUtils}))}}],[{key:"getDerivedStateFromProps",value:function(e,t){var r=e.attributes,o=e.colors;return Object(d.reduce)(n,(function(e,n,c){var i=_o(o,r[c],r["custom".concat(Object(d.upperFirst)(c))]),a=t[c];return(null==a?void 0:a.color)===i.color&&a?e[c]=a:e[c]=Di(Di({},i),{},{class:wo(n,i.slug)}),e}),{})}}]),i}(l.Component)}])}function Fi(e){return function(){for(var t=Ri(e),n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return Object(b.createHigherOrderComponent)(Mi(r,t),"withCustomColors")}}function Vi(){for(var e=Li(),t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return Object(b.createHigherOrderComponent)(Mi(n,e),"withColors")}var Hi=n(72),zi=n.n(Hi);function Gi(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Ui(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Gi(Object(n),!0).forEach((function(t){Object(a.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Gi(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Wi=function(e){var t=e.colorSettings,n=Object(j.a)(e,["colorSettings"]),r=t.map((function(e){var t=e.value,n=e.onChange;return Ui(Ui({},Object(j.a)(e,["value","onChange"])),{},{colorValue:t,onColorChange:n})}));return Object(l.createElement)(Xo,Object(i.a)({settings:r,gradients:[],disableCustomGradients:!0},n))},Ki=function(e,t,n){return"function"==typeof e?e(t):!0===e?n:e};function qi(e){var t=e.title,n=e.colorSettings,r=e.colorPanelProps,o=e.contrastCheckers,c=e.detectedBackgroundColor,a=e.detectedColor,s=e.panelChildren,u=e.initialOpen;return Object(l.createElement)(Wi,Object(i.a)({title:t,initialOpen:u,colorSettings:Object.values(n)},r),o&&(Array.isArray(o)?o.map((function(e){var t=e.backgroundColor,r=e.textColor,o=Object(j.a)(e,["backgroundColor","textColor"]);return t=Ki(t,n,c),r=Ki(r,n,a),Object(l.createElement)(Zo,Object(i.a)({key:"".concat(t,"-").concat(r),backgroundColor:t,textColor:r},o))})):Object(d.map)(n,(function(e){var t=e.value,r=o.backgroundColor,s=o.textColor;return r=Ki(r||t,n,c),s=Ki(s||t,n,a),Object(l.createElement)(Zo,Object(i.a)({},o,{key:"".concat(r,"-").concat(s),backgroundColor:r,textColor:s}))}))),"function"==typeof s?s(n):s)}function $i(e,t){var n;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return Yi(e,void 0);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Yi(e,void 0):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var c,i=!0,a=!1;return{s:function(){n=e[Symbol.iterator]()},n:function(){var e=n.next();return i=e.done,e},e:function(e){a=!0,c=e},f:function(){try{i||null==n.return||n.return()}finally{if(a)throw c}}}}function Yi(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Xi(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Qi(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Xi(Object(n),!0).forEach((function(t){Object(a.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Xi(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Zi(e){return e.ownerDocument.defaultView.getComputedStyle(e)}var Ji=[],ea={textColor:Object(y.__)("Text Color"),backgroundColor:Object(y.__)("Background Color")},ta=function(e){return Object(l.createElement)(Jr,null,Object(l.createElement)(qi,e))};function na(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{panelTitle:Object(y.__)("Color settings")},n=t.panelTitle,r=void 0===n?Object(y.__)("Color settings"):n,o=t.colorPanelProps,c=t.contrastCheckers,i=t.panelChildren,s=t.colorDetector,b=(s=void 0===s?{}:s).targetRef,f=s.backgroundColorTargetRef,p=void 0===f?b:f,v=s.textColorTargetRef,g=void 0===v?b:v,O=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],j=h(),_=j.clientId,E=uo("color.palette")||Ji,w=Object(m.useSelect)((function(e){return{attributes:(0,e(pr).getBlockAttributes)(_)}}),[_]),C=w.attributes,S=Object(m.useDispatch)(pr),B=S.updateBlockAttributes,I=Object(l.useCallback)((function(e){return B(_,e)}),[B,_]),x=Object(l.useMemo)((function(){return zi()((function(e,t,n,r,o,c){return function(i){var s,b=i.children,f=i.className,p=void 0===f?"":f,m=i.style,v=void 0===m?{}:m,g={};r?g=Object(a.a)({},t,o):c&&(g=Object(a.a)({},t,c));var O={className:u()(p,(s={},Object(a.a)(s,"has-".concat(Object(d.kebabCase)(r),"-").concat(Object(d.kebabCase)(t)),r),Object(a.a)(s,n||"has-".concat(Object(d.kebabCase)(e)),r||c),s)),style:Qi(Qi({},g),v)};return Object(d.isFunction)(b)?b(O):l.Children.map(b,(function(e){return Object(l.cloneElement)(e,{className:u()(e.props.className,O.className),style:Qi(Qi({},O.style),e.props.style||{})})}))}}),{maxSize:e.length})}),[e.length]),P=Object(l.useMemo)((function(){return zi()((function(e,t){return function(n){var r=t.find((function(e){return e.color===n}));I(Object(a.a)({},r?Object(d.camelCase)("custom ".concat(e)):e,void 0)),I(Object(a.a)({},r?e:Object(d.camelCase)("custom ".concat(e)),r?r.slug:n))}}),{maxSize:e.length})}),[I,e.length]),T=Object(l.useState)(),N=Object(To.a)(T,2),D=N[0],A=N[1],R=Object(l.useState)(),L=Object(To.a)(R,2),M=L[0],F=L[1];return Object(l.useEffect)((function(){if(c){var e,t=!1,n=!1,r=$i(Object(d.castArray)(c));try{for(r.s();!(e=r.n()).done;){var o=e.value,i=o.backgroundColor,a=o.textColor;if(t||(t=!0===i),n||(n=!0===a),t&&n)break}}catch(e){r.e(e)}finally{r.f()}if(n&&F(Zi(g.current).color),t){for(var l=p.current,s=Zi(l).backgroundColor;"rgba(0, 0, 0, 0)"===s&&l.parentNode&&l.parentNode.nodeType===l.parentNode.ELEMENT_NODE;)s=Zi(l=l.parentNode).backgroundColor;A(s)}}}),[e.reduce((function(e,t){return"".concat(e," | ").concat(C[t.name]," | ").concat(C[Object(d.camelCase)("custom ".concat(t.name))])}),"")].concat(Object(k.a)(O))),Object(l.useMemo)((function(){var t={},n=e.reduce((function(e,n){"string"==typeof n&&(n={name:n});var r=Qi(Qi({},n),{},{color:C[n.name]}),o=r.name,c=r.property,i=void 0===c?o:c,a=r.className,l=r.panelLabel,s=void 0===l?n.label||ea[o]||Object(d.startCase)(o):l,u=r.componentName,b=void 0===u?Object(d.startCase)(o).replace(/\s/g,""):u,f=r.color,p=void 0===f?n.color:f,m=r.colors,v=void 0===m?E:m,g=C[Object(d.camelCase)("custom ".concat(o))],O=g?void 0:v.find((function(e){return e.slug===p}));return e[b]=x(o,i,a,p,O&&O.color,g),e[b].displayName=b,e[b].color=g||O&&O.color,e[b].slug=p,e[b].setColor=P(o,v),t[b]={value:O?O.color:C[Object(d.camelCase)("custom ".concat(o))],onChange:e[b].setColor,label:s,colors:v},v||delete t[b].colors,e}),{}),a={title:r,initialOpen:!1,colorSettings:t,colorPanelProps:o,contrastCheckers:c,detectedBackgroundColor:D,detectedColor:M,panelChildren:i};return Qi(Qi({},n),{},{ColorPanel:Object(l.createElement)(qi,a),InspectorControlsColorPanel:Object(l.createElement)(ta,a)})}),[C,I,M,D].concat(Object(k.a)(O)))}function ra(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function oa(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ra(Object(n),!0).forEach((function(t){Object(a.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ra(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function ca(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Object(Ti.a)(e);if(t){var o=Object(Ti.a)(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Object(Pi.a)(this,n)}}var ia=[],aa=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var r=Object(d.reduce)(t,(function(e,t){return e[t]="custom".concat(Object(d.upperFirst)(t)),e}),{});return Object(b.createHigherOrderComponent)(Object(b.compose)([Object(b.createHigherOrderComponent)((function(e){return function(t){var n=uo("typography.fontSizes")||ia;return Object(l.createElement)(e,Object(i.a)({},t,{fontSizes:n}))}}),"withFontSizes"),function(e){return function(t){Object(xi.a)(o,t);var n=ca(o);function o(e){var t;return Object(Si.a)(this,o),(t=n.call(this,e)).setters=t.createSetters(),t.state={},t}return Object(Bi.a)(o,[{key:"createSetters",value:function(){var e=this;return Object(d.reduce)(r,(function(t,n,r){var o=Object(d.upperFirst)(r);return t["set".concat(o)]=e.createSetFontSize(r,n),t}),{})}},{key:"createSetFontSize",value:function(e,t){var n=this;return function(r){var o,c=Object(d.find)(n.props.fontSizes,{size:Number(r)});n.props.setAttributes((o={},Object(a.a)(o,e,c&&c.slug?c.slug:void 0),Object(a.a)(o,t,c&&c.slug?void 0:r),o))}}},{key:"render",value:function(){return Object(l.createElement)(e,oa(oa(oa({},this.props),{},{fontSizes:void 0},this.state),this.setters))}}],[{key:"getDerivedStateFromProps",value:function(e,t){var n=e.attributes,o=e.fontSizes,c=function(e,r){return!t[r]||(n[r]?n[r]!==t[r].slug:t[r].size!==n[e])};if(!Object(d.some)(r,c))return null;var i=Object(d.reduce)(Object(d.pickBy)(r,c),(function(e,t,r){var c=n[r],i=ti(o,c,n[t]);return e[r]=oa(oa({},i),{},{class:ri(c)}),e}),{});return oa(oa({},t),i)}}]),o}(l.Component)}]),"withFontSizes")},la=n(368),sa=n(369),ua=n(370);function da(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function ba(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?da(Object(n),!0).forEach((function(t){Object(a.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):da(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var fa=[{icon:la.a,title:Object(y.__)("Align text left"),align:"left"},{icon:sa.a,title:Object(y.__)("Align text center"),align:"center"},{icon:ua.a,title:Object(y.__)("Align text right"),align:"right"}],pa={position:"bottom right",isAlternate:!0},ma=function(e){var t=e.value,n=e.onChange,r=e.alignmentControls,o=void 0===r?fa:r,c=e.label,i=void 0===c?Object(y.__)("Align"):c,a=e.describedBy,s=void 0===a?Object(y.__)("Change text alignment"):a,u=e.isCollapsed,b=void 0===u||u;function f(e){return function(){return n(t===e?void 0:e)}}var p=Object(d.find)(o,(function(e){return e.align===t}));return Object(l.createElement)(v.ToolbarGroup,{isCollapsed:b,icon:p?p.icon:Object(y.isRTL)()?ua.a:la.a,label:i,toggleProps:{describedBy:s},popoverProps:pa,controls:o.map((function(e){var n=e.align,r=t===n;return ba(ba({},e),{},{isActive:r,role:b?"menuitemradio":void 0,onClick:f(n)})}))})},va=function(e){return e.name||""},ga=function(e){return e.title},Oa=function(e){return e.description||""},ha=function(e){return e.keywords||[]},ja=function(e){return e.category},ka=function(){return null};function ya(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return(e=(e=Object(d.deburr)(e)).replace(/^\//,"")).toLowerCase()}var _a=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return Object(d.words)(ya(e))},Ea=function(e,t){return Object(d.differenceWith)(e,_a(t),(function(e,t){return t.includes(e)}))},wa=function(e,t,n,r){return 0===_a(r).length?e:Ca(e,r,{getCategory:function(e){var n;return null===(n=Object(d.find)(t,{slug:e.category}))||void 0===n?void 0:n.title},getCollection:function(e){var t;return null===(t=n[e.name.split("/")[0]])||void 0===t?void 0:t.title}})},Ca=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=_a(t);if(0===r.length)return e;var o=e.map((function(e){return[e,Sa(e,t,n)]})).filter((function(e){return Object(To.a)(e,2)[1]>0}));return o.sort((function(e,t){var n=Object(To.a)(e,2)[1];return Object(To.a)(t,2)[1]-n})),o.map((function(e){return Object(To.a)(e,1)[0]}))};function Sa(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=n.getName,o=void 0===r?va:r,c=n.getTitle,i=void 0===c?ga:c,a=n.getDescription,l=void 0===a?Oa:a,s=n.getKeywords,u=void 0===s?ha:s,b=n.getCategory,f=void 0===b?ja:b,p=n.getCollection,m=void 0===p?ka:p,v=o(e),g=i(e),O=l(e),h=u(e),j=f(e),y=m(e),_=ya(t),E=ya(g),w=0;if(_===E)w+=30;else if(E.startsWith(_))w+=20;else{var C=[v,g,O].concat(Object(k.a)(h),[j,y]).join(" "),S=Object(d.words)(_),B=Ea(S,C);0===B.length&&(w+=10)}return 0!==w&&v.startsWith("core/")&&w++,w}var Ba=function(e,t){var n=Object(m.useSelect)((function(t){var n=t(pr).getInserterItems,r=t(p.store),o=r.getCategories,c=r.getCollections;return{categories:o(),collections:c(),items:n(e)}}),[e]),r=n.categories,o=n.collections;return[n.items,r,o,Object(l.useCallback)((function(e){var n=e.name,r=e.initialAttributes,o=e.innerBlocks,c=Object(p.createBlock)(n,r,Object(p.createBlocksFromInnerBlocksTemplate)(o));t(c)}),[t])]},Ia=n(179);function xa(e){var t,n=e.icon,r=e.showColors,o=void 0!==r&&r,c=e.className;"block-default"===(null===(t=n)||void 0===t?void 0:t.src)&&(n={src:Ia.a});var i=Object(l.createElement)(v.Icon,{icon:n&&n.src?n.src:n}),a=o?{backgroundColor:n&&n.background,color:n&&n.foreground}:{};return Object(l.createElement)("span",{style:a,className:u()("block-editor-block-icon",c,{"has-colors":o})},i)}var Pa={name:"blocks",className:"block-editor-autocompleters__block",triggerPrefix:"/",useItems:function(e){var t=Object(m.useSelect)((function(e){var t=e(pr),n=t.getSelectedBlockClientId,r=t.getBlockName,o=t.getBlockInsertionPoint,c=n();return{selectedBlockName:c?r(c):null,rootClientId:o().rootClientId}}),[]),n=t.rootClientId,r=t.selectedBlockName,o=Ba(n,d.noop),c=Object(To.a)(o,3),i=c[0],a=c[1],s=c[2],u=Object(l.useMemo)((function(){return(e.trim()?wa(i,a,s,e):Object(d.orderBy)(i,["frecency"],["desc"])).filter((function(e){return e.name!==r})).slice(0,9)}),[e,r,i,a,s]);return[Object(l.useMemo)((function(){return u.map((function(e){var t=e.title,n=e.icon,r=e.isDisabled;return{key:"block-".concat(e.id),value:e,label:Object(l.createElement)(l.Fragment,null,Object(l.createElement)(xa,{key:"icon",icon:n,showColors:!0}),t),isDisabled:r}}))}),[u])]},allowContext:function(e,t){return!(/\S/.test(e)||/\S/.test(t))},getOptionCompletion:function(e){var t=e.name,n=e.initialAttributes,r=e.innerBlocks;return{action:"replace",value:Object(p.createBlock)(t,n,Object(p.createBlocksFromInnerBlocksTemplate)(r))}}},Ta=[],Na=function(e){var t=h().name,n=e.completers,r=void 0===n?Ta:n;return r=Object(l.useMemo)((function(){var e=r;return t===Object(p.getDefaultBlockName)()&&(e=e.concat([Pa])),Object(f.hasFilter)("editor.Autocomplete.completers")&&(e===r&&(e=e.map(d.clone)),e=Object(f.applyFilters)("editor.Autocomplete.completers",e,t)),e}),[r,t]),Object(l.createElement)(v.Autocomplete,Object(i.a)({},e,{completers:r}))},Da=Object(l.createElement)(kr.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(l.createElement)(kr.Path,{d:"M4.2 9h1.5V5.8H9V4.2H4.2V9zm14 9.2H15v1.5h4.8V15h-1.5v3.2zM15 4.2v1.5h3.2V9h1.5V4.2H15zM5.8 15H4.2v4.8H9v-1.5H5.8V15z"})),Aa=function(e){var t=e.isActive,n=e.label,r=void 0===n?Object(y.__)("Toggle full height"):n,o=e.onToggle,c=e.isDisabled;return Object(l.createElement)(v.ToolbarGroup,null,Object(l.createElement)(v.ToolbarButton,{isActive:t,icon:Da,label:r,onClick:function(){return o(!t)},disabled:c}))},Ra=function(e){var t=e.label,n=void 0===t?Object(y.__)("Change matrix alignment"):t,r=e.onChange,o=void 0===r?d.noop:r,c=e.value,i=void 0===c?"center":c,a=e.isDisabled,s=Object(l.createElement)(v.__experimentalAlignmentMatrixControl.Icon,{value:i}),u="block-editor-block-alignment-matrix-toolbar",b="".concat(u,"__popover");return Object(l.createElement)(v.Dropdown,{position:"bottom right",className:u,popoverProps:{className:b,isAlternate:!0},renderToggle:function(e){var t=e.onToggle,r=e.isOpen;return Object(l.createElement)(v.ToolbarGroup,null,Object(l.createElement)(v.ToolbarButton,{onClick:t,"aria-haspopup":"true","aria-expanded":r,onKeyDown:function(e){r||e.keyCode!==Nc.DOWN||(e.preventDefault(),e.stopPropagation(),t())},label:n,icon:s,showTooltip:!0,disabled:a}))},renderContent:function(){return Object(l.createElement)(v.__experimentalAlignmentMatrixControl,{hasFocusBorder:!1,onChange:o,value:i})}})};function La(e){return Object(m.useSelect)((function(t){if(!e)return null;var n=t(pr),r=n.getBlockName,o=n.getBlockAttributes,c=t(p.store),i=c.getBlockType,a=c.getBlockVariations,l=r(e),s=i(l);if(!s)return null;var u=a(l),d={title:s.title,icon:s.icon,description:s.description};if(null==u||!u.length)return d;var b=o(e),f=u.find((function(e){var t;return null===(t=e.isActive)||void 0===t?void 0:t.call(e,b,e.attributes)}));return f?{title:f.title||s.title,icon:f.icon||s.icon,description:f.description||s.description}:d}),[e])}function Ma(e){var t=e.clientId,n=Object(m.useSelect)((function(e){if(!t)return{};var n=e(pr),r=n.getBlockName,o=n.getBlockAttributes,c=n.__experimentalGetReusableBlockTitle,i=r(t);if(!i)return{};var a=Object(p.isReusableBlock)(Object(p.getBlockType)(i));return{attributes:o(t),name:i,reusableBlockTitle:a&&c(o(t).ref)}}),[t]),r=n.attributes,o=n.name,c=n.reusableBlockTitle,i=La(t);if(!o||!i)return null;var a=Object(p.getBlockType)(o),l=c||Object(p.__experimentalGetBlockLabel)(a,r);return l!==a.title?Object(d.truncate)(l,{length:35}):i.title}var Fa=function(){var e=Object(m.useDispatch)(pr),t=e.selectBlock,n=e.clearSelectedBlock,r=Object(m.useSelect)((function(e){var t=e(pr),n=t.getSelectionStart,r=t.getSelectedBlockClientId,o=t.getBlockParents,c=r();return{parents:o(c),clientId:c,hasSelection:!!n().clientId}}),[]),o=r.clientId,c=r.parents,i=r.hasSelection;return Object(l.createElement)("ul",{className:"block-editor-block-breadcrumb",role:"list","aria-label":Object(y.__)("Block breadcrumb")},Object(l.createElement)("li",{className:i?void 0:"block-editor-block-breadcrumb__current","aria-current":i?void 0:"true"},i&&Object(l.createElement)(v.Button,{className:"block-editor-block-breadcrumb__button",isTertiary:!0,onClick:n},Object(y.__)("Document")),!i&&Object(y.__)("Document")),c.map((function(e){return Object(l.createElement)("li",{key:e},Object(l.createElement)(v.Button,{className:"block-editor-block-breadcrumb__button",isTertiary:!0,onClick:function(){return t(e)}},Object(l.createElement)(Ma,{clientId:e})))})),!!o&&Object(l.createElement)("li",{className:"block-editor-block-breadcrumb__current","aria-current":"true"},Object(l.createElement)(Ma,{clientId:o})))};function Va(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Ha(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Va(Object(n),!0).forEach((function(t){Object(a.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Va(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var za=Object(l.createContext)({});function Ga(e){var t=e.value,n=e.children,r=Object(l.useContext)(za),o=Object(l.useMemo)((function(){return Ha(Ha({},r),t)}),[r,t]);return Object(l.createElement)(za.Provider,{value:o,children:n})}var Ua=za,Wa=function(){return Object(l.createElement)(v.SVG,{xmlns:"https://www.w3.org/2000/svg",viewBox:"0 0 20 20"},Object(l.createElement)(v.Path,{d:"M7.434 5l3.18 9.16H8.538l-.692-2.184H4.628l-.705 2.184H2L5.18 5h2.254zm-1.13 1.904h-.115l-1.148 3.593H7.44L6.304 6.904zM14.348 7.006c1.853 0 2.9.876 2.9 2.374v4.78h-1.79v-.914h-.114c-.362.64-1.123 1.022-2.031 1.022-1.346 0-2.292-.826-2.292-2.108 0-1.27.972-2.006 2.71-2.107l1.696-.102V9.38c0-.584-.42-.914-1.18-.914-.667 0-1.112.228-1.264.647h-1.701c.12-1.295 1.307-2.107 3.066-2.107zm1.079 4.1l-1.416.09c-.793.056-1.18.342-1.18.844 0 .52.45.837 1.091.837.857 0 1.505-.545 1.505-1.256v-.515z"}))},Ka=function(e){var t=e.style,n=e.className;return Object(l.createElement)("div",{className:"block-library-colors-selector__icon-container"},Object(l.createElement)("div",{className:"".concat(n," block-library-colors-selector__state-selection"),style:t},Object(l.createElement)(Wa,null)))},qa=function(e){var t,n,r,o=e.children,c=Object(j.a)(e,["children"]);return Object(l.createElement)(v.Dropdown,{position:"bottom right",className:"block-library-colors-selector",contentClassName:"block-library-colors-selector__popover",renderToggle:(t=c,n=t.TextColor,r=t.BackgroundColor,function(e){var t=e.onToggle,o=e.isOpen;return Object(l.createElement)(v.ToolbarGroup,null,Object(l.createElement)(v.ToolbarButton,{className:"components-toolbar__control block-library-colors-selector__toggle",label:Object(y.__)("Open Colors Selector"),onClick:t,onKeyDown:function(e){o||e.keyCode!==Nc.DOWN||(e.preventDefault(),e.stopPropagation(),t())},icon:Object(l.createElement)(r,null,Object(l.createElement)(n,null,Object(l.createElement)(Ka,null)))}))}),renderContent:function(){return o}})},$a={},Ya=Object(v.withFilters)("editor.BlockEdit")((function(e){var t=e.attributes,n=void 0===t?{}:t,r=e.name,o=Object(p.getBlockType)(r),c=Object(l.useContext)(Ua),a=Object(l.useMemo)((function(){return o&&o.usesContext?Object(d.pick)(c,o.usesContext):$a}),[o,c]);if(!o)return null;var s=o.edit||o.save;if(o.apiVersion>1||Object(p.hasBlockSupport)(o,"lightBlockWrapper",!1))return Object(l.createElement)(s,Object(i.a)({},e,{context:a}));var b=Object(p.hasBlockSupport)(o,"className",!0)?Object(p.getBlockDefaultClassName)(r):null,f=u()(b,n.className);return Object(l.createElement)(s,Object(i.a)({},e,{context:a,className:f}))}));function Xa(e){var t={name:e.name,isSelected:e.isSelected,clientId:e.clientId,onFocus:e.onFocus,onCaretVerticalPositionChange:e.onCaretVerticalPositionChange};return Object(l.createElement)(O,{value:Object(l.useMemo)((function(){return t}),Object.values(t))},Object(l.createElement)(Ya,e))}var Qa=Object(v.createSlotFill)("BlockFormatControls"),Za=Qa.Fill,Ja=Qa.Slot,el=function(e){return h().isSelected?Object(l.createElement)(Za,null,(function(t){var n=Object(d.isEmpty)(t)?null:t;return Object(l.createElement)(v.__experimentalToolbarContext.Provider,{value:n},e.children)})):null};el.Slot=function(e){var t=Object(l.useContext)(v.__experimentalToolbarContext);return Object(l.createElement)(Ja,Object(i.a)({},e,{fillProps:t}))};var tl=el,nl=n(45),rl=n(46),ol=n(254),cl=n(125),il=n(33),al=function(e){return e+1},ll=function(e){return{top:e.offsetTop,left:e.offsetLeft}},sl=function(e,t,n,r,o){var c=Object(b.useReducedMotion)()||!r,i=Object(l.useReducer)(al,0),a=Object(To.a)(i,2),s=a[0],u=a[1],d=Object(l.useReducer)(al,0),f=Object(To.a)(d,2),p=f[0],m=f[1],v=Object(l.useState)({x:0,y:0}),g=Object(To.a)(v,2),O=g[0],h=g[1],j=Object(l.useMemo)((function(){return e.current?ll(e.current):null}),[o]),k=Object(l.useMemo)((function(){if(!n||!e.current)return function(){};var t=Object(il.getScrollContainer)(e.current);if(!t)return function(){};var r=e.current.getBoundingClientRect();return function(){var n=e.current.getBoundingClientRect().top-r.top;n&&(t.scrollTop+=n)}}),[o,n]);function y(n){var r=n.x,o=n.y;r=Math.round(r),o=Math.round(o),r===y.x&&o===y.y||(function(n){var r=n.x,o=n.y;if(e.current){var c=0===r&&0===o;e.current.style.transformOrigin=c?"":"center",e.current.style.transform=c?"":"translate3d(".concat(r,"px,").concat(o,"px,0)"),e.current.style.zIndex=!t||c?"":"1",k()}}({x:r,y:o}),y.x=r,y.y=o)}Object(l.useLayoutEffect)((function(){s&&m()}),[s]),Object(l.useLayoutEffect)((function(){if(j)if(c)k();else{e.current.style.transform="";var t=ll(e.current);u(),h({x:Math.round(j.left-t.left),y:Math.round(j.top-t.top)})}}),[o]),y.x=0,y.y=0,Object(cl.useSpring)({from:{x:O.x,y:O.y},to:{x:0,y:0},reset:s!==p,config:{mass:5,tension:2e3,friction:200},immediate:c,onFrame:y})},ul=Object(cl.animated)(v.__experimentalTreeGridRow);function dl(e){var t=e.isSelected,n=e.position,r=e.level,o=e.rowCount,c=e.children,a=e.className,s=e.path,d=Object(j.a)(e,["isSelected","position","level","rowCount","children","className","path"]),b=Object(l.useRef)(null),f=s.join("_"),p=sl(b,t,!1,!0,f);return Object(l.createElement)(ul,Object(i.a)({ref:b,style:p,className:u()("block-editor-block-navigation-leaf",a),level:r,positionInSet:n,setSize:o},d),c)}var bl=n(251),fl=n(252),pl=n(253),ml=n(209);var vl=function(e,t){return"up"===e?"horizontal"===t?Object(y.isRTL)()?bl.a:fl.a:pl.a:"down"===e?"horizontal"===t?Object(y.isRTL)()?fl.a:bl.a:ml.a:null},gl=function(e,t){return"up"===e?"horizontal"===t?Object(y.isRTL)()?Object(y.__)("Move right"):Object(y.__)("Move left"):Object(y.__)("Move up"):"down"===e?"horizontal"===t?Object(y.isRTL)()?Object(y.__)("Move left"):Object(y.__)("Move right"):Object(y.__)("Move down"):null},Ol=Object(l.forwardRef)((function(e,t){var n=e.clientIds,r=e.direction,o=e.orientation,c=Object(j.a)(e,["clientIds","direction","orientation"]),a=Object(b.useInstanceId)(Ol),s=Object(d.castArray)(n).length,f=Object(m.useSelect)((function(e){var t=e(pr),c=t.getBlockIndex,i=t.getBlockRootClientId,a=t.getBlockOrder,l=t.getBlock,s=t.getBlockListSettings,u=Object(d.castArray)(n),b=Object(d.first)(u),f=i(b),m=c(b,f),v=c(Object(d.last)(u),f),g=a(f),O=l(b),h=0===m,j=v===g.length-1,k=(s(f)||{}).orientation;return{blockType:O?Object(p.getBlockType)(O.name):null,isDisabled:"up"===r?h:j,rootClientId:f,firstIndex:m,isFirst:h,isLast:j,orientation:o||k}}),[n,r]),g=f.blockType,O=f.isDisabled,h=f.rootClientId,k=f.isFirst,_=f.isLast,E=f.firstIndex,w=f.orientation,C=void 0===w?"vertical":w,S=Object(m.useDispatch)(pr),B=S.moveBlocksDown,I=S.moveBlocksUp,x="up"===r?I:B,P="block-editor-block-mover-button__description-".concat(a);return Object(l.createElement)(l.Fragment,null,Object(l.createElement)(v.Button,Object(i.a)({ref:t,className:u()("block-editor-block-mover-button","is-".concat(r,"-button")),icon:vl(r,C),label:gl(r,C),"aria-describedby":P},c,{onClick:O?null:function(e){x(n,h),c.onClick&&c.onClick(e)},"aria-disabled":O})),Object(l.createElement)("span",{id:P,className:"block-editor-block-mover-button__description"},function(e,t,n,r,o,c,i){var a=n+1,l=function(e){return"up"===e?"horizontal"===i?Object(y.isRTL)()?"right":"left":"up":"down"===e?"horizontal"===i?Object(y.isRTL)()?"left":"right":"down":null};if(e>1)return function(e,t,n,r,o){var c=t+1;return o<0&&n?Object(y.__)("Blocks cannot be moved up as they are already at the top"):o>0&&r?Object(y.__)("Blocks cannot be moved down as they are already at the bottom"):o<0&&!n?Object(y.sprintf)(// translators: 1: Number of selected blocks, 2: Position of selected blocks
12
  Object(y._n)("Move %1$d block from position %2$d up by one place","Move %1$d blocks from position %2$d up by one place",e),e,c):o>0&&!r?Object(y.sprintf)(// translators: 1: Number of selected blocks, 2: Position of selected blocks
13
  Object(y._n)("Move %1$d block from position %2$d down by one place","Move %1$d blocks from position %2$d down by one place",e),e,c):void 0}(e,n,r,o,c);if(r&&o)return Object(y.sprintf)(// translators: %s: Type of block (i.e. Text, Image etc)
14
  Object(y.__)("Block %s is the only block, and cannot be moved"),t);if(c>0&&!o){var s=l("down");if("down"===s)return Object(y.sprintf)(// translators: 1: Type of block (i.e. Text, Image etc), 2: Position of selected block, 3: New position
@@ -23,59 +23,58 @@ Object(y.__)("Move %1$s block from position %2$d left to position %3$d"),t,a,a-1
23
  Object(y.__)("Move %1$s block from position %2$d right to position %3$d"),t,a,a-1)}if(c<0&&r){var b=l("up");if("up"===b)return Object(y.sprintf)(// translators: 1: Type of block (i.e. Text, Image etc)
24
  Object(y.__)("Block %1$s is at the beginning of the content and can’t be moved up"),t);if("left"===b)return Object(y.sprintf)(// translators: 1: Type of block (i.e. Text, Image etc)
25
  Object(y.__)("Block %1$s is at the beginning of the content and can’t be moved left"),t);if("right"===b)return Object(y.sprintf)(// translators: 1: Type of block (i.e. Text, Image etc)
26
- Object(y.__)("Block %1$s is at the beginning of the content and can’t be moved right"),t)}}(s,g&&g.title,E,k,_,"up"===r?-1:1,C)))})),hl=Object(l.forwardRef)((function(e,t){return Object(l.createElement)(Ol,Object(i.a)({direction:"up",ref:t},e))})),jl=Object(l.forwardRef)((function(e,t){return Object(l.createElement)(Ol,Object(i.a)({direction:"down",ref:t},e))})),kl=Object(l.createContext)({__experimentalFeatures:!1}),yl=function(){return Object(l.useContext)(kl)},_l=Object(l.createElement)(kr.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(l.createElement)(kr.Path,{d:"M11 13h2v-2h-2v2zm-6 0h2v-2H5v2zm12-2v2h2v-2h-2z"})),El=function(e){var t=e.className,n=e.actions,r=e.children,o=e.secondaryActions;return Object(l.createElement)("div",{className:u()(t,"block-editor-warning")},Object(l.createElement)("div",{className:"block-editor-warning__contents"},Object(l.createElement)("p",{className:"block-editor-warning__message"},r),(l.Children.count(n)>0||o)&&Object(l.createElement)("div",{className:"block-editor-warning__actions"},l.Children.count(n)>0&&l.Children.map(n,(function(e,t){return Object(l.createElement)("span",{key:t,className:"block-editor-warning__action"},e)})),o&&Object(l.createElement)(v.DropdownMenu,{className:"block-editor-warning__secondary",icon:_l,label:Object(y.__)("More options"),popoverProps:{position:"bottom left",className:"block-editor-warning__dropdown"},noIcons:!0},(function(){return Object(l.createElement)(v.MenuGroup,null,o.map((function(e,t){return Object(l.createElement)(v.MenuItem,{onClick:e.onClick,key:t},e.title)})))})))))},wl=n(327),Cl=function(e){var t=e.title,n=e.rawContent,r=e.renderedContent,o=e.action,c=e.actionText,i=e.className;return Object(l.createElement)("div",{className:i},Object(l.createElement)("div",{className:"block-editor-block-compare__content"},Object(l.createElement)("h2",{className:"block-editor-block-compare__heading"},t),Object(l.createElement)("div",{className:"block-editor-block-compare__html"},n),Object(l.createElement)("div",{className:"block-editor-block-compare__preview edit-post-visual-editor"},r)),Object(l.createElement)("div",{className:"block-editor-block-compare__action"},Object(l.createElement)(v.Button,{isSecondary:!0,tabIndex:"0",onClick:o},c)))},Sl=function(e){var t,n,r,o,c=e.block,i=e.onKeep,a=e.onConvert,s=e.convertor,b=e.convertButtonText,f={rawContent:c.originalContent,renderedContent:Object(p.getSaveElement)(c.name,c.attributes)},m=(t=s(c),r=(n=Object(d.castArray)(t)).map((function(e){return Object(p.getSaveContent)(e.name,e.attributes,e.innerBlocks)})),o=n.map((function(e){return Object(p.getSaveElement)(e.name,e.attributes,e.innerBlocks)})),{rawContent:r.join(""),renderedContent:o}),v=function(e,t){return Object(wl.diffChars)(e,t).map((function(e,t){var n=u()({"block-editor-block-compare__added":e.added,"block-editor-block-compare__removed":e.removed});return Object(l.createElement)("span",{key:t,className:n},e.value)}))}(f.rawContent,m.rawContent);return Object(l.createElement)("div",{className:"block-editor-block-compare__wrapper"},Object(l.createElement)(Cl,{title:Object(y.__)("Current"),className:"block-editor-block-compare__current",action:i,actionText:Object(y.__)("Convert to HTML"),rawContent:f.rawContent,renderedContent:f.renderedContent}),Object(l.createElement)(Cl,{title:Object(y.__)("After Conversion"),className:"block-editor-block-compare__converted",action:a,actionText:b,rawContent:v,renderedContent:m.renderedContent}))},Bl=function(e){return Object(p.rawHandler)({HTML:e.originalContent})},Il=Object(b.compose)([Object(m.withSelect)((function(e,t){var n=t.clientId;return{block:e(pr).getBlock(n)}})),Object(m.withDispatch)((function(e,t){var n=t.block,r=e(pr).replaceBlock;return{convertToClassic:function(){r(n.clientId,function(e){return Object(p.createBlock)("core/freeform",{content:e.originalContent})}(n))},convertToHTML:function(){r(n.clientId,function(e){return Object(p.createBlock)("core/html",{content:e.originalContent})}(n))},convertToBlocks:function(){r(n.clientId,Bl(n))},attemptBlockRecovery:function(){var e,t,o,c;r(n.clientId,(t=(e=n).name,o=e.attributes,c=e.innerBlocks,Object(p.createBlock)(t,o,c)))}}}))])((function(e){var t=e.convertToHTML,n=e.convertToBlocks,r=e.convertToClassic,o=e.attemptBlockRecovery,c=e.block,i=!!Object(p.getBlockType)("core/html"),a=Object(l.useState)(!1),s=Object(To.a)(a,2),u=s[0],d=s[1],b=Object(l.useCallback)((function(){return d(!0)}),[]),f=Object(l.useCallback)((function(){return d(!1)}),[]),m=Object(l.useMemo)((function(){return[{
27
  // translators: Button to fix block content
28
- title:Object(y._x)("Resolve","imperative verb"),onClick:b},i&&{title:Object(y.__)("Convert to HTML"),onClick:t},{title:Object(y.__)("Convert to Classic Block"),onClick:r}].filter(Boolean)}),[b,t,r]);return Object(l.createElement)(l.Fragment,null,Object(l.createElement)(El,{actions:[Object(l.createElement)(v.Button,{key:"recover",onClick:o,isPrimary:!0},Object(y.__)("Attempt Block Recovery"))],secondaryActions:m},Object(y.__)("This block contains unexpected or invalid content.")),u&&Object(l.createElement)(v.Modal,{title:// translators: Dialog title to fix block content
29
- Object(y.__)("Resolve Block"),onRequestClose:f,className:"block-editor-block-compare"},Object(l.createElement)(Sl,{block:c,onKeep:t,onConvert:n,convertor:Bl,convertButtonText:Object(y.__)("Convert to Blocks")})))})),xl=Object(l.createElement)(El,{className:"block-editor-block-list__block-crash-warning"},Object(y.__)("This block has encountered an error and cannot be previewed.")),Pl=function(){return xl};var Tl=function(e){Object(xi.a)(o,e);var t,n,r=(t=o,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=Object(Ti.a)(t);if(n){var o=Object(Ti.a)(this).constructor;e=Reflect.construct(r,arguments,o)}else e=r.apply(this,arguments);return Object(Pi.a)(this,e)});function o(){var e;return Object(Si.a)(this,o),(e=r.apply(this,arguments)).state={hasError:!1},e}return Object(Bi.a)(o,[{key:"componentDidCatch",value:function(e){this.props.onError(e),this.setState({hasError:!0})}},{key:"render",value:function(){return this.state.hasError?null:this.props.children}}]),o}(l.Component),Nl=n(106),Dl=n.n(Nl),Al=function(e){var t=e.clientId,n=Object(l.useState)(""),r=Object(To.a)(n,2),o=r[0],c=r[1],i=Object(m.useSelect)((function(e){return e(pr).getBlock(t)}),[t]),a=Object(m.useDispatch)(pr).updateBlock;return Object(l.useEffect)((function(){c(Object(p.getBlockContent)(i))}),[i]),Object(l.createElement)(Dl.a,{className:"block-editor-block-list__block-html-textarea",value:o,onBlur:function(){var e=Object(p.getBlockType)(i.name),n=Object(p.getBlockAttributes)(e,o,i.attributes),r=o||Object(p.getSaveContent)(e,n),l=!o||Object(p.isValidBlockContent)(e,n,r);a(t,{attributes:n,originalContent:r,isValid:l}),o||c({content:r})},onChange:function(e){return c(e.target.value)}})},Rl=n(68),Ll=n(181),Ml=[Object(l.createInterpolateElement)(Object(y.__)("While writing, you can press <kbd>/</kbd> to quickly insert new blocks."),{kbd:Object(l.createElement)("kbd",null)}),Object(l.createInterpolateElement)(Object(y.__)("Indent a list by pressing <kbd>space</kbd> at the beginning of a line."),{kbd:Object(l.createElement)("kbd",null)}),Object(l.createInterpolateElement)(Object(y.__)("Outdent a list by pressing <kbd>backspace</kbd> at the beginning of a line."),{kbd:Object(l.createElement)("kbd",null)}),Object(y.__)("Drag files into the editor to automatically insert media blocks."),Object(y.__)("Change a block's type by pressing the block icon on the toolbar.")],Fl=function(){var e=Object(l.useState)(Math.floor(Math.random()*Ml.length)),t=Object(To.a)(e,1)[0];return Object(l.createElement)(v.Tip,null,Ml[t])},Vl=n(146),Hl=n(145),zl=n(250),Gl=function e(t){var n=t.className,r=t.onChange,o=t.value,c=t.placeholder,i=Object(b.useInstanceId)(e),a=Object(l.useRef)();return Object(l.createElement)("div",{className:u()("block-editor-inserter__search",n)},Object(l.createElement)(v.VisuallyHidden,{as:"label",htmlFor:"block-editor-inserter__search-".concat(i)},c),Object(l.createElement)("input",{ref:a,className:"block-editor-inserter__search-input",id:"block-editor-inserter__search-".concat(i),type:"search",placeholder:c,onChange:function(e){return r(e.target.value)},autoComplete:"off",value:o||""}),Object(l.createElement)("div",{className:"block-editor-inserter__search-icon"},!!o&&Object(l.createElement)(v.Button,{icon:Vl.a,label:Object(y.__)("Reset search"),onClick:function(){r(""),a.current.focus()}}),!o&&Object(l.createElement)(Hl.a,{icon:zl.a})))},Ul=n(37),Wl=n.n(Ul),Kl=function(e){var t=e.title,n=e.icon,r=e.description,o=e.blockType;return o&&(Wl()("`blockType` property in `BlockCard component`",{alternative:"`title, icon and description` properties"}),t=o.title,n=o.icon,r=o.description),Object(l.createElement)("div",{className:"block-editor-block-card"},Object(l.createElement)(xa,{icon:n,showColors:!0}),Object(l.createElement)("div",{className:"block-editor-block-card__content"},Object(l.createElement)("h2",{className:"block-editor-block-card__title"},t),Object(l.createElement)("span",{className:"block-editor-block-card__description"},r)))};function ql(e){var t=e.clientId,n=void 0===t?null:t,r=e.value,o=e.selectionStart,c=e.selectionEnd,i=e.onChange,a=void 0===i?d.noop:i,s=e.onInput,u=void 0===s?d.noop:s,b=Object(m.useRegistry)(),f=b.dispatch(pr),v=f.resetBlocks,g=f.resetSelection,O=f.replaceInnerBlocks,h=f.setHasControlledInnerBlocks,j=f.__unstableMarkNextChangeAsNotPersistent,k=b.select(pr),y=k.getBlockName,_=k.getBlocks,E=Object(l.useRef)({incoming:null,outgoing:[]}),w=Object(l.useRef)(!1),C=Object(l.useRef)(u),S=Object(l.useRef)(a);Object(l.useEffect)((function(){C.current=u,S.current=a}),[u,a]),Object(l.useEffect)((function(){E.current.outgoing.includes(r)?Object(d.last)(E.current.outgoing)===r&&(E.current.outgoing=[]):_(n)!==r&&(E.current.outgoing=[],function(){if(r)if(j(),n){h(n,!0),j();var e=r.map((function(e){return Object(p.cloneBlock)(e)}));w.current&&(E.current.incoming=e),O(n,e)}else w.current&&(E.current.incoming=r),v(r)}(),o&&c&&g(o,c))}),[r,n]),Object(l.useEffect)((function(){var e=b.select(pr),t=e.getSelectionStart,r=e.getSelectionEnd,o=e.isLastBlockChangePersistent,c=e.__unstableIsLastBlockChangeIgnored,i=_(n),a=o(),l=!1;w.current=!0;var s=b.subscribe((function(){if(null===n||null!==y(n)){var e=o(),s=_(n),u=s!==i;if(i=s,u&&(E.current.incoming||c()))return E.current.incoming=null,void(a=e);(u||l&&!u&&e&&!a)&&(a=e,E.current.outgoing.push(i),(a?S.current:C.current)(i,{selectionStart:t(),selectionEnd:r()})),l=u}}));return function(){return s()}}),[b,n])}var $l,Yl=Object(b.createHigherOrderComponent)((function(e){return Object(m.withRegistry)((function(t){var n=t.useSubRegistry,r=void 0===n||n,o=t.registry,c=Object(j.a)(t,["useSubRegistry","registry"]);if(!r)return Object(l.createElement)(e,Object(i.a)({registry:o},c));var a=Object(l.useState)(null),s=Object(To.a)(a,2),u=s[0],d=s[1];return Object(l.useEffect)((function(){var e=Object(m.createRegistry)({},o);e.registerStore(Dt,fr),d(e)}),[o]),u?Object(l.createElement)(m.RegistryProvider,{value:u},Object(l.createElement)(e,Object(i.a)({registry:u},c))):null}))}),"withRegistryProvider")((function(e){var t=e.children,n=e.settings,r=Object(m.useDispatch)(pr).updateSettings;return Object(l.useEffect)((function(){r(n)}),[n]),ql(e),t}));function Xl(e){var t=e.onClick;return Object(l.createElement)("div",{tabIndex:0,role:"button",onClick:t,onKeyPress:t},Object(l.createElement)(v.Disabled,null,Object(l.createElement)(Zu,null)))}var Ql=function(e){var t=e.viewportWidth,n=e.__experimentalPadding,r=Object(b.useResizeObserver)(),o=Object(To.a)(r,2),c=o[0],i=o[1].width,a=Object(b.useResizeObserver)(),s=Object(To.a)(a,2),u=s[0],d=s[1].height;$l=$l||Object(b.pure)(Zu);var f=(i-2*n)/t;return Object(l.createElement)("div",{className:"block-editor-block-preview__container editor-styles-wrapper","aria-hidden":!0,style:{height:d*f+2*n}},c,Object(l.createElement)(v.Disabled,{style:{transform:"scale(".concat(f,")"),width:t,left:n,right:n,top:n},className:"block-editor-block-preview__content"},u,Object(l.createElement)($l,null)))},Zl=Object(l.memo)((function(e){var t=e.blocks,n=e.__experimentalPadding,r=void 0===n?0:n,o=e.viewportWidth,c=void 0===o?1200:o,i=e.__experimentalLive,a=void 0!==i&&i,s=e.__experimentalOnClick,u=Object(m.useSelect)((function(e){return e(pr).getSettings()}),[]),b=Object(l.useMemo)((function(){return Object(d.castArray)(t)}),[t]);return t&&0!==t.length?Object(l.createElement)(Yl,{value:b,settings:u},a?Object(l.createElement)(Xl,{onClick:s}):Object(l.createElement)(Ql,{viewportWidth:c,__experimentalPadding:r})):null}));function Jl(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function es(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Jl(Object(n),!0).forEach((function(t){Object(a.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Jl(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var ts=function(e){var t,n,r=e.item,o=r.name,c=r.title,i=r.icon,a=r.description,s=r.initialAttributes,u=Object(p.getBlockType)(o),d=Object(p.isReusableBlock)(r);return Object(l.createElement)("div",{className:"block-editor-inserter__preview-container"},Object(l.createElement)("div",{className:"block-editor-inserter__preview"},d||u.example?Object(l.createElement)("div",{className:"block-editor-inserter__preview-content"},Object(l.createElement)(Zl,{__experimentalPadding:16,viewportWidth:null!==(t=null===(n=u.example)||void 0===n?void 0:n.viewportWidth)&&void 0!==t?t:500,blocks:u.example?Object(p.getBlockFromExample)(r.name,{attributes:es(es({},u.example.attributes),s),innerBlocks:u.example.innerBlocks}):Object(p.createBlock)(o,s)})):Object(l.createElement)("div",{className:"block-editor-inserter__preview-content-missing"},Object(y.__)("No Preview Available."))),!d&&Object(l.createElement)(Kl,{title:c,icon:i,description:a}))},ns=Object(l.createElement)(kr.SVG,{width:"18",height:"18",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 18 18"},Object(l.createElement)(kr.Path,{d:"M5 4h2V2H5v2zm6-2v2h2V2h-2zm-6 8h2V8H5v2zm6 0h2V8h-2v2zm-6 6h2v-2H5v2zm6 0h2v-2h-2v2z"}));function rs(e){var t=e.count,n=e.icon;return Object(l.createElement)("div",{className:"block-editor-block-draggable-chip-wrapper"},Object(l.createElement)("div",{className:"block-editor-block-draggable-chip"},Object(l.createElement)(v.Flex,{justify:"center",className:"block-editor-block-draggable-chip__content"},Object(l.createElement)(v.FlexItem,null,n?Object(l.createElement)(xa,{icon:n}):Object(y.sprintf)(
30
  /* translators: %d: Number of blocks. */
31
- Object(y._n)("%d block","%d blocks",t),t)),Object(l.createElement)(v.FlexItem,null,Object(l.createElement)(xa,{icon:ns})))))}var os=function(e){var t=e.isEnabled,n=e.blocks,r=e.icon,o=e.children,c={type:"inserter",blocks:n};return Object(l.createElement)(v.Draggable,{transferData:c,__experimentalDragComponent:Object(l.createElement)(rs,{count:n.length,icon:r})},(function(e){var n=e.onDraggableStart,r=e.onDraggableEnd;return o({draggable:t,onDragStart:t?n:void 0,onDragEnd:t?r:void 0})}))},cs=Object(l.memo)((function(e){var t=e.className,n=e.composite,r=e.item,o=e.onSelect,c=e.onHover,a=e.isDraggable,s=Object(j.a)(e,["className","composite","item","onSelect","onHover","isDraggable"]),d=Object(l.useRef)(!1),b=r.icon?{backgroundColor:r.icon.background,color:r.icon.foreground}:{},f=Object(l.useMemo)((function(){return[Object(p.createBlock)(r.name,r.initialAttributes,Object(p.createBlocksFromInnerBlocksTemplate)(r.innerBlocks))]}),[r.name,r.initialAttributes,r.initialAttributes]);return Object(l.createElement)(os,{isEnabled:a&&!r.disabled,blocks:f,icon:r.icon},(function(e){var a=e.draggable,f=e.onDragStart,p=e.onDragEnd;return Object(l.createElement)("div",{className:"block-editor-block-types-list__list-item",draggable:a,onDragStart:function(e){d.current=!0,f&&(c(null),f(e))},onDragEnd:function(e){d.current=!1,p&&p(e)}},Object(l.createElement)(v.__unstableCompositeItem,Object(i.a)({role:"option",as:v.Button},n,{className:u()("block-editor-block-types-list__item",t),disabled:r.isDisabled,onClick:function(e){e.preventDefault(),o(r),c(null)},onFocus:function(){d.current||c(r)},onMouseEnter:function(){d.current||c(r)},onMouseLeave:function(){return c(null)},onBlur:function(){return c(null)},focusable:!0},s),Object(l.createElement)("span",{className:"block-editor-block-types-list__item-icon",style:b},Object(l.createElement)(xa,{icon:r.icon,showColors:!0})),Object(l.createElement)("span",{className:"block-editor-block-types-list__item-title"},r.title)))}))})),is=function(e){var t=e.items,n=void 0===t?[]:t,r=e.onSelect,o=e.onHover,c=void 0===o?function(){}:o,a=e.children,s=e.label,u=e.isDraggable,d=void 0===u||u,b=Object(v.__unstableUseCompositeState)();return Object(l.createElement)(v.__unstableComposite,Object(i.a)({},b,{role:"listbox",className:"block-editor-block-types-list","aria-label":s}),n.map((function(e){return Object(l.createElement)(cs,{key:e.id,item:e,className:Object(p.getBlockMenuDefaultClassName)(e.id),onSelect:r,onHover:c,composite:b,isDraggable:d})})),a)},as=function(e){var t=e.title,n=e.icon,r=e.children;return Object(l.createElement)(l.Fragment,null,Object(l.createElement)("div",{className:"block-editor-inserter__panel-header"},Object(l.createElement)("h2",{className:"block-editor-inserter__panel-title"},t),Object(l.createElement)(v.Icon,{icon:n})),Object(l.createElement)("div",{className:"block-editor-inserter__panel-content"},r))};function ls(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}var ss=function(e){var t=e.rootClientId,n=e.onInsert,r=e.onHover,o=e.showMostUsedBlocks,c=Ba(t,n),i=Object(To.a)(c,4),s=i[0],u=i[1],b=i[2],f=i[3],p=Object(l.useMemo)((function(){return Object(d.orderBy)(s,["frecency"],["desc"]).slice(0,6)}),[s]),m=Object(l.useMemo)((function(){return s.filter((function(e){return!e.category}))}),[s]),v=Object(l.useMemo)((function(){var e=function(e){return Object(d.findIndex)(u,(function(t){return t.slug===e.category}))};return Object(d.flow)((function(e){return e.filter((function(e){return e.category&&"reusable"!==e.category}))}),(function(t){return Object(d.sortBy)(t,e)}),(function(e){return Object(d.groupBy)(e,"category")}))(s)}),[s,u]),g=Object(l.useMemo)((function(){var e=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ls(Object(n),!0).forEach((function(t){Object(a.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ls(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({},b);return Object.keys(b).forEach((function(t){e[t]=s.filter((function(e){return function(e){return e.name.split("/")[0]}(e)===t})),0===e[t].length&&delete e[t]})),e}),[s,b]);return Object(l.useEffect)((function(){return function(){return r(null)}}),[]),Object(l.createElement)("div",null,o&&!!p.length&&Object(l.createElement)(as,{title:Object(y._x)("Most used","blocks")},Object(l.createElement)(is,{items:p,onSelect:f,onHover:r,label:Object(y._x)("Most used","blocks")})),Object(d.map)(u,(function(e){var t=v[e.slug];return t&&t.length?Object(l.createElement)(as,{key:e.slug,title:e.title,icon:e.icon},Object(l.createElement)(is,{items:t,onSelect:f,onHover:r,label:e.title})):null})),!m.length&&Object(l.createElement)(as,{className:"block-editor-inserter__uncategorized-blocks-panel",title:Object(y.__)("Uncategorized")},Object(l.createElement)(is,{items:m,onSelect:f,onHover:r,label:Object(y.__)("Uncategorized")})),Object(d.map)(b,(function(e,t){var n=g[t];return n&&n.length?Object(l.createElement)(as,{key:t,title:e.title,icon:e.icon},Object(l.createElement)(is,{items:n,onSelect:f,onHover:r,label:e.title})):null})))},us=function(e){var t,n=e.selectedCategory,r=e.patternCategories,o=e.onClickCategory,c=e.children;return Object(l.createElement)(l.Fragment,null,Object(l.createElement)("div",{className:u()("block-editor-inserter__panel-header","block-editor-inserter__panel-header-patterns")},Object(l.createElement)(v.SelectControl,{className:"block-editor-inserter__panel-dropdown",label:Object(y.__)("Filter patterns"),hideLabelFromVision:!0,value:n.name,onChange:function(e){o(r.find((function(t){return e===t.name})))},options:(t=[],r.map((function(e){return t.push({value:e.name,label:e.label})})),t)})),Object(l.createElement)("div",{className:"block-editor-inserter__panel-content"},c))},ds=n(51),bs=function(e,t){var n=Object(m.useSelect)((function(e){var n=e(pr),r=n.__experimentalGetAllowedPatterns,o=n.getSettings;return{patterns:r(t),patternCategories:o().__experimentalBlockPatternCategories}}),[t]),r=n.patternCategories,o=n.patterns,c=Object(m.useDispatch)(ds.store).createSuccessNotice;return[o,r,Object(l.useCallback)((function(t,n){e(Object(d.map)(n,(function(e){return Object(p.cloneBlock)(e)})),t.name),c(Object(y.sprintf)(
32
  /* translators: %s: block pattern title. */
33
- Object(y.__)('Block pattern "%s" inserted.'),t.title),{type:"snackbar"})}),[])]};function fs(e){var t=e.isDraggable,n=e.pattern,r=e.onClick,o=e.composite,c=n.content,a=n.viewportWidth,s=Object(l.useMemo)((function(){return Object(p.parse)(c)}),[c]),u=Object(b.useInstanceId)(fs),d="block-editor-block-patterns-list__item-description-".concat(u);return Object(l.createElement)(os,{isEnabled:t,blocks:s},(function(e){var t=e.draggable,c=e.onDragStart,u=e.onDragEnd;return Object(l.createElement)("div",{className:"block-editor-block-patterns-list__list-item","aria-label":n.title,"aria-describedby":n.description?d:void 0,draggable:t,onDragStart:c,onDragEnd:u},Object(l.createElement)(v.__unstableCompositeItem,Object(i.a)({role:"option",as:"div"},o,{className:"block-editor-block-patterns-list__item",onClick:function(){return r(n,s)}}),Object(l.createElement)(Zl,{blocks:s,viewportWidth:a}),Object(l.createElement)("div",{className:"block-editor-block-patterns-list__item-title"},n.title),!!n.description&&Object(l.createElement)(v.VisuallyHidden,{id:d},n.description)))}))}function ps(){return Object(l.createElement)("div",{className:"block-editor-block-patterns-list__item is-placeholder"})}var ms=function(e){var t=e.isDraggable,n=e.blockPatterns,r=e.shownPatterns,o=e.onClickPattern,c=e.orientation,a=e.label,s=void 0===a?Object(y.__)("Block Patterns"):a,u=Object(v.__unstableUseCompositeState)({orientation:c});return Object(l.createElement)(v.__unstableComposite,Object(i.a)({},u,{role:"listbox",className:"block-editor-block-patterns-list","aria-label":s}),n.map((function(e){return r.includes(e)?Object(l.createElement)(fs,{key:e.name,pattern:e,onClick:o,isDraggable:t,composite:u}):Object(l.createElement)(ps,{key:e.name})})))};function vs(e){var t=e.rootClientId,n=e.onInsert,r=e.selectedCategory,o=e.onClickCategory,c=bs(n,t),i=Object(To.a)(c,3),a=i[0],s=i[1],u=i[2],f=Object(l.useMemo)((function(){return s.filter((function(e){return a.some((function(t){var n;return null===(n=t.categories)||void 0===n?void 0:n.includes(e.name)}))}))}),[a,s]),p=r||f[0];Object(l.useEffect)((function(){a.some((function(e){return m(e)===1/0}))&&!f.find((function(e){return"uncategorized"===e.name}))&&f.push({name:"uncategorized",label:Object(y._x)("Uncategorized")})}),[f,a]);var m=Object(l.useCallback)((function(e){if(!e.categories||!e.categories.length)return 1/0;var t=Object(d.fromPairs)(f.map((function(e,t){return[e.name,t]})));return Math.min.apply(Math,Object(k.a)(e.categories.map((function(e){return void 0!==t[e]?t[e]:1/0}))))}),[f]),v=Object(l.useMemo)((function(){return a.filter((function(e){return"uncategorized"===p.name?m(e)===1/0:e.categories&&e.categories.includes(p.name)}))}),[a,p]),g=Object(l.useMemo)((function(){return v.sort((function(e,t){return m(e)-m(t)}))}),[v,m]),O=Object(b.useAsyncList)(g);return Object(l.createElement)(l.Fragment,null,!!v.length&&Object(l.createElement)(us,{selectedCategory:p,patternCategories:f,onClickCategory:o},Object(l.createElement)(ms,{shownPatterns:O,blockPatterns:v,onClickPattern:u,label:p.label,orientation:"vertical",isDraggable:!0})))}var gs=function(e){var t=e.rootClientId,n=e.onInsert,r=e.onClickCategory,o=e.selectedCategory;return Object(l.createElement)(vs,{rootClientId:t,selectedCategory:o,onInsert:n,onClickCategory:r})},Os=n(29),hs=function(){return Object(l.createElement)("div",{className:"block-editor-inserter__no-results"},Object(l.createElement)(Hl.a,{className:"block-editor-inserter__no-results-icon",icon:Ia.a}),Object(l.createElement)("p",null,Object(y.__)("No results found.")))};function js(e){var t=e.onHover,n=e.onInsert,r=e.rootClientId,o=Ba(r,n),c=Object(To.a)(o,4),i=c[0],a=c[3],s=Object(l.useMemo)((function(){return i.filter((function(e){return"reusable"===e.category}))}),[i]);return 0===s.length?Object(l.createElement)(hs,null):Object(l.createElement)(as,{title:Object(y.__)("Reusable blocks")},Object(l.createElement)(is,{items:s,onSelect:a,onHover:t,label:Object(y.__)("Reusable blocks")}))}var ks=function(e){var t=e.rootClientId,n=e.onInsert,r=e.onHover;return Object(l.createElement)(l.Fragment,null,Object(l.createElement)(js,{onHover:r,onInsert:n,rootClientId:t}),Object(l.createElement)("div",{className:"block-editor-inserter__manage-reusable-blocks-container"},Object(l.createElement)("a",{className:"block-editor-inserter__manage-reusable-blocks",href:Object(Os.addQueryArgs)("edit.php",{post_type:"wp_block"})},Object(y.__)("Manage all reusable blocks"))))},ys=Object(v.createSlotFill)("__experimentalInserterMenuExtension"),_s=ys.Fill,Es=ys.Slot;_s.Slot=Es;var ws=_s,Cs=function(e){var t=e.rootClientId,n=e.insertionIndex,r=e.clientId,o=e.isAppender,c=e.selectBlockOnInsert,i=e.onSelect,a=Object(m.useSelect)((function(e){var c,i,a=e(pr),l=a.getSelectedBlock,s=a.getBlockIndex,u=a.getBlockOrder,d=a.getBlockInsertionPoint;if(t||n||r||o)c=t,i=n||(r?s(r,c):u(c).length);else{var b=d();c=b.rootClientId,i=b.index}return{selectedBlock:l(),destinationRootClientId:c,destinationIndex:i}}),[t,n,r,o]),s=a.selectedBlock,u=a.destinationRootClientId,b=a.destinationIndex,f=Object(m.useDispatch)(pr),v=f.replaceBlocks,g=f.insertBlocks,O=f.showInsertionPoint,h=f.hideInsertionPoint,j=Object(l.useCallback)((function(e,t){if(!o&&s&&Object(p.isUnmodifiedDefaultBlock)(s)?v(s.clientId,e,null,null,t):g(e,b,u,c,t),!c){var n=Object(y.sprintf)(// translators: %d: the name of the block that has been added
34
- Object(y._n)("%d block added.","%d blocks added.",Object(d.castArray)(e).length),Object(d.castArray)(e).length);Object(Tt.speak)(n)}i&&i()}),[o,s,v,g,u,b,c,i]),k=Object(l.useCallback)((function(e){e?O(u,b):h()}),[O,h,u,b]);return[u,j,k]},Ss=function(e){var t=e.filterValue,n=e.onSelect,r=e.onHover,o=e.rootClientId,c=e.clientId,i=e.isAppender,a=e.selectBlockOnInsert,s=e.maxBlockPatterns,u=e.maxBlockTypes,f=e.showBlockDirectory,p=void 0!==f&&f,m=e.isDraggable,g=void 0===m||m,O=Object(b.useDebounce)(Tt.speak,500),h=Cs({onSelect:n,rootClientId:o,clientId:c,isAppender:i,selectBlockOnInsert:a}),j=Object(To.a)(h,2),k=j[0],_=j[1],E=Ba(k,_),w=Object(To.a)(E,4),C=w[0],S=w[1],B=w[2],I=w[3],x=bs(_,k),P=Object(To.a)(x,3),T=P[0],N=P[2],D=Object(l.useMemo)((function(){var e=wa(Object(d.orderBy)(C,["frecency"],["desc"]),S,B,t);return void 0!==u?e.slice(0,u):e}),[t,C,S,B,u]),A=Object(l.useMemo)((function(){var e=Ca(T,t);return void 0!==s?e.slice(0,s):e}),[t,T,s]);Object(l.useEffect)((function(){if(t){var e=D.length+A.length,n=Object(y.sprintf)(
35
  /* translators: %d: number of results. */
36
- Object(y._n)("%d result found.","%d results found.",e),e);O(n)}}),[t,O]);var R=Object(b.useAsyncList)(A),L=!Object(d.isEmpty)(D)||!Object(d.isEmpty)(A);return Object(l.createElement)(l.Fragment,null,!p&&!L&&Object(l.createElement)(hs,null),!!D.length&&Object(l.createElement)(as,{title:Object(l.createElement)(v.VisuallyHidden,null,Object(y.__)("Blocks"))},Object(l.createElement)(is,{items:D,onSelect:I,onHover:r,label:Object(y.__)("Blocks"),isDraggable:g})),!!D.length&&!!A.length&&Object(l.createElement)("div",{className:"block-editor-inserter__quick-inserter-separator"}),!!A.length&&Object(l.createElement)(as,{title:Object(l.createElement)(v.VisuallyHidden,null,Object(y.__)("Block Patterns"))},Object(l.createElement)("div",{className:"block-editor-inserter__quick-inserter-patterns"},Object(l.createElement)(ms,{shownPatterns:R,blockPatterns:A,onClickPattern:N,isDraggable:g}))),p&&Object(l.createElement)(ws.Slot,{fillProps:{onSelect:I,onHover:r,filterValue:t,hasItems:L,rootClientId:k}},(function(e){return e.length?e:L?null:Object(l.createElement)(hs,null)})))},Bs={name:"blocks",
37
  /* translators: Blocks tab title in the block inserter. */
38
- title:Object(y.__)("Blocks")},Is={name:"patterns",
39
  /* translators: Patterns tab title in the block inserter. */
40
- title:Object(y.__)("Patterns")},xs={name:"reusable",
41
  /* translators: Reusable blocks tab title in the block inserter. */
42
- title:Object(y.__)("Reusable")},Ps=function(e){var t=e.children,n=e.showPatterns,r=void 0!==n&&n,o=e.showReusableBlocks,c=void 0!==o&&o,i=e.onSelect,a=Object(l.useMemo)((function(){var e=[Bs];return r&&e.push(Is),c&&e.push(xs),e}),[Bs,r,Is,c,xs]);return Object(l.createElement)(v.TabPanel,{className:"block-editor-inserter__tabs",tabs:a,onSelect:i},t)},Ts=function(e){var t=e.rootClientId,n=e.clientId,r=e.isAppender,o=e.__experimentalSelectBlockOnInsert,c=e.__experimentalInsertionIndex,i=e.onSelect,a=e.showInserterHelpPanel,s=e.showMostUsedBlocks,u=Object(l.useState)(""),d=Object(To.a)(u,2),b=d[0],f=d[1],p=Object(l.useState)(null),g=Object(To.a)(p,2),O=g[0],h=g[1],j=Object(l.useState)(null),k=Object(To.a)(j,2),_=k[0],E=k[1],w=Cs({rootClientId:t,clientId:n,isAppender:r,selectBlockOnInsert:o,insertionIndex:c}),C=Object(To.a)(w,3),S=C[0],B=C[1],I=C[2],x=Object(m.useSelect)((function(e){var t,n=e(pr),r=n.__experimentalGetAllowedPatterns,o=n.getSettings;return{showPatterns:!S||!!r(S).length,hasReusableBlocks:!(null===(t=o().__experimentalReusableBlocks)||void 0===t||!t.length)}}),[S]),P=x.showPatterns,T=x.hasReusableBlocks,N=Object(l.useCallback)((function(e){B(e),i()}),[B,i]),D=Object(l.useCallback)((function(e,t){B(e,{patternName:t}),i()}),[B,i]),A=Object(l.useCallback)((function(e){I(!!e),h(e)}),[I,h]),R=Object(l.useCallback)((function(e){E(e)}),[E]),L=Object(l.useMemo)((function(){return Object(l.createElement)(l.Fragment,null,Object(l.createElement)("div",{className:"block-editor-inserter__block-list"},Object(l.createElement)(ss,{rootClientId:S,onInsert:N,onHover:A,showMostUsedBlocks:s})),a&&Object(l.createElement)("div",{className:"block-editor-inserter__tips"},Object(l.createElement)(v.VisuallyHidden,{as:"h2"},Object(y.__)("A tip for using the block editor")),Object(l.createElement)(Fl,null)))}),[S,N,A,b,s,a]),M=Object(l.useMemo)((function(){return Object(l.createElement)(gs,{rootClientId:S,onInsert:D,onClickCategory:R,selectedCategory:_})}),[S,D,R,_]),F=Object(l.useMemo)((function(){return Object(l.createElement)(ks,{rootClientId:S,onInsert:N,onHover:A})}),[S,N,A]),V=Object(l.useCallback)((function(e){return"blocks"===e.name?L:"patterns"===e.name?M:F}),[L,M,F]);return Object(l.createElement)("div",{className:"block-editor-inserter__menu"},Object(l.createElement)("div",{className:"block-editor-inserter__main-area"},Object(l.createElement)("div",{className:"block-editor-inserter__content"},Object(l.createElement)(Gl,{onChange:function(e){O&&h(null),f(e)},value:b,placeholder:Object(y.__)("Search")}),!!b&&Object(l.createElement)(Ss,{filterValue:b,onSelect:i,onHover:A,rootClientId:t,clientId:n,isAppender:r,selectBlockOnInsert:o,showBlockDirectory:!0}),!b&&(P||T)&&Object(l.createElement)(Ps,{showPatterns:P,showReusableBlocks:T},V),!b&&!P&&!T&&L)),a&&O&&Object(l.createElement)(ts,{item:O}))};function Ns(e){var t=e.onSelect,n=e.rootClientId,r=e.clientId,o=e.isAppender,c=e.selectBlockOnInsert,i=Object(l.useState)(""),a=Object(To.a)(i,2),s=a[0],d=a[1],b=Cs({onSelect:t,rootClientId:n,clientId:r,isAppender:o,selectBlockOnInsert:c}),f=Object(To.a)(b,2),p=f[0],g=f[1],O=Ba(p,g),h=Object(To.a)(O,1)[0],j=bs(g,p),k=Object(To.a)(j,1)[0],_=k.length&&!!s,E=_&&k.length>6||h.length>6,w=Object(m.useSelect)((function(e){var t=e(pr),o=t.getSettings,c=t.getBlockIndex;return{setInserterIsOpened:o().__experimentalSetIsInserterOpened,blockIndex:c(r,n)}}),[r,n]),C=w.setInserterIsOpened,S=w.blockIndex;Object(l.useEffect)((function(){C&&C(!1)}),[C]);var B=Object(m.useDispatch)(pr).__unstableSetInsertionPoint;return Object(l.createElement)("div",{className:u()("block-editor-inserter__quick-inserter",{"has-search":E,"has-expand":C})},E&&Object(l.createElement)(Gl,{value:s,onChange:function(e){d(e)},placeholder:Object(y.__)("Search for a block")}),Object(l.createElement)("div",{className:"block-editor-inserter__quick-inserter-results"},Object(l.createElement)(Ss,{filterValue:s,onSelect:t,rootClientId:n,clientId:r,isAppender:o,selectBlockOnInsert:c,maxBlockPatterns:_?2:0,maxBlockTypes:6,isDraggable:!1})),C&&Object(l.createElement)(v.Button,{className:"block-editor-inserter__quick-inserter-expand",onClick:function(){B(n,S),C(!0)},"aria-label":Object(y.__)("Browse all. This will open the main inserter panel in the editor toolbar.")},Object(y.__)("Browse all")))}var Ds=function(e){var t,n=e.onToggle,r=e.disabled,o=e.isOpen,c=e.blockTitle,a=e.hasSingleBlockType,s=e.toggleProps,u=void 0===s?{}:s;t=a?Object(y.sprintf)(// translators: %s: the name of the block when there is only one
43
- Object(y._x)("Add %s","directly add the only allowed block"),c):Object(y._x)("Add block","Generic label for block inserter button");var d=u.onClick,b=Object(j.a)(u,["onClick"]);return Object(l.createElement)(v.Button,Object(i.a)({icon:Ll.a,label:t,tooltipPosition:"bottom",onClick:function(e){n&&n(e),d&&d(e)},className:"block-editor-inserter__toggle","aria-haspopup":!a&&"true","aria-expanded":!a&&o,disabled:r},b))},As=function(e){Object(xi.a)(o,e);var t,n,r=(t=o,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=Object(Ti.a)(t);if(n){var o=Object(Ti.a)(this).constructor;e=Reflect.construct(r,arguments,o)}else e=r.apply(this,arguments);return Object(Pi.a)(this,e)});function o(){var e;return Object(Si.a)(this,o),(e=r.apply(this,arguments)).onToggle=e.onToggle.bind(Object(Ii.a)(e)),e.renderToggle=e.renderToggle.bind(Object(Ii.a)(e)),e.renderContent=e.renderContent.bind(Object(Ii.a)(e)),e}return Object(Bi.a)(o,[{key:"onToggle",value:function(e){var t=this.props.onToggle;t&&t(e)}},{key:"renderToggle",value:function(e){var t=e.onToggle,n=e.isOpen,r=this.props,o=r.disabled,c=r.blockTitle,i=r.hasSingleBlockType,a=r.toggleProps,l=r.hasItems,s=r.renderToggle;return(void 0===s?Ds:s)({onToggle:t,isOpen:n,disabled:o||!l,blockTitle:c,hasSingleBlockType:i,toggleProps:a})}},{key:"renderContent",value:function(e){var t=e.onClose,n=this.props,r=n.rootClientId,o=n.clientId,c=n.isAppender,i=n.showInserterHelpPanel,a=n.__experimentalSelectBlockOnInsert;return n.__experimentalIsQuick?Object(l.createElement)(Ns,{onSelect:function(){t()},rootClientId:r,clientId:o,isAppender:c,selectBlockOnInsert:a}):Object(l.createElement)(Ts,{onSelect:function(){t()},rootClientId:r,clientId:o,isAppender:c,showInserterHelpPanel:i,__experimentalSelectBlockOnInsert:a})}},{key:"render",value:function(){var e=this.props,t=e.position,n=e.hasSingleBlockType,r=e.insertOnlyAllowedBlock,o=e.__experimentalIsQuick,c=e.onSelectOrClose;return n?this.renderToggle({onToggle:r}):Object(l.createElement)(v.Dropdown,{className:"block-editor-inserter",contentClassName:u()("block-editor-inserter__popover",{"is-quick":o}),position:t,onToggle:this.onToggle,expandOnMobile:!0,headerTitle:Object(y.__)("Add a block"),renderToggle:this.renderToggle,renderContent:this.renderContent,onClose:c})}}]),o}(l.Component),Rs=Object(b.compose)([Object(m.withSelect)((function(e,t){var n=t.clientId,r=t.rootClientId,o=e(pr),c=o.getBlockRootClientId,i=o.hasInserterItems,a=o.__experimentalGetAllowedBlocks,l=e(p.store).getBlockVariations,s=a(r=r||c(n)||void 0),u=1===Object(d.size)(s)&&0===Object(d.size)(l(s[0].name,"inserter")),b=!1;return u&&(b=s[0]),{hasItems:i(r),hasSingleBlockType:u,blockTitle:b?b.title:"",allowedBlockType:b,rootClientId:r}})),Object(m.withDispatch)((function(e,t,n){var r=n.select;return{insertOnlyAllowedBlock:function(){var n=t.rootClientId,o=t.clientId,c=t.isAppender,i=t.onSelectOrClose,a=t.hasSingleBlockType,l=t.allowedBlockType,s=t.__experimentalSelectBlockOnInsert;if(a&&((0,e(pr).insertBlock)(Object(p.createBlock)(l.name),function(){var e=r(pr),t=e.getBlockIndex,i=e.getBlockSelectionEnd,a=e.getBlockOrder;if(o)return t(o,n);var l=i();return!c&&l?t(l,n)+1:a(n).length}(),n,s),i&&i(),!s)){var u=Object(y.sprintf)(// translators: %s: the name of the block that has been added
44
- Object(y.__)("%s block added"),l.title);Object(Tt.speak)(u)}}}})),Object(b.ifCondition)((function(e){var t=e.hasItems,n=e.isAppender,r=e.rootClientId,o=e.clientId;return t||!n&&!r&&!o}))])(As),Ls=Object(b.compose)(Object(m.withSelect)((function(e,t){var n=e(pr),r=n.getBlockCount,o=n.getBlockName,c=n.isBlockValid,i=n.getSettings,a=n.getTemplateLock,l=!r(t.rootClientId),s=o(t.lastBlockClientId)===Object(p.getDefaultBlockName)(),u=c(t.lastBlockClientId),d=i().bodyPlaceholder;return{isVisible:l||!s||!u,showPrompt:l,isLocked:!!a(t.rootClientId),placeholder:d}})),Object(m.withDispatch)((function(e,t){var n=e(pr),r=n.insertDefaultBlock,o=n.startTyping;return{onAppend:function(){var e=t.rootClientId;r(void 0,e),o()}}})))((function(e){var t=e.isLocked,n=e.isVisible,r=e.onAppend,o=e.showPrompt,c=e.placeholder,i=e.rootClientId;if(t||!n)return null;var a=Object(Rl.decodeEntities)(c)||Object(y.__)("Start writing or type / to choose a block");return Object(l.createElement)("div",{"data-root-client-id":i||"",className:"wp-block block-editor-default-block-appender"},Object(l.createElement)(Dl.a,{role:"button","aria-label":Object(y.__)("Add block"),className:"block-editor-default-block-appender__content",readOnly:!0,onFocus:r,value:o?a:""}),Object(l.createElement)(Rs,{rootClientId:i,position:"bottom right",isAppender:!0,__experimentalIsQuick:!0}))})),Ms=Object(l.forwardRef)((function(e,t){var n=e.rootClientId,r=e.className,o=e.__experimentalSelectBlockOnInsert,c=e.onFocus,i=e.tabIndex;return Object(l.createElement)(Rs,{position:"bottom center",rootClientId:n,__experimentalSelectBlockOnInsert:o,__experimentalIsQuick:!0,renderToggle:function(e){var n,o=e.onToggle,a=e.disabled,s=e.isOpen,d=e.blockTitle,b=e.hasSingleBlockType;n=b?Object(y.sprintf)(// translators: %s: the name of the block when there is only one
45
- Object(y._x)("Add %s","directly add the only allowed block"),d):Object(y._x)("Add block","Generic label for block inserter button");var f=!b,p=Object(l.createElement)(v.Button,{ref:t,onFocus:c,tabIndex:i,className:u()(r,"block-editor-button-block-appender"),onClick:o,"aria-haspopup":f?"true":void 0,"aria-expanded":f?s:void 0,disabled:a,label:n},!b&&Object(l.createElement)(v.VisuallyHidden,{as:"span"},n),Object(l.createElement)(Hl.a,{icon:Ll.a}));return(f||b)&&(p=Object(l.createElement)(v.Tooltip,{text:n},p)),p},isAppender:!0})}));function Fs(e){e.stopPropagation()}Object(l.createContext)();var Vs=Object(m.withSelect)((function(e,t){var n=t.rootClientId,r=e(pr),o=r.getBlockOrder,c=r.canInsertBlockType,i=r.getTemplateLock,a=r.getSelectedBlockClientId;return{isLocked:!!i(n),blockClientIds:o(n),canInsertDefaultBlock:c(Object(p.getDefaultBlockName)(),n),selectedBlockClientId:a()}}))((function(e){var t,n=e.blockClientIds,r=e.rootClientId,o=e.canInsertDefaultBlock,c=e.isLocked,i=e.renderAppender,a=e.className,s=e.selectedBlockClientId,b=e.tagName,f=void 0===b?"div":b;if(c||!1===i)return null;if(i)t=Object(l.createElement)(i,null);else{var p=!r,m=s===r,v=s&&!n.includes(s);if(!p&&!m&&(!s||v))return null;t=o?Object(l.createElement)(Ls,{rootClientId:r,lastBlockClientId:Object(d.last)(n)}):Object(l.createElement)(Ms,{rootClientId:r,className:"block-list-appender__toggle"})}return Object(l.createElement)(f,{tabIndex:-1,onFocus:Fs,className:u()("block-list-appender","wp-block",a)},t)}));function Hs(e,t,n,r,o,c,i){return function(a){var l=function(e){var t={srcRootClientId:null,srcClientIds:null,srcIndex:null,type:null,blocks:null};if(!e.dataTransfer)return t;try{t=Object.assign(t,JSON.parse(e.dataTransfer.getData("text")))}catch(e){return t}return t}(a),s=l.srcRootClientId,u=l.srcClientIds,d=l.type,b=l.blocks;if("inserter"===d&&(i(),c(b,t,e,!1)),"block"===d){var f=n(u[0],s);if(s===e&&f===t)return;if(u.includes(e)||r(u).some((function(t){return t===e})))return;var p=s===e,m=u.length;o(u,s,e,p&&f<t?t-m:t)}}}function zs(e,t,n,r,o,c){return function(i){if(n){var a=Object(p.findTransform)(Object(p.getBlockTransforms)("from"),(function(t){return"files"===t.type&&o(t.blockName,e)&&t.isMatch(i)}));if(a){var l=a.transform(i,r);c(l,t,e)}}}}function Gs(e,t,n){return function(r){var o=Object(p.pasteHandler)({HTML:r,mode:"BLOCKS"});o.length&&n(o,t,e)}}function Us(e,t){var n=Object(m.useSelect)((function(e){var t=e(pr);return{canInsertBlockType:t.canInsertBlockType,getBlockIndex:t.getBlockIndex,getClientIdsOfDescendants:t.getClientIdsOfDescendants,hasUploadPermissions:(0,t.getSettings)().mediaUpload}}),[]),r=n.canInsertBlockType,o=n.getBlockIndex,c=n.getClientIdsOfDescendants,i=n.hasUploadPermissions,a=Object(m.useDispatch)(pr),l=a.insertBlocks,s=a.moveBlocksToPosition,u=a.updateBlockAttributes;return{onDrop:Hs(e,t,o,c,s,l,a.clearSelectedBlock),onFilesDrop:zs(e,t,i,u,r,l),onHTMLDrop:Gs(e,t,l)}}function Ws(e,t,n){var r,o="top"===n||"bottom"===n,c=e.x,i=e.y,a=o?c:i,l=o?i:c,s=o?t.left:t.top,u=o?t.right:t.bottom,d=t[n];return r=a>=s&&a<=u?a:a<u?s:u,Math.sqrt(Math.pow(a-r,2)+Math.pow(l-d,2))}function Ks(e,t){var n,r,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:["top","bottom","left","right"];return o.forEach((function(o){var c=Ws(e,t,o);(void 0===n||c<n)&&(n=c,r=o)})),[n,r]}function qs(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function $s(e){var t=e.clientId,n=e.rootClientId,r=e.setIsInserterForced;return Object(l.createElement)("div",{className:u()("block-editor-block-list__insertion-point-inserter")},Object(l.createElement)(Rs,{position:"bottom center",clientId:t,rootClientId:n,__experimentalIsQuick:!0,onToggle:r,onSelectOrClose:function(){return r(!1)}}))}function Ys(e){var t=e.clientId,n=e.selectedRootClientId,r=e.isInserterShown,o=e.isInserterForced,c=e.setIsInserterForced,i=e.containerRef,a=e.showInsertionPoint,s=Object(m.useDispatch)(pr).selectBlock,d=Object(l.useRef)(),b=Object(m.useSelect)((function(e){var r,o=e(pr),c=o.getBlockOrder,a=o.getBlockRootClientId,l=o.getBlockListSettings,s=o.getMultiSelectedBlockClientIds,u=o.getSelectedBlockClientId,d=o.hasMultiSelection,b=o.getSettings,f=i.current.ownerDocument,p=t?a(t):n,m=c(p);if(!m.length)return{};var v=t||m[m.length-1],g=v===m[m.length-1]?null:m[m.indexOf(v)+1],O=b().hasReducedUI,h=s(),j=u(),k=(null===(r=l(p))||void 0===r?void 0:r.orientation)||"vertical";return{previousElement:Jo(v,f),nextElement:Jo(g,f),nextClientId:g,isHidden:O||(d()?g&&h.includes(g):g&&"vertical"===k&&g===j),orientation:k,rootClientId:p}}),[t,n]),f=b.previousElement,p=b.nextElement,g=b.orientation,O=b.isHidden,h=b.nextClientId,j=b.rootClientId,k=Object(l.useMemo)((function(){if(!f)return{};var e=f.getBoundingClientRect(),t=p?p.getBoundingClientRect():null;if("vertical"===g)return{width:f.offsetWidth,height:t?t.top-e.bottom:0};var n=0;return p&&(n=Object(y.isRTL)()?e.left-t.right:t.left-e.right),{width:n,height:f.offsetHeight}}),[f,p]),_=Object(l.useCallback)((function(){var e=f.getBoundingClientRect(),t=p?p.getBoundingClientRect():null;return"vertical"===g?{top:e.bottom,left:e.left,right:e.right,bottom:t?t.top:e.bottom}:Object(y.isRTL)()?{top:e.top,left:t?t.right:e.left,right:e.left,bottom:e.bottom}:{top:e.top,left:e.right,right:t?t.left:e.right,bottom:e.bottom}}),[f,p]);if(!f)return null;var E=u()("block-editor-block-list__insertion-point","is-"+g);return Object(l.createElement)(v.Popover,{noArrow:!0,animate:!1,getAnchorRect:_,focusOnMount:!1,className:"block-editor-block-list__insertion-point-popover",__unstableSlotName:"block-toolbar"},Object(l.createElement)("div",{ref:d,tabIndex:-1,onClick:function(e){e.target===d.current&&h&&s(h,-1)},onFocus:function(e){e.target!==d.current&&c(!0)},className:E,style:k},!O&&(a||r||o)&&Object(l.createElement)("div",{className:"block-editor-block-list__insertion-point-indicator"}),!O&&(r||o)&&Object(l.createElement)($s,{rootClientId:j,clientId:h,setIsInserterForced:c})))}function Xs(e){var t=e(pr),n=t.getSelectedBlockClientId,r=t.getMultiSelectedBlocksEndClientId,o=t.getPreviousBlockClientId,c=t.getNextBlockClientId,i=t.hasBlockMovingClientId,a=t.getBlockIndex,l=t.getBlockRootClientId,s=t.getClientIdsOfDescendants,u=t.canInsertBlockType,d=t.getBlockName,b=n(),f=r();return{selectedBlockClientId:b,selectionBeforeEndClientId:o(f||b),selectionAfterEndClientId:c(f||b),hasBlockMovingClientId:i,getBlockIndex:a,getBlockRootClientId:l,getClientIdsOfDescendants:s,canInsertBlockType:u,getBlockName:d}}var Qs=function(e){var t=e.clientId,n=e.rootClientId,r=e.blockElement,o=Object(m.useSelect)((function(e){var r,o=e(pr),c=o.__unstableGetBlockWithoutInnerBlocks,i=o.getBlockIndex,a=o.hasBlockMovingClientId,l=o.getBlockListSettings,s=i(t,n),u=c(t);return{index:s,name:u.name,attributes:u.attributes,blockMovingMode:a(),orientation:null===(r=l(n))||void 0===r?void 0:r.orientation}}),[t,n]),c=o.index,i=o.name,a=o.attributes,s=o.blockMovingMode,d=o.orientation,b=Object(m.useDispatch)(pr),f=b.setNavigationMode,g=b.removeBlock,O=Object(l.useRef)();Object(l.useEffect)((function(){O.current.focus(),window.navigator.platform.indexOf("Win")>-1&&Object(Tt.speak)(N)}),[]);var h=Object(m.useSelect)(Xs,[]),j=h.selectedBlockClientId,k=h.selectionBeforeEndClientId,y=h.selectionAfterEndClientId,_=h.hasBlockMovingClientId,E=h.getBlockIndex,w=h.getBlockRootClientId,C=h.getClientIdsOfDescendants,S=Object(m.useDispatch)(pr),B=S.selectBlock,I=S.clearSelectedBlock,x=S.setBlockMovingClientId,P=S.moveBlockToPosition,T=Object(p.getBlockType)(i),N=Object(p.__experimentalGetAccessibleBlockLabel)(T,a,c+1,d),D=u()("block-editor-block-list__block-selection-button",{"is-block-moving-mode":!!s});return Object(l.createElement)("div",{className:D},Object(l.createElement)(v.Button,{ref:O,onClick:function(){return f(!1)},onKeyDown:function(e){var n=e.keyCode,o=n===Nc.UP,c=n===Nc.DOWN,i=n===Nc.LEFT,a=n===Nc.RIGHT,l=n===Nc.TAB,s=n===Nc.ESCAPE,u=n===Nc.ENTER,d=n===Nc.SPACE,b=e.shiftKey;if(n===Nc.BACKSPACE||n===Nc.DELETE)return g(t),void e.preventDefault();var f,p=l&&b||o,m=l&&!b||c,v=i,O=a;if(p)f=k;else if(m)f=y;else if(v){var h;f=null!==(h=w(j))&&void 0!==h?h:j}else if(O){var S;f=null!==(S=C([j])[0])&&void 0!==S?S:j}var T=_();if(s&&T&&x(null),(u||d)&&T){var N=w(T),D=w(j),A=E(T,N),R=E(j,D);A<R&&N===D&&(R-=1),P(T,N,D,R),B(T),x(null)}if(m||p||v||O)if(f)e.preventDefault(),B(f);else if(l&&j){var L;m?(L=il.focus.tabbable.findNext(r))||(L=r.ownerDocument.defaultView.frameElement,L=il.focus.tabbable.findNext(L)):L=il.focus.tabbable.findPrevious(r),L&&(e.preventDefault(),L.focus(),I())}},label:N},Object(l.createElement)(Ma,{clientId:t})))};function Zs(e){return Array.from(e.querySelectorAll("[data-toolbar-item]"))}var Js=function(e){var t=e.children,n=e.focusOnMount,r=e.__experimentalInitialIndex,o=e.__experimentalOnIndexChange,c=Object(j.a)(e,["children","focusOnMount","__experimentalInitialIndex","__experimentalOnIndexChange"]),a=Object(l.useRef)(),s=function(e){var t=Object(l.useState)(!0),n=Object(To.a)(t,2),r=n[0],o=n[1],c=Object(l.useCallback)((function(){var t=!il.focus.tabbable.find(e.current).some((function(e){return!("toolbarItem"in e.dataset)}));t||Wl()("Using custom components as toolbar controls",{alternative:"ToolbarItem or ToolbarButton components",link:"https://developer.wordpress.org/block-editor/components/toolbar-button/#inside-blockcontrols"}),o(t)}),[]);return Object(l.useLayoutEffect)((function(){var t=new window.MutationObserver(c);return t.observe(e.current,{childList:!0,subtree:!0}),function(){return t.disconnect()}}),[r]),r}(a);return function(e,t,n,r,o){var c=Object(l.useState)(t),i=Object(To.a)(c,1)[0],a=Object(l.useState)(r),s=Object(To.a)(a,1)[0],u=Object(l.useCallback)((function(){var t,n,r;t=e.current,n=il.focus.tabbable.find(t),(r=Object(To.a)(n,1)[0])&&r.focus()}),[]);Object(nl.useShortcut)("core/block-editor/focus-toolbar",u,{bindGlobal:!0,eventName:"keydown"}),Object(l.useEffect)((function(){i&&u()}),[n,i,u]),Object(l.useEffect)((function(){var t=0;return s&&!i&&(t=window.requestAnimationFrame((function(){var t,n=Zs(e.current),r=s||0;n[r]&&(t=e.current).contains(t.ownerDocument.activeElement)&&n[r].focus()}))),function(){if(window.cancelAnimationFrame(t),o){var n=Zs(e.current).findIndex((function(e){return 0===e.tabIndex}));o(n)}}}),[s,i])}(a,n,s,r,o),s?Object(l.createElement)(v.Toolbar,Object(i.a)({label:c["aria-label"],ref:a},c),t):Object(l.createElement)(v.NavigableMenu,Object(i.a)({orientation:"horizontal",role:"toolbar",ref:a},c),t)},eu=function(e){var t,n,r,o,c=e.children,i=e.clientIds,a=e.cloneClassname,s=e.onDragStart,u=e.onDragEnd,d=e.elementId,b=Object(m.useSelect)((function(e){var t,n=e(pr),r=n.getBlockRootClientId,o=n.getTemplateLock,c=n.getBlockName,a=r(i[0]),l=a?o(a):null,s=c(i[0]);return{srcRootClientId:a,isDraggable:"all"!==l,icon:null===(t=Object(p.getBlockType)(s))||void 0===t?void 0:t.icon}}),[i]),f=b.srcRootClientId,g=b.isDraggable,O=b.icon,h=Object(l.useRef)(!1),j=(t=Object(l.useRef)(null),n=Object(l.useRef)(null),r=Object(l.useRef)(null),o=Object(l.useRef)(null),Object(l.useEffect)((function(){return function(){o.current&&(clearInterval(o.current),o.current=null)}}),[]),[Object(l.useCallback)((function(e){t.current=e.clientY,r.current=Object(il.getScrollContainer)(e.target),o.current=setInterval((function(){if(r.current&&n.current){var e=r.current.scrollTop+n.current;r.current.scroll({top:e})}}),25)}),[]),Object(l.useCallback)((function(e){if(r.current){var o=r.current.offsetHeight,c=t.current-r.current.offsetTop,i=e.clientY-r.current.offsetTop;if(e.clientY>c){var a=Math.max(o-c-50,0),l=Math.max(i-c-50,0)/a;n.current=25*l}else if(e.clientY<c){var s=Math.max(c-50,0),u=Math.max(c-i-50,0)/s;n.current=-25*u}else n.current=0}}),[]),function(){t.current=null,r.current=null,o.current&&(clearInterval(o.current),o.current=null)}]),k=Object(To.a)(j,3),y=k[0],_=k[1],E=k[2],w=Object(m.useDispatch)(pr),C=w.startDraggingBlocks,S=w.stopDraggingBlocks;if(Object(l.useEffect)((function(){return function(){h.current&&S()}}),[]),!g)return c({isDraggable:!1});var B={type:"block",srcClientIds:i,srcRootClientId:f};return Object(l.createElement)(v.Draggable,{cloneClassname:a,elementId:d,transferData:B,onDragStart:function(e){C(i),h.current=!0,y(e),s&&s()},onDragOver:_,onDragEnd:function(){S(),h.current=!1,E(),u&&u()},__experimentalDragComponent:Object(l.createElement)(rs,{count:i.length,icon:O})},(function(e){var t=e.onDraggableStart,n=e.onDraggableEnd;return c({draggable:!0,onDragStart:t,onDragEnd:n})}))},tu=Object(m.withSelect)((function(e,t){var n,r=t.clientIds,o=e(pr),c=o.getBlock,i=o.getBlockIndex,a=o.getBlockListSettings,l=o.getTemplateLock,s=o.getBlockOrder,u=o.getBlockRootClientId,b=Object(d.castArray)(r),f=Object(d.first)(b),m=c(f),v=u(Object(d.first)(b)),g=i(f,v),O=0===g,h=i(Object(d.last)(b),v)===s(v).length-1;return{blockType:m?Object(p.getBlockType)(m.name):null,isLocked:"all"===l(v),rootClientId:v,firstIndex:g,isFirst:O,isLast:h,orientation:null===(n=a(v))||void 0===n?void 0:n.orientation}}))((function(e){var t=e.isFirst,n=e.isLast,r=e.clientIds,o=e.isLocked,c=e.isHidden,a=e.rootClientId,s=e.orientation,d=e.hideDragHandle,b=Object(l.useState)(!1),f=Object(To.a)(b,2),p=f[0],m=f[1],g=function(){return m(!0)},O=function(){return m(!1)};if(o||t&&n&&!a)return null;var h=Object(y.__)("Drag");return Object(l.createElement)("div",{className:u()("block-editor-block-mover",{"is-visible":p||!c,"is-horizontal":"horizontal"===s})},!d&&Object(l.createElement)(eu,{clientIds:r,cloneClassname:"block-editor-block-mover__drag-clone"},(function(e){return Object(l.createElement)(v.Button,Object(i.a)({icon:ns,className:"block-editor-block-mover__drag-handle","aria-hidden":"true",label:h,tabIndex:"-1"},e))})),Object(l.createElement)(v.ToolbarGroup,{className:"block-editor-block-mover__move-button-container"},Object(l.createElement)(v.ToolbarItem,{onFocus:g,onBlur:O},(function(e){return Object(l.createElement)(hl,Object(i.a)({clientIds:r},e))})),Object(l.createElement)(v.ToolbarItem,{onFocus:g,onBlur:O},(function(e){return Object(l.createElement)(jl,Object(i.a)({clientIds:r},e))}))))})),nu=window,ru=nu.clearTimeout,ou=nu.setTimeout;function cu(e){var t=e.ref,n=e.isFocused,r=e.debounceTimeout,o=void 0===r?200:r,c=e.onChange,i=void 0===c?d.noop:c,a=Object(l.useState)(!1),s=Object(To.a)(a,2),u=s[0],b=s[1],f=Object(l.useRef)(),p=function(e){null!=t&&t.current&&b(e),i(e)},m=function(){var e=f.current;e&&ru&&ru(e)};return Object(l.useEffect)((function(){return function(){return m()}}),[]),{showMovers:u,debouncedShowMovers:function(e){e&&e.stopPropagation(),m(),u||p(!0)},debouncedHideMovers:function(e){e&&e.stopPropagation(),m(),f.current=ou((function(){var e;e=(null==t?void 0:t.current)&&t.current.matches(":hover"),!n&&!e&&p(!1)}),o)}}}function iu(e){var t=e.ref,n=e.debounceTimeout,r=void 0===n?200:n,o=e.onChange,c=void 0===o?d.noop:o,i=Object(l.useState)(!1),a=Object(To.a)(i,2),s=a[0],u=a[1],b=cu({ref:t,debounceTimeout:r,isFocused:s,onChange:c}),f=b.showMovers,p=b.debouncedShowMovers,m=b.debouncedHideMovers,v=Object(l.useRef)(!1),g=function(){return(null==t?void 0:t.current)&&t.current.contains(t.current.ownerDocument.activeElement)};return Object(l.useEffect)((function(){var e=t.current,n=function(){g()&&(u(!0),p())},r=function(){g()||(u(!1),m())};return e&&!v.current&&(e.addEventListener("focus",n,!0),e.addEventListener("blur",r,!0),v.current=!0),function(){e&&(e.removeEventListener("focus",n),e.removeEventListener("blur",r))}}),[t,v,u,p,m]),{showMovers:f,gestures:{onMouseMove:p,onMouseLeave:m}}}function au(){var e=Object(m.useDispatch)(pr),t=e.selectBlock,n=e.toggleBlockHighlight,r=Object(m.useSelect)((function(e){var t=e(pr),n=t.getBlockName,r=t.getBlockParents,o=t.getSelectedBlockClientId,c=t.getSettings,i=e(p.store).hasBlockSupport,a=r(o()),l=a[a.length-1],s=n(l),u=Object(p.getBlockType)(s),d=c();return{parentBlockType:u,firstParentClientId:l,shouldHide:!i(u,"__experimentalParentSelector",!0),hasReducedUI:d.hasReducedUI}}),[]),o=r.parentBlockType,c=r.firstParentClientId,a=r.shouldHide,s=r.hasReducedUI,u=Object(l.useRef)(),d=iu({ref:u,onChange:function(e){e&&s||n(c,e)}}).gestures;return a?null:void 0!==c?Object(l.createElement)("div",Object(i.a)({className:"block-editor-block-parent-selector",key:c,ref:u},d),Object(l.createElement)(v.ToolbarButton,{className:"block-editor-block-parent-selector__button",onClick:function(){return t(c)},label:Object(y.sprintf)(
46
  /* translators: %s: Name of the block's parent. */
47
- Object(y.__)("Select %s"),o.title),showTooltip:!0,icon:Object(l.createElement)(xa,{icon:o.icon})})):null}var lu=Object(l.createElement)(kr.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(l.createElement)(kr.Path,{d:"M20.2 8v11c0 .7-.6 1.2-1.2 1.2H6v1.5h13c1.5 0 2.7-1.2 2.7-2.8V8zM18 16.4V4.6c0-.9-.7-1.6-1.6-1.6H4.6C3.7 3 3 3.7 3 4.6v11.8c0 .9.7 1.6 1.6 1.6h11.8c.9 0 1.6-.7 1.6-1.6zm-13.5 0V4.6c0-.1.1-.1.1-.1h11.8c.1 0 .1.1.1.1v11.8c0 .1-.1.1-.1.1H4.6l-.1-.1z"}));function su(e){var t=e.blocks;return Object(l.createElement)("div",{className:"block-editor-block-switcher__popover__preview__parent"},Object(l.createElement)("div",{className:"block-editor-block-switcher__popover__preview__container"},Object(l.createElement)(v.Popover,{className:"block-editor-block-switcher__preview__popover",position:"bottom right",focusOnMount:!1},Object(l.createElement)("div",{className:"block-editor-block-switcher__preview"},Object(l.createElement)("div",{className:"block-editor-block-switcher__preview-title"},Object(y.__)("Preview")),Object(l.createElement)(Zl,{viewportWidth:500,blocks:t})))))}var uu=function(e){var t=e.className,n=e.possibleBlockTransformations,r=e.onSelect,o=e.blocks,c=Object(l.useState)(),i=Object(To.a)(c,2),a=i[0],s=i[1];return Object(l.createElement)(v.MenuGroup,{label:Object(y.__)("Transform to"),className:t},a&&Object(l.createElement)(su,{blocks:Object(p.switchToBlockType)(o,a)}),n.map((function(e){var t=e.name,n=e.icon,o=e.title,c=e.isDisabled;return Object(l.createElement)(v.MenuItem,{key:t,className:Object(p.getBlockMenuDefaultClassName)(t),onClick:function(e){e.preventDefault(),r(t)},disabled:c,onMouseLeave:function(){return s(null)},onMouseEnter:function(){return s(t)}},Object(l.createElement)(xa,{icon:n,showColors:!0}),o)})))};function du(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function bu(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function fu(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?bu(Object(n),!0).forEach((function(t){Object(a.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):bu(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function pu(e){var t=e.genericPreviewBlock,n=e.style,r=e.isActive,o=e.onBlur,c=e.onHover,i=e.onSelect,a=e.styleClassName,s=e.itemRole,d=Object(l.useMemo)((function(){return fu(fu({},t),{},{attributes:fu(fu({},t.attributes),{},{className:a})})}),[t,a]);return Object(l.createElement)("div",{key:n.name,className:u()("block-editor-block-styles__item",{"is-active":r}),onClick:function(){return i()},onKeyDown:function(e){Nc.ENTER!==e.keyCode&&Nc.SPACE!==e.keyCode||(e.preventDefault(),i())},onMouseEnter:c,onMouseLeave:o,role:s||"button",tabIndex:"0","aria-label":n.label||n.name},Object(l.createElement)("div",{className:"block-editor-block-styles__item-preview"},Object(l.createElement)(Zl,{viewportWidth:500,blocks:d})),Object(l.createElement)("div",{className:"block-editor-block-styles__item-label"},n.label||n.name))}var mu=function(e){var t=e.clientId,n=e.onSwitch,r=void 0===n?d.noop:n,o=e.onHoverClassName,c=void 0===o?d.noop:o,i=e.itemRole,a=Object(m.useSelect)((function(e){var n=e(pr).getBlock,r=e(p.store).getBlockStyles,o=n(t);return{block:o,type:Object(p.getBlockType)(o.name),styles:r(o.name),className:o.attributes.className||""}}),[t]),s=a.styles,u=a.block,b=a.type,f=a.className,v=Object(m.useDispatch)(pr).updateBlockAttributes,g=function(e,t){return Object(l.useMemo)((function(){return t.example?Object(p.getBlockFromExample)(e.name,{attributes:t.example.attributes,innerBlocks:t.example.innerBlocks}):Object(p.cloneBlock)(e)}),[t.example?e.name:e,t])}(u,b);if(!s||0===s.length)return null;var O=Object(d.find)(s,"isDefault")?s:[{name:"default",label:Object(y._x)("Default","block style"),isDefault:!0}].concat(Object(k.a)(s)),h=function(e,t){var n,r=function(e,t){var n;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return du(e,void 0);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?du(e,void 0):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var c,i=!0,a=!1;return{s:function(){n=e[Symbol.iterator]()},n:function(){var e=n.next();return i=e.done,e},e:function(e){a=!0,c=e},f:function(){try{i||null==n.return||n.return()}finally{if(a)throw c}}}}(new ei.a(t).values());try{for(r.s();!(n=r.n()).done;){var o=n.value;if(-1!==o.indexOf("is-style-")){var c=o.substring(9),i=Object(d.find)(e,{name:c});if(i)return i}}}catch(e){r.e(e)}finally{r.f()}return Object(d.find)(e,"isDefault")}(O,f);return Object(l.createElement)("div",{className:"block-editor-block-styles"},O.map((function(e){var n=function(e,t,n){var r=new ei.a(e);return t&&r.remove("is-style-"+t.name),r.add("is-style-"+n.name),r.value}(f,h,e);return Object(l.createElement)(pu,{genericPreviewBlock:g,className:f,isActive:h===e,key:e.name,onSelect:function(){v(t,{className:n}),c(null),r()},onBlur:function(){return c(null)},onHover:function(){return c(n)},style:e,styleClassName:n,itemRole:i})})))};function vu(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function gu(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?vu(Object(n),!0).forEach((function(t){Object(a.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):vu(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Ou(e){var t=e.hoveredBlock,n=t.name,r=t.clientId,o=e.onSwitch,c=Object(l.useState)(),i=Object(To.a)(c,2),a=i[0],s=i[1],u=Object(m.useSelect)((function(e){return e(p.store).getBlockType(n)}),[n]);return Object(l.createElement)(v.MenuGroup,{label:Object(y.__)("Styles"),className:"block-editor-block-switcher__styles__menugroup"},a&&Object(l.createElement)(su,{blocks:u.example?Object(p.getBlockFromExample)(u.name,{attributes:gu(gu({},u.example.attributes),{},{className:a}),innerBlocks:u.example.innerBlocks}):Object(p.cloneBlock)(u,{className:a})}),Object(l.createElement)(mu,{clientId:r,onSwitch:o,onHoverClassName:s,itemRole:"menuitem"}))}function hu(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function ju(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?hu(Object(n),!0).forEach((function(t){Object(a.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):hu(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var ku=function(e){var t=e.clientIds,n=e.blocks,r=Object(m.useDispatch)(pr).replaceBlocks,o=La(n[0].clientId),c=Object(m.useSelect)((function(e){var r,c,i=e(pr),a=i.getBlockRootClientId,l=i.getBlockTransformItems,s=e(p.store),u=s.getBlockStyles,b=s.getBlockType,f=a(Object(d.castArray)(t)[0]),m=Object(To.a)(n,1)[0].name,v=1===n.length,g=v&&u(m);return r=v?null==o?void 0:o.icon:1===Object(d.uniq)(n.map((function(e){return e.name}))).length?null===(c=b(m))||void 0===c?void 0:c.icon:lu,{possibleBlockTransformations:l(n,f),hasBlockStyles:!(null==g||!g.length),icon:r,blockTitle:b(m).title}}),[t,n,null==o?void 0:o.icon]),i=c.possibleBlockTransformations,a=c.hasBlockStyles,s=c.icon,u=c.blockTitle,b=1===n.length&&Object(p.isReusableBlock)(n[0]),f=1===n.length&&Object(p.isTemplatePart)(n[0]),g=!!i.length;if(!a&&!g)return Object(l.createElement)(v.ToolbarGroup,null,Object(l.createElement)(v.ToolbarButton,{disabled:!0,className:"block-editor-block-switcher__no-switcher-icon",title:u,icon:Object(l.createElement)(xa,{icon:s,showColors:!0})}));var O=u,h=1===n.length?Object(y.__)("Change block type or style"):Object(y.sprintf)(
48
  /* translators: %s: number of blocks. */
49
- Object(y._n)("Change type of %d block","Change type of %d blocks",n.length),n.length);return Object(l.createElement)(v.ToolbarGroup,null,Object(l.createElement)(v.ToolbarItem,null,(function(e){return Object(l.createElement)(v.DropdownMenu,{className:"block-editor-block-switcher",label:O,popoverProps:{position:"bottom right",isAlternate:!0,className:"block-editor-block-switcher__popover"},icon:Object(l.createElement)(l.Fragment,null,Object(l.createElement)(xa,{icon:s,className:"block-editor-block-switcher__toggle",showColors:!0}),(b||f)&&Object(l.createElement)("span",{className:"block-editor-block-switcher__toggle-text"},Object(l.createElement)(Ma,{clientId:t}))),toggleProps:ju({describedBy:h},e),menuProps:{orientation:"both"}},(function(e){var o=e.onClose;return(a||g)&&Object(l.createElement)("div",{className:"block-editor-block-switcher__container"},g&&Object(l.createElement)(uu,{className:"block-editor-block-switcher__transforms__menugroup",possibleBlockTransformations:i,blocks:n,onSelect:function(e){!function(e){r(t,Object(p.switchToBlockType)(n,e))}(e),o()}}),a&&Object(l.createElement)(Ou,{hoveredBlock:n[0],onSwitch:o}))}))})))},yu=function(e){var t=e.clientIds,n=Object(m.useSelect)((function(e){return e(pr).getBlocksByClientId(t)}),[t]);return!n.length||n.some((function(e){return!e}))?null:Object(l.createElement)(ku,{clientIds:t,blocks:n})},_u=n(52);function Eu(){var e=Object(m.useSelect)((function(e){return e(pr)}),[]).getBlockName,t=Object(m.useSelect)((function(e){return e(p.store)}),[]).getBlockType,n=Object(m.useDispatch)(ds.store).createSuccessNotice;return Object(l.useCallback)((function(r,o){var c="";if(1===o.length){var i=o[0],a=t(e(i)).title;c="copy"===r?Object(y.sprintf)(// Translators: Name of the block being copied, e.g. "Paragraph".
50
  Object(y.__)('Copied "%s" to clipboard.'),a):Object(y.sprintf)(// Translators: Name of the block being cut, e.g. "Paragraph".
51
  Object(y.__)('Moved "%s" to clipboard.'),a)}else c="copy"===r?Object(y.sprintf)(// Translators: %d: Number of blocks being copied.
52
  Object(y._n)("Copied %d block to clipboard.","Copied %d blocks to clipboard.",o.length),o.length):Object(y.sprintf)(// Translators: %d: Number of blocks being cut.
53
- Object(y._n)("Moved %d block to clipboard.","Moved %d blocks to clipboard.",o.length),o.length);n(c,{type:"snackbar"})}),[])}function wu(e){var t=Object(m.useSelect)((function(e){return e(pr)}),[]),n=t.getBlocksByClientId,r=t.getSelectedBlockClientIds,o=t.hasMultiSelection,c=t.getSettings,i=Object(m.useDispatch)(pr),a=i.flashBlock,s=i.removeBlocks,u=i.replaceBlocks,d=Eu();Object(l.useEffect)((function(){function t(t){var i=r();if(0!==i.length){if(!o()){var l=t.target.ownerDocument;if("copy"===t.type||"cut"===t.type?Object(il.documentHasUncollapsedSelection)(l):Object(il.documentHasSelection)(l))return}if(e.current.contains(t.target)){if(t.preventDefault(),"copy"===t.type||"cut"===t.type){1===i.length&&a(i[0]),d(t.type,i);var b=n(i),f=Object(p.serialize)(b);t.clipboardData.setData("text/plain",f),t.clipboardData.setData("text/html",f)}if("cut"===t.type)s(i);else if("paste"===t.type){var m=c().__experimentalCanUserUseUnfilteredHTML,v=function(e){var t=e.clipboardData,n="",r="";try{n=t.getData("text/plain"),r=t.getData("text/html")}catch(e){try{r=t.getData("Text")}catch(e){return}}var o=Object(il.getFilesFromDataTransfer)(t).filter((function(e){var t=e.type;return/^image\/(?:jpe?g|png|gif)$/.test(t)}));return o.length&&!r&&(r=o.map((function(e){return'<img src="'.concat(Object(_u.createBlobURL)(e),'">')})).join(""),n=""),{html:r,plainText:n}}(t),g=v.plainText,O=v.html,h=Object(p.pasteHandler)({HTML:O,plainText:g,mode:"BLOCKS",canUserUseUnfilteredHTML:m});u(i,h,h.length-1,-1)}}}}return e.current.addEventListener("copy",t),e.current.addEventListener("cut",t),e.current.addEventListener("paste",t),function(){e.current.removeEventListener("copy",t),e.current.removeEventListener("cut",t),e.current.removeEventListener("paste",t)}}),[])}var Cu=function(e){var t=e.children,n=Object(l.useRef)();return wu(n),Object(l.createElement)("div",{ref:n},t)};function Su(e){var t=e.clientIds,n=e.children,r=e.__experimentalUpdateSelection,o=Object(m.useSelect)((function(e){return e(pr)}),[]),c=o.canInsertBlockType,i=o.getBlockRootClientId,a=o.getBlocksByClientId,l=o.getTemplateLock,s=Object(m.useSelect)((function(e){return e(p.store)}),[]),u=s.getDefaultBlockName,b=s.getGroupingBlockName,f=a(t),v=i(t[0]),g=Object(d.every)(f,(function(e){return!!e&&Object(p.hasBlockSupport)(e.name,"multiple",!0)&&c(e.name,v)})),O=c(u(),v),h=Object(m.useDispatch)(pr),j=h.removeBlocks,k=h.replaceBlocks,y=h.duplicateBlocks,_=h.insertAfterBlock,E=h.insertBeforeBlock,w=h.flashBlock,C=h.setBlockMovingClientId,S=h.setNavigationMode,B=h.selectBlock,I=Eu();return n({canDuplicate:g,canInsertDefaultBlock:O,isLocked:!!l(v),rootClientId:v,blocks:f,onDuplicate:function(){return y(t,r)},onRemove:function(){return j(t,r)},onInsertBefore:function(){E(Object(d.first)(Object(d.castArray)(t)))},onInsertAfter:function(){_(Object(d.last)(Object(d.castArray)(t)))},onMoveTo:function(){S(!0),B(t[0]),C(t[0])},onGroup:function(){if(f.length){var e=b(),n=Object(p.switchToBlockType)(f,e);n&&k(t,n)}},onUngroup:function(){if(f.length){var e=f[0].innerBlocks;e.length&&k(t,e)}},onCopy:function(){var e=f.map((function(e){return e.clientId}));1===f.length&&w(e[0]),I("copy",e)}})}var Bu=Object(b.compose)([Object(m.withSelect)((function(e,t){var n=t.clientId,r=e(pr),o=r.getBlock,c=r.getBlockMode,i=r.getSettings,a=o(n),l=i().codeEditingEnabled;return{mode:c(n),blockType:a?Object(p.getBlockType)(a.name):null,isCodeEditingEnabled:l}})),Object(m.withDispatch)((function(e,t){var n=t.onToggle,r=void 0===n?d.noop:n,o=t.clientId;return{onToggleMode:function(){e(pr).toggleBlockMode(o),r()}}}))])((function(e){var t=e.blockType,n=e.mode,r=e.onToggleMode,o=e.small,c=void 0!==o&&o,i=e.isCodeEditingEnabled,a=void 0===i||i;if(!Object(p.hasBlockSupport)(t,"html",!0)||!a)return null;var s="visual"===n?Object(y.__)("Edit as HTML"):Object(y.__)("Edit visually");return Object(l.createElement)(v.MenuItem,{onClick:r},!c&&s)})),Iu=Object(b.compose)(Object(m.withSelect)((function(e,t){var n=t.clientId,r=e(pr).getBlock(n);return{block:r,shouldRender:r&&"core/html"===r.name}})),Object(m.withDispatch)((function(e,t){var n=t.block;return{onClick:function(){return e(pr).replaceBlocks(n.clientId,Object(p.rawHandler)({HTML:Object(p.getBlockContent)(n)}))}}})))((function(e){var t=e.shouldRender,n=e.onClick,r=e.small;if(!t)return null;var o=Object(y.__)("Convert to Blocks");return Object(l.createElement)(v.MenuItem,{onClick:n},!r&&o)})),xu=Object(v.createSlotFill)("__experimentalBlockSettingsMenuFirstItem"),Pu=xu.Fill,Tu=xu.Slot;Pu.Slot=Tu;var Nu=Pu;function Du(e){var t=e.clientIds,n=e.isGroupable,r=e.isUngroupable,o=e.blocksSelection,c=e.groupingBlockName,i=e.onClose,a=void 0===i?function(){}:i,s=Object(m.useDispatch)(pr).replaceBlocks;return n||r?Object(l.createElement)(l.Fragment,null,n&&Object(l.createElement)(v.MenuItem,{onClick:function(){var e;(e=Object(p.switchToBlockType)(o,c))&&s(t,e),a()}},Object(y._x)("Group","verb")),r&&Object(l.createElement)(v.MenuItem,{onClick:function(){var e;(e=o[0].innerBlocks).length&&s(t,e),a()}},Object(y._x)("Ungroup","Ungrouping blocks from within a Group block back into individual blocks within the Editor "))):null}function Au(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Ru(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Au(Object(n),!0).forEach((function(t){Object(a.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Au(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Lu=Object(v.createSlotFill)("BlockSettingsMenuControls"),Mu=Lu.Fill,Fu=Lu.Slot;Mu.Slot=function(e){var t,n=e.fillProps,r=e.clientIds,o=void 0===r?null:r,c=Object(m.useSelect)((function(e){var t=e(pr),n=t.getBlocksByClientId,r=t.getSelectedBlockClientIds,c=null!==o?o:r();return Object(d.map)(Object(d.compact)(n(c)),(function(e){return e.name}))}),[o]),a={clientIds:(t=Object(m.useSelect)((function(e){var t,n=e(pr),r=n.getBlockRootClientId,o=n.getBlocksByClientId,c=n.canInsertBlockType,i=n.getSelectedBlockClientIds,a=e(p.store).getGroupingBlockName,l=i(),s=a(),u=c(s,null!=l&&l.length?r(l[0]):void 0),d=o(l),b=1===d.length&&(null===(t=d[0])||void 0===t?void 0:t.name)===s;return{clientIds:l,isGroupable:u&&d.length&&!b,isUngroupable:b&&!!d[0].innerBlocks.length,blocksSelection:d,groupingBlockName:s}}),[])).clientIds,isGroupable:t.isGroupable,isUngroupable:t.isUngroupable,blocksSelection:t.blocksSelection,groupingBlockName:t.groupingBlockName},s=a.isGroupable||a.isUngroupable;return Object(l.createElement)(Fu,{fillProps:Ru(Ru({},n),{},{selectedBlocks:c})},(function(e){if((null==e?void 0:e.length)>0||s)return Object(l.createElement)(v.MenuGroup,null,e,Object(l.createElement)(Du,Object(i.a)({},a,{onClose:null==n?void 0:n.onClose})))}))};var Vu=Mu,Hu={className:"block-editor-block-settings-menu__popover",position:"bottom right",isAlternate:!0},zu=function(e){var t=e.clientIds,n=e.__experimentalSelectBlock,r=e.children,o=Object(j.a)(e,["clientIds","__experimentalSelectBlock","children"]),c=Object(d.castArray)(t),a=c.length,s=c[0],u=Object(m.useSelect)((function(e){var t=e(nl.store).getShortcutRepresentation;return{duplicate:t("core/block-editor/duplicate"),remove:t("core/block-editor/remove"),insertAfter:t("core/block-editor/insert-after"),insertBefore:t("core/block-editor/insert-before")}}),[]),b=Object(l.useCallback)(n?function(){var e=Object(rl.a)(Pt.a.mark((function e(t){var r;return Pt.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,t;case 2:(r=e.sent)&&r[0]&&n(r[0]);case 4:case"end":return e.stop()}}),e)})));return function(_x){return e.apply(this,arguments)}}():d.noop,[n]),f=1===a?Object(y.__)("Remove block"):Object(y.__)("Remove blocks");return Object(l.createElement)(Su,{clientIds:t,__experimentalUpdateSelection:!n},(function(e){var n=e.canDuplicate,c=e.canInsertDefaultBlock,m=e.isLocked,g=e.onDuplicate,O=e.onInsertAfter,h=e.onInsertBefore,j=e.onRemove,k=e.onCopy,_=e.onMoveTo,E=e.blocks;return Object(l.createElement)(v.DropdownMenu,Object(i.a)({icon:ol.a,label:Object(y.__)("Options"),className:"block-editor-block-settings-menu",popoverProps:Hu,noIcons:!0},o),(function(e){var o=e.onClose;return Object(l.createElement)(l.Fragment,null,Object(l.createElement)(v.MenuGroup,null,Object(l.createElement)(Nu.Slot,{fillProps:{onClose:o}}),1===a&&Object(l.createElement)(Iu,{clientId:s}),Object(l.createElement)(v.ClipboardButton,{text:function(){return Object(p.serialize)(E)},role:"menuitem",className:"components-menu-item__button",onCopy:k},Object(y.__)("Copy")),n&&Object(l.createElement)(v.MenuItem,{onClick:Object(d.flow)(o,g,b),shortcut:u.duplicate},Object(y.__)("Duplicate")),c&&Object(l.createElement)(l.Fragment,null,Object(l.createElement)(v.MenuItem,{onClick:Object(d.flow)(o,h),shortcut:u.insertBefore},Object(y.__)("Insert before")),Object(l.createElement)(v.MenuItem,{onClick:Object(d.flow)(o,O),shortcut:u.insertAfter},Object(y.__)("Insert after"))),!m&&Object(l.createElement)(v.MenuItem,{onClick:Object(d.flow)(o,_)},Object(y.__)("Move to")),1===a&&Object(l.createElement)(Bu,{clientId:s,onToggle:o})),Object(l.createElement)(Vu.Slot,{fillProps:{onClose:o},clientIds:t}),"function"==typeof r?r({onClose:o}):l.Children.map((function(e){return Object(l.cloneElement)(e,{onClose:o})})),Object(l.createElement)(v.MenuGroup,null,!m&&Object(l.createElement)(v.MenuItem,{onClick:Object(d.flow)(o,j,b),shortcut:u.remove},f)))}))}))},Gu=function(e){var t=e.clientIds,n=Object(j.a)(e,["clientIds"]);return Object(l.createElement)(v.ToolbarGroup,null,Object(l.createElement)(v.ToolbarItem,null,(function(e){return Object(l.createElement)(zu,Object(i.a)({clientIds:t,toggleProps:e},n))})))};function Uu(e){var t=e.hideDragHandle,n=Object(m.useSelect)((function(e){var t=e(pr),n=t.getBlockName,r=t.getBlockMode,o=t.getSelectedBlockClientIds,c=t.isBlockValid,i=t.getBlockRootClientId,a=t.getSettings,l=o(),s=l[0],u=i(s),d=a();return{blockClientIds:l,blockClientId:s,blockType:s&&Object(p.getBlockType)(n(s)),hasFixedToolbar:d.hasFixedToolbar,hasReducedUI:d.hasReducedUI,rootClientId:u,isValid:l.every((function(e){return c(e)})),isVisual:l.every((function(e){return"visual"===r(e)}))}}),[]),r=n.blockClientIds,o=n.blockClientId,c=n.blockType,a=n.hasFixedToolbar,s=n.hasReducedUI,d=n.isValid,f=n.isVisual,g=Object(m.useDispatch)(pr).toggleBlockHighlight,O=Object(l.useRef)(),h=iu({ref:O,onChange:function(e){e&&s||g(o,e)}}),j=h.showMovers,k=h.gestures,y=Object(b.useViewportMatch)("medium","<")||a;if(c&&!Object(p.hasBlockSupport)(c,"__experimentalToolbar",!0))return null;var _=y||j;if(0===r.length)return null;var E=d&&f,w=r.length>1,C=u()("block-editor-block-toolbar",_&&"is-showing-movers");return Object(l.createElement)("div",{className:C},!w&&!y&&Object(l.createElement)(au,{clientIds:r}),Object(l.createElement)("div",Object(i.a)({ref:O},k),(E||w)&&Object(l.createElement)(v.ToolbarGroup,{className:"block-editor-block-toolbar__block-controls"},Object(l.createElement)(yu,{clientIds:r}),Object(l.createElement)(tu,{clientIds:r,hideDragHandle:t||s}))),E&&Object(l.createElement)(l.Fragment,null,Object(l.createElement)(jr.Slot,{bubblesVirtually:!0,className:"block-editor-block-toolbar__slot"}),Object(l.createElement)(tl.Slot,{bubblesVirtually:!0,className:"block-editor-block-toolbar__slot"})),Object(l.createElement)(Gu,{clientIds:r}))}var Wu=function(e){var t=e.focusOnMount,n=Object(j.a)(e,["focusOnMount"]),r=Object(m.useSelect)((function(e){var t=e(pr),n=t.getBlockName,r=t.getBlockParents,o=t.getSelectedBlockClientIds,c=e(p.store).getBlockType,i=o()[0];return{blockType:i&&c(n(i)),hasParents:r(i).length}}),[]),o=r.blockType,c=r.hasParents;if(o&&!Object(p.hasBlockSupport)(o,"__experimentalToolbar",!0))return null;var a=u()("block-editor-block-contextual-toolbar",{"has-parent":c});return Object(l.createElement)("div",{className:"block-editor-block-contextual-toolbar-wrapper"},Object(l.createElement)(Js,Object(i.a)({focusOnMount:t,className:a
54
- /* translators: accessibility text for the block toolbar */,"aria-label":Object(y.__)("Block tools")},n),Object(l.createElement)(Uu,null)))};function Ku(e){var t=e(pr),n=t.isNavigationMode,r=t.isMultiSelecting,o=t.hasMultiSelection,c=t.isTyping,i=t.isCaretWithinFormattedText,a=t.getSettings,l=t.getLastMultiSelectedBlockClientId;return{isNavigationMode:n(),isMultiSelecting:r(),isTyping:c(),isCaretWithinFormattedText:i(),hasMultiSelection:o(),hasFixedToolbar:a().hasFixedToolbar,lastClientId:l()}}function qu(e){var t=e.clientId,n=e.rootClientId,r=e.isValid,o=e.isEmptyDefaultBlock,c=e.capturingClientId,i=Object(m.useSelect)(Ku,[]),a=i.isNavigationMode,s=i.isMultiSelecting,d=i.isTyping,f=i.isCaretWithinFormattedText,p=i.hasMultiSelection,g=i.hasFixedToolbar,O=i.lastClientId,h=Object(b.useViewportMatch)("medium"),j=Object(l.useState)(!1),k=Object(To.a)(j,2),y=k[0],_=k[1],E=Object(l.useState)(!1),w=Object(To.a)(E,2),C=w[0],S=w[1],B=Object(l.useContext)(Xu),I=Object(m.useDispatch)(pr).stopTyping,x=!d&&!a&&o&&r,P=a,T=!a&&!g&&h&&!x&&!s&&(!d||f),N=!(a||T||g||o);Object(nl.useShortcut)("core/block-editor/focus-toolbar",Object(l.useCallback)((function(){_(!0),I(!0)}),[]),{bindGlobal:!0,eventName:"keydown",isDisabled:!N}),Object(l.useEffect)((function(){T||_(!1)}),[T]);var D=Object(l.useRef)();if(Object(l.useEffect)((function(){D.current=void 0}),[t]),!(P||T||y||x))return null;var A=B[t];if(!A)return null;var R=A.ownerDocument;c&&(A=Jo(c,R));var L=A;if(p){var M=B[O];if(!M)return null;L={top:A,bottom:M}}var F=x?"top left right":"top right left",V=x?void 0:R.defaultView.frameElement||Object(il.getScrollContainer)(A)||R.body;return Object(l.createElement)(v.Popover,{noArrow:!0,animate:!1,position:F,focusOnMount:!1,anchorRef:L,className:"block-editor-block-list__block-popover",__unstableStickyBoundaryElement:V,__unstableSlotName:"block-toolbar",__unstableBoundaryParent:!0,__unstableObserveElement:A,shouldAnchorIncludePadding:!0},(T||y)&&Object(l.createElement)("div",{onFocus:function(){S(!0)},onBlur:function(){S(!1)},tabIndex:-1,className:u()("block-editor-block-list__block-popover-inserter",{"is-visible":C})},Object(l.createElement)(Rs,{clientId:t,rootClientId:n,__experimentalIsQuick:!0})),(T||y)&&Object(l.createElement)(Wu,{focusOnMount:y,__experimentalInitialIndex:D.current,__experimentalOnIndexChange:function(e){D.current=e}}),P&&Object(l.createElement)(Qs,{clientId:t,rootClientId:n,blockElement:A}),x&&Object(l.createElement)("div",{className:"block-editor-block-list__empty-block-inserter"},Object(l.createElement)(Rs,{position:"bottom right",rootClientId:n,clientId:t,__experimentalIsQuick:!0})))}function $u(e){var t=e(pr),n=t.getSelectedBlockClientId,r=t.getFirstMultiSelectedBlockClientId,o=t.getBlockRootClientId,c=t.__unstableGetBlockWithoutInnerBlocks,i=t.getBlockParents,a=t.__experimentalGetBlockListSettingsForBlocks,l=n()||r();if(l){var s,u=c(l)||{},b=u.name,f=u.attributes,m=void 0===f?{}:f,v=u.isValid,g=i(l),O=a(g),h=Object(d.findIndex)(O,["__experimentalCaptureToolbars",!0]);return-1!==h&&(s=g[h]),{clientId:l,rootClientId:o(l),name:b,isValid:v,isEmptyDefaultBlock:b&&Object(p.isUnmodifiedDefaultBlock)({name:b,attributes:m}),capturingClientId:s}}}function Yu(){var e=Object(m.useSelect)($u,[]);if(!e)return null;var t=e.clientId,n=e.rootClientId,r=e.name,o=e.isValid,c=e.isEmptyDefaultBlock,i=e.capturingClientId;return r?Object(l.createElement)(qu,{clientId:t,rootClientId:n,isValid:o,isEmptyDefaultBlock:c,capturingClientId:i}):null}var Xu=Object(l.createContext)(),Qu=Object(l.createContext)();function Zu(e){var t=e.className,n=Object(l.useRef)(),r=Object(l.useState)({}),o=Object(To.a)(r,2),c=o[0],i=o[1],a=function(e){var t=Object(l.useState)(!1),n=Object(To.a)(t,2),r=n[0],o=n[1],c=Object(l.useState)(!1),i=Object(To.a)(c,2),a=i[0],s=i[1],u=Object(l.useState)(null),d=Object(To.a)(u,2),b=d[0],f=d[1],p=Object(m.useSelect)((function(e){var t=e(pr),n=t.isMultiSelecting,r=t.isBlockInsertionPointVisible,o=t.getBlockInsertionPoint,c=t.getBlockOrder,i=t.getBlockListSettings,a=o(),l=c(a.rootClientId);return{getBlockListSettings:i,isMultiSelecting:n(),isInserterVisible:r(),selectedClientId:l[a.index-1],selectedRootClientId:a.rootClientId}}),[]),v=p.isMultiSelecting,g=p.isInserterVisible,O=p.selectedClientId,h=p.selectedRootClientId,j=p.getBlockListSettings,k=Object(l.useCallback)((function(e){var t;if(e.target.classList.contains("block-editor-block-list__layout")){var n;e.target.classList.contains("is-root-container")||(n=(e.target.getAttribute("data-block")?e.target:e.target.closest("[data-block]")).getAttribute("data-block"));var c=(null===(t=j(n))||void 0===t?void 0:t.orientation)||"vertical",i=e.target.getBoundingClientRect(),a=e.clientY-i.top,l=e.clientX-i.left,s=Array.from(e.target.children),u=s.find((function(e){return"vertical"===c&&e.offsetTop>a||"horizontal"===c&&e.offsetLeft>l})),d=u?s[s.indexOf(u)-1]:s[s.length-1];if(d&&(d.id||(d=d.firstElementChild))){var b=d.id.slice("block-".length);if(b){var p=d.getBoundingClientRect();"horizontal"===c&&(e.clientY>p.bottom||e.clientY<p.top)||"vertical"===c&&(e.clientX>p.right||e.clientX<p.left)?r&&o(!1):(o(!0),f(b))}}}else r&&o(!1)}),[r,o,f]),y=!a&&!v;return Object(l.useEffect)((function(){if(y)return e.current.addEventListener("mousemove",k),function(){e.current.removeEventListener("mousemove",k)}}),[y,k]),!v&&(r||a||g)&&Object(l.createElement)(Ys,{clientId:g?O:b,selectedRootClientId:h,isInserterShown:r,isInserterForced:a,setIsInserterForced:function(e){s(e),e||o(e)},containerRef:e,showInsertionPoint:g})}(n);return Object(l.createElement)(Xu.Provider,{value:c},a,Object(l.createElement)(Yu,null),Object(l.createElement)("div",{ref:n,className:u()("block-editor-block-list__layout is-root-container",t)},Object(l.createElement)(Qu.Provider,{value:i},Object(l.createElement)(ed,{wrapperRef:n}))))}function Ju(e){var t=e.placeholder,n=e.rootClientId,r=e.renderAppender,o=e.__experimentalAppenderTagName,c=e.wrapperRef,i=Object(m.useSelect)((function(e){var t,r=e(pr),o=r.getBlockOrder,c=r.getBlockListSettings,i=r.getSettings,a=r.getSelectedBlockClientId,l=r.getMultiSelectedBlockClientIds,s=r.hasMultiSelection,u=r.getGlobalBlockCount,d=r.isTyping,b=(0,r.__experimentalGetActiveBlockIdByBlockNames)(i().__experimentalSpotlightEntityBlocks);return{blockClientIds:o(n),selectedBlockClientId:a(),multiSelectedBlockClientIds:l(),orientation:null===(t=c(n))||void 0===t?void 0:t.orientation,hasMultiSelection:s(),enableAnimation:!d()&&u()<=200,activeEntityBlockId:b}}),[n]),s=i.blockClientIds,d=i.selectedBlockClientId,b=i.multiSelectedBlockClientIds,f=i.orientation,p=i.hasMultiSelection,g=i.enableAnimation,O=i.activeEntityBlockId,h=function(e){var t=e.element,n=e.rootClientId,r=void 0===n?"":n,o=Object(l.useState)(null),c=Object(To.a)(o,2),i=c[0],s=c[1],u=Object(m.useSelect)((function(e){var t,n=e(pr),o=n.getBlockListSettings;return{isLockedAll:"all"===(0,n.getTemplateLock)(r),orientation:null===(t=o(r))||void 0===t?void 0:t.orientation}}),[r]),d=u.isLockedAll,b=u.orientation,f=Us(r,i),p=Object(v.__unstableUseDropZone)(function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?qs(Object(n),!0).forEach((function(t){Object(a.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):qs(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({element:t,isDisabled:d,withPosition:!0},f)).position;if(Object(l.useEffect)((function(){if(p){var e=function(e,t,n){var r,o,c="horizontal"===n?["left","right"]:["top","bottom"];return e.forEach((function(n,i){if(n.classList.contains("wp-block")){var a=n.getBoundingClientRect(),l=Ks(t,a,c),s=Object(To.a)(l,2),u=s[0],d=s[1];if(void 0===o||u<o){var b="bottom"===d||"right"===d,f=b?1:0,p=b&&e[i+1]&&e[i+1].classList.contains("is-dragging");o=u,r=i+(f+=p?1:0)}}})),r}(Array.from(t.current.children),p,b);s(void 0===e?0:e)}}),[p]),p)return i}({element:c,rootClientId:n}),j=h===s.length;return Object(l.createElement)(l.Fragment,null,s.map((function(e,t){var r=p?b.includes(e):d===e,o=h===t;return Object(l.createElement)(m.AsyncModeProvider,{key:e,value:!r},Object(l.createElement)(yd,{rootClientId:n,clientId:e,index:t,enableAnimation:g,className:u()({"is-drop-target":o,"is-dropping-horizontally":o&&"horizontal"===f,"has-active-entity":O}),activeEntityBlockId:O}))})),s.length<1&&t,Object(l.createElement)(Vs,{tagName:o,rootClientId:n,renderAppender:r,className:u()({"is-drop-target":j,"is-dropping-horizontally":j&&"horizontal"===f})}))}function ed(e){return Object(l.createElement)(m.AsyncModeProvider,{value:!1},Object(l.createElement)(Ju,e))}function td(e,t){var n=function(e){return Object(m.useSelect)((function(t){var n=t(pr),r=n.getSelectedBlocksInitialCaretPosition,o=n.isMultiSelecting,c=n.isNavigationMode;if((0,n.isBlockSelected)(e)&&!o()&&!c())return r()||0}),[e])}(t);Object(l.useEffect)((function(){if(void 0!==n){var t=e.current.ownerDocument;if(!t.activeElement||!ec(e.current,t.activeElement)){var r=il.focus.tabbable.find(e.current).filter((function(t){return Object(il.isTextField)(t)&&ec(e.current,t)&&!t.closest(".block-list-appender")})),o=-1===n,c=(o?d.last:d.first)(r)||e.current;Object(il.placeCaretAtHorizontalEdge)(c,o)}}}),[n])}function nd(e){var t=Object(l.useState)(!1),n=Object(To.a)(t,2),r=n[0],o=n[1],c=Object(m.useSelect)((function(e){var t=e(pr),n=t.isNavigationMode,r=t.getSettings;return{isNavigationMode:n(),isOutlineMode:r().outlineMode}}),[]),i=c.isNavigationMode,a=c.isOutlineMode;return Object(l.useEffect)((function(){function t(t,n){function r(e){e.defaultPrevented||(e.preventDefault(),o(n))}return e.current.addEventListener(t,r),function(){e.current.removeEventListener(t,r)}}return r?t("mouseout",!1):a||i?t("mouseover",!0):void 0}),[i,a,r,o]),r}function rd(e){return Object(m.useSelect)((function(t){var n=t(pr),r=n.hasBlockMovingClientId,o=n.canInsertBlockType,c=n.getBlockName,i=n.getBlockRootClientId;if((0,n.isBlockSelected)(e)){var a=r();if(a)return u()("is-block-moving-mode",{"can-insert-moving-block":o(c(a),i(e))})}}),[e])}var od=Object(l.forwardRef)((function(e,t){var n=e.selectedClientId,r=e.isReverse,o=e.containerRef,c=e.noCapture,i=e.hasMultiSelection,a=e.multiSelectionContainer,s=Object(m.useSelect)((function(e){return e(pr).isNavigationMode()})),u=Object(m.useDispatch)(pr).setNavigationMode;return Object(l.createElement)("div",{ref:t,tabIndex:s?void 0:"0",onFocus:function(){if(c.current)c.current=null;else if(n){var e=Jo(n,t.current.ownerDocument);if(r){var l=il.focus.tabbable.find(e);(Object(d.last)(l)||e).focus()}else e.focus()}else{if(i)return void a.current.focus();u(!0);var s=il.focus.tabbable.find(o.current);s.length&&(r?Object(d.last)(s).focus():Object(d.first)(s).focus())}},style:{position:"fixed"}})}));function cd(e,t){for(var n="start"===t?"firstChild":"lastChild",r="start"===t?"nextSibling":"previousSibling";e[n];)for(e=e[n];e.nodeType===e.TEXT_NODE&&/^[ \t\n]*$/.test(e.data)&&e[r];)e=e[r];return e}function id(e){var t=e(pr),n=t.isSelectionEnabled,r=t.isMultiSelecting,o=t.getMultiSelectedBlockClientIds,c=t.hasMultiSelection,i=t.getBlockParents,a=t.getSelectedBlockClientId;return{isSelectionEnabled:n(),isMultiSelecting:r(),multiSelectedBlockClientIds:o(),hasMultiSelection:c(),getBlockParents:i,selectedBlockClientId:a()}}function ad(e,t){Array.from(e.querySelectorAll(".rich-text")).forEach((function(e){t?e.setAttribute("contenteditable",!0):e.removeAttribute("contenteditable")}))}var ld=Object(l.createContext)();function sd(e,t,n,r){var o,c=il.focus.focusable.find(n);return t&&(c=Object(d.reverse)(c)),c=c.slice(c.indexOf(e)+1),r&&(o=e.getBoundingClientRect()),Object(d.find)(c,(function t(n,c,i){if(!il.focus.tabbable.isTabbableIndex(n))return!1;if(r){var a=n.getBoundingClientRect();if(a.left>=o.right||a.right<=o.left)return!1}if(Object(il.isTextField)(n))return!0;if(!n.classList.contains("block-editor-block-list__block"))return!1;if((l=n).classList.contains("block-editor-block-list__layout")||l.querySelector(".block-editor-block-list__layout"))return!0;var l;if(n.contains(e))return!1;for(var s,u=1;(s=i[c+u])&&n.contains(s);u++)if(t(s,c+u,i))return!1;return!0}))}function ud(e){var t=e(pr),n=t.getSelectedBlockClientId,r=t.getMultiSelectedBlocksStartClientId,o=t.getMultiSelectedBlocksEndClientId,c=t.getPreviousBlockClientId,i=t.getNextBlockClientId,a=t.getFirstMultiSelectedBlockClientId,l=t.getLastMultiSelectedBlockClientId,s=t.hasMultiSelection,u=t.getBlockOrder,b=t.isNavigationMode,f=t.isSelectionEnabled,p=t.getBlockSelectionStart,m=t.isMultiSelecting,v=t.getSettings,g=n(),O=r(),h=o(),j=u();return{selectedBlockClientId:g,selectionStartClientId:O,selectionBeforeEndClientId:c(h||g),selectionAfterEndClientId:i(h||g),selectedFirstClientId:a(),selectedLastClientId:l(),hasMultiSelection:s(),firstBlock:Object(d.first)(j),lastBlock:Object(d.last)(j),isNavigationMode:b(),isSelectionEnabled:f(),blockSelectionStart:p(),isMultiSelecting:m(),keepCaretInsideBlock:v().keepCaretInsideBlock}}function dd(e){var t=e.children,n=Object(l.useRef)(),r=Object(l.useRef)(),o=Object(l.useRef)(),c=Object(l.useRef)(),i=Object(l.useRef)(),a=Object(l.useRef)(),s=Object(l.useRef)(),b=function(e){var t=Object(m.useSelect)(id,[]),n=t.isSelectionEnabled,r=t.isMultiSelecting,o=t.multiSelectedBlockClientIds,c=t.hasMultiSelection,i=t.getBlockParents,a=t.selectedBlockClientId,s=Object(m.useDispatch)(pr),u=s.startMultiSelect,d=s.stopMultiSelect,b=s.multiSelect,f=s.selectBlock,p=Object(l.useRef)(),v=Object(l.useRef)(),g=Object(l.useRef)();Object(l.useEffect)((function(){var t=e.current.ownerDocument,n=t.defaultView;if(c&&!r){var i=o.length;if(!(i<2)){var l=o[0],s=o[i-1],u=Jo(l,t),d=Jo(s,t),b=n.getSelection(),f=t.createRange();u=cd(u,"start"),d=cd(d,"end"),f.setStartBefore(u),f.setEndAfter(d),b.removeAllRanges(),b.addRange(f)}}else{if(!a||r)return;var p=n.getSelection();if(p.rangeCount&&!p.isCollapsed){var m=Jo(a,t),v=p.getRangeAt(0),g=v.startContainer,O=v.endContainer;!m||m.contains(g)&&m.contains(O)||p.removeAllRanges()}}}),[c,r,o,f,a]);var O=Object(l.useCallback)((function(t){var n=t.isSelectionEnd,r=e.current.ownerDocument.defaultView.getSelection();if(r.rangeCount&&!r.isCollapsed){var o=tc(r.focusNode);if(v.current===o){if(f(o),n&&(ad(e.current,!0),r.rangeCount)){var c=r.getRangeAt(0).commonAncestorContainer;g.current.contains(c)&&g.current.focus()}}else{var a=[].concat(Object(k.a)(i(v.current)),[v.current]),l=[].concat(Object(k.a)(i(o)),[o]),s=Math.min(a.length,l.length)-1;b(a[s],l[s])}}else ad(e.current,!0)}),[f,i,b]),h=Object(l.useCallback)((function(){var t=e.current.ownerDocument,n=t.defaultView;t.removeEventListener("selectionchange",O),n.removeEventListener("mouseup",h),p.current=n.requestAnimationFrame((function(){O({isSelectionEnd:!0}),d()}))}),[O,d]);return Object(l.useEffect)((function(){var t=e.current.ownerDocument,n=t.defaultView;return function(){t.removeEventListener("selectionchange",O),n.removeEventListener("mouseup",h),n.cancelAnimationFrame(p.current)}}),[O,h]),Object(l.useCallback)((function(t){if(n){var r=e.current.ownerDocument,o=r.defaultView;v.current=t,g.current=r.activeElement,u(),r.addEventListener("selectionchange",O),o.addEventListener("mouseup",h),ad(e.current,!1)}}),[n,u,h])}(n),f=Object(m.useSelect)(ud,[]),p=f.selectedBlockClientId,v=f.selectionStartClientId,g=f.selectionBeforeEndClientId,O=f.selectionAfterEndClientId,h=f.selectedFirstClientId,j=f.selectedLastClientId,_=f.hasMultiSelection,E=f.firstBlock,w=f.lastBlock,C=f.isNavigationMode,S=f.isSelectionEnabled,B=f.blockSelectionStart,I=f.isMultiSelecting,x=f.keepCaretInsideBlock,P=Object(m.useDispatch)(pr),T=P.multiSelect,N=P.selectBlock,D=P.setNavigationMode;function A(e){var t=e?g:O;t&&T(v||p,t)}function R(e){var t=e?h:j;t&&N(t)}Object(l.useEffect)((function(){_&&!I&&c.current.focus()}),[_,I]);var L=u()("block-editor-writing-flow",{"is-navigate-mode":C});return Object(l.createElement)(ld.Provider,{value:b},Object(l.createElement)(od,{ref:r,selectedClientId:p,containerRef:n,noCapture:a,hasMultiSelection:_,multiSelectionContainer:c}),Object(l.createElement)("div",{ref:c,tabIndex:_?"0":void 0,"aria-label":_?Object(y.__)("Multiple selected blocks"):void 0,style:{position:"fixed"},onKeyDown:function(e){var t=e.keyCode,n=e.shiftKey,c=t===Nc.UP,i=t===Nc.DOWN,l=t===Nc.LEFT,s=t===Nc.RIGHT,u=c||l,d=l||s||c||i;t===Nc.TAB?(a.current=!0,n?r.current.focus():o.current.focus()):d&&((n?A:R)(u),e.preventDefault())}}),Object(l.createElement)("div",{ref:n,className:L,onKeyDown:function(e){var t=e.keyCode,c=e.target;if(n.current.contains(c)){var l=t===Nc.UP,u=t===Nc.DOWN,b=t===Nc.LEFT,f=t===Nc.RIGHT,m=t===Nc.TAB,v=t===Nc.ESCAPE,h=l||b,j=b||f,k=l||u,y=j||k,_=e.shiftKey,C=_||e.ctrlKey||e.altKey||e.metaKey,S=k?il.isVerticalEdge:il.isHorizontalEdge,B=n.current.ownerDocument,I=B.defaultView;if(p)if(m){var P=Jo(p,B);if(_){if(c===P)return a.current=!0,void r.current.focus()}else{var N=il.focus.tabbable.find(P);if(c===(Object(d.last)(N)||P))return a.current=!0,void o.current.focus()}}else v&&D(!0);if(k?s.current||(s.current=Object(il.computeCaretRect)(I)):s.current=null,!y)return Nc.isKeyboardEvent.primary(e)&&(i.current=Object(il.isEntirelySelected)(c)),void(Nc.isKeyboardEvent.primary(e,"a")&&((c.isContentEditable?i.current:Object(il.isEntirelySelected)(c))&&(T(E,w),e.preventDefault()),i.current=!0));if(!e.nativeEvent.defaultPrevented&&function(e,t,n){if((t===Nc.UP||t===Nc.DOWN)&&!n)return!0;var r=e.tagName;return"INPUT"!==r&&"TEXTAREA"!==r}(c,t,C)){var R,L="rtl"===(R=c).ownerDocument.defaultView.getComputedStyle(R).direction?!h:h;if(_)(h&&g||!h&&O)&&function(e,t){var r,o,c=sd(e,t,n.current);return!(c&&(r=e,o=c,r.closest(".block-editor-block-list__block")===o.closest(".block-editor-block-list__block")))}(c,h)&&S(c,h)&&(A(h),e.preventDefault());else if(k&&Object(il.isVerticalEdge)(c,h)&&!x){var M=sd(c,h,n.current,!0);M&&(Object(il.placeCaretAtVerticalEdge)(M,h,s.current),e.preventDefault())}else if(j&&I.getSelection().isCollapsed&&Object(il.isHorizontalEdge)(c,L)&&!x){var F=sd(c,L,n.current);Object(il.placeCaretAtHorizontalEdge)(F,L),e.preventDefault()}}}},onMouseDown:function(e){s.current=null;var t=e.target.ownerDocument;if(C&&p&&ec(Jo(p,t),e.target)&&D(!1),S&&0===e.button){var n=tc(e.target);n&&(e.shiftKey?B!==n&&(T(B,n),e.preventDefault()):_&&N(n))}}},t),Object(l.createElement)(od,{ref:o,selectedClientId:p,containerRef:n,noCapture:a,hasMultiSelection:_,multiSelectionContainer:c,isReverse:!0}))}function bd(e,t){var n=Object(l.useContext)(ld),r=Object(m.useSelect)((function(e){var n=e(pr),r=n.isBlockSelected,o=n.getBlockRootClientId,c=n.getBlockIndex;return{isSelected:r(t),rootClientId:o(t),index:c(t)}}),[t]),o=r.isSelected,c=r.rootClientId,i=r.index,a=Object(m.useDispatch)(pr),s=a.insertDefaultBlock,u=a.removeBlock,d=a.selectBlock;Object(l.useEffect)((function(){if(!o){function r(n){ec(e.current,n.target)&&d(t)}return e.current.addEventListener("focusin",r),function(){e.current.removeEventListener("focusin",r)}}function a(n){var r=n.keyCode,o=n.target;r!==Nc.ENTER&&r!==Nc.BACKSPACE&&r!==Nc.DELETE||o!==e.current||Object(il.isTextField)(o)||(n.preventDefault(),r===Nc.ENTER?s({},c,i+1):u(t))}function l(e){1===e.buttons&&n(t)}function b(e){e.preventDefault()}return e.current.addEventListener("keydown",a),e.current.addEventListener("mouseleave",l),e.current.addEventListener("dragstart",b),function(){e.current.removeEventListener("mouseleave",l),e.current.removeEventListener("keydown",a),e.current.removeEventListener("dragstart",b)}}),[o,c,i,n,s,u,d])}function fd(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function pd(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?fd(Object(n),!0).forEach((function(t){Object(a.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):fd(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function md(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.__unstableIsHtml,r=Object(l.useRef)(),o=e.ref||r,c=Object(l.useContext)(Qu),i=Object(l.useContext)(Od),s=i.clientId,b=i.isSelected,f=i.isFirstMultiSelected,p=i.isLastMultiSelected,m=i.isPartOfMultiSelection,v=i.enableAnimation,g=i.index,O=i.className,h=i.name,j=i.mode,k=i.blockTitle,_=i.wrapperProps,E=void 0===_?{}:_;Object(l.useEffect)((function(){if(b||f||p){var e=o.current;return c((function(t){return pd(pd({},t),{},Object(a.a)({},s,e))})),function(){c((function(e){return Object(d.omit)(e,s)}))}}}),[b,f,p]),Object(l.useEffect)((function(){var e=o.current;c((function(t){return t[s]&&t[s]!==e?pd(pd({},t),{},Object(a.a)({},s,e)):t}))}));// translators: %s: Type of block (i.e. Text, Image etc)
55
- var w=Object(y.sprintf)(Object(y.__)("Block: %s"),k);td(o,s),bd(o,s),sl(o,b||m,b||f,v,g);var C=nd(o),S=rd(s),B="html"!==j||n?"":"-visual";return pd(pd(pd({},E),e),{},{ref:o,id:"block-".concat(s).concat(B),tabIndex:0,role:"group","aria-label":w,"data-block":s,"data-type":h,"data-title":k,className:u()(O,e.className,E.className,S,{"is-hovered":C}),style:pd(pd({},E.style),e.style)})}function vd(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function gd(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?vd(Object(n),!0).forEach((function(t){Object(a.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):vd(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}md.save=p.__unstableGetBlockProps;var Od=Object(l.createContext)();function hd(e){var t=e.children,n=e.isHtml,r=Object(j.a)(e,["children","isHtml"]);return Object(l.createElement)("div",md(r,{__unstableIsHtml:n}),t)}var jd=Object(m.withSelect)((function(e,t){var n=t.clientId,r=t.rootClientId,o=e(pr),c=o.isBlockSelected,i=o.isAncestorMultiSelected,a=o.isBlockMultiSelected,l=o.isFirstMultiSelectedBlock,s=o.getLastMultiSelectedBlockClientId,u=o.isTyping,d=o.getBlockMode,b=o.isSelectionEnabled,f=o.hasSelectedInnerBlock,p=o.getTemplateLock,m=o.__unstableGetBlockWithoutInnerBlocks,v=o.getMultiSelectedBlockClientIds,g=m(n),O=c(n),h=p(r),j=f(n,!0),k=g||{},y=k.name,_=k.attributes,E=k.isValid,w=l(n);return{isMultiSelected:a(n),isPartOfMultiSelection:a(n)||i(n),isFirstMultiSelected:w,isLastMultiSelected:s()===n,multiSelectedClientIds:w?v():void 0,isTypingWithinBlock:(O||j)&&u(),mode:d(n),isSelectionEnabled:b(),isLocked:!!h,block:g,name:y,attributes:_,isValid:E,isSelected:O,isAncestorOfSelectedBlock:j}})),kd=Object(m.withDispatch)((function(e,t,n){var r=n.select,o=e(pr),c=o.updateBlockAttributes,i=o.insertBlocks,a=o.mergeBlocks,l=o.replaceBlocks,s=o.toggleSelection,u=o.__unstableMarkLastChangeAsPersistent;return{setAttributes:function(e){var n=t.clientId,r=t.isFirstMultiSelected,o=t.multiSelectedClientIds;c(r?o:[n],e)},onInsertBlocks:function(e,n){var r=t.rootClientId;i(e,n,r)},onInsertBlocksAfter:function(e){var n=t.clientId,o=t.rootClientId,c=(0,r(pr).getBlockIndex)(n,o);i(e,c+1,o)},onMerge:function(e){var n=t.clientId,o=r(pr),c=o.getPreviousBlockClientId,i=o.getNextBlockClientId;if(e){var l=i(n);l&&a(n,l)}else{var s=c(n);s&&a(s,n)}},onReplace:function(e,n,r){e.length&&!Object(p.isUnmodifiedDefaultBlock)(e[e.length-1])&&u(),l([t.clientId],e,n,r)},toggleSelection:function(e){s(e)}}})),yd=Object(b.compose)(b.pure,jd,kd,Object(b.ifCondition)((function(e){return!!e.block})),Object(v.withFilters)("editor.BlockListBlock"))((function(e){var t,n,r,o=e.mode,c=e.isLocked,a=e.clientId,s=e.isSelected,f=e.isMultiSelected,v=e.isPartOfMultiSelection,g=e.isFirstMultiSelected,O=e.isLastMultiSelected,h=e.isTypingWithinBlock,j=e.isAncestorOfSelectedBlock,k=e.isSelectionEnabled,y=e.className,_=e.name,E=e.isValid,w=e.attributes,C=e.wrapperProps,S=e.setAttributes,B=e.onReplace,I=e.onInsertBlocksAfter,x=e.onMerge,P=e.toggleSelection,T=e.index,N=e.enableAnimation,D=e.activeEntityBlockId,A=Object(b.useViewportMatch)("medium"),R=Object(m.useSelect)((function(e){var t=e(pr),n=t.isBlockBeingDragged,r=t.isBlockHighlighted,o=t.getSettings;return{isDragging:n(a),isHighlighted:r(a),isFocusMode:o().focusMode,isOutlineMode:o().outlineMode}}),[a]),L=R.isDragging,M=R.isHighlighted,F=R.isFocusMode,V=R.isOutlineMode,H=Object(m.useDispatch)(pr).removeBlock,z=Object(l.useCallback)((function(){return H(a)}),[a]),G=Object(l.useState)(!1),U=Object(To.a)(G,2),W=U[0],K=U[1],q=Object(p.getBlockType)(_),$=q.apiVersion>1||Object(p.hasBlockSupport)(q,"lightBlockWrapper",!1),Y=_===Object(p.getUnregisteredTypeHandlerName)();q.getEditWrapperProps&&(t=C,n=q.getEditWrapperProps(w),r=gd(gd({},t),n),t&&n&&t.className&&n.className&&(r.className=u()(t.className,n.className)),t&&n&&t.style&&n.style&&(r.style=gd(gd({},t.style),n.style)),C=r);var X=$&&Object(p.hasBlockSupport)(q,"className",!0)?Object(p.getBlockDefaultClassName)(_):null,Q=$?w.className:null,Z=C&&!!C["data-align"],J=u()(X,Q,"block-editor-block-list__block",{"wp-block":!Z,"has-warning":!E||!!W||Y,"is-selected":s&&!L,"is-highlighted":M,"is-multi-selected":f,"is-reusable":Object(p.isReusableBlock)(q),"is-dragging":L,"is-typing":h,"is-focused":F&&A&&(s||j),"is-focus-mode":F&&A,"is-outline-mode":V,"has-child-selected":j&&!L,"is-active-entity":D===a},y),ee=Object(l.createElement)(Xa,{name:_,isSelected:s,attributes:w,setAttributes:S,insertBlocksAfter:c?void 0:I,onReplace:c?void 0:B,onRemove:c?void 0:z,mergeBlocks:c?void 0:x,clientId:a,isSelectionEnabled:k,toggleSelection:P});if(Z){var te={"data-align":C["data-align"]};ee=Object(l.createElement)("div",Object(i.a)({className:"wp-block"},te),ee)}var ne,re={clientId:a,isSelected:s,isFirstMultiSelected:g,isLastMultiSelected:O,isPartOfMultiSelection:v,enableAnimation:N,index:T,className:J,isLocked:c,name:_,mode:o,blockTitle:q.title,wrapperProps:Object(d.omit)(C,["data-align"])},oe=Object(l.useMemo)((function(){return re}),Object.values(re));return ne=E?"html"===o?Object(l.createElement)(l.Fragment,null,Object(l.createElement)("div",{style:{display:"none"}},ee),Object(l.createElement)(hd,{isHtml:!0},Object(l.createElement)(Al,{clientId:a}))):$?ee:Object(l.createElement)(hd,C,ee):Object(l.createElement)(hd,null,Object(l.createElement)(Il,{clientId:a}),Object(l.createElement)("div",null,Object(p.getSaveElement)(q,w))),Object(l.createElement)(Od.Provider,{value:oe},Object(l.createElement)(Tl,{onError:function(){return K(!0)}},ne),!!W&&Object(l.createElement)(hd,null,Object(l.createElement)(Pl,null)))}));function _d(e){var t=e.level;return Object(d.times)(t-1,(function(e){var n=e+2===t;return Object(l.createElement)("div",{key:e,"aria-hidden":"true",className:u()("block-editor-block-navigator-indentation",{"has-item":n})})}))}var Ed=function(e,t,n){return Object(y.sprintf)(
56
  /* translators: 1: The numerical position of the block. 2: The total number of blocks. 3. The level of nesting for the block. */
57
- Object(y.__)("Block %1$d of %2$d, Level %3$d"),e,t,n)},wd=Object(l.forwardRef)((function e(t,n){var r=t.className,o=t.block.clientId,c=t.isSelected,i=t.onClick,a=t.position,s=t.siblingBlockCount,d=t.level,f=t.tabIndex,p=t.onFocus,m=t.onDragStart,g=t.onDragEnd,O=t.draggable,h=La(o),j=Object(b.useInstanceId)(e),k="block-navigation-block-select-button__".concat(j),_=Ed(a,s,d);return Object(l.createElement)(l.Fragment,null,Object(l.createElement)(v.Button,{className:u()("block-editor-block-navigation-block-select-button",r),onClick:i,"aria-describedby":k,ref:n,tabIndex:f,onFocus:p,onDragStart:m,onDragEnd:g,draggable:O},Object(l.createElement)(_d,{level:d}),Object(l.createElement)(xa,{icon:null==h?void 0:h.icon,showColors:!0}),Object(l.createElement)(Ma,{clientId:o}),c&&Object(l.createElement)(v.VisuallyHidden,null,Object(y.__)("(selected block)"))),Object(l.createElement)("div",{className:"block-editor-block-navigation-block-select-button__description",id:k},_))}));function Cd(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Sd(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Cd(Object(n),!0).forEach((function(t){Object(a.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Cd(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Bd=function(e){return"BlockNavigationBlock-".concat(e)},Id=Object(l.forwardRef)((function e(t,n){var r=Object(b.useInstanceId)(e),o=t.block.clientId;return Object(l.createElement)(v.Slot,{name:Bd(o)},(function(e){if(!e.length)return Object(l.createElement)(wd,Object(i.a)({ref:n},t));var o=t.className,c=t.block,a=t.isSelected,s=t.position,d=t.siblingBlockCount,b=t.level,f=t.tabIndex,m=t.onFocus,g=c.name,O=Object(p.getBlockType)(g),h="block-navigation-block-slot__".concat(r),j=Ed(s,d,b),k={tabIndex:f,onFocus:m,ref:n,"aria-describedby":h};return Object(l.createElement)(l.Fragment,null,Object(l.createElement)("div",{className:u()("block-editor-block-navigation-block-slot",o)},Object(l.createElement)(xa,{icon:O.icon,showColors:!0}),l.Children.map(e,(function(e){return Object(l.cloneElement)(e,Sd(Sd({},e.props),k))})),a&&Object(l.createElement)(v.VisuallyHidden,null,Object(y.__)("(selected block)")),Object(l.createElement)("div",{className:"block-editor-block-navigation-block-slot__description",id:h},j)))}))})),xd=function(e){var t=Object(l.useContext)(Od).clientId;return Object(l.createElement)(v.Fill,Object(i.a)({},e,{name:Bd(t)}))},Pd=Object(l.forwardRef)((function(e,t){var n=e.onClick,r=e.block,o=e.isSelected,c=e.position,a=e.siblingBlockCount,s=e.level,d=Object(j.a)(e,["onClick","block","isSelected","position","siblingBlockCount","level"]),b=yl(),f=b.__experimentalFeatures,p=b.blockDropTarget,v=void 0===p?{}:p,g=r.clientId,O=Object(m.useSelect)((function(e){var t=e(pr),n=t.getBlockRootClientId,r=t.hasBlockMovingClientId,o=t.getSelectedBlockClientId;return{rootClientId:n(g)||"",blockMovingClientId:r(),selectedBlockInBlockEditor:o()}}),[g]),h=O.rootClientId,k=O.blockMovingClientId,y=O.selectedBlockInBlockEditor,_=k&&y===g,E=v.rootClientId,w=v.clientId,C=v.dropPosition,S=E===h&&w===g&&"top"===C,B=E===h&&w===g&&"bottom"===C,I=E===g&&"inside"===C,x=u()("block-editor-block-navigation-block-contents",{"is-dropping-before":S||_,"is-dropping-after":B,"is-dropping-to-inner-blocks":I});return Object(l.createElement)(eu,{clientIds:[r.clientId],elementId:"block-navigation-block-".concat(r.clientId)},(function(e){var u=e.draggable,b=e.onDragStart,p=e.onDragEnd;return f?Object(l.createElement)(Id,Object(i.a)({ref:t,className:x,block:r,onClick:n,isSelected:o,position:c,siblingBlockCount:a,level:s,draggable:u&&f,onDragStart:b,onDragEnd:p},d)):Object(l.createElement)(wd,Object(i.a)({ref:t,className:x,block:r,onClick:n,isSelected:o,position:c,siblingBlockCount:a,level:s,draggable:u&&f,onDragStart:b,onDragEnd:p},d))}))}));function Td(e,t){var n;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return Nd(e,void 0);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Nd(e,void 0):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var c,i=!0,a=!1;return{s:function(){n=e[Symbol.iterator]()},n:function(){var e=n.next();return i=e.done,e},e:function(e){a=!0,c=e},f:function(){try{i||null==n.return||n.return()}finally{if(a)throw c}}}}function Nd(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Dd(e){var t=e.block,n=e.isSelected,r=e.onClick,o=e.position,c=e.level,i=e.rowCount,a=e.siblingBlockCount,s=e.showBlockMovers,d=e.path,b=Object(l.useRef)(null),f=Object(l.useState)(!1),p=Object(To.a)(f,2),g=p[0],O=p[1],h=Object(l.useState)(!1),j=Object(To.a)(h,2),k=j[0],_=j[1],E=t.clientId,w=Object(m.useSelect)((function(e){var t=e(pr),n=t.isBlockBeingDragged,r=t.isAncestorBeingDragged,o=t.getBlockParents;return{isDragging:n(E)||r(E),blockParents:o(E)}}),[E]),C=w.isDragging,S=w.blockParents,B=Object(m.useDispatch)(pr).selectBlock,I=s&&a>0,x=g||k,P=u()("block-editor-block-navigation-block__mover-cell",{"is-visible":x}),T=yl().__experimentalFeatures,N=u()("block-editor-block-navigation-block__menu-cell",{"is-visible":x});return Object(l.useEffect)((function(){T&&n&&b.current.focus()}),[T,n]),Object(l.createElement)(dl,{className:u()({"is-selected":n,"is-dragging":C}),onMouseEnter:function(){return O(!0)},onMouseLeave:function(){return O(!1)},onFocus:function(){return _(!0)},onBlur:function(){return _(!1)},level:c,position:o,rowCount:i,path:d,id:"block-navigation-block-".concat(E),"data-block":E},Object(l.createElement)(v.__experimentalTreeGridCell,{className:"block-editor-block-navigation-block__contents-cell",colSpan:I?void 0:2,ref:b},(function(e){var i=e.ref,s=e.tabIndex,u=e.onFocus;return Object(l.createElement)("div",{className:"block-editor-block-navigation-block__contents-container"},Object(l.createElement)(Pd,{block:t,onClick:function(){return r(t.clientId)},isSelected:n,position:o,siblingBlockCount:a,level:c,ref:i,tabIndex:s,onFocus:u}))})),I&&Object(l.createElement)(l.Fragment,null,Object(l.createElement)(v.__experimentalTreeGridCell,{className:P,withoutGridItem:!0},Object(l.createElement)(v.__experimentalTreeGridItem,null,(function(e){var t=e.ref,n=e.tabIndex,r=e.onFocus;return Object(l.createElement)(hl,{orientation:"vertical",clientIds:[E],ref:t,tabIndex:n,onFocus:r})})),Object(l.createElement)(v.__experimentalTreeGridItem,null,(function(e){var t=e.ref,n=e.tabIndex,r=e.onFocus;return Object(l.createElement)(jl,{orientation:"vertical",clientIds:[E],ref:t,tabIndex:n,onFocus:r})})))),T&&Object(l.createElement)(v.__experimentalTreeGridCell,{className:N},(function(e){var t=e.ref,n=e.tabIndex,o=e.onFocus;return Object(l.createElement)(zu,{clientIds:[E],icon:ol.a,toggleProps:{ref:t,tabIndex:n,onFocus:o},disableOpenOnArrowDown:!0,__experimentalSelectBlock:r},(function(e){var t=e.onClose;return Object(l.createElement)(v.MenuGroup,null,Object(l.createElement)(v.MenuItem,{onClick:Object(rl.a)(Pt.a.mark((function e(){var n,r,o;return Pt.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!S.length){e.next=20;break}n=Td(S),e.prev=2,n.s();case 4:if((r=n.n()).done){e.next=10;break}return o=r.value,e.next=8,B(o);case 8:e.next=4;break;case 10:e.next=15;break;case 12:e.prev=12,e.t0=e.catch(2),n.e(e.t0);case 15:return e.prev=15,n.f(),e.finish(15);case 18:e.next=22;break;case 20:return e.next=22,B(null);case 22:return e.next=24,B(E);case 24:t();case 25:case"end":return e.stop()}}),e,null,[[2,12,15,18]])})))},Object(y.__)("Go to block")))}))})))}function Ad(e){var t=e.parentBlockClientId,n=e.position,r=e.level,o=e.rowCount,c=e.path,i=Object(m.useSelect)((function(e){var n=e(pr),r=n.isBlockBeingDragged,o=n.isAncestorBeingDragged;return r(t)||o(t)}),[t]),a=Object(b.useInstanceId)(Ad),s="block-navigation-appender-row__description_".concat(a),d=Object(y.sprintf)(
58
  /* translators: 1: The numerical position of the block that will be inserted. 2: The level of nesting for the block that will be inserted. */
59
- Object(y.__)("Add block at position %1$d, Level %2$d"),n,r);return Object(l.createElement)(dl,{className:u()({"is-dragging":i}),level:r,position:n,rowCount:o,path:c},Object(l.createElement)(v.__experimentalTreeGridCell,{className:"block-editor-block-navigation-appender__cell",colSpan:"3"},(function(e){var n=e.ref,o=e.tabIndex,c=e.onFocus;return Object(l.createElement)("div",{className:"block-editor-block-navigation-appender__container"},Object(l.createElement)(_d,{level:r}),Object(l.createElement)(Rs,{rootClientId:t,__experimentalIsQuick:!0,__experimentalSelectBlockOnInsert:!1,"aria-describedby":s,toggleProps:{ref:n,tabIndex:o,onFocus:c}}),Object(l.createElement)("div",{className:"block-editor-block-navigation-appender__description",id:s},d))})))}function Rd(e){var t=e.blocks,n=e.selectBlock,r=e.selectedBlockClientId,o=e.showAppender,c=e.showBlockMovers,i=e.showNestedBlocks,a=e.parentBlockClientId,s=e.level,u=void 0===s?1:s,b=e.terminatedLevels,f=void 0===b?[]:b,p=e.path,m=void 0===p?[]:p,v=!a,g=Object(d.compact)(t),O=function(e){return o&&!v&&r===e},h=O(a),j=g.length,y=h?j+1:j,_=y;return Object(l.createElement)(l.Fragment,null,Object(d.map)(g,(function(e,t){var a=e.clientId,s=e.innerBlocks,d=t+1,b=y===d?[].concat(Object(k.a)(f),[u]):f,p=[].concat(Object(k.a)(m),[d]),v=i&&!!s&&!!s.length,g=O(a);return Object(l.createElement)(l.Fragment,{key:a},Object(l.createElement)(Dd,{block:e,onClick:n,isSelected:r===a,level:u,position:d,rowCount:y,siblingBlockCount:j,showBlockMovers:c,terminatedLevels:f,path:p}),(v||g)&&Object(l.createElement)(Rd,{blocks:s,selectedBlockClientId:r,selectBlock:n,showAppender:o,showBlockMovers:c,showNestedBlocks:i,parentBlockClientId:a,level:u+1,terminatedLevels:b,path:p}))})),h&&Object(l.createElement)(Ad,{parentBlockClientId:a,position:y,rowCount:_,level:u,terminatedLevels:f,path:[].concat(Object(k.a)(m),[_])}))}function Ld(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Md(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Fd(e,t){return t.left<=e.x&&t.right>=e.x&&t.top<=e.y&&t.bottom>=e.y}Rd.defaultProps={selectBlock:function(){}};var Vd=["top","bottom"];function Hd(e){var t=Object(l.useState)(),n=Object(To.a)(t,2),r=n[0],o=void 0===r?{}:r,c=n[1],i=Us(o.rootClientId,o.blockIndex),s=Object(v.__unstableUseDropZone)(function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Ld(Object(n),!0).forEach((function(t){Object(a.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ld(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({element:e,withPosition:!0},i)),u=s.position,d=s.type,b=function(e,t,n){var r=Object(m.useSelect)((function(e){var t=e(pr);return{canInsertBlocks:t.canInsertBlocks,getBlockRootClientId:t.getBlockRootClientId,getBlockIndex:t.getBlockIndex,getBlockCount:t.getBlockCount,getDraggedBlockClientIds:t.getDraggedBlockClientIds}}),[]),o=r.getBlockRootClientId,c=r.getBlockIndex,i=r.getBlockCount,a=r.getDraggedBlockClientIds,s=r.canInsertBlocks,u=Object(l.useRef)(),d=!!t;return Object(l.useEffect)((function(){if(e.current&&d){var t="default"===n,r=t?a():void 0,l=Array.from(e.current.querySelectorAll("[data-block]"));u.current=l.map((function(e){var n=e.dataset.block,a=o(n);return{clientId:n,rootClientId:a,blockIndex:c(n,a),element:e,isDraggedBlock:!!t&&r.includes(n),innerBlockCount:i(n),canInsertDraggedBlocksAsSibling:!t||s(r,a),canInsertDraggedBlocksAsChild:!t||s(r,n)}}))}}),[e,d,n,s,i,c,o,a]),u}(e,u,d);if(Object(l.useEffect)((function(){if(u){var e=function(e,t){var n,r,o,c,i,a=function(e,t){var n;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return Md(e,void 0);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Md(e,void 0):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var c,i=!0,a=!1;return{s:function(){n=e[Symbol.iterator]()},n:function(){var e=n.next();return i=e.done,e},e:function(e){a=!0,c=e},f:function(){try{i||null==n.return||n.return()}finally{if(a)throw c}}}}(e);try{for(a.s();!(i=a.n()).done;){var l=i.value;if(!l.isDraggedBlock){var s=l.element.getBoundingClientRect(),u=Ks(t,s,Vd),d=Object(To.a)(u,2),b=d[0],f=d[1],p=Fd(t,s);if(void 0===o||b<o||p){o=b;var m=e.indexOf(l),v=e[m-1];if("top"===f&&v&&v.rootClientId===l.rootClientId&&!v.isDraggedBlock?(r=v,n="bottom",c=v.element.getBoundingClientRect()):(r=l,n=f,c=s),p)break}}}}catch(e){a.e(e)}finally{a.f()}if(r){var g="bottom"===n;if(g&&r.canInsertDraggedBlocksAsChild&&(r.innerBlockCount>0||function(e,t){var n=t.left+t.width/2;return e.x>n}(t,c)))return{rootClientId:r.clientId,blockIndex:0,dropPosition:"inside"};if(r.canInsertDraggedBlocksAsSibling){var O=g?1:0;return{rootClientId:r.rootClientId,clientId:r.clientId,blockIndex:r.blockIndex+O,dropPosition:n}}}}(b.current,u);e&&c(e)}}),[b,u]),u)return o}function zd(e){var t=e.__experimentalFeatures,n=Object(j.a)(e,["__experimentalFeatures"]),r=Object(l.useRef)(),o=Hd(r);t||(o=void 0);var c=Object(l.useMemo)((function(){return{__experimentalFeatures:t,blockDropTarget:o}}),[t,o]);return Object(l.createElement)(v.__experimentalTreeGrid,{className:"block-editor-block-navigation-tree","aria-label":Object(y.__)("Block navigation structure"),ref:r},Object(l.createElement)(kl.Provider,{value:c},Object(l.createElement)(Rd,n)))}var Gd=Object(b.compose)(Object(m.withSelect)((function(e){var t=e(pr),n=t.getSelectedBlockClientId,r=t.getBlockHierarchyRootClientId,o=t.__unstableGetBlockWithBlockTree,c=t.__unstableGetBlockTree,i=n();return{rootBlocks:c(),rootBlock:i?o(r(i)):null,selectedBlockClientId:i}})),Object(m.withDispatch)((function(e,t){var n=t.onSelect,r=void 0===n?d.noop:n;return{selectBlock:function(t){e(pr).selectBlock(t),r(t)}}})))((function(e){var t=e.rootBlock,n=e.rootBlocks,r=e.selectedBlockClientId,o=e.selectBlock,c=e.__experimentalFeatures;if(!n||0===n.length)return null;var i=t&&(t.clientId!==r||t.innerBlocks&&0!==t.innerBlocks.length);return Object(l.createElement)("div",{className:"block-editor-block-navigation__container"},Object(l.createElement)("p",{className:"block-editor-block-navigation__label"},Object(y.__)("List view")),Object(l.createElement)(zd,{blocks:i?[t]:n,selectedBlockClientId:r,selectBlock:o,__experimentalFeatures:c,showNestedBlocks:!0}))})),Ud=Object(l.createElement)(v.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:"24",height:"24"},Object(l.createElement)(v.Path,{d:"M13.8 5.2H3v1.5h10.8V5.2zm-3.6 12v1.5H21v-1.5H10.2zm7.2-6H6.6v1.5h10.8v-1.5z"}));function Wd(e){var t=e.isEnabled,n=e.onToggle,r=e.isOpen,o=e.innerRef,c=Object(j.a)(e,["isEnabled","onToggle","isOpen","innerRef"]);Object(nl.useShortcut)("core/edit-post/toggle-block-navigation",Object(l.useCallback)(n,[n]),{bindGlobal:!0,isDisabled:!t});var a=Object(m.useSelect)((function(e){return e(nl.store).getShortcutRepresentation("core/edit-post/toggle-block-navigation")}),[]);return Object(l.createElement)(v.Button,Object(i.a)({},c,{ref:o,icon:Ud,"aria-expanded":r,"aria-haspopup":"true",onClick:t?n:void 0
60
- /* translators: button label text should, if possible, be under 16 characters. */,label:Object(y.__)("Outline"),className:"block-editor-block-navigation",shortcut:a,"aria-disabled":!t}))}var Kd=Object(l.forwardRef)((function(e,t){var n=e.isDisabled,r=e.__experimentalFeatures,o=Object(j.a)(e,["isDisabled","__experimentalFeatures"]),c=Object(m.useSelect)((function(e){return!!e(pr).getBlockCount()}),[])&&!n;return Object(l.createElement)(v.Dropdown,{contentClassName:"block-editor-block-navigation__popover",position:"bottom right",renderToggle:function(e){var n=e.isOpen,r=e.onToggle;return Object(l.createElement)(Wd,Object(i.a)({},o,{innerRef:t,isOpen:n,onToggle:r,isEnabled:c}))},renderContent:function(e){var t=e.onClose;return Object(l.createElement)(Gd,{onSelect:t,__experimentalFeatures:r})}})})),qd=n(143),$d=[Nc.rawShortcut.primary("z"),Nc.rawShortcut.primaryShift("z"),Nc.rawShortcut.primary("y")],Yd=Object(l.createElement)(v.KeyboardShortcuts,{bindGlobal:!0,shortcuts:Object(d.fromPairs)($d.map((function(e){return[e,function(e){return e.preventDefault()}]})))}),Xd=function(){return Yd};function Qd(e){return e.filter((function(e){var t=e.type;return/^image\/(?:jpe?g|png|gif)$/.test(t)})).map((function(e){return'<img src="'.concat(Object(_u.createBlobURL)(e),'">')})).join("")}var Zd={position:"bottom right",isAlternate:!0},Jd=function(){return Object(l.createElement)("div",{className:"block-editor-format-toolbar"},Object(l.createElement)(v.ToolbarGroup,null,["bold","italic","link","text-color"].map((function(e){return Object(l.createElement)(v.Slot,{name:"RichText.ToolbarControls.".concat(e),key:e})})),Object(l.createElement)(v.Slot,{name:"RichText.ToolbarControls"},(function(e){return 0!==e.length&&Object(l.createElement)(v.ToolbarItem,null,(function(t){return Object(l.createElement)(v.DropdownMenu,{icon:ml.a
61
- /* translators: button label text should, if possible, be under 16 characters. */,label:Object(y.__)("More"),toggleProps:t,controls:Object(d.orderBy)(e.map((function(e){return Object(To.a)(e,1)[0].props})),"title"),popoverProps:Zd})}))}))))},eb=function(e){var t=e.inline,n=e.anchorRef;return t?Object(l.createElement)(v.Popover,{noArrow:!0,position:"top center",focusOnMount:!1,anchorRef:n,className:"block-editor-rich-text__inline-format-toolbar",__unstableSlotName:"block-toolbar"},Object(l.createElement)(Jd,null)):Object(l.createElement)(tl,null,Object(l.createElement)(Jd,null))};function tb(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function nb(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?tb(Object(n),!0).forEach((function(t){Object(a.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):tb(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function rb(e){if(!0===e||"p"===e||"li"===e)return!0===e?"p":e}function ob(e){var t=e.allowedFormats,n=e.formattingControls;return e.disableFormats?ob.EMPTY_ARRAY:t||n?t||(Wl()("wp.blockEditor.RichText formattingControls prop",{alternative:"allowedFormats"}),n.map((function(e){return"core/".concat(e)}))):void 0}ob.EMPTY_ARRAY=[];var cb=Object(l.forwardRef)((function e(t,n){var r=t.children,o=t.tagName,a=t.value,s=t.onChange,d=t.isSelected,f=t.multiline,v=t.inlineToolbar,g=t.wrapperClassName,O=t.autocompleters,y=t.onReplace,_=t.placeholder,E=t.keepPlaceholderOnFocus,w=t.allowedFormats,C=t.formattingControls,S=t.withoutInteractiveFormatting,B=t.onRemove,I=t.onMerge,x=t.onSplit,P=t.__unstableOnSplitAtEnd,T=t.__unstableOnSplitMiddle,N=t.identifier,D=t.preserveWhiteSpace,A=t.__unstablePastePlainText,R=t.__unstableEmbedURLOnPaste,L=t.__unstableDisableFormats,M=t.disableLineBreaks,F=t.unstableOnFocus,V=t.__unstableAllowPrefixTransformations,H=t.__unstableMultilineRootTag,z=t.__unstableMobileNoFocusOnMount,G=t.deleteEnter,U=t.placeholderTextColor,W=t.textAlign,K=t.selectionColor,q=t.tagsToEliminate,$=t.rootTagsToEliminate,Y=t.disableEditingMenu,X=t.fontSize,Q=t.fontFamily,Z=t.fontWeight,J=t.fontStyle,ee=t.minWidth,te=t.maxWidth,ne=t.onBlur,re=t.setRef,oe=Object(j.a)(t,["children","tagName","value","onChange","isSelected","multiline","inlineToolbar","wrapperClassName","autocompleters","onReplace","placeholder","keepPlaceholderOnFocus","allowedFormats","formattingControls","withoutInteractiveFormatting","onRemove","onMerge","onSplit","__unstableOnSplitAtEnd","__unstableOnSplitMiddle","identifier","preserveWhiteSpace","__unstablePastePlainText","__unstableEmbedURLOnPaste","__unstableDisableFormats","disableLineBreaks","unstableOnFocus","__unstableAllowPrefixTransformations","__unstableMultilineRootTag","__unstableMobileNoFocusOnMount","deleteEnter","placeholderTextColor","textAlign","selectionColor","tagsToEliminate","rootTagsToEliminate","disableEditingMenu","fontSize","fontFamily","fontWeight","fontStyle","minWidth","maxWidth","onBlur","setRef"]),ce=Object(b.useInstanceId)(e);N=N||ce;var ie=Object(l.useRef)(),ae=n||ie,le=h(),se=le.clientId,ue=le.onCaretVerticalPositionChange,de=le.isSelected,be=Object(m.useSelect)((function(e){var t,n=e(pr),r=n.isCaretWithinFormattedText,o=n.getSelectionStart,c=n.getSelectionEnd,i=n.getSettings,a=n.didAutomaticChange,s=n.__unstableGetBlockWithoutInnerBlocks,u=n.isMultiSelecting,b=n.hasMultiSelection,f=o(),m=c(),v=i().__experimentalUndo;void 0===d?t=f.clientId===se&&f.attributeKey===N:d&&(t=f.clientId===se);var g={};if("native"===l.Platform.OS){var O=se&&s(se);g={shouldBlurOnUnmount:O&&t&&Object(p.isUnmodifiedDefaultBlock)(O)}}return nb({isCaretWithinFormattedText:r(),selectionStart:t?f.offset:void 0,selectionEnd:t?m.offset:void 0,isSelected:t,didAutomaticChange:a(),disabled:u()||b(),undo:v},g)})),fe=be.isCaretWithinFormattedText,pe=be.selectionStart,me=be.selectionEnd,ve=be.isSelected,ge=be.didAutomaticChange,Oe=be.disabled,he=be.undo,je=be.shouldBlurOnUnmount,ke=Object(m.useDispatch)(pr),ye=ke.__unstableMarkLastChangeAsPersistent,_e=ke.enterFormattedText,Ee=ke.exitFormattedText,we=ke.selectionChange,Ce=ke.__unstableMarkAutomaticChange,Se=rb(f),Be=ob({allowedFormats:w,formattingControls:C,disableFormats:L}),Ie=!Be||Be.length>0,xe=a,Pe=s;Array.isArray(a)&&(xe=p.children.toHTML(a),Pe=function(e){return s(p.children.fromDOM(Object(c.__unstableCreateElement)(document,e).childNodes))});var Te=Object(l.useCallback)((function(e,t){we(se,N,e,t)}),[se,N]),Ne=Object(l.useCallback)((function(e){var t=e.value,n=e.isReverse;I&&I(!n),B&&Object(c.isEmpty)(t)&&n&&B(!n)}),[I,B]),De=Object(l.useCallback)((function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];if(y&&x){var n=[],r=Object(c.split)(e),o=Object(To.a)(r,2),i=o[0],a=o[1],l=t.length>0,s=-1;l&&Object(c.isEmpty)(i)||(n.push(x(Object(c.toHTMLString)({value:i,multilineTag:Se}))),s+=1),l?(n.push.apply(n,Object(k.a)(t)),s+=t.length):T&&n.push(T()),(l||T)&&Object(c.isEmpty)(a)||n.push(x(Object(c.toHTMLString)({value:a,multilineTag:Se})));var u=l?s:1,d=l?-1:null;y(n,u,d)}}),[y,x,Se,T]),Ae=Object(l.useCallback)((function(e){var t=e.value,n=e.onChange,r=e.shiftKey,o=y&&x;if(y){var i=Object(p.getBlockTransforms)("from").filter((function(e){return"enter"===e.type})),a=Object(p.findTransform)(i,(function(e){return e.regExp.test(t.text)}));a&&(y([a.transform({content:t.text})]),Ce())}if(f)r?M||n(Object(c.insert)(t,"\n")):o&&Object(c.__unstableIsEmptyLine)(t)?De(t):n(Object(c.__unstableInsertLineSeparator)(t));else{var l=t.text,s=t.start,u=t.end,d=P&&s===u&&u===l.length;r||!o&&!d?M||n(Object(c.insert)(t,"\n")):!o&&d?P():o&&De(t)}}),[y,x,Ce,f,De,P]),Re=Object(l.useCallback)((function(e){var t=e.value,n=e.onChange,r=e.html,i=e.plainText,a=e.files,l=e.activeFormats;if(A)n(Object(c.insert)(t,Object(c.create)({text:i})));else{if(a&&a.length&&!r){var s=Object(p.pasteHandler)({HTML:Qd(a),mode:"BLOCKS",tagName:o,preserveWhiteSpace:D});return window.console.log("Received items:\n\n",a),void(y&&Object(c.isEmpty)(t)?y(s):De(t,s))}var u,d=y&&x?"AUTO":"INLINE";"AUTO"===d&&Object(c.isEmpty)(t)&&(u=i,Object(qd.regexp)(".*").test(u))&&(d="BLOCKS"),R&&Object(c.isEmpty)(t)&&Object(Os.isURL)(i.trim())&&(d="BLOCKS");var b=Object(p.pasteHandler)({HTML:r,plainText:i,mode:d,tagName:o,preserveWhiteSpace:D});if("string"==typeof b){var m=Object(c.create)({html:b});if(l.length)for(var v=m.formats.length;v--;)m.formats[v]=[].concat(Object(k.a)(l),Object(k.a)(m.formats[v]||[]));f&&(m=Object(c.replace)(m,/\n+/g,c.__UNSTABLE_LINE_SEPARATOR)),n(Object(c.insert)(t,m))}else b.length>0&&(y&&Object(c.isEmpty)(t)?y(b,b.length-1,-1):De(t,b))}}),[o,y,x,De,R,f,D,A]),Le=Object(l.useCallback)((function(e,t){if(y){var n=e.start,r=e.text;if(" "===r.slice(n-1,n)){var o=r.slice(0,n).trim(),i=Object(p.getBlockTransforms)("from").filter((function(e){return"prefix"===e.type})),a=Object(p.findTransform)(i,(function(e){var t=e.prefix;return o===t}));if(a){var l=t(Object(c.slice)(e,n,r.length)),s=a.transform(l);y([s]),Ce()}}}}),[y,Ce]),Me=Object(l.createElement)(c.__experimentalRichText,{clientId:se,identifier:N,ref:ae,value:xe,onChange:Pe,selectionStart:pe,selectionEnd:me,onSelectionChange:Te,tagName:o,placeholder:_,allowedFormats:Be,withoutInteractiveFormatting:S,onEnter:Ae,onDelete:Ne,onPaste:Re,__unstableIsSelected:ve,__unstableInputRule:Le,__unstableMultilineTag:Se,__unstableIsCaretWithinFormattedText:fe,__unstableOnEnterFormattedText:_e,__unstableOnExitFormattedText:Ee,__unstableOnCreateUndoLevel:ye,__unstableMarkAutomaticChange:Ce,__unstableDidAutomaticChange:ge,__unstableUndo:he,__unstableDisableFormats:L,preserveWhiteSpace:D,disabled:Oe,unstableOnFocus:F,__unstableAllowPrefixTransformations:V,__unstableMultilineRootTag:H,onCaretVerticalPositionChange:ue,blockIsSelected:void 0!==d?d:de,shouldBlurOnUnmount:je,__unstableMobileNoFocusOnMount:z,deleteEnter:G,placeholderTextColor:U,textAlign:W,selectionColor:K,tagsToEliminate:q,rootTagsToEliminate:$,disableEditingMenu:Y,fontSize:X,fontFamily:Q,fontWeight:Z,fontStyle:J,minWidth:ee,maxWidth:te,onBlur:ne,setRef:re,id:oe.id,style:oe.style},(function(e){var t=e.isSelected,n=e.value,o=e.onChange,c=e.onFocus,a=e.editableProps,s=e.editableTagName;return Object(l.createElement)(l.Fragment,null,r&&r({value:n,onChange:o,onFocus:c}),t&&Ie&&Object(l.createElement)(eb,{inline:v,anchorRef:ae.current}),t&&Object(l.createElement)(Xd,null),Object(l.createElement)(Na,{onReplace:y,completers:O,record:n,onChange:o,isSelected:t,contentRef:ae},(function(e){var t=e.listBoxId,n=e.activeId,r=e.onKeyDown;return Object(l.createElement)(s,Object(i.a)({},a,oe,{style:oe.style?nb(nb({},oe.style),a.style):a.style,className:u()("block-editor-rich-text__editable",oe.className,a.className,{"keep-placeholder-on-focus":E}),"aria-autocomplete":t?"list":void 0,"aria-owns":t,"aria-activedescendant":n,onKeyDown:function(e){r(e),a.onKeyDown(e)}}))})))}));return g?(Wl()("wp.blockEditor.RichText wrapperClassName prop",{alternative:"className prop or create your own wrapper div"}),Object(l.createElement)("div",{className:u()("block-editor-rich-text",g)},Me)):Me}));cb.Content=function(e){var t=e.value,n=e.tagName,r=e.multiline,o=Object(j.a)(e,["value","tagName","multiline"]);Array.isArray(t)&&(t=p.children.toHTML(t));var c=rb(r);!t&&c&&(t="<".concat(c,"></").concat(c,">"));var i=Object(l.createElement)(l.RawHTML,null,t);return n?Object(l.createElement)(n,Object(d.omit)(o,["format"]),i):i},cb.isEmpty=function(e){return!e||0===e.length},cb.Content.defaultProps={format:"string",value:""};var ib=cb;function ab(e){var t=e.value,n=e.onChange;return Object(l.createElement)(xd,null,Object(l.createElement)(ib,{value:t,onChange:n,placeholder:Object(y.__)("Navigation item"),keepPlaceholderOnFocus:!0,withoutInteractiveFormatting:!0,allowedFormats:["core/bold","core/italic","core/image","core/strikethrough"]}))}var lb=n(372),sb=function(e){var t=e.icon,n=void 0===t?lb.a:t,r=e.label,o=void 0===r?Object(y.__)("Choose variation"):r,c=e.instructions,i=void 0===c?Object(y.__)("Select a variation to start with."):c,a=e.variations,s=e.onSelect,d=e.allowSkip,b=u()("block-editor-block-variation-picker",{"has-many-variations":a.length>4});return Object(l.createElement)(v.Placeholder,{icon:n,label:o,instructions:i,className:b},Object(l.createElement)("ul",{className:"block-editor-block-variation-picker__variations",role:"list","aria-label":Object(y.__)("Block variations")},a.map((function(e){return Object(l.createElement)("li",{key:e.name},Object(l.createElement)(v.Button,{isSecondary:!0,icon:e.icon,iconSize:48,onClick:function(){return s(e)},className:"block-editor-block-variation-picker__variation",label:e.description||e.title}),Object(l.createElement)("span",{className:"block-editor-block-variation-picker__variation-label",role:"presentation"},e.title))}))),d&&Object(l.createElement)("div",{className:"block-editor-block-variation-picker__skip"},Object(l.createElement)(v.Button,{isLink:!0,onClick:function(){return s()}},Object(y.__)("Skip"))))},ub=function(e,t){if(t&&e){var n=t.filter((function(t){var n=t.attributes;return!(!n||!Object.keys(n).length)&&Object(d.isMatch)(e,n)}));if(1===n.length)return n[0]}};function db(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}var bb=function(e){var t=e.blockClientId,n=Object(l.useState)(),r=Object(To.a)(n,2),o=r[0],c=r[1],i=Object(m.useDispatch)(pr).updateBlockAttributes,s=Object(m.useSelect)((function(e){var n=e(p.store).getBlockVariations,r=e(pr),o=r.getBlockName,c=r.getBlockAttributes,i=t&&o(t);return{variations:i&&n(i,"transform"),blockAttributes:c(t)}}),[t]),u=s.variations,d=s.blockAttributes;if(Object(l.useEffect)((function(){var e;c(null===(e=ub(d,u))||void 0===e?void 0:e.name)}),[d,u]),null==u||!u.length)return null;var b=u.map((function(e){return{value:e.name,label:e.title,info:e.description}})),f=function(e){i(t,function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?db(Object(n),!0).forEach((function(t){Object(a.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):db(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({},u.find((function(t){return t.name===e})).attributes))},g="block-editor-block-variation-transforms";return Object(l.createElement)(v.DropdownMenu,{className:g,label:Object(y.__)("Transform to variation"),text:Object(y.__)("Transform to variation"),popoverProps:{position:"bottom center",className:"".concat(g,"__popover")},icon:ml.a,toggleProps:{iconPosition:"right"}},(function(){return Object(l.createElement)("div",{className:"".concat(g,"__container")},Object(l.createElement)(v.MenuGroup,null,Object(l.createElement)(v.MenuItemsChoice,{choices:b,value:o,onSelect:f})))}))},fb=Object(l.createElement)(v.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(l.createElement)(v.Path,{d:"M15 4H9v11h6V4zM4 18.5V20h16v-1.5H4z"})),pb=Object(l.createElement)(v.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(l.createElement)(v.Path,{d:"M20 11h-5V4H9v7H4v1.5h5V20h6v-7.5h5z"}));function mb(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function vb(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?mb(Object(n),!0).forEach((function(t){Object(a.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):mb(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var gb={top:{icon:Object(l.createElement)(v.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(l.createElement)(v.Path,{d:"M9 20h6V9H9v11zM4 4v1.5h16V4H4z"})),title:Object(y._x)("Align top","Block vertical alignment setting")},center:{icon:pb,title:Object(y._x)("Align middle","Block vertical alignment setting")},bottom:{icon:fb,title:Object(y._x)("Align bottom","Block vertical alignment setting")}},Ob=["top","center","bottom"],hb={isAlternate:!0},jb=function(e){var t=e.value,n=e.onChange,r=e.controls,o=void 0===r?Ob:r,c=e.isCollapsed,i=void 0===c||c,a=gb[t],s=gb.top;return Object(l.createElement)(v.ToolbarGroup,{popoverProps:hb,isCollapsed:i,icon:a?a.icon:s.icon,label:Object(y._x)("Change vertical alignment","Block vertical alignment setting label"),controls:o.map((function(e){return vb(vb({},gb[e]),{},{isActive:t===e,role:i?"menuitemradio":void 0,onClick:(r=e,function(){return n(t===r?void 0:r)})});var r}))})};function kb(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function yb(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?kb(Object(n),!0).forEach((function(t){Object(a.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):kb(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var _b=Object(b.createHigherOrderComponent)((function(e){return function(t){var n=uo("color.palette"),r=!uo("color.custom"),o=void 0===t.colors?n:t.colors,c=void 0===t.disableCustomColors?r:t.disableCustomColors,i=!Object(d.isEmpty)(o)||!c;return Object(l.createElement)(e,yb(yb({},t),{},{colors:o,disableCustomColors:c,hasColorsToChoose:i}))}}),"withColorContext"),Eb=_b(v.ColorPalette);function wb(e){var t=e.onChange,n=e.value,r=Object(j.a)(e,["onChange","value"]);return Object(l.createElement)(Ho,Object(i.a)({},r,{onColorChange:t,colorValue:n,gradients:[],disableCustomGradients:!0}))}var Cb=[];function Sb(e){var t=uo("color.gradients")||Cb,n=!uo("color.customGradient");return Object(l.createElement)(v.__experimentalGradientPicker,Object(i.a)({gradients:void 0!==e.gradients?e.gradient:t,disableCustomGradients:void 0!==e.disableCustomGradients?e.disableCustomGradients:n},e))}var Bb=function(e){var t=void 0!==e.gradients&&void 0!==e.disableCustomGradients?v.__experimentalGradientPicker:Sb;return Object(l.createElement)(t,e)};function Ib(e){var t=e.className,n=e.value,r=e.onChange,o=e.label,c=void 0===o?Object(y.__)("Gradient Presets"):o,a=Object(j.a)(e,["className","value","onChange","label"]),s=uo("color.gradients"),b=!uo("color.customGradient");return Object(d.isEmpty)(s)&&b?null:Object(l.createElement)(v.BaseControl,{className:u()("block-editor-gradient-picker-control",t)},Object(l.createElement)(v.BaseControl.VisualLabel,null,c),Object(l.createElement)(Bb,Object(i.a)({value:n,onChange:r,className:"block-editor-gradient-picker-control__gradient-picker-presets",gradients:s,disableCustomGradients:b},a)))}function xb(e){var t=uo("color.gradients");return Object(d.isEmpty)(t)?null:Object(l.createElement)(v.PanelBody,{title:Object(y.__)("Gradient")},Object(l.createElement)(Ib,e))}var Pb=[25,50,75,100];function Tb(e){var t,n,r=e.imageWidth,o=e.imageHeight,c=e.imageSizeOptions,i=void 0===c?[]:c,a=e.isResizable,s=void 0===a||a,u=e.slug,b=e.width,f=e.height,p=e.onChange,m=e.onChangeImage,g=void 0===m?d.noop:m;function O(e,t){return function(){p({width:e,height:t})}}return Object(l.createElement)(l.Fragment,null,!Object(d.isEmpty)(i)&&Object(l.createElement)(v.SelectControl,{label:Object(y.__)("Image size"),value:u,options:i,onChange:g}),s&&Object(l.createElement)("div",{className:"block-editor-image-size-control"},Object(l.createElement)("p",{className:"block-editor-image-size-control__row"},Object(y.__)("Image dimensions")),Object(l.createElement)("div",{className:"block-editor-image-size-control__row"},Object(l.createElement)(v.TextControl,{type:"number",className:"block-editor-image-size-control__width",label:Object(y.__)("Width"),value:null!==(t=null!=b?b:r)&&void 0!==t?t:"",min:1,onChange:function(e){return p({width:parseInt(e,10)})}}),Object(l.createElement)(v.TextControl,{type:"number",className:"block-editor-image-size-control__height",label:Object(y.__)("Height"),value:null!==(n=null!=f?f:o)&&void 0!==n?n:"",min:1,onChange:function(e){return p({height:parseInt(e,10)})}})),Object(l.createElement)("div",{className:"block-editor-image-size-control__row"},Object(l.createElement)(v.ButtonGroup,{"aria-label":Object(y.__)("Image size presets")},Pb.map((function(e){var t=Math.round(r*(e/100)),n=Math.round(o*(e/100)),c=b===t&&f===n;return Object(l.createElement)(v.Button,{key:e,isSmall:!0,isPrimary:c,isPressed:c,onClick:O(t,n)},e,"%")}))),Object(l.createElement)(v.Button,{isSmall:!0,onClick:O()},Object(y.__)("Reset")))))}var Nb=Object(b.createHigherOrderComponent)((function(e){return function(t){var n=h().clientId;return Object(l.createElement)(e,Object(i.a)({},t,{clientId:n}))}}),"withClientId"),Db=Nb((function(e){var t=e.clientId,n=e.showSeparator,r=e.isFloating,o=e.onAddBlock;return Object(l.createElement)(Ms,{rootClientId:t,showSeparator:n,isFloating:r,onAddBlock:o})})),Ab=Object(b.compose)([Nb,Object(m.withSelect)((function(e,t){var n=t.clientId,r=(0,e(pr).getBlockOrder)(n);return{lastBlockClientId:Object(d.last)(r)}}))])((function(e){var t=e.clientId,n=e.lastBlockClientId;return Object(l.createElement)(Ls,{rootClientId:t,lastBlockClientId:n})})),Rb=n(69),Lb=n.n(Rb),Mb=new WeakMap;function Fb(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Vb(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Fb(Object(n),!0).forEach((function(t){Object(a.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Fb(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Hb(e){var t=e.clientId,n=e.allowedBlocks,r=e.template,o=e.templateLock,c=e.wrapperRef,i=e.templateInsertUpdatesSelection,a=e.__experimentalCaptureToolbars,s=e.__experimentalAppenderTagName,u=e.renderAppender,b=e.orientation,f=e.placeholder,v=e.__experimentalLayout,g=void 0===v?Sr:v;!function(e,t,n,r,o){var c=Object(m.useDispatch)(pr).updateBlockListSettings,i=Object(m.useSelect)((function(t){var n=t(pr).getBlockRootClientId(e);return{blockListSettings:t(pr).getBlockListSettings(e),parentLock:t(pr).getTemplateLock(n)}}),[e]),a=i.blockListSettings,s=i.parentLock;Object(l.useLayoutEffect)((function(){var i={allowedBlocks:t,templateLock:void 0===n?s:n};void 0!==r&&(i.__experimentalCaptureToolbars=r),void 0!==o&&(i.orientation=o),Lb()(a,i)||c(e,i)}),[e,a,t,n,s,r,o,c])}(t,n,o,a,b),function(e,t,n,r){var o=Object(m.useDispatch)(pr).replaceInnerBlocks,c=Object(m.useSelect)((function(t){return t(pr).getBlocks(e)}),[e]),i=Object(l.useRef)(null);Object(l.useLayoutEffect)((function(){if((0===c.length||"all"===n)&&!Object(d.isEqual)(t,i.current)){i.current=t;var a=Object(p.synchronizeBlocksWithTemplate)(c,t);Object(d.isEqual)(a,c)||o(e,a,0===c.length&&r&&0!==a.length)}}),[c,t,n,e])}(t,r,o,i);var O=Object(m.useSelect)((function(e){var n=e(pr).getBlock(t),r=Object(p.getBlockType)(n.name);if(r&&r.providesContext)return function(e,t){Mb.has(t)||Mb.set(t,new WeakMap);var n=Mb.get(t);if(!n.has(e)){var r=Object(d.mapValues)(t.providesContext,(function(t){return e[t]}));n.set(e,r)}return n.get(e)}(n.attributes,r)}),[t]);return Object(l.createElement)(Ir,{value:g},Object(l.createElement)(Ga,{value:O},Object(l.createElement)(ed,{rootClientId:t,renderAppender:u,__experimentalAppenderTagName:s,wrapperRef:c,placeholder:f})))}function zb(e){return ql(e),Object(l.createElement)(Hb,e)}var Gb=Object(l.forwardRef)((function(e,t){var n=Ub({ref:t},e);return Object(l.createElement)("div",{className:"block-editor-inner-blocks"},Object(l.createElement)("div",n))}));function Ub(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=Object(l.useRef)(),r=h(),o=r.clientId,c=Object(b.useViewportMatch)("medium","<"),a=Object(m.useSelect)((function(e){var t=e(pr),n=t.getBlockName,r=t.isBlockSelected,i=t.hasSelectedInnerBlock,a=(0,t.isNavigationMode)()||c;return"core/template"!==n(o)&&!r(o)&&!i(o,!0)&&a}),[o,c]),s=e.ref||n,d=t.value&&t.onChange?zb:Hb;return Vb(Vb({},e),{},{ref:s,className:u()(e.className,"block-editor-block-list__layout",{"has-overlay":a}),children:Object(l.createElement)(d,Object(i.a)({},t,{clientId:o,wrapperRef:s}))})}Gb.DefaultBlockAppender=Ab,Gb.ButtonBlockAppender=Db,Gb.Content=Object(p.withBlockContentContext)((function(e){var t=e.BlockContent;return Object(l.createElement)(t,null)}));var Wb=Gb,Kb=Object(l.createElement)(kr.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(l.createElement)(kr.Path,{d:"M9 9v6h11V9H9zM4 20h1.5V4H4v16z"})),qb=Object(l.createElement)(kr.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(l.createElement)(kr.Path,{d:"M20 9h-7.2V4h-1.6v5H4v6h7.2v5h1.6v-5H20z"})),$b=Object(l.createElement)(kr.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(l.createElement)(kr.Path,{d:"M4 15h11V9H4v6zM18.5 4v16H20V4h-1.5z"})),Yb=Object(l.createElement)(kr.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(l.createElement)(kr.Path,{d:"M9 15h6V9H9v6zm-5 5h1.5V4H4v16zM18.5 4v16H20V4h-1.5z"})),Xb={left:Kb,center:qb,right:$b,"space-between":Yb},Qb=function(e){var t=e.allowedControls,n=void 0===t?["left","center","right","space-between"]:t,r=e.isCollapsed,o=void 0===r||r,c=e.onChange,i=e.value,a=e.popoverProps,s=i?Xb[i]:Xb.left,u=[{name:"left",icon:Kb,title:Object(y.__)("Justify items left"),isActive:"left"===i,onClick:c("left")},{name:"center",icon:qb,title:Object(y.__)("Justify items center"),isActive:"center"===i,onClick:c("center")},{name:"right",icon:$b,title:Object(y.__)("Justify items right"),isActive:"right"===i,onClick:c("right")},{name:"space-between",icon:Yb,title:Object(y.__)("Space between items"),isActive:"space-between"===i,onClick:c("space-between")}];return Object(l.createElement)(v.ToolbarGroup,{icon:s,popoverProps:a,label:Object(y.__)("Change items justification"),isCollapsed:o,controls:u.filter((function(e){return n.includes(e.name)}))})},Zb=n(255);function Jb(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function ef(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Jb(Object(n),!0).forEach((function(t){Object(a.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Jb(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var tf=[{id:"opensInNewTab",title:Object(y.__)("Open in new tab")}],nf=function(e){var t=e.value,n=e.onChange,r=void 0===n?d.noop:n,o=e.settings,c=void 0===o?tf:o;if(!c||!c.length)return null;var i=function(e){return function(n){r(ef(ef({},t),{},Object(a.a)({},e.id,n)))}},s=c.map((function(e){return Object(l.createElement)(v.ToggleControl,{className:"block-editor-link-control__setting",key:e.id,label:e.title,onChange:i(e),checked:!!t&&!!t[e.id]})}));return Object(l.createElement)("fieldset",{className:"block-editor-link-control__settings"},Object(l.createElement)(v.VisuallyHidden,{as:"legend"},Object(y.__)("Currently selected link settings")),s)},rf=n(138),of=n.n(rf);var cf=function(e){Object(xi.a)(o,e);var t,n,r=(t=o,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=Object(Ti.a)(t);if(n){var o=Object(Ti.a)(this).constructor;e=Reflect.construct(r,arguments,o)}else e=r.apply(this,arguments);return Object(Pi.a)(this,e)});function o(e){var t;return Object(Si.a)(this,o),(t=r.call(this,e)).onChange=t.onChange.bind(Object(Ii.a)(t)),t.onFocus=t.onFocus.bind(Object(Ii.a)(t)),t.onKeyDown=t.onKeyDown.bind(Object(Ii.a)(t)),t.selectLink=t.selectLink.bind(Object(Ii.a)(t)),t.handleOnClick=t.handleOnClick.bind(Object(Ii.a)(t)),t.bindSuggestionNode=t.bindSuggestionNode.bind(Object(Ii.a)(t)),t.autocompleteRef=e.autocompleteRef||Object(l.createRef)(),t.inputRef=Object(l.createRef)(),t.updateSuggestions=Object(d.debounce)(t.updateSuggestions.bind(Object(Ii.a)(t)),200),t.suggestionNodes=[],t.isUpdatingSuggestions=!1,t.state={suggestions:[],showSuggestions:!1,selectedSuggestion:null,suggestionsListboxId:"",suggestionOptionIdPrefix:""},t}return Object(Bi.a)(o,[{key:"componentDidUpdate",value:function(e){var t=this,n=this.state,r=n.showSuggestions,o=n.selectedSuggestion,c=this.props.value;r&&null!==o&&this.suggestionNodes[o]&&!this.scrollingIntoView&&(this.scrollingIntoView=!0,of()(this.suggestionNodes[o],this.autocompleteRef.current,{onlyScrollIfNeeded:!0}),this.props.setTimeout((function(){t.scrollingIntoView=!1}),100)),e.value!==c&&this.shouldShowInitialSuggestions()&&this.updateSuggestions()}},{key:"componentDidMount",value:function(){this.shouldShowInitialSuggestions()&&this.updateSuggestions()}},{key:"componentWillUnmount",value:function(){delete this.suggestionsRequest}},{key:"bindSuggestionNode",value:function(e){var t=this;return function(n){t.suggestionNodes[e]=n}}},{key:"shouldShowInitialSuggestions",value:function(){var e=this.state.suggestions,t=this.props,n=t.__experimentalShowInitialSuggestions,r=void 0!==n&&n,o=t.value;return!this.isUpdatingSuggestions&&r&&!(o&&o.length)&&!(e&&e.length)}},{key:"updateSuggestions",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",n=this.props,r=n.__experimentalFetchLinkSuggestions,o=n.__experimentalHandleURLSuggestions;if(r){var c=!(t&&t.length);if(c||!(t.length<2||!o&&Object(Os.isURL)(t))){this.isUpdatingSuggestions=!0,this.setState({selectedSuggestion:null,loading:!0});var i=r(t,{isInitialSuggestions:c});i.then((function(t){e.suggestionsRequest===i&&(e.setState({suggestions:t,loading:!1,showSuggestions:!!t.length}),t.length?e.props.debouncedSpeak(Object(y.sprintf)(
62
  /* translators: %s: number of results. */
63
- Object(y._n)("%d result found, use up and down arrow keys to navigate.","%d results found, use up and down arrow keys to navigate.",t.length),t.length),"assertive"):e.props.debouncedSpeak(Object(y.__)("No results."),"assertive"),e.isUpdatingSuggestions=!1)})).catch((function(){e.suggestionsRequest===i&&(e.setState({loading:!1}),e.isUpdatingSuggestions=!1)})),this.suggestionsRequest=i}else this.setState({showSuggestions:!1,selectedSuggestion:null,loading:!1})}}},{key:"onChange",value:function(e){var t=e.target.value;this.props.onChange(t),this.props.disableSuggestions||this.updateSuggestions(t.trim())}},{key:"onFocus",value:function(){var e=this.state.suggestions,t=this.props,n=t.disableSuggestions,r=t.value;!r||n||this.isUpdatingSuggestions||e&&e.length||this.updateSuggestions(r.trim())}},{key:"onKeyDown",value:function(e){var t=this.state,n=t.showSuggestions,r=t.selectedSuggestion,o=t.suggestions,c=t.loading;if(n&&o.length&&!c){var i=this.state.suggestions[this.state.selectedSuggestion];switch(e.keyCode){case Nc.UP:e.stopPropagation(),e.preventDefault();var a=r?r-1:o.length-1;this.setState({selectedSuggestion:a});break;case Nc.DOWN:e.stopPropagation(),e.preventDefault();var l=null===r||r===o.length-1?0:r+1;this.setState({selectedSuggestion:l});break;case Nc.TAB:null!==this.state.selectedSuggestion&&(this.selectLink(i),this.props.speak(Object(y.__)("Link selected.")));break;case Nc.ENTER:null!==this.state.selectedSuggestion&&(e.stopPropagation(),this.selectLink(i))}}else switch(e.keyCode){case Nc.UP:0!==e.target.selectionStart&&(e.stopPropagation(),e.preventDefault(),e.target.setSelectionRange(0,0));break;case Nc.DOWN:this.props.value.length!==e.target.selectionStart&&(e.stopPropagation(),e.preventDefault(),e.target.setSelectionRange(this.props.value.length,this.props.value.length))}}},{key:"selectLink",value:function(e){this.props.onChange(e.url,e),this.setState({selectedSuggestion:null,showSuggestions:!1})}},{key:"handleOnClick",value:function(e){this.selectLink(e),this.inputRef.current.focus()}},{key:"render",value:function(){return Object(l.createElement)(l.Fragment,null,this.renderControl(),this.renderSuggestions())}},{key:"renderControl",value:function(){var e=this.props,t=e.label,n=e.className,r=e.isFullWidth,o=e.instanceId,c=e.placeholder,i=void 0===c?Object(y.__)("Paste URL or type to search"):c,a=e.__experimentalRenderControl,s=e.value,d=void 0===s?"":s,b=this.state,f=b.loading,p=b.showSuggestions,m=b.selectedSuggestion,g=b.suggestionsListboxId,O=b.suggestionOptionIdPrefix,h={id:"url-input-control-".concat(o),label:t,className:u()("block-editor-url-input",n,{"is-full-width":r})},j={value:d,required:!0,className:"block-editor-url-input__input",type:"text",onChange:this.onChange,onFocus:this.onFocus,placeholder:i,onKeyDown:this.onKeyDown,role:"combobox","aria-label":Object(y.__)("URL"),"aria-expanded":p,"aria-autocomplete":"list","aria-owns":g,"aria-activedescendant":null!==m?"".concat(O,"-").concat(m):void 0,ref:this.inputRef};return a?a(h,j,f):Object(l.createElement)(v.BaseControl,h,Object(l.createElement)("input",j),f&&Object(l.createElement)(v.Spinner,null))}},{key:"renderSuggestions",value:function(){var e=this,t=this.props,n=t.className,r=t.__experimentalRenderSuggestions,o=t.value,c=void 0===o?"":o,a=t.__experimentalShowInitialSuggestions,s=void 0!==a&&a,b=this.state,f=b.showSuggestions,p=b.suggestions,m=b.selectedSuggestion,g=b.suggestionsListboxId,O=b.suggestionOptionIdPrefix,h=b.loading,j={id:g,ref:this.autocompleteRef,role:"listbox"},k=function(t,n){return{role:"option",tabIndex:"-1",id:"".concat(O,"-").concat(n),ref:e.bindSuggestionNode(n),"aria-selected":n===m}};return Object(d.isFunction)(r)&&f&&p.length?r({suggestions:p,selectedSuggestion:m,suggestionsListProps:j,buildSuggestionItemProps:k,isLoading:h,handleSuggestionClick:this.handleOnClick,isInitialSuggestions:s&&!(c&&c.length)}):!Object(d.isFunction)(r)&&f&&p.length?Object(l.createElement)(v.Popover,{position:"bottom",noArrow:!0,focusOnMount:!1},Object(l.createElement)("div",Object(i.a)({},j,{className:u()("block-editor-url-input__suggestions","".concat(n,"__suggestions"))}),p.map((function(t,n){return Object(l.createElement)(v.Button,Object(i.a)({},k(0,n),{key:t.id,className:u()("block-editor-url-input__suggestion",{"is-selected":n===m}),onClick:function(){return e.handleOnClick(t)}}),t.title)})))):null}}],[{key:"getDerivedStateFromProps",value:function(e,t){var n=e.value,r=e.instanceId,o=e.disableSuggestions,c=e.__experimentalShowInitialSuggestions,i=void 0!==c&&c,a=t.showSuggestions,l=n&&n.length;return i||l||(a=!1),!0===o&&(a=!1),{showSuggestions:a,suggestionsListboxId:"block-editor-url-input-suggestions-".concat(r),suggestionOptionIdPrefix:"block-editor-url-input-suggestion-".concat(r)}}}]),o}(l.Component),af=Object(b.compose)(b.withSafeTimeout,v.withSpokenMessages,b.withInstanceId,Object(m.withSelect)((function(e,t){if(!Object(d.isFunction)(t.__experimentalFetchLinkSuggestions))return{__experimentalFetchLinkSuggestions:(0,e(pr).getSettings)().__experimentalFetchLinkSuggestions}})))(cf),lf=function(e){var t,n=e.searchTerm,r=e.onClick,o=e.itemProps,c=e.isSelected,a=e.buttonText;return n?(t=a?Object(d.isFunction)(a)?a(n):a:Object(l.createInterpolateElement)(Object(y.sprintf)(
64
  /* translators: %s: search term. */
65
- Object(y.__)("Create: <mark>%s</mark>"),n),{mark:Object(l.createElement)("mark",null)}),Object(l.createElement)(v.Button,Object(i.a)({},o,{className:u()("block-editor-link-control__search-create block-editor-link-control__search-item",{"is-selected":c}),onClick:r}),Object(l.createElement)(Hl.a,{className:"block-editor-link-control__search-item-icon",icon:Ll.a}),Object(l.createElement)("span",{className:"block-editor-link-control__search-item-header"},Object(l.createElement)("span",{className:"block-editor-link-control__search-item-title"},t)))):null},sf=Object(l.createElement)(kr.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"-2 -2 24 24"},Object(l.createElement)(kr.Path,{d:"M9 0C4.03 0 0 4.03 0 9s4.03 9 9 9 9-4.03 9-9-4.03-9-9-9zM1.11 9.68h2.51c.04.91.167 1.814.38 2.7H1.84c-.403-.85-.65-1.764-.73-2.7zm8.57-5.4V1.19c.964.366 1.756 1.08 2.22 2 .205.347.386.708.54 1.08l-2.76.01zm3.22 1.35c.232.883.37 1.788.41 2.7H9.68v-2.7h3.22zM8.32 1.19v3.09H5.56c.154-.372.335-.733.54-1.08.462-.924 1.255-1.64 2.22-2.01zm0 4.44v2.7H4.7c.04-.912.178-1.817.41-2.7h3.21zm-4.7 2.69H1.11c.08-.936.327-1.85.73-2.7H4c-.213.886-.34 1.79-.38 2.7zM4.7 9.68h3.62v2.7H5.11c-.232-.883-.37-1.788-.41-2.7zm3.63 4v3.09c-.964-.366-1.756-1.08-2.22-2-.205-.347-.386-.708-.54-1.08l2.76-.01zm1.35 3.09v-3.04h2.76c-.154.372-.335.733-.54 1.08-.464.92-1.256 1.634-2.22 2v-.04zm0-4.44v-2.7h3.62c-.04.912-.178 1.817-.41 2.7H9.68zm4.71-2.7h2.51c-.08.936-.327 1.85-.73 2.7H14c.21-.87.337-1.757.38-2.65l.01-.05zm0-1.35c-.046-.894-.176-1.78-.39-2.65h2.16c.403.85.65 1.764.73 2.7l-2.5-.05zm1-4H13.6c-.324-.91-.793-1.76-1.39-2.52 1.244.56 2.325 1.426 3.14 2.52h.04zm-9.6-2.52c-.597.76-1.066 1.61-1.39 2.52H2.65c.815-1.094 1.896-1.96 3.14-2.52zm-3.15 12H4.4c.324.91.793 1.76 1.39 2.52-1.248-.567-2.33-1.445-3.14-2.55l-.01.03zm9.56 2.52c.597-.76 1.066-1.61 1.39-2.52h1.76c-.82 1.08-1.9 1.933-3.14 2.48l-.01.04z"})),uf=function(e){var t=e.itemProps,n=e.suggestion,r=e.isSelected,o=void 0!==r&&r,c=e.onClick,a=e.isURL,s=void 0!==a&&a,d=e.searchTerm,b=void 0===d?"":d,f=e.shouldShowType,p=void 0!==f&&f;return Object(l.createElement)(v.Button,Object(i.a)({},t,{onClick:c,className:u()("block-editor-link-control__search-item",{"is-selected":o,"is-url":s,"is-entity":!s})}),s&&Object(l.createElement)(Hl.a,{className:"block-editor-link-control__search-item-icon",icon:sf}),Object(l.createElement)("span",{className:"block-editor-link-control__search-item-header"},Object(l.createElement)("span",{className:"block-editor-link-control__search-item-title"},Object(l.createElement)(v.TextHighlight,{text:n.title,highlight:b})),Object(l.createElement)("span",{"aria-hidden":!s,className:"block-editor-link-control__search-item-info"},!s&&(Object(Os.filterURLForDisplay)(Object(Os.safeDecodeURI)(n.url))||""),s&&Object(y.__)("Press ENTER to add this link"))),p&&n.type&&Object(l.createElement)("span",{className:"block-editor-link-control__search-item-type"},"post_tag"===n.type?"tag":n.type))};function df(e){var t=e.instanceId,n=e.withCreateSuggestion,r=e.currentInputValue,o=e.handleSuggestionClick,c=e.suggestionsListProps,a=e.buildSuggestionItemProps,s=e.suggestions,d=e.selectedSuggestion,b=e.isLoading,f=e.isInitialSuggestions,p=e.createSuggestionButtonText,m=e.suggestionsQuery,g=u()("block-editor-link-control__search-results",{"is-loading":b}),O=["url","mailto","tel","internal"],h=1===s.length&&O.includes(s[0].type.toLowerCase()),j=n&&!h&&!f,k=!(null!=m&&m.type),_="block-editor-link-control-search-results-label-".concat(t),E=f?Object(y.__)("Recently updated"):Object(y.sprintf)(
66
  /* translators: %s: search term. */
67
- Object(y.__)('Search results for "%s"'),r),w=Object(l.createElement)(f?l.Fragment:v.VisuallyHidden,{},Object(l.createElement)("span",{className:"block-editor-link-control__search-results-label",id:_},E));return Object(l.createElement)("div",{className:"block-editor-link-control__search-results-wrapper"},w,Object(l.createElement)("div",Object(i.a)({},c,{className:g,"aria-labelledby":_}),s.map((function(e,t){return j&&"__CREATE__"===e.type?Object(l.createElement)(lf,{searchTerm:r,buttonText:p,onClick:function(){return o(e)},key:e.type,itemProps:a(e,t),isSelected:t===d}):"__CREATE__"===e.type?null:Object(l.createElement)(uf,{key:"".concat(e.id,"-").concat(e.type),itemProps:a(e,t),suggestion:e,index:t,onClick:function(){o(e)},isSelected:t===d,isURL:O.includes(e.type.toLowerCase()),searchTerm:r,shouldShowType:k})}))))}function bf(e){var t=Object(d.startsWith)(e,"#");return Object(Os.isURL)(e)||e&&e.includes("www.")||t}function ff(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function pf(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ff(Object(n),!0).forEach((function(t){Object(a.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ff(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var mf=function(){return Promise.resolve([])},vf=function(e){var t="URL",n=Object(Os.getProtocol)(e)||"";return n.includes("mailto")&&(t="mailto"),n.includes("tel")&&(t="tel"),Object(d.startsWith)(e,"#")&&(t="internal"),Promise.resolve([{id:e,title:e,url:"URL"===t?Object(Os.prependHTTP)(e):e,type:t}])},gf=function(){var e=Object(rl.a)(Pt.a.mark((function e(t,n,r,o,c,i){var a,l,s;return Pt.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=n.isInitialSuggestions,e.next=3,Promise.all([r(t,n),o(t)]);case 3:if(l=e.sent,s=!t.includes(" "),l=s&&i&&!a?l[0].concat(l[1]):l[0],!a){e.next=8;break}return e.abrupt("return",l);case 8:return e.abrupt("return",bf(t)||!c?l:l.concat({title:t,url:t,type:"__CREATE__"}));case 9:case"end":return e.stop()}}),e)})));return function(_x,t,n,r,o,c){return e.apply(this,arguments)}}();function Of(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function hf(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Of(Object(n),!0).forEach((function(t){Object(a.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Of(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var jf=Promise.resolve([]),kf=Object(l.forwardRef)((function(e,t){var n=e.value,r=e.children,o=e.currentLink,c=void 0===o?{}:o,i=e.className,a=void 0===i?null:i,s=e.placeholder,u=void 0===s?null:s,f=e.withCreateSuggestion,p=void 0!==f&&f,v=e.onCreateSuggestion,g=void 0===v?d.noop:v,O=e.onChange,h=void 0===O?d.noop:O,j=e.onSelect,k=void 0===j?d.noop:j,_=e.showSuggestions,E=void 0===_||_,w=e.renderSuggestions,C=void 0===w?function(e){return Object(l.createElement)(df,e)}:w,S=e.fetchSuggestions,B=void 0===S?null:S,I=e.allowDirectEntry,x=void 0===I||I,P=e.showInitialSuggestions,T=void 0!==P&&P,N=e.suggestionsQuery,D=void 0===N?{}:N,A=e.withURLSuggestion,R=void 0===A||A,L=e.createSuggestionButtonText,M=function(e,t,n,r){var o=Object(m.useSelect)((function(e){return{fetchSearchSuggestions:(0,e(pr).getSettings)().__experimentalFetchLinkSuggestions}}),[]).fetchSearchSuggestions,c=t?vf:mf;return Object(l.useCallback)((function(t,i){var a=i.isInitialSuggestions;return bf(t)?c(t,{isInitialSuggestions:a}):gf(t,pf(pf({},e),{},{isInitialSuggestions:a}),o,c,n,r)}),[c,o,n])}(D,x,p,R),F=E?B||M:jf,V=Object(b.useInstanceId)(kf),H=Object(l.useState)(),z=Object(To.a)(H,2),G=z[0],U=z[1],W=function(){var e=Object(rl.a)(Pt.a.mark((function e(t){var n,r;return Pt.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=t,"__CREATE__"!==t.type){e.next=12;break}return e.prev=2,e.next=5,g(t.title);case 5:n=e.sent,null!==(r=n)&&void 0!==r&&r.url&&k(n),e.next=11;break;case 9:e.prev=9,e.t0=e.catch(2);case 11:return e.abrupt("return");case 12:(x||n&&Object.keys(n).length>=1)&&k(hf(hf({},Object(d.omit)(c,"id","url")),n),n);case 13:case"end":return e.stop()}}),e,null,[[2,9]])})));return function(_x){return e.apply(this,arguments)}}();return Object(l.createElement)("form",{onSubmit:function(e){e.preventDefault(),W(G||{url:n})}},Object(l.createElement)(af,{className:a,value:n,onChange:function(e,t){h(e),U(t)},placeholder:null!=u?u:Object(y.__)("Search or type url"),__experimentalRenderSuggestions:E?function(e){return C(hf(hf({},e),{},{instanceId:V,withCreateSuggestion:p,currentInputValue:n,createSuggestionButtonText:L,suggestionsQuery:D,handleSuggestionClick:function(t){e.handleSuggestionClick&&e.handleSuggestionClick(t),W(t)}}))}:null,__experimentalFetchLinkSuggestions:F,__experimentalHandleURLSuggestions:!0,__experimentalShowInitialSuggestions:T,ref:t}),r)})),yf=kf,_f=Object(v.createSlotFill)("BlockEditorLinkControlViewer"),Ef=_f.Slot,wf=_f.Fill;function Cf(e){var t=e.value,n=e.onEditClick,r=t&&Object(Os.filterURLForDisplay)(Object(Os.safeDecodeURI)(t.url),16)||"";return Object(l.createElement)("div",{"aria-label":Object(y.__)("Currently selected"),"aria-selected":"true",className:u()("block-editor-link-control__search-item",{"is-current":!0})},Object(l.createElement)("span",{className:"block-editor-link-control__search-item-header"},Object(l.createElement)(v.ExternalLink,{className:"block-editor-link-control__search-item-title",href:t.url},t&&t.title||r),t&&t.title&&Object(l.createElement)("span",{className:"block-editor-link-control__search-item-info"},r)),Object(l.createElement)(v.Button,{isSecondary:!0,onClick:function(){return n()},className:"block-editor-link-control__search-item-action"},Object(y.__)("Edit")),Object(l.createElement)(Ef,{fillProps:t}))}var Sf=function(e){var t=!1;return{promise:new Promise((function(n,r){e.then((function(e){return t?r({isCanceled:!0}):n(e)}),(function(e){return r(t?{isCanceled:!0}:e)}))})),cancel:function(){t=!0}}};function Bf(e){var t=e.searchInputPlaceholder,n=e.value,r=e.settings,o=e.onChange,c=void 0===o?d.noop:o,i=e.noDirectEntry,a=void 0!==i&&i,s=e.showSuggestions,u=void 0===s||s,b=e.showInitialSuggestions,f=e.forceIsEditingLink,p=e.createSuggestion,m=e.withCreateSuggestion,g=e.inputValue,O=void 0===g?"":g,h=e.suggestionsQuery,j=void 0===h?{}:h,k=e.noURLSuggestion,_=void 0!==k&&k,E=e.createSuggestionButtonText;void 0===m&&p&&(m=!0);var w=Object(l.useRef)(!0),C=Object(l.useRef)(),S=Object(l.useState)(n&&n.url||""),B=Object(To.a)(S,2),I=B[0],x=B[1],P=O||I,T=Object(l.useState)(void 0!==f?f:!n||!n.url),N=Object(To.a)(T,2),D=N[0],A=N[1],R=Object(l.useRef)(!1);Object(l.useEffect)((function(){void 0!==f&&f!==D&&A(f)}),[f]),Object(l.useEffect)((function(){w.current?w.current=!1:(C.current.contains(C.current.ownerDocument.activeElement)||(il.focus.focusable.find(C.current)[0]||C.current).focus(),R.current=!1)}),[D]);var L=function(e){var t=Object(l.useRef)(),n=Object(l.useState)(!1),r=Object(To.a)(n,2),o=r[0],c=r[1],i=Object(l.useState)(null),a=Object(To.a)(i,2),s=a[0],u=a[1],d=function(){var n=Object(rl.a)(Pt.a.mark((function n(r){return Pt.a.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return c(!0),u(null),n.prev=2,t.current=Sf(Promise.resolve(e(r))),n.next=6,t.current.promise;case 6:return n.abrupt("return",n.sent);case 9:if(n.prev=9,n.t0=n.catch(2),!n.t0||!n.t0.isCanceled){n.next=13;break}return n.abrupt("return");case 13:throw u(n.t0.message||Object(y.__)("An unknown error occurred during creation. Please try again.")),n.t0;case 15:return n.prev=15,c(!1),n.finish(15);case 18:case"end":return n.stop()}}),n,null,[[2,9,15,18]])})));return function(_x){return n.apply(this,arguments)}}();return Object(l.useEffect)((function(){return function(){t.current&&t.current.cancel()}}),[]),{createPage:d,isCreatingPage:o,errorMessage:s}}(p),M=L.createPage,F=L.isCreatingPage,V=L.errorMessage;return Object(l.createElement)("div",{tabIndex:-1,ref:C,className:"block-editor-link-control"},F&&Object(l.createElement)("div",{className:"block-editor-link-control__loading"},Object(l.createElement)(v.Spinner,null)," ",Object(y.__)("Creating"),"…"),(D||!n)&&!F&&Object(l.createElement)(l.Fragment,null,Object(l.createElement)("div",{className:"block-editor-link-control__search-input-wrapper"},Object(l.createElement)(yf,{currentLink:n,className:"block-editor-link-control__search-input",placeholder:t,value:P,withCreateSuggestion:m,onCreateSuggestion:M,onChange:x,onSelect:function(e){var t;c(e),R.current=!(null===(t=C.current)||void 0===t||!t.contains(C.current.ownerDocument.activeElement)),A(!1)},showInitialSuggestions:b,allowDirectEntry:!a,showSuggestions:u,suggestionsQuery:j,withURLSuggestion:!_,createSuggestionButtonText:E},Object(l.createElement)("div",{className:"block-editor-link-control__search-actions"},Object(l.createElement)(v.Button,{type:"submit",label:Object(y.__)("Submit"),icon:Zb.a,className:"block-editor-link-control__search-submit"})))),V&&Object(l.createElement)(v.Notice,{className:"block-editor-link-control__search-error",status:"error",isDismissible:!1},V)),n&&!D&&!F&&Object(l.createElement)(Cf,{value:n,onEditClick:function(){return A(!0)}}),Object(l.createElement)(nf,{value:n,settings:r,onChange:c}))}Bf.ViewerFill=wf;var If=Bf,xf=n(373),Pf=n(256),Tf=Object(v.withFilters)("editor.MediaUpload")((function(){return null})),Nf=function(e){var t=e.fallback,n=void 0===t?null:t,r=e.children;return Object(m.useSelect)((function(e){return!!(0,e(pr).getSettings)().mediaUpload}),[])?r:n},Df=Object(b.compose)([Object(m.withDispatch)((function(e){var t=e(ds.store);return{createNotice:t.createNotice,removeNotice:t.removeNotice}})),Object(v.withFilters)("editor.MediaReplaceFlow")])((function(e){var t=e.mediaURL,n=e.mediaId,r=e.allowedTypes,o=e.accept,c=e.onSelect,i=e.onSelectURL,a=e.onFilesUpload,s=void 0===a?d.noop:a,u=e.name,b=void 0===u?Object(y.__)("Replace"):u,f=e.createNotice,p=e.removeNotice,g=Object(l.useState)(t),O=Object(To.a)(g,2),h=O[0],j=O[1],k=Object(m.useSelect)((function(e){return e(pr).getSettings().mediaUpload}),[]),_=Object(l.createRef)(),E=Object(d.uniqueId)("block-editor/media-replace-flow/error-notice/"),w=function(e){var t=document.createElement("div");t.innerHTML=Object(l.renderToString)(e);var n=t.textContent||t.innerText||"";setTimeout((function(){f("error",n,{speak:!0,id:E,isDismissible:!0})}),1e3)},C=function(e){c(e),j(e.url),Object(Tt.speak)(Object(y.__)("The media file has been replaced")),p(E)},S=function(e){e.keyCode===Nc.DOWN&&(e.preventDefault(),e.stopPropagation(),e.target.click())};return Object(l.createElement)(v.Dropdown,{popoverProps:{isAlternate:!0},contentClassName:"block-editor-media-replace-flow__options",renderToggle:function(e){var t=e.isOpen,n=e.onToggle;return Object(l.createElement)(v.ToolbarGroup,{className:"media-replace-flow"},Object(l.createElement)(v.ToolbarButton,{ref:_,"aria-expanded":t,"aria-haspopup":"true",onClick:n,onKeyDown:S},b))},renderContent:function(e){return e.onClose,Object(l.createElement)(l.Fragment,null,Object(l.createElement)(v.NavigableMenu,{className:"block-editor-media-replace-flow__media-upload-menu"},Object(l.createElement)(Tf,{value:n,onSelect:function(e){return C(e)},allowedTypes:r,render:function(e){var t=e.open;return Object(l.createElement)(v.MenuItem,{icon:xf.a,onClick:t},Object(y.__)("Open Media Library"))}}),Object(l.createElement)(Nf,null,Object(l.createElement)(v.FormFileUpload,{onChange:function(e){!function(e){var t=e.target.files;s(t),k({allowedTypes:r,filesList:t,onFileChange:function(e){var t=Object(To.a)(e,1)[0];C(t)},onError:w})}(e)},accept:o,render:function(e){var t=e.openFileDialog;return Object(l.createElement)(v.MenuItem,{icon:Pf.a,onClick:function(){t()}},Object(y.__)("Upload"))}}))),i&&Object(l.createElement)("form",{className:"block-editor-media-flow__url-input",onKeyDown:function(e){[Nc.TAB,Nc.ESCAPE].includes(e.keyCode)||e.stopPropagation()},onKeyPress:function(e){[Nc.TAB,Nc.ESCAPE].includes(e.keyCode)||e.stopPropagation()}},Object(l.createElement)("span",{className:"block-editor-media-replace-flow__image-url-label"},Object(y.__)("Current media URL:")),Object(l.createElement)(If,{value:{url:h},settings:[],showSuggestions:!1,onChange:function(e){var t=e.url;j(t),i(t),_.current.focus()}})))}})})),Af=n(231);function Rf(e){var t=e.url,n=e.urlLabel,r=e.className,o=u()(r,"block-editor-url-popover__link-viewer-url");return t?Object(l.createElement)(v.ExternalLink,{className:o,href:t},n||Object(Os.filterURLForDisplay)(Object(Os.safeDecodeURI)(t))):Object(l.createElement)("span",{className:o})}function Lf(e){var t=e.additionalControls,n=e.children,r=e.renderSettings,o=e.position,c=void 0===o?"bottom center":o,a=e.focusOnMount,s=void 0===a?"firstElement":a,u=Object(j.a)(e,["additionalControls","children","renderSettings","position","focusOnMount"]),d=Object(l.useState)(!1),b=Object(To.a)(d,2),f=b[0],p=b[1],m=!!r&&f;return Object(l.createElement)(v.Popover,Object(i.a)({className:"block-editor-url-popover",focusOnMount:s,position:c},u),Object(l.createElement)("div",{className:"block-editor-url-popover__input-container"},Object(l.createElement)("div",{className:"block-editor-url-popover__row"},n,!!r&&Object(l.createElement)(v.Button,{className:"block-editor-url-popover__settings-toggle",icon:ml.a,label:Object(y.__)("Link settings"),onClick:function(){p(!f)},"aria-expanded":f})),m&&Object(l.createElement)("div",{className:"block-editor-url-popover__row block-editor-url-popover__settings"},r())),t&&!m&&Object(l.createElement)("div",{className:"block-editor-url-popover__additional-controls"},t))}Lf.LinkEditor=function(e){var t=e.autocompleteRef,n=e.className,r=e.onChangeInputValue,o=e.value,c=Object(j.a)(e,["autocompleteRef","className","onChangeInputValue","value"]);return Object(l.createElement)("form",Object(i.a)({className:u()("block-editor-url-popover__link-editor",n)},c),Object(l.createElement)(af,{value:o,onChange:r,autocompleteRef:t}),Object(l.createElement)(v.Button,{icon:Zb.a,label:Object(y.__)("Apply"),type:"submit"}))},Lf.LinkViewer=function(e){var t=e.className,n=e.linkClassName,r=e.onEditLinkClick,o=e.url,c=e.urlLabel,a=Object(j.a)(e,["className","linkClassName","onEditLinkClick","url","urlLabel"]);return Object(l.createElement)("div",Object(i.a)({className:u()("block-editor-url-popover__link-viewer",t)},a),Object(l.createElement)(Rf,{url:o,urlLabel:c,className:n}),r&&Object(l.createElement)(v.Button,{icon:Af.a,label:Object(y.__)("Edit"),onClick:r}))};var Mf=Lf,Ff=function(e){var t=e.src,n=e.onChange,r=e.onSubmit,o=e.onClose;return Object(l.createElement)(Mf,{onClose:o},Object(l.createElement)("form",{className:"block-editor-media-placeholder__url-input-form",onSubmit:r},Object(l.createElement)("input",{className:"block-editor-media-placeholder__url-input-field",type:"url","aria-label":Object(y.__)("URL"),placeholder:Object(y.__)("Paste or type URL"),onChange:n,value:t}),Object(l.createElement)(v.Button,{className:"block-editor-media-placeholder__url-input-submit-button",icon:Zb.a,label:Object(y.__)("Apply"),type:"submit"})))},Vf=Object(v.withFilters)("editor.MediaPlaceholder")((function(e){var t=e.value,n=void 0===t?{}:t,r=e.allowedTypes,o=e.className,c=e.icon,i=e.labels,a=void 0===i?{}:i,s=e.mediaPreview,b=e.notices,f=e.isAppender,p=e.accept,g=e.addToGallery,O=e.multiple,h=void 0!==O&&O,j=e.dropZoneUIOnly,k=e.disableDropZone,_=e.disableMediaButtons,E=e.onError,w=e.onSelect,C=e.onCancel,S=e.onSelectURL,B=e.onDoubleClick,I=e.onFilesPreUpload,x=void 0===I?d.noop:I,P=e.onHTMLDrop,T=void 0===P?d.noop:P,N=e.children,D=Object(m.useSelect)((function(e){return(0,e(pr).getSettings)().mediaUpload}),[]),A=Object(l.useState)(""),R=Object(To.a)(A,2),L=R[0],M=R[1],F=Object(l.useState)(!1),V=Object(To.a)(F,2),H=V[0],z=V[1];Object(l.useEffect)((function(){var e;M(null!==(e=null==n?void 0:n.src)&&void 0!==e?e:"")}),[null==n?void 0:n.src]);var G=function(e){M(e.target.value)},U=function(){z(!0)},W=function(){z(!1)},K=function(e){e.preventDefault(),L&&S&&(S(L),W())},q=function(e){var t;if(x(e),h)if(g){var o=[];t=function(e){var t=(null!=n?n:[]).filter((function(e){return e.id?!o.some((function(t){var n=t.id;return Number(n)===Number(e.id)})):!o.some((function(t){var n=t.urlSlug;return e.url.includes(n)}))}));w(t.concat(e)),o=e.map((function(e){var t=e.url.lastIndexOf("."),n=e.url.slice(0,t);return{id:e.id,urlSlug:n}}))}}else t=w;else t=function(e){var t=Object(To.a)(e,1)[0];return w(t)};D({allowedTypes:r,filesList:e,onFileChange:t,onError:E})},$=function(e){q(e.target.files)},Y=function(e,t){var n=a.instructions,i=a.title;if(D||S||(n=Object(y.__)("To edit this block, you need permission to upload media.")),void 0===n||void 0===i){var d=null!=r?r:[],p=Object(To.a)(d,1)[0],m=1===d.length,g=m&&"audio"===p,O=m&&"image"===p,h=m&&"video"===p;void 0===n&&D&&(n=Object(y.__)("Upload a media file or pick one from your media library."),g?n=Object(y.__)("Upload an audio file, pick one from your media library, or add one with a URL."):O?n=Object(y.__)("Upload an image file, pick one from your media library, or add one with a URL."):h&&(n=Object(y.__)("Upload a video file, pick one from your media library, or add one with a URL."))),void 0===i&&(i=Object(y.__)("Media"),g?i=Object(y.__)("Audio"):O?i=Object(y.__)("Image"):h&&(i=Object(y.__)("Video")))}var j=u()("block-editor-media-placeholder",o,{"is-appender":f});return Object(l.createElement)(v.Placeholder,{icon:c,label:i,instructions:n,className:j,notices:b,onClick:t,onDoubleClick:B,preview:s},e,N)},X=function(){return k?null:Object(l.createElement)(v.DropZone,{onFilesDrop:q,onHTMLDrop:T})},Q=function(){return C&&Object(l.createElement)(v.Button,{className:"block-editor-media-placeholder__cancel-button",title:Object(y.__)("Cancel"),isLink:!0,onClick:C},Object(y.__)("Cancel"))},Z=function(){return S&&Object(l.createElement)("div",{className:"block-editor-media-placeholder__url-input-container"},Object(l.createElement)(v.Button,{className:"block-editor-media-placeholder__button",onClick:U,isPressed:H,isTertiary:!0},Object(y.__)("Insert from URL")),H&&Object(l.createElement)(Ff,{src:L,onChange:G,onSubmit:K,onClose:W}))};return j||_?(j&&Wl()("wp.blockEditor.MediaPlaceholder dropZoneUIOnly prop",{alternative:"disableMediaButtons"}),Object(l.createElement)(Nf,null,X())):Object(l.createElement)(Nf,{fallback:Y(Z())},function(){var e=Object(l.createElement)(Tf,{addToGallery:g,gallery:h&&!(!r||0===r.length)&&r.every((function(e){return"image"===e||e.startsWith("image/")})),multiple:h,onSelect:w,allowedTypes:r,value:Array.isArray(n)?n.map((function(e){return e.id})):n.id,render:function(e){var t=e.open;return Object(l.createElement)(v.Button,{isTertiary:!0,onClick:function(e){e.stopPropagation(),t()}},Object(y.__)("Media Library"))}});if(D&&f)return Object(l.createElement)(l.Fragment,null,X(),Object(l.createElement)(v.FormFileUpload,{onChange:$,accept:p,multiple:h,render:function(t){var n=t.openFileDialog,r=Object(l.createElement)(l.Fragment,null,Object(l.createElement)(v.Button,{isPrimary:!0,className:u()("block-editor-media-placeholder__button","block-editor-media-placeholder__upload-button")},Object(y.__)("Upload")),e,Z(),Q());return Y(r,n)}}));if(D){var t=Object(l.createElement)(l.Fragment,null,X(),Object(l.createElement)(v.FormFileUpload,{isPrimary:!0,className:u()("block-editor-media-placeholder__button","block-editor-media-placeholder__upload-button"),onChange:$,accept:p,multiple:h},Object(y.__)("Upload")),e,Z(),Q());return Y(t)}return Y(e)}())})),Hf=Object(l.forwardRef)((function(e,t){return Object(l.createElement)(ib,Object(i.a)({ref:t},e,{__unstableDisableFormats:!0,preserveWhiteSpace:!0}))}));Hf.Content=function(e){var t=e.value,n=void 0===t?"":t,r=e.tagName,o=void 0===r?"div":r,c=Object(j.a)(e,["value","tagName"]);return Object(l.createElement)(o,c,n)};var zf=Hf,Gf=Object(l.forwardRef)((function(e,t){var n=e.__experimentalVersion,r=Object(j.a)(e,["__experimentalVersion"]);if(2===n)return Object(l.createElement)(zf,Object(i.a)({ref:t},r));var o=r.className,c=r.onChange,a=Object(j.a)(r,["className","onChange"]);return Object(l.createElement)(Dl.a,Object(i.a)({ref:t,className:u()("block-editor-plain-text",o),onChange:function(e){return c(e.target.value)}},a))}));function Uf(e){var t=e.property,n=e.viewport,r=e.desc,o=Object(b.useInstanceId)(Uf),c=r||Object(y.sprintf)(
68
  /* translators: 1: property name. 2: viewport name. */
69
- Object(y._x)("Controls the %1$s property for %2$s viewports.","Text labelling a interface as controlling a given layout property (eg: margin) for a given screen size."),t,n.label);return Object(l.createElement)(l.Fragment,null,Object(l.createElement)("span",{"aria-describedby":"rbc-desc-".concat(o)},n.label),Object(l.createElement)(v.VisuallyHidden,{as:"span",id:"rbc-desc-".concat(o)},c))}var Wf=function(e){var t=e.title,n=e.property,r=e.toggleLabel,o=e.onIsResponsiveChange,c=e.renderDefaultControl,i=e.renderResponsiveControls,a=e.isResponsive,s=void 0!==a&&a,d=e.defaultLabel,b=void 0===d?{id:"all",
70
  /* translators: 'Label. Used to signify a layout property (eg: margin, padding) will apply uniformly to all screensizes.' */
71
  label:Object(y.__)("All")}:d,f=e.viewports,p=void 0===f?[{id:"small",label:Object(y.__)("Small screens")},{id:"medium",label:Object(y.__)("Medium screens")},{id:"large",label:Object(y.__)("Large screens")}]:f;if(!t||!n||!c)return null;var m=r||Object(y.sprintf)(
72
  /* translators: 'Toggle control label. Should the property be the same across all screen sizes or unique per screen size.'. %s property value for the control (eg: margin, padding...etc) */
73
- Object(y.__)("Use the same %s on all screensizes."),n),g=Object(y.__)("Toggle between using the same value for all screen sizes or using a unique value per screen size."),O=c(Object(l.createElement)(Uf,{property:n,viewport:b}),b);
74
- /* translators: 'Help text for the responsive mode toggle control.' */return Object(l.createElement)("fieldset",{className:"block-editor-responsive-block-control"},Object(l.createElement)("legend",{className:"block-editor-responsive-block-control__title"},t),Object(l.createElement)("div",{className:"block-editor-responsive-block-control__inner"},Object(l.createElement)(v.ToggleControl,{className:"block-editor-responsive-block-control__toggle",label:m,checked:!s,onChange:o,help:g}),Object(l.createElement)("div",{className:u()("block-editor-responsive-block-control__group",{"is-responsive":s})},!s&&O,s&&(i?i(p):p.map((function(e){return Object(l.createElement)(l.Fragment,{key:e.id},c(Object(l.createElement)(Uf,{property:n,viewport:e}),e))}))))))};function Kf(e){var t=e.character,n=e.type,r=e.onUse;return Object(b.useKeyboardShortcut)(Nc.rawShortcut[n](t),(function(){return r(),!1}),{bindGlobal:!0}),null}function qf(e){var t,n=e.name,r=e.shortcutType,o=e.shortcutCharacter,c=Object(j.a)(e,["name","shortcutType","shortcutCharacter"]),a="RichText.ToolbarControls";return n&&(a+=".".concat(n)),r&&o&&(t=Nc.displayShortcut[r](o)),Object(l.createElement)(v.Fill,{name:a},Object(l.createElement)(v.ToolbarButton,Object(i.a)({},c,{shortcut:t})))}var $f=function(e){Object(xi.a)(o,e);var t,n,r=(t=o,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=Object(Ti.a)(t);if(n){var o=Object(Ti.a)(this).constructor;e=Reflect.construct(r,arguments,o)}else e=r.apply(this,arguments);return Object(Pi.a)(this,e)});function o(){var e;return Object(Si.a)(this,o),(e=r.apply(this,arguments)).onInput=e.onInput.bind(Object(Ii.a)(e)),e}return Object(Bi.a)(o,[{key:"onInput",value:function(e){e.inputType===this.props.inputType&&this.props.onInput()}},{key:"componentDidMount",value:function(){document.addEventListener("input",this.onInput,!0)}},{key:"componentWillUnmount",value:function(){document.removeEventListener("input",this.onInput,!0)}},{key:"render",value:function(){return null}}]),o}(l.Component),Yf=Object(l.createElement)(v.SVG,{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},Object(l.createElement)(v.Path,{d:"M9.4 20.5L5.2 3.8l14.6 9-2 .3c-.2 0-.4.1-.7.1-.9.2-1.6.3-2.2.5-.8.3-1.4.5-1.8.8-.4.3-.8.8-1.3 1.5-.4.5-.8 1.2-1.2 2l-.3.6-.9 1.9zM7.6 7.1l2.4 9.3c.2-.4.5-.8.7-1.1.6-.8 1.1-1.4 1.6-1.8.5-.4 1.3-.8 2.2-1.1l1.2-.3-8.1-5z"})),Xf=Object(l.forwardRef)((function(e,t){var n=Object(m.useSelect)((function(e){return e(pr).isNavigationMode()}),[]),r=Object(m.useDispatch)(pr).setNavigationMode,o=function(e){r("edit"!==e)};return Object(l.createElement)(v.Dropdown,{renderToggle:function(r){var o=r.isOpen,c=r.onToggle;return Object(l.createElement)(v.Button,Object(i.a)({},e,{ref:t,icon:n?Yf:Af.a,"aria-expanded":o,"aria-haspopup":"true",onClick:c
75
- /* translators: button label text should, if possible, be under 16 characters. */,label:Object(y.__)("Modes")}))},position:"bottom right",renderContent:function(){return Object(l.createElement)(l.Fragment,null,Object(l.createElement)(v.NavigableMenu,{role:"menu","aria-label":Object(y.__)("Modes")},Object(l.createElement)(v.MenuItemsChoice,{value:n?"select":"edit",onSelect:o,choices:[{value:"edit",label:Object(l.createElement)(l.Fragment,null,Object(l.createElement)(Hl.a,{icon:Af.a}),Object(y.__)("Edit"))},{value:"select",label:Object(l.createElement)(l.Fragment,null,Yf,Object(y.__)("Select"))}]})),Object(l.createElement)("div",{className:"block-editor-tool-selector__help"},Object(y.__)("Tools offer different interactions for block selection & editing. To select, press Escape, to go back to editing, press Enter.")))}})})),Qf=n(216),Zf=Object(l.createElement)(kr.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(l.createElement)(kr.Path,{d:"M9.737 18.011L3.98 12.255l5.734-6.28 1.107 1.012-4.103 4.494h13.3v1.5H6.828l3.97 3.97-1.06 1.06z"}));var Jf=function(e){Object(xi.a)(o,e);var t,n,r=(t=o,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=Object(Ti.a)(t);if(n){var o=Object(Ti.a)(this).constructor;e=Reflect.construct(r,arguments,o)}else e=r.apply(this,arguments);return Object(Pi.a)(this,e)});function o(){var e;return Object(Si.a)(this,o),(e=r.apply(this,arguments)).toggle=e.toggle.bind(Object(Ii.a)(e)),e.submitLink=e.submitLink.bind(Object(Ii.a)(e)),e.state={expanded:!1},e}return Object(Bi.a)(o,[{key:"toggle",value:function(){this.setState({expanded:!this.state.expanded})}},{key:"submitLink",value:function(e){e.preventDefault(),this.toggle()}},{key:"render",value:function(){var e=this.props,t=e.url,n=e.onChange,r=this.state.expanded,o=t?Object(y.__)("Edit link"):Object(y.__)("Insert link");return Object(l.createElement)("div",{className:"block-editor-url-input__button"},Object(l.createElement)(v.Button,{icon:Qf.a,label:o,onClick:this.toggle,className:"components-toolbar__control",isPressed:!!t}),r&&Object(l.createElement)("form",{className:"block-editor-url-input__button-modal",onSubmit:this.submitLink},Object(l.createElement)("div",{className:"block-editor-url-input__button-modal-line"},Object(l.createElement)(v.Button,{className:"block-editor-url-input__back",icon:Zf,label:Object(y.__)("Close"),onClick:this.toggle}),Object(l.createElement)(af,{value:t||"",onChange:n}),Object(l.createElement)(v.Button,{icon:Zb.a,label:Object(y.__)("Submit"),type:"submit"}))))}}]),o}(l.Component),ep=n(147),tp=["noreferrer","noopener"],np=Object(l.createElement)(v.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},Object(l.createElement)(v.Path,{d:"M0,0h24v24H0V0z",fill:"none"}),Object(l.createElement)(v.Path,{d:"m19 5v14h-14v-14h14m0-2h-14c-1.1 0-2 0.9-2 2v14c0 1.1 0.9 2 2 2h14c1.1 0 2-0.9 2-2v-14c0-1.1-0.9-2-2-2z"}),Object(l.createElement)(v.Path,{d:"m14.14 11.86l-3 3.87-2.14-2.59-3 3.86h12l-3.86-5.14z"})),rp=function(e){var t=e.linkDestination,n=e.onChangeUrl,r=e.url,o=e.mediaType,c=void 0===o?"image":o,i=e.mediaUrl,a=e.mediaLink,s=e.linkTarget,u=e.linkClass,b=e.rel,f=Object(l.useState)(!1),p=Object(To.a)(f,2),m=p[0],g=p[1],O=Object(l.useCallback)((function(){g(!0)})),h=Object(l.useState)(!1),j=Object(To.a)(h,2),k=j[0],_=j[1],E=Object(l.useState)(null),w=Object(To.a)(E,2),C=w[0],S=w[1],B=Object(l.useRef)(null),I=Object(l.useCallback)((function(){"media"!==t&&"attachment"!==t||S(""),_(!0)})),x=Object(l.useCallback)((function(){_(!1)})),P=Object(l.useCallback)((function(){S(null),x(),g(!1)})),T=function(e){var t=e;return void 0===e||Object(d.isEmpty)(t)||Object(d.isEmpty)(t)||(Object(d.each)(tp,(function(e){var n=new RegExp("\\b"+e+"\\b","gi");t=t.replace(n,"")})),t!==e&&(t=t.trim()),Object(d.isEmpty)(t)&&(t=void 0)),t},N=Object(l.useCallback)((function(){return function(e){var t=B.current;t&&t.contains(e.target)||(g(!1),S(null),x())}})),D=Object(l.useCallback)((function(){return function(e){if(C){var t,r=(null===(t=R().find((function(e){return e.url===C})))||void 0===t?void 0:t.linkDestination)||"custom";n({href:C,linkDestination:r})}x(),S(null),e.preventDefault()}})),A=Object(l.useCallback)((function(){n({linkDestination:"none",href:""})})),R=function(){var e=[{linkDestination:"media",title:Object(y.__)("Media File"),url:"image"===c?i:void 0,icon:np}];return"image"===c&&a&&e.push({linkDestination:"attachment",title:Object(y.__)("Attachment Page"),url:"image"===c?a:void 0,icon:Object(l.createElement)(v.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},Object(l.createElement)(v.Path,{d:"M0 0h24v24H0V0z",fill:"none"}),Object(l.createElement)(v.Path,{d:"M14 2H6c-1.1 0-1.99.9-1.99 2L4 20c0 1.1.89 2 1.99 2H18c1.1 0 2-.9 2-2V8l-6-6zM6 20V4h7v5h5v11H6z"}))}),e},L=Object(l.createElement)(l.Fragment,null,Object(l.createElement)(v.ToggleControl,{label:Object(y.__)("Open in new tab"),onChange:function(e){var t=function(e){var t=e?"_blank":void 0;return{linkTarget:t,rel:t||b?T(b):void 0}}(e);n(t)},checked:"_blank"===s}),Object(l.createElement)(v.TextControl,{label:Object(y.__)("Link Rel"),value:T(b)||"",onChange:function(e){n({rel:e})}}),Object(l.createElement)(v.TextControl,{label:Object(y.__)("Link CSS Class"),value:u||"",onChange:function(e){n({linkClass:e})}})),M=null!==C?C:r,F=(Object(d.find)(R(),["linkDestination",t])||{}).title;return Object(l.createElement)(l.Fragment,null,Object(l.createElement)(v.ToolbarButton,{icon:Qf.a,className:"components-toolbar__control",label:r?Object(y.__)("Edit link"):Object(y.__)("Insert link"),"aria-expanded":m,onClick:O}),m&&Object(l.createElement)(Mf,{onFocusOutside:N(),onClose:P,renderSettings:function(){return L},additionalControls:!M&&Object(l.createElement)(v.NavigableMenu,null,Object(d.map)(R(),(function(e){return Object(l.createElement)(v.MenuItem,{key:e.linkDestination,icon:e.icon,onClick:function(){var t,r,o;S(null),t=e.url,o=R(),r=t?(Object(d.find)(o,(function(e){return e.url===t}))||{linkDestination:"custom"}).linkDestination:"none",n({linkDestination:r,href:t}),x()}},e.title)})))},(!r||k)&&Object(l.createElement)(Mf.LinkEditor,{className:"block-editor-format-toolbar__link-container-content",value:M,onChangeInputValue:S,onSubmit:D(),autocompleteRef:B}),r&&!k&&Object(l.createElement)(l.Fragment,null,Object(l.createElement)(Mf.LinkViewer,{className:"block-editor-format-toolbar__link-container-content",url:r,onEditLinkClick:I,urlLabel:F}),Object(l.createElement)(v.Button,{icon:ep.a,label:Object(y.__)("Remove link"),onClick:A}))))},op=n(148);function cp(e){var t=e.children,n=e.className,r=e.isEnabled,o=void 0===r||r,c=e.deviceType,i=e.setDeviceType;if(Object(b.useViewportMatch)("small","<"))return null;var a={className:u()(n,"block-editor-post-preview__dropdown-content"),position:"bottom left"},s={isTertiary:!0,className:"block-editor-post-preview__button-toggle",disabled:!o,
76
  /* translators: button label text should, if possible, be under 16 characters. */
77
- children:Object(y.__)("Preview")};return Object(l.createElement)(v.DropdownMenu,{className:"block-editor-post-preview__dropdown",popoverProps:a,toggleProps:s,icon:null},(function(){return Object(l.createElement)(l.Fragment,null,Object(l.createElement)(v.MenuGroup,null,Object(l.createElement)(v.MenuItem,{className:"block-editor-post-preview__button-resize",onClick:function(){return i("Desktop")},icon:"Desktop"===c&&op.a},Object(y.__)("Desktop")),Object(l.createElement)(v.MenuItem,{className:"block-editor-post-preview__button-resize",onClick:function(){return i("Tablet")},icon:"Tablet"===c&&op.a},Object(y.__)("Tablet")),Object(l.createElement)(v.MenuItem,{className:"block-editor-post-preview__button-resize",onClick:function(){return i("Mobile")},icon:"Mobile"===c&&op.a},Object(y.__)("Mobile"))),t)}))}var ip=n(328),ap=/\((min|max)-width:[^\(]*?\)/g;function lp(e){return!!e.media&&!!e.media.mediaText.match(ap)}function sp(e,t,n){e.deleteRule(n),e.insertRule(t,n)}function up(e,t){return e.replace(ap,(function(e){return Object(ip.match)(e,{type:"screen",width:t})?"(min-width:0px)":"(min-width:999999px)"}))}function dp(e,t){Object(l.useEffect)((function(){if(t){var n,r,o,c="undefined"==typeof window?[]:Object(d.filter)(null!==(n=null===(r=window)||void 0===r||null===(o=r.document)||void 0===o?void 0:o.styleSheets)&&void 0!==n?n:[],(function(e){return!!e.href&&Object(Os.getProtocol)(e.href)===window.location.protocol&&Object(Os.getAuthority)(e.href)===window.location.host})),i=[];return c.forEach((function(n,r){for(var o=!1,c=0;c<n.cssRules.length;++c){var a=n.cssRules[c];if((a.type===window.CSSRule.STYLE_RULE||a.type===window.CSSRule.MEDIA_RULE)&&(!o&&a.cssText.match(new RegExp("#start-".concat(e)))&&(o=!0),o&&a.cssText.match(new RegExp("#end-".concat(e)))&&(o=!1),o&&lp(a))){var l=a.cssText;i[r]||(i[r]=[]),i[r][c]=l,sp(n,up(l,t),c)}}})),function(){i.forEach((function(e,t){if(e)for(var n=0;n<e.length;++n){var r=e[n];r&&sp(c[t],r,n)}}))}}}),[t])}function bp(e,t){var n=Object(l.useState)(window.innerWidth),r=Object(To.a)(n,2),o=r[0],c=r[1];Object(l.useEffect)((function(){if("Desktop"!==e){var t=function(){return c(window.innerWidth)};return window.addEventListener("resize",t),function(){window.removeEventListener("resize",t)}}}),[e]);var i=function(e){var t;switch(e){case"Tablet":t=780;break;case"Mobile":t=360;break;default:return null}return t<o?t:o};return dp("resizable-editor-section",t?null:i(e)),function(e){var t="Mobile"===e?"768px":"1024px";switch(e){case"Tablet":case"Mobile":return{width:i(e),margin:(window.innerHeight<800?36:72)+"px auto",flexGrow:0,height:t,minHeight:t,maxHeight:t,overflowY:"auto"};default:return null}}(e)}var fp=Object(m.withSelect)((function(e){return{selectedBlockClientId:e(pr).getBlockSelectionStart()}}))((function(e){var t=e.selectedBlockClientId;return t?Object(l.createElement)(v.Button,{isSecondary:!0,className:"block-editor-skip-to-selected-block",onClick:function(){Jo(t,document).focus()}},Object(y.__)("Skip to the selected block")):null})),pp=n(139),mp=Object(m.withSelect)((function(e){return{blocks:(0,e(pr).getMultiSelectedBlocks)()}}))((function(e){var t=e.blocks,n=Object(pp.count)(Object(p.serialize)(t),"words");return Object(l.createElement)("div",{className:"block-editor-multi-selection-inspector__card"},Object(l.createElement)(xa,{icon:lu,showColors:!0}),Object(l.createElement)("div",{className:"block-editor-multi-selection-inspector__card-content"},Object(l.createElement)("div",{className:"block-editor-multi-selection-inspector__card-title"},Object(y.sprintf)(
78
  /* translators: %d: number of blocks */
79
  Object(y._n)("%d block","%d blocks",t.length),t.length)),Object(l.createElement)("div",{className:"block-editor-multi-selection-inspector__card-description"},Object(y.sprintf)(
80
  /* translators: %d: number of words */
81
- Object(y._n)("%d word","%d words",n),n))))}));function vp(e){var t=e.blockName,n=Object(m.useSelect)((function(e){var n,r,o=e(pr).getSettings().__experimentalPreferredStyleVariations;return{preferredStyle:null==o||null===(n=o.value)||void 0===n?void 0:n[t],onUpdatePreferredStyleVariations:null!==(r=null==o?void 0:o.onChange)&&void 0!==r?r:null,styles:e(p.store).getBlockStyles(t)}}),[t]),r=n.preferredStyle,o=n.onUpdatePreferredStyleVariations,c=n.styles,i=Object(l.useMemo)((function(){return[{label:Object(y.__)("Not set"),value:""}].concat(Object(k.a)(c.map((function(e){return{label:e.label,value:e.name}}))))}),[c]),a=Object(l.useCallback)((function(e){o(t,e)}),[t,o]);return o&&Object(l.createElement)(v.SelectControl,{options:i,value:r||"",label:Object(y.__)("Default Style"),onChange:a})}var gp=function(e){var t=e.clientId,n=e.blockName,r=e.hasBlockStyles,o=e.bubblesVirtually,c=La(t);return Object(l.createElement)("div",{className:"block-editor-block-inspector"},Object(l.createElement)(Kl,c),Object(l.createElement)(bb,{blockClientId:t}),r&&Object(l.createElement)("div",null,Object(l.createElement)(v.PanelBody,{title:Object(y.__)("Styles")},Object(l.createElement)(mu,{clientId:t}),Object(p.hasBlockSupport)(n,"defaultStylePicker",!0)&&Object(l.createElement)(vp,{blockName:n}))),Object(l.createElement)(Jr.Slot,{bubblesVirtually:o}),Object(l.createElement)("div",null,Object(l.createElement)(Op,{slotName:$r.slotName,bubblesVirtually:o})),Object(l.createElement)(fp,{key:"back"}))},Op=function(e){var t=e.slotName,n=e.bubblesVirtually,r=Object(v.__experimentalUseSlot)(t);return Boolean(r.fills&&r.fills.length)?Object(l.createElement)(v.PanelBody,{className:"block-editor-block-inspector__advanced",title:Object(y.__)("Advanced"),initialOpen:!1},Object(l.createElement)($r.Slot,{bubblesVirtually:n})):null},hp=Object(m.withSelect)((function(e){var t=e(pr),n=t.getSelectedBlockClientId,r=t.getSelectedBlockCount,o=t.getBlockName,c=e(p.store).getBlockStyles,i=n(),a=i&&o(i),l=i&&Object(p.getBlockType)(a),s=i&&c(a);return{count:r(),hasBlockStyles:s&&s.length>0,selectedBlockName:a,selectedBlockClientId:i,blockType:l}}))((function(e){var t=e.blockType,n=e.count,r=e.hasBlockStyles,o=e.selectedBlockClientId,c=e.selectedBlockName,i=e.showNoBlockSelectedMessage,a=void 0===i||i,s=e.bubblesVirtually,u=void 0===s||s;if(n>1)return Object(l.createElement)("div",{className:"block-editor-block-inspector"},Object(l.createElement)(mp,null),Object(l.createElement)(Jr.Slot,{bubblesVirtually:u}));var d=c===Object(p.getUnregisteredTypeHandlerName)();return t&&o&&!d?Object(l.createElement)(gp,{clientId:o,blockName:t.name,hasBlockStyles:r,bubblesVirtually:u}):a?Object(l.createElement)("span",{className:"block-editor-block-inspector__no-blocks"},Object(y.__)("No block selected.")):null}));function jp(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function kp(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?jp(Object(n),!0).forEach((function(t){Object(a.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):jp(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var yp=Object(l.forwardRef)((function(e,t){var n=e.children,r=e.tagName,o=void 0===r?"div":r,c=Object(j.a)(e,["children","tagName"]);Wl()("wp.blockEditor.__experimentalBlock",{alternative:"wp.blockEditor.useBlockProps"});var i=md(kp(kp({},c),{},{ref:t}));return Object(l.createElement)(o,i,n)})),_p=["p","div","h1","h2","h3","h4","h5","h6","ol","ul","li","figure","nav","pre","header","section","aside","footer","main"].reduce((function(e,t){return e[t]=Object(l.forwardRef)((function(e,n){return Object(l.createElement)(yp,Object(i.a)({},e,{ref:n,tagName:t}))})),e}),yp);function Ep(e){var t=Object(m.useSelect)((function(e){var t=e(pr),n=t.hasSelectedBlock,r=t.hasMultiSelection;return n()||r()})),n=Object(m.useDispatch)(pr).clearSelectedBlock;Object(l.useEffect)((function(){if(t)return e.current.addEventListener("mousedown",r),function(){e.current.removeEventListener("mousedown",r)};function r(e){e.target.closest(".wp-block")||n()}}),[t,n])}function wp(e){var t=Object(l.useRef)();return Ep(t),Object(l.createElement)("div",Object(i.a)({ref:t},e))}var Cp=n(329),Sp=n.n(Cp),Bp=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g;function Ip(e){return e?e.replace(/^\s+|\s+$/g,""):""}var xp=n(195),Pp=n.n(xp),Tp=Np;function Np(e){this.options=e||{}}Np.prototype.emit=function(e){return e},Np.prototype.visit=function(e){return this[e.type](e)},Np.prototype.mapVisit=function(e,t){var n="";t=t||"";for(var r=0,o=e.length;r<o;r++)n+=this.visit(e[r]),t&&r<o-1&&(n+=this.emit(t));return n};var Dp=Ap;function Ap(e){Tp.call(this,e)}Pp()(Ap,Tp),Ap.prototype.compile=function(e){return e.stylesheet.rules.map(this.visit,this).join("")},Ap.prototype.comment=function(e){return this.emit("",e.position)},Ap.prototype.import=function(e){return this.emit("@import "+e.import+";",e.position)},Ap.prototype.media=function(e){return this.emit("@media "+e.media,e.position)+this.emit("{")+this.mapVisit(e.rules)+this.emit("}")},Ap.prototype.document=function(e){var t="@"+(e.vendor||"")+"document "+e.document;return this.emit(t,e.position)+this.emit("{")+this.mapVisit(e.rules)+this.emit("}")},Ap.prototype.charset=function(e){return this.emit("@charset "+e.charset+";",e.position)},Ap.prototype.namespace=function(e){return this.emit("@namespace "+e.namespace+";",e.position)},Ap.prototype.supports=function(e){return this.emit("@supports "+e.supports,e.position)+this.emit("{")+this.mapVisit(e.rules)+this.emit("}")},Ap.prototype.keyframes=function(e){return this.emit("@"+(e.vendor||"")+"keyframes "+e.name,e.position)+this.emit("{")+this.mapVisit(e.keyframes)+this.emit("}")},Ap.prototype.keyframe=function(e){var t=e.declarations;return this.emit(e.values.join(","),e.position)+this.emit("{")+this.mapVisit(t)+this.emit("}")},Ap.prototype.page=function(e){var t=e.selectors.length?e.selectors.join(", "):"";return this.emit("@page "+t,e.position)+this.emit("{")+this.mapVisit(e.declarations)+this.emit("}")},Ap.prototype["font-face"]=function(e){return this.emit("@font-face",e.position)+this.emit("{")+this.mapVisit(e.declarations)+this.emit("}")},Ap.prototype.host=function(e){return this.emit("@host",e.position)+this.emit("{")+this.mapVisit(e.rules)+this.emit("}")},Ap.prototype["custom-media"]=function(e){return this.emit("@custom-media "+e.name+" "+e.media+";",e.position)},Ap.prototype.rule=function(e){var t=e.declarations;return t.length?this.emit(e.selectors.join(","),e.position)+this.emit("{")+this.mapVisit(t)+this.emit("}"):""},Ap.prototype.declaration=function(e){return this.emit(e.property+":"+e.value,e.position)+this.emit(";")};var Rp=Lp;function Lp(e){e=e||{},Tp.call(this,e),this.indentation=e.indent}Pp()(Lp,Tp),Lp.prototype.compile=function(e){return this.stylesheet(e)},Lp.prototype.stylesheet=function(e){return this.mapVisit(e.stylesheet.rules,"\n\n")},Lp.prototype.comment=function(e){return this.emit(this.indent()+"/*"+e.comment+"*/",e.position)},Lp.prototype.import=function(e){return this.emit("@import "+e.import+";",e.position)},Lp.prototype.media=function(e){return this.emit("@media "+e.media,e.position)+this.emit(" {\n"+this.indent(1))+this.mapVisit(e.rules,"\n\n")+this.emit(this.indent(-1)+"\n}")},Lp.prototype.document=function(e){var t="@"+(e.vendor||"")+"document "+e.document;return this.emit(t,e.position)+this.emit(" {\n"+this.indent(1))+this.mapVisit(e.rules,"\n\n")+this.emit(this.indent(-1)+"\n}")},Lp.prototype.charset=function(e){return this.emit("@charset "+e.charset+";",e.position)},Lp.prototype.namespace=function(e){return this.emit("@namespace "+e.namespace+";",e.position)},Lp.prototype.supports=function(e){return this.emit("@supports "+e.supports,e.position)+this.emit(" {\n"+this.indent(1))+this.mapVisit(e.rules,"\n\n")+this.emit(this.indent(-1)+"\n}")},Lp.prototype.keyframes=function(e){return this.emit("@"+(e.vendor||"")+"keyframes "+e.name,e.position)+this.emit(" {\n"+this.indent(1))+this.mapVisit(e.keyframes,"\n")+this.emit(this.indent(-1)+"}")},Lp.prototype.keyframe=function(e){var t=e.declarations;return this.emit(this.indent())+this.emit(e.values.join(", "),e.position)+this.emit(" {\n"+this.indent(1))+this.mapVisit(t,"\n")+this.emit(this.indent(-1)+"\n"+this.indent()+"}\n")},Lp.prototype.page=function(e){var t=e.selectors.length?e.selectors.join(", ")+" ":"";return this.emit("@page "+t,e.position)+this.emit("{\n")+this.emit(this.indent(1))+this.mapVisit(e.declarations,"\n")+this.emit(this.indent(-1))+this.emit("\n}")},Lp.prototype["font-face"]=function(e){return this.emit("@font-face ",e.position)+this.emit("{\n")+this.emit(this.indent(1))+this.mapVisit(e.declarations,"\n")+this.emit(this.indent(-1))+this.emit("\n}")},Lp.prototype.host=function(e){return this.emit("@host",e.position)+this.emit(" {\n"+this.indent(1))+this.mapVisit(e.rules,"\n\n")+this.emit(this.indent(-1)+"\n}")},Lp.prototype["custom-media"]=function(e){return this.emit("@custom-media "+e.name+" "+e.media+";",e.position)},Lp.prototype.rule=function(e){var t=this.indent(),n=e.declarations;return n.length?this.emit(e.selectors.map((function(e){return t+e})).join(",\n"),e.position)+this.emit(" {\n")+this.emit(this.indent(1))+this.mapVisit(n,"\n")+this.emit(this.indent(-1))+this.emit("\n"+this.indent()+"}"):""},Lp.prototype.declaration=function(e){return this.emit(this.indent())+this.emit(e.property+": "+e.value,e.position)+this.emit(";")},Lp.prototype.indent=function(e){return this.level=this.level||1,null!==e?(this.level+=e,""):Array(this.level).join(this.indentation||" ")};var Mp=function(e,t){try{var n=function(e,t){t=t||{};var n=1,r=1;function o(e){var t=e.match(/\n/g);t&&(n+=t.length);var o=e.lastIndexOf("\n");r=~o?e.length-o:r+e.length}function c(){var e={line:n,column:r};return function(t){return t.position=new i(e),f(),t}}function i(e){this.start=e,this.end={line:n,column:r},this.source=t.source}i.prototype.content=e;var a=[];function l(o){var c=new Error(t.source+":"+n+":"+r+": "+o);if(c.reason=o,c.filename=t.source,c.line=n,c.column=r,c.source=e,!t.silent)throw c;a.push(c)}function s(){return b(/^{\s*/)}function u(){return b(/^}/)}function d(){var t,n,r,o=[];for(f(),p(o);e.length&&"}"!==e.charAt(0)&&(t=w()||(n=void 0,r=void 0,n=c(),(r=v())?(p(),n({type:"rule",selectors:r,declarations:O()})):l("selector missing")));)!1!==t&&(o.push(t),p(o));return o}function b(t){var n=t.exec(e);if(n){var r=n[0];return o(r),e=e.slice(r.length),n}}function f(){b(/^\s*/)}function p(e){var t;for(e=e||[];t=m();)!1!==t&&e.push(t);return e}function m(){var t=c();if("/"===e.charAt(0)&&"*"===e.charAt(1)){for(var n=2;""!==e.charAt(n)&&("*"!==e.charAt(n)||"/"!==e.charAt(n+1));)++n;if(n+=2,""===e.charAt(n-1))return l("End of comment missing");var i=e.slice(2,n-2);return r+=2,o(i),e=e.slice(n),r+=2,t({type:"comment",comment:i})}}function v(){var e=b(/^([^{]+)/);if(e)return Ip(e[0]).replace(/\/\*([^*]|[\r\n]|(\*+([^*/]|[\r\n])))*\*\/+/g,"").replace(/"(?:\\"|[^"])*"|'(?:\\'|[^'])*'/g,(function(e){return e.replace(/,/g,"‌")})).split(/\s*(?![^(]*\)),\s*/).map((function(e){return e.replace(/\u200C/g,",")}))}function g(){var e=c(),t=b(/^(\*?[-#\/\*\\\w]+(\[[0-9a-z_-]+\])?)\s*/);if(t){if(t=Ip(t[0]),!b(/^:\s*/))return l("property missing ':'");var n=b(/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^\)]*?\)|[^};])+)/),r=e({type:"declaration",property:t.replace(Bp,""),value:n?Ip(n[0]).replace(Bp,""):""});return b(/^[;\s]*/),r}}function O(){var e,t=[];if(!s())return l("missing '{'");for(p(t);e=g();)!1!==e&&(t.push(e),p(t));return u()?t:l("missing '}'")}function h(){for(var e,t=[],n=c();e=b(/^((\d+\.\d+|\.\d+|\d+)%?|[a-z]+)\s*/);)t.push(e[1]),b(/^,\s*/);if(t.length)return n({type:"keyframe",values:t,declarations:O()})}var j,k=E("import"),y=E("charset"),_=E("namespace");function E(e){var t=new RegExp("^@"+e+"\\s*([^;]+);");return function(){var n=c(),r=b(t);if(r){var o={type:e};return o[e]=r[1].trim(),n(o)}}}function w(){if("@"===e[0])return function(){var e=c(),t=b(/^@([-\w]+)?keyframes\s*/);if(t){var n=t[1];if(!(t=b(/^([-\w]+)\s*/)))return l("@keyframes missing name");var r,o=t[1];if(!s())return l("@keyframes missing '{'");for(var i=p();r=h();)i.push(r),i=i.concat(p());return u()?e({type:"keyframes",name:o,vendor:n,keyframes:i}):l("@keyframes missing '}'")}}()||function(){var e=c(),t=b(/^@media *([^{]+)/);if(t){var n=Ip(t[1]);if(!s())return l("@media missing '{'");var r=p().concat(d());return u()?e({type:"media",media:n,rules:r}):l("@media missing '}'")}}()||function(){var e=c(),t=b(/^@custom-media\s+(--[^\s]+)\s*([^{;]+);/);if(t)return e({type:"custom-media",name:Ip(t[1]),media:Ip(t[2])})}()||function(){var e=c(),t=b(/^@supports *([^{]+)/);if(t){var n=Ip(t[1]);if(!s())return l("@supports missing '{'");var r=p().concat(d());return u()?e({type:"supports",supports:n,rules:r}):l("@supports missing '}'")}}()||k()||y()||_()||function(){var e=c(),t=b(/^@([-\w]+)?document *([^{]+)/);if(t){var n=Ip(t[1]),r=Ip(t[2]);if(!s())return l("@document missing '{'");var o=p().concat(d());return u()?e({type:"document",document:r,vendor:n,rules:o}):l("@document missing '}'")}}()||function(){var e=c();if(b(/^@page */)){var t=v()||[];if(!s())return l("@page missing '{'");for(var n,r=p();n=g();)r.push(n),r=r.concat(p());return u()?e({type:"page",selectors:t,declarations:r}):l("@page missing '}'")}}()||function(){var e=c();if(b(/^@host\s*/)){if(!s())return l("@host missing '{'");var t=p().concat(d());return u()?e({type:"host",rules:t}):l("@host missing '}'")}}()||function(){var e=c();if(b(/^@font-face\s*/)){if(!s())return l("@font-face missing '{'");for(var t,n=p();t=g();)n.push(t),n=n.concat(p());return u()?e({type:"font-face",declarations:n}):l("@font-face missing '}'")}}()}return function e(t,n){var r=t&&"string"==typeof t.type,o=r?t:n;for(var c in t){var i=t[c];Array.isArray(i)?i.forEach((function(t){e(t,o)})):i&&"object"===Object(H.a)(i)&&e(i,o)}return r&&Object.defineProperty(t,"parent",{configurable:!0,writable:!0,enumerable:!1,value:n||null}),t}((j=d(),{type:"stylesheet",stylesheet:{source:t.source,rules:j,parsingErrors:a}}))}(e);return r=Sp.a.map(n,(function(e){if(!e)return e;var n=t(e);return this.update(n)})),((o=o||{}).compress?new Dp(o):new Rp(o)).compile(r)}catch(e){return console.warn("Error while traversing the CSS: "+e),null}var r,o};function Fp(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Vp(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Fp(Object(n),!0).forEach((function(t){Object(a.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Fp(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Hp(e){return 0!==e.value.indexOf("data:")&&0!==e.value.indexOf("#")&&(t=e.value,!/^\/(?!\/)/.test(t)&&!function(e){return/^(?:https?:)?\/\//.test(e)}(e.value));var t}function zp(e,t){return new URL(e,t).toString()}var Gp=function(e){return function(t){if("declaration"===t.type){var n=function(e){for(var t,n=/url\((\s*)(['"]?)(.+?)\2(\s*)\)/g,r=[];null!==(t=n.exec(e));){var o={source:t[0],before:t[1],quote:t[2],value:t[3],after:t[4]};Hp(o)&&r.push(o)}return r}(t.value).map((c=e,function(e){return Vp(Vp({},e),{},{newUrl:"url("+e.before+e.quote+zp(e.value,c)+e.quote+e.after+")"})}));return Vp(Vp({},t),{},{value:(r=t.value,o=n,o.forEach((function(e){r=r.replace(e.source,e.newUrl)})),r)})}var r,o,c;return t}};function Up(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Wp(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Up(Object(n),!0).forEach((function(t){Object(a.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Up(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Kp=/^(body|html|:root).*$/,qp=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return function(n){return"rule"===n.type?Wp(Wp({},n),{},{selectors:n.selectors.map((function(n){return t.includes(n.trim())?n:n.match(Kp)?n.replace(/^(body|html|:root)/,e):e+" "+n}))}):n}},$p=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return Object(d.map)(e,(function(e){var n=e.css,r=e.baseURL,o=e.__experimentalNoWrapper,c=[];return t&&!(void 0!==o&&o)&&c.push(qp(t)),r&&c.push(Gp(r)),c.length?Mp(n,Object(b.compose)(c)):n}))};function Yp(e){return Object(l.useCallback)((function(e){if(e){var t=e.ownerDocument,n=t.defaultView,r=t.body,o=t.querySelector(".editor-styles-wrapper"),c=n.getComputedStyle(o,null).getPropertyValue("background-color");yo()(c).getLuminance()>.5?r.classList.remove("is-dark-theme"):r.classList.add("is-dark-theme")}}),[e])}function Xp(e){var t=e.styles;return Object(l.createElement)(l.Fragment,null,Object(l.createElement)("style",{ref:Yp(t)}),$p(t,".editor-styles-wrapper").map((function(e,t){return Object(l.createElement)("style",{key:t},e)})))}var Qp=function(e){var t=e.rootClientId,n=e.clientId,r=e.isAppender,o=e.showInserterHelpPanel,c=e.showMostUsedBlocks,i=void 0!==c&&c,a=e.__experimentalSelectBlockOnInsert,s=e.__experimentalInsertionIndex,u=e.onSelect,b=void 0===u?d.noop:u,f=Object(m.useSelect)((function(e){var r=e(pr).getBlockRootClientId;return t||r(n)||void 0}),[n,t]);return Object(l.createElement)(Ts,{onSelect:b,rootClientId:f,clientId:n,isAppender:r,showInserterHelpPanel:o,showMostUsedBlocks:i,__experimentalSelectBlockOnInsert:a,__experimentalInsertionIndex:s})};function Zp(){var e=Object(m.useSelect)((function(e){var t=e(pr),n=t.getSelectedBlockClientIds,r=t.getBlockOrder,o=t.getBlockRootClientId,c=n(),i=Object(To.a)(c,1)[0];return{clientIds:c,rootBlocksClientIds:r(),rootClientId:o(i)}}),[]),t=e.clientIds,n=e.rootBlocksClientIds,r=e.rootClientId,o=Object(m.useDispatch)(pr),c=o.duplicateBlocks,i=o.removeBlocks,a=o.insertAfterBlock,s=o.insertBeforeBlock,u=o.multiSelect,b=o.clearSelectedBlock,f=o.moveBlocksUp,p=o.moveBlocksDown;return Object(nl.useShortcut)("core/block-editor/move-up",Object(l.useCallback)((function(e){e.preventDefault(),f(t,r)}),[t,f]),{bindGlobal:!0,isDisabled:0===t.length}),Object(nl.useShortcut)("core/block-editor/move-down",Object(l.useCallback)((function(e){e.preventDefault(),p(t,r)}),[t,p]),{bindGlobal:!0,isDisabled:0===t.length}),Object(nl.useShortcut)("core/block-editor/duplicate",Object(l.useCallback)((function(e){e.preventDefault(),c(t)}),[t,c]),{bindGlobal:!0,isDisabled:0===t.length}),Object(nl.useShortcut)("core/block-editor/remove",Object(l.useCallback)((function(e){e.preventDefault(),i(t)}),[t,i]),{bindGlobal:!0,isDisabled:0===t.length}),Object(nl.useShortcut)("core/block-editor/insert-after",Object(l.useCallback)((function(e){e.preventDefault(),a(Object(d.last)(t))}),[t,a]),{bindGlobal:!0,isDisabled:0===t.length}),Object(nl.useShortcut)("core/block-editor/insert-before",Object(l.useCallback)((function(e){e.preventDefault(),s(Object(d.first)(t))}),[t,s]),{bindGlobal:!0,isDisabled:0===t.length}),Object(nl.useShortcut)("core/block-editor/delete-multi-selection",Object(l.useCallback)((function(e){e.preventDefault(),i(t)}),[t,i]),{isDisabled:t.length<2}),Object(nl.useShortcut)("core/block-editor/select-all",Object(l.useCallback)((function(e){e.preventDefault(),u(Object(d.first)(n),Object(d.last)(n))}),[n,u])),Object(nl.useShortcut)("core/block-editor/unselect",Object(l.useCallback)((function(e){e.preventDefault(),b(),e.target.ownerDocument.defaultView.getSelection().removeAllRanges()}),[t,b]),{isDisabled:t.length<2}),null}Zp.Register=function(){var e=Object(m.useDispatch)(nl.store).registerShortcut;return Object(l.useEffect)((function(){e({name:"core/block-editor/duplicate",category:"block",description:Object(y.__)("Duplicate the selected block(s)."),keyCombination:{modifier:"primaryShift",character:"d"}}),e({name:"core/block-editor/remove",category:"block",description:Object(y.__)("Remove the selected block(s)."),keyCombination:{modifier:"access",character:"z"}}),e({name:"core/block-editor/insert-before",category:"block",description:Object(y.__)("Insert a new block before the selected block(s)."),keyCombination:{modifier:"primaryAlt",character:"t"}}),e({name:"core/block-editor/insert-after",category:"block",description:Object(y.__)("Insert a new block after the selected block(s)."),keyCombination:{modifier:"primaryAlt",character:"y"}}),e({name:"core/block-editor/delete-multi-selection",category:"block",description:Object(y.__)("Remove multiple selected blocks."),keyCombination:{character:"del"},aliases:[{character:"backspace"}]}),e({name:"core/block-editor/select-all",category:"selection",description:Object(y.__)("Select all text when typing. Press again to select all blocks."),keyCombination:{modifier:"primary",character:"a"}}),e({name:"core/block-editor/unselect",category:"selection",description:Object(y.__)("Clear selection."),keyCombination:{character:"escape"}}),e({name:"core/block-editor/focus-toolbar",category:"global",description:Object(y.__)("Navigate to the nearest toolbar."),keyCombination:{modifier:"alt",character:"F10"}}),e({name:"core/block-editor/move-up",category:"block",description:Object(y.__)("Move the selected block(s) up."),keyCombination:{modifier:"secondary",character:"t"}}),e({name:"core/block-editor/move-down",category:"block",description:Object(y.__)("Move the selected block(s) down."),keyCombination:{modifier:"secondary",character:"y"}})}),[e]),null};var Jp=Zp;function em(e){var t=Object(m.useSelect)((function(e){var t=e(pr),n=t.getBlockSelectionEnd,r=t.hasMultiSelection,o=t.isMultiSelecting,c=n();if(c&&!o()&&r())return c}),[]);Object(l.useEffect)((function(){if(t){var n=e.current.ownerDocument,r=Jo(t,n);if(r){var o=Object(il.getScrollContainer)(r);o&&of()(r,o,{onlyScrollIfNeeded:!0})}}}),[t])}function tm(){var e=Object(l.useRef)();return em(e),Object(l.createElement)("div",{ref:e})}var nm=new Set([Nc.UP,Nc.RIGHT,Nc.DOWN,Nc.LEFT,Nc.ENTER,Nc.BACKSPACE]);function rm(e){var t=Object(m.useSelect)((function(e){return e(pr).isTyping()})),n=Object(m.useDispatch)(pr).stopTyping;Object(l.useEffect)((function(){if(t){var r,o,c=e.current.ownerDocument;return c.addEventListener("mousemove",i),function(){c.removeEventListener("mousemove",i)}}function i(e){var t=e.clientX,c=e.clientY;r&&o&&(r!==t||o!==c)&&n(),r=t,o=c}}),[t,n])}function om(e){var t=Object(m.useSelect)((function(e){return e(pr).isTyping()})),n=Object(m.useDispatch)(pr),r=n.startTyping,o=n.stopTyping;rm(e),Object(l.useEffect)((function(){var n=e.current,c=n.ownerDocument,i=c.defaultView;if(t){var a;function l(e){var t=e.target;a=i.setTimeout((function(){Object(il.isTextField)(t)||o()}))}function s(e){var t=e.keyCode;t!==Nc.ESCAPE&&t!==Nc.TAB||o()}function u(){var e=i.getSelection();e.rangeCount>0&&e.getRangeAt(0).collapsed||o()}return n.addEventListener("focus",l),n.addEventListener("keydown",s),c.addEventListener("selectionchange",u),function(){i.clearTimeout(a),n.removeEventListener("focus",l),n.removeEventListener("keydown",s),c.removeEventListener("selectionchange",u)}}function d(e){var t=e.type,o=e.target;Object(il.isTextField)(o)&&n.contains(o)&&("keydown"!==t||function(e){var t=e.keyCode;return!e.shiftKey&&nm.has(t)}(e))&&r()}return n.addEventListener("keypress",d),n.addEventListener("keydown",d),function(){n.removeEventListener("keypress",d),n.removeEventListener("keydown",d)}}),[t,r,o])}var cm=function(e){var t=e.children,n=Object(l.useRef)();return om(n),Object(l.createElement)("div",{ref:n},t)};function im(){return Wl()("PreserveScrollInReorder component",{hint:"This behavior is now built-in the block list"}),null}var am=-1!==window.navigator.userAgent.indexOf("Trident"),lm=new Set([Nc.UP,Nc.DOWN,Nc.LEFT,Nc.RIGHT]);function sm(e){var t=Object(m.useSelect)((function(e){return e(pr).hasSelectedBlock()}));Object(l.useEffect)((function(){if(t){var n,r,o,c=e.current.ownerDocument,i=c.defaultView;return i.addEventListener("scroll",a,!0),i.addEventListener("resize",a,!0),e.current.addEventListener("keydown",l),e.current.addEventListener("keyup",s),e.current.addEventListener("mousedown",u),e.current.addEventListener("touchstart",u),function(){i.removeEventListener("scroll",a,!0),i.removeEventListener("resize",a,!0),e.current.removeEventListener("keydown",l),e.current.removeEventListener("keyup",s),e.current.removeEventListener("mousedown",u),e.current.removeEventListener("touchstart",u),c.removeEventListener("selectionchange",d),i.cancelAnimationFrame(n),i.cancelAnimationFrame(r)}}function a(){n||(n=i.requestAnimationFrame((function(){b(),n=null})))}function l(e){r&&i.cancelAnimationFrame(r),r=i.requestAnimationFrame((function(){s(e),r=null}))}function s(t){var n=t.keyCode;if(f()){var r=Object(il.computeCaretRect)(i);if(r)if(o)if(lm.has(n))o=r;else{var a=r.top-o.top;if(0!==a){var l=Object(il.getScrollContainer)(e.current);if(l){var s=l===c.body,u=s?i.scrollY:l.scrollTop,d=s?0:l.getBoundingClientRect().top,b=s?o.top/i.innerHeight:(o.top-d)/(i.innerHeight-d);if(0===u&&b<.75&&(p=e.current.querySelectorAll('[contenteditable="true"]'))[p.length-1]===c.activeElement)o=r;else{var p,m=s?i.innerHeight:l.clientHeight;o.top+o.height>d+m||o.top<d?o=r:s?i.scrollBy(0,a):l.scrollTop+=a}}}}else o=r}}function u(){c.addEventListener("selectionchange",d)}function d(){c.removeEventListener("selectionchange",d),b()}function b(){f()&&(o=Object(il.computeCaretRect)(i))}function f(){return e.current.contains(c.activeElement)&&c.activeElement.isContentEditable}}),[t])}var um=am?function(e){return e.children}:function(e){var t=e.children,n=Object(l.useRef)();return sm(n),Object(l.createElement)("div",{ref:n,className:"block-editor__typewriter"},t)},dm=Object(d.overEvery)([il.isTextField,il.focus.tabbable.isTabbableIndex]);function bm(e){Object(l.useEffect)((function(){function t(t){if(t.target===e.current){var n=il.focus.focusable.find(e.current),r=Object(d.findLast)(n,dm);r&&(Object(il.placeCaretAtHorizontalEdge)(r,!0),t.preventDefault())}}return e.current.addEventListener("mousedown",t),function(){e.current.addEventListener("mousedown",t)}}),[])}function fm(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function pm(e){e.dir=document.dir,e.body.className="editor-styles-wrapper";var t,n=function(e,t){var n;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return fm(e,void 0);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?fm(e,void 0):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var c,i=!0,a=!1;return{s:function(){n=e[Symbol.iterator]()},n:function(){var e=n.next();return i=e.done,e},e:function(e){a=!0,c=e},f:function(){try{i||null==n.return||n.return()}finally{if(a)throw c}}}}(document.body.classList);try{for(n.s();!(t=n.n()).done;){var r=t.value;r.startsWith("admin-color-")&&e.body.classList.add(r)}}catch(e){n.e(e)}finally{n.f()}}var mm=Object(l.forwardRef)((function(e,t){var n=e.contentRef,r=e.children,o=e.head,c=e.headHTML,a=Object(j.a)(e,["contentRef","children","head","headHTML"]),s=Object(l.useState)(),u=Object(To.a)(s,2),d=u[0],f=u[1],p=Object(l.useCallback)((function(e){function t(){var t,r=e.contentDocument,o=r.readyState,i=r.body;return("interactive"===o||"complete"===o)&&("function"==typeof n?n(i):n&&(n.current=i),function(e,t){e.head.innerHTML="<style>body{margin:0}</style>"+t}(r,c),pm(r),t=r,Array.from(document.styleSheets).forEach((function(e){try{e.cssRules}catch(e){return}var n=e.ownerNode,r=e.cssRules;r&&Array.from(r).find((function(e){var t=e.selectorText;return t&&(t.includes(".".concat("editor-styles-wrapper"))||t.includes(".".concat("wp-block")))}))&&!t.getElementById(n.id)&&t.head.appendChild(n.cloneNode(!0))})),function(e){var t=e.defaultView,n=t.frameElement;function r(e){var r=Object.getPrototypeOf(e).constructor.name,o=window[r],c={};for(var i in e)c[i]=e[i];if(e instanceof t.MouseEvent){var a=n.getBoundingClientRect();c.clientX+=a.left,c.clientY+=a.top}var l=new o(e.type,c);!n.dispatchEvent(l)&&e.preventDefault()}for(var o=0,c=["keydown","keypress","dragover"];o<c.length;o++){var i=c[o];e.addEventListener(i,r)}}(r),pm(r),f(r),!0)}e&&(t()||e.addEventListener("load",(function(){t()})))}),[]);return Object(l.createElement)("iframe",Object(i.a)({},a,{ref:Object(b.useMergeRefs)([t,p]),tabIndex:"0",title:Object(y.__)("Editor canvas"),name:"editor-canvas"}),d&&Object(l.createPortal)(r,d.body),d&&Object(l.createPortal)(o,d.head))})),vm=Object(l.createContext)(new Set);function gm(e){var t=Object(l.useContext)(vm),n=t.has(e),r=Object(l.useMemo)((function(){return n=e,(r=new Set(t)).add(n),r;var n,r}),[e,t]);return[n,Object(l.useCallback)((function(e){var t=e.children;return Object(l.createElement)(vm.Provider,{value:r},t)}),[r])]}function Om(e){if(void 0===e)e=E.colors;else{var t=e.filter((function(e){return e.color}));0===t.length?e=E.colors:t.length<e.length&&(e=t)}return e}function hm(e){if(void 0===e)e=E.gradients;else{var t=e.filter((function(e){return e.gradient}));0===t.length?e=E.gradients:t.length<e.length&&(e=t)}return e}},51:function(e,t){e.exports=window.wp.notices},52:function(e,t){e.exports=window.wp.blob},54:function(e,t){e.exports=window.wp.a11y},58:function(e,t,n){"use strict";function r(e,t){return(r=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}n.d(t,"a",(function(){return r}))},61:function(e,t,n){var r;!function(o){var c=/^\s+/,i=/\s+$/,a=0,l=o.round,s=o.min,u=o.max,d=o.random;function b(e,t){if(t=t||{},(e=e||"")instanceof b)return e;if(!(this instanceof b))return new b(e,t);var n=function(e){var t,n,r,a={r:0,g:0,b:0},l=1,d=null,b=null,f=null,p=!1,m=!1;return"string"==typeof e&&(e=function(e){e=e.replace(c,"").replace(i,"").toLowerCase();var t,n=!1;if(x[e])e=x[e],n=!0;else if("transparent"==e)return{r:0,g:0,b:0,a:0,format:"name"};return(t=G.rgb.exec(e))?{r:t[1],g:t[2],b:t[3]}:(t=G.rgba.exec(e))?{r:t[1],g:t[2],b:t[3],a:t[4]}:(t=G.hsl.exec(e))?{h:t[1],s:t[2],l:t[3]}:(t=G.hsla.exec(e))?{h:t[1],s:t[2],l:t[3],a:t[4]}:(t=G.hsv.exec(e))?{h:t[1],s:t[2],v:t[3]}:(t=G.hsva.exec(e))?{h:t[1],s:t[2],v:t[3],a:t[4]}:(t=G.hex8.exec(e))?{r:A(t[1]),g:A(t[2]),b:A(t[3]),a:F(t[4]),format:n?"name":"hex8"}:(t=G.hex6.exec(e))?{r:A(t[1]),g:A(t[2]),b:A(t[3]),format:n?"name":"hex"}:(t=G.hex4.exec(e))?{r:A(t[1]+""+t[1]),g:A(t[2]+""+t[2]),b:A(t[3]+""+t[3]),a:F(t[4]+""+t[4]),format:n?"name":"hex8"}:!!(t=G.hex3.exec(e))&&{r:A(t[1]+""+t[1]),g:A(t[2]+""+t[2]),b:A(t[3]+""+t[3]),format:n?"name":"hex"}}(e)),"object"==typeof e&&(U(e.r)&&U(e.g)&&U(e.b)?(t=e.r,n=e.g,r=e.b,a={r:255*N(t,255),g:255*N(n,255),b:255*N(r,255)},p=!0,m="%"===String(e.r).substr(-1)?"prgb":"rgb"):U(e.h)&&U(e.s)&&U(e.v)?(d=L(e.s),b=L(e.v),a=function(e,t,n){e=6*N(e,360),t=N(t,100),n=N(n,100);var r=o.floor(e),c=e-r,i=n*(1-t),a=n*(1-c*t),l=n*(1-(1-c)*t),s=r%6;return{r:255*[n,a,i,i,l,n][s],g:255*[l,n,n,a,i,i][s],b:255*[i,i,l,n,n,a][s]}}(e.h,d,b),p=!0,m="hsv"):U(e.h)&&U(e.s)&&U(e.l)&&(d=L(e.s),f=L(e.l),a=function(e,t,n){var r,o,c;function i(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+6*(t-e)*n:n<.5?t:n<2/3?e+(t-e)*(2/3-n)*6:e}if(e=N(e,360),t=N(t,100),n=N(n,100),0===t)r=o=c=n;else{var a=n<.5?n*(1+t):n+t-n*t,l=2*n-a;r=i(l,a,e+1/3),o=i(l,a,e),c=i(l,a,e-1/3)}return{r:255*r,g:255*o,b:255*c}}(e.h,d,f),p=!0,m="hsl"),e.hasOwnProperty("a")&&(l=e.a)),l=T(l),{ok:p,format:e.format||m,r:s(255,u(a.r,0)),g:s(255,u(a.g,0)),b:s(255,u(a.b,0)),a:l}}(e);this._originalInput=e,this._r=n.r,this._g=n.g,this._b=n.b,this._a=n.a,this._roundA=l(100*this._a)/100,this._format=t.format||n.format,this._gradientType=t.gradientType,this._r<1&&(this._r=l(this._r)),this._g<1&&(this._g=l(this._g)),this._b<1&&(this._b=l(this._b)),this._ok=n.ok,this._tc_id=a++}function f(e,t,n){e=N(e,255),t=N(t,255),n=N(n,255);var r,o,c=u(e,t,n),i=s(e,t,n),a=(c+i)/2;if(c==i)r=o=0;else{var l=c-i;switch(o=a>.5?l/(2-c-i):l/(c+i),c){case e:r=(t-n)/l+(t<n?6:0);break;case t:r=(n-e)/l+2;break;case n:r=(e-t)/l+4}r/=6}return{h:r,s:o,l:a}}function p(e,t,n){e=N(e,255),t=N(t,255),n=N(n,255);var r,o,c=u(e,t,n),i=s(e,t,n),a=c,l=c-i;if(o=0===c?0:l/c,c==i)r=0;else{switch(c){case e:r=(t-n)/l+(t<n?6:0);break;case t:r=(n-e)/l+2;break;case n:r=(e-t)/l+4}r/=6}return{h:r,s:o,v:a}}function m(e,t,n,r){var o=[R(l(e).toString(16)),R(l(t).toString(16)),R(l(n).toString(16))];return r&&o[0].charAt(0)==o[0].charAt(1)&&o[1].charAt(0)==o[1].charAt(1)&&o[2].charAt(0)==o[2].charAt(1)?o[0].charAt(0)+o[1].charAt(0)+o[2].charAt(0):o.join("")}function v(e,t,n,r){return[R(M(r)),R(l(e).toString(16)),R(l(t).toString(16)),R(l(n).toString(16))].join("")}function g(e,t){t=0===t?0:t||10;var n=b(e).toHsl();return n.s-=t/100,n.s=D(n.s),b(n)}function O(e,t){t=0===t?0:t||10;var n=b(e).toHsl();return n.s+=t/100,n.s=D(n.s),b(n)}function h(e){return b(e).desaturate(100)}function j(e,t){t=0===t?0:t||10;var n=b(e).toHsl();return n.l+=t/100,n.l=D(n.l),b(n)}function k(e,t){t=0===t?0:t||10;var n=b(e).toRgb();return n.r=u(0,s(255,n.r-l(-t/100*255))),n.g=u(0,s(255,n.g-l(-t/100*255))),n.b=u(0,s(255,n.b-l(-t/100*255))),b(n)}function y(e,t){t=0===t?0:t||10;var n=b(e).toHsl();return n.l-=t/100,n.l=D(n.l),b(n)}function _(e,t){var n=b(e).toHsl(),r=(n.h+t)%360;return n.h=r<0?360+r:r,b(n)}function E(e){var t=b(e).toHsl();return t.h=(t.h+180)%360,b(t)}function w(e){var t=b(e).toHsl(),n=t.h;return[b(e),b({h:(n+120)%360,s:t.s,l:t.l}),b({h:(n+240)%360,s:t.s,l:t.l})]}function C(e){var t=b(e).toHsl(),n=t.h;return[b(e),b({h:(n+90)%360,s:t.s,l:t.l}),b({h:(n+180)%360,s:t.s,l:t.l}),b({h:(n+270)%360,s:t.s,l:t.l})]}function S(e){var t=b(e).toHsl(),n=t.h;return[b(e),b({h:(n+72)%360,s:t.s,l:t.l}),b({h:(n+216)%360,s:t.s,l:t.l})]}function B(e,t,n){t=t||6,n=n||30;var r=b(e).toHsl(),o=360/n,c=[b(e)];for(r.h=(r.h-(o*t>>1)+720)%360;--t;)r.h=(r.h+o)%360,c.push(b(r));return c}function I(e,t){t=t||6;for(var n=b(e).toHsv(),r=n.h,o=n.s,c=n.v,i=[],a=1/t;t--;)i.push(b({h:r,s:o,v:c})),c=(c+a)%1;return i}b.prototype={isDark:function(){return this.getBrightness()<128},isLight:function(){return!this.isDark()},isValid:function(){return this._ok},getOriginalInput:function(){return this._originalInput},getFormat:function(){return this._format},getAlpha:function(){return this._a},getBrightness:function(){var e=this.toRgb();return(299*e.r+587*e.g+114*e.b)/1e3},getLuminance:function(){var e,t,n,r=this.toRgb();return e=r.r/255,t=r.g/255,n=r.b/255,.2126*(e<=.03928?e/12.92:o.pow((e+.055)/1.055,2.4))+.7152*(t<=.03928?t/12.92:o.pow((t+.055)/1.055,2.4))+.0722*(n<=.03928?n/12.92:o.pow((n+.055)/1.055,2.4))},setAlpha:function(e){return this._a=T(e),this._roundA=l(100*this._a)/100,this},toHsv:function(){var e=p(this._r,this._g,this._b);return{h:360*e.h,s:e.s,v:e.v,a:this._a}},toHsvString:function(){var e=p(this._r,this._g,this._b),t=l(360*e.h),n=l(100*e.s),r=l(100*e.v);return 1==this._a?"hsv("+t+", "+n+"%, "+r+"%)":"hsva("+t+", "+n+"%, "+r+"%, "+this._roundA+")"},toHsl:function(){var e=f(this._r,this._g,this._b);return{h:360*e.h,s:e.s,l:e.l,a:this._a}},toHslString:function(){var e=f(this._r,this._g,this._b),t=l(360*e.h),n=l(100*e.s),r=l(100*e.l);return 1==this._a?"hsl("+t+", "+n+"%, "+r+"%)":"hsla("+t+", "+n+"%, "+r+"%, "+this._roundA+")"},toHex:function(e){return m(this._r,this._g,this._b,e)},toHexString:function(e){return"#"+this.toHex(e)},toHex8:function(e){return function(e,t,n,r,o){var c=[R(l(e).toString(16)),R(l(t).toString(16)),R(l(n).toString(16)),R(M(r))];return o&&c[0].charAt(0)==c[0].charAt(1)&&c[1].charAt(0)==c[1].charAt(1)&&c[2].charAt(0)==c[2].charAt(1)&&c[3].charAt(0)==c[3].charAt(1)?c[0].charAt(0)+c[1].charAt(0)+c[2].charAt(0)+c[3].charAt(0):c.join("")}(this._r,this._g,this._b,this._a,e)},toHex8String:function(e){return"#"+this.toHex8(e)},toRgb:function(){return{r:l(this._r),g:l(this._g),b:l(this._b),a:this._a}},toRgbString:function(){return 1==this._a?"rgb("+l(this._r)+", "+l(this._g)+", "+l(this._b)+")":"rgba("+l(this._r)+", "+l(this._g)+", "+l(this._b)+", "+this._roundA+")"},toPercentageRgb:function(){return{r:l(100*N(this._r,255))+"%",g:l(100*N(this._g,255))+"%",b:l(100*N(this._b,255))+"%",a:this._a}},toPercentageRgbString:function(){return 1==this._a?"rgb("+l(100*N(this._r,255))+"%, "+l(100*N(this._g,255))+"%, "+l(100*N(this._b,255))+"%)":"rgba("+l(100*N(this._r,255))+"%, "+l(100*N(this._g,255))+"%, "+l(100*N(this._b,255))+"%, "+this._roundA+")"},toName:function(){return 0===this._a?"transparent":!(this._a<1)&&(P[m(this._r,this._g,this._b,!0)]||!1)},toFilter:function(e){var t="#"+v(this._r,this._g,this._b,this._a),n=t,r=this._gradientType?"GradientType = 1, ":"";if(e){var o=b(e);n="#"+v(o._r,o._g,o._b,o._a)}return"progid:DXImageTransform.Microsoft.gradient("+r+"startColorstr="+t+",endColorstr="+n+")"},toString:function(e){var t=!!e;e=e||this._format;var n=!1,r=this._a<1&&this._a>=0;return t||!r||"hex"!==e&&"hex6"!==e&&"hex3"!==e&&"hex4"!==e&&"hex8"!==e&&"name"!==e?("rgb"===e&&(n=this.toRgbString()),"prgb"===e&&(n=this.toPercentageRgbString()),"hex"!==e&&"hex6"!==e||(n=this.toHexString()),"hex3"===e&&(n=this.toHexString(!0)),"hex4"===e&&(n=this.toHex8String(!0)),"hex8"===e&&(n=this.toHex8String()),"name"===e&&(n=this.toName()),"hsl"===e&&(n=this.toHslString()),"hsv"===e&&(n=this.toHsvString()),n||this.toHexString()):"name"===e&&0===this._a?this.toName():this.toRgbString()},clone:function(){return b(this.toString())},_applyModification:function(e,t){var n=e.apply(null,[this].concat([].slice.call(t)));return this._r=n._r,this._g=n._g,this._b=n._b,this.setAlpha(n._a),this},lighten:function(){return this._applyModification(j,arguments)},brighten:function(){return this._applyModification(k,arguments)},darken:function(){return this._applyModification(y,arguments)},desaturate:function(){return this._applyModification(g,arguments)},saturate:function(){return this._applyModification(O,arguments)},greyscale:function(){return this._applyModification(h,arguments)},spin:function(){return this._applyModification(_,arguments)},_applyCombination:function(e,t){return e.apply(null,[this].concat([].slice.call(t)))},analogous:function(){return this._applyCombination(B,arguments)},complement:function(){return this._applyCombination(E,arguments)},monochromatic:function(){return this._applyCombination(I,arguments)},splitcomplement:function(){return this._applyCombination(S,arguments)},triad:function(){return this._applyCombination(w,arguments)},tetrad:function(){return this._applyCombination(C,arguments)}},b.fromRatio=function(e,t){if("object"==typeof e){var n={};for(var r in e)e.hasOwnProperty(r)&&(n[r]="a"===r?e[r]:L(e[r]));e=n}return b(e,t)},b.equals=function(e,t){return!(!e||!t)&&b(e).toRgbString()==b(t).toRgbString()},b.random=function(){return b.fromRatio({r:d(),g:d(),b:d()})},b.mix=function(e,t,n){n=0===n?0:n||50;var r=b(e).toRgb(),o=b(t).toRgb(),c=n/100;return b({r:(o.r-r.r)*c+r.r,g:(o.g-r.g)*c+r.g,b:(o.b-r.b)*c+r.b,a:(o.a-r.a)*c+r.a})},b.readability=function(e,t){var n=b(e),r=b(t);return(o.max(n.getLuminance(),r.getLuminance())+.05)/(o.min(n.getLuminance(),r.getLuminance())+.05)},b.isReadable=function(e,t,n){var r,o,c,i,a,l=b.readability(e,t);switch(o=!1,(c=n,"AA"!==(i=((c=c||{level:"AA",size:"small"}).level||"AA").toUpperCase())&&"AAA"!==i&&(i="AA"),"small"!==(a=(c.size||"small").toLowerCase())&&"large"!==a&&(a="small"),r={level:i,size:a}).level+r.size){case"AAsmall":case"AAAlarge":o=l>=4.5;break;case"AAlarge":o=l>=3;break;case"AAAsmall":o=l>=7}return o},b.mostReadable=function(e,t,n){var r,o,c,i,a=null,l=0;o=(n=n||{}).includeFallbackColors,c=n.level,i=n.size;for(var s=0;s<t.length;s++)(r=b.readability(e,t[s]))>l&&(l=r,a=b(t[s]));return b.isReadable(e,a,{level:c,size:i})||!o?a:(n.includeFallbackColors=!1,b.mostReadable(e,["#fff","#000"],n))};var x=b.names={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"0ff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"00f",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",burntsienna:"ea7e5d",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"0ff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkgrey:"a9a9a9",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"f0f",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",grey:"808080",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgreen:"90ee90",lightgrey:"d3d3d3",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370db",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"db7093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"663399",red:"f00",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"},P=b.hexNames=function(e){var t={};for(var n in e)e.hasOwnProperty(n)&&(t[e[n]]=n);return t}(x);function T(e){return e=parseFloat(e),(isNaN(e)||e<0||e>1)&&(e=1),e}function N(e,t){(function(e){return"string"==typeof e&&-1!=e.indexOf(".")&&1===parseFloat(e)})(e)&&(e="100%");var n=function(e){return"string"==typeof e&&-1!=e.indexOf("%")}(e);return e=s(t,u(0,parseFloat(e))),n&&(e=parseInt(e*t,10)/100),o.abs(e-t)<1e-6?1:e%t/parseFloat(t)}function D(e){return s(1,u(0,e))}function A(e){return parseInt(e,16)}function R(e){return 1==e.length?"0"+e:""+e}function L(e){return e<=1&&(e=100*e+"%"),e}function M(e){return o.round(255*parseFloat(e)).toString(16)}function F(e){return A(e)/255}var V,H,z,G=(H="[\\s|\\(]+("+(V="(?:[-\\+]?\\d*\\.\\d+%?)|(?:[-\\+]?\\d+%?)")+")[,|\\s]+("+V+")[,|\\s]+("+V+")\\s*\\)?",z="[\\s|\\(]+("+V+")[,|\\s]+("+V+")[,|\\s]+("+V+")[,|\\s]+("+V+")\\s*\\)?",{CSS_UNIT:new RegExp(V),rgb:new RegExp("rgb"+H),rgba:new RegExp("rgba"+z),hsl:new RegExp("hsl"+H),hsla:new RegExp("hsla"+z),hsv:new RegExp("hsv"+H),hsva:new RegExp("hsva"+z),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/});function U(e){return!!G.CSS_UNIT.exec(e)}e.exports?e.exports=b:void 0===(r=function(){return b}.call(t,n,t,e))||(e.exports=r)}(Math)},68:function(e,t){e.exports=window.wp.htmlEntities},69:function(e,t){e.exports=window.wp.isShallowEqual},7:function(e,t){e.exports=window.wp.primitives},72:function(e,t,n){e.exports=function(e,t){var n,r,o=0;function c(){var c,i,a=n,l=arguments.length;e:for(;a;){if(a.args.length===arguments.length){for(i=0;i<l;i++)if(a.args[i]!==arguments[i]){a=a.next;continue e}return a!==n&&(a===r&&(r=a.prev),a.prev.next=a.next,a.next&&(a.next.prev=a.prev),a.next=n,a.prev=null,n.prev=a,n=a),a.val}a=a.next}for(c=new Array(l),i=0;i<l;i++)c[i]=arguments[i];return a={args:c,val:e.apply(null,c)},n?(n.prev=a,a.next=n):r=a,o===t.maxSize?(r=r.prev).next=null:o++,n=a,a.val}return t=t||{},c.clear=function(){n=null,r=null,o=0},c}},8:function(e,t){e.exports=window.React},9:function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(41),o=n(30),c=n(42);function i(e,t){return Object(r.a)(e)||function(e,t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e)){var n=[],_n=!0,r=!1,o=void 0;try{for(var c,i=e[Symbol.iterator]();!(_n=(c=i.next()).done)&&(n.push(c.value),!t||n.length!==t);_n=!0);}catch(e){r=!0,o=e}finally{try{_n||null==i.return||i.return()}finally{if(r)throw o}}return n}}(e,t)||Object(o.a)(e,t)||Object(c.a)()}}});
1
+ window.wp=window.wp||{},window.wp.blockEditor=function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=519)}({0:function(e,t){e.exports=window.wp.element},1:function(e,t){e.exports=window.wp.i18n},10:function(e,t,n){"use strict";function r(){return(r=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}n.d(t,"a",(function(){return r}))},11:function(e,t){e.exports=window.wp.blocks},115:function(e,t,n){"use strict";t.__esModule=!0;var r=n(227);t.default=r.TextareaAutosize},12:function(e,t,n){var r;!function(){"use strict";var n={}.hasOwnProperty;function o(){for(var e=[],t=0;t<arguments.length;t++){var r=arguments[t];if(r){var c=typeof r;if("string"===c||"number"===c)e.push(r);else if(Array.isArray(r))e.push(o.apply(null,r));else if("object"===c)for(var i in r)n.call(r,i)&&r[i]&&e.push(i)}}return e.join(" ")}e.exports?e.exports=o:void 0===(r=function(){return o}.apply(t,[]))||(e.exports=r)}()},13:function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(48);function o(e,t){if(null==e)return{};var n,o,c=Object(r.a)(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(o=0;o<i.length;o++)n=i[o],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(c[n]=e[n])}return c}},134:function(e,t,n){"use strict";function r(e){return e&&"object"==typeof e&&"default"in e?e.default:e}Object.defineProperty(t,"__esModule",{value:!0});var o=r(n(221)),c=r(n(222)),i=n(9),a=r(i),l=r(n(195)),s=r(n(223)),u={arr:Array.isArray,obj:function(e){return"[object Object]"===Object.prototype.toString.call(e)},fun:function(e){return"function"==typeof e},str:function(e){return"string"==typeof e},num:function(e){return"number"==typeof e},und:function(e){return void 0===e},nul:function(e){return null===e},set:function(e){return e instanceof Set},map:function(e){return e instanceof Map},equ:function(e,t){if(typeof e!=typeof t)return!1;if(u.str(e)||u.num(e))return e===t;if(u.obj(e)&&u.obj(t)&&Object.keys(e).length+Object.keys(t).length===0)return!0;var n;for(n in e)if(!(n in t))return!1;for(n in t)if(e[n]!==t[n])return!1;return!u.und(n)||e===t}};function d(){var e=i.useState(!1)[1];return i.useCallback((function(){return e((function(e){return!e}))}),[])}function b(e,t){return u.und(e)||u.nul(e)?t:e}function f(e){return u.und(e)?[]:u.arr(e)?e:[e]}function p(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return u.fun(e)?e.apply(void 0,n):e}function m(e){var t=function(e){return e.to,e.from,e.config,e.onStart,e.onRest,e.onFrame,e.children,e.reset,e.reverse,e.force,e.immediate,e.delay,e.attach,e.destroyed,e.interpolateTo,e.ref,e.lazy,c(e,["to","from","config","onStart","onRest","onFrame","children","reset","reverse","force","immediate","delay","attach","destroyed","interpolateTo","ref","lazy"])}(e);if(u.und(t))return o({to:t},e);var n=Object.keys(e).reduce((function(n,r){var c;return u.und(t[r])?o({},n,((c={})[r]=e[r],c)):n}),{});return o({to:t},n)}var v,g,O=function(){function e(){this.payload=void 0,this.children=[]}var t=e.prototype;return t.getAnimatedValue=function(){return this.getValue()},t.getPayload=function(){return this.payload||this},t.attach=function(){},t.detach=function(){},t.getChildren=function(){return this.children},t.addChild=function(e){0===this.children.length&&this.attach(),this.children.push(e)},t.removeChild=function(e){var t=this.children.indexOf(e);this.children.splice(t,1),0===this.children.length&&this.detach()},e}(),h=function(e){function t(){for(var t,n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return(t=e.call.apply(e,[this].concat(r))||this).payload=[],t.attach=function(){return t.payload.forEach((function(e){return e instanceof O&&e.addChild(s(t))}))},t.detach=function(){return t.payload.forEach((function(e){return e instanceof O&&e.removeChild(s(t))}))},t}return l(t,e),t}(O),j=function(e){function t(){for(var t,n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return(t=e.call.apply(e,[this].concat(r))||this).payload={},t.attach=function(){return Object.values(t.payload).forEach((function(e){return e instanceof O&&e.addChild(s(t))}))},t.detach=function(){return Object.values(t.payload).forEach((function(e){return e instanceof O&&e.removeChild(s(t))}))},t}l(t,e);var n=t.prototype;return n.getValue=function(e){void 0===e&&(e=!1);var t={};for(var n in this.payload){var r=this.payload[n];(!e||r instanceof O)&&(t[n]=r instanceof O?r[e?"getAnimatedValue":"getValue"]():r)}return t},n.getAnimatedValue=function(){return this.getValue(!0)},t}(O);function k(e,t){v={fn:e,transform:t}}function y(e){g=e}var _,E=function(e){return"undefined"!=typeof window?window.requestAnimationFrame(e):-1},w=function(e){"undefined"!=typeof window&&window.cancelAnimationFrame(e)};function C(e){_=e}var S,B=function(){return Date.now()};function I(e){S=e}var x,P,T=function(e){return e.current};function N(e){x=e}var D=Object.freeze({get applyAnimatedValues(){return v},injectApplyAnimatedValues:k,get colorNames(){return g},injectColorNames:y,get requestFrame(){return E},get cancelFrame(){return w},injectFrame:function(e,t){E=e,w=t},get interpolation(){return _},injectStringInterpolator:C,get now(){return B},injectNow:function(e){B=e},get defaultElement(){return S},injectDefaultElement:I,get animatedApi(){return T},injectAnimatedApi:function(e){T=e},get createAnimatedStyle(){return x},injectCreateAnimatedStyle:N,get manualFrameloop(){return P},injectManualFrameloop:function(e){P=e}}),A=function(e){function t(t,n){var r;return(r=e.call(this)||this).update=void 0,r.payload=t.style?o({},t,{style:x(t.style)}):t,r.update=n,r.attach(),r}return l(t,e),t}(j),R=!1,L=new Set,M=function e(){if(!R)return!1;var t=B(),n=L,r=Array.isArray(n),o=0;for(n=r?n:n[Symbol.iterator]();;){var c;if(r){if(o>=n.length)break;c=n[o++]}else{if((o=n.next()).done)break;c=o.value}for(var i=c,a=!1,l=0;l<i.configs.length;l++){for(var s=i.configs[l],u=void 0,d=void 0,b=0;b<s.animatedValues.length;b++){var f=s.animatedValues[b];if(!f.done){var p=s.fromValues[b],m=s.toValues[b],v=f.lastPosition,g=m instanceof O,h=Array.isArray(s.initialVelocity)?s.initialVelocity[b]:s.initialVelocity;if(g&&(m=m.getValue()),s.immediate)f.setValue(m),f.done=!0;else if("string"!=typeof p&&"string"!=typeof m){if(void 0!==s.duration)v=p+s.easing((t-f.startTime)/s.duration)*(m-p),u=t>=f.startTime+s.duration;else if(s.decay)v=p+h/(1-.998)*(1-Math.exp(-(1-.998)*(t-f.startTime))),(u=Math.abs(f.lastPosition-v)<.1)&&(m=v);else{d=void 0!==f.lastTime?f.lastTime:t,h=void 0!==f.lastVelocity?f.lastVelocity:s.initialVelocity,t>d+64&&(d=t);for(var j=Math.floor(t-d),k=0;k<j;++k)v+=1*(h+=(-s.tension*(v-m)+-s.friction*h)/s.mass*1/1e3)/1e3;var y=!(!s.clamp||0===s.tension)&&(p<m?v>m:v<m),_=Math.abs(h)<=s.precision,w=0===s.tension||Math.abs(m-v)<=s.precision;u=y||_&&w,f.lastVelocity=h,f.lastTime=t}g&&!s.toValues[b].done&&(u=!1),u?(f.value!==m&&(v=m),f.done=!0):a=!0,f.setValue(v),f.lastPosition=v}else f.setValue(m),f.done=!0}}i.props.onFrame&&(i.values[s.name]=s.interpolation.getValue())}i.props.onFrame&&i.props.onFrame(i.values),a||(L.delete(i),i.stop(!0))}return L.size?P?P():E(e):R=!1,R};function F(e,t,n){if("function"==typeof e)return e;if(Array.isArray(e))return F({range:e,output:t,extrapolate:n});if(_&&"string"==typeof e.output[0])return _(e);var r=e,o=r.output,c=r.range||[0,1],i=r.extrapolateLeft||r.extrapolate||"extend",a=r.extrapolateRight||r.extrapolate||"extend",l=r.easing||function(e){return e};return function(e){var t=function(e,t){for(var n=1;n<t.length-1&&!(t[n]>=e);++n);return n-1}(e,c);return function(e,t,n,r,o,c,i,a,l){var s=l?l(e):e;if(s<t){if("identity"===i)return s;"clamp"===i&&(s=t)}if(s>n){if("identity"===a)return s;"clamp"===a&&(s=n)}return r===o?r:t===n?e<=t?r:o:(t===-1/0?s=-s:n===1/0?s-=t:s=(s-t)/(n-t),s=c(s),r===-1/0?s=-s:o===1/0?s+=r:s=s*(o-r)+r,s)}(e,c[t],c[t+1],o[t],o[t+1],l,i,a,r.map)}}var V=function(e){function t(n,r,o){var c;return(c=e.call(this)||this).calc=void 0,c.payload=n instanceof h&&!(n instanceof t)?n.getPayload():Array.isArray(n)?n:[n],c.calc=F(r,o),c}l(t,e);var n=t.prototype;return n.getValue=function(){return this.calc.apply(this,this.payload.map((function(e){return e.getValue()})))},n.updateConfig=function(e,t){this.calc=F(e,t)},n.interpolate=function(e,n){return new t(this,e,n)},t}(h),H=function(e){function t(t){var n;return(n=e.call(this)||this).animatedStyles=new Set,n.value=void 0,n.startPosition=void 0,n.lastPosition=void 0,n.lastVelocity=void 0,n.startTime=void 0,n.lastTime=void 0,n.done=!1,n.setValue=function(e,t){void 0===t&&(t=!0),n.value=e,t&&n.flush()},n.value=t,n.startPosition=t,n.lastPosition=t,n}l(t,e);var n=t.prototype;return n.flush=function(){0===this.animatedStyles.size&&function e(t,n){"update"in t?n.add(t):t.getChildren().forEach((function(t){return e(t,n)}))}(this,this.animatedStyles),this.animatedStyles.forEach((function(e){return e.update()}))},n.clearStyles=function(){this.animatedStyles.clear()},n.getValue=function(){return this.value},n.interpolate=function(e,t){return new V(this,e,t)},t}(O),z=function(e){function t(t){var n;return(n=e.call(this)||this).payload=t.map((function(e){return new H(e)})),n}l(t,e);var n=t.prototype;return n.setValue=function(e,t){var n=this;void 0===t&&(t=!0),Array.isArray(e)?e.length===this.payload.length&&e.forEach((function(e,r){return n.payload[r].setValue(e,t)})):this.payload.forEach((function(n){return n.setValue(e,t)}))},n.getValue=function(){return this.payload.map((function(e){return e.getValue()}))},n.interpolate=function(e,t){return new V(this,e,t)},t}(h),G=0,U=function(){function e(){var e=this;this.id=void 0,this.idle=!0,this.hasChanged=!1,this.guid=0,this.local=0,this.props={},this.merged={},this.animations={},this.interpolations={},this.values={},this.configs=[],this.listeners=[],this.queue=[],this.localQueue=void 0,this.getValues=function(){return e.interpolations},this.id=G++}var t=e.prototype;return t.update=function(e){if(!e)return this;var t=m(e),n=t.delay,r=void 0===n?0:n,i=t.to,a=c(t,["delay","to"]);if(u.arr(i)||u.fun(i))this.queue.push(o({},a,{delay:r,to:i}));else if(i){var l={};Object.entries(i).forEach((function(e){var t,n=e[0],c=e[1],i=o({to:(t={},t[n]=c,t),delay:p(r,n)},a),s=l[i.delay]&&l[i.delay].to;l[i.delay]=o({},l[i.delay],i,{to:o({},s,i.to)})})),this.queue=Object.values(l)}return this.queue=this.queue.sort((function(e,t){return e.delay-t.delay})),this.diff(a),this},t.start=function(e){var t=this;if(this.queue.length){this.idle=!1,this.localQueue&&this.localQueue.forEach((function(e){var n=e.from,r=void 0===n?{}:n,c=e.to,i=void 0===c?{}:c;u.obj(r)&&(t.merged=o({},r,t.merged)),u.obj(i)&&(t.merged=o({},t.merged,i))}));var n=this.local=++this.guid,r=this.localQueue=this.queue;this.queue=[],r.forEach((function(o,i){var a=o.delay,l=c(o,["delay"]),s=function(o){i===r.length-1&&n===t.guid&&o&&(t.idle=!0,t.props.onRest&&t.props.onRest(t.merged)),e&&e()},d=u.arr(l.to)||u.fun(l.to);a?setTimeout((function(){n===t.guid&&(d?t.runAsync(l,s):t.diff(l).start(s))}),a):d?t.runAsync(l,s):t.diff(l).start(s)}))}else u.fun(e)&&this.listeners.push(e),this.props.onStart&&this.props.onStart(),this,L.has(this)||L.add(this),R||(R=!0,E(P||M));return this},t.stop=function(e){return this.listeners.forEach((function(t){return t(e)})),this.listeners=[],this},t.pause=function(e){return this.stop(!0),e&&(this,L.has(this)&&L.delete(this)),this},t.runAsync=function(e,t){var n=this,r=(e.delay,c(e,["delay"])),i=this.local,a=Promise.resolve(void 0);if(u.arr(r.to))for(var l=function(e){var t=e,c=o({},r,m(r.to[t]));u.arr(c.config)&&(c.config=c.config[t]),a=a.then((function(){if(i===n.guid)return new Promise((function(e){return n.diff(c).start(e)}))}))},s=0;s<r.to.length;s++)l(s);else if(u.fun(r.to)){var d,b=0;a=a.then((function(){return r.to((function(e){var t=o({},r,m(e));if(u.arr(t.config)&&(t.config=t.config[b]),b++,i===n.guid)return d=new Promise((function(e){return n.diff(t).start(e)}))}),(function(e){return void 0===e&&(e=!0),n.stop(e)})).then((function(){return d}))}))}a.then(t)},t.diff=function(e){var t=this;this.props=o({},this.props,e);var n=this.props,r=n.from,c=void 0===r?{}:r,i=n.to,a=void 0===i?{}:i,l=n.config,s=void 0===l?{}:l,d=n.reverse,m=n.attach,v=n.reset,O=n.immediate;if(d){var h=[a,c];c=h[0],a=h[1]}this.merged=o({},c,this.merged,a),this.hasChanged=!1;var j=m&&m(this);if(this.animations=Object.entries(this.merged).reduce((function(e,n){var r=n[0],i=n[1],a=e[r]||{},l=u.num(i),d=u.str(i)&&!i.startsWith("#")&&!/\d/.test(i)&&!g[i],m=u.arr(i),h=!l&&!m&&!d,k=u.und(c[r])?i:c[r],y=l||m||d?i:1,E=p(s,r);j&&(y=j.animations[r].parent);var w,C=a.parent,S=a.interpolation,I=f(j?y.getPayload():y),x=i;h&&(x=_({range:[0,1],output:[i,i]})(1));var P,T=S&&S.getValue(),N=!u.und(C)&&a.animatedValues.some((function(e){return!e.done})),D=!u.equ(x,T),A=!u.equ(x,a.previous),R=!u.equ(E,a.config);if(v||A&&D||R){var L;if(l||d)C=S=a.parent||new H(k);else if(m)C=S=a.parent||new z(k);else if(h){var M=a.interpolation&&a.interpolation.calc(a.parent.value);M=void 0===M||v?k:M,a.parent?(C=a.parent).setValue(0,!1):C=new H(0);var F={output:[M,i]};a.interpolation?(S=a.interpolation,a.interpolation.updateConfig(F)):S=C.interpolate(F)}return I=f(j?y.getPayload():y),w=f(C.getPayload()),v&&!h&&C.setValue(k,!1),t.hasChanged=!0,w.forEach((function(e){e.startPosition=e.value,e.lastPosition=e.value,e.lastVelocity=N?e.lastVelocity:void 0,e.lastTime=N?e.lastTime:void 0,e.startTime=B(),e.done=!1,e.animatedStyles.clear()})),p(O,r)&&C.setValue(h?y:i,!1),o({},e,((L={})[r]=o({},a,{name:r,parent:C,interpolation:S,animatedValues:w,toValues:I,previous:x,config:E,fromValues:f(C.getValue()),immediate:p(O,r),initialVelocity:b(E.velocity,0),clamp:b(E.clamp,!1),precision:b(E.precision,.01),tension:b(E.tension,170),friction:b(E.friction,26),mass:b(E.mass,1),duration:E.duration,easing:b(E.easing,(function(e){return e})),decay:E.decay}),L))}return D?e:(h&&(C.setValue(1,!1),S.updateConfig({output:[x,x]})),C.done=!0,t.hasChanged=!0,o({},e,((P={})[r]=o({},e[r],{previous:x}),P)))}),this.animations),this.hasChanged)for(var k in this.configs=Object.values(this.animations),this.values={},this.interpolations={},this.animations)this.interpolations[k]=this.animations[k].interpolation,this.values[k]=this.animations[k].interpolation.getValue();return this},t.destroy=function(){this.stop(),this.props={},this.merged={},this.animations={},this.interpolations={},this.values={},this.configs=[],this.local=0},e}(),W=function(e,t){var n=i.useRef(!1),r=i.useRef(),o=u.fun(t),c=i.useMemo((function(){var n;return r.current&&(r.current.map((function(e){return e.destroy()})),r.current=void 0),[new Array(e).fill().map((function(e,r){var c=new U,i=o?p(t,r,c):t[r];return 0===r&&(n=i.ref),c.update(i),n||c.start(),c})),n]}),[e]),a=c[0],l=c[1];r.current=a,i.useImperativeHandle(l,(function(){return{start:function(){return Promise.all(r.current.map((function(e){return new Promise((function(t){return e.start(t)}))})))},stop:function(e){return r.current.forEach((function(t){return t.stop(e)}))},get controllers(){return r.current}}}));var s=i.useMemo((function(){return function(e){return r.current.map((function(t,n){t.update(o?p(e,n,t):e[n]),l||t.start()}))}}),[e]);i.useEffect((function(){n.current?o||s(t):l||r.current.forEach((function(e){return e.start()}))})),i.useEffect((function(){return n.current=!0,function(){return r.current.forEach((function(e){return e.destroy()}))}}),[]);var d=r.current.map((function(e){return e.getValues()}));return o?[d,s,function(e){return r.current.forEach((function(t){return t.pause(e)}))}]:d},K=0,q=function(e,t){return("function"==typeof t?e.map(t):f(t)).map(String)},$=function(e){var t=e.items,n=e.keys,r=void 0===n?function(e){return e}:n,i=c(e,["items","keys"]);return t=f(void 0!==t?t:null),o({items:t,keys:q(t,r)},i)};function Y(e,t){var n=function(){if(o){if(c>=r.length)return"break";i=r[c++]}else{if((c=r.next()).done)return"break";i=c.value}var n=i.key,a=function(e){return e.key!==n};(u.und(t)||t===n)&&(e.current.instances.delete(n),e.current.transitions=e.current.transitions.filter(a),e.current.deleted=e.current.deleted.filter(a))},r=e.current.deleted,o=Array.isArray(r),c=0;for(r=o?r:r[Symbol.iterator]();;){var i;if("break"===n())break}e.current.forceUpdate()}var X=function(e){function t(t){var n;return void 0===t&&(t={}),n=e.call(this)||this,!t.transform||t.transform instanceof O||(t=v.transform(t)),n.payload=t,n}return l(t,e),t}(j),Q={transparent:0,aliceblue:4042850303,antiquewhite:4209760255,aqua:16777215,aquamarine:2147472639,azure:4043309055,beige:4126530815,bisque:4293182719,black:255,blanchedalmond:4293643775,blue:65535,blueviolet:2318131967,brown:2771004159,burlywood:3736635391,burntsienna:3934150143,cadetblue:1604231423,chartreuse:2147418367,chocolate:3530104575,coral:4286533887,cornflowerblue:1687547391,cornsilk:4294499583,crimson:3692313855,cyan:16777215,darkblue:35839,darkcyan:9145343,darkgoldenrod:3095792639,darkgray:2846468607,darkgreen:6553855,darkgrey:2846468607,darkkhaki:3182914559,darkmagenta:2332068863,darkolivegreen:1433087999,darkorange:4287365375,darkorchid:2570243327,darkred:2332033279,darksalmon:3918953215,darkseagreen:2411499519,darkslateblue:1211993087,darkslategray:793726975,darkslategrey:793726975,darkturquoise:13554175,darkviolet:2483082239,deeppink:4279538687,deepskyblue:12582911,dimgray:1768516095,dimgrey:1768516095,dodgerblue:512819199,firebrick:2988581631,floralwhite:4294635775,forestgreen:579543807,fuchsia:4278255615,gainsboro:3705462015,ghostwhite:4177068031,gold:4292280575,goldenrod:3668254975,gray:2155905279,green:8388863,greenyellow:2919182335,grey:2155905279,honeydew:4043305215,hotpink:4285117695,indianred:3445382399,indigo:1258324735,ivory:4294963455,khaki:4041641215,lavender:3873897215,lavenderblush:4293981695,lawngreen:2096890111,lemonchiffon:4294626815,lightblue:2916673279,lightcoral:4034953471,lightcyan:3774873599,lightgoldenrodyellow:4210742015,lightgray:3553874943,lightgreen:2431553791,lightgrey:3553874943,lightpink:4290167295,lightsalmon:4288707327,lightseagreen:548580095,lightskyblue:2278488831,lightslategray:2005441023,lightslategrey:2005441023,lightsteelblue:2965692159,lightyellow:4294959359,lime:16711935,limegreen:852308735,linen:4210091775,magenta:4278255615,maroon:2147483903,mediumaquamarine:1724754687,mediumblue:52735,mediumorchid:3126187007,mediumpurple:2473647103,mediumseagreen:1018393087,mediumslateblue:2070474495,mediumspringgreen:16423679,mediumturquoise:1221709055,mediumvioletred:3340076543,midnightblue:421097727,mintcream:4127193855,mistyrose:4293190143,moccasin:4293178879,navajowhite:4292783615,navy:33023,oldlace:4260751103,olive:2155872511,olivedrab:1804477439,orange:4289003775,orangered:4282712319,orchid:3664828159,palegoldenrod:4008225535,palegreen:2566625535,paleturquoise:2951671551,palevioletred:3681588223,papayawhip:4293907967,peachpuff:4292524543,peru:3448061951,pink:4290825215,plum:3718307327,powderblue:2967529215,purple:2147516671,rebeccapurple:1714657791,red:4278190335,rosybrown:3163525119,royalblue:1097458175,saddlebrown:2336560127,salmon:4202722047,sandybrown:4104413439,seagreen:780883967,seashell:4294307583,sienna:2689740287,silver:3233857791,skyblue:2278484991,slateblue:1784335871,slategray:1887473919,slategrey:1887473919,snow:4294638335,springgreen:16744447,steelblue:1182971135,tan:3535047935,teal:8421631,thistle:3636451583,tomato:4284696575,turquoise:1088475391,violet:4001558271,wheat:4125012991,white:4294967295,whitesmoke:4126537215,yellow:4294902015,yellowgreen:2597139199},Z="[-+]?\\d*\\.?\\d+";function J(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return"\\(\\s*("+t.join(")\\s*,\\s*(")+")\\s*\\)"}var ee=new RegExp("rgb"+J(Z,Z,Z)),te=new RegExp("rgba"+J(Z,Z,Z,Z)),ne=new RegExp("hsl"+J(Z,"[-+]?\\d*\\.?\\d+%","[-+]?\\d*\\.?\\d+%")),re=new RegExp("hsla"+J(Z,"[-+]?\\d*\\.?\\d+%","[-+]?\\d*\\.?\\d+%",Z)),oe=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,ce=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,ie=/^#([0-9a-fA-F]{6})$/,ae=/^#([0-9a-fA-F]{8})$/;function le(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+6*(t-e)*n:n<.5?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function se(e,t,n){var r=n<.5?n*(1+t):n+t-n*t,o=2*n-r,c=le(o,r,e+1/3),i=le(o,r,e),a=le(o,r,e-1/3);return Math.round(255*c)<<24|Math.round(255*i)<<16|Math.round(255*a)<<8}function ue(e){var t=parseInt(e,10);return t<0?0:t>255?255:t}function de(e){return(parseFloat(e)%360+360)%360/360}function be(e){var t=parseFloat(e);return t<0?0:t>1?255:Math.round(255*t)}function fe(e){var t=parseFloat(e);return t<0?0:t>100?1:t/100}function pe(e){var t,n,r="number"==typeof(t=e)?t>>>0===t&&t>=0&&t<=4294967295?t:null:(n=ie.exec(t))?parseInt(n[1]+"ff",16)>>>0:Q.hasOwnProperty(t)?Q[t]:(n=ee.exec(t))?(ue(n[1])<<24|ue(n[2])<<16|ue(n[3])<<8|255)>>>0:(n=te.exec(t))?(ue(n[1])<<24|ue(n[2])<<16|ue(n[3])<<8|be(n[4]))>>>0:(n=oe.exec(t))?parseInt(n[1]+n[1]+n[2]+n[2]+n[3]+n[3]+"ff",16)>>>0:(n=ae.exec(t))?parseInt(n[1],16)>>>0:(n=ce.exec(t))?parseInt(n[1]+n[1]+n[2]+n[2]+n[3]+n[3]+n[4]+n[4],16)>>>0:(n=ne.exec(t))?(255|se(de(n[1]),fe(n[2]),fe(n[3])))>>>0:(n=re.exec(t))?(se(de(n[1]),fe(n[2]),fe(n[3]))|be(n[4]))>>>0:null;return null===r?e:"rgba("+((4278190080&(r=r||0))>>>24)+", "+((16711680&r)>>>16)+", "+((65280&r)>>>8)+", "+(255&r)/255+")"}var me=/[+\-]?(?:0|[1-9]\d*)(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,ve=/(#(?:[0-9a-f]{2}){2,4}|(#[0-9a-f]{3})|(rgb|hsl)a?\((-?\d+%?[,\s]+){2,3}\s*[\d\.]+%?\))/gi,ge=new RegExp("("+Object.keys(Q).join("|")+")","g"),Oe={animationIterationCount:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},he=["Webkit","Ms","Moz","O"];function je(e,t,n){return null==t||"boolean"==typeof t||""===t?"":n||"number"!=typeof t||0===t||Oe.hasOwnProperty(e)&&Oe[e]?(""+t).trim():t+"px"}Oe=Object.keys(Oe).reduce((function(e,t){return he.forEach((function(n){return e[function(e,t){return e+t.charAt(0).toUpperCase()+t.substring(1)}(n,t)]=e[t]})),e}),Oe);var ke={};N((function(e){return new X(e)})),I("div"),C((function(e){var t=e.output.map((function(e){return e.replace(ve,pe)})).map((function(e){return e.replace(ge,pe)})),n=t[0].match(me).map((function(){return[]}));t.forEach((function(e){e.match(me).forEach((function(e,t){return n[t].push(+e)}))}));var r=t[0].match(me).map((function(t,r){return F(o({},e,{output:n[r]}))}));return function(e){var n=0;return t[0].replace(me,(function(){return r[n++](e)})).replace(/rgba\(([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+)\)/gi,(function(e,t,n,r,o){return"rgba("+Math.round(t)+", "+Math.round(n)+", "+Math.round(r)+", "+o+")"}))}})),y(Q),k((function(e,t){if(!e.nodeType||void 0===e.setAttribute)return!1;var n=t.style,r=t.children,o=t.scrollTop,i=t.scrollLeft,a=c(t,["style","children","scrollTop","scrollLeft"]),l="filter"===e.nodeName||e.parentNode&&"filter"===e.parentNode.nodeName;for(var s in void 0!==o&&(e.scrollTop=o),void 0!==i&&(e.scrollLeft=i),void 0!==r&&(e.textContent=r),n)if(n.hasOwnProperty(s)){var u=0===s.indexOf("--"),d=je(s,n[s],u);"float"===s&&(s="cssFloat"),u?e.style.setProperty(s,d):e.style[s]=d}for(var b in a){var f=l?b:ke[b]||(ke[b]=b.replace(/([A-Z])/g,(function(e){return"-"+e.toLowerCase()})));void 0!==e.getAttribute(f)&&e.setAttribute(f,a[b])}}),(function(e){return e}));var ye,_e,Ee=(ye=function(e){return i.forwardRef((function(t,n){var r=d(),l=i.useRef(!0),s=i.useRef(null),b=i.useRef(null),f=i.useCallback((function(e){var t=s.current;s.current=new A(e,(function(){b.current&&!1===v.fn(b.current,s.current.getAnimatedValue())&&r()})),t&&t.detach()}),[]);i.useEffect((function(){return function(){l.current=!1,s.current&&s.current.detach()}}),[]),i.useImperativeHandle(n,(function(){return T(b,l,r)})),f(t);var p=s.current.getValue(),m=(p.scrollTop,p.scrollLeft,c(p,["scrollTop","scrollLeft"]));return a.createElement(e,o({},m,{ref:function(e){return b.current=(t=e,(r=n)&&(u.fun(r)?r(t):u.obj(r)&&(r.current=t)),t);var t,r}}))}))},void 0===(_e=!1)&&(_e=!0),function(e){return(u.arr(e)?e:Object.keys(e)).reduce((function(e,t){var n=_e?t[0].toLowerCase()+t.substring(1):t;return e[n]=ye(n),e}),ye)}),we=Ee(["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","tspan"]);t.apply=Ee,t.config={default:{tension:170,friction:26},gentle:{tension:120,friction:14},wobbly:{tension:180,friction:12},stiff:{tension:210,friction:20},slow:{tension:280,friction:60},molasses:{tension:280,friction:120}},t.update=M,t.animated=we,t.a=we,t.interpolate=function(e,t,n){return e&&new V(e,t,n)},t.Globals=D,t.useSpring=function(e){var t=u.fun(e),n=W(1,t?e:[e]),r=n[0],o=n[1],c=n[2];return t?[r[0],o,c]:r},t.useTrail=function(e,t){var n=i.useRef(!1),r=u.fun(t),c=p(t),a=i.useRef(),l=W(e,(function(e,t){return 0===e&&(a.current=[]),a.current.push(t),o({},c,{config:p(c.config,e),attach:e>0&&function(){return a.current[e-1]}})})),s=l[0],d=l[1],b=l[2],f=i.useMemo((function(){return function(e){return d((function(t,n){e.reverse;var r=e.reverse?t+1:t-1,i=a.current[r];return o({},e,{config:p(e.config||c.config,t),attach:i&&function(){return i}})}))}}),[e,c.reverse]);return i.useEffect((function(){n.current&&!r&&f(t)})),i.useEffect((function(){n.current=!0}),[]),r?[s,f,b]:s},t.useTransition=function(e,t,n){var r=o({items:e,keys:t||function(e){return e}},n),a=$(r),l=a.lazy,s=void 0!==l&&l,u=(a.unique,a.reset),b=void 0!==u&&u,f=(a.enter,a.leave,a.update,a.onDestroyed),m=(a.keys,a.items,a.onFrame),v=a.onRest,g=a.onStart,O=a.ref,h=c(a,["lazy","unique","reset","enter","leave","update","onDestroyed","keys","items","onFrame","onRest","onStart","ref"]),j=d(),k=i.useRef(!1),y=i.useRef({mounted:!1,first:!0,deleted:[],current:{},transitions:[],prevProps:{},paused:!!r.ref,instances:!k.current&&new Map,forceUpdate:j});return i.useImperativeHandle(r.ref,(function(){return{start:function(){return Promise.all(Array.from(y.current.instances).map((function(e){var t=e[1];return new Promise((function(e){return t.start(e)}))})))},stop:function(e){return Array.from(y.current.instances).forEach((function(t){return t[1].stop(e)}))},get controllers(){return Array.from(y.current.instances).map((function(e){return e[1]}))}}})),y.current=function(e,t){for(var n=e.first,r=e.prevProps,i=c(e,["first","prevProps"]),a=$(t),l=a.items,s=a.keys,u=a.initial,d=a.from,b=a.enter,f=a.leave,m=a.update,v=a.trail,g=void 0===v?0:v,O=a.unique,h=a.config,j=a.order,k=void 0===j?["enter","leave","update"]:j,y=$(r),_=y.keys,E=y.items,w=o({},i.current),C=[].concat(i.deleted),S=Object.keys(w),B=new Set(S),I=new Set(s),x=s.filter((function(e){return!B.has(e)})),P=i.transitions.filter((function(e){return!e.destroyed&&!I.has(e.originalKey)})).map((function(e){return e.originalKey})),T=s.filter((function(e){return B.has(e)})),N=-g;k.length;)switch(k.shift()){case"enter":x.forEach((function(e,t){O&&C.find((function(t){return t.originalKey===e}))&&(C=C.filter((function(t){return t.originalKey!==e})));var r=s.indexOf(e),o=l[r],c=n&&void 0!==u?"initial":"enter";w[e]={slot:c,originalKey:e,key:O?String(e):K++,item:o,trail:N+=g,config:p(h,o,c),from:p(n&&void 0!==u?u||{}:d,o),to:p(b,o)}}));break;case"leave":P.forEach((function(e){var t=_.indexOf(e),n=E[t];C.unshift(o({},w[e],{slot:"leave",destroyed:!0,left:_[Math.max(0,t-1)],right:_[Math.min(_.length,t+1)],trail:N+=g,config:p(h,n,"leave"),to:p(f,n)})),delete w[e]}));break;case"update":T.forEach((function(e){var t=s.indexOf(e),n=l[t];w[e]=o({},w[e],{item:n,slot:"update",trail:N+=g,config:p(h,n,"update"),to:p(m,n)})}))}var D=s.map((function(e){return w[e]}));return C.forEach((function(e){var t,n=e.left,r=(e.right,c(e,["left","right"]));-1!==(t=D.findIndex((function(e){return e.originalKey===n})))&&(t+=1),t=Math.max(0,t),D=[].concat(D.slice(0,t),[r],D.slice(t))})),o({},i,{changed:x.length||P.length||T.length,first:n&&0===x.length,transitions:D,current:w,deleted:C,prevProps:t})}(y.current,r),y.current.changed&&y.current.transitions.forEach((function(e){var t=e.slot,n=e.from,r=e.to,c=e.config,i=e.trail,a=e.key,l=e.item;y.current.instances.has(a)||y.current.instances.set(a,new U);var u=y.current.instances.get(a),d=o({},h,{to:r,from:n,config:c,ref:O,onRest:function(n){y.current.mounted&&(e.destroyed&&(O||s||Y(y,a),f&&f(l)),!Array.from(y.current.instances).some((function(e){return!e[1].idle}))&&(O||s)&&y.current.deleted.length>0&&Y(y),v&&v(l,t,n))},onStart:g&&function(){return g(l,t)},onFrame:m&&function(e){return m(l,t,e)},delay:i,reset:b&&"enter"===t});u.update(d),y.current.paused||u.start()})),i.useEffect((function(){return y.current.mounted=k.current=!0,function(){y.current.mounted=k.current=!1,Array.from(y.current.instances).map((function(e){return e[1].destroy()})),y.current.instances.clear()}}),[]),y.current.transitions.map((function(e){var t=e.item,n=e.slot,r=e.key;return{item:t,key:r,state:n,props:y.current.instances.get(r).getValues()}}))},t.useChain=function(e,t,n){void 0===n&&(n=1e3);var r=i.useRef();i.useEffect((function(){u.equ(e,r.current)?e.forEach((function(e){var t=e.current;return t&&t.start()})):t?e.forEach((function(e,r){var c=e.current;if(c){var i=c.controllers;if(i.length){var a=n*t[r];i.forEach((function(e){e.queue=e.queue.map((function(e){return o({},e,{delay:e.delay+a})})),e.start()}))}}})):e.reduce((function(e,t,n){var r=t.current;return e.then((function(){return r.start()}))}),Promise.resolve()),r.current=e}))},t.useSprings=W},14:function(e,t){e.exports=window.wp.compose},148:function(e,t,n){"use strict";e.exports=n(224)},149:function(e,t){e.exports=window.wp.wordcount},15:function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(24),o=n(42),c=n(30);function i(e){return function(e){if(Array.isArray(e))return Object(r.a)(e)}(e)||Object(o.a)(e)||Object(c.a)(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}},153:function(e,t){e.exports=window.wp.shortcode},156:function(e,t,n){"use strict";var r=n(5),o=n(13),c=n(0);function i(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}t.a=function(e){var t=e.icon,n=e.size,a=void 0===n?24:n,l=Object(o.a)(e,["icon","size"]);return Object(c.cloneElement)(t,function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?i(Object(n),!0).forEach((function(t){Object(r.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):i(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({width:a,height:a},l))}},157:function(e,t,n){"use strict";var r=n(0),o=n(7),c=Object(r.createElement)(o.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(r.createElement)(o.Path,{d:"M13 11.9l3.3-3.4-1.1-1-3.2 3.3-3.2-3.3-1.1 1 3.3 3.4-3.5 3.6 1 1L12 13l3.5 3.5 1-1z"}));t.a=c},158:function(e,t,n){"use strict";var r=n(0),o=n(7),c=Object(r.createElement)(o.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(r.createElement)(o.Path,{d:"M13 11.8l6.1-6.3-1-1-6.1 6.2-6.1-6.2-1 1 6.1 6.3-6.5 6.7 1 1 6.5-6.6 6.5 6.6 1-1z"}));t.a=c},159:function(e,t,n){"use strict";var r=n(0),o=n(7),c=Object(r.createElement)(o.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(r.createElement)(o.Path,{d:"M18.3 5.6L9.9 16.9l-4.6-3.4-.9 1.2 5.8 4.3 9.3-12.6z"}));t.a=c},16:function(e,t){e.exports=window.regeneratorRuntime},169:function(e,t,n){"use strict";var r=n(170);function o(){}function c(){}c.resetWarningCache=o,e.exports=function(){function e(e,t,n,o,c,i){if(i!==r){var a=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw a.name="Invariant Violation",a}}function t(){return e}e.isRequired=e;var n={array:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:c,resetWarningCache:o};return n.PropTypes=n,n}},17:function(e,t){e.exports=window.wp.keycodes},170:function(e,t,n){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},183:function(e,t){e.exports=window.wp.tokenList},19:function(e,t,n){"use strict";function r(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}n.d(t,"a",(function(){return r}))},194:function(e,t,n){"use strict";var r=n(0),o=n(7),c=Object(r.createElement)(o.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(r.createElement)(o.Path,{d:"M19 8h-1V6h-5v2h-2V6H6v2H5c-1.1 0-2 .9-2 2v8c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2v-8c0-1.1-.9-2-2-2zm.5 10c0 .3-.2.5-.5.5H5c-.3 0-.5-.2-.5-.5v-8c0-.3.2-.5.5-.5h14c.3 0 .5.2.5.5v8z"}));t.a=c},195:function(e,t){e.exports=function(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}},196:function(e,t,n){"use strict";var r=n(0),o=n(7),c=Object(r.createElement)(o.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(r.createElement)(o.Path,{d:"M18 11.2h-5.2V6h-1.6v5.2H6v1.6h5.2V18h1.6v-5.2H18z"}));t.a=c},2:function(e,t){e.exports=window.lodash},210:function(e,t){"function"==typeof Object.create?e.exports=function(e,t){e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})}:e.exports=function(e,t){e.super_=t;var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e}},22:function(e,t,n){"use strict";function r(e){return(r=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}n.d(t,"a",(function(){return r}))},221:function(e,t){function n(){return e.exports=n=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},n.apply(this,arguments)}e.exports=n},222:function(e,t){e.exports=function(e,t){if(null==e)return{};var n,r,o={},c=Object.keys(e);for(r=0;r<c.length;r++)n=c[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}},223:function(e,t){e.exports=function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}},224:function(e,t,n){"use strict";var r=n(225);e.exports=function(e,t,n){n=n||{},9===t.nodeType&&(t=r.getWindow(t));var o=n.allowHorizontalScroll,c=n.onlyScrollIfNeeded,i=n.alignWithTop,a=n.alignWithLeft,l=n.offsetTop||0,s=n.offsetLeft||0,u=n.offsetBottom||0,d=n.offsetRight||0;o=void 0===o||o;var b=r.isWindow(t),f=r.offset(e),p=r.outerHeight(e),m=r.outerWidth(e),v=void 0,g=void 0,O=void 0,h=void 0,j=void 0,k=void 0,y=void 0,_=void 0,E=void 0,w=void 0;b?(y=t,w=r.height(y),E=r.width(y),_={left:r.scrollLeft(y),top:r.scrollTop(y)},j={left:f.left-_.left-s,top:f.top-_.top-l},k={left:f.left+m-(_.left+E)+d,top:f.top+p-(_.top+w)+u},h=_):(v=r.offset(t),g=t.clientHeight,O=t.clientWidth,h={left:t.scrollLeft,top:t.scrollTop},j={left:f.left-(v.left+(parseFloat(r.css(t,"borderLeftWidth"))||0))-s,top:f.top-(v.top+(parseFloat(r.css(t,"borderTopWidth"))||0))-l},k={left:f.left+m-(v.left+O+(parseFloat(r.css(t,"borderRightWidth"))||0))+d,top:f.top+p-(v.top+g+(parseFloat(r.css(t,"borderBottomWidth"))||0))+u}),j.top<0||k.top>0?!0===i?r.scrollTop(t,h.top+j.top):!1===i?r.scrollTop(t,h.top+k.top):j.top<0?r.scrollTop(t,h.top+j.top):r.scrollTop(t,h.top+k.top):c||((i=void 0===i||!!i)?r.scrollTop(t,h.top+j.top):r.scrollTop(t,h.top+k.top)),o&&(j.left<0||k.left>0?!0===a?r.scrollLeft(t,h.left+j.left):!1===a?r.scrollLeft(t,h.left+k.left):j.left<0?r.scrollLeft(t,h.left+j.left):r.scrollLeft(t,h.left+k.left):c||((a=void 0===a||!!a)?r.scrollLeft(t,h.left+j.left):r.scrollLeft(t,h.left+k.left)))}},225:function(e,t,n){"use strict";var r=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol?"symbol":typeof e};function c(e,t){var n=e["page"+(t?"Y":"X")+"Offset"],r="scroll"+(t?"Top":"Left");if("number"!=typeof n){var o=e.document;"number"!=typeof(n=o.documentElement[r])&&(n=o.body[r])}return n}function i(e){return c(e)}function a(e){return c(e,!0)}function l(e){var t=function(e){var t,n=void 0,r=void 0,o=e.ownerDocument,c=o.body,i=o&&o.documentElement;return n=(t=e.getBoundingClientRect()).left,r=t.top,{left:n-=i.clientLeft||c.clientLeft||0,top:r-=i.clientTop||c.clientTop||0}}(e),n=e.ownerDocument,r=n.defaultView||n.parentWindow;return t.left+=i(r),t.top+=a(r),t}var s=new RegExp("^("+/[\-+]?(?:\d*\.|)\d+(?:[eE][\-+]?\d+|)/.source+")(?!px)[a-z%]+$","i"),u=/^(top|right|bottom|left)$/,d="left",b=void 0;function f(e,t){for(var n=0;n<e.length;n++)t(e[n])}function p(e){return"border-box"===b(e,"boxSizing")}"undefined"!=typeof window&&(b=window.getComputedStyle?function(e,t,n){var r="",o=e.ownerDocument,c=n||o.defaultView.getComputedStyle(e,null);return c&&(r=c.getPropertyValue(t)||c[t]),r}:function(e,t){var n=e.currentStyle&&e.currentStyle[t];if(s.test(n)&&!u.test(t)){var r=e.style,o=r[d],c=e.runtimeStyle[d];e.runtimeStyle[d]=e.currentStyle[d],r[d]="fontSize"===t?"1em":n||0,n=r.pixelLeft+"px",r[d]=o,e.runtimeStyle[d]=c}return""===n?"auto":n});var m=["margin","border","padding"];function v(e,t,n){var r={},o=e.style,c=void 0;for(c in t)t.hasOwnProperty(c)&&(r[c]=o[c],o[c]=t[c]);for(c in n.call(e),t)t.hasOwnProperty(c)&&(o[c]=r[c])}function g(e,t,n){var r=0,o=void 0,c=void 0,i=void 0;for(c=0;c<t.length;c++)if(o=t[c])for(i=0;i<n.length;i++){var a;a="border"===o?o+n[i]+"Width":o+n[i],r+=parseFloat(b(e,a))||0}return r}function O(e){return null!=e&&e==e.window}var h={};function j(e,t,n){if(O(e))return"width"===t?h.viewportWidth(e):h.viewportHeight(e);if(9===e.nodeType)return"width"===t?h.docWidth(e):h.docHeight(e);var r="width"===t?["Left","Right"]:["Top","Bottom"],o="width"===t?e.offsetWidth:e.offsetHeight,c=(b(e),p(e)),i=0;(null==o||o<=0)&&(o=void 0,(null==(i=b(e,t))||Number(i)<0)&&(i=e.style[t]||0),i=parseFloat(i)||0),void 0===n&&(n=c?1:-1);var a=void 0!==o||c,l=o||i;if(-1===n)return a?l-g(e,["border","padding"],r):i;if(a){var s=2===n?-g(e,["border"],r):g(e,["margin"],r);return l+(1===n?0:s)}return i+g(e,m.slice(n),r)}f(["Width","Height"],(function(e){h["doc"+e]=function(t){var n=t.document;return Math.max(n.documentElement["scroll"+e],n.body["scroll"+e],h["viewport"+e](n))},h["viewport"+e]=function(t){var n="client"+e,r=t.document,o=r.body,c=r.documentElement[n];return"CSS1Compat"===r.compatMode&&c||o&&o[n]||c}}));var k={position:"absolute",visibility:"hidden",display:"block"};function y(e){var t=void 0,n=arguments;return 0!==e.offsetWidth?t=j.apply(void 0,n):v(e,k,(function(){t=j.apply(void 0,n)})),t}function _(e,t,n){var r=n;if("object"!==(void 0===t?"undefined":o(t)))return void 0!==r?("number"==typeof r&&(r+="px"),void(e.style[t]=r)):b(e,t);for(var c in t)t.hasOwnProperty(c)&&_(e,c,t[c])}f(["width","height"],(function(e){var t=e.charAt(0).toUpperCase()+e.slice(1);h["outer"+t]=function(t,n){return t&&y(t,e,n?0:1)};var n="width"===e?["Left","Right"]:["Top","Bottom"];h[e]=function(t,r){return void 0===r?t&&y(t,e,-1):t?(b(t),p(t)&&(r+=g(t,["padding","border"],n)),_(t,e,r)):void 0}})),e.exports=r({getWindow:function(e){var t=e.ownerDocument||e;return t.defaultView||t.parentWindow},offset:function(e,t){if(void 0===t)return l(e);!function(e,t){"static"===_(e,"position")&&(e.style.position="relative");var n=l(e),r={},o=void 0,c=void 0;for(c in t)t.hasOwnProperty(c)&&(o=parseFloat(_(e,c))||0,r[c]=o+t[c]-n[c]);_(e,r)}(e,t)},isWindow:O,each:f,css:_,clone:function(e){var t={};for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);if(e.overflow)for(var n in e)e.hasOwnProperty(n)&&(t.overflow[n]=e.overflow[n]);return t},scrollLeft:function(e,t){if(O(e)){if(void 0===t)return i(e);window.scrollTo(t,a(e))}else{if(void 0===t)return e.scrollLeft;e.scrollLeft=t}},scrollTop:function(e,t){if(O(e)){if(void 0===t)return a(e);window.scrollTo(i(e),t)}else{if(void 0===t)return e.scrollTop;e.scrollTop=t}},viewportWidth:0,viewportHeight:0},h)},226:function(e,t,n){"use strict";var r=n(0),o=n(7),c=Object(r.createElement)(o.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},Object(r.createElement)(o.Path,{d:"M17.5 11.6L12 16l-5.5-4.4.9-1.2L12 14l4.5-3.6 1 1.2z"}));t.a=c},227:function(e,t,n){"use strict";var r,o=this&&this.__extends||(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},function(e,t){function __(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(__.prototype=t.prototype,new __)}),c=this&&this.__assign||Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},i=this&&this.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&(n[r[o]]=e[r[o]])}return n};t.__esModule=!0;var a=n(9),l=n(37),s=n(228),u=n(229),d=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.state={lineHeight:null},t.textarea=null,t.onResize=function(e){t.props.onResize&&t.props.onResize(e)},t.updateLineHeight=function(){t.textarea&&t.setState({lineHeight:u(t.textarea)})},t.onChange=function(e){var n=t.props.onChange;t.currentValue=e.currentTarget.value,n&&n(e)},t}return o(t,e),t.prototype.componentDidMount=function(){var e=this,t=this.props,n=t.maxRows,r=t.async;"number"==typeof n&&this.updateLineHeight(),"number"==typeof n||r?setTimeout((function(){return e.textarea&&s(e.textarea)})):this.textarea&&s(this.textarea),this.textarea&&this.textarea.addEventListener("autosize:resized",this.onResize)},t.prototype.componentWillUnmount=function(){this.textarea&&(this.textarea.removeEventListener("autosize:resized",this.onResize),s.destroy(this.textarea))},t.prototype.render=function(){var e=this,t=this.props,n=(t.onResize,t.maxRows),r=(t.onChange,t.style),o=(t.innerRef,t.children),l=i(t,["onResize","maxRows","onChange","style","innerRef","children"]),s=this.state.lineHeight,u=n&&s?s*n:null;return a.createElement("textarea",c({},l,{onChange:this.onChange,style:u?c({},r,{maxHeight:u}):r,ref:function(t){e.textarea=t,"function"==typeof e.props.innerRef?e.props.innerRef(t):e.props.innerRef&&(e.props.innerRef.current=t)}}),o)},t.prototype.componentDidUpdate=function(){this.textarea&&s.update(this.textarea)},t.defaultProps={rows:1,async:!1},t.propTypes={rows:l.number,maxRows:l.number,onResize:l.func,innerRef:l.any,async:l.bool},t}(a.Component);t.TextareaAutosize=a.forwardRef((function(e,t){return a.createElement(d,c({},e,{innerRef:t}))}))},228:function(e,t,n){var r,o;void 0===(o="function"==typeof(r=function(e,t){"use strict";var n,r,o="function"==typeof Map?new Map:(n=[],r=[],{has:function(e){return n.indexOf(e)>-1},get:function(e){return r[n.indexOf(e)]},set:function(e,t){-1===n.indexOf(e)&&(n.push(e),r.push(t))},delete:function(e){var t=n.indexOf(e);t>-1&&(n.splice(t,1),r.splice(t,1))}}),c=function(e){return new Event(e,{bubbles:!0})};try{new Event("test")}catch(e){c=function(e){var t=document.createEvent("Event");return t.initEvent(e,!0,!1),t}}function i(e){var t=o.get(e);t&&t.destroy()}function a(e){var t=o.get(e);t&&t.update()}var l=null;"undefined"==typeof window||"function"!=typeof window.getComputedStyle?((l=function(e){return e}).destroy=function(e){return e},l.update=function(e){return e}):((l=function(e,t){return e&&Array.prototype.forEach.call(e.length?e:[e],(function(e){return function(e){if(e&&e.nodeName&&"TEXTAREA"===e.nodeName&&!o.has(e)){var t,n=null,r=null,i=null,a=function(){e.clientWidth!==r&&d()},l=function(t){window.removeEventListener("resize",a,!1),e.removeEventListener("input",d,!1),e.removeEventListener("keyup",d,!1),e.removeEventListener("autosize:destroy",l,!1),e.removeEventListener("autosize:update",d,!1),Object.keys(t).forEach((function(n){e.style[n]=t[n]})),o.delete(e)}.bind(e,{height:e.style.height,resize:e.style.resize,overflowY:e.style.overflowY,overflowX:e.style.overflowX,wordWrap:e.style.wordWrap});e.addEventListener("autosize:destroy",l,!1),"onpropertychange"in e&&"oninput"in e&&e.addEventListener("keyup",d,!1),window.addEventListener("resize",a,!1),e.addEventListener("input",d,!1),e.addEventListener("autosize:update",d,!1),e.style.overflowX="hidden",e.style.wordWrap="break-word",o.set(e,{destroy:l,update:d}),"vertical"===(t=window.getComputedStyle(e,null)).resize?e.style.resize="none":"both"===t.resize&&(e.style.resize="horizontal"),n="content-box"===t.boxSizing?-(parseFloat(t.paddingTop)+parseFloat(t.paddingBottom)):parseFloat(t.borderTopWidth)+parseFloat(t.borderBottomWidth),isNaN(n)&&(n=0),d()}function s(t){var n=e.style.width;e.style.width="0px",e.offsetWidth,e.style.width=n,e.style.overflowY=t}function u(){if(0!==e.scrollHeight){var t=function(e){for(var t=[];e&&e.parentNode&&e.parentNode instanceof Element;)e.parentNode.scrollTop&&t.push({node:e.parentNode,scrollTop:e.parentNode.scrollTop}),e=e.parentNode;return t}(e),o=document.documentElement&&document.documentElement.scrollTop;e.style.height="",e.style.height=e.scrollHeight+n+"px",r=e.clientWidth,t.forEach((function(e){e.node.scrollTop=e.scrollTop})),o&&(document.documentElement.scrollTop=o)}}function d(){u();var t=Math.round(parseFloat(e.style.height)),n=window.getComputedStyle(e,null),r="content-box"===n.boxSizing?Math.round(parseFloat(n.height)):e.offsetHeight;if(r<t?"hidden"===n.overflowY&&(s("scroll"),u(),r="content-box"===n.boxSizing?Math.round(parseFloat(window.getComputedStyle(e,null).height)):e.offsetHeight):"hidden"!==n.overflowY&&(s("hidden"),u(),r="content-box"===n.boxSizing?Math.round(parseFloat(window.getComputedStyle(e,null).height)):e.offsetHeight),i!==r){i=r;var o=c("autosize:resized");try{e.dispatchEvent(o)}catch(e){}}}}(e)})),e}).destroy=function(e){return e&&Array.prototype.forEach.call(e.length?e:[e],i),e},l.update=function(e){return e&&Array.prototype.forEach.call(e.length?e:[e],a),e}),t.default=l,e.exports=t.default})?r.apply(t,[e,t]):r)||(e.exports=o)},229:function(e,t,n){var r=n(230);e.exports=function(e){var t=r(e,"line-height"),n=parseFloat(t,10);if(t===n+""){var o=e.style.lineHeight;e.style.lineHeight=t+"em",t=r(e,"line-height"),n=parseFloat(t,10),o?e.style.lineHeight=o:delete e.style.lineHeight}if(-1!==t.indexOf("pt")?(n*=4,n/=3):-1!==t.indexOf("mm")?(n*=96,n/=25.4):-1!==t.indexOf("cm")?(n*=96,n/=2.54):-1!==t.indexOf("in")?n*=96:-1!==t.indexOf("pc")&&(n*=16),n=Math.round(n),"normal"===t){var c=e.nodeName,i=document.createElement(c);i.innerHTML="&nbsp;","TEXTAREA"===c.toUpperCase()&&i.setAttribute("rows","1");var a=r(e,"font-size");i.style.fontSize=a,i.style.padding="0px",i.style.border="0px";var l=document.body;l.appendChild(i),n=i.offsetHeight,l.removeChild(i)}return n}},230:function(e,t){e.exports=function(e,t,n){return((n=window.getComputedStyle)?n(e):e.currentStyle)[t.replace(/-(\w)/gi,(function(e,t){return t.toUpperCase()}))]}},231:function(e,t,n){"use strict";var r=n(0),o=n(7),c=Object(r.createElement)(o.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(r.createElement)(o.Path,{d:"M15.6 7.2H14v1.5h1.6c2 0 3.7 1.7 3.7 3.7s-1.7 3.7-3.7 3.7H14v1.5h1.6c2.8 0 5.2-2.3 5.2-5.2 0-2.9-2.3-5.2-5.2-5.2zM4.7 12.4c0-2 1.7-3.7 3.7-3.7H10V7.2H8.4c-2.9 0-5.2 2.3-5.2 5.2 0 2.9 2.3 5.2 5.2 5.2H10v-1.5H8.4c-2 0-3.7-1.7-3.7-3.7zm4.6.9h5.3v-1.5H9.3v1.5z"}));t.a=c},24:function(e,t,n){"use strict";function r(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}n.d(t,"a",(function(){return r}))},246:function(e,t,n){"use strict";var r=n(0),o=n(7),c=Object(r.createElement)(o.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(r.createElement)(o.Path,{d:"M20.1 5.1L16.9 2 6.2 12.7l-1.3 4.4 4.5-1.3L20.1 5.1zM4 20.8h8v-1.5H4v1.5z"}));t.a=c},25:function(e,t){e.exports=window.wp.richText},266:function(e,t,n){"use strict";var r=n(0),o=n(7),c=Object(r.createElement)(o.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(r.createElement)(o.Path,{d:"M13.5 6C10.5 6 8 8.5 8 11.5c0 1.1.3 2.1.9 3l-3.4 3 1 1.1 3.4-2.9c1 .9 2.2 1.4 3.6 1.4 3 0 5.5-2.5 5.5-5.5C19 8.5 16.5 6 13.5 6zm0 9.5c-2.2 0-4-1.8-4-4s1.8-4 4-4 4 1.8 4 4-1.8 4-4 4z"}));t.a=c},267:function(e,t,n){"use strict";var r=n(0),o=n(7),c=Object(r.createElement)(o.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(r.createElement)(o.Path,{d:"M10.6 6L9.4 7l4.6 5-4.6 5 1.2 1 5.4-6z"}));t.a=c},268:function(e,t,n){"use strict";var r=n(0),o=n(7),c=Object(r.createElement)(o.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(r.createElement)(o.Path,{d:"M14.6 7l-1.2-1L8 12l5.4 6 1.2-1-4.6-5z"}));t.a=c},269:function(e,t,n){"use strict";var r=n(0),o=n(7),c=Object(r.createElement)(o.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},Object(r.createElement)(o.Path,{d:"M6.5 12.4L12 8l5.5 4.4-.9 1.2L12 10l-4.5 3.6-1-1.2z"}));t.a=c},270:function(e,t,n){"use strict";var r=n(0),o=n(7),c=Object(r.createElement)(o.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(r.createElement)(o.Path,{d:"M13 19h-2v-2h2v2zm0-6h-2v-2h2v2zm0-6h-2V5h2v2z"}));t.a=c},271:function(e,t,n){"use strict";var r=n(0),o=n(7),c=Object(r.createElement)(o.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"-2 -2 24 24"},Object(r.createElement)(o.Path,{d:"M6.734 16.106l2.176-2.38-1.093-1.028-3.846 4.158 3.846 4.157 1.093-1.027-2.176-2.38h2.811c1.125 0 2.25.03 3.374 0 1.428-.001 3.362-.25 4.963-1.277 1.66-1.065 2.868-2.906 2.868-5.859 0-2.479-1.327-4.896-3.65-5.93-1.82-.813-3.044-.8-4.806-.788l-.567.002v1.5c.184 0 .368 0 .553-.002 1.82-.007 2.704-.014 4.21.657 1.854.827 2.76 2.657 2.76 4.561 0 2.472-.973 3.824-2.178 4.596-1.258.807-2.864 1.04-4.163 1.04h-.02c-1.115.03-2.229 0-3.344 0H6.734z"}));t.a=c},272:function(e,t,n){"use strict";var r=n(0),o=n(7),c=Object(r.createElement)(o.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(r.createElement)(o.Path,{d:"M18.5 15v3.5H13V6.7l4.5 4.1 1-1.1-6.2-5.8-5.8 5.8 1 1.1 4-4v11.7h-6V15H4v5h16v-5z"}));t.a=c},28:function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}n.d(t,"a",(function(){return r}))},29:function(e,t,n){"use strict";function r(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function o(e,t,n){return t&&r(e.prototype,t),n&&r(e,n),e}n.d(t,"a",(function(){return o}))},3:function(e,t){e.exports=window.wp.components},30:function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(24);function o(e,t){if(e){if("string"==typeof e)return Object(r.a)(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Object(r.a)(e,t):void 0}}},31:function(e,t){e.exports=window.wp.url},32:function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(58);function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Object(r.a)(e,t)}},33:function(e,t,n){"use strict";n.d(t,"a",(function(){return c}));var r=n(43),o=n(19);function c(e,t){return!t||"object"!==Object(r.a)(t)&&"function"!=typeof t?Object(o.a)(e):t}},34:function(e,t){e.exports=window.wp.dom},343:function(e,t,n){"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),t.diffChars=function(e,t,n){return o.diff(e,t,n)},t.characterDiff=void 0;var o=new(((r=n(389))&&r.__esModule?r:{default:r}).default);t.characterDiff=o},344:function(e,t,n){"use strict";t.match=function(e,t){return l(e).some((function(e){var n=e.inverse,r="all"===e.type||t.type===e.type;if(r&&n||!r&&!n)return!1;var o=e.expressions.every((function(e){var n=e.feature,r=e.modifier,o=e.value,c=t[n];if(!c)return!1;switch(n){case"orientation":case"scan":return c.toLowerCase()===o.toLowerCase();case"width":case"height":case"device-width":case"device-height":o=d(o),c=d(c);break;case"resolution":o=u(o),c=u(c);break;case"aspect-ratio":case"device-aspect-ratio":case"device-pixel-ratio":o=s(o),c=s(c);break;case"grid":case"color":case"color-index":case"monochrome":o=parseInt(o,10)||1,c=parseInt(c,10)||0}switch(r){case"min":return c>=o;case"max":return c<=o;default:return c===o}}));return o&&!n||!o&&n}))},t.parse=l;var r=/(?:(only|not)?\s*([^\s\(\)]+)(?:\s*and)?\s*)?(.+)?/i,o=/\(\s*([^\s\:\)]+)\s*(?:\:\s*([^\s\)]+))?\s*\)/,c=/^(?:(min|max)-)?(.+)/,i=/(em|rem|px|cm|mm|in|pt|pc)?$/,a=/(dpi|dpcm|dppx)?$/;function l(e){return e.split(",").map((function(e){var t=(e=e.trim()).match(r),n=t[1],i=t[2],a=t[3]||"",l={};return l.inverse=!!n&&"not"===n.toLowerCase(),l.type=i?i.toLowerCase():"all",a=a.match(/\([^\)]+\)/g)||[],l.expressions=a.map((function(e){var t=e.match(o),n=t[1].toLowerCase().match(c);return{modifier:n[1],feature:n[2],value:t[2]}})),l}))}function s(e){var t,n=Number(e);return n||(n=(t=e.match(/^(\d+)\s*\/\s*(\d+)$/))[1]/t[2]),n}function u(e){var t=parseFloat(e);switch(String(e).match(a)[1]){case"dpcm":return t/2.54;case"dppx":return 96*t;default:return t}}function d(e){var t=parseFloat(e);switch(String(e).match(i)[1]){case"em":case"rem":return 16*t;case"cm":return 96*t/2.54;case"mm":return 96*t/2.54/10;case"in":return 96*t;case"pt":return 72*t;case"pc":return 72*t/12;default:return t}}},345:function(e,t){var n=e.exports=function(e){return new r(e)};function r(e){this.value=e}function o(e,t,n){var r=[],o=[],a=!0;return function e(d){var b=n?c(d):d,f={},p=!0,m={node:b,node_:d,path:[].concat(r),parent:o[o.length-1],parents:o,key:r.slice(-1)[0],isRoot:0===r.length,level:r.length,circular:null,update:function(e,t){m.isRoot||(m.parent.node[m.key]=e),m.node=e,t&&(p=!1)},delete:function(e){delete m.parent.node[m.key],e&&(p=!1)},remove:function(e){l(m.parent.node)?m.parent.node.splice(m.key,1):delete m.parent.node[m.key],e&&(p=!1)},keys:null,before:function(e){f.before=e},after:function(e){f.after=e},pre:function(e){f.pre=e},post:function(e){f.post=e},stop:function(){a=!1},block:function(){p=!1}};if(!a)return m;function v(){if("object"==typeof m.node&&null!==m.node){m.keys&&m.node_===m.node||(m.keys=i(m.node)),m.isLeaf=0==m.keys.length;for(var e=0;e<o.length;e++)if(o[e].node_===d){m.circular=o[e];break}}else m.isLeaf=!0,m.keys=null;m.notLeaf=!m.isLeaf,m.notRoot=!m.isRoot}v();var g=t.call(m,m.node);return void 0!==g&&m.update&&m.update(g),f.before&&f.before.call(m,m.node),p?("object"!=typeof m.node||null===m.node||m.circular||(o.push(m),v(),s(m.keys,(function(t,o){r.push(t),f.pre&&f.pre.call(m,m.node[t],t);var c=e(m.node[t]);n&&u.call(m.node,t)&&(m.node[t]=c.node),c.isLast=o==m.keys.length-1,c.isFirst=0==o,f.post&&f.post.call(m,c),r.pop()})),o.pop()),f.after&&f.after.call(m,m.node),m):m}(e).node}function c(e){if("object"==typeof e&&null!==e){var t;if(l(e))t=[];else if("[object Date]"===a(e))t=new Date(e.getTime?e.getTime():e);else if(function(e){return"[object RegExp]"===a(e)}(e))t=new RegExp(e);else if(function(e){return"[object Error]"===a(e)}(e))t={message:e.message};else if(function(e){return"[object Boolean]"===a(e)}(e))t=new Boolean(e);else if(function(e){return"[object Number]"===a(e)}(e))t=new Number(e);else if(function(e){return"[object String]"===a(e)}(e))t=new String(e);else if(Object.create&&Object.getPrototypeOf)t=Object.create(Object.getPrototypeOf(e));else if(e.constructor===Object)t={};else{var n=e.constructor&&e.constructor.prototype||e.__proto__||{},r=function(){};r.prototype=n,t=new r}return s(i(e),(function(n){t[n]=e[n]})),t}return e}r.prototype.get=function(e){for(var t=this.value,n=0;n<e.length;n++){var r=e[n];if(!t||!u.call(t,r)){t=void 0;break}t=t[r]}return t},r.prototype.has=function(e){for(var t=this.value,n=0;n<e.length;n++){var r=e[n];if(!t||!u.call(t,r))return!1;t=t[r]}return!0},r.prototype.set=function(e,t){for(var n=this.value,r=0;r<e.length-1;r++){var o=e[r];u.call(n,o)||(n[o]={}),n=n[o]}return n[e[r]]=t,t},r.prototype.map=function(e){return o(this.value,e,!0)},r.prototype.forEach=function(e){return this.value=o(this.value,e,!1),this.value},r.prototype.reduce=function(e,t){var n=1===arguments.length,r=n?this.value:t;return this.forEach((function(t){this.isRoot&&n||(r=e.call(this,r,t))})),r},r.prototype.paths=function(){var e=[];return this.forEach((function(t){e.push(this.path)})),e},r.prototype.nodes=function(){var e=[];return this.forEach((function(t){e.push(this.node)})),e},r.prototype.clone=function(){var e=[],t=[];return function n(r){for(var o=0;o<e.length;o++)if(e[o]===r)return t[o];if("object"==typeof r&&null!==r){var a=c(r);return e.push(r),t.push(a),s(i(r),(function(e){a[e]=n(r[e])})),e.pop(),t.pop(),a}return r}(this.value)};var i=Object.keys||function(e){var t=[];for(var n in e)t.push(n);return t};function a(e){return Object.prototype.toString.call(e)}var l=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)},s=function(e,t){if(e.forEach)return e.forEach(t);for(var n=0;n<e.length;n++)t(e[n],n,e)};s(i(r.prototype),(function(e){n[e]=function(t){var n=[].slice.call(arguments,1),o=new r(t);return o[e].apply(o,n)}}));var u=Object.hasOwnProperty||function(e,t){return t in e}},35:function(e,t){e.exports=window.wp.hooks},37:function(e,t,n){e.exports=n(169)()},38:function(e,t){e.exports=window.wp.deprecated},385:function(e,t,n){"use strict";var r=n(0),o=n(7),c=Object(r.createElement)(o.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(r.createElement)(o.Path,{d:"M9.1 9v-.5c0-.6.2-1.1.7-1.4.5-.3 1.2-.5 2-.5.7 0 1.4.1 2.1.3.7.2 1.4.5 2.1.9l.2-1.9c-.6-.3-1.2-.5-1.9-.7-.8-.1-1.6-.2-2.4-.2-1.5 0-2.7.3-3.6 1-.8.7-1.2 1.5-1.2 2.6V9h2zM20 12H4v1h8.3c.3.1.6.2.8.3.5.2.9.5 1.1.8.3.3.4.7.4 1.2 0 .7-.2 1.1-.8 1.5-.5.3-1.2.5-2.1.5-.8 0-1.6-.1-2.4-.3-.8-.2-1.5-.5-2.2-.8L7 18.1c.5.2 1.2.4 2 .6.8.2 1.6.3 2.4.3 1.7 0 3-.3 3.9-1 .9-.7 1.3-1.6 1.3-2.8 0-.9-.2-1.7-.7-2.2H20v-1z"}));t.a=c},386:function(e,t,n){"use strict";var r=n(0),o=n(7),c=Object(r.createElement)(o.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(r.createElement)(o.Path,{d:"M4 19.8h8.9v-1.5H4v1.5zm8.9-15.6H4v1.5h8.9V4.2zm-8.9 7v1.5h16v-1.5H4z"}));t.a=c},387:function(e,t,n){"use strict";var r=n(0),o=n(7),c=Object(r.createElement)(o.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(r.createElement)(o.Path,{d:"M16.4 4.2H7.6v1.5h8.9V4.2zM4 11.2v1.5h16v-1.5H4zm3.6 8.6h8.9v-1.5H7.6v1.5z"}));t.a=c},388:function(e,t,n){"use strict";var r=n(0),o=n(7),c=Object(r.createElement)(o.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(r.createElement)(o.Path,{d:"M11.1 19.8H20v-1.5h-8.9v1.5zm0-15.6v1.5H20V4.2h-8.9zM4 12.8h16v-1.5H4v1.5z"}));t.a=c},389:function(e,t,n){"use strict";function r(){}function o(e,t,n,r,o){for(var c=0,i=t.length,a=0,l=0;c<i;c++){var s=t[c];if(s.removed){if(s.value=e.join(r.slice(l,l+s.count)),l+=s.count,c&&t[c-1].added){var u=t[c-1];t[c-1]=t[c],t[c]=u}}else{if(!s.added&&o){var d=n.slice(a,a+s.count);d=d.map((function(e,t){var n=r[l+t];return n.length>e.length?n:e})),s.value=e.join(d)}else s.value=e.join(n.slice(a,a+s.count));a+=s.count,s.added||(l+=s.count)}}var b=t[i-1];return i>1&&"string"==typeof b.value&&(b.added||b.removed)&&e.equals("",b.value)&&(t[i-2].value+=b.value,t.pop()),t}function c(e){return{newPos:e.newPos,components:e.components.slice(0)}}Object.defineProperty(t,"__esModule",{value:!0}),t.default=r,r.prototype={diff:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=n.callback;"function"==typeof n&&(r=n,n={}),this.options=n;var i=this;function a(e){return r?(setTimeout((function(){r(void 0,e)}),0),!0):e}e=this.castInput(e),t=this.castInput(t),e=this.removeEmpty(this.tokenize(e));var l=(t=this.removeEmpty(this.tokenize(t))).length,s=e.length,u=1,d=l+s,b=[{newPos:-1,components:[]}],f=this.extractCommon(b[0],t,e,0);if(b[0].newPos+1>=l&&f+1>=s)return a([{value:this.join(t),count:t.length}]);function p(){for(var n=-1*u;n<=u;n+=2){var r=void 0,d=b[n-1],f=b[n+1],p=(f?f.newPos:0)-n;d&&(b[n-1]=void 0);var m=d&&d.newPos+1<l,v=f&&0<=p&&p<s;if(m||v){if(!m||v&&d.newPos<f.newPos?(r=c(f),i.pushComponent(r.components,void 0,!0)):((r=d).newPos++,i.pushComponent(r.components,!0,void 0)),p=i.extractCommon(r,t,e,n),r.newPos+1>=l&&p+1>=s)return a(o(i,r.components,t,e,i.useLongestToken));b[n]=r}else b[n]=void 0}u++}if(r)!function e(){setTimeout((function(){if(u>d)return r();p()||e()}),0)}();else for(;u<=d;){var m=p();if(m)return m}},pushComponent:function(e,t,n){var r=e[e.length-1];r&&r.added===t&&r.removed===n?e[e.length-1]={count:r.count+1,added:t,removed:n}:e.push({count:1,added:t,removed:n})},extractCommon:function(e,t,n,r){for(var o=t.length,c=n.length,i=e.newPos,a=i-r,l=0;i+1<o&&a+1<c&&this.equals(t[i+1],n[a+1]);)i++,a++,l++;return l&&e.components.push({count:l}),e.newPos=i,a},equals:function(e,t){return this.options.comparator?this.options.comparator(e,t):e===t||this.options.ignoreCase&&e.toLowerCase()===t.toLowerCase()},removeEmpty:function(e){for(var t=[],n=0;n<e.length;n++)e[n]&&t.push(e[n]);return t},castInput:function(e){return e},tokenize:function(e){return e.split("")},join:function(e){return e.join("")}}},39:function(e,t,n){"use strict";function r(e){if(Array.isArray(e))return e}n.d(t,"a",(function(){return r}))},390:function(e,t,n){"use strict";var r=n(0),o=n(7),c=Object(r.createElement)(o.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(r.createElement)(o.Path,{d:"M18 5.5H6a.5.5 0 00-.5.5v3h13V6a.5.5 0 00-.5-.5zm.5 5H10v8h8a.5.5 0 00.5-.5v-7.5zm-10 0h-3V18a.5.5 0 00.5.5h2.5v-8zM6 4h12a2 2 0 012 2v12a2 2 0 01-2 2H6a2 2 0 01-2-2V6a2 2 0 012-2z"}));t.a=c},391:function(e,t,n){"use strict";var r=n(0),o=n(7),c=Object(r.createElement)(o.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(r.createElement)(o.Path,{d:"M18.7 3H5.3C4 3 3 4 3 5.3v13.4C3 20 4 21 5.3 21h13.4c1.3 0 2.3-1 2.3-2.3V5.3C21 4 20 3 18.7 3zm.8 15.7c0 .4-.4.8-.8.8H5.3c-.4 0-.8-.4-.8-.8V5.3c0-.4.4-.8.8-.8h13.4c.4 0 .8.4.8.8v13.4zM10 15l5-3-5-3v6z"}));t.a=c},4:function(e,t){e.exports=window.wp.data},40:function(e,t,n){"use strict";function r(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}n.d(t,"a",(function(){return r}))},42:function(e,t,n){"use strict";function r(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}n.d(t,"a",(function(){return r}))},43:function(e,t,n){"use strict";function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}n.d(t,"a",(function(){return r}))},45:function(e,t,n){"use strict";function r(e,t,n,r,o,c,i){try{var a=e[c](i),l=a.value}catch(e){return void n(e)}a.done?t(l):Promise.resolve(l).then(r,o)}function o(e){return function(){var t=this,n=arguments;return new Promise((function(o,c){var i=e.apply(t,n);function a(e){r(i,o,c,a,l,"next",e)}function l(e){r(i,o,c,a,l,"throw",e)}a(void 0)}))}}n.d(t,"a",(function(){return o}))},46:function(e,t){e.exports=window.wp.keyboardShortcuts},48:function(e,t,n){"use strict";function r(e,t){if(null==e)return{};var n,r,o={},c=Object.keys(e);for(r=0;r<c.length;r++)n=c[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}n.d(t,"a",(function(){return r}))},49:function(e,t,n){"use strict";var r,o;function c(e){return[e]}function i(){var e={clear:function(){e.head=null}};return e}function a(e,t,n){var r;if(e.length!==t.length)return!1;for(r=n;r<e.length;r++)if(e[r]!==t[r])return!1;return!0}r={},o="undefined"!=typeof WeakMap,t.a=function(e,t){var n,l;function s(){n=o?new WeakMap:i()}function u(){var n,r,o,c,i,s=arguments.length;for(c=new Array(s),o=0;o<s;o++)c[o]=arguments[o];for(i=t.apply(null,c),(n=l(i)).isUniqueByDependants||(n.lastDependants&&!a(i,n.lastDependants,0)&&n.clear(),n.lastDependants=i),r=n.head;r;){if(a(r.args,c,1))return r!==n.head&&(r.prev.next=r.next,r.next&&(r.next.prev=r.prev),r.next=n.head,r.prev=null,n.head.prev=r,n.head=r),r.val;r=r.next}return r={val:e.apply(null,c)},c[0]=null,r.args=c,n.head&&(n.head.prev=r,r.next=n.head),n.head=r,r.val}return t||(t=c),l=o?function(e){var t,o,c,a,l,s=n,u=!0;for(t=0;t<e.length;t++){if(!(l=o=e[t])||"object"!=typeof l){u=!1;break}s.has(o)?s=s.get(o):(c=new WeakMap,s.set(o,c),s=c)}return s.has(r)||((a=i()).isUniqueByDependants=u,s.set(r,a)),s.get(r)}:function(){return n},u.getDependants=t,u.clear=s,s(),u}},5:function(e,t,n){"use strict";function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}n.d(t,"a",(function(){return r}))},51:function(e,t){e.exports=window.wp.notices},519:function(e,t,n){"use strict";n.r(t),n.d(t,"getColorClassName",(function(){return Io})),n.d(t,"getColorObjectByAttributeValues",(function(){return So})),n.d(t,"getColorObjectByColorValue",(function(){return Bo})),n.d(t,"createCustomColorsHOC",(function(){return Ui})),n.d(t,"withColors",(function(){return Wi})),n.d(t,"__experimentalUseColors",(function(){return aa})),n.d(t,"__experimentalGetGradientClass",(function(){return Po})),n.d(t,"getGradientValueBySlug",(function(){return To})),n.d(t,"__experimentalGetGradientObjectByGradientValue",(function(){return No})),n.d(t,"getGradientSlugByValue",(function(){return Do})),n.d(t,"__experimentalUseGradient",(function(){return Ao})),n.d(t,"getFontSize",(function(){return ii})),n.d(t,"getFontSizeClass",(function(){return li})),n.d(t,"getFontSizeObjectByValue",(function(){return ai})),n.d(t,"FontSizePicker",(function(){return si})),n.d(t,"withFontSizes",(function(){return ba})),n.d(t,"AlignmentToolbar",(function(){return ja})),n.d(t,"Autocomplete",(function(){return Ma})),n.d(t,"BlockAlignmentControl",(function(){return Fr})),n.d(t,"BlockAlignmentToolbar",(function(){return Vr})),n.d(t,"__experimentalBlockFullHeightAligmentToolbar",(function(){return Va})),n.d(t,"__experimentalBlockAlignmentMatrixToolbar",(function(){return Ha})),n.d(t,"BlockBreadcrumb",(function(){return Ua})),n.d(t,"BlockContextProvider",(function(){return $a})),n.d(t,"BlockControls",(function(){return yr})),n.d(t,"BlockColorsStyleSelector",(function(){return Za})),n.d(t,"BlockEdit",(function(){return tl})),n.d(t,"useBlockEditContext",(function(){return h})),n.d(t,"BlockFormatControls",(function(){return il})),n.d(t,"BlockIcon",(function(){return Aa})),n.d(t,"BlockNavigationDropdown",(function(){return ob})),n.d(t,"__experimentalBlockNavigationBlockFill",(function(){return zd})),n.d(t,"__experimentalBlockNavigationEditor",(function(){return hb})),n.d(t,"__experimentalBlockNavigationTree",(function(){return eb})),n.d(t,"__experimentalBlockVariationPicker",(function(){return kb})),n.d(t,"__experimentalBlockVariationTransforms",(function(){return Eb})),n.d(t,"BlockVerticalAlignmentToolbar",(function(){return Tb})),n.d(t,"ButtonBlockerAppender",(function(){return tu})),n.d(t,"ColorPalette",(function(){return Rb})),n.d(t,"ColorPaletteControl",(function(){return Lb})),n.d(t,"ContrastChecker",(function(){return nc})),n.d(t,"__experimentalGradientPicker",(function(){return Vb})),n.d(t,"__experimentalGradientPickerControl",(function(){return Hb})),n.d(t,"__experimentalGradientPickerPanel",(function(){return zb})),n.d(t,"__experimentalFontAppearanceControl",(function(){return Kc})),n.d(t,"__experimentalFontFamilyControl",(function(){return Jc})),n.d(t,"__experimentalColorGradientControl",(function(){return Wo})),n.d(t,"__experimentalPanelColorGradientSettings",(function(){return ec})),n.d(t,"__experimentalImageSizeControl",(function(){return Ub})),n.d(t,"InnerBlocks",(function(){return rf})),n.d(t,"__experimentalUseInnerBlocksProps",(function(){return nf})),n.d(t,"InspectorAdvancedControls",(function(){return Zr})),n.d(t,"InspectorControls",(function(){return ro})),n.d(t,"JustifyToolbar",(function(){return uf})),n.d(t,"__experimentalLinkControl",(function(){return Ff})),n.d(t,"__experimentalLinkControlSearchInput",(function(){return Tf})),n.d(t,"__experimentalLinkControlSearchResults",(function(){return kf})),n.d(t,"__experimentalLinkControlSearchItem",(function(){return jf})),n.d(t,"LineHeightControl",(function(){return Fc})),n.d(t,"MediaReplaceFlow",(function(){return Uf})),n.d(t,"MediaPlaceholder",(function(){return Xf})),n.d(t,"MediaUpload",(function(){return zf})),n.d(t,"MediaUploadCheck",(function(){return Gf})),n.d(t,"PanelColorSettings",(function(){return Xi})),n.d(t,"PlainText",(function(){return Jf})),n.d(t,"__experimentalResponsiveBlockControl",(function(){return tp})),n.d(t,"RichText",(function(){return Ob})),n.d(t,"RichTextShortcut",(function(){return np})),n.d(t,"RichTextToolbarButton",(function(){return rp})),n.d(t,"__unstableRichTextInputEvent",(function(){return op})),n.d(t,"ToolSelector",(function(){return ip})),n.d(t,"__experimentalUnitControl",(function(){return hi})),n.d(t,"URLInput",(function(){return gf})),n.d(t,"URLInputButton",(function(){return sp})),n.d(t,"URLPopover",(function(){return $f})),n.d(t,"__experimentalImageURLInputUI",(function(){return fp})),n.d(t,"withColorContext",(function(){return Ab})),n.d(t,"__experimentalBlockSettingsMenuFirstItem",(function(){return Xu})),n.d(t,"__experimentalInserterMenuExtension",(function(){return zs})),n.d(t,"__experimentalPreviewOptions",(function(){return mp})),n.d(t,"__experimentalUseResizeCanvas",(function(){return yp})),n.d(t,"BlockInspector",(function(){return Ip})),n.d(t,"BlockList",(function(){return hd})),n.d(t,"useBlockProps",(function(){return Sd})),n.d(t,"__experimentalBlock",(function(){return Np})),n.d(t,"BlockMover",(function(){return Ou})),n.d(t,"BlockPreview",(function(){return ps})),n.d(t,"BlockSelectionClearer",(function(){return Ap})),n.d(t,"__unstableUseBlockSelectionClearer",(function(){return Dp})),n.d(t,"BlockSettingsMenu",(function(){return id})),n.d(t,"BlockSettingsMenuControls",(function(){return rd})),n.d(t,"BlockTitle",(function(){return Ga})),n.d(t,"BlockToolbar",(function(){return ad})),n.d(t,"CopyHandler",(function(){return Gu})),n.d(t,"__unstableUseClipboardHandler",(function(){return zu})),n.d(t,"DefaultBlockAppender",(function(){return eu})),n.d(t,"__unstableEditorStyles",(function(){return im})),n.d(t,"Inserter",(function(){return Js})),n.d(t,"__experimentalLibrary",(function(){return am})),n.d(t,"__experimentalSearchForm",(function(){return as})),n.d(t,"BlockEditorKeyboardShortcuts",(function(){return sm})),n.d(t,"MultiSelectScrollIntoView",(function(){return vd})),n.d(t,"NavigableToolbar",(function(){return vu})),n.d(t,"ObserveTyping",(function(){return fm})),n.d(t,"__unstableUseTypingObserver",(function(){return bm})),n.d(t,"__unstableUseMouseMoveTypingReset",(function(){return dm})),n.d(t,"PreserveScrollInReorder",(function(){return pm})),n.d(t,"SkipToSelectedBlock",(function(){return _p})),n.d(t,"Typewriter",(function(){return Om})),n.d(t,"__unstableUseTypewriter",(function(){return gm})),n.d(t,"Warning",(function(){return Il})),n.d(t,"WritingFlow",(function(){return Zl})),n.d(t,"__unstableUseCanvasClickRedirect",(function(){return jm})),n.d(t,"useBlockDisplayInformation",(function(){return za})),n.d(t,"__unstableIframe",(function(){return _m})),n.d(t,"__experimentalUseNoRecursiveRenders",(function(){return wm})),n.d(t,"BlockEditorProvider",(function(){return ds})),n.d(t,"__experimentalUseSimulatedMediaQuery",(function(){return kp})),n.d(t,"__experimentalUseEditorFeature",(function(){return mo})),n.d(t,"transformStyles",(function(){return om})),n.d(t,"validateThemeColors",(function(){return Cm})),n.d(t,"validateThemeGradients",(function(){return Sm})),n.d(t,"__experimentalGetMatchingVariation",(function(){return yb})),n.d(t,"storeConfig",(function(){return mr})),n.d(t,"store",(function(){return vr})),n.d(t,"SETTINGS_DEFAULTS",(function(){return E}));var r={};n.r(r),n.d(r,"getBlockName",(function(){return Y})),n.d(r,"isBlockValid",(function(){return X})),n.d(r,"getBlockAttributes",(function(){return Q})),n.d(r,"getBlock",(function(){return Z})),n.d(r,"__unstableGetBlockWithoutInnerBlocks",(function(){return J})),n.d(r,"getBlocks",(function(){return ee})),n.d(r,"__unstableGetBlockWithBlockTree",(function(){return te})),n.d(r,"__unstableGetBlockTree",(function(){return ne})),n.d(r,"getClientIdsOfDescendants",(function(){return re})),n.d(r,"getClientIdsWithDescendants",(function(){return oe})),n.d(r,"getGlobalBlockCount",(function(){return ce})),n.d(r,"getBlocksByClientId",(function(){return ie})),n.d(r,"getBlockCount",(function(){return ae})),n.d(r,"getSelectionStart",(function(){return le})),n.d(r,"getSelectionEnd",(function(){return se})),n.d(r,"getBlockSelectionStart",(function(){return ue})),n.d(r,"getBlockSelectionEnd",(function(){return de})),n.d(r,"getSelectedBlockCount",(function(){return be})),n.d(r,"hasSelectedBlock",(function(){return fe})),n.d(r,"getSelectedBlockClientId",(function(){return pe})),n.d(r,"getSelectedBlock",(function(){return me})),n.d(r,"getBlockRootClientId",(function(){return ve})),n.d(r,"getBlockParents",(function(){return ge})),n.d(r,"getBlockParentsByBlockName",(function(){return Oe})),n.d(r,"getBlockHierarchyRootClientId",(function(){return he})),n.d(r,"getLowestCommonAncestorWithSelectedBlock",(function(){return je})),n.d(r,"getAdjacentBlockClientId",(function(){return ke})),n.d(r,"getPreviousBlockClientId",(function(){return ye})),n.d(r,"getNextBlockClientId",(function(){return _e})),n.d(r,"getSelectedBlocksInitialCaretPosition",(function(){return Ee})),n.d(r,"getSelectedBlockClientIds",(function(){return we})),n.d(r,"getMultiSelectedBlockClientIds",(function(){return Ce})),n.d(r,"getMultiSelectedBlocks",(function(){return Se})),n.d(r,"getFirstMultiSelectedBlockClientId",(function(){return Be})),n.d(r,"getLastMultiSelectedBlockClientId",(function(){return Ie})),n.d(r,"isFirstMultiSelectedBlock",(function(){return xe})),n.d(r,"isBlockMultiSelected",(function(){return Pe})),n.d(r,"isAncestorMultiSelected",(function(){return Te})),n.d(r,"getMultiSelectedBlocksStartClientId",(function(){return Ne})),n.d(r,"getMultiSelectedBlocksEndClientId",(function(){return De})),n.d(r,"getBlockOrder",(function(){return Ae})),n.d(r,"getBlockIndex",(function(){return Re})),n.d(r,"isBlockSelected",(function(){return Le})),n.d(r,"hasSelectedInnerBlock",(function(){return Me})),n.d(r,"isBlockWithinSelection",(function(){return Fe})),n.d(r,"hasMultiSelection",(function(){return Ve})),n.d(r,"isMultiSelecting",(function(){return He})),n.d(r,"isSelectionEnabled",(function(){return ze})),n.d(r,"getBlockMode",(function(){return Ge})),n.d(r,"isTyping",(function(){return Ue})),n.d(r,"isDraggingBlocks",(function(){return We})),n.d(r,"getDraggedBlockClientIds",(function(){return Ke})),n.d(r,"isBlockBeingDragged",(function(){return qe})),n.d(r,"isAncestorBeingDragged",(function(){return $e})),n.d(r,"isCaretWithinFormattedText",(function(){return Ye})),n.d(r,"getBlockInsertionPoint",(function(){return Xe})),n.d(r,"isBlockInsertionPointVisible",(function(){return Qe})),n.d(r,"isValidTemplate",(function(){return Ze})),n.d(r,"getTemplate",(function(){return Je})),n.d(r,"getTemplateLock",(function(){return et})),n.d(r,"canInsertBlockType",(function(){return nt})),n.d(r,"canInsertBlocks",(function(){return rt})),n.d(r,"getInserterItems",(function(){return st})),n.d(r,"getBlockTransformItems",(function(){return ut})),n.d(r,"hasInserterItems",(function(){return dt})),n.d(r,"__experimentalGetAllowedBlocks",(function(){return bt})),n.d(r,"__experimentalGetAllowedPatterns",(function(){return pt})),n.d(r,"getBlockListSettings",(function(){return mt})),n.d(r,"getSettings",(function(){return vt})),n.d(r,"isLastBlockChangePersistent",(function(){return gt})),n.d(r,"__experimentalGetBlockListSettingsForBlocks",(function(){return Ot})),n.d(r,"__experimentalGetParsedReusableBlock",(function(){return ht})),n.d(r,"__experimentalGetReusableBlockTitle",(function(){return jt})),n.d(r,"__unstableIsLastBlockChangeIgnored",(function(){return kt})),n.d(r,"__experimentalGetLastBlockAttributeChanges",(function(){return yt})),n.d(r,"isNavigationMode",(function(){return Et})),n.d(r,"hasBlockMovingClientId",(function(){return wt})),n.d(r,"didAutomaticChange",(function(){return Ct})),n.d(r,"isBlockHighlighted",(function(){return St})),n.d(r,"areInnerBlocksControlled",(function(){return Bt})),n.d(r,"__experimentalGetActiveBlockIdByBlockNames",(function(){return It}));var o={};n.r(o),n.d(o,"resetBlocks",(function(){return sn})),n.d(o,"validateBlocksToTemplate",(function(){return un})),n.d(o,"resetSelection",(function(){return dn})),n.d(o,"receiveBlocks",(function(){return bn})),n.d(o,"updateBlockAttributes",(function(){return fn})),n.d(o,"updateBlock",(function(){return pn})),n.d(o,"selectBlock",(function(){return mn})),n.d(o,"selectPreviousBlock",(function(){return vn})),n.d(o,"selectNextBlock",(function(){return gn})),n.d(o,"startMultiSelect",(function(){return On})),n.d(o,"stopMultiSelect",(function(){return hn})),n.d(o,"multiSelect",(function(){return jn})),n.d(o,"clearSelectedBlock",(function(){return kn})),n.d(o,"toggleSelection",(function(){return yn})),n.d(o,"replaceBlocks",(function(){return wn})),n.d(o,"replaceBlock",(function(){return Cn})),n.d(o,"moveBlocksDown",(function(){return Bn})),n.d(o,"moveBlocksUp",(function(){return In})),n.d(o,"moveBlocksToPosition",(function(){return xn})),n.d(o,"moveBlockToPosition",(function(){return Pn})),n.d(o,"insertBlock",(function(){return Tn})),n.d(o,"insertBlocks",(function(){return Nn})),n.d(o,"__unstableSetInsertionPoint",(function(){return Dn})),n.d(o,"showInsertionPoint",(function(){return An})),n.d(o,"hideInsertionPoint",(function(){return Rn})),n.d(o,"setTemplateValidity",(function(){return Ln})),n.d(o,"synchronizeTemplate",(function(){return Mn})),n.d(o,"mergeBlocks",(function(){return Fn})),n.d(o,"removeBlocks",(function(){return Vn})),n.d(o,"removeBlock",(function(){return Hn})),n.d(o,"replaceInnerBlocks",(function(){return zn})),n.d(o,"toggleBlockMode",(function(){return Gn})),n.d(o,"startTyping",(function(){return Un})),n.d(o,"stopTyping",(function(){return Wn})),n.d(o,"startDraggingBlocks",(function(){return Kn})),n.d(o,"stopDraggingBlocks",(function(){return qn})),n.d(o,"enterFormattedText",(function(){return $n})),n.d(o,"exitFormattedText",(function(){return Yn})),n.d(o,"selectionChange",(function(){return Xn})),n.d(o,"insertDefaultBlock",(function(){return Qn})),n.d(o,"updateBlockListSettings",(function(){return Zn})),n.d(o,"updateSettings",(function(){return Jn})),n.d(o,"__unstableSaveReusableBlock",(function(){return er})),n.d(o,"__unstableMarkLastChangeAsPersistent",(function(){return tr})),n.d(o,"__unstableMarkNextChangeAsNotPersistent",(function(){return nr})),n.d(o,"__unstableMarkAutomaticChange",(function(){return rr})),n.d(o,"__unstableMarkAutomaticChangeFinal",(function(){return or})),n.d(o,"setNavigationMode",(function(){return cr})),n.d(o,"setBlockMovingClientId",(function(){return ir})),n.d(o,"duplicateBlocks",(function(){return ar})),n.d(o,"insertBeforeBlock",(function(){return lr})),n.d(o,"insertAfterBlock",(function(){return sr})),n.d(o,"toggleBlockHighlight",(function(){return ur})),n.d(o,"flashBlock",(function(){return dr})),n.d(o,"setHasControlledInnerBlocks",(function(){return br}));var c=n(25),i=n(10),a=n(5),l=n(0),s=n(12),u=n.n(s),d=n(2),b=n(14),f=n(35),p=n(11),m=n(4),v=n(3),g=Object(l.createContext)({name:"",isSelected:!1,focusedElement:null,setFocusedElement:d.noop,clientId:null}),O=g.Provider;function h(){return Object(l.useContext)(g)}var j=n(13),k=n(15),y=n(1),_={insertUsage:{}},E={alignWide:!1,colors:[{name:Object(y.__)("Black"),slug:"black",color:"#000000"},{name:Object(y.__)("Cyan bluish gray"),slug:"cyan-bluish-gray",color:"#abb8c3"},{name:Object(y.__)("White"),slug:"white",color:"#ffffff"},{name:Object(y.__)("Pale pink"),slug:"pale-pink",color:"#f78da7"},{name:Object(y.__)("Vivid red"),slug:"vivid-red",color:"#cf2e2e"},{name:Object(y.__)("Luminous vivid orange"),slug:"luminous-vivid-orange",color:"#ff6900"},{name:Object(y.__)("Luminous vivid amber"),slug:"luminous-vivid-amber",color:"#fcb900"},{name:Object(y.__)("Light green cyan"),slug:"light-green-cyan",color:"#7bdcb5"},{name:Object(y.__)("Vivid green cyan"),slug:"vivid-green-cyan",color:"#00d084"},{name:Object(y.__)("Pale cyan blue"),slug:"pale-cyan-blue",color:"#8ed1fc"},{name:Object(y.__)("Vivid cyan blue"),slug:"vivid-cyan-blue",color:"#0693e3"},{name:Object(y.__)("Vivid purple"),slug:"vivid-purple",color:"#9b51e0"}],fontSizes:[{name:Object(y._x)("Small","font size name"),size:13,slug:"small"},{name:Object(y._x)("Normal","font size name"),size:16,slug:"normal"},{name:Object(y._x)("Medium","font size name"),size:20,slug:"medium"},{name:Object(y._x)("Large","font size name"),size:36,slug:"large"},{name:Object(y._x)("Huge","font size name"),size:42,slug:"huge"}],imageSizes:[{slug:"thumbnail",name:Object(y.__)("Thumbnail")},{slug:"medium",name:Object(y.__)("Medium")},{slug:"large",name:Object(y.__)("Large")},{slug:"full",name:Object(y.__)("Full Size")}],imageEditing:!0,maxWidth:580,allowedBlockTypes:!0,maxUploadFileSize:0,allowedMimeTypes:null,availableLegacyWidgets:{},__experimentalCanUserUseUnfilteredHTML:!1,__experimentalBlockDirectory:!1,__mobileEnablePageTemplates:!1,__experimentalBlockPatterns:[],__experimentalBlockPatternCategories:[],__experimentalSpotlightEntityBlocks:[],gradients:[{name:Object(y.__)("Vivid cyan blue to vivid purple"),gradient:"linear-gradient(135deg,rgba(6,147,227,1) 0%,rgb(155,81,224) 100%)",slug:"vivid-cyan-blue-to-vivid-purple"},{name:Object(y.__)("Light green cyan to vivid green cyan"),gradient:"linear-gradient(135deg,rgb(122,220,180) 0%,rgb(0,208,130) 100%)",slug:"light-green-cyan-to-vivid-green-cyan"},{name:Object(y.__)("Luminous vivid amber to luminous vivid orange"),gradient:"linear-gradient(135deg,rgba(252,185,0,1) 0%,rgba(255,105,0,1) 100%)",slug:"luminous-vivid-amber-to-luminous-vivid-orange"},{name:Object(y.__)("Luminous vivid orange to vivid red"),gradient:"linear-gradient(135deg,rgba(255,105,0,1) 0%,rgb(207,46,46) 100%)",slug:"luminous-vivid-orange-to-vivid-red"},{name:Object(y.__)("Very light gray to cyan bluish gray"),gradient:"linear-gradient(135deg,rgb(238,238,238) 0%,rgb(169,184,195) 100%)",slug:"very-light-gray-to-cyan-bluish-gray"},{name:Object(y.__)("Cool to warm spectrum"),gradient:"linear-gradient(135deg,rgb(74,234,220) 0%,rgb(151,120,209) 20%,rgb(207,42,186) 40%,rgb(238,44,130) 60%,rgb(251,105,98) 80%,rgb(254,248,76) 100%)",slug:"cool-to-warm-spectrum"},{name:Object(y.__)("Blush light purple"),gradient:"linear-gradient(135deg,rgb(255,206,236) 0%,rgb(152,150,240) 100%)",slug:"blush-light-purple"},{name:Object(y.__)("Blush bordeaux"),gradient:"linear-gradient(135deg,rgb(254,205,165) 0%,rgb(254,45,45) 50%,rgb(107,0,62) 100%)",slug:"blush-bordeaux"},{name:Object(y.__)("Luminous dusk"),gradient:"linear-gradient(135deg,rgb(255,203,112) 0%,rgb(199,81,192) 50%,rgb(65,88,208) 100%)",slug:"luminous-dusk"},{name:Object(y.__)("Pale ocean"),gradient:"linear-gradient(135deg,rgb(255,245,203) 0%,rgb(182,227,212) 50%,rgb(51,167,181) 100%)",slug:"pale-ocean"},{name:Object(y.__)("Electric grass"),gradient:"linear-gradient(135deg,rgb(202,248,128) 0%,rgb(113,206,126) 100%)",slug:"electric-grass"},{name:Object(y.__)("Midnight"),gradient:"linear-gradient(135deg,rgb(2,3,129) 0%,rgb(40,116,252) 100%)",slug:"midnight"}]};function w(e,t,n){return[].concat(Object(k.a)(e.slice(0,n)),Object(k.a)(Object(d.castArray)(t)),Object(k.a)(e.slice(n)))}function C(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:1,o=Object(k.a)(e);return o.splice(t,r),w(o,e.slice(t,t+r),n)}function S(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function B(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?S(Object(n),!0).forEach((function(t){Object(a.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):S(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function I(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=Object(a.a)({},t,[]);return e.forEach((function(e){var r=e.clientId,o=e.innerBlocks;n[t].push(r),Object.assign(n,I(o,r))})),n}function x(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return e.reduce((function(e,n){return Object.assign(e,Object(a.a)({},n.clientId,t),x(n.innerBlocks,n.clientId))}),{})}function P(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:d.identity,n={},r=Object(k.a)(e);r.length;){var o=r.shift(),c=o.innerBlocks,i=Object(j.a)(o,["innerBlocks"]);r.push.apply(r,Object(k.a)(c)),n[i.clientId]=t(i)}return n}function T(e){return P(e,(function(e){return Object(d.omit)(e,"attributes")}))}function N(e){return P(e,(function(e){return e.attributes}))}function D(e,t){return e===t?B({},e):t}function A(e,t){return"UPDATE_BLOCK_ATTRIBUTES"===e.type&&void 0!==t&&"UPDATE_BLOCK_ATTRIBUTES"===t.type&&Object(d.isEqual)(e.clientIds,t.clientIds)&&(n=e.attributes,r=t.attributes,Object(d.isEqual)(Object(d.keys)(n),Object(d.keys)(r)));var n,r}var R=function(e){return e.reduce((function(e,t){return e[t]={},e}),{})},L=Object(d.flow)(m.combineReducers,(function(e){return function(t,n){if(t&&"SAVE_REUSABLE_BLOCK_SUCCESS"===n.type){var r=n.id,o=n.updatedId;if(r===o)return t;(t=B({},t)).attributes=Object(d.mapValues)(t.attributes,(function(e,n){return"core/block"===t.byClientId[n].name&&e.ref===r?B(B({},e),{},{ref:o}):e}))}return e(t,n)}}),(function(e){return function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0,r=e(t,n);if(r===t)return t;r.cache=t.cache?t.cache:{};var o=function(e){return e.reduce((function(e,n){var r=n;do{e.push(r),r=t.parents[r]}while(r&&!t.controlledInnerBlocks[r]);return e}),[])};switch(n.type){case"RESET_BLOCKS":r.cache=Object(d.mapValues)(P(n.blocks),(function(){return{}}));break;case"RECEIVE_BLOCKS":case"INSERT_BLOCKS":var c=Object(d.keys)(P(n.blocks));n.rootClientId&&!t.controlledInnerBlocks[n.rootClientId]&&c.push(n.rootClientId),r.cache=B(B({},r.cache),R(o(c)));break;case"UPDATE_BLOCK":r.cache=B(B({},r.cache),R(o([n.clientId])));break;case"UPDATE_BLOCK_ATTRIBUTES":r.cache=B(B({},r.cache),R(o(n.clientIds)));break;case"REPLACE_BLOCKS_AUGMENTED_WITH_CHILDREN":var i=R(o(n.replacedClientIds));r.cache=B(B(B({},Object(d.omit)(r.cache,n.replacedClientIds)),Object(d.omit)(i,n.replacedClientIds)),R(Object(d.keys)(P(n.blocks))));break;case"REMOVE_BLOCKS_AUGMENTED_WITH_CHILDREN":r.cache=B(B({},Object(d.omit)(r.cache,n.removedClientIds)),R(Object(d.difference)(o(n.clientIds),n.clientIds)));break;case"MOVE_BLOCKS_TO_POSITION":var a=Object(k.a)(n.clientIds);n.fromRootClientId&&a.push(n.fromRootClientId),n.toRootClientId&&a.push(n.toRootClientId),r.cache=B(B({},r.cache),R(o(a)));break;case"MOVE_BLOCKS_UP":case"MOVE_BLOCKS_DOWN":var l=[];n.rootClientId&&l.push(n.rootClientId),r.cache=B(B({},r.cache),R(o(l)));break;case"SAVE_REUSABLE_BLOCK_SUCCESS":var s=Object(d.keys)(Object(d.omitBy)(r.attributes,(function(e,t){return"core/block"!==r.byClientId[t].name||e.ref!==n.updatedId})));r.cache=B(B({},r.cache),R(o(s)))}return r}}),(function(e){return function(t,n){var r=function(e){for(var r=e,o=0;o<r.length;o++){var c;!t.order[r[o]]||n.keepControlledInnerBlocks&&n.keepControlledInnerBlocks[r[o]]||(r===e&&(r=Object(k.a)(r)),(c=r).push.apply(c,Object(k.a)(t.order[r[o]])))}return r};if(t)switch(n.type){case"REMOVE_BLOCKS":n=B(B({},n),{},{type:"REMOVE_BLOCKS_AUGMENTED_WITH_CHILDREN",removedClientIds:r(n.clientIds)});break;case"REPLACE_BLOCKS":n=B(B({},n),{},{type:"REPLACE_BLOCKS_AUGMENTED_WITH_CHILDREN",replacedClientIds:r(n.clientIds)})}return e(t,n)}}),(function(e){return function(t,n){if("REPLACE_INNER_BLOCKS"!==n.type)return e(t,n);var r={};if(Object.keys(t.controlledInnerBlocks).length)for(var o=Object(k.a)(n.blocks);o.length;){var c=o.shift(),i=c.innerBlocks,a=Object(j.a)(c,["innerBlocks"]);o.push.apply(o,Object(k.a)(i)),t.controlledInnerBlocks[a.clientId]&&(r[a.clientId]=!0)}var l=t;t.order[n.rootClientId]&&(l=e(l,{type:"REMOVE_BLOCKS",keepControlledInnerBlocks:r,clientIds:t.order[n.rootClientId]}));var s=l;return n.blocks.length&&((s=e(s,B(B({},n),{},{type:"INSERT_BLOCKS",index:0}))).order=B(B({},s.order),Object(d.reduce)(r,(function(e,n,r){return t.order[r]&&(e[r]=t.order[r]),e}),{}))),s}}),(function(e){return function(t,n){if(t&&"RESET_BLOCKS"===n.type){var r=function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return Object(d.reduce)(t[n],(function(n,o){return r[o]?n:[].concat(Object(k.a)(n),[o],Object(k.a)(e(t,o)))}),[])}(t.order,"",t.controlledInnerBlocks),o=Object.keys(Object(d.pickBy)(t.controlledInnerBlocks));return B(B({},t),{},{byClientId:B(B({},Object(d.omit)(t.byClientId,r)),T(n.blocks)),attributes:B(B({},Object(d.omit)(t.attributes,r)),N(n.blocks)),order:B(B({},Object(d.omit)(t.order,r)),Object(d.omit)(I(n.blocks),o)),parents:B(B({},Object(d.omit)(t.parents,r)),x(n.blocks)),cache:B(B({},Object(d.omit)(t.cache,r)),Object(d.omit)(Object(d.mapValues)(P(n.blocks),(function(){return{}})),o))})}return e(t,n)}}),(function(e){var t,n=!1;return function(r,o){var c=e(r,o),i="MARK_LAST_CHANGE_AS_PERSISTENT"===o.type||n;if(r===c&&!i){var a;n="MARK_NEXT_CHANGE_AS_NOT_PERSISTENT"===o.type;var l=null===(a=null==r?void 0:r.isPersistentChange)||void 0===a||a;return r.isPersistentChange===l?r:B(B({},c),{},{isPersistentChange:l})}return c=B(B({},c),{},{isPersistentChange:i?!n:!A(o,t)}),t=o,n="MARK_NEXT_CHANGE_AS_NOT_PERSISTENT"===o.type,c}}),(function(e){var t=new Set(["RECEIVE_BLOCKS"]);return function(n,r){var o=e(n,r);return o!==n&&(o.isIgnoredChange=t.has(r.type)),o}}))({byClientId:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"RESET_BLOCKS":return T(t.blocks);case"RECEIVE_BLOCKS":case"INSERT_BLOCKS":return B(B({},e),T(t.blocks));case"UPDATE_BLOCK":if(!e[t.clientId])return e;var n=Object(d.omit)(t.updates,"attributes");return Object(d.isEmpty)(n)?e:B(B({},e),{},Object(a.a)({},t.clientId,B(B({},e[t.clientId]),n)));case"REPLACE_BLOCKS_AUGMENTED_WITH_CHILDREN":return t.blocks?B(B({},Object(d.omit)(e,t.replacedClientIds)),T(t.blocks)):e;case"REMOVE_BLOCKS_AUGMENTED_WITH_CHILDREN":return Object(d.omit)(e,t.removedClientIds)}return e},attributes:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"RESET_BLOCKS":return N(t.blocks);case"RECEIVE_BLOCKS":case"INSERT_BLOCKS":return B(B({},e),N(t.blocks));case"UPDATE_BLOCK":return e[t.clientId]&&t.updates.attributes?B(B({},e),{},Object(a.a)({},t.clientId,B(B({},e[t.clientId]),t.updates.attributes))):e;case"UPDATE_BLOCK_ATTRIBUTES":if(t.clientIds.every((function(t){return!e[t]})))return e;var n=t.clientIds.reduce((function(n,r){return B(B({},n),{},Object(a.a)({},r,Object(d.reduce)(t.uniqueByBlock?t.attributes[r]:t.attributes,(function(t,n,o){return n!==t[o]&&((t=D(e[r],t))[o]=n),t}),e[r])))}),{});return t.clientIds.every((function(t){return n[t]===e[t]}))?e:B(B({},e),n);case"REPLACE_BLOCKS_AUGMENTED_WITH_CHILDREN":return t.blocks?B(B({},Object(d.omit)(e,t.replacedClientIds)),N(t.blocks)):e;case"REMOVE_BLOCKS_AUGMENTED_WITH_CHILDREN":return Object(d.omit)(e,t.removedClientIds)}return e},order:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"RESET_BLOCKS":return I(t.blocks);case"RECEIVE_BLOCKS":return B(B({},e),Object(d.omit)(I(t.blocks),""));case"INSERT_BLOCKS":var n=t.rootClientId,r=void 0===n?"":n,o=e[r]||[],c=I(t.blocks,r),i=t.index,l=void 0===i?o.length:i;return B(B(B({},e),c),{},Object(a.a)({},r,w(o,c[r],l)));case"MOVE_BLOCKS_TO_POSITION":var s,u=t.fromRootClientId,b=void 0===u?"":u,f=t.toRootClientId,p=void 0===f?"":f,m=t.clientIds,v=t.index,g=void 0===v?e[p].length:v;if(b===p){var O=e[p],h=O.indexOf(m[0]);return B(B({},e),{},Object(a.a)({},p,C(e[p],h,g,m.length)))}return B(B({},e),{},(s={},Object(a.a)(s,b,d.without.apply(void 0,[e[b]].concat(Object(k.a)(m)))),Object(a.a)(s,p,w(e[p],m,g)),s));case"MOVE_BLOCKS_UP":var j=t.clientIds,y=t.rootClientId,_=void 0===y?"":y,E=Object(d.first)(j),S=e[_];if(!S.length||E===Object(d.first)(S))return e;var x=S.indexOf(E);return B(B({},e),{},Object(a.a)({},_,C(S,x,x-1,j.length)));case"MOVE_BLOCKS_DOWN":var P=t.clientIds,T=t.rootClientId,N=void 0===T?"":T,D=Object(d.first)(P),A=Object(d.last)(P),R=e[N];if(!R.length||A===Object(d.last)(R))return e;var L=R.indexOf(D);return B(B({},e),{},Object(a.a)({},N,C(R,L,L+1,P.length)));case"REPLACE_BLOCKS_AUGMENTED_WITH_CHILDREN":var M=t.clientIds;if(!t.blocks)return e;var F=I(t.blocks);return Object(d.flow)([function(e){return Object(d.omit)(e,t.replacedClientIds)},function(e){return B(B({},e),Object(d.omit)(F,""))},function(e){return Object(d.mapValues)(e,(function(e){return Object(d.reduce)(e,(function(e,t){return t===M[0]?[].concat(Object(k.a)(e),Object(k.a)(F[""])):(-1===M.indexOf(t)&&e.push(t),e)}),[])}))}])(e);case"REMOVE_BLOCKS_AUGMENTED_WITH_CHILDREN":return Object(d.flow)([function(e){return Object(d.omit)(e,t.removedClientIds)},function(e){return Object(d.mapValues)(e,(function(e){return d.without.apply(void 0,[e].concat(Object(k.a)(t.removedClientIds)))}))}])(e)}return e},parents:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"RESET_BLOCKS":return x(t.blocks);case"RECEIVE_BLOCKS":return B(B({},e),x(t.blocks));case"INSERT_BLOCKS":return B(B({},e),x(t.blocks,t.rootClientId||""));case"MOVE_BLOCKS_TO_POSITION":return B(B({},e),t.clientIds.reduce((function(e,n){return e[n]=t.toRootClientId||"",e}),{}));case"REPLACE_BLOCKS_AUGMENTED_WITH_CHILDREN":return B(B({},Object(d.omit)(e,t.replacedClientIds)),x(t.blocks,e[t.clientIds[0]]));case"REMOVE_BLOCKS_AUGMENTED_WITH_CHILDREN":return Object(d.omit)(e,t.removedClientIds)}return e},controlledInnerBlocks:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0,n=t.type,r=t.clientId,o=t.hasControlledInnerBlocks;return"SET_HAS_CONTROLLED_INNER_BLOCKS"===n?B(B({},e),{},Object(a.a)({},r,o)):e}});function M(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"CLEAR_SELECTED_BLOCK":return e.clientId?{}:e;case"SELECT_BLOCK":return t.clientId===e.clientId?e:{clientId:t.clientId};case"REPLACE_INNER_BLOCKS":case"INSERT_BLOCKS":return t.updateSelection&&t.blocks.length?{clientId:t.blocks[0].clientId}:e;case"REMOVE_BLOCKS":return t.clientIds&&t.clientIds.length&&-1!==t.clientIds.indexOf(e.clientId)?{}:e;case"REPLACE_BLOCKS":if(-1===t.clientIds.indexOf(e.clientId))return e;var n=t.indexToSelect||t.blocks.length-1,r=t.blocks[n];return r?r.clientId===e.clientId?e:{clientId:r.clientId}:{}}return e}function F(e,t,n){switch(t.type){case"CLEAR_SELECTED_BLOCK":case"SELECT_BLOCK":case"SELECTION_CHANGE":case"REPLACE_INNER_BLOCKS":case"INSERT_BLOCKS":case"REMOVE_BLOCKS":case"REPLACE_BLOCKS":return n}return e}var V=Object(m.combineReducers)({blocks:L,isTyping:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"START_TYPING":return!0;case"STOP_TYPING":return!1}return e},draggedBlocks:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"START_DRAGGING_BLOCKS":return t.clientIds;case"STOP_DRAGGING_BLOCKS":return[]}return e},isCaretWithinFormattedText:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"ENTER_FORMATTED_TEXT":return!0;case"EXIT_FORMATTED_TEXT":return!1}return e},selection:function(){var e,t,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=arguments.length>1?arguments[1]:void 0;switch(r.type){case"SELECTION_CHANGE":return{selectionStart:{clientId:r.clientId,attributeKey:r.attributeKey,offset:r.startOffset},selectionEnd:{clientId:r.clientId,attributeKey:r.attributeKey,offset:r.endOffset}};case"RESET_SELECTION":var o=r.selectionStart,c=r.selectionEnd;return{selectionStart:o,selectionEnd:c};case"MULTI_SELECT":var i=r.start,a=r.end;return{selectionStart:{clientId:i},selectionEnd:{clientId:a}};case"RESET_BLOCKS":var l=null==n||null===(e=n.selectionStart)||void 0===e?void 0:e.clientId,s=null==n||null===(t=n.selectionEnd)||void 0===t?void 0:t.clientId;if(!l&&!s)return n;if(!r.blocks.some((function(e){return e.clientId===l})))return{selectionStart:{},selectionEnd:{}};if(!r.blocks.some((function(e){return e.clientId===s})))return B(B({},n),{},{selectionEnd:n.selectionStart})}return{selectionStart:M(n.selectionStart,r),selectionEnd:M(n.selectionEnd,r)}},isMultiSelecting:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"START_MULTI_SELECT":return!0;case"STOP_MULTI_SELECT":return!1}return e},isSelectionEnabled:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"TOGGLE_SELECTION":return t.isSelectionEnabled}return e},initialPosition:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=arguments.length>1?arguments[1]:void 0;return"REPLACE_BLOCKS"===t.type&&void 0!==t.initialPosition||["SELECT_BLOCK","RESET_SELECTION","INSERT_BLOCKS","REPLACE_INNER_BLOCKS"].includes(t.type)?t.initialPosition:e},blocksMode:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;if("TOGGLE_BLOCK_MODE"===t.type){var n=t.clientId;return B(B({},e),{},Object(a.a)({},n,e[n]&&"html"===e[n]?"visual":"html"))}return e},blockListSettings:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"REPLACE_BLOCKS":case"REMOVE_BLOCKS":return Object(d.omit)(e,t.clientIds);case"UPDATE_BLOCK_LIST_SETTINGS":var n=t.clientId;return t.settings?Object(d.isEqual)(e[n],t.settings)?e:B(B({},e),{},Object(a.a)({},n,t.settings)):e.hasOwnProperty(n)?Object(d.omit)(e,n):e}return e},insertionPoint:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"SET_INSERTION_POINT":case"SHOW_INSERTION_POINT":var n=t.rootClientId,r=t.index;return{rootClientId:n,index:r}}return F(e,t,null)},insertionPointVisibility:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"SHOW_INSERTION_POINT":return!0;case"HIDE_INSERTION_POINT":return!1}return F(e,t,!1)},template:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{isValid:!0},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"SET_TEMPLATE_VALIDITY":return B(B({},e),{},{isValid:t.isValid})}return e},settings:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:E,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"UPDATE_SETTINGS":return B(B({},e),t.settings)}return e},preferences:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:_,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"INSERT_BLOCKS":case"REPLACE_BLOCKS":return t.blocks.reduce((function(e,n){var r=n.attributes,o=n.name,c=Object(p.getBlockVariations)(o),i=null==c?void 0:c.find((function(e){var t;return null===(t=e.isActive)||void 0===t?void 0:t.call(e,r,e.attributes)})),l=null!=i&&i.name?"".concat(o,"/").concat(i.name):o,s={name:l};return"core/block"===o&&(s.ref=r.ref,l+="/"+r.ref),B(B({},e),{},{insertUsage:B(B({},e.insertUsage),{},Object(a.a)({},l,{time:t.time,count:e.insertUsage[l]?e.insertUsage[l].count+1:1,insert:s}))})}),e)}return e},lastBlockAttributesChange:function(e,t){switch(t.type){case"UPDATE_BLOCK":if(!t.updates.attributes)break;return Object(a.a)({},t.clientId,t.updates.attributes);case"UPDATE_BLOCK_ATTRIBUTES":return t.clientIds.reduce((function(e,n){return B(B({},e),{},Object(a.a)({},n,t.uniqueByBlock?t.attributes[n]:t.attributes))}),{})}return null},isNavigationMode:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=arguments.length>1?arguments[1]:void 0;return"INSERT_BLOCKS"!==t.type&&("SET_NAVIGATION_MODE"===t.type?t.isNavigationMode:e)},hasBlockMovingClientId:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=arguments.length>1?arguments[1]:void 0;return"SET_BLOCK_MOVING_MODE"===t.type?t.hasBlockMovingClientId:"SET_NAVIGATION_MODE"===t.type?null:e},automaticChangeStatus:function(e,t){switch(t.type){case"MARK_AUTOMATIC_CHANGE":return"pending";case"MARK_AUTOMATIC_CHANGE_FINAL":return"pending"===e?"final":void 0;case"SELECTION_CHANGE":return"final"!==e?e:void 0;case"START_TYPING":case"STOP_TYPING":return e}},highlightedBlock:function(e,t){switch(t.type){case"TOGGLE_BLOCK_HIGHLIGHT":var n=t.clientId;return t.isHighlighted?n:e===n?null:e;case"SELECT_BLOCK":if(t.clientId!==e)return null}return e}}),H=n(43),z=n(49);function G(e,t){var n;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return U(e,void 0);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?U(e,void 0):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var c,i=!0,a=!1;return{s:function(){n=e[Symbol.iterator]()},n:function(){var e=n.next();return i=e.done,e},e:function(e){a=!0,c=e},f:function(){try{i||null==n.return||n.return()}finally{if(a)throw c}}}}function U(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function W(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function K(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?W(Object(n),!0).forEach((function(t){Object(a.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):W(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var q=Object(l.createElement)(v.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(l.createElement)(v.Rect,{x:"0",fill:"none",width:"24",height:"24"}),Object(l.createElement)(v.G,null,Object(l.createElement)(v.Path,{d:"M19 3H5c-1.105 0-2 .895-2 2v14c0 1.105.895 2 2 2h14c1.105 0 2-.895 2-2V5c0-1.105-.895-2-2-2zM6 6h5v5H6V6zm4.5 13C9.12 19 8 17.88 8 16.5S9.12 14 10.5 14s2.5 1.12 2.5 2.5-1.12 2.5-2.5 2.5zm3-6l3-5 3 5h-6z"}))),$=[];function Y(e,t){var n=e.blocks.byClientId[t];if("web"!==l.Platform.OS&&"core/social-link"===(null==n?void 0:n.name)){var r=e.blocks.attributes[t].service;return r?"".concat("core/social-link","-").concat(r):"core/social-link"}return n?n.name:null}function X(e,t){var n=e.blocks.byClientId[t];return!!n&&n.isValid}function Q(e,t){return e.blocks.byClientId[t]?e.blocks.attributes[t]:null}var Z=Object(z.a)((function(e,t){var n=e.blocks.byClientId[t];return n?K(K({},n),{},{attributes:Q(e,t),innerBlocks:Bt(e,t)?$:ee(e,t)}):null}),(function(e,t){return[e.blocks.cache[t]]})),J=Object(z.a)((function(e,t){var n=e.blocks.byClientId[t];return n?K(K({},n),{},{attributes:Q(e,t)}):null}),(function(e,t){return[e.blocks.byClientId[t],e.blocks.attributes[t]]})),ee=Object(z.a)((function(e,t){return Object(d.map)(Ae(e,t),(function(t){return Z(e,t)}))}),(function(e,t){return Object(d.map)(e.blocks.order[t||""],(function(t){return e.blocks.cache[t]}))})),te=Object(z.a)((function(e,t){var n=e.blocks.byClientId[t];return n?K(K({},n),{},{attributes:Q(e,t),innerBlocks:ne(e,t)}):null}),(function(e){return[e.blocks.byClientId,e.blocks.order,e.blocks.attributes]})),ne=Object(z.a)((function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return Object(d.map)(Ae(e,t),(function(t){return te(e,t)}))}),(function(e){return[e.blocks.byClientId,e.blocks.order,e.blocks.attributes]})),re=function e(t,n){return Object(d.flatMap)(n,(function(n){var r=Ae(t,n);return[].concat(Object(k.a)(r),Object(k.a)(e(t,r)))}))},oe=Object(z.a)((function(e){var t=Ae(e);return[].concat(Object(k.a)(t),Object(k.a)(re(e,t)))}),(function(e){return[e.blocks.order]})),ce=Object(z.a)((function(e,t){var n=oe(e);return t?Object(d.reduce)(n,(function(n,r){return e.blocks.byClientId[r].name===t?n+1:n}),0):n.length}),(function(e){return[e.blocks.order,e.blocks.byClientId]})),ie=Object(z.a)((function(e,t){return Object(d.map)(Object(d.castArray)(t),(function(t){return Z(e,t)}))}),(function(e){return[e.blocks.byClientId,e.blocks.order,e.blocks.attributes]}));function ae(e,t){return Ae(e,t).length}function le(e){return e.selection.selectionStart}function se(e){return e.selection.selectionEnd}function ue(e){return e.selection.selectionStart.clientId}function de(e){return e.selection.selectionEnd.clientId}function be(e){return Ce(e).length||(e.selection.selectionStart.clientId?1:0)}function fe(e){var t=e.selection,n=t.selectionStart,r=t.selectionEnd;return!!n.clientId&&n.clientId===r.clientId}function pe(e){var t=e.selection,n=t.selectionStart,r=t.selectionEnd,o=n.clientId;return o&&o===r.clientId?o:null}function me(e){var t=pe(e);return t?Z(e,t):null}function ve(e,t){return void 0!==e.blocks.parents[t]?e.blocks.parents[t]:null}var ge=Object(z.a)((function(e,t){for(var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=[],o=t;e.blocks.parents[o];)o=e.blocks.parents[o],r.push(o);return n?r:r.reverse()}),(function(e){return[e.blocks.parents]})),Oe=Object(z.a)((function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]&&arguments[3],o=ge(e,t,r);return Object(d.map)(Object(d.filter)(Object(d.map)(o,(function(t){return{id:t,name:Y(e,t)}})),(function(e){var t=e.name;return Array.isArray(n)?n.includes(t):t===n})),(function(e){return e.id}))}),(function(e){return[e.blocks.parents]}));function he(e,t){var n,r=t;do{n=r,r=e.blocks.parents[r]}while(r);return n}function je(e,t){for(var n,r=pe(e),o=[].concat(Object(k.a)(ge(e,t)),[t]),c=[].concat(Object(k.a)(ge(e,r)),[r]),i=Math.min(o.length,c.length),a=0;a<i&&o[a]===c[a];a++)n=o[a];return n}function ke(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;if(void 0===t&&(t=pe(e)),void 0===t&&(t=n<0?Be(e):Ie(e)),!t)return null;var r=ve(e,t);if(null===r)return null;var o=e.blocks.order,c=o[r],i=c.indexOf(t),a=i+1*n;return a<0||a===c.length?null:c[a]}function ye(e,t){return ke(e,t,-1)}function _e(e,t){return ke(e,t,1)}function Ee(e){return e.initialPosition}var we=Object(z.a)((function(e){var t=e.selection,n=t.selectionStart,r=t.selectionEnd;if(void 0===n.clientId||void 0===r.clientId)return $;if(n.clientId===r.clientId)return[n.clientId];var o=ve(e,n.clientId);if(null===o)return $;var c=Ae(e,o),i=c.indexOf(n.clientId),a=c.indexOf(r.clientId);return i>a?c.slice(a,i+1):c.slice(i,a+1)}),(function(e){return[e.blocks.order,e.selection.selectionStart.clientId,e.selection.selectionEnd.clientId]}));function Ce(e){var t=e.selection,n=t.selectionStart,r=t.selectionEnd;return n.clientId===r.clientId?$:we(e)}var Se=Object(z.a)((function(e){var t=Ce(e);return t.length?t.map((function(t){return Z(e,t)})):$}),(function(e){return[].concat(Object(k.a)(we.getDependants(e)),[e.blocks.byClientId,e.blocks.order,e.blocks.attributes])}));function Be(e){return Object(d.first)(Ce(e))||null}function Ie(e){return Object(d.last)(Ce(e))||null}function xe(e,t){return Be(e)===t}function Pe(e,t){return-1!==Ce(e).indexOf(t)}var Te=Object(z.a)((function(e,t){for(var n=t,r=!1;n&&!r;)r=Pe(e,n=ve(e,n));return r}),(function(e){return[e.blocks.order,e.selection.selectionStart.clientId,e.selection.selectionEnd.clientId]}));function Ne(e){var t=e.selection,n=t.selectionStart,r=t.selectionEnd;return n.clientId===r.clientId?null:n.clientId||null}function De(e){var t=e.selection,n=t.selectionStart,r=t.selectionEnd;return n.clientId===r.clientId?null:r.clientId||null}function Ae(e,t){return e.blocks.order[t||""]||$}function Re(e,t,n){return Ae(e,n).indexOf(t)}function Le(e,t){var n=e.selection,r=n.selectionStart,o=n.selectionEnd;return r.clientId===o.clientId&&r.clientId===t}function Me(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return Object(d.some)(Ae(e,t),(function(t){return Le(e,t)||Pe(e,t)||n&&Me(e,t,n)}))}function Fe(e,t){if(!t)return!1;var n=Ce(e),r=n.indexOf(t);return r>-1&&r<n.length-1}function Ve(e){var t=e.selection,n=t.selectionStart,r=t.selectionEnd;return n.clientId!==r.clientId}function He(e){return e.isMultiSelecting}function ze(e){return e.isSelectionEnabled}function Ge(e,t){return e.blocksMode[t]||"visual"}function Ue(e){return e.isTyping}function We(e){return!!e.draggedBlocks.length}function Ke(e){return e.draggedBlocks}function qe(e,t){return e.draggedBlocks.includes(t)}function $e(e,t){if(!We(e))return!1;var n=ge(e,t);return Object(d.some)(n,(function(t){return qe(e,t)}))}function Ye(e){return e.isCaretWithinFormattedText}function Xe(e){var t,n,r=e.insertionPoint,o=e.selection.selectionEnd;if(null!==r)return r;var c=o.clientId;return c?(t=ve(e,c)||void 0,n=Re(e,o.clientId,t)+1):n=Ae(e).length,{rootClientId:t,index:n}}function Qe(e){return e.insertionPointVisibility}function Ze(e){return e.template.isValid}function Je(e){return e.settings.template}function et(e,t){if(!t)return e.settings.templateLock;var n=mt(e,t);return n?n.templateLock:null}var tt=function(e,t){var n,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,o=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;return Object(d.isBoolean)(e)?e:Object(d.isArray)(e)?!(!e.includes("core/post-content")||null!==t)||e.includes(t):n};if(t&&"object"===Object(H.a)(t)?t=(n=t).name:n=Object(p.getBlockType)(t),!n)return!1;var c=vt(e),i=c.allowedBlockTypes,a=o(i,t,!0);if(!a)return!1;var l=!!et(e,r);if(l)return!1;var s=mt(e,r);if(r&&void 0===s)return!1;var u=null==s?void 0:s.allowedBlocks,b=o(u,t),f=n.parent,m=Y(e,r),v=o(f,m);return null!==b&&null!==v?b||v:null!==b?b:null===v||v},nt=Object(z.a)(tt,(function(e,t,n){return[e.blockListSettings[n],e.blocks.byClientId[n],e.settings.allowedBlockTypes,e.settings.templateLock]}));function rt(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;return t.every((function(t){return nt(e,Y(e,t),n)}))}function ot(e,t){var n,r;return null!==(n=null===(r=e.preferences.insertUsage)||void 0===r?void 0:r[t])&&void 0!==n?n:null}var ct=function(e,t,n){return!!Object(p.hasBlockSupport)(t,"inserter",!0)&&tt(e,t.name,n)},it=function(e,t){return function(n){var r="".concat(t.id,"/").concat(n.name),o=ot(e,r)||{},c=o.time,i=o.count,a=void 0===i?0:i;return K(K({},t),{},{id:r,icon:n.icon||t.icon,title:n.title||t.title,description:n.description||t.description,category:n.category||t.category,example:n.hasOwnProperty("example")?n.example:t.example,initialAttributes:K(K({},t.initialAttributes),n.attributes),innerBlocks:n.innerBlocks,keywords:n.keywords||t.keywords,frecency:at(c,a)})}},at=function(e,t){if(!e)return t;var n=Date.now()-e;switch(!0){case n<36e5:return 4*t;case n<864e5:return 2*t;case n<6048e5:return t/2;default:return t/4}},lt=function(e,t){var n=t.buildScope,r=void 0===n?"inserter":n;return function(t){var n=t.name,o=!1;Object(p.hasBlockSupport)(t.name,"multiple",!0)||(o=Object(d.some)(ie(e,oe(e)),{name:t.name}));var c=ot(e,n)||{},i=c.time,a=c.count,l=void 0===a?0:a,s={id:n,name:t.name,title:t.title,icon:t.icon,isDisabled:o,frecency:at(i,l)};if("transform"===r)return s;var u=t.variations.filter((function(e){var t=e.scope;return!t||t.includes("inserter")}));return K(K({},s),{},{initialAttributes:{},description:t.description,category:t.category,keywords:t.keywords,variations:u,example:t.example,utility:1})}},st=Object(z.a)((function(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,r=lt(e,{buildScope:"inserter"}),o=function(t){var n,r="core/block/".concat(t.id),o=ht(e,t.id);1===o.length&&(n=Object(p.getBlockType)(o[0].name));var c=ot(e,r)||{},i=c.time,a=c.count,l=at(i,void 0===a?0:a);return{id:r,name:"core/block",initialAttributes:{ref:t.id},title:t.title.raw,icon:n?n.icon:q,category:"reusable",keywords:[],isDisabled:!1,utility:1,frecency:l}},c=Object(p.getBlockTypes)().filter((function(t){return ct(e,t,n)})).map(r),i=tt(e,"core/block",n)?_t(e).map(o):[],a=c.filter((function(e){var t=e.variations;return!(void 0===t?[]:t).some((function(e){return e.isDefault}))})),l=[],s=G(c);try{for(s.s();!(t=s.n()).done;){var u=t.value,d=u.variations,b=void 0===d?[]:d;if(b.length){var f=it(e,u);l.push.apply(l,Object(k.a)(b.map(f)))}}}catch(e){s.e(e)}finally{s.f()}var m=function(e,t){var n=e.name.startsWith("core/"),r=t.name.startsWith("core/");return n&&r?0:n&&!r?-1:1},v=[].concat(Object(k.a)(a),l).sort(m);return[].concat(Object(k.a)(v),Object(k.a)(i))}),(function(e,t){return[e.blockListSettings[t],e.blocks.byClientId,e.blocks.order,e.preferences.insertUsage,e.settings.allowedBlockTypes,e.settings.templateLock,_t(e),Object(p.getBlockTypes)()]})),ut=Object(z.a)((function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,r=lt(e,{buildScope:"transform"}),o=Object(p.getBlockTypes)().filter((function(t){return ct(e,t,n)})).map(r),c=Object(d.mapKeys)(o,(function(e){return e.name})),i=Object(p.getPossibleBlockTransformations)(t).reduce((function(e,t){return c[null==t?void 0:t.name]&&e.push(c[t.name]),e}),[]),a=Object(d.orderBy)(i,(function(e){return c[e.name].frecency}),"desc");return a}),(function(e,t){return[e.blockListSettings[t],e.blocks.byClientId,e.preferences.insertUsage,e.settings.allowedBlockTypes,e.settings.templateLock,Object(p.getBlockTypes)()]})),dt=Object(z.a)((function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=Object(d.some)(Object(p.getBlockTypes)(),(function(n){return ct(e,n,t)}));if(n)return!0;var r=tt(e,"core/block",t)&&_t(e).length>0;return r}),(function(e,t){return[e.blockListSettings[t],e.blocks.byClientId,e.settings.allowedBlockTypes,e.settings.templateLock,_t(e),Object(p.getBlockTypes)()]})),bt=Object(z.a)((function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if(t)return Object(d.filter)(Object(p.getBlockTypes)(),(function(n){return ct(e,n,t)}))}),(function(e,t){return[e.blockListSettings[t],e.blocks.byClientId,e.settings.allowedBlockTypes,e.settings.templateLock,Object(p.getBlockTypes)()]})),ft=Object(z.a)((function(e){var t=e.settings.__experimentalBlockPatterns;return Object(d.map)(t,(function(e){return K(K({},e),{},{contentBlocks:Object(p.parse)(e.content)})}))}),(function(e){return[e.settings.__experimentalBlockPatterns]})),pt=Object(z.a)((function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=ft(e);if(!t)return n;var r=Object(d.filter)(n,(function(n){var r=n.contentBlocks;return Object(d.every)(r,(function(n){var r=n.name;return nt(e,r,t)}))}));return r}),(function(e,t){return[e.settings.__experimentalBlockPatterns,e.settings.allowedBlockTypes,e.settings.templateLock,e.blockListSettings[t],e.blocks.byClientId[t]]}));function mt(e,t){return e.blockListSettings[t]}function vt(e){return e.settings}function gt(e){return e.blocks.isPersistentChange}var Ot=Object(z.a)((function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return t.reduce((function(t,n){return e.blockListSettings[n]?K(K({},t),{},Object(a.a)({},n,e.blockListSettings[n])):t}),{})}),(function(e){return[e.blockListSettings]})),ht=Object(z.a)((function(e,t){var n=Object(d.find)(_t(e),(function(e){return e.id===t}));return n?Object(p.parse)("string"==typeof n.content.raw?n.content.raw:n.content):null}),(function(e){return[_t(e)]})),jt=Object(z.a)((function(e,t){var n,r=Object(d.find)(_t(e),(function(e){return e.id===t}));return r?null===(n=r.title)||void 0===n?void 0:n.raw:null}),(function(e){return[_t(e)]}));function kt(e){return e.blocks.isIgnoredChange}function yt(e){return e.lastBlockAttributesChange}function _t(e){var t,n;return null!==(t=null==e||null===(n=e.settings)||void 0===n?void 0:n.__experimentalReusableBlocks)&&void 0!==t?t:$}function Et(e){return e.isNavigationMode}function wt(e){return e.hasBlockMovingClientId}function Ct(e){return!!e.automaticChangeStatus}function St(e,t){return e.highlightedBlock===t}function Bt(e,t){return!!e.blocks.controlledInnerBlocks[t]}var It=Object(z.a)((function(e,t){if(!t.length)return null;var n=pe(e);if(t.includes(Y(e,n)))return n;var r=Ce(e),o=Oe(e,n||r[0],t);return o?Object(d.last)(o):null}),(function(e,t){return[e.selection.selectionStart.clientId,e.selection.selectionEnd.clientId,t]})),xt=n(16),Pt=n.n(xt),Tt=n(54),Nt=n(38),Dt=n.n(Nt),At={SLEEP:function(e){var t=e.duration;return new Promise((function(e){setTimeout(e,t)}))},MARK_AUTOMATIC_CHANGE_FINAL_CONTROL:Object(m.createRegistryControl)((function(e){return function(){var t=window.requestIdleCallback;(void 0===t?function(e){return setTimeout(e,100)}:t)((function(){return e.dispatch(vr).__unstableMarkAutomaticChangeFinal()}))}}))},Rt="core/block-editor";function Lt(e,t){var n;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return Mt(e,void 0);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Mt(e,void 0):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var c,i=!0,a=!1;return{s:function(){n=e[Symbol.iterator]()},n:function(){var e=n.next();return i=e.done,e},e:function(e){a=!0,c=e},f:function(){try{i||null==n.return||n.return()}finally{if(a)throw c}}}}function Mt(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Ft(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Vt(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Ft(Object(n),!0).forEach((function(t){Object(a.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ft(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Ht=Pt.a.mark(ln),zt=Pt.a.mark(sn),Gt=Pt.a.mark(un),Ut=Pt.a.mark(vn),Wt=Pt.a.mark(gn),Kt=Pt.a.mark(jn),qt=Pt.a.mark(wn),$t=Pt.a.mark(xn),Yt=Pt.a.mark(Pn),Xt=Pt.a.mark(Nn),Qt=Pt.a.mark(Mn),Zt=Pt.a.mark(Fn),Jt=Pt.a.mark(Vn),en=Pt.a.mark(rr),tn=Pt.a.mark(cr),nn=Pt.a.mark(ir),rn=Pt.a.mark(ar),on=Pt.a.mark(lr),cn=Pt.a.mark(sr),an=Pt.a.mark(dr);function ln(){return Pt.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,m.controls.select(Rt,"getBlockCount");case 2:if(0!==e.sent){e.next=7;break}return e.next=6,Qn();case 6:return e.abrupt("return",e.sent);case 7:case"end":return e.stop()}}),Ht)}function sn(e){return Pt.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,{type:"RESET_BLOCKS",blocks:e};case 2:return t.delegateYield(un(e),"t0",3);case 3:return t.abrupt("return",t.t0);case 4:case"end":return t.stop()}}),zt)}function un(e){var t,n,r,o;return Pt.a.wrap((function(c){for(;;)switch(c.prev=c.next){case 0:return c.next=2,m.controls.select(Rt,"getTemplate");case 2:return t=c.sent,c.next=5,m.controls.select(Rt,"getTemplateLock");case 5:return n=c.sent,r=!t||"all"!==n||Object(p.doBlocksMatchTemplate)(e,t),c.next=9,m.controls.select(Rt,"isValidTemplate");case 9:if(o=c.sent,r===o){c.next=14;break}return c.next=13,Ln(r);case 13:return c.abrupt("return",r);case 14:case"end":return c.stop()}}),Gt)}function dn(e,t,n){return{type:"RESET_SELECTION",selectionStart:e,selectionEnd:t,initialPosition:n}}function bn(e){return{type:"RECEIVE_BLOCKS",blocks:e}}function fn(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return{type:"UPDATE_BLOCK_ATTRIBUTES",clientIds:Object(d.castArray)(e),attributes:t,uniqueByBlock:n}}function pn(e,t){return{type:"UPDATE_BLOCK",clientId:e,updates:t}}function mn(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return{type:"SELECT_BLOCK",initialPosition:t,clientId:e}}function vn(e){var t;return Pt.a.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,m.controls.select(Rt,"getPreviousBlockClientId",e);case 2:if(!(t=n.sent)){n.next=7;break}return n.next=6,mn(t,-1);case 6:return n.abrupt("return",[t]);case 7:case"end":return n.stop()}}),Ut)}function gn(e){var t;return Pt.a.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,m.controls.select(Rt,"getNextBlockClientId",e);case 2:if(!(t=n.sent)){n.next=7;break}return n.next=6,mn(t);case 6:return n.abrupt("return",[t]);case 7:case"end":return n.stop()}}),Wt)}function On(){return{type:"START_MULTI_SELECT"}}function hn(){return{type:"STOP_MULTI_SELECT"}}function jn(e,t){var n;return Pt.a.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.next=2,{type:"MULTI_SELECT",start:e,end:t};case 2:return r.next=4,m.controls.select(Rt,"getSelectedBlockCount");case 4:n=r.sent,Object(Tt.speak)(Object(y.sprintf)(
2
  /* translators: %s: number of selected blocks */
3
+ Object(y._n)("%s block selected.","%s blocks selected.",n),n),"assertive");case 6:case"end":return r.stop()}}),Kt)}function kn(){return{type:"CLEAR_SELECTED_BLOCK"}}function yn(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];return{type:"TOGGLE_SELECTION",isSelectionEnabled:e}}function En(e,t){var n,r,o=null!==(n=null==t||null===(r=t.__experimentalPreferredStyleVariations)||void 0===r?void 0:r.value)&&void 0!==n?n:{};return e.map((function(e){var t,n=e.name;if(!Object(p.hasBlockSupport)(n,"defaultStylePicker",!0))return e;if(!o[n])return e;var r=null===(t=e.attributes)||void 0===t?void 0:t.className;if(null!=r&&r.includes("is-style-"))return e;var c=e.attributes,i=void 0===c?{}:c,a=o[n];return Vt(Vt({},e),{},{attributes:Vt(Vt({},i),{},{className:"".concat(r||""," is-style-").concat(a).trim()})})}))}function wn(e,t,n){var r,o,c,i,a,l=arguments;return Pt.a.wrap((function(s){for(;;)switch(s.prev=s.next){case 0:return r=l.length>3&&void 0!==l[3]?l[3]:0,o=l.length>4?l[4]:void 0,e=Object(d.castArray)(e),s.t0=En,s.t1=Object(d.castArray)(t),s.next=7,m.controls.select(Rt,"getSettings");case 7:return s.t2=s.sent,t=(0,s.t0)(s.t1,s.t2),s.next=11,m.controls.select(Rt,"getBlockRootClientId",Object(d.first)(e));case 11:c=s.sent,i=0;case 13:if(!(i<t.length)){s.next=23;break}return a=t[i],s.next=17,m.controls.select(Rt,"canInsertBlockType",a.name,c);case 17:if(s.sent){s.next=20;break}return s.abrupt("return");case 20:i++,s.next=13;break;case 23:return s.next=25,{type:"REPLACE_BLOCKS",clientIds:e,blocks:t,time:Date.now(),indexToSelect:n,initialPosition:r,meta:o};case 25:return s.delegateYield(ln(),"t3",26);case 26:case"end":return s.stop()}}),qt)}function Cn(e,t){return wn(e,t)}function Sn(e){return function(t,n){return{clientIds:Object(d.castArray)(t),type:e,rootClientId:n}}}var Bn=Sn("MOVE_BLOCKS_DOWN"),In=Sn("MOVE_BLOCKS_UP");function xn(e){var t,n,r,o,c,i=arguments;return Pt.a.wrap((function(a){for(;;)switch(a.prev=a.next){case 0:return t=i.length>1&&void 0!==i[1]?i[1]:"",n=i.length>2&&void 0!==i[2]?i[2]:"",r=i.length>3?i[3]:void 0,a.next=5,m.controls.select(Rt,"getTemplateLock",t);case 5:if("all"!==(o=a.sent)){a.next=8;break}return a.abrupt("return");case 8:if(c={type:"MOVE_BLOCKS_TO_POSITION",fromRootClientId:t,toRootClientId:n,clientIds:e,index:r},t!==n){a.next=13;break}return a.next=12,c;case 12:return a.abrupt("return");case 13:if("insert"!==o){a.next=15;break}return a.abrupt("return");case 15:return a.next=17,m.controls.select(Rt,"canInsertBlocks",e,n);case 17:if(!a.sent){a.next=21;break}return a.next=21,c;case 21:case"end":return a.stop()}}),$t)}function Pn(e){var t,n,r,o=arguments;return Pt.a.wrap((function(c){for(;;)switch(c.prev=c.next){case 0:return t=o.length>1&&void 0!==o[1]?o[1]:"",n=o.length>2&&void 0!==o[2]?o[2]:"",r=o.length>3?o[3]:void 0,c.next=5,xn([e],t,n,r);case 5:case"end":return c.stop()}}),Yt)}function Tn(e,t,n){var r=!(arguments.length>3&&void 0!==arguments[3])||arguments[3];return Nn([e],t,n,r)}function Nn(e,t,n){var r,o,c,i,a,l,s,u=arguments;return Pt.a.wrap((function(b){for(;;)switch(b.prev=b.next){case 0:return r=!(u.length>3&&void 0!==u[3])||u[3],o=u.length>4&&void 0!==u[4]?u[4]:0,c=u.length>5?u[5]:void 0,Object(d.isObject)(o)&&(c=o,o=0,Dt()("meta argument in wp.data.dispatch('core/block-editor')",{hint:"The meta argument is now the 6th argument of the function"})),b.t0=En,b.t1=Object(d.castArray)(e),b.next=8,m.controls.select(Rt,"getSettings");case 8:b.t2=b.sent,e=(0,b.t0)(b.t1,b.t2),i=[],a=Lt(e),b.prev=12,a.s();case 14:if((l=a.n()).done){b.next=22;break}return s=l.value,b.next=18,m.controls.select(Rt,"canInsertBlockType",s.name,n);case 18:b.sent&&i.push(s);case 20:b.next=14;break;case 22:b.next=27;break;case 24:b.prev=24,b.t3=b.catch(12),a.e(b.t3);case 27:return b.prev=27,a.f(),b.finish(27);case 30:if(!i.length){b.next=32;break}return b.abrupt("return",{type:"INSERT_BLOCKS",blocks:i,index:t,rootClientId:n,time:Date.now(),updateSelection:r,initialPosition:r?o:null,meta:c});case 32:case"end":return b.stop()}}),Xt,null,[[12,24,27,30]])}function Dn(e,t){return{type:"SET_INSERTION_POINT",rootClientId:e,index:t}}function An(e,t){return{type:"SHOW_INSERTION_POINT",rootClientId:e,index:t}}function Rn(){return{type:"HIDE_INSERTION_POINT"}}function Ln(e){return{type:"SET_TEMPLATE_VALIDITY",isValid:e}}function Mn(){var e,t,n;return Pt.a.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.next=2,{type:"SYNCHRONIZE_TEMPLATE"};case 2:return r.next=4,m.controls.select(Rt,"getBlocks");case 4:return e=r.sent,r.next=7,m.controls.select(Rt,"getTemplate");case 7:return t=r.sent,n=Object(p.synchronizeBlocksWithTemplate)(e,t),r.next=11,sn(n);case 11:return r.abrupt("return",r.sent);case 12:case"end":return r.stop()}}),Qt)}function Fn(e,t){var n,r,o,i,a,l,s,u,b,f,v,g,O,h,j,y,_,E,w,C,S,B,I,x,P,T,N,D,A,R,L,M,F,V;return Pt.a.wrap((function(z){for(;;)switch(z.prev=z.next){case 0:return n=[e,t],z.next=3,{type:"MERGE_BLOCKS",blocks:n};case 3:return r=n[0],o=n[1],z.next=6,m.controls.select(Rt,"getBlock",r);case 6:if(i=z.sent,(a=Object(p.getBlockType)(i.name)).merge){z.next=12;break}return z.next=11,mn(i.clientId);case 11:return z.abrupt("return");case 12:return z.next=14,m.controls.select(Rt,"getBlock",o);case 14:return l=z.sent,s=Object(p.getBlockType)(l.name),z.next=18,m.controls.select(Rt,"getSelectionStart");case 18:if(u=z.sent,b=u.clientId,f=u.attributeKey,v=u.offset,g=(b===r?a:s).attributes[f],O=(b===r||b===o)&&void 0!==f&&void 0!==v&&!!g,g||("number"==typeof f?window.console.error("RichText needs an identifier prop that is the block attribute key of the attribute it controls. Its type is expected to be a string, but was ".concat(Object(H.a)(f))):window.console.error("The RichText identifier prop does not match any attributes defined by the block.")),h="†",j=Object(p.cloneBlock)(i),y=Object(p.cloneBlock)(l),O&&(E=(_=b===r?j:y).attributes[f],w=g.multiline,C=g.__unstableMultilineWrapperTags,S=g.__unstablePreserveWhiteSpace,B=Object(c.insert)(Object(c.create)({html:E,multilineTag:w,multilineWrapperTags:C,preserveWhiteSpace:S}),h,v,v),_.attributes[f]=Object(c.toHTMLString)({value:B,multilineTag:w,preserveWhiteSpace:S})),(I=i.name===l.name?[y]:Object(p.switchToBlockType)(y,i.name))&&I.length){z.next=33;break}return z.abrupt("return");case 33:if(x=a.merge(j.attributes,I[0].attributes),!O){z.next=45;break}return P=Object(d.findKey)(x,(function(e){return"string"==typeof e&&-1!==e.indexOf(h)})),T=x[P],N=a.attributes[P],D=N.multiline,A=N.__unstableMultilineWrapperTags,R=N.__unstablePreserveWhiteSpace,L=Object(c.create)({html:T,multilineTag:D,multilineWrapperTags:A,preserveWhiteSpace:R}),M=L.text.indexOf(h),F=Object(c.remove)(L,M,M+1),V=Object(c.toHTMLString)({value:F,multilineTag:D,preserveWhiteSpace:R}),x[P]=V,z.next=45,Xn(i.clientId,P,M,M);case 45:return z.delegateYield(wn([i.clientId,l.clientId],[Vt(Vt({},i),{},{attributes:Vt(Vt({},i.attributes),x)})].concat(Object(k.a)(I.slice(1)))),"t0",46);case 46:case"end":return z.stop()}}),Zt)}function Vn(e){var t,n,r,o,c=arguments;return Pt.a.wrap((function(i){for(;;)switch(i.prev=i.next){case 0:if(t=!(c.length>1&&void 0!==c[1])||c[1],e&&e.length){i.next=3;break}return i.abrupt("return");case 3:return e=Object(d.castArray)(e),i.next=6,m.controls.select(Rt,"getBlockRootClientId",e[0]);case 6:return n=i.sent,i.next=9,m.controls.select(Rt,"getTemplateLock",n);case 9:if(!i.sent){i.next=12;break}return i.abrupt("return");case 12:if(!t){i.next=18;break}return i.next=15,vn(e[0]);case 15:r=i.sent,i.next=21;break;case 18:return i.next=20,m.controls.select(Rt,"getPreviousBlockClientId",e[0]);case 20:r=i.sent;case 21:return i.next=23,{type:"REMOVE_BLOCKS",clientIds:e};case 23:return i.delegateYield(ln(),"t0",24);case 24:return o=i.t0,i.abrupt("return",[r||o]);case 26:case"end":return i.stop()}}),Jt)}function Hn(e,t){return Vn([e],t)}function zn(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0;return{type:"REPLACE_INNER_BLOCKS",rootClientId:e,blocks:t,updateSelection:n,initialPosition:n?r:null,time:Date.now()}}function Gn(e){return{type:"TOGGLE_BLOCK_MODE",clientId:e}}function Un(){return{type:"START_TYPING"}}function Wn(){return{type:"STOP_TYPING"}}function Kn(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return{type:"START_DRAGGING_BLOCKS",clientIds:e}}function qn(){return{type:"STOP_DRAGGING_BLOCKS"}}function $n(){return{type:"ENTER_FORMATTED_TEXT"}}function Yn(){return{type:"EXIT_FORMATTED_TEXT"}}function Xn(e,t,n,r){return{type:"SELECTION_CHANGE",clientId:e,attributeKey:t,startOffset:n,endOffset:r}}function Qn(e,t,n){var r=Object(p.getDefaultBlockName)();if(r)return Tn(Object(p.createBlock)(r,e),n,t)}function Zn(e,t){return{type:"UPDATE_BLOCK_LIST_SETTINGS",clientId:e,settings:t}}function Jn(e){return{type:"UPDATE_SETTINGS",settings:e}}function er(e,t){return{type:"SAVE_REUSABLE_BLOCK_SUCCESS",id:e,updatedId:t}}function tr(){return{type:"MARK_LAST_CHANGE_AS_PERSISTENT"}}function nr(){return{type:"MARK_NEXT_CHANGE_AS_NOT_PERSISTENT"}}function rr(){return Pt.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,{type:"MARK_AUTOMATIC_CHANGE"};case 2:return e.next=4,{type:"MARK_AUTOMATIC_CHANGE_FINAL_CONTROL"};case 4:case"end":return e.stop()}}),en)}function or(){return{type:"MARK_AUTOMATIC_CHANGE_FINAL"}}function cr(){var e,t=arguments;return Pt.a.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return e=!(t.length>0&&void 0!==t[0])||t[0],n.next=3,{type:"SET_NAVIGATION_MODE",isNavigationMode:e};case 3:e?Object(Tt.speak)(Object(y.__)("You are currently in navigation mode. Navigate blocks using the Tab key and Arrow keys. Use Left and Right Arrow keys to move between nesting levels. To exit navigation mode and edit the selected block, press Enter.")):Object(Tt.speak)(Object(y.__)("You are currently in edit mode. To return to the navigation mode, press Escape."));case 4:case"end":return n.stop()}}),tn)}function ir(){var e,t=arguments;return Pt.a.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return e=t.length>0&&void 0!==t[0]?t[0]:null,n.next=3,{type:"SET_BLOCK_MOVING_MODE",hasBlockMovingClientId:e};case 3:e&&Object(Tt.speak)(Object(y.__)("Use the Tab key and Arrow keys to choose new block location. Use Left and Right Arrow keys to move between nesting levels. Once location is selected press Enter or Space to move the block."));case 4:case"end":return n.stop()}}),nn)}function ar(e){var t,n,r,o,c,i,a=arguments;return Pt.a.wrap((function(l){for(;;)switch(l.prev=l.next){case 0:if(t=!(a.length>1&&void 0!==a[1])||a[1],e||e.length){l.next=3;break}return l.abrupt("return");case 3:return l.next=5,m.controls.select(Rt,"getBlocksByClientId",e);case 5:return n=l.sent,l.next=8,m.controls.select(Rt,"getBlockRootClientId",e[0]);case 8:if(r=l.sent,!Object(d.some)(n,(function(e){return!e}))){l.next=11;break}return l.abrupt("return");case 11:if(o=n.map((function(e){return e.name})),!Object(d.some)(o,(function(e){return!Object(p.hasBlockSupport)(e,"multiple",!0)}))){l.next=14;break}return l.abrupt("return");case 14:return l.next=16,m.controls.select(Rt,"getBlockIndex",Object(d.last)(Object(d.castArray)(e)),r);case 16:return c=l.sent,i=n.map((function(e){return Object(p.__experimentalCloneSanitizedBlock)(e)})),l.next=20,Nn(i,c+1,r,t);case 20:if(!(i.length>1&&t)){l.next=23;break}return l.next=23,jn(Object(d.first)(i).clientId,Object(d.last)(i).clientId);case 23:return l.abrupt("return",i.map((function(e){return e.clientId})));case 24:case"end":return l.stop()}}),rn)}function lr(e){var t,n;return Pt.a.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(e){r.next=2;break}return r.abrupt("return");case 2:return r.next=4,m.controls.select(Rt,"getBlockRootClientId",e);case 4:return t=r.sent,r.next=7,m.controls.select(Rt,"getTemplateLock",t);case 7:if(!r.sent){r.next=10;break}return r.abrupt("return");case 10:return r.next=12,m.controls.select(Rt,"getBlockIndex",e,t);case 12:return n=r.sent,r.next=15,Qn({},t,n);case 15:return r.abrupt("return",r.sent);case 16:case"end":return r.stop()}}),on)}function sr(e){var t,n;return Pt.a.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(e){r.next=2;break}return r.abrupt("return");case 2:return r.next=4,m.controls.select(Rt,"getBlockRootClientId",e);case 4:return t=r.sent,r.next=7,m.controls.select(Rt,"getTemplateLock",t);case 7:if(!r.sent){r.next=10;break}return r.abrupt("return");case 10:return r.next=12,m.controls.select(Rt,"getBlockIndex",e,t);case 12:return n=r.sent,r.next=15,Qn({},t,n+1);case 15:return r.abrupt("return",r.sent);case 16:case"end":return r.stop()}}),cn)}function ur(e,t){return{type:"TOGGLE_BLOCK_HIGHLIGHT",clientId:e,isHighlighted:t}}function dr(e){return Pt.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,ur(e,!0);case 2:return t.next=4,{type:"SLEEP",duration:150};case 4:return t.next=6,ur(e,!1);case 6:case"end":return t.stop()}}),an)}function br(e,t){return{type:"SET_HAS_CONTROLLED_INNER_BLOCKS",hasControlledInnerBlocks:t,clientId:e}}function fr(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function pr(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?fr(Object(n),!0).forEach((function(t){Object(a.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):fr(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var mr={reducer:V,selectors:r,actions:o,controls:At},vr=Object(m.createReduxStore)(Rt,pr(pr({},mr),{},{persist:["preferences"]}));function gr(){var e=h(),t=e.isSelected,n=e.clientId,r=e.name,o=Object(m.useSelect)((function(e){if(!t){var o=e(vr),c=o.getBlockName,i=o.isFirstMultiSelectedBlock,a=o.getMultiSelectedBlockClientIds;return!!i(n)&&a().every((function(e){return c(e)===r}))}}),[n,t,r]);return t||o}Object(m.registerStore)(Rt,pr(pr({},mr),{},{persist:["preferences"]}));var Or=Object(v.createSlotFill)("BlockControls"),hr=Or.Fill,jr=Or.Slot,kr=function(e){var t=e.controls,n=e.children;return gr()?Object(l.createElement)(hr,null,(function(e){var r=Object(d.isEmpty)(e)?null:e;return Object(l.createElement)(v.__experimentalToolbarContext.Provider,{value:r},Object(l.createElement)(v.ToolbarGroup,{controls:t}),n)})):null};kr.Slot=function(e){var t=Object(l.useContext)(v.__experimentalToolbarContext);return Object(l.createElement)(jr,Object(i.a)({},e,{fillProps:t}))};var yr=kr,_r=n(7),Er=Object(l.createElement)(_r.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(l.createElement)(_r.Path,{d:"M4 9v6h14V9H4zm8-4.8H4v1.5h8V4.2zM4 19.8h8v-1.5H4v1.5z"})),wr=Object(l.createElement)(_r.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(l.createElement)(_r.Path,{d:"M5 15h14V9H5v6zm0 4.8h14v-1.5H5v1.5zM5 4.2v1.5h14V4.2H5z"})),Cr=Object(l.createElement)(_r.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(l.createElement)(_r.Path,{d:"M6 15h14V9H6v6zm6-10.8v1.5h8V4.2h-8zm0 15.6h8v-1.5h-8v1.5z"})),Sr=Object(l.createElement)(_r.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(l.createElement)(_r.Path,{d:"M5 9v6h14V9H5zm11-4.8H8v1.5h8V4.2zM8 19.8h8v-1.5H8v1.5z"})),Br=Object(l.createElement)(_r.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(l.createElement)(_r.Path,{d:"M5 4v11h14V4H5zm3 15.8h8v-1.5H8v1.5z"})),Ir={type:"default"},xr=Object(l.createContext)(Ir),Pr=xr.Provider;function Tr(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Nr(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Tr(Object(n),!0).forEach((function(t){Object(a.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Tr(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Dr={left:{icon:Er,title:Object(y.__)("Align left")},center:{icon:wr,title:Object(y.__)("Align center")},right:{icon:Cr,title:Object(y.__)("Align right")},wide:{icon:Sr,title:Object(y.__)("Wide width")},full:{icon:Br,title:Object(y.__)("Full width")}},Ar=["left","center","right","wide","full"],Rr=["wide","full"],Lr={isAlternate:!0},Mr=function(e){var t=e.value,n=e.onChange,r=e.controls,o=void 0===r?Ar:r,c=e.isToolbar,a=e.isCollapsed,s=void 0===a||a,u=e.isToolbarButton,d=void 0===u||u,b=Object(m.useSelect)((function(e){return{wideControlsEnabled:(0,e(vr).getSettings)().alignWide}}),[]).wideControlsEnabled,f=void 0!==b&&b,p=Object(l.useContext)(xr);if("default"!==p.type)return null;var g=p.alignments,O=void 0===g?Ar:g,h=o.filter((function(e){return(f||!Rr.includes(e))&&O.includes(e)}));if(0===h.length)return null;var j=Dr[t],k=Dr.center,_=c?v.ToolbarGroup:v.DropdownMenu,E=c?{isCollapsed:s}:{isToolbarButton:d};return Object(l.createElement)(_,Object(i.a)({popoverProps:Lr,icon:j?j.icon:k.icon,label:Object(y.__)("Align"),toggleProps:{describedBy:Object(y.__)("Change alignment")},controls:h.map((function(e){return Nr(Nr({},Dr[e]),{},{isActive:t===e,role:s?"menuitemradio":void 0,onClick:(r=e,function(){return n(t===r?void 0:r)})});var r}))},E))};function Fr(e){return Object(l.createElement)(Mr,Object(i.a)({},e,{isToolbar:!1}))}function Vr(e){return Object(l.createElement)(Mr,Object(i.a)({},e,{isToolbar:!0}))}function Hr(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function zr(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Hr(Object(n),!0).forEach((function(t){Object(a.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Hr(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Gr=["left","center","right","wide","full"],Ur=["wide","full"];function Wr(e){var t,n=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],r=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];return t=Array.isArray(e)?Gr.filter((function(t){return e.includes(t)})):!0===e?Gr:[],!r||!0===e&&!n?d.without.apply(void 0,[t].concat(Ur)):t}var Kr=Object(b.createHigherOrderComponent)((function(e){return function(t){var n=t.name,r=Wr(Object(p.getBlockSupport)(n,"align"),Object(p.hasBlockSupport)(n,"alignWide",!0));return[r.length>0&&t.isSelected&&Object(l.createElement)(yr,{key:"align-controls"},Object(l.createElement)(Vr,{value:t.attributes.align,onChange:function(e){var n,r;e||(null===(n=Object(p.getBlockType)(t.name).attributes)||void 0===n||null===(r=n.align)||void 0===r?void 0:r.default)&&(e=""),t.setAttributes({align:e})},controls:r})),Object(l.createElement)(e,Object(i.a)({key:"edit"},t))]}}),"withToolbarControls"),qr=Object(b.createHigherOrderComponent)((function(e){return function(t){var n=t.name,r=t.attributes.align,o=Object(m.useSelect)((function(e){return!!e(vr).getSettings().alignWide}),[]);if(void 0===r)return Object(l.createElement)(e,t);var c=Wr(Object(p.getBlockSupport)(n,"align"),Object(p.hasBlockSupport)(n,"alignWide",!0),o),a=t.wrapperProps;return c.includes(r)&&(a=zr(zr({},a),{},{"data-align":r})),Object(l.createElement)(e,Object(i.a)({},t,{wrapperProps:a}))}}));Object(f.addFilter)("blocks.registerBlockType","core/align/addAttribute",(function(e){return Object(d.has)(e.attributes,["align","type"])||Object(p.hasBlockSupport)(e,"align")&&(e.attributes=zr(zr({},e.attributes),{},{align:{type:"string",enum:[].concat(Gr,[""])}})),e})),Object(f.addFilter)("editor.BlockListBlock","core/editor/align/with-data-align",qr),Object(f.addFilter)("editor.BlockEdit","core/editor/align/with-toolbar-controls",Kr),Object(f.addFilter)("blocks.getSaveContent.extraProps","core/align/addAssignedAlign",(function(e,t,n){var r=n.align;return Wr(Object(p.getBlockSupport)(t,"align"),Object(p.hasBlockSupport)(t,"alignWide",!0)).includes(r)&&(e.className=u()("align".concat(r),e.className)),e}));var $r=Object(v.createSlotFill)("InspectorAdvancedControls"),Yr=$r.Fill,Xr=$r.Slot;function Qr(e){var t=e.children;return h().isSelected?Object(l.createElement)(Yr,null,t):null}Qr.slotName="InspectorAdvancedControls",Qr.Slot=Xr;var Zr=Qr,Jr=Object(v.createSlotFill)("InspectorControls"),eo=Jr.Fill,to=Jr.Slot;function no(e){var t=e.children;return gr()?Object(l.createElement)(eo,null,t):null}no.Slot=to;var ro=no;function oo(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function co(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?oo(Object(n),!0).forEach((function(t){Object(a.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):oo(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var io=/[\s#]/g,ao=Object(b.createHigherOrderComponent)((function(e){return function(t){if(Object(p.hasBlockSupport)(t.name,"anchor")&&t.isSelected){var n="web"===l.Platform.OS,r=Object(l.createElement)(v.TextControl,{className:"html-anchor-control",label:Object(y.__)("HTML anchor"),help:Object(l.createElement)(l.Fragment,null,Object(y.__)("Enter a word or two — without spaces — to make a unique web address just for this block, called an “anchor.” Then, you’ll be able to link directly to this section of your page."),Object(l.createElement)(v.ExternalLink,{href:"https://wordpress.org/support/article/page-jumps/"},Object(y.__)("Learn more about anchors"))),value:t.attributes.anchor||"",valuePlaceholder:n?null:Object(y.__)("Add an anchor"),onChange:function(e){e=e.replace(io,"-"),t.setAttributes({anchor:e})},autoCapitalize:"none",autoComplete:"off"});return Object(l.createElement)(l.Fragment,null,Object(l.createElement)(e,t),n&&Object(l.createElement)(Zr,null,r),!n&&"core/heading"===t.name&&Object(l.createElement)(ro,null,Object(l.createElement)(v.PanelBody,{title:Object(y.__)("Heading settings")},r)))}return Object(l.createElement)(e,t)}}),"withInspectorControl");function lo(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function so(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?lo(Object(n),!0).forEach((function(t){Object(a.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):lo(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}Object(f.addFilter)("blocks.registerBlockType","core/anchor/attribute",(function(e){return Object(d.has)(e.attributes,["anchor","type"])||Object(p.hasBlockSupport)(e,"anchor")&&(e.attributes=co(co({},e.attributes),{},{anchor:{type:"string",source:"attribute",attribute:"id",selector:"*"}})),e})),Object(f.addFilter)("editor.BlockEdit","core/editor/anchor/with-inspector-control",ao),Object(f.addFilter)("blocks.getSaveContent.extraProps","core/anchor/save-props",(function(e,t,n){return Object(p.hasBlockSupport)(t,"anchor")&&(e.id=""===n.anchor?null:n.anchor),e}));var uo=Object(b.createHigherOrderComponent)((function(e){return function(t){return Object(p.hasBlockSupport)(t.name,"customClassName",!0)&&t.isSelected?Object(l.createElement)(l.Fragment,null,Object(l.createElement)(e,t),Object(l.createElement)(Zr,null,Object(l.createElement)(v.TextControl,{autoComplete:"off",label:Object(y.__)("Additional CSS class(es)"),value:t.attributes.className||"",onChange:function(e){t.setAttributes({className:""!==e?e:void 0})},help:Object(y.__)("Separate multiple classes with spaces.")}))):Object(l.createElement)(e,t)}}),"withInspectorControl");function bo(e){e="<div data-custom-class-name>".concat(e,"</div>");var t=Object(p.parseWithAttributeSchema)(e,{type:"string",source:"attribute",selector:"[data-custom-class-name] > *",attribute:"class"});return t?t.trim().split(/\s+/):[]}Object(f.addFilter)("blocks.registerBlockType","core/custom-class-name/attribute",(function(e){return Object(p.hasBlockSupport)(e,"customClassName",!0)&&(e.attributes=so(so({},e.attributes),{},{className:{type:"string"}})),e})),Object(f.addFilter)("editor.BlockEdit","core/editor/custom-class-name/with-inspector-control",uo),Object(f.addFilter)("blocks.getSaveContent.extraProps","core/custom-class-name/save-props",(function(e,t,n){return Object(p.hasBlockSupport)(t,"customClassName",!0)&&n.className&&(e.className=u()(e.className,n.className)),e})),Object(f.addFilter)("blocks.getBlockAttributes","core/custom-class-name/addParsedDifference",(function(e,t,n){if(Object(p.hasBlockSupport)(t,"customClassName",!0)){var r=Object(d.omit)(e,["className"]),o=Object(p.getSaveContent)(t,r),c=bo(o),i=bo(n),a=Object(d.difference)(i,c);a.length?e.className=a.join(" "):o&&delete e.className}return e})),Object(f.addFilter)("blocks.getSaveContent.extraProps","core/generated-class-name/save-props",(function(e,t){return Object(p.hasBlockSupport)(t,"className",!0)&&("string"==typeof e.className?e.className=Object(d.uniq)([Object(p.getBlockDefaultClassName)(t.name)].concat(Object(k.a)(e.className.split(" ")))).join(" ").trim():e.className=Object(p.getBlockDefaultClassName)(t.name)),e}));var fo={"color.palette":function(e){return void 0===e.colors?void 0:e.colors},"color.gradients":function(e){return void 0===e.gradients?void 0:e.gradients},"color.custom":function(e){return void 0===e.disableCustomColors?void 0:!e.disableCustomColors},"color.customGradient":function(e){return void 0===e.disableCustomGradients?void 0:!e.disableCustomGradients},"typography.fontSizes":function(e){return void 0===e.fontSizes?void 0:e.fontSizes},"typography.customFontSize":function(e){return void 0===e.disableCustomFontSizes?void 0:!e.disableCustomFontSizes},"typography.customLineHeight":function(e){return e.enableCustomLineHeight},"spacing.units":function(e){if(void 0!==e.enableCustomUnits)return!0===e.enableCustomUnits?["px","em","rem","vh","vw"]:e.enableCustomUnits},"spacing.customPadding":function(e){return e.enableCustomSpacing}};function po(e,t){for(var n in t)if(t[n]!==e[n])return!1;return!0}function mo(e){var t=h(),n=t.name,r=t.clientId;return Object(m.useSelect)((function(t){var o,c=t(vr),i=c.getBlockAttributes,a=(0,c.getSettings)(),l=t(p.store).getBlockType(n),s=n,u=Object(d.get)(l,["supports","__experimentalSelector"]);if(Object(d.isObject)(u)){var b=i(r)||{};for(var f in u)if(po(b,u[f].attributes)){s=f;break}}var m="__experimentalFeatures.defaults.".concat(e),v="__experimentalFeatures.".concat(s,".").concat(e),g=null!==(o=Object(d.get)(a,v))&&void 0!==o?o:Object(d.get)(a,m);if(void 0!==g)return g;var O=fo[e]?fo[e](a):void 0;return void 0!==O?O:"typography.dropCap"===e||void 0}),[n,r,e])}var vo=function e(t){if(!Object(d.isObject)(t))return t;var n=Object(d.pickBy)(Object(d.mapValues)(t,e),d.identity);return Object(d.isEqual)(n,{})?void 0:n};function go(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Oo(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?go(Object(n),!0).forEach((function(t){Object(a.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):go(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function ho(e){var t,n=e.attributes.style,r=e.setAttributes;return ko(e)?null:Object(l.createElement)(v.RangeControl,{value:null==n||null===(t=n.border)||void 0===t?void 0:t.radius,label:Object(y.__)("Border radius"),min:0,max:50,initialPosition:0,allowReset:!0,onChange:function(e){var t=Oo(Oo({},n),{},{border:Oo(Oo({},null==n?void 0:n.border),{},{radius:e})});r({style:vo(t)})}})}function jo(e){var t=Object(p.getBlockSupport)(e,yo);return!!(!0===t||null!=t&&t.radius)}function ko(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.name,n=!mo("border.customRadius");return!jo(t)||n}var yo="__experimentalBorder";function _o(e){var t=Eo(e),n=function(e){if("web"!==l.Platform.OS)return!1;var t=Object(p.getBlockSupport)(e,yo);return!!(!0===t||null!=t&&t.radius)}(e.name);return t||!n?null:Object(l.createElement)(ro,null,Object(l.createElement)(v.PanelBody,{title:Object(y.__)("Border settings")},Object(l.createElement)(ho,e)))}var Eo=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=[ko(e)];return t.every(Boolean)},wo=n(62),Co=n.n(wo),So=function(e,t,n){if(t){var r=Object(d.find)(e,{slug:t});if(r)return r}return{color:n}},Bo=function(e,t){return Object(d.find)(e,{color:t})};function Io(e,t){if(e&&t)return"has-".concat(Object(d.kebabCase)(t),"-").concat(e)}var xo=[];function Po(e){if(e)return"has-".concat(e,"-gradient-background")}function To(e,t){var n=Object(d.find)(e,["slug",t]);return n&&n.gradient}function No(e,t){return Object(d.find)(e,["gradient",t])}function Do(e,t){var n=No(e,t);return n&&n.slug}function Ao(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.gradientAttribute,n=void 0===t?"gradient":t,r=e.customGradientAttribute,o=void 0===r?"customGradient":r,c=h(),i=c.clientId,s=mo("color.gradients")||xo,u=Object(m.useSelect)((function(e){var t=(0,e(vr).getBlockAttributes)(i)||{};return{customGradient:t[o],gradient:t[n]}}),[i,n,o]),d=u.gradient,b=u.customGradient,f=Object(m.useDispatch)(vr),p=f.updateBlockAttributes,v=Object(l.useCallback)((function(e){var t,r,c=Do(s,e);p(i,c?(r={},Object(a.a)(r,n,c),Object(a.a)(r,o,void 0),r):(t={},Object(a.a)(t,n,void 0),Object(a.a)(t,o,e),t))}),[s,i,p]),g=Po(d);return{gradientClass:g,gradientValue:d?To(s,d):b,setGradient:v}}var Ro=n(8);function Lo(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Mo(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Lo(Object(n),!0).forEach((function(t){Object(a.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Lo(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}
4
  // translators: first %s: the color name or value (e.g. red or #ff0000)
5
+ var Fo=Object(y.__)("(Color: %s)"),Vo=Object(y.__)("(Gradient: %s)"),Ho=["colors","disableCustomColors","gradients","disableCustomGradients"];// translators: first %s: the gradient name or value (e.g. red to green or linear-gradient(135deg,rgba(6,147,227,1) 0%,rgb(155,81,224) 100%)
6
+ function zo(e){var t,n,r=e.colors,o=e.gradients,c=e.label,i=e.currentTab,a=e.colorValue,s=e.gradientValue;if("color"===i){if(a){var u=Bo(r,t=a),d=u&&u.name;n=Object(y.sprintf)(Fo,d||t)}}else if("gradient"===i&&s){var b=No(o,t=s),f=b&&b.name;n=Object(y.sprintf)(Vo,f||t)}return Object(l.createElement)(l.Fragment,null,c,!!t&&Object(l.createElement)(v.ColorIndicator,{colorValue:t,"aria-label":n}))}function Go(e){var t=e.colors,n=e.gradients,r=e.disableCustomColors,o=e.disableCustomGradients,c=e.className,a=e.label,s=e.onColorChange,b=e.onGradientChange,f=e.colorValue,p=e.gradientValue,m=e.clearable,g=s&&(!Object(d.isEmpty)(t)||!r),O=b&&(!Object(d.isEmpty)(n)||!o),h=Object(l.useState)(p?"gradient":!!g&&"color"),j=Object(Ro.a)(h,2),k=j[0],_=j[1];return g||O?Object(l.createElement)(v.BaseControl,{className:u()("block-editor-color-gradient-control",c)},Object(l.createElement)("fieldset",null,Object(l.createElement)("legend",null,Object(l.createElement)("div",{className:"block-editor-color-gradient-control__color-indicator"},Object(l.createElement)(v.BaseControl.VisualLabel,null,Object(l.createElement)(zo,{currentTab:k,label:a,colorValue:f,gradientValue:p})))),g&&O&&Object(l.createElement)(v.ButtonGroup,{className:"block-editor-color-gradient-control__button-tabs"},Object(l.createElement)(v.Button,{isSmall:!0,isPressed:"color"===k,onClick:function(){return _("color")}},Object(y.__)("Solid")),Object(l.createElement)(v.Button,{isSmall:!0,isPressed:"gradient"===k,onClick:function(){return _("gradient")}},Object(y.__)("Gradient"))),("color"===k||!O)&&Object(l.createElement)(v.ColorPalette,Object(i.a)({value:f,onChange:O?function(e){s(e),b()}:s},{colors:t,disableCustomColors:r},{clearable:m})),("gradient"===k||!g)&&Object(l.createElement)(v.__experimentalGradientPicker,Object(i.a)({value:p,onChange:g?function(e){b(e),s()}:b},{gradients:n,disableCustomGradients:o},{clearable:m})))):null}function Uo(e){var t={};return t.colors=mo("color.palette"),t.gradients=mo("color.gradients"),t.disableCustomColors=!mo("color.custom"),t.disableCustomGradients=!mo("color.customGradient"),Object(l.createElement)(Go,Mo(Mo({},t),e))}var Wo=function(e){return Object(d.every)(Ho,(function(t){return e.hasOwnProperty(t)}))?Object(l.createElement)(Go,e):Object(l.createElement)(Uo,e)};function Ko(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function qo(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Ko(Object(n),!0).forEach((function(t){Object(a.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ko(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}
7
  // translators: first %s: The type of color or gradient (e.g. background, overlay...), second %s: the color name or value (e.g. red or #ff0000)
8
+ var $o=Object(y.__)("(%s: color %s)"),Yo=Object(y.__)("(%s: gradient %s)"),Xo=["colors","disableCustomColors","gradients","disableCustomGradients"],Qo=function(e){var t=e.colors,n=e.gradients;return e.settings.map((function(e,r){var o,c=e.colorValue,i=e.gradientValue,a=e.label,s=e.colors,u=e.gradients;if(!c&&!i)return null;if(c){var d=Bo(s||t,c);o=Object(y.sprintf)($o,a.toLowerCase(),d&&d.name||c)}else{var b=No(u||n,c);o=Object(y.sprintf)(Yo,a.toLowerCase(),b&&b.name||i)}return Object(l.createElement)(v.ColorIndicator,{key:r,colorValue:c||i,"aria-label":o})}))},Zo=function(e){var t=e.className,n=e.colors,r=e.gradients,o=e.disableCustomColors,c=e.disableCustomGradients,a=e.children,s=e.settings,b=e.title,f=Object(j.a)(e,["className","colors","gradients","disableCustomColors","disableCustomGradients","children","settings","title"]);if(Object(d.isEmpty)(n)&&Object(d.isEmpty)(r)&&o&&c&&Object(d.every)(s,(function(e){return Object(d.isEmpty)(e.colors)&&Object(d.isEmpty)(e.gradients)&&(void 0===e.disableCustomColors||e.disableCustomColors)&&(void 0===e.disableCustomGradients||e.disableCustomGradients)})))return null;var p=Object(l.createElement)("span",{className:"block-editor-panel-color-gradient-settings__panel-title"},b,Object(l.createElement)(Qo,{colors:n,gradients:r,settings:s}));return Object(l.createElement)(v.PanelBody,Object(i.a)({className:u()("block-editor-panel-color-gradient-settings",t),title:p},f),s.map((function(e,t){return Object(l.createElement)(Wo,Object(i.a)({key:t},qo({colors:n,gradients:r,disableCustomColors:o,disableCustomGradients:c},e)))})),a)},Jo=function(e){var t={};return t.colors=mo("color.palette"),t.gradients=mo("color.gradients"),t.disableCustomColors=!mo("color.custom"),t.disableCustomGradients=!mo("color.customGradient"),Object(l.createElement)(Zo,qo(qo({},t),e))},ec=function(e){return Object(d.every)(Xo,(function(t){return e.hasOwnProperty(t)}))?Object(l.createElement)(Zo,e):Object(l.createElement)(Jo,e)};// translators: first %s: The type of color or gradient (e.g. background, overlay...), second %s: the color name or value (e.g. red or #ff0000)
9
+ function tc(e){var t=e.tinyBackgroundColor,n=e.tinyTextColor,r=e.backgroundColor,o=e.textColor,c=t.getBrightness()<n.getBrightness()?Object(y.__)("This color combination may be hard for people to read. Try using a darker background color and/or a brighter text color."):Object(y.__)("This color combination may be hard for people to read. Try using a brighter background color and/or a darker text color.");return Object(l.useEffect)((function(){Object(Tt.speak)(Object(y.__)("This color combination may be hard for people to read."))}),[r,o]),Object(l.createElement)("div",{className:"block-editor-contrast-checker"},Object(l.createElement)(v.Notice,{spokenMessage:null,status:"warning",isDismissible:!1},c))}var nc=function(e){var t=e.backgroundColor,n=e.fallbackBackgroundColor,r=e.fallbackTextColor,o=e.fontSize,c=e.isLargeText,i=e.textColor;if(!t&&!n||!i&&!r)return null;var a=Co()(t||n),s=Co()(i||r);return 1!==a.getAlpha()||1!==s.getAlpha()||Co.a.isReadable(a,s,{level:"AA",size:c||!1!==c&&o>=24?"large":"small"})?null:Object(l.createElement)(tc,{backgroundColor:t,textColor:i,tinyBackgroundColor:a,tinyTextColor:s})};function rc(e,t){return t.getElementById("block-"+e)}function oc(e,t){return t.closest(".block-editor-block-list__block")===e}function cc(e){for(;e&&e.nodeType!==e.ELEMENT_NODE;)e=e.parentNode;if(e){var t=e.closest(".block-editor-block-list__block");if(t)return t.id.slice("block-".length)}}function ic(e){return e.ownerDocument.defaultView.getComputedStyle(e)}function ac(e){var t=e.settings,n=e.clientId,r=e.enableContrastChecking,o=void 0===r||r,c=Object(l.useState)(),i=Object(Ro.a)(c,2),a=i[0],s=i[1],u=Object(l.useState)(),d=Object(Ro.a)(u,2),b=d[0],f=d[1];return Object(l.useEffect)((function(){if(o){var e=rc(n,document);if(e){f(ic(e).color);for(var t=e,r=ic(t).backgroundColor;"rgba(0, 0, 0, 0)"===r&&t.parentNode&&t.parentNode.nodeType===t.parentNode.ELEMENT_NODE;)r=ic(t=t.parentNode).backgroundColor;s(r)}}})),Object(l.createElement)(ro,null,Object(l.createElement)(ec,{title:Object(y.__)("Color settings"),initialOpen:!1,settings:t},o&&Object(l.createElement)(nc,{backgroundColor:a,textColor:b})))}function lc(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function sc(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?lc(Object(n),!0).forEach((function(t){Object(a.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):lc(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var uc=[],dc=function(e){var t=Object(p.getBlockSupport)(e,"color");return t&&(!0===t.link||!0===t.gradient||!1!==t.background||!1!==t.text)},bc=function(e){var t=Object(p.getBlockSupport)(e,"color");return null==t?void 0:t.__experimentalSkipSerialization},fc=function(e){if("web"!==l.Platform.OS)return!1;var t=Object(p.getBlockSupport)(e,"color");return Object(d.isObject)(t)&&!!t.link},pc=function(e){if("web"!==l.Platform.OS)return!1;var t=Object(p.getBlockSupport)(e,"color");return Object(d.isObject)(t)&&!!t.gradients},mc=function(e){var t=Object(p.getBlockSupport)(e,"color");return t&&!1!==t.text};function vc(e,t,n){var r,o,c,i,l,s;if(!dc(t)||bc(t))return e;var d=pc(t),b=n.backgroundColor,f=n.textColor,p=n.gradient,m=n.style,v=Io("background-color",b),g=Po(p),O=Io("color",f),h=u()(e.className,O,g,(s={},Object(a.a)(s,v,!(d&&null!=m&&null!==(r=m.color)&&void 0!==r&&r.gradient||!v)),Object(a.a)(s,"has-text-color",f||(null==m||null===(o=m.color)||void 0===o?void 0:o.text)),Object(a.a)(s,"has-background",b||(null==m||null===(c=m.color)||void 0===c?void 0:c.background)||d&&(p||(null==m||null===(i=m.color)||void 0===i?void 0:i.gradient))),Object(a.a)(s,"has-link-color",null==m||null===(l=m.color)||void 0===l?void 0:l.link),s));return e.className=h||void 0,e}var gc=function(e,t){var n=/var:preset\|color\|(.+)/.exec(t);return n&&n[1]?So(e,n[1]).color:t};function Oc(e){var t,n,r,o,c,i,s=e.name,u=e.attributes,d=mo("color.link"),b=mo("color.palette")||uc,f=mo("color.gradients")||uc,m=Object(l.useRef)(u);if(Object(l.useEffect)((function(){m.current=u}),[u]),!dc(s)||"web"!==l.Platform.OS)return null;var v,g,O,h=(v=s,(g=Object(p.getBlockSupport)(v,"color"))&&!1!==g.background),j=pc(s),_=u.style,E=u.textColor,w=u.backgroundColor,C=u.gradient;if(j&&C)O=To(f,C);else if(j){var S;O=null==_||null===(S=_.color)||void 0===S?void 0:S.gradient}var B=function(t){return function(n){var r,o,c=Bo(b,n),i=t+"Color",l=sc(sc({},m.current.style),{},{color:sc(sc({},null===(r=m.current)||void 0===r||null===(o=r.style)||void 0===o?void 0:o.color),{},Object(a.a)({},t,null!=c&&c.slug?void 0:n))}),s=null!=c&&c.slug?c.slug:void 0,u=Object(a.a)({style:vo(l)},i,s);e.setAttributes(u),m.current=sc(sc({},m.current),u)}};return Object(l.createElement)(ac,{enableContrastChecking:!("web"!==l.Platform.OS||C||null!=_&&null!==(t=_.color)&&void 0!==t&&t.gradient),clientId:e.clientId,settings:[].concat(Object(k.a)(mc(s)?[{label:Object(y.__)("Text Color"),onColorChange:B("text"),colorValue:So(b,E,null==_||null===(n=_.color)||void 0===n?void 0:n.text).color}]:[]),Object(k.a)(h||j?[{label:Object(y.__)("Background Color"),onColorChange:h?B("background"):void 0,colorValue:So(b,w,null==_||null===(r=_.color)||void 0===r?void 0:r.background).color,gradientValue:O,onGradientChange:j?function(t){var n,r=Do(f,t);if(r){var o,c,i,a=sc(sc({},null===(o=m.current)||void 0===o?void 0:o.style),{},{color:sc(sc({},null===(c=m.current)||void 0===c||null===(i=c.style)||void 0===i?void 0:i.color),{},{gradient:void 0})});n={style:vo(a),gradient:r}}else{var l,s,u,d=sc(sc({},null===(l=m.current)||void 0===l?void 0:l.style),{},{color:sc(sc({},null===(s=m.current)||void 0===s||null===(u=s.style)||void 0===u?void 0:u.color),{},{gradient:t})});n={style:vo(d),gradient:void 0}}e.setAttributes(n),m.current=sc(sc({},m.current),n)}:void 0}]:[]),Object(k.a)(d&&fc(s)?[{label:Object(y.__)("Link Color"),onColorChange:function(t){var n,r=Bo(b,t);e.setAttributes({style:sc(sc({},e.attributes.style),{},{color:sc(sc({},null===(n=e.attributes.style)||void 0===n?void 0:n.color),{},{link:null!=r&&r.slug?"var:preset|color|".concat(r.slug):t})})})},colorValue:gc(b,null==_||null===(o=_.color)||void 0===o?void 0:o.link),clearable:!(null===(c=e.attributes.style)||void 0===c||null===(i=c.color)||void 0===i||!i.link)}]:[]))})}var hc=Object(b.createHigherOrderComponent)((function(e){return function(t){var n,r,o,c=t.name,a=t.attributes,s=a.backgroundColor,u=a.textColor,d=mo("color.palette")||uc;if(!dc(c)||bc(c))return Object(l.createElement)(e,t);var b={color:u?null===(n=So(d,u))||void 0===n?void 0:n.color:void 0,backgroundColor:s?null===(r=So(d,s))||void 0===r?void 0:r.color:void 0},f=t.wrapperProps;return f=sc(sc({},t.wrapperProps),{},{style:sc(sc({},b),null===(o=t.wrapperProps)||void 0===o?void 0:o.style)}),Object(l.createElement)(e,Object(i.a)({},t,{wrapperProps:f}))}}));Object(f.addFilter)("blocks.registerBlockType","core/color/addAttribute",(function(e){return dc(e)?(e.attributes.backgroundColor||Object.assign(e.attributes,{backgroundColor:{type:"string"}}),e.attributes.textColor||Object.assign(e.attributes,{textColor:{type:"string"}}),pc(e)&&!e.attributes.gradient&&Object.assign(e.attributes,{gradient:{type:"string"}}),e):e})),Object(f.addFilter)("blocks.getSaveContent.extraProps","core/color/addSaveProps",vc),Object(f.addFilter)("blocks.registerBlockType","core/color/addEditProps",(function(e){if(!dc(e)||bc(e))return e;var t=e.getEditWrapperProps;return e.getEditWrapperProps=function(n){var r={};return t&&(r=t(n)),vc(r,e,n)},e})),Object(f.addFilter)("editor.BlockListBlock","core/color/with-color-palette-styles",hc);var jc=Object(l.createElement)(_r.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(l.createElement)(_r.Path,{d:"M7 18v1h10v-1H7zm5-2c1.5 0 2.6-.4 3.4-1.2.8-.8 1.1-2 1.1-3.5V5H15v5.8c0 1.2-.2 2.1-.6 2.8-.4.7-1.2 1-2.4 1s-2-.3-2.4-1c-.4-.7-.6-1.6-.6-2.8V5H7.5v6.2c0 1.5.4 2.7 1.1 3.5.8.9 1.9 1.3 3.4 1.3z"})),kc=n(385),yc=[{name:Object(y.__)("Underline"),value:"underline",icon:jc},{name:Object(y.__)("Strikethrough"),value:"line-through",icon:kc.a}];function _c(e){var t=e.value,n=e.onChange;return Object(l.createElement)("fieldset",{className:"block-editor-text-decoration-control"},Object(l.createElement)("legend",null,Object(y.__)("Decoration")),Object(l.createElement)("div",{className:"block-editor-text-decoration-control__buttons"},yc.map((function(e){return Object(l.createElement)(v.Button,{key:e.value,icon:e.icon,isSmall:!0,isPressed:e.value===t,onClick:function(){return n(e.value===t?void 0:e.value)},"aria-label":e.name})}))))}function Ec(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function wc(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Ec(Object(n),!0).forEach((function(t){Object(a.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ec(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Cc(e){var t,n=e.attributes.style,r=e.setAttributes;return Sc(e)?null:Object(l.createElement)(_c,{value:null==n||null===(t=n.typography)||void 0===t?void 0:t.textDecoration,onChange:function(e){r({style:vo(wc(wc({},n),{},{typography:wc(wc({},null==n?void 0:n.typography),{},{textDecoration:e})}))})}})}function Sc(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.name,n=!Object(p.hasBlockSupport)(t,"__experimentalTextDecoration"),r=mo("typography.customTextDecorations");return n||!r}var Bc=Object(l.createElement)(_r.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(l.createElement)(_r.Path,{d:"M6.1 6.8L2.1 18h1.6l1.1-3h4.3l1.1 3h1.6l-4-11.2H6.1zm-.8 6.8L7 8.9l1.7 4.7H5.3zm15.1-.7c-.4-.5-.9-.8-1.6-1 .4-.2.7-.5.8-.9.2-.4.3-.9.3-1.4 0-.9-.3-1.6-.8-2-.6-.5-1.3-.7-2.4-.7h-3.5V18h4.2c1.1 0 2-.3 2.6-.8.6-.6 1-1.4 1-2.4-.1-.8-.3-1.4-.6-1.9zm-5.7-4.7h1.8c.6 0 1.1.1 1.4.4.3.2.5.7.5 1.3 0 .6-.2 1.1-.5 1.3-.3.2-.8.4-1.4.4h-1.8V8.2zm4 8c-.4.3-.9.5-1.5.5h-2.6v-3.8h2.6c1.4 0 2 .6 2 1.9.1.6-.1 1-.5 1.4z"})),Ic=Object(l.createElement)(_r.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(l.createElement)(_r.Path,{d:"M10.8 16.8c-.1-.1-.2-.3-.3-.5v-2.6c0-.9-.1-1.7-.3-2.2-.2-.5-.5-.9-.9-1.1-.4-.3-.9-.4-1.6-.4-.5 0-1 .1-1.5.2s-.9.3-1.2.6l.3 1.2c.4-.3.7-.4 1.1-.5.3-.1.7-.2 1-.2.6 0 1 .1 1.3.4.3.2.4.7.4 1.4-1.2 0-2.3.2-3.3.7s-1.4 1.1-1.4 2.1c0 .7.2 1.2.7 1.6.4.4 1 .6 1.8.6.9 0 1.7-.4 2.4-1.2.1.3.2.5.4.7.1.2.3.3.6.4.3.1.6.1 1.1.1h.1l.2-1.2h-.1c-.5.1-.7 0-.8-.1zM9.1 16c-.2.3-.5.6-.9.8-.4.1-.7.2-1.1.2-.4 0-.7-.1-.9-.3-.2-.2-.3-.5-.3-.9 0-.6.2-1 .7-1.3.5-.3 1.3-.4 2.5-.5v2zm10.5-3.9c-.3-.6-.7-1.1-1.2-1.5-.5-.4-1.2-.6-1.9-.6-.5 0-.9.1-1.4.3-.4.2-.8.5-1.1.8V6h-1.4v12h1.3l.2-1c.2.4.6.6 1 .8.4.2.9.3 1.4.3.7 0 1.2-.2 1.8-.5.5-.4 1-.9 1.3-1.5.3-.6.5-1.3.5-2.1 0-.6-.2-1.3-.5-1.9zm-1.6 4c-.4.5-.9.8-1.6.8s-1.2-.2-1.7-.7c-.5-.5-.7-1.2-.7-2.1 0-.9.2-1.6.7-2.1.4-.5 1-.7 1.7-.7s1.2.3 1.6.8c.4.5.6 1.2.6 2s-.2 1.4-.6 2z"})),xc=Object(l.createElement)(_r.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(l.createElement)(_r.Path,{d:"M7.1 6.8L3.1 18h1.6l1.1-3h4.3l1.1 3h1.6l-4-11.2H7.1zm-.8 6.8L8 8.9l1.7 4.7H6.3zm14.5-1.5c-.3-.6-.7-1.1-1.2-1.5-.6-.4-1.2-.6-1.9-.6-.5 0-.9.1-1.4.3-.4.2-.8.5-1.1.8V6h-1.4v12h1.3l.2-1c.2.4.6.6 1 .8.4.2.9.3 1.4.3.7 0 1.2-.2 1.8-.5.5-.4 1-.9 1.3-1.5.3-.6.5-1.3.5-2.1-.1-.6-.2-1.3-.5-1.9zm-1.7 4c-.4.5-.9.8-1.6.8s-1.2-.2-1.7-.7c-.4-.5-.7-1.2-.7-2.1 0-.9.2-1.6.7-2.1.4-.5 1-.7 1.7-.7s1.2.3 1.6.8c.4.5.6 1.2.6 2 .1.8-.2 1.4-.6 2z"})),Pc=[{name:Object(y.__)("Uppercase"),value:"uppercase",icon:Bc},{name:Object(y.__)("Lowercase"),value:"lowercase",icon:Ic},{name:Object(y.__)("Capitalize"),value:"capitalize",icon:xc}];function Tc(e){var t=e.value,n=e.onChange;return Object(l.createElement)("fieldset",{className:"block-editor-text-transform-control"},Object(l.createElement)("legend",null,Object(y.__)("Letter case")),Object(l.createElement)("div",{className:"block-editor-text-transform-control__buttons"},Pc.map((function(e){return Object(l.createElement)(v.Button,{key:e.value,icon:e.icon,isSmall:!0,isPressed:t===e.value,"aria-label":e.name,onClick:function(){return n(t===e.value?void 0:e.value)}})}))))}function Nc(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Dc(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Nc(Object(n),!0).forEach((function(t){Object(a.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Nc(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Ac(e){var t,n=e.attributes.style,r=e.setAttributes;return Rc(e)?null:Object(l.createElement)(Tc,{value:null==n||null===(t=n.typography)||void 0===t?void 0:t.textTransform,onChange:function(e){r({style:vo(Dc(Dc({},n),{},{typography:Dc(Dc({},null==n?void 0:n.typography),{},{textTransform:e})}))})}})}function Rc(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.name,n=!Object(p.hasBlockSupport)(t,"__experimentalTextTransform"),r=mo("typography.customTextTransforms");return n||!r}function Lc(e){var t=!Sc(e),n=!Rc(e);return t||n?Object(l.createElement)("div",{className:"block-editor-text-decoration-and-transform"},t&&Object(l.createElement)(Cc,e),n&&Object(l.createElement)(Ac,e)):null}var Mc=n(17);function Fc(e){var t=e.value,n=e.onChange,r=function(e){return void 0!==e&&""!==e}(t),o=r?t:"";return Object(l.createElement)("div",{className:"block-editor-line-height-control"},Object(l.createElement)(v.TextControl,{autoComplete:"off",onKeyDown:function(e){e.keyCode!==Mc.ZERO||r||(e.preventDefault(),n("0"))},onChange:function(e){if(r)n(e);else{var t=e;switch(e){case"".concat(.1):t=1.6;break;case"0":t=1.4}n(t)}},label:Object(y.__)("Line height"),placeholder:1.5,step:.1,type:"number",value:o,min:0}))}function Vc(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Hc(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Vc(Object(n),!0).forEach((function(t){Object(a.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Vc(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function zc(e){var t,n=e.attributes.style;return Gc(e)?null:Object(l.createElement)(Fc,{value:null==n||null===(t=n.typography)||void 0===t?void 0:t.lineHeight,onChange:function(t){var r=Hc(Hc({},n),{},{typography:Hc(Hc({},null==n?void 0:n.typography),{},{lineHeight:t})});e.setAttributes({style:vo(r)})}})}function Gc(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.name,n=!mo("typography.customLineHeight");return!Object(p.hasBlockSupport)(t,"lineHeight")||n}var Uc=[{name:Object(y.__)("Regular"),value:"normal"},{name:Object(y.__)("Italic"),value:"italic"}],Wc=[{name:Object(y.__)("Thin"),value:"100"},{name:Object(y.__)("Extra Light"),value:"200"},{name:Object(y.__)("Light"),value:"300"},{name:Object(y.__)("Regular"),value:"400"},{name:Object(y.__)("Medium"),value:"500"},{name:Object(y.__)("Semi Bold"),value:"600"},{name:Object(y.__)("Bold"),value:"700"},{name:Object(y.__)("Extra Bold"),value:"800"},{name:Object(y.__)("Black"),value:"900"}];function Kc(e){var t=e.onChange,n=e.hasFontStyles,r=void 0===n||n,o=e.hasFontWeights,c=void 0===o||o,i=e.value,a=i.fontStyle,s=i.fontWeight,u=r||c,d={key:"default",name:Object(y.__)("Default"),style:{fontStyle:void 0,fontWeight:void 0}},b=Object(l.useMemo)((function(){return r&&c?(e=[d],Uc.forEach((function(t){var n=t.name,r=t.value;Wc.forEach((function(t){var o=t.name,c=t.value,i="normal"===r?o:Object(y.sprintf)(
10
  /* translators: 1: Font weight name. 2: Font style name. */
11
+ Object(y.__)("%1$s %2$s"),o,n);e.push({key:"".concat(r,"-").concat(c),name:i,style:{fontStyle:r,fontWeight:c}})}))})),e):r?function(){var e=[d];return Uc.forEach((function(t){var n=t.name,r=t.value;e.push({key:r,name:n,style:{fontStyle:r,fontWeight:void 0}})})),e}():function(){var e=[d];return Wc.forEach((function(t){var n=t.name,r=t.value;e.push({key:r,name:n,style:{fontStyle:void 0,fontWeight:r}})})),e}();var e}),[e.options]),f=b.find((function(e){return e.style.fontStyle===a&&e.style.fontWeight===s}));return Object(l.createElement)("fieldset",{className:"components-font-appearance-control"},u&&Object(l.createElement)(v.CustomSelectControl,{className:"components-font-appearance-control__select",label:r?c?Object(y.__)("Appearance"):Object(y.__)("Font style"):Object(y.__)("Font weight"),options:b,value:f,onChange:function(e){var n=e.selectedItem;return t(n.style)}}))}function qc(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function $c(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?qc(Object(n),!0).forEach((function(t){Object(a.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):qc(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Yc(e){var t,n,r=e.attributes.style,o=e.setAttributes,c=!Xc(e),i=!Qc(e);if(!c&&!i)return null;var a=null==r||null===(t=r.typography)||void 0===t?void 0:t.fontStyle,s=null==r||null===(n=r.typography)||void 0===n?void 0:n.fontWeight;return Object(l.createElement)(Kc,{onChange:function(e){o({style:vo($c($c({},r),{},{typography:$c($c({},null==r?void 0:r.typography),{},{fontStyle:e.fontStyle,fontWeight:e.fontWeight})}))})},hasFontStyles:c,hasFontWeights:i,value:{fontStyle:a,fontWeight:s}})}function Xc(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.name,n=Object(p.hasBlockSupport)(t,"__experimentalFontStyle"),r=mo("typography.customFontStyle");return!n||!r}function Qc(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.name,n=Object(p.hasBlockSupport)(t,"__experimentalFontWeight"),r=mo("typography.customFontWeight");return!n||!r}function Zc(e){var t=Xc(e),n=Qc(e);return t&&n}function Jc(e){var t=e.value,n=void 0===t?"":t,r=e.onChange,o=e.fontFamilies,c=Object(j.a)(e,["value","onChange","fontFamilies"]),a=mo("typography.fontFamilies");if(o||(o=a),Object(d.isEmpty)(o))return null;var s=[{value:"",label:Object(y.__)("Default")}].concat(Object(k.a)(o.map((function(e){var t=e.fontFamily;return{value:t,label:e.name||t}}))));return Object(l.createElement)(v.SelectControl,Object(i.a)({label:Object(y.__)("Font family"),options:s,value:n,onChange:r,labelPosition:"top"},c))}function ei(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function ti(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ei(Object(n),!0).forEach((function(t){Object(a.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ei(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function ni(e){var t,n=e.name,r=e.setAttributes,o=e.attributes.style,c=void 0===o?{}:o,i=mo("typography.fontFamilies");if(ri({name:n}))return null;var a=function(e,t){var n=/var:preset\|font-family\|(.+)/.exec(t);if(n&&n[1]){var r=Object(d.find)(e,(function(e){return e.slug===n[1]}));if(r)return r.fontFamily}return t}(i,null===(t=c.typography)||void 0===t?void 0:t.fontFamily);return Object(l.createElement)(Jc,{className:"block-editor-hooks-font-family-control",fontFamilies:i,value:a,onChange:function(e){var t=Object(d.find)(i,(function(t){return t.fontFamily===e}));r({style:vo(ti(ti({},c),{},{typography:ti(ti({},c.typography||{}),{},{fontFamily:t?"var:preset|font-family|".concat(t.slug):e||void 0})}))})}})}function ri(e){var t=e.name,n=mo("typography.fontFamilies");return!n||0===n.length||!Object(p.hasBlockSupport)(t,"__experimentalFontFamily")}var oi=n(183),ci=n.n(oi),ii=function(e,t,n){if(t){var r=Object(d.find)(e,{slug:t});if(r)return r}return{size:n}};function ai(e,t){return Object(d.find)(e,{size:t})||{size:t}}function li(e){if(e)return"has-".concat(Object(d.kebabCase)(e),"-font-size")}var si=function(e){var t=mo("typography.fontSizes"),n=!mo("typography.customFontSize");return Object(l.createElement)(v.FontSizePicker,Object(i.a)({},e,{fontSizes:t,disableCustomFontSizes:n}))};function ui(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function di(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ui(Object(n),!0).forEach((function(t){Object(a.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ui(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function bi(e,t,n){if(!Object(p.hasBlockSupport)(t,"fontSize"))return e;var r=new ci.a(e.className);r.add(li(n.fontSize));var o=r.value;return e.className=o||void 0,e}function fi(e){var t,n,r=e.attributes,o=r.fontSize,c=r.style,i=e.setAttributes,a=pi(e),s=mo("typography.fontSizes");if(a)return null;var u=ii(s,o,null==c||null===(t=c.typography)||void 0===t?void 0:t.fontSize),d=(null==u?void 0:u.size)||(null==c||null===(n=c.typography)||void 0===n?void 0:n.fontSize)||o;return Object(l.createElement)(si,{onChange:function(e){var t=ai(s,e).slug;i({style:vo(di(di({},c),{},{typography:di(di({},null==c?void 0:c.typography),{},{fontSize:t?void 0:e})})),fontSize:t})},value:d})}function pi(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.name,n=mo("typography.fontSizes"),r=!(null==n||!n.length);return!Object(p.hasBlockSupport)(t,"fontSize")||!r}var mi=Object(b.createHigherOrderComponent)((function(e){return function(t){var n,r=mo("typography.fontSizes"),o=t.name,c=t.attributes,i=c.fontSize,a=c.style,s=t.wrapperProps,u=di({},t);if(Object(p.hasBlockSupport)(o,"fontSize")&&i&&(null==a||null===(n=a.typography)||void 0===n||!n.fontSize)){var d,b=ii(r,i,null==a||null===(d=a.typography)||void 0===d?void 0:d.fontSize).size;u.wrapperProps=di(di({},s),{},{style:di({fontSize:b},null==s?void 0:s.style)})}return Object(l.createElement)(e,u)}}),"withFontSizeInlineStyles");Object(f.addFilter)("blocks.registerBlockType","core/font/addAttribute",(function(e){return Object(p.hasBlockSupport)(e,"fontSize")?(e.attributes.fontSize||Object.assign(e.attributes,{fontSize:{type:"string"}}),e):e})),Object(f.addFilter)("blocks.getSaveContent.extraProps","core/font/addSaveProps",bi),Object(f.addFilter)("blocks.registerBlockType","core/font/addEditProps",(function(e){if(!Object(p.hasBlockSupport)(e,"fontSize"))return e;var t=e.getEditWrapperProps;return e.getEditWrapperProps=function(n){var r={};return t&&(r=t(n)),bi(r,e,n)},e})),Object(f.addFilter)("editor.BlockListBlock","core/font-size/with-font-size-inline-styles",mi);var vi=["lineHeight","fontSize","__experimentalFontStyle","__experimentalFontWeight","__experimentalFontFamily","__experimentalTextDecoration","__experimentalTextTransform"];function gi(e){var t=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=[Zc(e),pi(e),Gc(e),ri(e),Sc(e),Rc(e)];return t.filter(Boolean).length===t.length}(e),n=Oi(e.name);return t||!n?null:Object(l.createElement)(ro,null,Object(l.createElement)(v.PanelBody,{title:Object(y.__)("Typography")},Object(l.createElement)(v.__unstableComponentSystemProvider,{__unstableNextInclude:["WPComponentsFontSizePicker"]},Object(l.createElement)(ni,e),Object(l.createElement)(fi,e),Object(l.createElement)(Yc,e),Object(l.createElement)(zc,e),Object(l.createElement)(Lc,e))))}var Oi=function(e){return"web"===l.Platform.OS&&vi.some((function(t){return Object(p.hasBlockSupport)(e,t)}))};function hi(e){var t=e.units,n=Object(j.a)(e,["units"]),r=ji(t);return Object(l.createElement)(v.__experimentalUnitControl,Object(i.a)({units:r},n))}function ji(e){var t=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return t.filter((function(t){return e.includes(t.value)}))}(mo("spacing.units")||[],e);return 0!==t.length&&t}function ki(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function yi(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ki(Object(n),!0).forEach((function(t){Object(a.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ki(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function _i(e){var t,n=e.name,r=e.attributes.style,o=e.setAttributes,c=ji();return function(e){var t=Object(p.getBlockSupport)(e,"spacing");return t&&!1!==t.padding}(n)?l.Platform.select({web:Object(l.createElement)(l.Fragment,null,Object(l.createElement)(v.__experimentalBoxControl,{values:null==r||null===(t=r.spacing)||void 0===t?void 0:t.padding,onChange:function(e){var t=yi(yi({},r),{},{spacing:{padding:e}});o({style:vo(t)})},onChangeShowVisualizer:function(e){var t=yi(yi({},r),{},{visualizers:{padding:e}});o({style:vo(t)})},label:Object(y.__)("Padding"),units:c})),native:null}):null}function Ei(e){var t=e.children,n=Object(j.a)(e,["children"]);return mo("spacing.customPadding")?Object(l.createElement)(ro,n,Object(l.createElement)(v.PanelBody,{title:Object(y.__)("Spacing")},t)):null}function wi(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Ci(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?wi(Object(n),!0).forEach((function(t){Object(a.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):wi(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Si=[].concat(Object(k.a)(vi),[yo,"color","spacing"]),Bi=function(e){return Si.some((function(t){return Object(p.hasBlockSupport)(e,t)}))};function Ii(e){if(Object(d.startsWith)(e,"var:")){var t=e.slice("var:".length).split("|").join("--");return"var(--wp--".concat(t,")")}return e}function xi(e,t,n){if(!Bi(t))return e;var r=n.style;return e.style=Ci(Ci({},function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t={};return Object.keys(p.__EXPERIMENTAL_STYLE_PROPERTY).forEach((function(n){var r=p.__EXPERIMENTAL_STYLE_PROPERTY[n].value,o=p.__EXPERIMENTAL_STYLE_PROPERTY[n].properties;Object(d.has)(e,r)&&(o?o.forEach((function(o){t[n+Object(d.capitalize)(o)]=Ii(Object(d.get)(e,[].concat(Object(k.a)(r),[o])))})):t[n]=Ii(Object(d.get)(e,r)))})),t}(r)),e.style),e}var Pi=Object(b.createHigherOrderComponent)((function(e){return function(t){var n=t.name,r=Object(p.hasBlockSupport)(n,"spacing");return[Object(l.createElement)(gi,Object(i.a)({key:"typography"},t)),Object(l.createElement)(_o,Object(i.a)({key:"border"},t)),Object(l.createElement)(Oc,Object(i.a)({key:"colors"},t)),Object(l.createElement)(e,Object(i.a)({key:"edit"},t)),r&&Object(l.createElement)(Ei,{key:"spacing"},Object(l.createElement)(_i,t))]}}),"withToolbarControls");Object(f.addFilter)("blocks.registerBlockType","core/style/addAttribute",(function(e){return Bi(e)?(e.attributes.style||Object.assign(e.attributes,{style:{type:"object"}}),e):e})),Object(f.addFilter)("blocks.getSaveContent.extraProps","core/style/addSaveProps",xi),Object(f.addFilter)("blocks.registerBlockType","core/style/addEditProps",(function(e){if(!Bi(e))return e;var t=e.getEditWrapperProps;return e.getEditWrapperProps=function(n){var r={};return t&&(r=t(n)),xi(r,e,n)},e})),Object(f.addFilter)("editor.BlockEdit","core/style/with-block-controls",Pi);var Ti=n(28),Ni=n(29),Di=n(19),Ai=n(32),Ri=n(33),Li=n(22);function Mi(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Fi(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Mi(Object(n),!0).forEach((function(t){Object(a.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Mi(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Vi=[],Hi=function(e){return Object(b.createHigherOrderComponent)((function(t){return function(n){return Object(l.createElement)(t,Object(i.a)({},n,{colors:e}))}}),"withCustomColorPalette")},zi=function(){return Object(b.createHigherOrderComponent)((function(e){return function(t){var n=mo("color.palette")||Vi;return Object(l.createElement)(e,Object(i.a)({},t,{colors:n}))}}),"withEditorColorPalette")};function Gi(e,t){var n=Object(d.reduce)(e,(function(e,t){return Fi(Fi({},e),Object(d.isString)(t)?Object(a.a)({},t,Object(d.kebabCase)(t)):t)}),{});return Object(b.compose)([t,function(e){return function(t){Object(Ai.a)(i,t);var r,o,c=(r=i,o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=Object(Li.a)(r);if(o){var n=Object(Li.a)(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return Object(Ri.a)(this,e)});function i(e){var t;return Object(Ti.a)(this,i),(t=c.call(this,e)).setters=t.createSetters(),t.colorUtils={getMostReadableColor:t.getMostReadableColor.bind(Object(Di.a)(t))},t.state={},t}return Object(Ni.a)(i,[{key:"getMostReadableColor",value:function(e){return function(e,t){return Co.a.mostReadable(t,Object(d.map)(e,"color")).toHexString()}(this.props.colors,e)}},{key:"createSetters",value:function(){var e=this;return Object(d.reduce)(n,(function(t,n,r){var o=Object(d.upperFirst)(r),c="custom".concat(o);return t["set".concat(o)]=e.createSetColor(r,c),t}),{})}},{key:"createSetColor",value:function(e,t){var n=this;return function(r){var o,c=Bo(n.props.colors,r);n.props.setAttributes((o={},Object(a.a)(o,e,c&&c.slug?c.slug:void 0),Object(a.a)(o,t,c&&c.slug?void 0:r),o))}}},{key:"render",value:function(){return Object(l.createElement)(e,Fi(Fi(Fi(Fi({},this.props),{},{colors:void 0},this.state),this.setters),{},{colorUtils:this.colorUtils}))}}],[{key:"getDerivedStateFromProps",value:function(e,t){var r=e.attributes,o=e.colors;return Object(d.reduce)(n,(function(e,n,c){var i=So(o,r[c],r["custom".concat(Object(d.upperFirst)(c))]),a=t[c];return(null==a?void 0:a.color)===i.color&&a?e[c]=a:e[c]=Fi(Fi({},i),{},{class:Io(n,i.slug)}),e}),{})}}]),i}(l.Component)}])}function Ui(e){return function(){for(var t=Hi(e),n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return Object(b.createHigherOrderComponent)(Gi(r,t),"withCustomColors")}}function Wi(){for(var e=zi(),t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return Object(b.createHigherOrderComponent)(Gi(n,e),"withColors")}var Ki=n(76),qi=n.n(Ki);function $i(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Yi(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?$i(Object(n),!0).forEach((function(t){Object(a.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):$i(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Xi=function(e){var t=e.colorSettings,n=Object(j.a)(e,["colorSettings"]),r=t.map((function(e){var t=e.value,n=e.onChange;return Yi(Yi({},Object(j.a)(e,["value","onChange"])),{},{colorValue:t,onColorChange:n})}));return Object(l.createElement)(ec,Object(i.a)({settings:r,gradients:[],disableCustomGradients:!0},n))},Qi=function(e,t,n){return"function"==typeof e?e(t):!0===e?n:e};function Zi(e){var t=e.title,n=e.colorSettings,r=e.colorPanelProps,o=e.contrastCheckers,c=e.detectedBackgroundColor,a=e.detectedColor,s=e.panelChildren,u=e.initialOpen;return Object(l.createElement)(Xi,Object(i.a)({title:t,initialOpen:u,colorSettings:Object.values(n)},r),o&&(Array.isArray(o)?o.map((function(e){var t=e.backgroundColor,r=e.textColor,o=Object(j.a)(e,["backgroundColor","textColor"]);return t=Qi(t,n,c),r=Qi(r,n,a),Object(l.createElement)(nc,Object(i.a)({key:"".concat(t,"-").concat(r),backgroundColor:t,textColor:r},o))})):Object(d.map)(n,(function(e){var t=e.value,r=o.backgroundColor,s=o.textColor;return r=Qi(r||t,n,c),s=Qi(s||t,n,a),Object(l.createElement)(nc,Object(i.a)({},o,{key:"".concat(r,"-").concat(s),backgroundColor:r,textColor:s}))}))),"function"==typeof s?s(n):s)}function Ji(e,t){var n;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return ea(e,void 0);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?ea(e,void 0):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var c,i=!0,a=!1;return{s:function(){n=e[Symbol.iterator]()},n:function(){var e=n.next();return i=e.done,e},e:function(e){a=!0,c=e},f:function(){try{i||null==n.return||n.return()}finally{if(a)throw c}}}}function ea(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function ta(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function na(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ta(Object(n),!0).forEach((function(t){Object(a.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ta(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function ra(e){return e.ownerDocument.defaultView.getComputedStyle(e)}var oa=[],ca={textColor:Object(y.__)("Text Color"),backgroundColor:Object(y.__)("Background Color")},ia=function(e){return Object(l.createElement)(ro,null,Object(l.createElement)(Zi,e))};function aa(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{panelTitle:Object(y.__)("Color settings")},n=t.panelTitle,r=void 0===n?Object(y.__)("Color settings"):n,o=t.colorPanelProps,c=t.contrastCheckers,i=t.panelChildren,s=t.colorDetector,b=(s=void 0===s?{}:s).targetRef,f=s.backgroundColorTargetRef,p=void 0===f?b:f,v=s.textColorTargetRef,g=void 0===v?b:v,O=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],j=h(),_=j.clientId,E=mo("color.palette")||oa,w=Object(m.useSelect)((function(e){return{attributes:(0,e(vr).getBlockAttributes)(_)}}),[_]),C=w.attributes,S=Object(m.useDispatch)(vr),B=S.updateBlockAttributes,I=Object(l.useCallback)((function(e){return B(_,e)}),[B,_]),x=Object(l.useMemo)((function(){return qi()((function(e,t,n,r,o,c){return function(i){var s,b=i.children,f=i.className,p=void 0===f?"":f,m=i.style,v=void 0===m?{}:m,g={};r?g=Object(a.a)({},t,o):c&&(g=Object(a.a)({},t,c));var O={className:u()(p,(s={},Object(a.a)(s,"has-".concat(Object(d.kebabCase)(r),"-").concat(Object(d.kebabCase)(t)),r),Object(a.a)(s,n||"has-".concat(Object(d.kebabCase)(e)),r||c),s)),style:na(na({},g),v)};return Object(d.isFunction)(b)?b(O):l.Children.map(b,(function(e){return Object(l.cloneElement)(e,{className:u()(e.props.className,O.className),style:na(na({},O.style),e.props.style||{})})}))}}),{maxSize:e.length})}),[e.length]),P=Object(l.useMemo)((function(){return qi()((function(e,t){return function(n){var r=t.find((function(e){return e.color===n}));I(Object(a.a)({},r?Object(d.camelCase)("custom ".concat(e)):e,void 0)),I(Object(a.a)({},r?e:Object(d.camelCase)("custom ".concat(e)),r?r.slug:n))}}),{maxSize:e.length})}),[I,e.length]),T=Object(l.useState)(),N=Object(Ro.a)(T,2),D=N[0],A=N[1],R=Object(l.useState)(),L=Object(Ro.a)(R,2),M=L[0],F=L[1];return Object(l.useEffect)((function(){if(c){var e,t=!1,n=!1,r=Ji(Object(d.castArray)(c));try{for(r.s();!(e=r.n()).done;){var o=e.value,i=o.backgroundColor,a=o.textColor;if(t||(t=!0===i),n||(n=!0===a),t&&n)break}}catch(e){r.e(e)}finally{r.f()}if(n&&F(ra(g.current).color),t){for(var l=p.current,s=ra(l).backgroundColor;"rgba(0, 0, 0, 0)"===s&&l.parentNode&&l.parentNode.nodeType===l.parentNode.ELEMENT_NODE;)s=ra(l=l.parentNode).backgroundColor;A(s)}}}),[e.reduce((function(e,t){return"".concat(e," | ").concat(C[t.name]," | ").concat(C[Object(d.camelCase)("custom ".concat(t.name))])}),"")].concat(Object(k.a)(O))),Object(l.useMemo)((function(){var t={},n=e.reduce((function(e,n){"string"==typeof n&&(n={name:n});var r=na(na({},n),{},{color:C[n.name]}),o=r.name,c=r.property,i=void 0===c?o:c,a=r.className,l=r.panelLabel,s=void 0===l?n.label||ca[o]||Object(d.startCase)(o):l,u=r.componentName,b=void 0===u?Object(d.startCase)(o).replace(/\s/g,""):u,f=r.color,p=void 0===f?n.color:f,m=r.colors,v=void 0===m?E:m,g=C[Object(d.camelCase)("custom ".concat(o))],O=g?void 0:v.find((function(e){return e.slug===p}));return e[b]=x(o,i,a,p,O&&O.color,g),e[b].displayName=b,e[b].color=g||O&&O.color,e[b].slug=p,e[b].setColor=P(o,v),t[b]={value:O?O.color:C[Object(d.camelCase)("custom ".concat(o))],onChange:e[b].setColor,label:s,colors:v},v||delete t[b].colors,e}),{}),a={title:r,initialOpen:!1,colorSettings:t,colorPanelProps:o,contrastCheckers:c,detectedBackgroundColor:D,detectedColor:M,panelChildren:i};return na(na({},n),{},{ColorPanel:Object(l.createElement)(Zi,a),InspectorControlsColorPanel:Object(l.createElement)(ia,a)})}),[C,I,M,D].concat(Object(k.a)(O)))}function la(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function sa(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?la(Object(n),!0).forEach((function(t){Object(a.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):la(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function ua(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Object(Li.a)(e);if(t){var o=Object(Li.a)(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Object(Ri.a)(this,n)}}var da=[],ba=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var r=Object(d.reduce)(t,(function(e,t){return e[t]="custom".concat(Object(d.upperFirst)(t)),e}),{});return Object(b.createHigherOrderComponent)(Object(b.compose)([Object(b.createHigherOrderComponent)((function(e){return function(t){var n=mo("typography.fontSizes")||da;return Object(l.createElement)(e,Object(i.a)({},t,{fontSizes:n}))}}),"withFontSizes"),function(e){return function(t){Object(Ai.a)(o,t);var n=ua(o);function o(e){var t;return Object(Ti.a)(this,o),(t=n.call(this,e)).setters=t.createSetters(),t.state={},t}return Object(Ni.a)(o,[{key:"createSetters",value:function(){var e=this;return Object(d.reduce)(r,(function(t,n,r){var o=Object(d.upperFirst)(r);return t["set".concat(o)]=e.createSetFontSize(r,n),t}),{})}},{key:"createSetFontSize",value:function(e,t){var n=this;return function(r){var o,c=Object(d.find)(n.props.fontSizes,{size:Number(r)});n.props.setAttributes((o={},Object(a.a)(o,e,c&&c.slug?c.slug:void 0),Object(a.a)(o,t,c&&c.slug?void 0:r),o))}}},{key:"render",value:function(){return Object(l.createElement)(e,sa(sa(sa({},this.props),{},{fontSizes:void 0},this.state),this.setters))}}],[{key:"getDerivedStateFromProps",value:function(e,t){var n=e.attributes,o=e.fontSizes,c=function(e,r){return!t[r]||(n[r]?n[r]!==t[r].slug:t[r].size!==n[e])};if(!Object(d.some)(r,c))return null;var i=Object(d.reduce)(Object(d.pickBy)(r,c),(function(e,t,r){var c=n[r],i=ii(o,c,n[t]);return e[r]=sa(sa({},i),{},{class:li(c)}),e}),{});return sa(sa({},t),i)}}]),o}(l.Component)}]),"withFontSizes")},fa=n(386),pa=n(387),ma=n(388);function va(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function ga(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?va(Object(n),!0).forEach((function(t){Object(a.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):va(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Oa=[{icon:fa.a,title:Object(y.__)("Align text left"),align:"left"},{icon:pa.a,title:Object(y.__)("Align text center"),align:"center"},{icon:ma.a,title:Object(y.__)("Align text right"),align:"right"}],ha={position:"bottom right",isAlternate:!0},ja=function(e){var t=e.value,n=e.onChange,r=e.alignmentControls,o=void 0===r?Oa:r,c=e.label,i=void 0===c?Object(y.__)("Align"):c,a=e.describedBy,s=void 0===a?Object(y.__)("Change text alignment"):a,u=e.isCollapsed,b=void 0===u||u;function f(e){return function(){return n(t===e?void 0:e)}}var p=Object(d.find)(o,(function(e){return e.align===t}));return Object(l.createElement)(v.ToolbarGroup,{isCollapsed:b,icon:p?p.icon:Object(y.isRTL)()?ma.a:fa.a,label:i,toggleProps:{describedBy:s},popoverProps:ha,controls:o.map((function(e){var n=e.align,r=t===n;return ga(ga({},e),{},{isActive:r,role:b?"menuitemradio":void 0,onClick:f(n)})}))})},ka=function(e){return e.name||""},ya=function(e){return e.title},_a=function(e){return e.description||""},Ea=function(e){return e.keywords||[]},wa=function(e){return e.category},Ca=function(){return null};function Sa(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return(e=(e=Object(d.deburr)(e)).replace(/^\//,"")).toLowerCase()}var Ba=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return Object(d.words)(Sa(e))},Ia=function(e,t){return Object(d.differenceWith)(e,Ba(t),(function(e,t){return t.includes(e)}))},xa=function(e,t,n,r){return 0===Ba(r).length?e:Pa(e,r,{getCategory:function(e){var n;return null===(n=Object(d.find)(t,{slug:e.category}))||void 0===n?void 0:n.title},getCollection:function(e){var t;return null===(t=n[e.name.split("/")[0]])||void 0===t?void 0:t.title}})},Pa=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=Ba(t);if(0===r.length)return e;var o=e.map((function(e){return[e,Ta(e,t,n)]})).filter((function(e){return Object(Ro.a)(e,2)[1]>0}));return o.sort((function(e,t){var n=Object(Ro.a)(e,2)[1];return Object(Ro.a)(t,2)[1]-n})),o.map((function(e){return Object(Ro.a)(e,1)[0]}))};function Ta(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=n.getName,o=void 0===r?ka:r,c=n.getTitle,i=void 0===c?ya:c,a=n.getDescription,l=void 0===a?_a:a,s=n.getKeywords,u=void 0===s?Ea:s,b=n.getCategory,f=void 0===b?wa:b,p=n.getCollection,m=void 0===p?Ca:p,v=o(e),g=i(e),O=l(e),h=u(e),j=f(e),y=m(e),_=Sa(t),E=Sa(g),w=0;if(_===E)w+=30;else if(E.startsWith(_))w+=20;else{var C=[v,g,O].concat(Object(k.a)(h),[j,y]).join(" "),S=Object(d.words)(_),B=Ia(S,C);0===B.length&&(w+=10)}return 0!==w&&v.startsWith("core/")&&w++,w}var Na=function(e,t){var n=Object(m.useSelect)((function(t){var n=t(vr).getInserterItems,r=t(p.store),o=r.getCategories,c=r.getCollections;return{categories:o(),collections:c(),items:n(e)}}),[e]),r=n.categories,o=n.collections;return[n.items,r,o,Object(l.useCallback)((function(e,n){var r=e.name,o=e.initialAttributes,c=e.innerBlocks,i=Object(p.createBlock)(r,o,Object(p.createBlocksFromInnerBlocksTemplate)(c));t(i,void 0,n)}),[t])]},Da=n(194);function Aa(e){var t,n=e.icon,r=e.showColors,o=void 0!==r&&r,c=e.className;"block-default"===(null===(t=n)||void 0===t?void 0:t.src)&&(n={src:Da.a});var i=Object(l.createElement)(v.Icon,{icon:n&&n.src?n.src:n}),a=o?{backgroundColor:n&&n.background,color:n&&n.foreground}:{};return Object(l.createElement)("span",{style:a,className:u()("block-editor-block-icon",c,{"has-colors":o})},i)}var Ra={name:"blocks",className:"block-editor-autocompleters__block",triggerPrefix:"/",useItems:function(e){var t=Object(m.useSelect)((function(e){var t=e(vr),n=t.getSelectedBlockClientId,r=t.getBlockName,o=t.getBlockInsertionPoint,c=n();return{selectedBlockName:c?r(c):null,rootClientId:o().rootClientId}}),[]),n=t.rootClientId,r=t.selectedBlockName,o=Na(n,d.noop),c=Object(Ro.a)(o,3),i=c[0],a=c[1],s=c[2],u=Object(l.useMemo)((function(){return(e.trim()?xa(i,a,s,e):Object(d.orderBy)(i,["frecency"],["desc"])).filter((function(e){return e.name!==r})).slice(0,9)}),[e,r,i,a,s]);return[Object(l.useMemo)((function(){return u.map((function(e){var t=e.title,n=e.icon,r=e.isDisabled;return{key:"block-".concat(e.id),value:e,label:Object(l.createElement)(l.Fragment,null,Object(l.createElement)(Aa,{key:"icon",icon:n,showColors:!0}),t),isDisabled:r}}))}),[u])]},allowContext:function(e,t){return!(/\S/.test(e)||/\S/.test(t))},getOptionCompletion:function(e){var t=e.name,n=e.initialAttributes,r=e.innerBlocks;return{action:"replace",value:Object(p.createBlock)(t,n,Object(p.createBlocksFromInnerBlocksTemplate)(r))}}},La=[],Ma=function(e){var t=h().name,n=e.completers,r=void 0===n?La:n;return r=Object(l.useMemo)((function(){var e=r;return t===Object(p.getDefaultBlockName)()&&(e=e.concat([Ra])),Object(f.hasFilter)("editor.Autocomplete.completers")&&(e===r&&(e=e.map(d.clone)),e=Object(f.applyFilters)("editor.Autocomplete.completers",e,t)),e}),[r,t]),Object(l.createElement)(v.Autocomplete,Object(i.a)({},e,{completers:r}))},Fa=Object(l.createElement)(_r.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(l.createElement)(_r.Path,{d:"M4.2 9h1.5V5.8H9V4.2H4.2V9zm14 9.2H15v1.5h4.8V15h-1.5v3.2zM15 4.2v1.5h3.2V9h1.5V4.2H15zM5.8 15H4.2v4.8H9v-1.5H5.8V15z"})),Va=function(e){var t=e.isActive,n=e.label,r=void 0===n?Object(y.__)("Toggle full height"):n,o=e.onToggle,c=e.isDisabled;return Object(l.createElement)(v.ToolbarGroup,null,Object(l.createElement)(v.ToolbarButton,{isActive:t,icon:Fa,label:r,onClick:function(){return o(!t)},disabled:c}))},Ha=function(e){var t=e.label,n=void 0===t?Object(y.__)("Change matrix alignment"):t,r=e.onChange,o=void 0===r?d.noop:r,c=e.value,i=void 0===c?"center":c,a=e.isDisabled,s=Object(l.createElement)(v.__experimentalAlignmentMatrixControl.Icon,{value:i}),u="block-editor-block-alignment-matrix-toolbar",b="".concat(u,"__popover");return Object(l.createElement)(v.Dropdown,{position:"bottom right",className:u,popoverProps:{className:b,isAlternate:!0},renderToggle:function(e){var t=e.onToggle,r=e.isOpen;return Object(l.createElement)(v.ToolbarGroup,null,Object(l.createElement)(v.ToolbarButton,{onClick:t,"aria-haspopup":"true","aria-expanded":r,onKeyDown:function(e){r||e.keyCode!==Mc.DOWN||(e.preventDefault(),e.stopPropagation(),t())},label:n,icon:s,showTooltip:!0,disabled:a}))},renderContent:function(){return Object(l.createElement)(v.__experimentalAlignmentMatrixControl,{hasFocusBorder:!1,onChange:o,value:i})}})};function za(e){return Object(m.useSelect)((function(t){if(!e)return null;var n=t(vr),r=n.getBlockName,o=n.getBlockAttributes,c=t(p.store),i=c.getBlockType,a=c.getBlockVariations,l=r(e),s=i(l);if(!s)return null;var u=a(l),d={title:s.title,icon:s.icon,description:s.description};if(null==u||!u.length)return d;var b=o(e),f=u.find((function(e){var t;return null===(t=e.isActive)||void 0===t?void 0:t.call(e,b,e.attributes)}));return f?{title:f.title||s.title,icon:f.icon||s.icon,description:f.description||s.description}:d}),[e])}function Ga(e){var t=e.clientId,n=Object(m.useSelect)((function(e){if(!t)return{};var n=e(vr),r=n.getBlockName,o=n.getBlockAttributes,c=n.__experimentalGetReusableBlockTitle,i=r(t);if(!i)return{};var a=Object(p.isReusableBlock)(Object(p.getBlockType)(i));return{attributes:o(t),name:i,reusableBlockTitle:a&&c(o(t).ref)}}),[t]),r=n.attributes,o=n.name,c=n.reusableBlockTitle,i=za(t);if(!o||!i)return null;var a=Object(p.getBlockType)(o),l=c||Object(p.__experimentalGetBlockLabel)(a,r);return l!==a.title?Object(d.truncate)(l,{length:35}):i.title}var Ua=function(){var e=Object(m.useDispatch)(vr),t=e.selectBlock,n=e.clearSelectedBlock,r=Object(m.useSelect)((function(e){var t=e(vr),n=t.getSelectionStart,r=t.getSelectedBlockClientId,o=t.getBlockParents,c=r();return{parents:o(c),clientId:c,hasSelection:!!n().clientId}}),[]),o=r.clientId,c=r.parents,i=r.hasSelection;return Object(l.createElement)("ul",{className:"block-editor-block-breadcrumb",role:"list","aria-label":Object(y.__)("Block breadcrumb")},Object(l.createElement)("li",{className:i?void 0:"block-editor-block-breadcrumb__current","aria-current":i?void 0:"true"},i&&Object(l.createElement)(v.Button,{className:"block-editor-block-breadcrumb__button",isTertiary:!0,onClick:n},Object(y.__)("Document")),!i&&Object(y.__)("Document")),c.map((function(e){return Object(l.createElement)("li",{key:e},Object(l.createElement)(v.Button,{className:"block-editor-block-breadcrumb__button",isTertiary:!0,onClick:function(){return t(e)}},Object(l.createElement)(Ga,{clientId:e})))})),!!o&&Object(l.createElement)("li",{className:"block-editor-block-breadcrumb__current","aria-current":"true"},Object(l.createElement)(Ga,{clientId:o})))};function Wa(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Ka(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Wa(Object(n),!0).forEach((function(t){Object(a.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Wa(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var qa=Object(l.createContext)({});function $a(e){var t=e.value,n=e.children,r=Object(l.useContext)(qa),o=Object(l.useMemo)((function(){return Ka(Ka({},r),t)}),[r,t]);return Object(l.createElement)(qa.Provider,{value:o,children:n})}var Ya=qa,Xa=function(){return Object(l.createElement)(v.SVG,{xmlns:"https://www.w3.org/2000/svg",viewBox:"0 0 20 20"},Object(l.createElement)(v.Path,{d:"M7.434 5l3.18 9.16H8.538l-.692-2.184H4.628l-.705 2.184H2L5.18 5h2.254zm-1.13 1.904h-.115l-1.148 3.593H7.44L6.304 6.904zM14.348 7.006c1.853 0 2.9.876 2.9 2.374v4.78h-1.79v-.914h-.114c-.362.64-1.123 1.022-2.031 1.022-1.346 0-2.292-.826-2.292-2.108 0-1.27.972-2.006 2.71-2.107l1.696-.102V9.38c0-.584-.42-.914-1.18-.914-.667 0-1.112.228-1.264.647h-1.701c.12-1.295 1.307-2.107 3.066-2.107zm1.079 4.1l-1.416.09c-.793.056-1.18.342-1.18.844 0 .52.45.837 1.091.837.857 0 1.505-.545 1.505-1.256v-.515z"}))},Qa=function(e){var t=e.style,n=e.className;return Object(l.createElement)("div",{className:"block-library-colors-selector__icon-container"},Object(l.createElement)("div",{className:"".concat(n," block-library-colors-selector__state-selection"),style:t},Object(l.createElement)(Xa,null)))},Za=function(e){var t,n,r,o=e.children,c=Object(j.a)(e,["children"]);return Object(l.createElement)(v.Dropdown,{position:"bottom right",className:"block-library-colors-selector",contentClassName:"block-library-colors-selector__popover",renderToggle:(t=c,n=t.TextColor,r=t.BackgroundColor,function(e){var t=e.onToggle,o=e.isOpen;return Object(l.createElement)(v.ToolbarGroup,null,Object(l.createElement)(v.ToolbarButton,{className:"components-toolbar__control block-library-colors-selector__toggle",label:Object(y.__)("Open Colors Selector"),onClick:t,onKeyDown:function(e){o||e.keyCode!==Mc.DOWN||(e.preventDefault(),e.stopPropagation(),t())},icon:Object(l.createElement)(r,null,Object(l.createElement)(n,null,Object(l.createElement)(Qa,null)))}))}),renderContent:function(){return o}})},Ja={},el=Object(v.withFilters)("editor.BlockEdit")((function(e){var t=e.attributes,n=void 0===t?{}:t,r=e.name,o=Object(p.getBlockType)(r),c=Object(l.useContext)(Ya),a=Object(l.useMemo)((function(){return o&&o.usesContext?Object(d.pick)(c,o.usesContext):Ja}),[o,c]);if(!o)return null;var s=o.edit||o.save;if(o.apiVersion>1||Object(p.hasBlockSupport)(o,"lightBlockWrapper",!1))return Object(l.createElement)(s,Object(i.a)({},e,{context:a}));var b=Object(p.hasBlockSupport)(o,"className",!0)?Object(p.getBlockDefaultClassName)(r):null,f=u()(b,n.className);return Object(l.createElement)(s,Object(i.a)({},e,{context:a,className:f}))}));function tl(e){var t={name:e.name,isSelected:e.isSelected,clientId:e.clientId,onFocus:e.onFocus,onCaretVerticalPositionChange:e.onCaretVerticalPositionChange};return Object(l.createElement)(O,{value:Object(l.useMemo)((function(){return t}),Object.values(t))},Object(l.createElement)(el,e))}var nl=Object(v.createSlotFill)("BlockFormatControls"),rl=nl.Fill,ol=nl.Slot,cl=function(e){return h().isSelected?Object(l.createElement)(rl,null,(function(t){var n=Object(d.isEmpty)(t)?null:t;return Object(l.createElement)(v.__experimentalToolbarContext.Provider,{value:n},e.children)})):null};cl.Slot=function(e){var t=Object(l.useContext)(v.__experimentalToolbarContext);return Object(l.createElement)(ol,Object(i.a)({},e,{fillProps:t}))};var il=cl,al=n(46),ll=n(45),sl=n(270),ul=n(134),dl=n(34),bl=function(e){return e+1},fl=function(e){return{top:e.offsetTop,left:e.offsetLeft}},pl=function(e){var t=e.isSelected,n=e.adjustScrolling,r=e.enableAnimation,o=e.triggerAnimationOnChange,c=Object(l.useRef)(),i=Object(b.useReducedMotion)()||!r,a=Object(l.useReducer)(bl,0),s=Object(Ro.a)(a,2),u=s[0],d=s[1],f=Object(l.useReducer)(bl,0),p=Object(Ro.a)(f,2),m=p[0],v=p[1],g=Object(l.useState)({x:0,y:0}),O=Object(Ro.a)(g,2),h=O[0],j=O[1],k=Object(l.useMemo)((function(){return c.current?fl(c.current):null}),[o]),y=Object(l.useMemo)((function(){if(!n||!c.current)return function(){};var e=Object(dl.getScrollContainer)(c.current);if(!e)return function(){};var t=c.current.getBoundingClientRect();return function(){var n=c.current.getBoundingClientRect().top-t.top;n&&(e.scrollTop+=n)}}),[o,n]);function _(e){var n=e.x,r=e.y;n=Math.round(n),r=Math.round(r),n===_.x&&r===_.y||(function(e){var n=e.x,r=e.y;if(c.current){var o=0===n&&0===r;c.current.style.transformOrigin=o?"":"center",c.current.style.transform=o?"":"translate3d(".concat(n,"px,").concat(r,"px,0)"),c.current.style.zIndex=!t||o?"":"1",y()}}({x:n,y:r}),_.x=n,_.y=r)}return Object(l.useLayoutEffect)((function(){u&&v()}),[u]),Object(l.useLayoutEffect)((function(){if(k)if(i)y();else{c.current.style.transform="";var e=fl(c.current);d(),j({x:Math.round(k.left-e.left),y:Math.round(k.top-e.top)})}}),[o]),_.x=0,_.y=0,Object(ul.useSpring)({from:{x:h.x,y:h.y},to:{x:0,y:0},reset:u!==m,config:{mass:5,tension:2e3,friction:200},immediate:i,onFrame:_}),c},ml=Object(ul.animated)(v.__experimentalTreeGridRow);function vl(e){var t=e.isSelected,n=e.position,r=e.level,o=e.rowCount,c=e.children,a=e.className,s=e.path,d=Object(j.a)(e,["isSelected","position","level","rowCount","children","className","path"]),b=pl({isSelected:t,adjustScrolling:!1,enableAnimation:!0,triggerAnimationOnChange:s.join("_")});return Object(l.createElement)(ml,Object(i.a)({ref:b,className:u()("block-editor-block-navigation-leaf",a),level:r,positionInSet:n,setSize:o},d),c)}var gl=n(267),Ol=n(268),hl=n(269),jl=n(226);var kl=function(e,t){return"up"===e?"horizontal"===t?Object(y.isRTL)()?gl.a:Ol.a:hl.a:"down"===e?"horizontal"===t?Object(y.isRTL)()?Ol.a:gl.a:jl.a:null},yl=function(e,t){return"up"===e?"horizontal"===t?Object(y.isRTL)()?Object(y.__)("Move right"):Object(y.__)("Move left"):Object(y.__)("Move up"):"down"===e?"horizontal"===t?Object(y.isRTL)()?Object(y.__)("Move left"):Object(y.__)("Move right"):Object(y.__)("Move down"):null},_l=Object(l.forwardRef)((function(e,t){var n=e.clientIds,r=e.direction,o=e.orientation,c=Object(j.a)(e,["clientIds","direction","orientation"]),a=Object(b.useInstanceId)(_l),s=Object(d.castArray)(n).length,f=Object(m.useSelect)((function(e){var t=e(vr),c=t.getBlockIndex,i=t.getBlockRootClientId,a=t.getBlockOrder,l=t.getBlock,s=t.getBlockListSettings,u=Object(d.castArray)(n),b=Object(d.first)(u),f=i(b),m=c(b,f),v=c(Object(d.last)(u),f),g=a(f),O=l(b),h=0===m,j=v===g.length-1,k=(s(f)||{}).orientation;return{blockType:O?Object(p.getBlockType)(O.name):null,isDisabled:"up"===r?h:j,rootClientId:f,firstIndex:m,isFirst:h,isLast:j,orientation:o||k}}),[n,r]),g=f.blockType,O=f.isDisabled,h=f.rootClientId,k=f.isFirst,_=f.isLast,E=f.firstIndex,w=f.orientation,C=void 0===w?"vertical":w,S=Object(m.useDispatch)(vr),B=S.moveBlocksDown,I=S.moveBlocksUp,x="up"===r?I:B,P="block-editor-block-mover-button__description-".concat(a);return Object(l.createElement)(l.Fragment,null,Object(l.createElement)(v.Button,Object(i.a)({ref:t,className:u()("block-editor-block-mover-button","is-".concat(r,"-button")),icon:kl(r,C),label:yl(r,C),"aria-describedby":P},c,{onClick:O?null:function(e){x(n,h),c.onClick&&c.onClick(e)},"aria-disabled":O})),Object(l.createElement)("span",{id:P,className:"block-editor-block-mover-button__description"},function(e,t,n,r,o,c,i){var a=n+1,l=function(e){return"up"===e?"horizontal"===i?Object(y.isRTL)()?"right":"left":"up":"down"===e?"horizontal"===i?Object(y.isRTL)()?"left":"right":"down":null};if(e>1)return function(e,t,n,r,o){var c=t+1;return o<0&&n?Object(y.__)("Blocks cannot be moved up as they are already at the top"):o>0&&r?Object(y.__)("Blocks cannot be moved down as they are already at the bottom"):o<0&&!n?Object(y.sprintf)(// translators: 1: Number of selected blocks, 2: Position of selected blocks
12
  Object(y._n)("Move %1$d block from position %2$d up by one place","Move %1$d blocks from position %2$d up by one place",e),e,c):o>0&&!r?Object(y.sprintf)(// translators: 1: Number of selected blocks, 2: Position of selected blocks
13
  Object(y._n)("Move %1$d block from position %2$d down by one place","Move %1$d blocks from position %2$d down by one place",e),e,c):void 0}(e,n,r,o,c);if(r&&o)return Object(y.sprintf)(// translators: %s: Type of block (i.e. Text, Image etc)
14
  Object(y.__)("Block %s is the only block, and cannot be moved"),t);if(c>0&&!o){var s=l("down");if("down"===s)return Object(y.sprintf)(// translators: 1: Type of block (i.e. Text, Image etc), 2: Position of selected block, 3: New position
23
  Object(y.__)("Move %1$s block from position %2$d right to position %3$d"),t,a,a-1)}if(c<0&&r){var b=l("up");if("up"===b)return Object(y.sprintf)(// translators: 1: Type of block (i.e. Text, Image etc)
24
  Object(y.__)("Block %1$s is at the beginning of the content and can’t be moved up"),t);if("left"===b)return Object(y.sprintf)(// translators: 1: Type of block (i.e. Text, Image etc)
25
  Object(y.__)("Block %1$s is at the beginning of the content and can’t be moved left"),t);if("right"===b)return Object(y.sprintf)(// translators: 1: Type of block (i.e. Text, Image etc)
26
+ Object(y.__)("Block %1$s is at the beginning of the content and can’t be moved right"),t)}}(s,g&&g.title,E,k,_,"up"===r?-1:1,C)))})),El=Object(l.forwardRef)((function(e,t){return Object(l.createElement)(_l,Object(i.a)({direction:"up",ref:t},e))})),wl=Object(l.forwardRef)((function(e,t){return Object(l.createElement)(_l,Object(i.a)({direction:"down",ref:t},e))})),Cl=Object(l.createContext)({__experimentalFeatures:!1}),Sl=function(){return Object(l.useContext)(Cl)},Bl=Object(l.createElement)(_r.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(l.createElement)(_r.Path,{d:"M11 13h2v-2h-2v2zm-6 0h2v-2H5v2zm12-2v2h2v-2h-2z"})),Il=function(e){var t=e.className,n=e.actions,r=e.children,o=e.secondaryActions;return Object(l.createElement)("div",{className:u()(t,"block-editor-warning")},Object(l.createElement)("div",{className:"block-editor-warning__contents"},Object(l.createElement)("p",{className:"block-editor-warning__message"},r),(l.Children.count(n)>0||o)&&Object(l.createElement)("div",{className:"block-editor-warning__actions"},l.Children.count(n)>0&&l.Children.map(n,(function(e,t){return Object(l.createElement)("span",{key:t,className:"block-editor-warning__action"},e)})),o&&Object(l.createElement)(v.DropdownMenu,{className:"block-editor-warning__secondary",icon:Bl,label:Object(y.__)("More options"),popoverProps:{position:"bottom left",className:"block-editor-warning__dropdown"},noIcons:!0},(function(){return Object(l.createElement)(v.MenuGroup,null,o.map((function(e,t){return Object(l.createElement)(v.MenuItem,{onClick:e.onClick,key:t},e.title)})))})))))},xl=n(343),Pl=function(e){var t=e.title,n=e.rawContent,r=e.renderedContent,o=e.action,c=e.actionText,i=e.className;return Object(l.createElement)("div",{className:i},Object(l.createElement)("div",{className:"block-editor-block-compare__content"},Object(l.createElement)("h2",{className:"block-editor-block-compare__heading"},t),Object(l.createElement)("div",{className:"block-editor-block-compare__html"},n),Object(l.createElement)("div",{className:"block-editor-block-compare__preview edit-post-visual-editor"},r)),Object(l.createElement)("div",{className:"block-editor-block-compare__action"},Object(l.createElement)(v.Button,{isSecondary:!0,tabIndex:"0",onClick:o},c)))},Tl=function(e){var t,n,r,o,c=e.block,i=e.onKeep,a=e.onConvert,s=e.convertor,b=e.convertButtonText,f={rawContent:c.originalContent,renderedContent:Object(p.getSaveElement)(c.name,c.attributes)},m=(t=s(c),r=(n=Object(d.castArray)(t)).map((function(e){return Object(p.getSaveContent)(e.name,e.attributes,e.innerBlocks)})),o=n.map((function(e){return Object(p.getSaveElement)(e.name,e.attributes,e.innerBlocks)})),{rawContent:r.join(""),renderedContent:o}),v=function(e,t){return Object(xl.diffChars)(e,t).map((function(e,t){var n=u()({"block-editor-block-compare__added":e.added,"block-editor-block-compare__removed":e.removed});return Object(l.createElement)("span",{key:t,className:n},e.value)}))}(f.rawContent,m.rawContent);return Object(l.createElement)("div",{className:"block-editor-block-compare__wrapper"},Object(l.createElement)(Pl,{title:Object(y.__)("Current"),className:"block-editor-block-compare__current",action:i,actionText:Object(y.__)("Convert to HTML"),rawContent:f.rawContent,renderedContent:f.renderedContent}),Object(l.createElement)(Pl,{title:Object(y.__)("After Conversion"),className:"block-editor-block-compare__converted",action:a,actionText:b,rawContent:v,renderedContent:m.renderedContent}))},Nl=function(e){return Object(p.rawHandler)({HTML:e.originalContent})},Dl=Object(b.compose)([Object(m.withSelect)((function(e,t){var n=t.clientId;return{block:e(vr).getBlock(n)}})),Object(m.withDispatch)((function(e,t){var n=t.block,r=e(vr).replaceBlock;return{convertToClassic:function(){r(n.clientId,function(e){return Object(p.createBlock)("core/freeform",{content:e.originalContent})}(n))},convertToHTML:function(){r(n.clientId,function(e){return Object(p.createBlock)("core/html",{content:e.originalContent})}(n))},convertToBlocks:function(){r(n.clientId,Nl(n))},attemptBlockRecovery:function(){var e,t,o,c;r(n.clientId,(t=(e=n).name,o=e.attributes,c=e.innerBlocks,Object(p.createBlock)(t,o,c)))}}}))])((function(e){var t=e.convertToHTML,n=e.convertToBlocks,r=e.convertToClassic,o=e.attemptBlockRecovery,c=e.block,i=!!Object(p.getBlockType)("core/html"),a=Object(l.useState)(!1),s=Object(Ro.a)(a,2),u=s[0],d=s[1],b=Object(l.useCallback)((function(){return d(!0)}),[]),f=Object(l.useCallback)((function(){return d(!1)}),[]),m=Object(l.useMemo)((function(){return[{
27
  // translators: Button to fix block content
28
+ title:Object(y._x)("Resolve","imperative verb"),onClick:b},i&&{title:Object(y.__)("Convert to HTML"),onClick:t},{title:Object(y.__)("Convert to Classic Block"),onClick:r}].filter(Boolean)}),[b,t,r]);return Object(l.createElement)(l.Fragment,null,Object(l.createElement)(Il,{actions:[Object(l.createElement)(v.Button,{key:"recover",onClick:o,isPrimary:!0},Object(y.__)("Attempt Block Recovery"))],secondaryActions:m},Object(y.__)("This block contains unexpected or invalid content.")),u&&Object(l.createElement)(v.Modal,{title:// translators: Dialog title to fix block content
29
+ Object(y.__)("Resolve Block"),onRequestClose:f,className:"block-editor-block-compare"},Object(l.createElement)(Tl,{block:c,onKeep:t,onConvert:n,convertor:Nl,convertButtonText:Object(y.__)("Convert to Blocks")})))})),Al=Object(l.createElement)(Il,{className:"block-editor-block-list__block-crash-warning"},Object(y.__)("This block has encountered an error and cannot be previewed.")),Rl=function(){return Al};var Ll=function(e){Object(Ai.a)(o,e);var t,n,r=(t=o,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=Object(Li.a)(t);if(n){var o=Object(Li.a)(this).constructor;e=Reflect.construct(r,arguments,o)}else e=r.apply(this,arguments);return Object(Ri.a)(this,e)});function o(){var e;return Object(Ti.a)(this,o),(e=r.apply(this,arguments)).state={hasError:!1},e}return Object(Ni.a)(o,[{key:"componentDidCatch",value:function(e){this.props.onError(e),this.setState({hasError:!0})}},{key:"render",value:function(){return this.state.hasError?null:this.props.children}}]),o}(l.Component),Ml=n(115),Fl=n.n(Ml),Vl=function(e){var t=e.clientId,n=Object(l.useState)(""),r=Object(Ro.a)(n,2),o=r[0],c=r[1],i=Object(m.useSelect)((function(e){return e(vr).getBlock(t)}),[t]),a=Object(m.useDispatch)(vr).updateBlock;return Object(l.useEffect)((function(){c(Object(p.getBlockContent)(i))}),[i]),Object(l.createElement)(Fl.a,{className:"block-editor-block-list__block-html-textarea",value:o,onBlur:function(){var e=Object(p.getBlockType)(i.name),n=Object(p.getBlockAttributes)(e,o,i.attributes),r=o||Object(p.getSaveContent)(e,n),l=!o||Object(p.isValidBlockContent)(e,n,r);a(t,{attributes:n,originalContent:r,isValid:l}),o||c({content:r})},onChange:function(e){return c(e.target.value)}})};function Hl(e,t){var n=function(e){return Object(m.useSelect)((function(t){var n=t(vr),r=n.getSelectedBlocksInitialCaretPosition,o=n.isMultiSelecting,c=n.isNavigationMode;if((0,n.isBlockSelected)(e)&&!o()&&!c())return r()}),[e])}(t);Object(l.useEffect)((function(){if(null!=n){var t=e.current.ownerDocument;if(!t.activeElement||!oc(e.current,t.activeElement)){var r=dl.focus.tabbable.find(e.current).filter((function(t){return Object(dl.isTextField)(t)&&oc(e.current,t)&&!t.closest(".block-list-appender")})),o=-1===n,c=(o?d.last:d.first)(r)||e.current;Object(dl.placeCaretAtHorizontalEdge)(c,o)}}}),[n])}function zl(e){if(!e.defaultPrevented){var t="mouseover"===e.type?"add":"remove";e.preventDefault(),e.currentTarget.classList[t]("is-hovered")}}function Gl(){var e=Object(m.useSelect)((function(e){var t=e(vr),n=t.isNavigationMode,r=t.getSettings;return n()||r().outlineMode}),[]);return Object(b.useRefEffect)((function(t){if(e)return t.addEventListener("mouseout",zl),t.addEventListener("mouseover",zl),function(){t.removeEventListener("mouseout",zl),t.removeEventListener("mouseover",zl),t.classList.remove("is-hovered")}}),[e])}function Ul(e){return Object(m.useSelect)((function(t){var n=t(vr),r=n.hasBlockMovingClientId,o=n.canInsertBlockType,c=n.getBlockName,i=n.getBlockRootClientId;if((0,n.isBlockSelected)(e)){var a=r();if(a)return u()("is-block-moving-mode",{"can-insert-moving-block":o(c(a),i(e))})}}),[e])}var Wl=Object(l.forwardRef)((function(e,t){var n=e.selectedClientId,r=e.isReverse,o=e.containerRef,c=e.noCapture,i=e.hasMultiSelection,a=e.multiSelectionContainer,s=Object(m.useSelect)((function(e){return e(vr).isNavigationMode()})),u=Object(m.useDispatch)(vr).setNavigationMode;return Object(l.createElement)("div",{ref:t,tabIndex:s?void 0:"0",onFocus:function(){if(c.current)c.current=null;else if(n){var e=rc(n,t.current.ownerDocument);if(r){var l=dl.focus.tabbable.find(e);(Object(d.last)(l)||e).focus()}else e.focus()}else{if(i)return void a.current.focus();u(!0);var s=dl.focus.tabbable.find(o.current);s.length&&(r?Object(d.last)(s).focus():Object(d.first)(s).focus())}},style:{position:"fixed"}})}));function Kl(e,t){for(var n="start"===t?"firstChild":"lastChild",r="start"===t?"nextSibling":"previousSibling";e[n];)for(e=e[n];e.nodeType===e.TEXT_NODE&&/^[ \t\n]*$/.test(e.data)&&e[r];)e=e[r];return e}function ql(e){var t=e(vr),n=t.isSelectionEnabled,r=t.isMultiSelecting,o=t.getMultiSelectedBlockClientIds,c=t.hasMultiSelection,i=t.getBlockParents,a=t.getSelectedBlockClientId;return{isSelectionEnabled:n(),isMultiSelecting:r(),multiSelectedBlockClientIds:o(),hasMultiSelection:c(),getBlockParents:i,selectedBlockClientId:a()}}function $l(e,t){Array.from(e.querySelectorAll(".rich-text")).forEach((function(e){t?e.setAttribute("contenteditable",!0):e.removeAttribute("contenteditable")}))}var Yl=Object(l.createContext)();function Xl(e,t,n,r){var o,c=dl.focus.focusable.find(n);return t&&(c=Object(d.reverse)(c)),c=c.slice(c.indexOf(e)+1),r&&(o=e.getBoundingClientRect()),Object(d.find)(c,(function t(n,c,i){if(!dl.focus.tabbable.isTabbableIndex(n))return!1;if(r){var a=n.getBoundingClientRect();if(a.left>=o.right||a.right<=o.left)return!1}if(Object(dl.isTextField)(n))return!0;if(!n.classList.contains("block-editor-block-list__block"))return!1;if((l=n).classList.contains("block-editor-block-list__layout")||l.querySelector(".block-editor-block-list__layout"))return!0;var l;if(n.contains(e))return!1;for(var s,u=1;(s=i[c+u])&&n.contains(s);u++)if(t(s,c+u,i))return!1;return!0}))}function Ql(e){var t=e(vr),n=t.getSelectedBlockClientId,r=t.getMultiSelectedBlocksStartClientId,o=t.getMultiSelectedBlocksEndClientId,c=t.getPreviousBlockClientId,i=t.getNextBlockClientId,a=t.getFirstMultiSelectedBlockClientId,l=t.getLastMultiSelectedBlockClientId,s=t.hasMultiSelection,u=t.getBlockOrder,b=t.isNavigationMode,f=t.isSelectionEnabled,p=t.getBlockSelectionStart,m=t.isMultiSelecting,v=t.getSettings,g=n(),O=r(),h=o(),j=u();return{selectedBlockClientId:g,selectionStartClientId:O,selectionBeforeEndClientId:c(h||g),selectionAfterEndClientId:i(h||g),selectedFirstClientId:a(),selectedLastClientId:l(),hasMultiSelection:s(),firstBlock:Object(d.first)(j),lastBlock:Object(d.last)(j),isNavigationMode:b(),isSelectionEnabled:f(),blockSelectionStart:p(),isMultiSelecting:m(),keepCaretInsideBlock:v().keepCaretInsideBlock}}function Zl(e){var t=e.children,n=Object(l.useRef)(),r=Object(l.useRef)(),o=Object(l.useRef)(),c=Object(l.useRef)(),i=Object(l.useRef)(),a=Object(l.useRef)(),s=Object(l.useRef)(),b=function(e){var t=Object(m.useSelect)(ql,[]),n=t.isSelectionEnabled,r=t.isMultiSelecting,o=t.multiSelectedBlockClientIds,c=t.hasMultiSelection,i=t.getBlockParents,a=t.selectedBlockClientId,s=Object(m.useDispatch)(vr),u=s.startMultiSelect,d=s.stopMultiSelect,b=s.multiSelect,f=s.selectBlock,p=Object(l.useRef)(),v=Object(l.useRef)(),g=Object(l.useRef)();Object(l.useEffect)((function(){var t=e.current.ownerDocument,n=t.defaultView;if(c&&!r){var i=o.length;if(!(i<2)){var l=o[0],s=o[i-1],u=rc(l,t),d=rc(s,t),b=n.getSelection(),f=t.createRange();u=Kl(u,"start"),d=Kl(d,"end"),f.setStartBefore(u),f.setEndAfter(d),b.removeAllRanges(),b.addRange(f)}}else{if(!a||r)return;var p=n.getSelection();if(p.rangeCount&&!p.isCollapsed){var m=rc(a,t),v=p.getRangeAt(0),g=v.startContainer,O=v.endContainer;!m||m.contains(g)&&m.contains(O)||p.removeAllRanges()}}}),[c,r,o,f,a]);var O=Object(l.useCallback)((function(t){var n=t.isSelectionEnd,r=e.current.ownerDocument.defaultView.getSelection();if(r.rangeCount&&!r.isCollapsed){var o=cc(r.focusNode);if(v.current===o){if(f(o),n&&($l(e.current,!0),r.rangeCount)){var c=r.getRangeAt(0).commonAncestorContainer;g.current.contains(c)&&g.current.focus()}}else{var a=[].concat(Object(k.a)(i(v.current)),[v.current]),l=[].concat(Object(k.a)(i(o)),[o]),s=Math.min(a.length,l.length)-1;b(a[s],l[s])}}else $l(e.current,!0)}),[f,i,b]),h=Object(l.useCallback)((function(){var t=e.current.ownerDocument,n=t.defaultView;t.removeEventListener("selectionchange",O),n.removeEventListener("mouseup",h),p.current=n.requestAnimationFrame((function(){O({isSelectionEnd:!0}),d()}))}),[O,d]);return Object(l.useEffect)((function(){var t=e.current.ownerDocument,n=t.defaultView;return function(){t.removeEventListener("selectionchange",O),n.removeEventListener("mouseup",h),n.cancelAnimationFrame(p.current)}}),[O,h]),Object(l.useCallback)((function(t){if(n){var r=e.current.ownerDocument,o=r.defaultView;v.current=t,g.current=r.activeElement,u(),r.addEventListener("selectionchange",O),o.addEventListener("mouseup",h),$l(e.current,!1)}}),[n,u,h])}(n),f=Object(m.useSelect)(Ql,[]),p=f.selectedBlockClientId,v=f.selectionStartClientId,g=f.selectionBeforeEndClientId,O=f.selectionAfterEndClientId,h=f.selectedFirstClientId,j=f.selectedLastClientId,_=f.hasMultiSelection,E=f.firstBlock,w=f.lastBlock,C=f.isNavigationMode,S=f.isSelectionEnabled,B=f.blockSelectionStart,I=f.isMultiSelecting,x=f.keepCaretInsideBlock,P=Object(m.useDispatch)(vr),T=P.multiSelect,N=P.selectBlock,D=P.setNavigationMode;function A(e){var t=e?g:O;t&&T(v||p,t)}function R(e){var t=e?h:j;t&&N(t)}Object(l.useEffect)((function(){_&&!I&&c.current.focus()}),[_,I]);var L=u()("block-editor-writing-flow",{"is-navigate-mode":C});return Object(l.createElement)(Yl.Provider,{value:b},Object(l.createElement)(Wl,{ref:r,selectedClientId:p,containerRef:n,noCapture:a,hasMultiSelection:_,multiSelectionContainer:c}),Object(l.createElement)("div",{ref:c,tabIndex:_?"0":void 0,"aria-label":_?Object(y.__)("Multiple selected blocks"):void 0,style:{position:"fixed"},onKeyDown:function(e){var t=e.keyCode,n=e.shiftKey,c=t===Mc.UP,i=t===Mc.DOWN,l=t===Mc.LEFT,s=t===Mc.RIGHT,u=c||l,d=l||s||c||i;t===Mc.TAB?(a.current=!0,n?r.current.focus():o.current.focus()):d&&((n?A:R)(u),e.preventDefault())}}),Object(l.createElement)("div",{ref:n,className:L,onKeyDown:function(e){var t=e.keyCode,c=e.target;if(n.current.contains(c)){var l=t===Mc.UP,u=t===Mc.DOWN,b=t===Mc.LEFT,f=t===Mc.RIGHT,m=t===Mc.TAB,v=t===Mc.ESCAPE,h=l||b,j=b||f,k=l||u,y=j||k,_=e.shiftKey,C=_||e.ctrlKey||e.altKey||e.metaKey,S=k?dl.isVerticalEdge:dl.isHorizontalEdge,B=n.current.ownerDocument,I=B.defaultView;if(p)if(m){var P=rc(p,B);if(_){if(c===P)return a.current=!0,void r.current.focus()}else{var N=dl.focus.tabbable.find(P);if(c===(Object(d.last)(N)||P))return a.current=!0,void o.current.focus()}}else v&&D(!0);if(k?s.current||(s.current=Object(dl.computeCaretRect)(I)):s.current=null,!y)return Mc.isKeyboardEvent.primary(e)&&(i.current=Object(dl.isEntirelySelected)(c)),void(Mc.isKeyboardEvent.primary(e,"a")&&((c.isContentEditable?i.current:Object(dl.isEntirelySelected)(c))&&(T(E,w),e.preventDefault()),i.current=!0));if(!e.nativeEvent.defaultPrevented&&function(e,t,n){if((t===Mc.UP||t===Mc.DOWN)&&!n)return!0;var r=e.tagName;return"INPUT"!==r&&"TEXTAREA"!==r}(c,t,C)){var R,L="rtl"===(R=c).ownerDocument.defaultView.getComputedStyle(R).direction?!h:h;if(_)(h&&g||!h&&O)&&function(e,t){var r,o,c=Xl(e,t,n.current);return!(c&&(r=e,o=c,r.closest(".block-editor-block-list__block")===o.closest(".block-editor-block-list__block")))}(c,h)&&S(c,h)&&(A(h),e.preventDefault());else if(k&&Object(dl.isVerticalEdge)(c,h)&&!x){var M=Xl(c,h,n.current,!0);M&&(Object(dl.placeCaretAtVerticalEdge)(M,h,s.current),e.preventDefault())}else if(j&&I.getSelection().isCollapsed&&Object(dl.isHorizontalEdge)(c,L)&&!x){var F=Xl(c,L,n.current);Object(dl.placeCaretAtHorizontalEdge)(F,L),e.preventDefault()}}}},onMouseDown:function(e){s.current=null;var t=e.target.ownerDocument;if(C&&p&&oc(rc(p,t),e.target)&&D(!1),S&&0===e.button){var n=cc(e.target);n&&(e.shiftKey?B!==n&&(T(B,n),e.preventDefault()):_&&N(n))}}},t),Object(l.createElement)(Wl,{ref:o,selectedClientId:p,containerRef:n,noCapture:a,hasMultiSelection:_,multiSelectionContainer:c,isReverse:!0}))}function Jl(e){var t=Object(l.useContext)(Yl),n=Object(m.useSelect)((function(t){var n=t(vr),r=n.isBlockSelected,o=n.getBlockRootClientId,c=n.getBlockIndex;return{isSelected:r(e),rootClientId:o(e),index:c(e)}}),[e]),r=n.isSelected,o=n.rootClientId,c=n.index,i=Object(m.useDispatch)(vr),a=i.insertDefaultBlock,s=i.removeBlock,u=i.selectBlock;return Object(b.useRefEffect)((function(n){if(!r){function i(t){oc(n,t.target)&&u(e)}return n.addEventListener("focusin",i),function(){n.removeEventListener("focusin",i)}}function l(t){var r=t.keyCode,i=t.target;r!==Mc.ENTER&&r!==Mc.BACKSPACE&&r!==Mc.DELETE||i!==n||Object(dl.isTextField)(i)||(t.preventDefault(),r===Mc.ENTER?a({},o,c+1):s(e))}function d(n){1===n.buttons&&t(e)}function b(e){e.preventDefault()}return n.addEventListener("keydown",l),n.addEventListener("mouseleave",d),n.addEventListener("dragstart",b),function(){n.removeEventListener("mouseleave",d),n.removeEventListener("keydown",l),n.removeEventListener("dragstart",b)}}),[r,o,c,t,a,s,u])}var es=n(71),ts=n(196),ns=[Object(l.createInterpolateElement)(Object(y.__)("While writing, you can press <kbd>/</kbd> to quickly insert new blocks."),{kbd:Object(l.createElement)("kbd",null)}),Object(l.createInterpolateElement)(Object(y.__)("Indent a list by pressing <kbd>space</kbd> at the beginning of a line."),{kbd:Object(l.createElement)("kbd",null)}),Object(l.createInterpolateElement)(Object(y.__)("Outdent a list by pressing <kbd>backspace</kbd> at the beginning of a line."),{kbd:Object(l.createElement)("kbd",null)}),Object(y.__)("Drag files into the editor to automatically insert media blocks."),Object(y.__)("Change a block's type by pressing the block icon on the toolbar.")],rs=function(){var e=Object(l.useState)(Math.floor(Math.random()*ns.length)),t=Object(Ro.a)(e,1)[0];return Object(l.createElement)(v.Tip,null,ns[t])},os=n(157),cs=n(156),is=n(266),as=function e(t){var n=t.className,r=t.onChange,o=t.value,c=t.label,i=t.placeholder,a=Object(b.useInstanceId)(e),s=Object(l.useRef)();return Object(l.createElement)("div",{className:u()("block-editor-inserter__search",n)},Object(l.createElement)(v.VisuallyHidden,{as:"label",htmlFor:"block-editor-inserter__search-".concat(a)},c||i),Object(l.createElement)("input",{ref:s,className:"block-editor-inserter__search-input",id:"block-editor-inserter__search-".concat(a),type:"search",placeholder:i,onChange:function(e){return r(e.target.value)},autoComplete:"off",value:o||""}),Object(l.createElement)("div",{className:"block-editor-inserter__search-icon"},!!o&&Object(l.createElement)(v.Button,{icon:os.a,label:Object(y.__)("Reset search"),onClick:function(){r(""),s.current.focus()}}),!o&&Object(l.createElement)(cs.a,{icon:is.a})))},ls=function(e){var t=e.title,n=e.icon,r=e.description,o=e.blockType;return o&&(Dt()("`blockType` property in `BlockCard component`",{alternative:"`title, icon and description` properties"}),t=o.title,n=o.icon,r=o.description),Object(l.createElement)("div",{className:"block-editor-block-card"},Object(l.createElement)(Aa,{icon:n,showColors:!0}),Object(l.createElement)("div",{className:"block-editor-block-card__content"},Object(l.createElement)("h2",{className:"block-editor-block-card__title"},t),Object(l.createElement)("span",{className:"block-editor-block-card__description"},r)))};function ss(e){var t=e.clientId,n=void 0===t?null:t,r=e.value,o=e.selection,c=e.onChange,i=void 0===c?d.noop:c,a=e.onInput,s=void 0===a?d.noop:a,u=Object(m.useRegistry)(),b=u.dispatch(vr),f=b.resetBlocks,v=b.resetSelection,g=b.replaceInnerBlocks,O=b.setHasControlledInnerBlocks,h=b.__unstableMarkNextChangeAsNotPersistent,j=u.select(vr),k=j.getBlockName,y=j.getBlocks,_=Object(l.useRef)({incoming:null,outgoing:[]}),E=Object(l.useRef)(!1),w=Object(l.useRef)(s),C=Object(l.useRef)(i);Object(l.useEffect)((function(){w.current=s,C.current=i}),[s,i]),Object(l.useEffect)((function(){_.current.outgoing.includes(r)?Object(d.last)(_.current.outgoing)===r&&(_.current.outgoing=[]):y(n)!==r&&(_.current.outgoing=[],function(){if(r)if(h(),n){O(n,!0),h();var e=r.map((function(e){return Object(p.cloneBlock)(e)}));E.current&&(_.current.incoming=e),g(n,e)}else E.current&&(_.current.incoming=r),f(r)}(),o&&v(o.selectionStart,o.selectionEnd,o.initialPosition))}),[r,n]),Object(l.useEffect)((function(){var e=u.select(vr),t=e.getSelectionStart,r=e.getSelectionEnd,o=e.getSelectedBlocksInitialCaretPosition,c=e.isLastBlockChangePersistent,i=e.__unstableIsLastBlockChangeIgnored,a=y(n),l=c(),s=!1;E.current=!0;var d=u.subscribe((function(){if(null===n||null!==k(n)){var e=c(),u=y(n),d=u!==a;if(a=u,d&&(_.current.incoming||i()))return _.current.incoming=null,void(l=e);(d||s&&!d&&e&&!l)&&(l=e,_.current.outgoing.push(a),(l?C.current:w.current)(a,{selection:{selectionStart:t(),selectionEnd:r(),initialPosition:o()}})),s=d}}));return function(){return d()}}),[u,n])}var us,ds=Object(b.createHigherOrderComponent)((function(e){return Object(m.withRegistry)((function(t){var n=t.useSubRegistry,r=void 0===n||n,o=t.registry,c=Object(j.a)(t,["useSubRegistry","registry"]);if(!r)return Object(l.createElement)(e,Object(i.a)({registry:o},c));var a=Object(l.useState)(null),s=Object(Ro.a)(a,2),u=s[0],d=s[1];return Object(l.useEffect)((function(){var e=Object(m.createRegistry)({},o);e.registerStore(Rt,mr),d(e)}),[o]),u?Object(l.createElement)(m.RegistryProvider,{value:u},Object(l.createElement)(e,Object(i.a)({registry:u},c))):null}))}),"withRegistryProvider")((function(e){var t=e.children,n=e.settings,r=Object(m.useDispatch)(vr).updateSettings;return Object(l.useEffect)((function(){r(n)}),[n]),ss(e),t}));function bs(e){var t=e.onClick;return Object(l.createElement)("div",{tabIndex:0,role:"button",onClick:t,onKeyPress:t},Object(l.createElement)(v.Disabled,null,Object(l.createElement)(hd,null)))}var fs=function(e){var t=e.viewportWidth,n=e.__experimentalPadding,r=Object(b.useResizeObserver)(),o=Object(Ro.a)(r,2),c=o[0],i=o[1].width,a=Object(b.useResizeObserver)(),s=Object(Ro.a)(a,2),u=s[0],d=s[1].height;us=us||Object(b.pure)(hd);var f=(i-2*n)/t;return Object(l.createElement)("div",{className:"block-editor-block-preview__container editor-styles-wrapper","aria-hidden":!0,style:{height:d*f+2*n}},c,Object(l.createElement)(v.Disabled,{style:{transform:"scale(".concat(f,")"),width:t,left:n,right:n,top:n},className:"block-editor-block-preview__content"},u,Object(l.createElement)(us,null)))},ps=Object(l.memo)((function(e){var t=e.blocks,n=e.__experimentalPadding,r=void 0===n?0:n,o=e.viewportWidth,c=void 0===o?1200:o,i=e.__experimentalLive,a=void 0!==i&&i,s=e.__experimentalOnClick,u=Object(m.useSelect)((function(e){return e(vr).getSettings()}),[]),b=Object(l.useMemo)((function(){return Object(d.castArray)(t)}),[t]);return t&&0!==t.length?Object(l.createElement)(ds,{value:b,settings:u},a?Object(l.createElement)(bs,{onClick:s}):Object(l.createElement)(fs,{viewportWidth:c,__experimentalPadding:r})):null}));function ms(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function vs(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ms(Object(n),!0).forEach((function(t){Object(a.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ms(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var gs=function(e){var t,n,r=e.item,o=r.name,c=r.title,i=r.icon,a=r.description,s=r.initialAttributes,u=Object(p.getBlockType)(o),d=Object(p.isReusableBlock)(r);return Object(l.createElement)("div",{className:"block-editor-inserter__preview-container"},Object(l.createElement)("div",{className:"block-editor-inserter__preview"},d||u.example?Object(l.createElement)("div",{className:"block-editor-inserter__preview-content"},Object(l.createElement)(ps,{__experimentalPadding:16,viewportWidth:null!==(t=null===(n=u.example)||void 0===n?void 0:n.viewportWidth)&&void 0!==t?t:500,blocks:u.example?Object(p.getBlockFromExample)(r.name,{attributes:vs(vs({},u.example.attributes),s),innerBlocks:u.example.innerBlocks}):Object(p.createBlock)(o,s)})):Object(l.createElement)("div",{className:"block-editor-inserter__preview-content-missing"},Object(y.__)("No Preview Available."))),!d&&Object(l.createElement)(ls,{title:c,icon:i,description:a}))},Os=Object(l.createElement)(_r.SVG,{width:"18",height:"18",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 18 18"},Object(l.createElement)(_r.Path,{d:"M5 4h2V2H5v2zm6-2v2h2V2h-2zm-6 8h2V8H5v2zm6 0h2V8h-2v2zm-6 6h2v-2H5v2zm6 0h2v-2h-2v2z"}));function hs(e){var t=e.count,n=e.icon;return Object(l.createElement)("div",{className:"block-editor-block-draggable-chip-wrapper"},Object(l.createElement)("div",{className:"block-editor-block-draggable-chip"},Object(l.createElement)(v.Flex,{justify:"center",className:"block-editor-block-draggable-chip__content"},Object(l.createElement)(v.FlexItem,null,n?Object(l.createElement)(Aa,{icon:n}):Object(y.sprintf)(
30
  /* translators: %d: Number of blocks. */
31
+ Object(y._n)("%d block","%d blocks",t),t)),Object(l.createElement)(v.FlexItem,null,Object(l.createElement)(Aa,{icon:Os})))))}var js=function(e){var t=e.isEnabled,n=e.blocks,r=e.icon,o=e.children,c={type:"inserter",blocks:n};return Object(l.createElement)(v.Draggable,{transferData:c,__experimentalDragComponent:Object(l.createElement)(hs,{count:n.length,icon:r})},(function(e){var n=e.onDraggableStart,r=e.onDraggableEnd;return o({draggable:t,onDragStart:t?n:void 0,onDragEnd:t?r:void 0})}))};function ks(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:window,t=e.navigator.platform;return-1!==t.indexOf("Mac")||["iPad","iPhone"].includes(t)}var ys=Object(l.memo)((function(e){var t=e.className,n=e.composite,r=e.item,o=e.onSelect,c=e.onHover,a=e.isDraggable,s=Object(j.a)(e,["className","composite","item","onSelect","onHover","isDraggable"]),d=Object(l.useRef)(!1),b=r.icon?{backgroundColor:r.icon.background,color:r.icon.foreground}:{},f=Object(l.useMemo)((function(){return[Object(p.createBlock)(r.name,r.initialAttributes,Object(p.createBlocksFromInnerBlocksTemplate)(r.innerBlocks))]}),[r.name,r.initialAttributes,r.initialAttributes]);return Object(l.createElement)(js,{isEnabled:a&&!r.disabled,blocks:f,icon:r.icon},(function(e){var a=e.draggable,f=e.onDragStart,p=e.onDragEnd;return Object(l.createElement)("div",{className:"block-editor-block-types-list__list-item",draggable:a,onDragStart:function(e){d.current=!0,f&&(c(null),f(e))},onDragEnd:function(e){d.current=!1,p&&p(e)}},Object(l.createElement)(v.__unstableCompositeItem,Object(i.a)({role:"option",as:v.Button},n,{className:u()("block-editor-block-types-list__item",t),disabled:r.isDisabled,onClick:function(e){e.preventDefault(),o(r,ks()?e.metaKey:e.ctrlKey),c(null)},onKeyDown:function(e){e.keyCode===Mc.ENTER&&(e.preventDefault(),o(r,ks()?e.metaKey:e.ctrlKey),c(null))},onFocus:function(){d.current||c(r)},onMouseEnter:function(){d.current||c(r)},onMouseLeave:function(){return c(null)},onBlur:function(){return c(null)},focusable:!0},s),Object(l.createElement)("span",{className:"block-editor-block-types-list__item-icon",style:b},Object(l.createElement)(Aa,{icon:r.icon,showColors:!0})),Object(l.createElement)("span",{className:"block-editor-block-types-list__item-title"},r.title)))}))})),_s=function(e){var t=e.items,n=void 0===t?[]:t,r=e.onSelect,o=e.onHover,c=void 0===o?function(){}:o,a=e.children,s=e.label,u=e.isDraggable,d=void 0===u||u,b=Object(v.__unstableUseCompositeState)();return Object(l.createElement)(v.__unstableComposite,Object(i.a)({},b,{role:"listbox",className:"block-editor-block-types-list","aria-label":s}),n.map((function(e){return Object(l.createElement)(ys,{key:e.id,item:e,className:Object(p.getBlockMenuDefaultClassName)(e.id),onSelect:r,onHover:c,composite:b,isDraggable:d})})),a)},Es=function(e){var t=e.title,n=e.icon,r=e.children;return Object(l.createElement)(l.Fragment,null,Object(l.createElement)("div",{className:"block-editor-inserter__panel-header"},Object(l.createElement)("h2",{className:"block-editor-inserter__panel-title"},t),Object(l.createElement)(v.Icon,{icon:n})),Object(l.createElement)("div",{className:"block-editor-inserter__panel-content"},r))};function ws(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}var Cs=function(e){var t=e.rootClientId,n=e.onInsert,r=e.onHover,o=e.showMostUsedBlocks,c=Na(t,n),i=Object(Ro.a)(c,4),s=i[0],u=i[1],b=i[2],f=i[3],p=Object(l.useMemo)((function(){return Object(d.orderBy)(s,["frecency"],["desc"]).slice(0,6)}),[s]),m=Object(l.useMemo)((function(){return s.filter((function(e){return!e.category}))}),[s]),v=Object(l.useMemo)((function(){return Object(d.flow)((function(e){return e.filter((function(e){return e.category&&"reusable"!==e.category}))}),(function(e){return Object(d.groupBy)(e,"category")}))(s)}),[s]),g=Object(l.useMemo)((function(){var e=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ws(Object(n),!0).forEach((function(t){Object(a.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ws(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({},b);return Object.keys(b).forEach((function(t){e[t]=s.filter((function(e){return function(e){return e.name.split("/")[0]}(e)===t})),0===e[t].length&&delete e[t]})),e}),[s,b]);return Object(l.useEffect)((function(){return function(){return r(null)}}),[]),Object(l.createElement)("div",null,o&&!!p.length&&Object(l.createElement)(Es,{title:Object(y._x)("Most used","blocks")},Object(l.createElement)(_s,{items:p,onSelect:f,onHover:r,label:Object(y._x)("Most used","blocks")})),Object(d.map)(u,(function(e){var t=v[e.slug];return t&&t.length?Object(l.createElement)(Es,{key:e.slug,title:e.title,icon:e.icon},Object(l.createElement)(_s,{items:t,onSelect:f,onHover:r,label:e.title})):null})),!m.length&&Object(l.createElement)(Es,{className:"block-editor-inserter__uncategorized-blocks-panel",title:Object(y.__)("Uncategorized")},Object(l.createElement)(_s,{items:m,onSelect:f,onHover:r,label:Object(y.__)("Uncategorized")})),Object(d.map)(b,(function(e,t){var n=g[t];return n&&n.length?Object(l.createElement)(Es,{key:t,title:e.title,icon:e.icon},Object(l.createElement)(_s,{items:n,onSelect:f,onHover:r,label:e.title})):null})))},Ss=function(e){var t,n=e.selectedCategory,r=e.patternCategories,o=e.onClickCategory,c=e.children;return Object(l.createElement)(l.Fragment,null,Object(l.createElement)("div",{className:u()("block-editor-inserter__panel-header","block-editor-inserter__panel-header-patterns")},Object(l.createElement)(v.SelectControl,{className:"block-editor-inserter__panel-dropdown",label:Object(y.__)("Filter patterns"),hideLabelFromVision:!0,value:n.name,onChange:function(e){o(r.find((function(t){return e===t.name})))},options:(t=[],r.map((function(e){return t.push({value:e.name,label:e.label})})),t)})),Object(l.createElement)("div",{className:"block-editor-inserter__panel-content"},c))},Bs=n(51),Is=function(e,t){var n=Object(m.useSelect)((function(e){var n=e(vr),r=n.__experimentalGetAllowedPatterns,o=n.getSettings;return{patterns:r(t),patternCategories:o().__experimentalBlockPatternCategories}}),[t]),r=n.patternCategories,o=n.patterns,c=Object(m.useDispatch)(Bs.store).createSuccessNotice;return[o,r,Object(l.useCallback)((function(t,n){e(Object(d.map)(n,(function(e){return Object(p.cloneBlock)(e)})),t.name),c(Object(y.sprintf)(
32
  /* translators: %s: block pattern title. */
33
+ Object(y.__)('Block pattern "%s" inserted.'),t.title),{type:"snackbar"})}),[])]};function xs(e){var t=e.isDraggable,n=e.pattern,r=e.onClick,o=e.composite,c=n.content,a=n.viewportWidth,s=Object(l.useMemo)((function(){return Object(p.parse)(c)}),[c]),u=Object(b.useInstanceId)(xs),d="block-editor-block-patterns-list__item-description-".concat(u);return Object(l.createElement)(js,{isEnabled:t,blocks:s},(function(e){var t=e.draggable,c=e.onDragStart,u=e.onDragEnd;return Object(l.createElement)("div",{className:"block-editor-block-patterns-list__list-item","aria-label":n.title,"aria-describedby":n.description?d:void 0,draggable:t,onDragStart:c,onDragEnd:u},Object(l.createElement)(v.__unstableCompositeItem,Object(i.a)({role:"option",as:"div"},o,{className:"block-editor-block-patterns-list__item",onClick:function(){return r(n,s)}}),Object(l.createElement)(ps,{blocks:s,viewportWidth:a}),Object(l.createElement)("div",{className:"block-editor-block-patterns-list__item-title"},n.title),!!n.description&&Object(l.createElement)(v.VisuallyHidden,{id:d},n.description)))}))}function Ps(){return Object(l.createElement)("div",{className:"block-editor-block-patterns-list__item is-placeholder"})}var Ts=function(e){var t=e.isDraggable,n=e.blockPatterns,r=e.shownPatterns,o=e.onClickPattern,c=e.orientation,a=e.label,s=void 0===a?Object(y.__)("Block Patterns"):a,u=Object(v.__unstableUseCompositeState)({orientation:c});return Object(l.createElement)(v.__unstableComposite,Object(i.a)({},u,{role:"listbox",className:"block-editor-block-patterns-list","aria-label":s}),n.map((function(e){return r.includes(e)?Object(l.createElement)(xs,{key:e.name,pattern:e,onClick:o,isDraggable:t,composite:u}):Object(l.createElement)(Ps,{key:e.name})})))};function Ns(e){var t=e.rootClientId,n=e.onInsert,r=e.selectedCategory,o=e.onClickCategory,c=Is(n,t),i=Object(Ro.a)(c,3),a=i[0],s=i[1],u=i[2],f=Object(l.useMemo)((function(){return s.filter((function(e){return a.some((function(t){var n;return null===(n=t.categories)||void 0===n?void 0:n.includes(e.name)}))}))}),[a,s]),p=r||f[0];Object(l.useEffect)((function(){a.some((function(e){return m(e)===1/0}))&&!f.find((function(e){return"uncategorized"===e.name}))&&f.push({name:"uncategorized",label:Object(y._x)("Uncategorized")})}),[f,a]);var m=Object(l.useCallback)((function(e){if(!e.categories||!e.categories.length)return 1/0;var t=Object(d.fromPairs)(f.map((function(e,t){return[e.name,t]})));return Math.min.apply(Math,Object(k.a)(e.categories.map((function(e){return void 0!==t[e]?t[e]:1/0}))))}),[f]),v=Object(l.useMemo)((function(){return a.filter((function(e){return"uncategorized"===p.name?m(e)===1/0:e.categories&&e.categories.includes(p.name)}))}),[a,p]),g=Object(l.useMemo)((function(){return v.sort((function(e,t){return m(e)-m(t)}))}),[v,m]),O=Object(b.useAsyncList)(g);return Object(l.createElement)(l.Fragment,null,!!v.length&&Object(l.createElement)(Ss,{selectedCategory:p,patternCategories:f,onClickCategory:o},Object(l.createElement)(Ts,{shownPatterns:O,blockPatterns:v,onClickPattern:u,label:p.label,orientation:"vertical",isDraggable:!0})))}var Ds=function(e){var t=e.rootClientId,n=e.onInsert,r=e.onClickCategory,o=e.selectedCategory;return Object(l.createElement)(Ns,{rootClientId:t,selectedCategory:o,onInsert:n,onClickCategory:r})},As=n(31),Rs=function(){return Object(l.createElement)("div",{className:"block-editor-inserter__no-results"},Object(l.createElement)(cs.a,{className:"block-editor-inserter__no-results-icon",icon:Da.a}),Object(l.createElement)("p",null,Object(y.__)("No results found.")))};function Ls(e){var t=e.onHover,n=e.onInsert,r=e.rootClientId,o=Na(r,n),c=Object(Ro.a)(o,4),i=c[0],a=c[3],s=Object(l.useMemo)((function(){return i.filter((function(e){return"reusable"===e.category}))}),[i]);return 0===s.length?Object(l.createElement)(Rs,null):Object(l.createElement)(Es,{title:Object(y.__)("Reusable blocks")},Object(l.createElement)(_s,{items:s,onSelect:a,onHover:t,label:Object(y.__)("Reusable blocks")}))}var Ms=function(e){var t=e.rootClientId,n=e.onInsert,r=e.onHover;return Object(l.createElement)(l.Fragment,null,Object(l.createElement)(Ls,{onHover:r,onInsert:n,rootClientId:t}),Object(l.createElement)("div",{className:"block-editor-inserter__manage-reusable-blocks-container"},Object(l.createElement)("a",{className:"block-editor-inserter__manage-reusable-blocks",href:Object(As.addQueryArgs)("edit.php",{post_type:"wp_block"})},Object(y.__)("Manage Reusable blocks"))))},Fs=Object(v.createSlotFill)("__experimentalInserterMenuExtension"),Vs=Fs.Fill,Hs=Fs.Slot;Vs.Slot=Hs;var zs=Vs,Gs=function(e){var t=e.rootClientId,n=e.insertionIndex,r=e.clientId,o=e.isAppender,c=e.onSelect,i=e.shouldFocusBlock,a=void 0===i||i,s=Object(m.useSelect)((function(e){var c,i,a=e(vr),l=a.getSelectedBlock,s=a.getBlockIndex,u=a.getBlockOrder,d=a.getBlockInsertionPoint;if(t||n||r||o)c=t,i=n||(r?s(r,c):u(c).length);else{var b=d();c=b.rootClientId,i=b.index}return{getSelectedBlock:l,destinationRootClientId:c,destinationIndex:i}}),[t,n,r,o]),u=s.destinationRootClientId,b=s.destinationIndex,f=s.getSelectedBlock,v=Object(m.useDispatch)(vr),g=v.replaceBlocks,O=v.insertBlocks,h=v.showInsertionPoint,j=v.hideInsertionPoint,k=Object(l.useCallback)((function(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=f();!o&&r&&Object(p.isUnmodifiedDefaultBlock)(r)?g(r.clientId,e,null,a||n?0:null,t):O(e,b,u,!0,a||n?0:null,t);var i=Object(y.sprintf)(// translators: %d: the name of the block that has been added
34
+ Object(y._n)("%d block added.","%d blocks added.",Object(d.castArray)(e).length),Object(d.castArray)(e).length);Object(Tt.speak)(i),c&&c()}),[o,f,g,O,u,b,c,a]),_=Object(l.useCallback)((function(e){e?h(u,b):j()}),[h,j,u,b]);return[u,k,_]},Us=function(e){var t=e.filterValue,n=e.onSelect,r=e.onHover,o=e.rootClientId,c=e.clientId,i=e.isAppender,a=e.maxBlockPatterns,s=e.maxBlockTypes,u=e.showBlockDirectory,f=void 0!==u&&u,p=e.isDraggable,m=void 0===p||p,g=e.shouldFocusBlock,O=void 0===g||g,h=Object(b.useDebounce)(Tt.speak,500),j=Gs({onSelect:n,rootClientId:o,clientId:c,isAppender:i,shouldFocusBlock:O}),k=Object(Ro.a)(j,2),_=k[0],E=k[1],w=Na(_,E),C=Object(Ro.a)(w,4),S=C[0],B=C[1],I=C[2],x=C[3],P=Is(E,_),T=Object(Ro.a)(P,3),N=T[0],D=T[2],A=Object(l.useMemo)((function(){var e=xa(Object(d.orderBy)(S,["frecency"],["desc"]),B,I,t);return void 0!==s?e.slice(0,s):e}),[t,S,B,I,s]),R=Object(l.useMemo)((function(){var e=Pa(N,t);return void 0!==a?e.slice(0,a):e}),[t,N,a]);Object(l.useEffect)((function(){if(t){var e=A.length+R.length,n=Object(y.sprintf)(
35
  /* translators: %d: number of results. */
36
+ Object(y._n)("%d result found.","%d results found.",e),e);h(n)}}),[t,h]);var L=Object(b.useAsyncList)(R),M=!Object(d.isEmpty)(A)||!Object(d.isEmpty)(R);return Object(l.createElement)(l.Fragment,null,!f&&!M&&Object(l.createElement)(Rs,null),!!A.length&&Object(l.createElement)(Es,{title:Object(l.createElement)(v.VisuallyHidden,null,Object(y.__)("Blocks"))},Object(l.createElement)(_s,{items:A,onSelect:x,onHover:r,label:Object(y.__)("Blocks"),isDraggable:m})),!!A.length&&!!R.length&&Object(l.createElement)("div",{className:"block-editor-inserter__quick-inserter-separator"}),!!R.length&&Object(l.createElement)(Es,{title:Object(l.createElement)(v.VisuallyHidden,null,Object(y.__)("Block Patterns"))},Object(l.createElement)("div",{className:"block-editor-inserter__quick-inserter-patterns"},Object(l.createElement)(Ts,{shownPatterns:L,blockPatterns:R,onClickPattern:D,isDraggable:m}))),f&&Object(l.createElement)(zs.Slot,{fillProps:{onSelect:x,onHover:r,filterValue:t,hasItems:M,rootClientId:_}},(function(e){return e.length?e:M?null:Object(l.createElement)(Rs,null)})))},Ws={name:"blocks",
37
  /* translators: Blocks tab title in the block inserter. */
38
+ title:Object(y.__)("Blocks")},Ks={name:"patterns",
39
  /* translators: Patterns tab title in the block inserter. */
40
+ title:Object(y.__)("Patterns")},qs={name:"reusable",
41
  /* translators: Reusable blocks tab title in the block inserter. */
42
+ title:Object(y.__)("Reusable")},$s=function(e){var t=e.children,n=e.showPatterns,r=void 0!==n&&n,o=e.showReusableBlocks,c=void 0!==o&&o,i=e.onSelect,a=Object(l.useMemo)((function(){var e=[Ws];return r&&e.push(Ks),c&&e.push(qs),e}),[Ws,r,Ks,c,qs]);return Object(l.createElement)(v.TabPanel,{className:"block-editor-inserter__tabs",tabs:a,onSelect:i},t)},Ys=function(e){var t=e.rootClientId,n=e.clientId,r=e.isAppender,o=e.__experimentalInsertionIndex,c=e.onSelect,i=e.showInserterHelpPanel,a=e.showMostUsedBlocks,s=e.shouldFocusBlock,u=void 0===s||s,d=Object(l.useState)(""),b=Object(Ro.a)(d,2),f=b[0],p=b[1],g=Object(l.useState)(null),O=Object(Ro.a)(g,2),h=O[0],j=O[1],k=Object(l.useState)(null),_=Object(Ro.a)(k,2),E=_[0],w=_[1],C=Gs({rootClientId:t,clientId:n,isAppender:r,insertionIndex:o,shouldFocusBlock:u}),S=Object(Ro.a)(C,3),B=S[0],I=S[1],x=S[2],P=Object(m.useSelect)((function(e){var t,n=e(vr),r=n.__experimentalGetAllowedPatterns,o=n.getSettings;return{showPatterns:!B||!!r(B).length,hasReusableBlocks:!(null===(t=o().__experimentalReusableBlocks)||void 0===t||!t.length)}}),[B]),T=P.showPatterns,N=P.hasReusableBlocks,D=Object(l.useCallback)((function(e,t,n){I(e,t,n),c()}),[I,c]),A=Object(l.useCallback)((function(e,t){I(e,{patternName:t}),c()}),[I,c]),R=Object(l.useCallback)((function(e){x(!!e),j(e)}),[x,j]),L=Object(l.useCallback)((function(e){w(e)}),[w]),M=Object(l.useMemo)((function(){return Object(l.createElement)(l.Fragment,null,Object(l.createElement)("div",{className:"block-editor-inserter__block-list"},Object(l.createElement)(Cs,{rootClientId:B,onInsert:D,onHover:R,showMostUsedBlocks:a})),i&&Object(l.createElement)("div",{className:"block-editor-inserter__tips"},Object(l.createElement)(v.VisuallyHidden,{as:"h2"},Object(y.__)("A tip for using the block editor")),Object(l.createElement)(rs,null)))}),[B,D,R,f,a,i]),F=Object(l.useMemo)((function(){return Object(l.createElement)(Ds,{rootClientId:B,onInsert:A,onClickCategory:L,selectedCategory:E})}),[B,A,L,E]),V=Object(l.useMemo)((function(){return Object(l.createElement)(Ms,{rootClientId:B,onInsert:D,onHover:R})}),[B,D,R]),H=Object(l.useCallback)((function(e){return"blocks"===e.name?M:"patterns"===e.name?F:V}),[M,F,V]);return Object(l.createElement)("div",{className:"block-editor-inserter__menu"},Object(l.createElement)("div",{className:"block-editor-inserter__main-area"},Object(l.createElement)("div",{className:"block-editor-inserter__content"},Object(l.createElement)(as,{onChange:function(e){h&&j(null),p(e)},value:f,label:Object(y.__)("Search for blocks and patterns"),placeholder:Object(y.__)("Search")}),!!f&&Object(l.createElement)(Us,{filterValue:f,onSelect:c,onHover:R,rootClientId:t,clientId:n,isAppender:r,showBlockDirectory:!0,shouldFocusBlock:u}),!f&&(T||N)&&Object(l.createElement)($s,{showPatterns:T,showReusableBlocks:N},H),!f&&!T&&!N&&M)),i&&h&&Object(l.createElement)(gs,{item:h}))};function Xs(e){var t=e.onSelect,n=e.rootClientId,r=e.clientId,o=e.isAppender,c=Object(l.useState)(""),i=Object(Ro.a)(c,2),a=i[0],s=i[1],d=Gs({onSelect:t,rootClientId:n,clientId:r,isAppender:o}),b=Object(Ro.a)(d,2),f=b[0],p=b[1],g=Na(f,p),O=Object(Ro.a)(g,1)[0],h=Is(p,f),j=Object(Ro.a)(h,1)[0],k=j.length&&!!a,_=k&&j.length>6||O.length>6,E=Object(m.useSelect)((function(e){var t=e(vr),o=t.getSettings,c=t.getBlockIndex;return{setInserterIsOpened:o().__experimentalSetIsInserterOpened,blockIndex:c(r,n)}}),[r,n]),w=E.setInserterIsOpened,C=E.blockIndex;Object(l.useEffect)((function(){w&&w(!1)}),[w]);var S=Object(m.useDispatch)(vr).__unstableSetInsertionPoint;return Object(l.createElement)("div",{className:u()("block-editor-inserter__quick-inserter",{"has-search":_,"has-expand":w})},_&&Object(l.createElement)(as,{value:a,onChange:function(e){s(e)},label:Object(y.__)("Search for blocks and patterns"),placeholder:Object(y.__)("Search")}),Object(l.createElement)("div",{className:"block-editor-inserter__quick-inserter-results"},Object(l.createElement)(Us,{filterValue:a,onSelect:t,rootClientId:n,clientId:r,isAppender:o,maxBlockPatterns:k?2:0,maxBlockTypes:6,isDraggable:!1})),w&&Object(l.createElement)(v.Button,{className:"block-editor-inserter__quick-inserter-expand",onClick:function(){S(n,C),w(!0)},"aria-label":Object(y.__)("Browse all. This will open the main inserter panel in the editor toolbar.")},Object(y.__)("Browse all")))}var Qs=function(e){var t,n=e.onToggle,r=e.disabled,o=e.isOpen,c=e.blockTitle,a=e.hasSingleBlockType,s=e.toggleProps,u=void 0===s?{}:s;t=a?Object(y.sprintf)(// translators: %s: the name of the block when there is only one
43
+ Object(y._x)("Add %s","directly add the only allowed block"),c):Object(y._x)("Add block","Generic label for block inserter button");var d=u.onClick,b=Object(j.a)(u,["onClick"]);return Object(l.createElement)(v.Button,Object(i.a)({icon:ts.a,label:t,tooltipPosition:"bottom",onClick:function(e){n&&n(e),d&&d(e)},className:"block-editor-inserter__toggle","aria-haspopup":!a&&"true","aria-expanded":!a&&o,disabled:r},b))},Zs=function(e){Object(Ai.a)(o,e);var t,n,r=(t=o,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=Object(Li.a)(t);if(n){var o=Object(Li.a)(this).constructor;e=Reflect.construct(r,arguments,o)}else e=r.apply(this,arguments);return Object(Ri.a)(this,e)});function o(){var e;return Object(Ti.a)(this,o),(e=r.apply(this,arguments)).onToggle=e.onToggle.bind(Object(Di.a)(e)),e.renderToggle=e.renderToggle.bind(Object(Di.a)(e)),e.renderContent=e.renderContent.bind(Object(Di.a)(e)),e}return Object(Ni.a)(o,[{key:"onToggle",value:function(e){var t=this.props.onToggle;t&&t(e)}},{key:"renderToggle",value:function(e){var t=e.onToggle,n=e.isOpen,r=this.props,o=r.disabled,c=r.blockTitle,i=r.hasSingleBlockType,a=r.toggleProps,l=r.hasItems,s=r.renderToggle;return(void 0===s?Qs:s)({onToggle:t,isOpen:n,disabled:o||!l,blockTitle:c,hasSingleBlockType:i,toggleProps:a})}},{key:"renderContent",value:function(e){var t=e.onClose,n=this.props,r=n.rootClientId,o=n.clientId,c=n.isAppender,i=n.showInserterHelpPanel;return n.__experimentalIsQuick?Object(l.createElement)(Xs,{onSelect:function(){t()},rootClientId:r,clientId:o,isAppender:c}):Object(l.createElement)(Ys,{onSelect:function(){t()},rootClientId:r,clientId:o,isAppender:c,showInserterHelpPanel:i})}},{key:"render",value:function(){var e=this.props,t=e.position,n=e.hasSingleBlockType,r=e.insertOnlyAllowedBlock,o=e.__experimentalIsQuick,c=e.onSelectOrClose;return n?this.renderToggle({onToggle:r}):Object(l.createElement)(v.Dropdown,{className:"block-editor-inserter",contentClassName:u()("block-editor-inserter__popover",{"is-quick":o}),position:t,onToggle:this.onToggle,expandOnMobile:!0,headerTitle:Object(y.__)("Add a block"),renderToggle:this.renderToggle,renderContent:this.renderContent,onClose:c})}}]),o}(l.Component),Js=Object(b.compose)([Object(m.withSelect)((function(e,t){var n=t.clientId,r=t.rootClientId,o=e(vr),c=o.getBlockRootClientId,i=o.hasInserterItems,a=o.__experimentalGetAllowedBlocks,l=e(p.store).getBlockVariations,s=a(r=r||c(n)||void 0),u=1===Object(d.size)(s)&&0===Object(d.size)(l(s[0].name,"inserter")),b=!1;return u&&(b=s[0]),{hasItems:i(r),hasSingleBlockType:u,blockTitle:b?b.title:"",allowedBlockType:b,rootClientId:r}})),Object(m.withDispatch)((function(e,t,n){var r=n.select;return{insertOnlyAllowedBlock:function(){var n=t.rootClientId,o=t.clientId,c=t.isAppender,i=t.hasSingleBlockType,a=t.allowedBlockType,l=t.onSelectOrClose;if(i){(0,e(vr).insertBlock)(Object(p.createBlock)(a.name),function(){var e=r(vr),t=e.getBlockIndex,i=e.getBlockSelectionEnd,a=e.getBlockOrder;if(o)return t(o,n);var l=i();return!c&&l?t(l,n)+1:a(n).length}(),n),l&&l();var s=Object(y.sprintf)(// translators: %s: the name of the block that has been added
44
+ Object(y.__)("%s block added"),a.title);Object(Tt.speak)(s)}}}})),Object(b.ifCondition)((function(e){var t=e.hasItems,n=e.isAppender,r=e.rootClientId,o=e.clientId;return t||!n&&!r&&!o}))])(Zs),eu=Object(b.compose)(Object(m.withSelect)((function(e,t){var n=e(vr),r=n.getBlockCount,o=n.getBlockName,c=n.isBlockValid,i=n.getSettings,a=n.getTemplateLock,l=!r(t.rootClientId),s=o(t.lastBlockClientId)===Object(p.getDefaultBlockName)(),u=c(t.lastBlockClientId),d=i().bodyPlaceholder;return{isVisible:l||!s||!u,showPrompt:l,isLocked:!!a(t.rootClientId),placeholder:d}})),Object(m.withDispatch)((function(e,t){var n=e(vr),r=n.insertDefaultBlock,o=n.startTyping;return{onAppend:function(){var e=t.rootClientId;r(void 0,e),o()}}})))((function(e){var t=e.isLocked,n=e.isVisible,r=e.onAppend,o=e.showPrompt,c=e.placeholder,i=e.rootClientId;if(t||!n)return null;var a=Object(es.decodeEntities)(c)||Object(y.__)("Start writing or type / to choose a block");return Object(l.createElement)("div",{"data-root-client-id":i||"",className:"wp-block block-editor-default-block-appender"},Object(l.createElement)(Fl.a,{role:"button","aria-label":Object(y.__)("Add block"),className:"block-editor-default-block-appender__content",readOnly:!0,onFocus:r,value:o?a:""}),Object(l.createElement)(Js,{rootClientId:i,position:"bottom right",isAppender:!0,__experimentalIsQuick:!0}))})),tu=Object(l.forwardRef)((function(e,t){var n=e.rootClientId,r=e.className,o=e.onFocus,c=e.tabIndex;return Object(l.createElement)(Js,{position:"bottom center",rootClientId:n,__experimentalIsQuick:!0,renderToggle:function(e){var n,i=e.onToggle,a=e.disabled,s=e.isOpen,d=e.blockTitle,b=e.hasSingleBlockType;n=b?Object(y.sprintf)(// translators: %s: the name of the block when there is only one
45
+ Object(y._x)("Add %s","directly add the only allowed block"),d):Object(y._x)("Add block","Generic label for block inserter button");var f=!b,p=Object(l.createElement)(v.Button,{ref:t,onFocus:o,tabIndex:c,className:u()(r,"block-editor-button-block-appender"),onClick:i,"aria-haspopup":f?"true":void 0,"aria-expanded":f?s:void 0,disabled:a,label:n},!b&&Object(l.createElement)(v.VisuallyHidden,{as:"span"},n),Object(l.createElement)(cs.a,{icon:ts.a}));return(f||b)&&(p=Object(l.createElement)(v.Tooltip,{text:n},p)),p},isAppender:!0})}));function nu(e){e.stopPropagation()}Object(l.createContext)();var ru=Object(m.withSelect)((function(e,t){var n=t.rootClientId,r=e(vr),o=r.getBlockOrder,c=r.canInsertBlockType,i=r.getTemplateLock,a=r.getSelectedBlockClientId;return{isLocked:!!i(n),blockClientIds:o(n),canInsertDefaultBlock:c(Object(p.getDefaultBlockName)(),n),selectedBlockClientId:a()}}))((function(e){var t,n=e.blockClientIds,r=e.rootClientId,o=e.canInsertDefaultBlock,c=e.isLocked,i=e.renderAppender,a=e.className,s=e.selectedBlockClientId,b=e.tagName,f=void 0===b?"div":b;if(c||!1===i)return null;if(i)t=Object(l.createElement)(i,null);else{var p=!r,m=s===r,v=s&&!n.includes(s);if(!p&&!m&&(!s||v))return null;t=o?Object(l.createElement)(eu,{rootClientId:r,lastBlockClientId:Object(d.last)(n)}):Object(l.createElement)(tu,{rootClientId:r,className:"block-list-appender__toggle"})}return Object(l.createElement)(f,{tabIndex:-1,onFocus:nu,className:u()("block-list-appender","wp-block",a)},t)}));function ou(e,t,n,r,o,c,i){return function(a){var l=function(e){var t={srcRootClientId:null,srcClientIds:null,srcIndex:null,type:null,blocks:null};if(!e.dataTransfer)return t;try{t=Object.assign(t,JSON.parse(e.dataTransfer.getData("text")))}catch(e){return t}return t}(a),s=l.srcRootClientId,u=l.srcClientIds,d=l.type,b=l.blocks;if("inserter"===d&&(i(),c(b,t,e,!0,null)),"block"===d){var f=n(u[0],s);if(s===e&&f===t)return;if(u.includes(e)||r(u).some((function(t){return t===e})))return;var p=s===e,m=u.length;o(u,s,e,p&&f<t?t-m:t)}}}function cu(e,t,n,r,o,c){return function(i){if(n){var a=Object(p.findTransform)(Object(p.getBlockTransforms)("from"),(function(t){return"files"===t.type&&o(t.blockName,e)&&t.isMatch(i)}));if(a){var l=a.transform(i,r);c(l,t,e)}}}}function iu(e,t,n){return function(r){var o=Object(p.pasteHandler)({HTML:r,mode:"BLOCKS"});o.length&&n(o,t,e)}}function au(e,t){var n=Object(m.useSelect)((function(e){var t=e(vr);return{canInsertBlockType:t.canInsertBlockType,getBlockIndex:t.getBlockIndex,getClientIdsOfDescendants:t.getClientIdsOfDescendants,hasUploadPermissions:(0,t.getSettings)().mediaUpload}}),[]),r=n.canInsertBlockType,o=n.getBlockIndex,c=n.getClientIdsOfDescendants,i=n.hasUploadPermissions,a=Object(m.useDispatch)(vr),l=a.insertBlocks,s=a.moveBlocksToPosition,u=a.updateBlockAttributes;return{onDrop:ou(e,t,o,c,s,l,a.clearSelectedBlock),onFilesDrop:cu(e,t,i,u,r,l),onHTMLDrop:iu(e,t,l)}}function lu(e,t,n){var r,o="top"===n||"bottom"===n,c=e.x,i=e.y,a=o?c:i,l=o?i:c,s=o?t.left:t.top,u=o?t.right:t.bottom,d=t[n];return r=a>=s&&a<=u?a:a<u?s:u,Math.sqrt(Math.pow(a-r,2)+Math.pow(l-d,2))}function su(e,t){var n,r,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:["top","bottom","left","right"];return o.forEach((function(o){var c=lu(e,t,o);(void 0===n||c<n)&&(n=c,r=o)})),[n,r]}function uu(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function du(e){var t=e.clientId,n=e.rootClientId,r=e.setIsInserterForced;return Object(l.createElement)("div",{className:u()("block-editor-block-list__insertion-point-inserter")},Object(l.createElement)(Js,{position:"bottom center",clientId:t,rootClientId:n,__experimentalIsQuick:!0,onToggle:r,onSelectOrClose:function(){return r(!1)}}))}function bu(e){var t=e.clientId,n=e.selectedRootClientId,r=e.isInserterShown,o=e.isInserterForced,c=e.setIsInserterForced,i=e.containerRef,a=e.showInsertionPoint,s=Object(m.useDispatch)(vr).selectBlock,d=Object(l.useRef)(),b=Object(m.useSelect)((function(e){var r,o=e(vr),c=o.getBlockOrder,a=o.getBlockRootClientId,l=o.getBlockListSettings,s=o.getMultiSelectedBlockClientIds,u=o.getSelectedBlockClientId,d=o.hasMultiSelection,b=o.getSettings,f=i.current.ownerDocument,p=t?a(t):n,m=c(p);if(!m.length)return{};var v=t||m[m.length-1],g=v===m[m.length-1]?null:m[m.indexOf(v)+1],O=b().hasReducedUI,h=s(),j=u(),k=(null===(r=l(p))||void 0===r?void 0:r.orientation)||"vertical";return{previousElement:rc(v,f),nextElement:rc(g,f),nextClientId:g,isHidden:O||(d()?g&&h.includes(g):g&&"vertical"===k&&g===j),orientation:k,rootClientId:p}}),[t,n]),f=b.previousElement,p=b.nextElement,g=b.orientation,O=b.isHidden,h=b.nextClientId,j=b.rootClientId,k=Object(l.useMemo)((function(){if(!f)return{};var e=f.getBoundingClientRect(),t=p?p.getBoundingClientRect():null;if("vertical"===g)return{width:f.offsetWidth,height:t?t.top-e.bottom:0};var n=0;return p&&(n=Object(y.isRTL)()?e.left-t.right:t.left-e.right),{width:n,height:f.offsetHeight}}),[f,p]),_=Object(l.useCallback)((function(){var e=f.getBoundingClientRect(),t=p?p.getBoundingClientRect():null;return"vertical"===g?{top:e.bottom,left:e.left,right:e.right,bottom:t?t.top:e.bottom}:Object(y.isRTL)()?{top:e.top,left:t?t.right:e.left,right:e.left,bottom:e.bottom}:{top:e.top,left:e.right,right:t?t.left:e.right,bottom:e.bottom}}),[f,p]);if(!f)return null;var E=u()("block-editor-block-list__insertion-point","is-"+g);return Object(l.createElement)(v.Popover,{noArrow:!0,animate:!1,getAnchorRect:_,focusOnMount:!1,className:"block-editor-block-list__insertion-point-popover",__unstableSlotName:"block-toolbar"},Object(l.createElement)("div",{ref:d,tabIndex:-1,onClick:function(e){e.target===d.current&&h&&s(h,-1)},onFocus:function(e){e.target!==d.current&&c(!0)},className:E,style:k},!O&&(a||r||o)&&Object(l.createElement)("div",{className:"block-editor-block-list__insertion-point-indicator"}),!O&&(r||o)&&Object(l.createElement)(du,{rootClientId:j,clientId:h,setIsInserterForced:c})))}function fu(e){var t=e(vr),n=t.getSelectedBlockClientId,r=t.getMultiSelectedBlocksEndClientId,o=t.getPreviousBlockClientId,c=t.getNextBlockClientId,i=t.hasBlockMovingClientId,a=t.getBlockIndex,l=t.getBlockRootClientId,s=t.getClientIdsOfDescendants,u=t.canInsertBlockType,d=t.getBlockName,b=n(),f=r();return{selectedBlockClientId:b,selectionBeforeEndClientId:o(f||b),selectionAfterEndClientId:c(f||b),hasBlockMovingClientId:i,getBlockIndex:a,getBlockRootClientId:l,getClientIdsOfDescendants:s,canInsertBlockType:u,getBlockName:d}}var pu=function(e){var t=e.clientId,n=e.rootClientId,r=e.blockElement,o=Object(m.useSelect)((function(e){var r,o=e(vr),c=o.__unstableGetBlockWithoutInnerBlocks,i=o.getBlockIndex,a=o.hasBlockMovingClientId,l=o.getBlockListSettings,s=i(t,n),u=c(t);return{index:s,name:u.name,attributes:u.attributes,blockMovingMode:a(),orientation:null===(r=l(n))||void 0===r?void 0:r.orientation}}),[t,n]),c=o.index,i=o.name,a=o.attributes,s=o.blockMovingMode,d=o.orientation,b=Object(m.useDispatch)(vr),f=b.setNavigationMode,g=b.removeBlock,O=Object(l.useRef)();Object(l.useEffect)((function(){O.current.focus(),window.navigator.platform.indexOf("Win")>-1&&Object(Tt.speak)(N)}),[]);var h=Object(m.useSelect)(fu,[]),j=h.selectedBlockClientId,k=h.selectionBeforeEndClientId,y=h.selectionAfterEndClientId,_=h.hasBlockMovingClientId,E=h.getBlockIndex,w=h.getBlockRootClientId,C=h.getClientIdsOfDescendants,S=Object(m.useDispatch)(vr),B=S.selectBlock,I=S.clearSelectedBlock,x=S.setBlockMovingClientId,P=S.moveBlockToPosition,T=Object(p.getBlockType)(i),N=Object(p.__experimentalGetAccessibleBlockLabel)(T,a,c+1,d),D=u()("block-editor-block-list__block-selection-button",{"is-block-moving-mode":!!s});return Object(l.createElement)("div",{className:D},Object(l.createElement)(v.Button,{ref:O,onClick:function(){return f(!1)},onKeyDown:function(e){var n=e.keyCode,o=n===Mc.UP,c=n===Mc.DOWN,i=n===Mc.LEFT,a=n===Mc.RIGHT,l=n===Mc.TAB,s=n===Mc.ESCAPE,u=n===Mc.ENTER,d=n===Mc.SPACE,b=e.shiftKey;if(n===Mc.BACKSPACE||n===Mc.DELETE)return g(t),void e.preventDefault();var f,p=l&&b||o,m=l&&!b||c,v=i,O=a;if(p)f=k;else if(m)f=y;else if(v){var h;f=null!==(h=w(j))&&void 0!==h?h:j}else if(O){var S;f=null!==(S=C([j])[0])&&void 0!==S?S:j}var T=_();if(s&&T&&x(null),(u||d)&&T){var N=w(T),D=w(j),A=E(T,N),R=E(j,D);A<R&&N===D&&(R-=1),P(T,N,D,R),B(T),x(null)}if(m||p||v||O)if(f)e.preventDefault(),B(f);else if(l&&j){var L;m?(L=dl.focus.tabbable.findNext(r))||(L=r.ownerDocument.defaultView.frameElement,L=dl.focus.tabbable.findNext(L)):L=dl.focus.tabbable.findPrevious(r),L&&(e.preventDefault(),L.focus(),I())}},label:N},Object(l.createElement)(Ga,{clientId:t})))};function mu(e){return Array.from(e.querySelectorAll("[data-toolbar-item]"))}var vu=function(e){var t=e.children,n=e.focusOnMount,r=e.__experimentalInitialIndex,o=e.__experimentalOnIndexChange,c=Object(j.a)(e,["children","focusOnMount","__experimentalInitialIndex","__experimentalOnIndexChange"]),a=Object(l.useRef)(),s=function(e){var t=Object(l.useState)(!0),n=Object(Ro.a)(t,2),r=n[0],o=n[1],c=Object(l.useCallback)((function(){var t=!dl.focus.tabbable.find(e.current).some((function(e){return!("toolbarItem"in e.dataset)}));t||Dt()("Using custom components as toolbar controls",{alternative:"ToolbarItem or ToolbarButton components",link:"https://developer.wordpress.org/block-editor/components/toolbar-button/#inside-blockcontrols"}),o(t)}),[]);return Object(l.useLayoutEffect)((function(){var t=new window.MutationObserver(c);return t.observe(e.current,{childList:!0,subtree:!0}),function(){return t.disconnect()}}),[r]),r}(a);return function(e,t,n,r,o){var c=Object(l.useState)(t),i=Object(Ro.a)(c,1)[0],a=Object(l.useState)(r),s=Object(Ro.a)(a,1)[0],u=Object(l.useCallback)((function(){var t,n,r;t=e.current,n=dl.focus.tabbable.find(t),(r=Object(Ro.a)(n,1)[0])&&r.focus()}),[]);Object(al.useShortcut)("core/block-editor/focus-toolbar",u,{bindGlobal:!0,eventName:"keydown"}),Object(l.useEffect)((function(){i&&u()}),[n,i,u]),Object(l.useEffect)((function(){var t=0;return s&&!i&&(t=window.requestAnimationFrame((function(){var t,n=mu(e.current),r=s||0;n[r]&&(t=e.current).contains(t.ownerDocument.activeElement)&&n[r].focus()}))),function(){if(window.cancelAnimationFrame(t),o){var n=mu(e.current).findIndex((function(e){return 0===e.tabIndex}));o(n)}}}),[s,i])}(a,n,s,r,o),s?Object(l.createElement)(v.Toolbar,Object(i.a)({label:c["aria-label"],ref:a},c),t):Object(l.createElement)(v.NavigableMenu,Object(i.a)({orientation:"horizontal",role:"toolbar",ref:a},c),t)},gu=function(e){var t,n,r,o,c=e.children,i=e.clientIds,a=e.cloneClassname,s=e.onDragStart,u=e.onDragEnd,d=e.elementId,b=Object(m.useSelect)((function(e){var t,n=e(vr),r=n.getBlockRootClientId,o=n.getTemplateLock,c=n.getBlockName,a=r(i[0]),l=a?o(a):null,s=c(i[0]);return{srcRootClientId:a,isDraggable:"all"!==l,icon:null===(t=Object(p.getBlockType)(s))||void 0===t?void 0:t.icon}}),[i]),f=b.srcRootClientId,g=b.isDraggable,O=b.icon,h=Object(l.useRef)(!1),j=(t=Object(l.useRef)(null),n=Object(l.useRef)(null),r=Object(l.useRef)(null),o=Object(l.useRef)(null),Object(l.useEffect)((function(){return function(){o.current&&(clearInterval(o.current),o.current=null)}}),[]),[Object(l.useCallback)((function(e){t.current=e.clientY,r.current=Object(dl.getScrollContainer)(e.target),o.current=setInterval((function(){if(r.current&&n.current){var e=r.current.scrollTop+n.current;r.current.scroll({top:e})}}),25)}),[]),Object(l.useCallback)((function(e){if(r.current){var o=r.current.offsetHeight,c=t.current-r.current.offsetTop,i=e.clientY-r.current.offsetTop;if(e.clientY>c){var a=Math.max(o-c-50,0),l=Math.max(i-c-50,0)/a;n.current=25*l}else if(e.clientY<c){var s=Math.max(c-50,0),u=Math.max(c-i-50,0)/s;n.current=-25*u}else n.current=0}}),[]),function(){t.current=null,r.current=null,o.current&&(clearInterval(o.current),o.current=null)}]),k=Object(Ro.a)(j,3),y=k[0],_=k[1],E=k[2],w=Object(m.useDispatch)(vr),C=w.startDraggingBlocks,S=w.stopDraggingBlocks;if(Object(l.useEffect)((function(){return function(){h.current&&S()}}),[]),!g)return c({isDraggable:!1});var B={type:"block",srcClientIds:i,srcRootClientId:f};return Object(l.createElement)(v.Draggable,{cloneClassname:a,elementId:d,transferData:B,onDragStart:function(e){C(i),h.current=!0,y(e),s&&s()},onDragOver:_,onDragEnd:function(){S(),h.current=!1,E(),u&&u()},__experimentalDragComponent:Object(l.createElement)(hs,{count:i.length,icon:O})},(function(e){var t=e.onDraggableStart,n=e.onDraggableEnd;return c({draggable:!0,onDragStart:t,onDragEnd:n})}))},Ou=Object(m.withSelect)((function(e,t){var n,r=t.clientIds,o=e(vr),c=o.getBlock,i=o.getBlockIndex,a=o.getBlockListSettings,l=o.getTemplateLock,s=o.getBlockOrder,u=o.getBlockRootClientId,b=Object(d.castArray)(r),f=Object(d.first)(b),m=c(f),v=u(Object(d.first)(b)),g=i(f,v),O=0===g,h=i(Object(d.last)(b),v)===s(v).length-1;return{blockType:m?Object(p.getBlockType)(m.name):null,isLocked:"all"===l(v),rootClientId:v,firstIndex:g,isFirst:O,isLast:h,orientation:null===(n=a(v))||void 0===n?void 0:n.orientation}}))((function(e){var t=e.isFirst,n=e.isLast,r=e.clientIds,o=e.isLocked,c=e.isHidden,a=e.rootClientId,s=e.orientation,d=e.hideDragHandle,b=Object(l.useState)(!1),f=Object(Ro.a)(b,2),p=f[0],m=f[1],g=function(){return m(!0)},O=function(){return m(!1)};if(o||t&&n&&!a)return null;var h=Object(y.__)("Drag");return Object(l.createElement)("div",{className:u()("block-editor-block-mover",{"is-visible":p||!c,"is-horizontal":"horizontal"===s})},!d&&Object(l.createElement)(gu,{clientIds:r,cloneClassname:"block-editor-block-mover__drag-clone"},(function(e){return Object(l.createElement)(v.Button,Object(i.a)({icon:Os,className:"block-editor-block-mover__drag-handle","aria-hidden":"true",label:h,tabIndex:"-1"},e))})),Object(l.createElement)(v.ToolbarGroup,{className:"block-editor-block-mover__move-button-container"},Object(l.createElement)(v.ToolbarItem,{onFocus:g,onBlur:O},(function(e){return Object(l.createElement)(El,Object(i.a)({clientIds:r},e))})),Object(l.createElement)(v.ToolbarItem,{onFocus:g,onBlur:O},(function(e){return Object(l.createElement)(wl,Object(i.a)({clientIds:r},e))}))))})),hu=window,ju=hu.clearTimeout,ku=hu.setTimeout;function yu(e){var t=e.ref,n=e.isFocused,r=e.debounceTimeout,o=void 0===r?200:r,c=e.onChange,i=void 0===c?d.noop:c,a=Object(l.useState)(!1),s=Object(Ro.a)(a,2),u=s[0],b=s[1],f=Object(l.useRef)(),p=function(e){null!=t&&t.current&&b(e),i(e)},m=function(){var e=f.current;e&&ju&&ju(e)};return Object(l.useEffect)((function(){return function(){return m()}}),[]),{showMovers:u,debouncedShowMovers:function(e){e&&e.stopPropagation(),m(),u||p(!0)},debouncedHideMovers:function(e){e&&e.stopPropagation(),m(),f.current=ku((function(){var e;e=(null==t?void 0:t.current)&&t.current.matches(":hover"),!n&&!e&&p(!1)}),o)}}}function _u(e){var t=e.ref,n=e.debounceTimeout,r=void 0===n?200:n,o=e.onChange,c=void 0===o?d.noop:o,i=Object(l.useState)(!1),a=Object(Ro.a)(i,2),s=a[0],u=a[1],b=yu({ref:t,debounceTimeout:r,isFocused:s,onChange:c}),f=b.showMovers,p=b.debouncedShowMovers,m=b.debouncedHideMovers,v=Object(l.useRef)(!1),g=function(){return(null==t?void 0:t.current)&&t.current.contains(t.current.ownerDocument.activeElement)};return Object(l.useEffect)((function(){var e=t.current,n=function(){g()&&(u(!0),p())},r=function(){g()||(u(!1),m())};return e&&!v.current&&(e.addEventListener("focus",n,!0),e.addEventListener("blur",r,!0),v.current=!0),function(){e&&(e.removeEventListener("focus",n),e.removeEventListener("blur",r))}}),[t,v,u,p,m]),{showMovers:f,gestures:{onMouseMove:p,onMouseLeave:m}}}function Eu(){var e=Object(m.useDispatch)(vr),t=e.selectBlock,n=e.toggleBlockHighlight,r=Object(m.useSelect)((function(e){var t=e(vr),n=t.getBlockName,r=t.getBlockParents,o=t.getSelectedBlockClientId,c=t.getSettings,i=e(p.store).hasBlockSupport,a=r(o()),l=a[a.length-1],s=n(l),u=Object(p.getBlockType)(s),d=c();return{parentBlockType:u,firstParentClientId:l,shouldHide:!i(u,"__experimentalParentSelector",!0),hasReducedUI:d.hasReducedUI}}),[]),o=r.parentBlockType,c=r.firstParentClientId,a=r.shouldHide,s=r.hasReducedUI,u=Object(l.useRef)(),d=_u({ref:u,onChange:function(e){e&&s||n(c,e)}}).gestures;return a?null:void 0!==c?Object(l.createElement)("div",Object(i.a)({className:"block-editor-block-parent-selector",key:c,ref:u},d),Object(l.createElement)(v.ToolbarButton,{className:"block-editor-block-parent-selector__button",onClick:function(){return t(c)},label:Object(y.sprintf)(
46
  /* translators: %s: Name of the block's parent. */
47
+ Object(y.__)("Select %s"),o.title),showTooltip:!0,icon:Object(l.createElement)(Aa,{icon:o.icon})})):null}var wu=Object(l.createElement)(_r.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(l.createElement)(_r.Path,{d:"M20.2 8v11c0 .7-.6 1.2-1.2 1.2H6v1.5h13c1.5 0 2.7-1.2 2.7-2.8V8zM18 16.4V4.6c0-.9-.7-1.6-1.6-1.6H4.6C3.7 3 3 3.7 3 4.6v11.8c0 .9.7 1.6 1.6 1.6h11.8c.9 0 1.6-.7 1.6-1.6zm-13.5 0V4.6c0-.1.1-.1.1-.1h11.8c.1 0 .1.1.1.1v11.8c0 .1-.1.1-.1.1H4.6l-.1-.1z"}));function Cu(e){var t=e.blocks;return Object(l.createElement)("div",{className:"block-editor-block-switcher__popover__preview__parent"},Object(l.createElement)("div",{className:"block-editor-block-switcher__popover__preview__container"},Object(l.createElement)(v.Popover,{className:"block-editor-block-switcher__preview__popover",position:"bottom right",focusOnMount:!1},Object(l.createElement)("div",{className:"block-editor-block-switcher__preview"},Object(l.createElement)("div",{className:"block-editor-block-switcher__preview-title"},Object(y.__)("Preview")),Object(l.createElement)(ps,{viewportWidth:500,blocks:t})))))}var Su=function(e){var t=e.className,n=e.possibleBlockTransformations,r=e.onSelect,o=e.blocks,c=Object(l.useState)(),i=Object(Ro.a)(c,2),a=i[0],s=i[1];return Object(l.createElement)(v.MenuGroup,{label:Object(y.__)("Transform to"),className:t},a&&Object(l.createElement)(Cu,{blocks:Object(p.switchToBlockType)(o,a)}),n.map((function(e){var t=e.name,n=e.icon,o=e.title,c=e.isDisabled;return Object(l.createElement)(v.MenuItem,{key:t,className:Object(p.getBlockMenuDefaultClassName)(t),onClick:function(e){e.preventDefault(),r(t)},disabled:c,onMouseLeave:function(){return s(null)},onMouseEnter:function(){return s(t)}},Object(l.createElement)(Aa,{icon:n,showColors:!0}),o)})))};function Bu(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Iu(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function xu(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Iu(Object(n),!0).forEach((function(t){Object(a.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Iu(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Pu(e){var t=e.genericPreviewBlock,n=e.style,r=e.isActive,o=e.onBlur,c=e.onHover,i=e.onSelect,a=e.styleClassName,s=e.itemRole,d=Object(l.useMemo)((function(){return xu(xu({},t),{},{attributes:xu(xu({},t.attributes),{},{className:a})})}),[t,a]);return Object(l.createElement)("div",{key:n.name,className:u()("block-editor-block-styles__item",{"is-active":r}),onClick:function(){return i()},onKeyDown:function(e){Mc.ENTER!==e.keyCode&&Mc.SPACE!==e.keyCode||(e.preventDefault(),i())},onMouseEnter:c,onMouseLeave:o,role:s||"button",tabIndex:"0","aria-label":n.label||n.name},Object(l.createElement)("div",{className:"block-editor-block-styles__item-preview"},Object(l.createElement)(ps,{viewportWidth:500,blocks:d})),Object(l.createElement)("div",{className:"block-editor-block-styles__item-label"},n.label||n.name))}var Tu=function(e){var t=e.clientId,n=e.onSwitch,r=void 0===n?d.noop:n,o=e.onHoverClassName,c=void 0===o?d.noop:o,i=e.itemRole,a=Object(m.useSelect)((function(e){var n=e(vr).getBlock,r=e(p.store).getBlockStyles,o=n(t);return{block:o,type:Object(p.getBlockType)(o.name),styles:r(o.name),className:o.attributes.className||""}}),[t]),s=a.styles,u=a.block,b=a.type,f=a.className,v=Object(m.useDispatch)(vr).updateBlockAttributes,g=function(e,t){return Object(l.useMemo)((function(){return t.example?Object(p.getBlockFromExample)(e.name,{attributes:t.example.attributes,innerBlocks:t.example.innerBlocks}):Object(p.cloneBlock)(e)}),[t.example?e.name:e,t])}(u,b);if(!s||0===s.length)return null;var O=Object(d.find)(s,"isDefault")?s:[{name:"default",label:Object(y._x)("Default","block style"),isDefault:!0}].concat(Object(k.a)(s)),h=function(e,t){var n,r=function(e,t){var n;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return Bu(e,void 0);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Bu(e,void 0):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var c,i=!0,a=!1;return{s:function(){n=e[Symbol.iterator]()},n:function(){var e=n.next();return i=e.done,e},e:function(e){a=!0,c=e},f:function(){try{i||null==n.return||n.return()}finally{if(a)throw c}}}}(new ci.a(t).values());try{for(r.s();!(n=r.n()).done;){var o=n.value;if(-1!==o.indexOf("is-style-")){var c=o.substring(9),i=Object(d.find)(e,{name:c});if(i)return i}}}catch(e){r.e(e)}finally{r.f()}return Object(d.find)(e,"isDefault")}(O,f);return Object(l.createElement)("div",{className:"block-editor-block-styles"},O.map((function(e){var n=function(e,t,n){var r=new ci.a(e);return t&&r.remove("is-style-"+t.name),r.add("is-style-"+n.name),r.value}(f,h,e);return Object(l.createElement)(Pu,{genericPreviewBlock:g,className:f,isActive:h===e,key:e.name,onSelect:function(){v(t,{className:n}),c(null),r()},onBlur:function(){return c(null)},onHover:function(){return c(n)},style:e,styleClassName:n,itemRole:i})})))};function Nu(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Du(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Nu(Object(n),!0).forEach((function(t){Object(a.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Nu(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Au(e){var t=e.hoveredBlock,n=t.name,r=t.clientId,o=e.onSwitch,c=Object(l.useState)(),i=Object(Ro.a)(c,2),a=i[0],s=i[1],u=Object(m.useSelect)((function(e){return e(p.store).getBlockType(n)}),[n]);return Object(l.createElement)(v.MenuGroup,{label:Object(y.__)("Styles"),className:"block-editor-block-switcher__styles__menugroup"},a&&Object(l.createElement)(Cu,{blocks:u.example?Object(p.getBlockFromExample)(u.name,{attributes:Du(Du({},u.example.attributes),{},{className:a}),innerBlocks:u.example.innerBlocks}):Object(p.cloneBlock)(u,{className:a})}),Object(l.createElement)(Tu,{clientId:r,onSwitch:o,onHoverClassName:s,itemRole:"menuitem"}))}function Ru(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Lu(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Ru(Object(n),!0).forEach((function(t){Object(a.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ru(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Mu=function(e){var t=e.clientIds,n=e.blocks,r=Object(m.useDispatch)(vr).replaceBlocks,o=za(n[0].clientId),c=Object(m.useSelect)((function(e){var r,c,i=e(vr),a=i.getBlockRootClientId,l=i.getBlockTransformItems,s=e(p.store),u=s.getBlockStyles,b=s.getBlockType,f=a(Object(d.castArray)(t)[0]),m=Object(Ro.a)(n,1)[0].name,v=1===n.length,g=v&&u(m);return r=v?null==o?void 0:o.icon:1===Object(d.uniq)(n.map((function(e){return e.name}))).length?null===(c=b(m))||void 0===c?void 0:c.icon:wu,{possibleBlockTransformations:l(n,f),hasBlockStyles:!(null==g||!g.length),icon:r,blockTitle:b(m).title}}),[t,n,null==o?void 0:o.icon]),i=c.possibleBlockTransformations,a=c.hasBlockStyles,s=c.icon,u=c.blockTitle,b=1===n.length&&Object(p.isReusableBlock)(n[0]),f=1===n.length&&Object(p.isTemplatePart)(n[0]),g=!!i.length;if(!a&&!g)return Object(l.createElement)(v.ToolbarGroup,null,Object(l.createElement)(v.ToolbarButton,{disabled:!0,className:"block-editor-block-switcher__no-switcher-icon",title:u,icon:Object(l.createElement)(Aa,{icon:s,showColors:!0})}));var O=u,h=1===n.length?Object(y.__)("Change block type or style"):Object(y.sprintf)(
48
  /* translators: %s: number of blocks. */
49
+ Object(y._n)("Change type of %d block","Change type of %d blocks",n.length),n.length);return Object(l.createElement)(v.ToolbarGroup,null,Object(l.createElement)(v.ToolbarItem,null,(function(e){return Object(l.createElement)(v.DropdownMenu,{className:"block-editor-block-switcher",label:O,popoverProps:{position:"bottom right",isAlternate:!0,className:"block-editor-block-switcher__popover"},icon:Object(l.createElement)(l.Fragment,null,Object(l.createElement)(Aa,{icon:s,className:"block-editor-block-switcher__toggle",showColors:!0}),(b||f)&&Object(l.createElement)("span",{className:"block-editor-block-switcher__toggle-text"},Object(l.createElement)(Ga,{clientId:t}))),toggleProps:Lu({describedBy:h},e),menuProps:{orientation:"both"}},(function(e){var o=e.onClose;return(a||g)&&Object(l.createElement)("div",{className:"block-editor-block-switcher__container"},g&&Object(l.createElement)(Su,{className:"block-editor-block-switcher__transforms__menugroup",possibleBlockTransformations:i,blocks:n,onSelect:function(e){!function(e){r(t,Object(p.switchToBlockType)(n,e))}(e),o()}}),a&&Object(l.createElement)(Au,{hoveredBlock:n[0],onSwitch:o}))}))})))},Fu=function(e){var t=e.clientIds,n=Object(m.useSelect)((function(e){return e(vr).getBlocksByClientId(t)}),[t]);return!n.length||n.some((function(e){return!e}))?null:Object(l.createElement)(Mu,{clientIds:t,blocks:n})},Vu=n(52);function Hu(){var e=Object(m.useSelect)((function(e){return e(vr)}),[]).getBlockName,t=Object(m.useSelect)((function(e){return e(p.store)}),[]).getBlockType,n=Object(m.useDispatch)(Bs.store).createSuccessNotice;return Object(l.useCallback)((function(r,o){var c="";if(1===o.length){var i=o[0],a=t(e(i)).title;c="copy"===r?Object(y.sprintf)(// Translators: Name of the block being copied, e.g. "Paragraph".
50
  Object(y.__)('Copied "%s" to clipboard.'),a):Object(y.sprintf)(// Translators: Name of the block being cut, e.g. "Paragraph".
51
  Object(y.__)('Moved "%s" to clipboard.'),a)}else c="copy"===r?Object(y.sprintf)(// Translators: %d: Number of blocks being copied.
52
  Object(y._n)("Copied %d block to clipboard.","Copied %d blocks to clipboard.",o.length),o.length):Object(y.sprintf)(// Translators: %d: Number of blocks being cut.
53
+ Object(y._n)("Moved %d block to clipboard.","Moved %d blocks to clipboard.",o.length),o.length);n(c,{type:"snackbar"})}),[])}function zu(){var e=Object(m.useSelect)((function(e){return e(vr)}),[]),t=e.getBlocksByClientId,n=e.getSelectedBlockClientIds,r=e.hasMultiSelection,o=e.getSettings,c=Object(m.useDispatch)(vr),i=c.flashBlock,a=c.removeBlocks,l=c.replaceBlocks,s=Hu();return Object(b.useRefEffect)((function(e){function c(c){var u=n();if(0!==u.length){if(!r()){var d=c.target.ownerDocument;if("copy"===c.type||"cut"===c.type?Object(dl.documentHasUncollapsedSelection)(d):Object(dl.documentHasSelection)(d))return}if(e.contains(c.target)){if(c.preventDefault(),"copy"===c.type||"cut"===c.type){1===u.length&&i(u[0]),s(c.type,u);var b=t(u),f=Object(p.serialize)(b);c.clipboardData.setData("text/plain",f),c.clipboardData.setData("text/html",f)}if("cut"===c.type)a(u);else if("paste"===c.type){var m=o().__experimentalCanUserUseUnfilteredHTML,v=function(e){var t=e.clipboardData,n="",r="";try{n=t.getData("text/plain"),r=t.getData("text/html")}catch(e){try{r=t.getData("Text")}catch(e){return}}var o=Object(dl.getFilesFromDataTransfer)(t).filter((function(e){var t=e.type;return/^image\/(?:jpe?g|png|gif)$/.test(t)}));return o.length&&!r&&(r=o.map((function(e){return'<img src="'.concat(Object(Vu.createBlobURL)(e),'">')})).join(""),n=""),{html:r,plainText:n}}(c),g=v.plainText,O=v.html,h=Object(p.pasteHandler)({HTML:O,plainText:g,mode:"BLOCKS",canUserUseUnfilteredHTML:m});l(u,h,h.length-1,-1)}}}}return e.addEventListener("copy",c),e.addEventListener("cut",c),e.addEventListener("paste",c),function(){e.removeEventListener("copy",c),e.removeEventListener("cut",c),e.removeEventListener("paste",c)}}),[])}var Gu=function(e){var t=e.children;return Object(l.createElement)("div",{ref:zu()},t)};function Uu(e){var t=e.clientIds,n=e.children,r=e.__experimentalUpdateSelection,o=Object(m.useSelect)((function(e){return e(vr)}),[]),c=o.canInsertBlockType,i=o.getBlockRootClientId,a=o.getBlocksByClientId,l=o.getTemplateLock,s=Object(m.useSelect)((function(e){return e(p.store)}),[]),u=s.getDefaultBlockName,b=s.getGroupingBlockName,f=a(t),v=i(t[0]),g=Object(d.every)(f,(function(e){return!!e&&Object(p.hasBlockSupport)(e.name,"multiple",!0)&&c(e.name,v)})),O=c(u(),v),h=Object(m.useDispatch)(vr),j=h.removeBlocks,k=h.replaceBlocks,y=h.duplicateBlocks,_=h.insertAfterBlock,E=h.insertBeforeBlock,w=h.flashBlock,C=h.setBlockMovingClientId,S=h.setNavigationMode,B=h.selectBlock,I=Hu();return n({canDuplicate:g,canInsertDefaultBlock:O,isLocked:!!l(v),rootClientId:v,blocks:f,onDuplicate:function(){return y(t,r)},onRemove:function(){return j(t,r)},onInsertBefore:function(){E(Object(d.first)(Object(d.castArray)(t)))},onInsertAfter:function(){_(Object(d.last)(Object(d.castArray)(t)))},onMoveTo:function(){S(!0),B(t[0]),C(t[0])},onGroup:function(){if(f.length){var e=b(),n=Object(p.switchToBlockType)(f,e);n&&k(t,n)}},onUngroup:function(){if(f.length){var e=f[0].innerBlocks;e.length&&k(t,e)}},onCopy:function(){var e=f.map((function(e){return e.clientId}));1===f.length&&w(e[0]),I("copy",e)}})}var Wu=Object(b.compose)([Object(m.withSelect)((function(e,t){var n=t.clientId,r=e(vr),o=r.getBlock,c=r.getBlockMode,i=r.getSettings,a=o(n),l=i().codeEditingEnabled;return{mode:c(n),blockType:a?Object(p.getBlockType)(a.name):null,isCodeEditingEnabled:l}})),Object(m.withDispatch)((function(e,t){var n=t.onToggle,r=void 0===n?d.noop:n,o=t.clientId;return{onToggleMode:function(){e(vr).toggleBlockMode(o),r()}}}))])((function(e){var t=e.blockType,n=e.mode,r=e.onToggleMode,o=e.small,c=void 0!==o&&o,i=e.isCodeEditingEnabled,a=void 0===i||i;if(!Object(p.hasBlockSupport)(t,"html",!0)||!a)return null;var s="visual"===n?Object(y.__)("Edit as HTML"):Object(y.__)("Edit visually");return Object(l.createElement)(v.MenuItem,{onClick:r},!c&&s)})),Ku=Object(b.compose)(Object(m.withSelect)((function(e,t){var n=t.clientId,r=e(vr).getBlock(n);return{block:r,shouldRender:r&&"core/html"===r.name}})),Object(m.withDispatch)((function(e,t){var n=t.block;return{onClick:function(){return e(vr).replaceBlocks(n.clientId,Object(p.rawHandler)({HTML:Object(p.getBlockContent)(n)}))}}})))((function(e){var t=e.shouldRender,n=e.onClick,r=e.small;if(!t)return null;var o=Object(y.__)("Convert to Blocks");return Object(l.createElement)(v.MenuItem,{onClick:n},!r&&o)})),qu=Object(v.createSlotFill)("__experimentalBlockSettingsMenuFirstItem"),$u=qu.Fill,Yu=qu.Slot;$u.Slot=Yu;var Xu=$u;function Qu(e){var t=e.clientIds,n=e.isGroupable,r=e.isUngroupable,o=e.blocksSelection,c=e.groupingBlockName,i=e.onClose,a=void 0===i?function(){}:i,s=Object(m.useDispatch)(vr).replaceBlocks;return n||r?Object(l.createElement)(l.Fragment,null,n&&Object(l.createElement)(v.MenuItem,{onClick:function(){var e;(e=Object(p.switchToBlockType)(o,c))&&s(t,e),a()}},Object(y._x)("Group","verb")),r&&Object(l.createElement)(v.MenuItem,{onClick:function(){var e;(e=o[0].innerBlocks).length&&s(t,e),a()}},Object(y._x)("Ungroup","Ungrouping blocks from within a Group block back into individual blocks within the Editor "))):null}function Zu(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Ju(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Zu(Object(n),!0).forEach((function(t){Object(a.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Zu(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var ed=Object(v.createSlotFill)("BlockSettingsMenuControls"),td=ed.Fill,nd=ed.Slot;td.Slot=function(e){var t,n=e.fillProps,r=e.clientIds,o=void 0===r?null:r,c=Object(m.useSelect)((function(e){var t=e(vr),n=t.getBlocksByClientId,r=t.getSelectedBlockClientIds,c=null!==o?o:r();return Object(d.map)(Object(d.compact)(n(c)),(function(e){return e.name}))}),[o]),a={clientIds:(t=Object(m.useSelect)((function(e){var t,n=e(vr),r=n.getBlockRootClientId,o=n.getBlocksByClientId,c=n.canInsertBlockType,i=n.getSelectedBlockClientIds,a=e(p.store).getGroupingBlockName,l=i(),s=a(),u=c(s,null!=l&&l.length?r(l[0]):void 0),d=o(l),b=1===d.length&&(null===(t=d[0])||void 0===t?void 0:t.name)===s;return{clientIds:l,isGroupable:u&&d.length&&!b,isUngroupable:b&&!!d[0].innerBlocks.length,blocksSelection:d,groupingBlockName:s}}),[])).clientIds,isGroupable:t.isGroupable,isUngroupable:t.isUngroupable,blocksSelection:t.blocksSelection,groupingBlockName:t.groupingBlockName},s=a.isGroupable||a.isUngroupable;return Object(l.createElement)(nd,{fillProps:Ju(Ju({},n),{},{selectedBlocks:c})},(function(e){if((null==e?void 0:e.length)>0||s)return Object(l.createElement)(v.MenuGroup,null,e,Object(l.createElement)(Qu,Object(i.a)({},a,{onClose:null==n?void 0:n.onClose})))}))};var rd=td,od={className:"block-editor-block-settings-menu__popover",position:"bottom right",isAlternate:!0},cd=function(e){var t=e.clientIds,n=e.__experimentalSelectBlock,r=e.children,o=Object(j.a)(e,["clientIds","__experimentalSelectBlock","children"]),c=Object(d.castArray)(t),a=c.length,s=c[0],u=Object(m.useSelect)((function(e){var t=e(al.store).getShortcutRepresentation;return{duplicate:t("core/block-editor/duplicate"),remove:t("core/block-editor/remove"),insertAfter:t("core/block-editor/insert-after"),insertBefore:t("core/block-editor/insert-before")}}),[]),b=Object(l.useCallback)(n?function(){var e=Object(ll.a)(Pt.a.mark((function e(t){var r;return Pt.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,t;case 2:(r=e.sent)&&r[0]&&n(r[0]);case 4:case"end":return e.stop()}}),e)})));return function(_x){return e.apply(this,arguments)}}():d.noop,[n]),f=1===a?Object(y.__)("Remove block"):Object(y.__)("Remove blocks");return Object(l.createElement)(Uu,{clientIds:t,__experimentalUpdateSelection:!n},(function(e){var n=e.canDuplicate,c=e.canInsertDefaultBlock,m=e.isLocked,g=e.onDuplicate,O=e.onInsertAfter,h=e.onInsertBefore,j=e.onRemove,k=e.onCopy,_=e.onMoveTo,E=e.blocks;return Object(l.createElement)(v.DropdownMenu,Object(i.a)({icon:sl.a,label:Object(y.__)("Options"),className:"block-editor-block-settings-menu",popoverProps:od,noIcons:!0},o),(function(e){var o=e.onClose;return Object(l.createElement)(l.Fragment,null,Object(l.createElement)(v.MenuGroup,null,Object(l.createElement)(Xu.Slot,{fillProps:{onClose:o}}),1===a&&Object(l.createElement)(Ku,{clientId:s}),Object(l.createElement)(v.ClipboardButton,{text:function(){return Object(p.serialize)(E)},role:"menuitem",className:"components-menu-item__button",onCopy:k},Object(y.__)("Copy")),n&&Object(l.createElement)(v.MenuItem,{onClick:Object(d.flow)(o,g,b),shortcut:u.duplicate},Object(y.__)("Duplicate")),c&&Object(l.createElement)(l.Fragment,null,Object(l.createElement)(v.MenuItem,{onClick:Object(d.flow)(o,h),shortcut:u.insertBefore},Object(y.__)("Insert before")),Object(l.createElement)(v.MenuItem,{onClick:Object(d.flow)(o,O),shortcut:u.insertAfter},Object(y.__)("Insert after"))),!m&&Object(l.createElement)(v.MenuItem,{onClick:Object(d.flow)(o,_)},Object(y.__)("Move to")),1===a&&Object(l.createElement)(Wu,{clientId:s,onToggle:o})),Object(l.createElement)(rd.Slot,{fillProps:{onClose:o},clientIds:t}),"function"==typeof r?r({onClose:o}):l.Children.map((function(e){return Object(l.cloneElement)(e,{onClose:o})})),Object(l.createElement)(v.MenuGroup,null,!m&&Object(l.createElement)(v.MenuItem,{onClick:Object(d.flow)(o,j,b),shortcut:u.remove},f)))}))}))},id=function(e){var t=e.clientIds,n=Object(j.a)(e,["clientIds"]);return Object(l.createElement)(v.ToolbarGroup,null,Object(l.createElement)(v.ToolbarItem,null,(function(e){return Object(l.createElement)(cd,Object(i.a)({clientIds:t,toggleProps:e},n))})))};function ad(e){var t=e.hideDragHandle,n=Object(m.useSelect)((function(e){var t=e(vr),n=t.getBlockName,r=t.getBlockMode,o=t.getSelectedBlockClientIds,c=t.isBlockValid,i=t.getBlockRootClientId,a=t.getSettings,l=o(),s=l[0],u=i(s),d=a();return{blockClientIds:l,blockClientId:s,blockType:s&&Object(p.getBlockType)(n(s)),hasFixedToolbar:d.hasFixedToolbar,hasReducedUI:d.hasReducedUI,rootClientId:u,isValid:l.every((function(e){return c(e)})),isVisual:l.every((function(e){return"visual"===r(e)}))}}),[]),r=n.blockClientIds,o=n.blockClientId,c=n.blockType,a=n.hasFixedToolbar,s=n.hasReducedUI,d=n.isValid,f=n.isVisual,g=Object(m.useDispatch)(vr).toggleBlockHighlight,O=Object(l.useRef)(),h=_u({ref:O,onChange:function(e){e&&s||g(o,e)}}),j=h.showMovers,k=h.gestures,y=Object(b.useViewportMatch)("medium","<")||a;if(c&&!Object(p.hasBlockSupport)(c,"__experimentalToolbar",!0))return null;var _=y||j;if(0===r.length)return null;var E=d&&f,w=r.length>1,C=u()("block-editor-block-toolbar",_&&"is-showing-movers");return Object(l.createElement)("div",{className:C},!w&&!y&&Object(l.createElement)(Eu,{clientIds:r}),Object(l.createElement)("div",Object(i.a)({ref:O},k),(E||w)&&Object(l.createElement)(v.ToolbarGroup,{className:"block-editor-block-toolbar__block-controls"},Object(l.createElement)(Fu,{clientIds:r}),Object(l.createElement)(Ou,{clientIds:r,hideDragHandle:t||s}))),E&&Object(l.createElement)(l.Fragment,null,Object(l.createElement)(yr.Slot,{bubblesVirtually:!0,className:"block-editor-block-toolbar__slot"}),Object(l.createElement)(il.Slot,{bubblesVirtually:!0,className:"block-editor-block-toolbar__slot"})),Object(l.createElement)(id,{clientIds:r}))}var ld=function(e){var t=e.focusOnMount,n=Object(j.a)(e,["focusOnMount"]),r=Object(m.useSelect)((function(e){var t=e(vr),n=t.getBlockName,r=t.getBlockParents,o=t.getSelectedBlockClientIds,c=e(p.store).getBlockType,i=o()[0];return{blockType:i&&c(n(i)),hasParents:r(i).length}}),[]),o=r.blockType,c=r.hasParents;if(o&&!Object(p.hasBlockSupport)(o,"__experimentalToolbar",!0))return null;var a=u()("block-editor-block-contextual-toolbar",{"has-parent":c});return Object(l.createElement)("div",{className:"block-editor-block-contextual-toolbar-wrapper"},Object(l.createElement)(vu,Object(i.a)({focusOnMount:t,className:a
54
+ /* translators: accessibility text for the block toolbar */,"aria-label":Object(y.__)("Block tools")},n),Object(l.createElement)(ad,null)))};function sd(e){var t=e(vr),n=t.isNavigationMode,r=t.isMultiSelecting,o=t.hasMultiSelection,c=t.isTyping,i=t.isCaretWithinFormattedText,a=t.getSettings,l=t.getLastMultiSelectedBlockClientId;return{isNavigationMode:n(),isMultiSelecting:r(),isTyping:c(),isCaretWithinFormattedText:i(),hasMultiSelection:o(),hasFixedToolbar:a().hasFixedToolbar,lastClientId:l()}}function ud(e){var t=e.clientId,n=e.rootClientId,r=e.isValid,o=e.isEmptyDefaultBlock,c=e.capturingClientId,i=Object(m.useSelect)(sd,[]),a=i.isNavigationMode,s=i.isMultiSelecting,d=i.isTyping,f=i.isCaretWithinFormattedText,p=i.hasMultiSelection,g=i.hasFixedToolbar,O=i.lastClientId,h=Object(b.useViewportMatch)("medium"),j=Object(l.useState)(!1),k=Object(Ro.a)(j,2),y=k[0],_=k[1],E=Object(l.useState)(!1),w=Object(Ro.a)(E,2),C=w[0],S=w[1],B=Object(l.useContext)(gd),I=Object(m.useDispatch)(vr).stopTyping,x=!d&&!a&&o&&r,P=a,T=!a&&!g&&h&&!x&&!s&&(!d||f),N=!(a||T||g||o);Object(al.useShortcut)("core/block-editor/focus-toolbar",Object(l.useCallback)((function(){_(!0),I(!0)}),[]),{bindGlobal:!0,eventName:"keydown",isDisabled:!N}),Object(l.useEffect)((function(){T||_(!1)}),[T]);var D=Object(l.useRef)();if(Object(l.useEffect)((function(){D.current=void 0}),[t]),!(P||T||y||x))return null;var A=B[t];if(!A)return null;var R=A.ownerDocument;c&&(A=rc(c,R));var L=A;if(p){var M=B[O];if(!M)return null;L={top:A,bottom:M}}var F=x?"top left right":"top right left",V=x?void 0:R.defaultView.frameElement||Object(dl.getScrollContainer)(A)||R.body;return Object(l.createElement)(v.Popover,{noArrow:!0,animate:!1,position:F,focusOnMount:!1,anchorRef:L,className:"block-editor-block-list__block-popover",__unstableStickyBoundaryElement:V,__unstableSlotName:"block-toolbar",__unstableBoundaryParent:!0,__unstableObserveElement:A,shouldAnchorIncludePadding:!0},(T||y)&&Object(l.createElement)("div",{onFocus:function(){S(!0)},onBlur:function(){S(!1)},tabIndex:-1,className:u()("block-editor-block-list__block-popover-inserter",{"is-visible":C})},Object(l.createElement)(Js,{clientId:t,rootClientId:n,__experimentalIsQuick:!0})),(T||y)&&Object(l.createElement)(ld,{focusOnMount:y,__experimentalInitialIndex:D.current,__experimentalOnIndexChange:function(e){D.current=e}}),P&&Object(l.createElement)(pu,{clientId:t,rootClientId:n,blockElement:A}),x&&Object(l.createElement)("div",{className:"block-editor-block-list__empty-block-inserter"},Object(l.createElement)(Js,{position:"bottom right",rootClientId:n,clientId:t,__experimentalIsQuick:!0})))}function dd(e){var t=e(vr),n=t.getSelectedBlockClientId,r=t.getFirstMultiSelectedBlockClientId,o=t.getBlockRootClientId,c=t.__unstableGetBlockWithoutInnerBlocks,i=t.getBlockParents,a=t.__experimentalGetBlockListSettingsForBlocks,l=n()||r();if(l){var s=c(l)||{},u=s.name,b=s.attributes,f=void 0===b?{}:b,m=s.isValid,v=i(l),g=a(v),O=Object(d.find)(v,(function(e){var t;return null===(t=g[e])||void 0===t?void 0:t.__experimentalCaptureToolbars}));return{clientId:l,rootClientId:o(l),name:u,isValid:m,isEmptyDefaultBlock:u&&Object(p.isUnmodifiedDefaultBlock)({name:u,attributes:f}),capturingClientId:O}}}function bd(){var e=Object(m.useSelect)(dd,[]);if(!e)return null;var t=e.clientId,n=e.rootClientId,r=e.name,o=e.isValid,c=e.isEmptyDefaultBlock,i=e.capturingClientId;return r?Object(l.createElement)(ud,{clientId:t,rootClientId:n,isValid:o,isEmptyDefaultBlock:c,capturingClientId:i}):null}var fd=n(148),pd=n.n(fd);function md(e){var t=Object(m.useSelect)((function(e){return e(vr).getBlockSelectionEnd()}),[]);Object(l.useEffect)((function(){if(t){var n=e.current.ownerDocument,r=rc(t,n);if(r){var o=Object(dl.getScrollContainer)(r);o&&pd()(r,o,{onlyScrollIfNeeded:!0})}}}),[t])}function vd(){var e=Object(l.useRef)();return md(e),Object(l.createElement)("div",{ref:e})}var gd=Object(l.createContext)(),Od=Object(l.createContext)();function hd(e){var t=e.className,n=Object(l.useRef)(),r=Object(l.useState)({}),o=Object(Ro.a)(r,2),c=o[0],i=o[1],a=function(e){var t=Object(l.useState)(!1),n=Object(Ro.a)(t,2),r=n[0],o=n[1],c=Object(l.useState)(!1),i=Object(Ro.a)(c,2),a=i[0],s=i[1],u=Object(l.useState)(null),d=Object(Ro.a)(u,2),b=d[0],f=d[1],p=Object(m.useSelect)((function(e){var t=e(vr),n=t.isMultiSelecting,r=t.isBlockInsertionPointVisible,o=t.getBlockInsertionPoint,c=t.getBlockOrder,i=t.getBlockListSettings,a=o(),l=c(a.rootClientId);return{getBlockListSettings:i,isMultiSelecting:n(),isInserterVisible:r(),selectedClientId:l[a.index-1],selectedRootClientId:a.rootClientId}}),[]),v=p.isMultiSelecting,g=p.isInserterVisible,O=p.selectedClientId,h=p.selectedRootClientId,j=p.getBlockListSettings,k=Object(l.useCallback)((function(e){var t;if(e.target.classList.contains("block-editor-block-list__layout")){var n;e.target.classList.contains("is-root-container")||(n=(e.target.getAttribute("data-block")?e.target:e.target.closest("[data-block]")).getAttribute("data-block"));var c=(null===(t=j(n))||void 0===t?void 0:t.orientation)||"vertical",i=e.target.getBoundingClientRect(),a=e.clientY-i.top,l=e.clientX-i.left,s=Array.from(e.target.children),u=s.find((function(e){return"vertical"===c&&e.offsetTop>a||"horizontal"===c&&e.offsetLeft>l})),d=u?s[s.indexOf(u)-1]:s[s.length-1];if(d&&(d.id||(d=d.firstElementChild))){var b=d.id.slice("block-".length);if(b){var p=d.getBoundingClientRect();"horizontal"===c&&(e.clientY>p.bottom||e.clientY<p.top)||"vertical"===c&&(e.clientX>p.right||e.clientX<p.left)?r&&o(!1):(o(!0),f(b))}}}else r&&o(!1)}),[r,o,f]),y=!a&&!v;return Object(l.useEffect)((function(){if(y)return e.current.addEventListener("mousemove",k),function(){e.current.removeEventListener("mousemove",k)}}),[y,k]),!v&&(r||a||g)&&Object(l.createElement)(bu,{clientId:g?O:b,selectedRootClientId:h,isInserterShown:r,isInserterForced:a,setIsInserterForced:function(e){s(e),e||o(e)},containerRef:e,showInsertionPoint:g})}(n);return md(n),Object(l.createElement)(gd.Provider,{value:c},a,Object(l.createElement)(bd,null),Object(l.createElement)("div",{ref:n,className:u()("block-editor-block-list__layout is-root-container",t)},Object(l.createElement)(Od.Provider,{value:i},Object(l.createElement)(kd,{wrapperRef:n}))))}function jd(e){var t=e.placeholder,n=e.rootClientId,r=e.renderAppender,o=e.__experimentalAppenderTagName,c=e.wrapperRef,i=Object(m.useSelect)((function(e){var t,r=e(vr),o=r.getBlockOrder,c=r.getBlockListSettings,i=r.getSettings,a=r.getSelectedBlockClientId,l=r.getMultiSelectedBlockClientIds,s=r.hasMultiSelection,u=(0,r.__experimentalGetActiveBlockIdByBlockNames)(i().__experimentalSpotlightEntityBlocks);return{blockClientIds:o(n),selectedBlockClientId:a(),multiSelectedBlockClientIds:l(),orientation:null===(t=c(n))||void 0===t?void 0:t.orientation,hasMultiSelection:s(),activeEntityBlockId:u}}),[n]),s=i.blockClientIds,d=i.selectedBlockClientId,b=i.multiSelectedBlockClientIds,f=i.orientation,p=i.hasMultiSelection,g=i.activeEntityBlockId,O=function(e){var t=e.element,n=e.rootClientId,r=void 0===n?"":n,o=Object(l.useState)(null),c=Object(Ro.a)(o,2),i=c[0],s=c[1],u=Object(m.useSelect)((function(e){var t,n=e(vr),o=n.getBlockListSettings;return{isLockedAll:"all"===(0,n.getTemplateLock)(r),orientation:null===(t=o(r))||void 0===t?void 0:t.orientation}}),[r]),d=u.isLockedAll,b=u.orientation,f=au(r,i),p=Object(v.__unstableUseDropZone)(function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?uu(Object(n),!0).forEach((function(t){Object(a.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):uu(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({element:t,isDisabled:d,withPosition:!0},f)).position;if(Object(l.useEffect)((function(){if(p){var e=function(e,t,n){var r,o,c="horizontal"===n?["left","right"]:["top","bottom"];return e.forEach((function(n,i){if(n.classList.contains("wp-block")){var a=n.getBoundingClientRect(),l=su(t,a,c),s=Object(Ro.a)(l,2),u=s[0],d=s[1];if(void 0===o||u<o){var b="bottom"===d||"right"===d,f=b?1:0,p=b&&e[i+1]&&e[i+1].classList.contains("is-dragging");o=u,r=i+(f+=p?1:0)}}})),r}(Array.from(t.current.children),p,b);s(void 0===e?0:e)}}),[p]),p)return i}({element:c,rootClientId:n}),h=O===s.length;return Object(l.createElement)(l.Fragment,null,s.map((function(e,t){var r=p?b.includes(e):d===e,o=O===t;return Object(l.createElement)(m.AsyncModeProvider,{key:e,value:!r},Object(l.createElement)(Dd,{rootClientId:n,clientId:e,index:t,className:u()({"is-drop-target":o,"is-dropping-horizontally":o&&"horizontal"===f,"has-active-entity":g}),activeEntityBlockId:g}))})),s.length<1&&t,Object(l.createElement)(ru,{tagName:o,rootClientId:n,renderAppender:r,className:u()({"is-drop-target":h,"is-dropping-horizontally":h&&"horizontal"===f})}))}function kd(e){return Object(l.createElement)(m.AsyncModeProvider,{value:!1},Object(l.createElement)(jd,e))}function yd(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function _d(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?yd(Object(n),!0).forEach((function(t){Object(a.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):yd(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Ed(e){var t=Object(l.useContext)(Od),n=Object(m.useSelect)((function(t){var n=t(vr),r=n.isBlockSelected,o=n.isFirstMultiSelectedBlock,c=n.getLastMultiSelectedBlockClientId;return r(e)||o(e)||c()===e}));return Object(b.useRefEffect)((function(r){if(n)return t((function(t){return _d(_d({},t),{},Object(a.a)({},e,r))})),function(){t((function(t){return Object(d.omit)(t,e)}))}}),[n,e,t])}function wd(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Cd(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?wd(Object(n),!0).forEach((function(t){Object(a.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):wd(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Sd(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.__unstableIsHtml,r=Object(l.useRef)(),o=e.ref||r,c=Object(l.useContext)(xd),i=c.clientId,a=c.index,s=c.className,d=c.wrapperProps,f=void 0===d?{}:d,v=Object(m.useSelect)((function(e){var t=e(vr),n=t.getBlockMode,r=t.getBlockName,o=t.isTyping,c=t.getGlobalBlockCount,a=t.isBlockSelected,l=t.isBlockMultiSelected,s=t.isAncestorMultiSelected,u=t.isFirstMultiSelectedBlock,d=a(i),b=l(i)||s(i),f=r(i);return{mode:n(i),name:f,blockTitle:Object(p.getBlockType)(f).title,isPartOfSelection:d||b,adjustScrolling:d||u(i),enableAnimation:!o()&&c()<=200}}),[i]),g=v.mode,O=v.name,h=v.blockTitle,j=v.isPartOfSelection,k=v.adjustScrolling,_=v.enableAnimation,E=Object(y.sprintf)(Object(y.__)("Block: %s"),h);Hl(o,i);var w=Ul(i),C="html"!==g||n?"":"-visual",S=Object(b.useMergeRefs)([o,Ed(i),Jl(i),Gl(),pl({isSelected:j,adjustScrolling:k,enableAnimation:_,triggerAnimationOnChange:a})]);return Cd(Cd(Cd({},f),e),{},{ref:S,id:"block-".concat(i).concat(C),tabIndex:0,role:"group","aria-label":E,"data-block":i,"data-type":O,"data-title":h,className:u()(s,e.className,f.className,w),style:Cd(Cd({},f.style),e.style)})}function Bd(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Id(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Bd(Object(n),!0).forEach((function(t){Object(a.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Bd(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}Sd.save=p.__unstableGetBlockProps;var xd=Object(l.createContext)();function Pd(e){var t=e.children,n=e.isHtml,r=Object(j.a)(e,["children","isHtml"]);return Object(l.createElement)("div",Sd(r,{__unstableIsHtml:n}),t)}var Td=Object(m.withSelect)((function(e,t){var n=t.clientId,r=t.rootClientId,o=e(vr),c=o.isBlockSelected,i=o.isBlockMultiSelected,a=o.isFirstMultiSelectedBlock,l=o.isTyping,s=o.getBlockMode,u=o.isSelectionEnabled,d=o.hasSelectedInnerBlock,b=o.getTemplateLock,f=o.__unstableGetBlockWithoutInnerBlocks,p=o.getMultiSelectedBlockClientIds,m=f(n),v=c(n),g=b(r),O=d(n,!0),h=m||{},j=h.name,k=h.attributes,y=h.isValid,_=a(n);return{isMultiSelected:i(n),isFirstMultiSelected:_,multiSelectedClientIds:_?p():void 0,isTypingWithinBlock:(v||O)&&l(),mode:s(n),isSelectionEnabled:u(),isLocked:!!g,block:m,name:j,attributes:k,isValid:y,isSelected:v,isAncestorOfSelectedBlock:O}})),Nd=Object(m.withDispatch)((function(e,t,n){var r=n.select,o=e(vr),c=o.updateBlockAttributes,i=o.insertBlocks,a=o.mergeBlocks,l=o.replaceBlocks,s=o.toggleSelection,u=o.__unstableMarkLastChangeAsPersistent;return{setAttributes:function(e){var n=t.clientId,r=t.isFirstMultiSelected,o=t.multiSelectedClientIds;c(r?o:[n],e)},onInsertBlocks:function(e,n){var r=t.rootClientId;i(e,n,r)},onInsertBlocksAfter:function(e){var n=t.clientId,o=t.rootClientId,c=(0,r(vr).getBlockIndex)(n,o);i(e,c+1,o)},onMerge:function(e){var n=t.clientId,o=r(vr),c=o.getPreviousBlockClientId,i=o.getNextBlockClientId;if(e){var l=i(n);l&&a(n,l)}else{var s=c(n);s&&a(s,n)}},onReplace:function(e,n,r){e.length&&!Object(p.isUnmodifiedDefaultBlock)(e[e.length-1])&&u(),l([t.clientId],e,n,r)},toggleSelection:function(e){s(e)}}})),Dd=Object(b.compose)(b.pure,Td,Nd,Object(b.ifCondition)((function(e){return!!e.block})),Object(v.withFilters)("editor.BlockListBlock"))((function(e){var t,n,r,o=e.mode,c=e.isLocked,a=e.clientId,s=e.isSelected,f=e.isMultiSelected,v=e.isTypingWithinBlock,g=e.isAncestorOfSelectedBlock,O=e.isSelectionEnabled,h=e.className,j=e.name,k=e.isValid,y=e.attributes,_=e.wrapperProps,E=e.setAttributes,w=e.onReplace,C=e.onInsertBlocksAfter,S=e.onMerge,B=e.toggleSelection,I=e.index,x=e.activeEntityBlockId,P=Object(b.useViewportMatch)("medium"),T=Object(m.useSelect)((function(e){var t=e(vr),n=t.isBlockBeingDragged,r=t.isBlockHighlighted,o=t.getSettings;return{isDragging:n(a),isHighlighted:r(a),isFocusMode:o().focusMode,isOutlineMode:o().outlineMode}}),[a]),N=T.isDragging,D=T.isHighlighted,A=T.isFocusMode,R=T.isOutlineMode,L=Object(m.useDispatch)(vr).removeBlock,M=Object(l.useCallback)((function(){return L(a)}),[a]),F=Object(l.useState)(!1),V=Object(Ro.a)(F,2),H=V[0],z=V[1],G=Object(p.getBlockType)(j),U=G.apiVersion>1||Object(p.hasBlockSupport)(G,"lightBlockWrapper",!1),W=j===Object(p.getUnregisteredTypeHandlerName)();G.getEditWrapperProps&&(t=_,n=G.getEditWrapperProps(y),r=Id(Id({},t),n),t&&n&&t.className&&n.className&&(r.className=u()(t.className,n.className)),t&&n&&t.style&&n.style&&(r.style=Id(Id({},t.style),n.style)),_=r);var K=U&&Object(p.hasBlockSupport)(G,"className",!0)?Object(p.getBlockDefaultClassName)(j):null,q=U?y.className:null,$=_&&!!_["data-align"],Y=u()(K,q,"block-editor-block-list__block",{"wp-block":!$,"has-warning":!k||!!H||W,"is-selected":s&&!N,"is-highlighted":D,"is-multi-selected":f,"is-reusable":Object(p.isReusableBlock)(G),"is-dragging":N,"is-typing":v,"is-focused":A&&P&&(s||g),"is-focus-mode":A&&P,"is-outline-mode":R,"has-child-selected":g&&!N,"is-active-entity":x===a},h),X=Object(l.createElement)(tl,{name:j,isSelected:s,attributes:y,setAttributes:E,insertBlocksAfter:c?void 0:C,onReplace:c?void 0:w,onRemove:c?void 0:M,mergeBlocks:c?void 0:S,clientId:a,isSelectionEnabled:O,toggleSelection:B});if($){var Q={"data-align":_["data-align"]};X=Object(l.createElement)("div",Object(i.a)({className:"wp-block"},Q),X)}var Z,J={clientId:a,isSelected:s,index:I,className:Y,wrapperProps:Object(d.omit)(_,["data-align"])},ee=Object(l.useMemo)((function(){return J}),Object.values(J));return Z=k?"html"===o?Object(l.createElement)(l.Fragment,null,Object(l.createElement)("div",{style:{display:"none"}},X),Object(l.createElement)(Pd,{isHtml:!0},Object(l.createElement)(Vl,{clientId:a}))):U?X:Object(l.createElement)(Pd,_,X):Object(l.createElement)(Pd,null,Object(l.createElement)(Dl,{clientId:a}),Object(l.createElement)("div",null,Object(p.getSaveElement)(G,y))),Object(l.createElement)(xd.Provider,{value:ee},Object(l.createElement)(Ll,{onError:function(){return z(!0)}},Z),!!H&&Object(l.createElement)(Pd,null,Object(l.createElement)(Rl,null)))}));function Ad(e){var t=e.level;return Object(d.times)(t-1,(function(e){var n=e+2===t;return Object(l.createElement)("div",{key:e,"aria-hidden":"true",className:u()("block-editor-block-navigator-indentation",{"has-item":n})})}))}var Rd=function(e,t,n){return Object(y.sprintf)(
 
55
  /* translators: 1: The numerical position of the block. 2: The total number of blocks. 3. The level of nesting for the block. */
56
+ Object(y.__)("Block %1$d of %2$d, Level %3$d"),e,t,n)},Ld=Object(l.forwardRef)((function e(t,n){var r=t.className,o=t.block.clientId,c=t.isSelected,i=t.onClick,a=t.position,s=t.siblingBlockCount,d=t.level,f=t.tabIndex,p=t.onFocus,m=t.onDragStart,g=t.onDragEnd,O=t.draggable,h=za(o),j=Object(b.useInstanceId)(e),k="block-navigation-block-select-button__".concat(j),_=Rd(a,s,d);return Object(l.createElement)(l.Fragment,null,Object(l.createElement)(v.Button,{className:u()("block-editor-block-navigation-block-select-button",r),onClick:i,"aria-describedby":k,ref:n,tabIndex:f,onFocus:p,onDragStart:m,onDragEnd:g,draggable:O},Object(l.createElement)(Ad,{level:d}),Object(l.createElement)(Aa,{icon:null==h?void 0:h.icon,showColors:!0}),Object(l.createElement)(Ga,{clientId:o}),c&&Object(l.createElement)(v.VisuallyHidden,null,Object(y.__)("(selected block)"))),Object(l.createElement)("div",{className:"block-editor-block-navigation-block-select-button__description",id:k},_))}));function Md(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Fd(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Md(Object(n),!0).forEach((function(t){Object(a.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Md(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Vd=function(e){return"BlockNavigationBlock-".concat(e)},Hd=Object(l.forwardRef)((function e(t,n){var r=Object(b.useInstanceId)(e),o=t.block.clientId;return Object(l.createElement)(v.Slot,{name:Vd(o)},(function(e){if(!e.length)return Object(l.createElement)(Ld,Object(i.a)({ref:n},t));var o=t.className,c=t.block,a=t.isSelected,s=t.position,d=t.siblingBlockCount,b=t.level,f=t.tabIndex,m=t.onFocus,g=c.name,O=Object(p.getBlockType)(g),h="block-navigation-block-slot__".concat(r),j=Rd(s,d,b),k={tabIndex:f,onFocus:m,ref:n,"aria-describedby":h};return Object(l.createElement)(l.Fragment,null,Object(l.createElement)("div",{className:u()("block-editor-block-navigation-block-slot",o)},Object(l.createElement)(Aa,{icon:O.icon,showColors:!0}),l.Children.map(e,(function(e){return Object(l.cloneElement)(e,Fd(Fd({},e.props),k))})),a&&Object(l.createElement)(v.VisuallyHidden,null,Object(y.__)("(selected block)")),Object(l.createElement)("div",{className:"block-editor-block-navigation-block-slot__description",id:h},j)))}))})),zd=function(e){var t=Object(l.useContext)(xd).clientId;return Object(l.createElement)(v.Fill,Object(i.a)({},e,{name:Vd(t)}))},Gd=Object(l.forwardRef)((function(e,t){var n=e.onClick,r=e.block,o=e.isSelected,c=e.position,a=e.siblingBlockCount,s=e.level,d=Object(j.a)(e,["onClick","block","isSelected","position","siblingBlockCount","level"]),b=Sl(),f=b.__experimentalFeatures,p=b.blockDropTarget,v=void 0===p?{}:p,g=r.clientId,O=Object(m.useSelect)((function(e){var t=e(vr),n=t.getBlockRootClientId,r=t.hasBlockMovingClientId,o=t.getSelectedBlockClientId;return{rootClientId:n(g)||"",blockMovingClientId:r(),selectedBlockInBlockEditor:o()}}),[g]),h=O.rootClientId,k=O.blockMovingClientId,y=O.selectedBlockInBlockEditor,_=k&&y===g,E=v.rootClientId,w=v.clientId,C=v.dropPosition,S=E===h&&w===g&&"top"===C,B=E===h&&w===g&&"bottom"===C,I=E===g&&"inside"===C,x=u()("block-editor-block-navigation-block-contents",{"is-dropping-before":S||_,"is-dropping-after":B,"is-dropping-to-inner-blocks":I});return Object(l.createElement)(gu,{clientIds:[r.clientId],elementId:"block-navigation-block-".concat(r.clientId)},(function(e){var u=e.draggable,b=e.onDragStart,p=e.onDragEnd;return f?Object(l.createElement)(Hd,Object(i.a)({ref:t,className:x,block:r,onClick:n,isSelected:o,position:c,siblingBlockCount:a,level:s,draggable:u&&f,onDragStart:b,onDragEnd:p},d)):Object(l.createElement)(Ld,Object(i.a)({ref:t,className:x,block:r,onClick:n,isSelected:o,position:c,siblingBlockCount:a,level:s,draggable:u&&f,onDragStart:b,onDragEnd:p},d))}))}));function Ud(e,t){var n;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return Wd(e,void 0);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Wd(e,void 0):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var c,i=!0,a=!1;return{s:function(){n=e[Symbol.iterator]()},n:function(){var e=n.next();return i=e.done,e},e:function(e){a=!0,c=e},f:function(){try{i||null==n.return||n.return()}finally{if(a)throw c}}}}function Wd(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Kd(e){var t=e.block,n=e.isSelected,r=e.onClick,o=e.position,c=e.level,i=e.rowCount,a=e.siblingBlockCount,s=e.showBlockMovers,d=e.path,b=Object(l.useRef)(null),f=Object(l.useState)(!1),p=Object(Ro.a)(f,2),g=p[0],O=p[1],h=Object(l.useState)(!1),j=Object(Ro.a)(h,2),k=j[0],_=j[1],E=t.clientId,w=Object(m.useSelect)((function(e){var t=e(vr),n=t.isBlockBeingDragged,r=t.isAncestorBeingDragged,o=t.getBlockParents;return{isDragging:n(E)||r(E),blockParents:o(E)}}),[E]),C=w.isDragging,S=w.blockParents,B=Object(m.useDispatch)(vr).selectBlock,I=s&&a>0,x=g||k,P=u()("block-editor-block-navigation-block__mover-cell",{"is-visible":x}),T=Sl().__experimentalFeatures,N=u()("block-editor-block-navigation-block__menu-cell",{"is-visible":x});return Object(l.useEffect)((function(){T&&n&&b.current.focus()}),[T,n]),Object(l.createElement)(vl,{className:u()({"is-selected":n,"is-dragging":C}),onMouseEnter:function(){return O(!0)},onMouseLeave:function(){return O(!1)},onFocus:function(){return _(!0)},onBlur:function(){return _(!1)},level:c,position:o,rowCount:i,path:d,id:"block-navigation-block-".concat(E),"data-block":E},Object(l.createElement)(v.__experimentalTreeGridCell,{className:"block-editor-block-navigation-block__contents-cell",colSpan:I?void 0:2,ref:b},(function(e){var i=e.ref,s=e.tabIndex,u=e.onFocus;return Object(l.createElement)("div",{className:"block-editor-block-navigation-block__contents-container"},Object(l.createElement)(Gd,{block:t,onClick:function(){return r(t.clientId)},isSelected:n,position:o,siblingBlockCount:a,level:c,ref:i,tabIndex:s,onFocus:u}))})),I&&Object(l.createElement)(l.Fragment,null,Object(l.createElement)(v.__experimentalTreeGridCell,{className:P,withoutGridItem:!0},Object(l.createElement)(v.__experimentalTreeGridItem,null,(function(e){var t=e.ref,n=e.tabIndex,r=e.onFocus;return Object(l.createElement)(El,{orientation:"vertical",clientIds:[E],ref:t,tabIndex:n,onFocus:r})})),Object(l.createElement)(v.__experimentalTreeGridItem,null,(function(e){var t=e.ref,n=e.tabIndex,r=e.onFocus;return Object(l.createElement)(wl,{orientation:"vertical",clientIds:[E],ref:t,tabIndex:n,onFocus:r})})))),T&&Object(l.createElement)(v.__experimentalTreeGridCell,{className:N},(function(e){var t=e.ref,n=e.tabIndex,o=e.onFocus;return Object(l.createElement)(cd,{clientIds:[E],icon:sl.a,toggleProps:{ref:t,tabIndex:n,onFocus:o},disableOpenOnArrowDown:!0,__experimentalSelectBlock:r},(function(e){var t=e.onClose;return Object(l.createElement)(v.MenuGroup,null,Object(l.createElement)(v.MenuItem,{onClick:Object(ll.a)(Pt.a.mark((function e(){var n,r,o;return Pt.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!S.length){e.next=20;break}n=Ud(S),e.prev=2,n.s();case 4:if((r=n.n()).done){e.next=10;break}return o=r.value,e.next=8,B(o);case 8:e.next=4;break;case 10:e.next=15;break;case 12:e.prev=12,e.t0=e.catch(2),n.e(e.t0);case 15:return e.prev=15,n.f(),e.finish(15);case 18:e.next=22;break;case 20:return e.next=22,B(null);case 22:return e.next=24,B(E);case 24:t();case 25:case"end":return e.stop()}}),e,null,[[2,12,15,18]])})))},Object(y.__)("Go to block")))}))})))}function qd(e){var t=e.parentBlockClientId,n=e.position,r=e.level,o=e.rowCount,c=e.path,i=Object(m.useSelect)((function(e){var n=e(vr),r=n.isBlockBeingDragged,o=n.isAncestorBeingDragged;return r(t)||o(t)}),[t]),a=Object(b.useInstanceId)(qd),s="block-navigation-appender-row__description_".concat(a),d=Object(y.sprintf)(
57
  /* translators: 1: The numerical position of the block that will be inserted. 2: The level of nesting for the block that will be inserted. */
58
+ Object(y.__)("Add block at position %1$d, Level %2$d"),n,r);return Object(l.createElement)(vl,{className:u()({"is-dragging":i}),level:r,position:n,rowCount:o,path:c},Object(l.createElement)(v.__experimentalTreeGridCell,{className:"block-editor-block-navigation-appender__cell",colSpan:"3"},(function(e){var n=e.ref,o=e.tabIndex,c=e.onFocus;return Object(l.createElement)("div",{className:"block-editor-block-navigation-appender__container"},Object(l.createElement)(Ad,{level:r}),Object(l.createElement)(Js,{rootClientId:t,__experimentalIsQuick:!0,"aria-describedby":s,toggleProps:{ref:n,tabIndex:o,onFocus:c}}),Object(l.createElement)("div",{className:"block-editor-block-navigation-appender__description",id:s},d))})))}function $d(e){var t=e.blocks,n=e.selectBlock,r=e.selectedBlockClientId,o=e.showAppender,c=e.showBlockMovers,i=e.showNestedBlocks,a=e.parentBlockClientId,s=e.level,u=void 0===s?1:s,b=e.terminatedLevels,f=void 0===b?[]:b,p=e.path,m=void 0===p?[]:p,v=!a,g=Object(d.compact)(t),O=function(e){return o&&!v&&r===e},h=O(a),j=g.length,y=h?j+1:j,_=y;return Object(l.createElement)(l.Fragment,null,Object(d.map)(g,(function(e,t){var a=e.clientId,s=e.innerBlocks,d=t+1,b=y===d?[].concat(Object(k.a)(f),[u]):f,p=[].concat(Object(k.a)(m),[d]),v=i&&!!s&&!!s.length,g=O(a);return Object(l.createElement)(l.Fragment,{key:a},Object(l.createElement)(Kd,{block:e,onClick:n,isSelected:r===a,level:u,position:d,rowCount:y,siblingBlockCount:j,showBlockMovers:c,terminatedLevels:f,path:p}),(v||g)&&Object(l.createElement)($d,{blocks:s,selectedBlockClientId:r,selectBlock:n,showAppender:o,showBlockMovers:c,showNestedBlocks:i,parentBlockClientId:a,level:u+1,terminatedLevels:b,path:p}))})),h&&Object(l.createElement)(qd,{parentBlockClientId:a,position:y,rowCount:_,level:u,terminatedLevels:f,path:[].concat(Object(k.a)(m),[_])}))}function Yd(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Xd(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Qd(e,t){return t.left<=e.x&&t.right>=e.x&&t.top<=e.y&&t.bottom>=e.y}$d.defaultProps={selectBlock:function(){}};var Zd=["top","bottom"];function Jd(e){var t=Object(l.useState)(),n=Object(Ro.a)(t,2),r=n[0],o=void 0===r?{}:r,c=n[1],i=au(o.rootClientId,o.blockIndex),s=Object(v.__unstableUseDropZone)(function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Yd(Object(n),!0).forEach((function(t){Object(a.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Yd(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({element:e,withPosition:!0},i)),u=s.position,d=s.type,b=function(e,t,n){var r=Object(m.useSelect)((function(e){var t=e(vr);return{canInsertBlocks:t.canInsertBlocks,getBlockRootClientId:t.getBlockRootClientId,getBlockIndex:t.getBlockIndex,getBlockCount:t.getBlockCount,getDraggedBlockClientIds:t.getDraggedBlockClientIds}}),[]),o=r.getBlockRootClientId,c=r.getBlockIndex,i=r.getBlockCount,a=r.getDraggedBlockClientIds,s=r.canInsertBlocks,u=Object(l.useRef)(),d=!!t;return Object(l.useEffect)((function(){if(e.current&&d){var t="default"===n,r=t?a():void 0,l=Array.from(e.current.querySelectorAll("[data-block]"));u.current=l.map((function(e){var n=e.dataset.block,a=o(n);return{clientId:n,rootClientId:a,blockIndex:c(n,a),element:e,isDraggedBlock:!!t&&r.includes(n),innerBlockCount:i(n),canInsertDraggedBlocksAsSibling:!t||s(r,a),canInsertDraggedBlocksAsChild:!t||s(r,n)}}))}}),[e,d,n,s,i,c,o,a]),u}(e,u,d);if(Object(l.useEffect)((function(){if(u){var e=function(e,t){var n,r,o,c,i,a=function(e,t){var n;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return Xd(e,void 0);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Xd(e,void 0):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var c,i=!0,a=!1;return{s:function(){n=e[Symbol.iterator]()},n:function(){var e=n.next();return i=e.done,e},e:function(e){a=!0,c=e},f:function(){try{i||null==n.return||n.return()}finally{if(a)throw c}}}}(e);try{for(a.s();!(i=a.n()).done;){var l=i.value;if(!l.isDraggedBlock){var s=l.element.getBoundingClientRect(),u=su(t,s,Zd),d=Object(Ro.a)(u,2),b=d[0],f=d[1],p=Qd(t,s);if(void 0===o||b<o||p){o=b;var m=e.indexOf(l),v=e[m-1];if("top"===f&&v&&v.rootClientId===l.rootClientId&&!v.isDraggedBlock?(r=v,n="bottom",c=v.element.getBoundingClientRect()):(r=l,n=f,c=s),p)break}}}}catch(e){a.e(e)}finally{a.f()}if(r){var g="bottom"===n;if(g&&r.canInsertDraggedBlocksAsChild&&(r.innerBlockCount>0||function(e,t){var n=t.left+t.width/2;return e.x>n}(t,c)))return{rootClientId:r.clientId,blockIndex:0,dropPosition:"inside"};if(r.canInsertDraggedBlocksAsSibling){var O=g?1:0;return{rootClientId:r.rootClientId,clientId:r.clientId,blockIndex:r.blockIndex+O,dropPosition:n}}}}(b.current,u);e&&c(e)}}),[b,u]),u)return o}function eb(e){var t=e.__experimentalFeatures,n=Object(j.a)(e,["__experimentalFeatures"]),r=Object(l.useRef)(),o=Jd(r);t||(o=void 0);var c=Object(l.useMemo)((function(){return{__experimentalFeatures:t,blockDropTarget:o}}),[t,o]);return Object(l.createElement)(v.__experimentalTreeGrid,{className:"block-editor-block-navigation-tree","aria-label":Object(y.__)("Block navigation structure"),ref:r},Object(l.createElement)(Cl.Provider,{value:c},Object(l.createElement)($d,n)))}var tb=Object(b.compose)(Object(m.withSelect)((function(e){var t=e(vr),n=t.getSelectedBlockClientId,r=t.getBlockHierarchyRootClientId,o=t.__unstableGetBlockWithBlockTree,c=t.__unstableGetBlockTree,i=n();return{rootBlocks:c(),rootBlock:i?o(r(i)):null,selectedBlockClientId:i}})),Object(m.withDispatch)((function(e,t){var n=t.onSelect,r=void 0===n?d.noop:n;return{selectBlock:function(t){e(vr).selectBlock(t),r(t)}}})))((function(e){var t=e.rootBlock,n=e.rootBlocks,r=e.selectedBlockClientId,o=e.selectBlock,c=e.__experimentalFeatures;if(!n||0===n.length)return null;var i=t&&(t.clientId!==r||t.innerBlocks&&0!==t.innerBlocks.length);return Object(l.createElement)("div",{className:"block-editor-block-navigation__container"},Object(l.createElement)("p",{className:"block-editor-block-navigation__label"},Object(y.__)("List view")),Object(l.createElement)(eb,{blocks:i?[t]:n,selectedBlockClientId:r,selectBlock:o,__experimentalFeatures:c,showNestedBlocks:!0}))})),nb=Object(l.createElement)(v.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:"24",height:"24"},Object(l.createElement)(v.Path,{d:"M13.8 5.2H3v1.5h10.8V5.2zm-3.6 12v1.5H21v-1.5H10.2zm7.2-6H6.6v1.5h10.8v-1.5z"}));function rb(e){var t=e.isEnabled,n=e.onToggle,r=e.isOpen,o=e.innerRef,c=Object(j.a)(e,["isEnabled","onToggle","isOpen","innerRef"]);Object(al.useShortcut)("core/edit-post/toggle-block-navigation",Object(l.useCallback)(n,[n]),{bindGlobal:!0,isDisabled:!t});var a=Object(m.useSelect)((function(e){return e(al.store).getShortcutRepresentation("core/edit-post/toggle-block-navigation")}),[]);return Object(l.createElement)(v.Button,Object(i.a)({},c,{ref:o,icon:nb,"aria-expanded":r,"aria-haspopup":"true",onClick:t?n:void 0
59
+ /* translators: button label text should, if possible, be under 16 characters. */,label:Object(y.__)("Outline"),className:"block-editor-block-navigation",shortcut:a,"aria-disabled":!t}))}var ob=Object(l.forwardRef)((function(e,t){var n=e.isDisabled,r=e.__experimentalFeatures,o=Object(j.a)(e,["isDisabled","__experimentalFeatures"]),c=Object(m.useSelect)((function(e){return!!e(vr).getBlockCount()}),[])&&!n;return Object(l.createElement)(v.Dropdown,{contentClassName:"block-editor-block-navigation__popover",position:"bottom right",renderToggle:function(e){var n=e.isOpen,r=e.onToggle;return Object(l.createElement)(rb,Object(i.a)({},o,{innerRef:t,isOpen:n,onToggle:r,isEnabled:c}))},renderContent:function(e){var t=e.onClose;return Object(l.createElement)(tb,{onSelect:t,__experimentalFeatures:r})}})})),cb=n(153),ib=[Mc.rawShortcut.primary("z"),Mc.rawShortcut.primaryShift("z"),Mc.rawShortcut.primary("y")],ab=Object(l.createElement)(v.KeyboardShortcuts,{bindGlobal:!0,shortcuts:Object(d.fromPairs)(ib.map((function(e){return[e,function(e){return e.preventDefault()}]})))}),lb=function(){return ab};function sb(e){return e.filter((function(e){var t=e.type;return/^image\/(?:jpe?g|png|gif)$/.test(t)})).map((function(e){return'<img src="'.concat(Object(Vu.createBlobURL)(e),'">')})).join("")}var ub={position:"bottom right",isAlternate:!0},db=function(){return Object(l.createElement)("div",{className:"block-editor-format-toolbar"},Object(l.createElement)(v.ToolbarGroup,null,["bold","italic","link","text-color"].map((function(e){return Object(l.createElement)(v.Slot,{name:"RichText.ToolbarControls.".concat(e),key:e})})),Object(l.createElement)(v.Slot,{name:"RichText.ToolbarControls"},(function(e){return 0!==e.length&&Object(l.createElement)(v.ToolbarItem,null,(function(t){return Object(l.createElement)(v.DropdownMenu,{icon:jl.a
60
+ /* translators: button label text should, if possible, be under 16 characters. */,label:Object(y.__)("More"),toggleProps:t,controls:Object(d.orderBy)(e.map((function(e){return Object(Ro.a)(e,1)[0].props})),"title"),popoverProps:ub})}))}))))},bb=function(e){var t=e.inline,n=e.anchorRef;return t?Object(l.createElement)(v.Popover,{noArrow:!0,position:"top center",focusOnMount:!1,anchorRef:n,className:"block-editor-rich-text__inline-format-toolbar",__unstableSlotName:"block-toolbar"},Object(l.createElement)(db,null)):Object(l.createElement)(il,null,Object(l.createElement)(db,null))};function fb(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function pb(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?fb(Object(n),!0).forEach((function(t){Object(a.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):fb(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function mb(e){if(!0===e||"p"===e||"li"===e)return!0===e?"p":e}function vb(e){var t=e.allowedFormats,n=e.formattingControls;return e.disableFormats?vb.EMPTY_ARRAY:t||n?t||(Dt()("wp.blockEditor.RichText formattingControls prop",{alternative:"allowedFormats"}),n.map((function(e){return"core/".concat(e)}))):void 0}vb.EMPTY_ARRAY=[];var gb=Object(l.forwardRef)((function e(t,n){var r=t.children,o=t.tagName,a=t.value,s=t.onChange,d=t.isSelected,f=t.multiline,v=t.inlineToolbar,g=t.wrapperClassName,O=t.autocompleters,y=t.onReplace,_=t.placeholder,E=t.keepPlaceholderOnFocus,w=t.allowedFormats,C=t.formattingControls,S=t.withoutInteractiveFormatting,B=t.onRemove,I=t.onMerge,x=t.onSplit,P=t.__unstableOnSplitAtEnd,T=t.__unstableOnSplitMiddle,N=t.identifier,D=t.preserveWhiteSpace,A=t.__unstablePastePlainText,R=t.__unstableEmbedURLOnPaste,L=t.__unstableDisableFormats,M=t.disableLineBreaks,F=t.unstableOnFocus,V=t.__unstableAllowPrefixTransformations,H=t.__unstableMultilineRootTag,z=t.__unstableMobileNoFocusOnMount,G=t.deleteEnter,U=t.placeholderTextColor,W=t.textAlign,K=t.selectionColor,q=t.tagsToEliminate,$=t.rootTagsToEliminate,Y=t.disableEditingMenu,X=t.fontSize,Q=t.fontFamily,Z=t.fontWeight,J=t.fontStyle,ee=t.minWidth,te=t.maxWidth,ne=t.onBlur,re=t.setRef,oe=Object(j.a)(t,["children","tagName","value","onChange","isSelected","multiline","inlineToolbar","wrapperClassName","autocompleters","onReplace","placeholder","keepPlaceholderOnFocus","allowedFormats","formattingControls","withoutInteractiveFormatting","onRemove","onMerge","onSplit","__unstableOnSplitAtEnd","__unstableOnSplitMiddle","identifier","preserveWhiteSpace","__unstablePastePlainText","__unstableEmbedURLOnPaste","__unstableDisableFormats","disableLineBreaks","unstableOnFocus","__unstableAllowPrefixTransformations","__unstableMultilineRootTag","__unstableMobileNoFocusOnMount","deleteEnter","placeholderTextColor","textAlign","selectionColor","tagsToEliminate","rootTagsToEliminate","disableEditingMenu","fontSize","fontFamily","fontWeight","fontStyle","minWidth","maxWidth","onBlur","setRef"]),ce=Object(b.useInstanceId)(e);N=N||ce;var ie=Object(l.useRef)(),ae=h(),le=ae.clientId,se=ae.onCaretVerticalPositionChange,ue=ae.isSelected,de=Object(m.useSelect)((function(e){var t,n=e(vr),r=n.isCaretWithinFormattedText,o=n.getSelectionStart,c=n.getSelectionEnd,i=n.getSettings,a=n.didAutomaticChange,s=n.__unstableGetBlockWithoutInnerBlocks,u=n.isMultiSelecting,b=n.hasMultiSelection,f=o(),m=c(),v=i().__experimentalUndo;void 0===d?t=f.clientId===le&&f.attributeKey===N:d&&(t=f.clientId===le);var g={};if("native"===l.Platform.OS){var O=le&&s(le);g={shouldBlurOnUnmount:O&&t&&Object(p.isUnmodifiedDefaultBlock)(O)}}return pb({isCaretWithinFormattedText:r(),selectionStart:t?f.offset:void 0,selectionEnd:t?m.offset:void 0,isSelected:t,didAutomaticChange:a(),disabled:u()||b(),undo:v},g)})),be=de.isCaretWithinFormattedText,fe=de.selectionStart,pe=de.selectionEnd,me=de.isSelected,ve=de.didAutomaticChange,ge=de.disabled,Oe=de.undo,he=de.shouldBlurOnUnmount,je=Object(m.useDispatch)(vr),ke=je.__unstableMarkLastChangeAsPersistent,ye=je.enterFormattedText,_e=je.exitFormattedText,Ee=je.selectionChange,we=je.__unstableMarkAutomaticChange,Ce=mb(f),Se=vb({allowedFormats:w,formattingControls:C,disableFormats:L}),Be=!Se||Se.length>0,Ie=a,xe=s;Array.isArray(a)&&(Ie=p.children.toHTML(a),xe=function(e){return s(p.children.fromDOM(Object(c.__unstableCreateElement)(document,e).childNodes))});var Pe=Object(l.useCallback)((function(e,t){Ee(le,N,e,t)}),[le,N]),Te=Object(l.useCallback)((function(e){var t=e.value,n=e.isReverse;I&&I(!n),B&&Object(c.isEmpty)(t)&&n&&B(!n)}),[I,B]),Ne=Object(l.useCallback)((function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];if(y&&x){var n=[],r=Object(c.split)(e),o=Object(Ro.a)(r,2),i=o[0],a=o[1],l=t.length>0,s=-1,u=Object(c.isEmpty)(i)&&!Object(c.isEmpty)(a);l&&Object(c.isEmpty)(i)||(n.push(x(Object(c.toHTMLString)({value:i,multilineTag:Ce}),!u)),s+=1),l?(n.push.apply(n,Object(k.a)(t)),s+=t.length):T&&n.push(T()),(l||T)&&Object(c.isEmpty)(a)||n.push(x(Object(c.toHTMLString)({value:a,multilineTag:Ce}),u));var d=l?s:1,b=l?-1:0;y(n,d,b)}}),[y,x,Ce,T]),De=Object(l.useCallback)((function(e){var t=e.value,n=e.onChange,r=e.shiftKey,o=y&&x;if(y){var i=Object(p.getBlockTransforms)("from").filter((function(e){return"enter"===e.type})),a=Object(p.findTransform)(i,(function(e){return e.regExp.test(t.text)}));a&&(y([a.transform({content:t.text})]),we())}if(f)r?M||n(Object(c.insert)(t,"\n")):o&&Object(c.__unstableIsEmptyLine)(t)?Ne(t):n(Object(c.__unstableInsertLineSeparator)(t));else{var l=t.text,s=t.start,u=t.end,d=P&&s===u&&u===l.length;r||!o&&!d?M||n(Object(c.insert)(t,"\n")):!o&&d?P():o&&Ne(t)}}),[y,x,we,f,Ne,P]),Ae=Object(l.useCallback)((function(e){var t=e.value,n=e.onChange,r=e.html,i=e.plainText,a=e.files,l=e.activeFormats;if(A)n(Object(c.insert)(t,Object(c.create)({text:i})));else{if(a&&a.length&&!r){var s=Object(p.pasteHandler)({HTML:sb(a),mode:"BLOCKS",tagName:o,preserveWhiteSpace:D});return window.console.log("Received items:\n\n",a),void(y&&Object(c.isEmpty)(t)?y(s):Ne(t,s))}var u,d=y&&x?"AUTO":"INLINE";"AUTO"===d&&Object(c.isEmpty)(t)&&(u=i,Object(cb.regexp)(".*").test(u))&&(d="BLOCKS"),R&&Object(c.isEmpty)(t)&&Object(As.isURL)(i.trim())&&(d="BLOCKS");var b=Object(p.pasteHandler)({HTML:r,plainText:i,mode:d,tagName:o,preserveWhiteSpace:D});if("string"==typeof b){var m=Object(c.create)({html:b});if(l.length)for(var v=m.formats.length;v--;)m.formats[v]=[].concat(Object(k.a)(l),Object(k.a)(m.formats[v]||[]));f&&(m=Object(c.replace)(m,/\n+/g,c.__UNSTABLE_LINE_SEPARATOR)),n(Object(c.insert)(t,m))}else b.length>0&&(y&&Object(c.isEmpty)(t)?y(b,b.length-1,-1):Ne(t,b))}}),[o,y,x,Ne,R,f,D,A]),Re=Object(l.useCallback)((function(e,t){if(y){var n=e.start,r=e.text;if(" "===r.slice(n-1,n)){var o=r.slice(0,n).trim(),i=Object(p.getBlockTransforms)("from").filter((function(e){return"prefix"===e.type})),a=Object(p.findTransform)(i,(function(e){var t=e.prefix;return o===t}));if(a){var l=t(Object(c.slice)(e,n,r.length)),s=a.transform(l);y([s]),we()}}}}),[y,we]),Le=Object(b.useMergeRefs)([n,ie]),Me=Object(l.createElement)(c.__experimentalRichText,{clientId:le,identifier:N,ref:Le,value:Ie,onChange:xe,selectionStart:fe,selectionEnd:pe,onSelectionChange:Pe,tagName:o,placeholder:_,allowedFormats:Se,withoutInteractiveFormatting:S,onEnter:De,onDelete:Te,onPaste:Ae,__unstableIsSelected:me,__unstableInputRule:Re,__unstableMultilineTag:Ce,__unstableIsCaretWithinFormattedText:be,__unstableOnEnterFormattedText:ye,__unstableOnExitFormattedText:_e,__unstableOnCreateUndoLevel:ke,__unstableMarkAutomaticChange:we,__unstableDidAutomaticChange:ve,__unstableUndo:Oe,__unstableDisableFormats:L,preserveWhiteSpace:D,disabled:ge,unstableOnFocus:F,__unstableAllowPrefixTransformations:V,__unstableMultilineRootTag:H,onCaretVerticalPositionChange:se,blockIsSelected:void 0!==d?d:ue,shouldBlurOnUnmount:he,__unstableMobileNoFocusOnMount:z,deleteEnter:G,placeholderTextColor:U,textAlign:W,selectionColor:K,tagsToEliminate:q,rootTagsToEliminate:$,disableEditingMenu:Y,fontSize:X,fontFamily:Q,fontWeight:Z,fontStyle:J,minWidth:ee,maxWidth:te,onBlur:ne,setRef:re,id:oe.id,style:oe.style},(function(e){var t=e.isSelected,n=e.value,o=e.onChange,c=e.onFocus,a=e.editableProps,s=e.editableTagName;return Object(l.createElement)(l.Fragment,null,r&&r({value:n,onChange:o,onFocus:c}),t&&Be&&Object(l.createElement)(bb,{inline:v,anchorRef:ie.current}),t&&Object(l.createElement)(lb,null),Object(l.createElement)(Ma,{onReplace:y,completers:O,record:n,onChange:o,isSelected:t,contentRef:ie},(function(e){var t=e.listBoxId,n=e.activeId,r=e.onKeyDown;return Object(l.createElement)(s,Object(i.a)({},a,oe,{style:oe.style?pb(pb({},oe.style),a.style):a.style,className:u()("block-editor-rich-text__editable",oe.className,a.className,{"keep-placeholder-on-focus":E}),"aria-autocomplete":t?"list":void 0,"aria-owns":t,"aria-activedescendant":n,onKeyDown:function(e){r(e),a.onKeyDown(e)}}))})))}));return g?(Dt()("wp.blockEditor.RichText wrapperClassName prop",{alternative:"className prop or create your own wrapper div"}),Object(l.createElement)("div",{className:u()("block-editor-rich-text",g)},Me)):Me}));gb.Content=function(e){var t=e.value,n=e.tagName,r=e.multiline,o=Object(j.a)(e,["value","tagName","multiline"]);Array.isArray(t)&&(t=p.children.toHTML(t));var c=mb(r);!t&&c&&(t="<".concat(c,"></").concat(c,">"));var i=Object(l.createElement)(l.RawHTML,null,t);return n?Object(l.createElement)(n,Object(d.omit)(o,["format"]),i):i},gb.isEmpty=function(e){return!e||0===e.length},gb.Content.defaultProps={format:"string",value:""};var Ob=gb;function hb(e){var t=e.value,n=e.onChange;return Object(l.createElement)(zd,null,Object(l.createElement)(Ob,{value:t,onChange:n,placeholder:Object(y.__)("Navigation item"),keepPlaceholderOnFocus:!0,withoutInteractiveFormatting:!0,allowedFormats:["core/bold","core/italic","core/image","core/strikethrough"]}))}var jb=n(390),kb=function(e){var t=e.icon,n=void 0===t?jb.a:t,r=e.label,o=void 0===r?Object(y.__)("Choose variation"):r,c=e.instructions,i=void 0===c?Object(y.__)("Select a variation to start with."):c,a=e.variations,s=e.onSelect,d=e.allowSkip,b=u()("block-editor-block-variation-picker",{"has-many-variations":a.length>4});return Object(l.createElement)(v.Placeholder,{icon:n,label:o,instructions:i,className:b},Object(l.createElement)("ul",{className:"block-editor-block-variation-picker__variations",role:"list","aria-label":Object(y.__)("Block variations")},a.map((function(e){return Object(l.createElement)("li",{key:e.name},Object(l.createElement)(v.Button,{isSecondary:!0,icon:e.icon,iconSize:48,onClick:function(){return s(e)},className:"block-editor-block-variation-picker__variation",label:e.description||e.title}),Object(l.createElement)("span",{className:"block-editor-block-variation-picker__variation-label",role:"presentation"},e.title))}))),d&&Object(l.createElement)("div",{className:"block-editor-block-variation-picker__skip"},Object(l.createElement)(v.Button,{isLink:!0,onClick:function(){return s()}},Object(y.__)("Skip"))))},yb=function(e,t){if(t&&e){var n=t.filter((function(t){var n=t.attributes;return!(!n||!Object.keys(n).length)&&Object(d.isMatch)(e,n)}));if(1===n.length)return n[0]}};function _b(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}var Eb=function(e){var t=e.blockClientId,n=Object(l.useState)(),r=Object(Ro.a)(n,2),o=r[0],c=r[1],i=Object(m.useDispatch)(vr).updateBlockAttributes,s=Object(m.useSelect)((function(e){var n=e(p.store).getBlockVariations,r=e(vr),o=r.getBlockName,c=r.getBlockAttributes,i=t&&o(t);return{variations:i&&n(i,"transform"),blockAttributes:c(t)}}),[t]),u=s.variations,d=s.blockAttributes;if(Object(l.useEffect)((function(){var e;c(null===(e=yb(d,u))||void 0===e?void 0:e.name)}),[d,u]),null==u||!u.length)return null;var b=u.map((function(e){return{value:e.name,label:e.title,info:e.description}})),f=function(e){i(t,function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?_b(Object(n),!0).forEach((function(t){Object(a.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):_b(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({},u.find((function(t){return t.name===e})).attributes))},g="block-editor-block-variation-transforms";return Object(l.createElement)(v.DropdownMenu,{className:g,label:Object(y.__)("Transform to variation"),text:Object(y.__)("Transform to variation"),popoverProps:{position:"bottom center",className:"".concat(g,"__popover")},icon:jl.a,toggleProps:{iconPosition:"right"}},(function(){return Object(l.createElement)("div",{className:"".concat(g,"__container")},Object(l.createElement)(v.MenuGroup,null,Object(l.createElement)(v.MenuItemsChoice,{choices:b,value:o,onSelect:f})))}))},wb=Object(l.createElement)(v.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(l.createElement)(v.Path,{d:"M15 4H9v11h6V4zM4 18.5V20h16v-1.5H4z"})),Cb=Object(l.createElement)(v.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(l.createElement)(v.Path,{d:"M20 11h-5V4H9v7H4v1.5h5V20h6v-7.5h5z"}));function Sb(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Bb(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Sb(Object(n),!0).forEach((function(t){Object(a.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Sb(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Ib={top:{icon:Object(l.createElement)(v.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(l.createElement)(v.Path,{d:"M9 20h6V9H9v11zM4 4v1.5h16V4H4z"})),title:Object(y._x)("Align top","Block vertical alignment setting")},center:{icon:Cb,title:Object(y._x)("Align middle","Block vertical alignment setting")},bottom:{icon:wb,title:Object(y._x)("Align bottom","Block vertical alignment setting")}},xb=["top","center","bottom"],Pb={isAlternate:!0},Tb=function(e){var t=e.value,n=e.onChange,r=e.controls,o=void 0===r?xb:r,c=e.isCollapsed,i=void 0===c||c,a=Ib[t],s=Ib.top;return Object(l.createElement)(v.ToolbarGroup,{popoverProps:Pb,isCollapsed:i,icon:a?a.icon:s.icon,label:Object(y._x)("Change vertical alignment","Block vertical alignment setting label"),controls:o.map((function(e){return Bb(Bb({},Ib[e]),{},{isActive:t===e,role:i?"menuitemradio":void 0,onClick:(r=e,function(){return n(t===r?void 0:r)})});var r}))})};function Nb(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Db(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Nb(Object(n),!0).forEach((function(t){Object(a.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Nb(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Ab=Object(b.createHigherOrderComponent)((function(e){return function(t){var n=mo("color.palette"),r=!mo("color.custom"),o=void 0===t.colors?n:t.colors,c=void 0===t.disableCustomColors?r:t.disableCustomColors,i=!Object(d.isEmpty)(o)||!c;return Object(l.createElement)(e,Db(Db({},t),{},{colors:o,disableCustomColors:c,hasColorsToChoose:i}))}}),"withColorContext"),Rb=Ab(v.ColorPalette);function Lb(e){var t=e.onChange,n=e.value,r=Object(j.a)(e,["onChange","value"]);return Object(l.createElement)(Wo,Object(i.a)({},r,{onColorChange:t,colorValue:n,gradients:[],disableCustomGradients:!0}))}var Mb=[];function Fb(e){var t=mo("color.gradients")||Mb,n=!mo("color.customGradient");return Object(l.createElement)(v.__experimentalGradientPicker,Object(i.a)({gradients:void 0!==e.gradients?e.gradient:t,disableCustomGradients:void 0!==e.disableCustomGradients?e.disableCustomGradients:n},e))}var Vb=function(e){var t=void 0!==e.gradients&&void 0!==e.disableCustomGradients?v.__experimentalGradientPicker:Fb;return Object(l.createElement)(t,e)};function Hb(e){var t=e.className,n=e.value,r=e.onChange,o=e.label,c=void 0===o?Object(y.__)("Gradient Presets"):o,a=Object(j.a)(e,["className","value","onChange","label"]),s=mo("color.gradients"),b=!mo("color.customGradient");return Object(d.isEmpty)(s)&&b?null:Object(l.createElement)(v.BaseControl,{className:u()("block-editor-gradient-picker-control",t)},Object(l.createElement)(v.BaseControl.VisualLabel,null,c),Object(l.createElement)(Vb,Object(i.a)({value:n,onChange:r,className:"block-editor-gradient-picker-control__gradient-picker-presets",gradients:s,disableCustomGradients:b},a)))}function zb(e){var t=mo("color.gradients");return Object(d.isEmpty)(t)?null:Object(l.createElement)(v.PanelBody,{title:Object(y.__)("Gradient")},Object(l.createElement)(Hb,e))}var Gb=[25,50,75,100];function Ub(e){var t,n,r=e.imageWidth,o=e.imageHeight,c=e.imageSizeOptions,i=void 0===c?[]:c,a=e.isResizable,s=void 0===a||a,u=e.slug,b=e.width,f=e.height,p=e.onChange,m=e.onChangeImage,g=void 0===m?d.noop:m;function O(e,t){return function(){p({width:e,height:t})}}return Object(l.createElement)(l.Fragment,null,!Object(d.isEmpty)(i)&&Object(l.createElement)(v.SelectControl,{label:Object(y.__)("Image size"),value:u,options:i,onChange:g}),s&&Object(l.createElement)("div",{className:"block-editor-image-size-control"},Object(l.createElement)("p",{className:"block-editor-image-size-control__row"},Object(y.__)("Image dimensions")),Object(l.createElement)("div",{className:"block-editor-image-size-control__row"},Object(l.createElement)(v.TextControl,{type:"number",className:"block-editor-image-size-control__width",label:Object(y.__)("Width"),value:null!==(t=null!=b?b:r)&&void 0!==t?t:"",min:1,onChange:function(e){return p({width:parseInt(e,10)})}}),Object(l.createElement)(v.TextControl,{type:"number",className:"block-editor-image-size-control__height",label:Object(y.__)("Height"),value:null!==(n=null!=f?f:o)&&void 0!==n?n:"",min:1,onChange:function(e){return p({height:parseInt(e,10)})}})),Object(l.createElement)("div",{className:"block-editor-image-size-control__row"},Object(l.createElement)(v.ButtonGroup,{"aria-label":Object(y.__)("Image size presets")},Gb.map((function(e){var t=Math.round(r*(e/100)),n=Math.round(o*(e/100)),c=b===t&&f===n;return Object(l.createElement)(v.Button,{key:e,isSmall:!0,isPrimary:c,isPressed:c,onClick:O(t,n)},e,"%")}))),Object(l.createElement)(v.Button,{isSmall:!0,onClick:O()},Object(y.__)("Reset")))))}var Wb=Object(b.createHigherOrderComponent)((function(e){return function(t){var n=h().clientId;return Object(l.createElement)(e,Object(i.a)({},t,{clientId:n}))}}),"withClientId"),Kb=Wb((function(e){var t=e.clientId,n=e.showSeparator,r=e.isFloating,o=e.onAddBlock;return Object(l.createElement)(tu,{rootClientId:t,showSeparator:n,isFloating:r,onAddBlock:o})})),qb=Object(b.compose)([Wb,Object(m.withSelect)((function(e,t){var n=t.clientId,r=(0,e(vr).getBlockOrder)(n);return{lastBlockClientId:Object(d.last)(r)}}))])((function(e){var t=e.clientId,n=e.lastBlockClientId;return Object(l.createElement)(eu,{rootClientId:t,lastBlockClientId:n})})),$b=n(72),Yb=n.n($b),Xb=new WeakMap;function Qb(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Zb(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Qb(Object(n),!0).forEach((function(t){Object(a.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Qb(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Jb(e){var t=e.clientId,n=e.allowedBlocks,r=e.template,o=e.templateLock,c=e.wrapperRef,i=e.templateInsertUpdatesSelection,a=e.__experimentalCaptureToolbars,s=e.__experimentalAppenderTagName,u=e.renderAppender,b=e.orientation,f=e.placeholder,v=e.__experimentalLayout,g=void 0===v?Ir:v;!function(e,t,n,r,o){var c=Object(m.useDispatch)(vr).updateBlockListSettings,i=Object(m.useSelect)((function(t){var n=t(vr).getBlockRootClientId(e);return{blockListSettings:t(vr).getBlockListSettings(e),parentLock:t(vr).getTemplateLock(n)}}),[e]),a=i.blockListSettings,s=i.parentLock;Object(l.useLayoutEffect)((function(){var i={allowedBlocks:t,templateLock:void 0===n?s:n};void 0!==r&&(i.__experimentalCaptureToolbars=r),void 0!==o&&(i.orientation=o),Yb()(a,i)||c(e,i)}),[e,a,t,n,s,r,o,c])}(t,n,o,a,b),function(e,t,n,r){var o=Object(m.useSelect)((function(e){return e(vr).getSelectedBlocksInitialCaretPosition}),[]),c=Object(m.useDispatch)(vr).replaceInnerBlocks,i=Object(m.useSelect)((function(t){return t(vr).getBlocks(e)}),[e]),a=Object(l.useRef)(null);Object(l.useLayoutEffect)((function(){if((0===i.length||"all"===n)&&!Object(d.isEqual)(t,a.current)){a.current=t;var l=Object(p.synchronizeBlocksWithTemplate)(i,t);Object(d.isEqual)(l,i)||c(e,l,0===i.length&&r&&0!==l.length,o())}}),[i,t,n,e])}(t,r,o,i);var O=Object(m.useSelect)((function(e){var n=e(vr).getBlock(t),r=Object(p.getBlockType)(n.name);if(r&&r.providesContext)return function(e,t){Xb.has(t)||Xb.set(t,new WeakMap);var n=Xb.get(t);if(!n.has(e)){var r=Object(d.mapValues)(t.providesContext,(function(t){return e[t]}));n.set(e,r)}return n.get(e)}(n.attributes,r)}),[t]);return Object(l.createElement)(Pr,{value:g},Object(l.createElement)($a,{value:O},Object(l.createElement)(kd,{rootClientId:t,renderAppender:u,__experimentalAppenderTagName:s,wrapperRef:c,placeholder:f})))}function ef(e){return ss(e),Object(l.createElement)(Jb,e)}var tf=Object(l.forwardRef)((function(e,t){var n=nf({ref:t},e);return Object(l.createElement)("div",{className:"block-editor-inner-blocks"},Object(l.createElement)("div",n))}));function nf(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=Object(l.useRef)(),r=h(),o=r.clientId,c=Object(b.useViewportMatch)("medium","<"),a=Object(m.useSelect)((function(e){var t=e(vr),n=t.getBlockName,r=t.isBlockSelected,i=t.hasSelectedInnerBlock,a=(0,t.isNavigationMode)()||c;return"core/template"!==n(o)&&!r(o)&&!i(o,!0)&&a}),[o,c]),s=Object(b.useMergeRefs)([e.ref,n]),d=t.value&&t.onChange?ef:Jb;return Zb(Zb({},e),{},{ref:s,className:u()(e.className,"block-editor-block-list__layout",{"has-overlay":a}),children:Object(l.createElement)(d,Object(i.a)({},t,{clientId:o,wrapperRef:n}))})}tf.DefaultBlockAppender=qb,tf.ButtonBlockAppender=Kb,tf.Content=Object(p.withBlockContentContext)((function(e){var t=e.BlockContent;return Object(l.createElement)(t,null)}));var rf=tf,of=Object(l.createElement)(_r.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(l.createElement)(_r.Path,{d:"M9 9v6h11V9H9zM4 20h1.5V4H4v16z"})),cf=Object(l.createElement)(_r.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(l.createElement)(_r.Path,{d:"M20 9h-7.2V4h-1.6v5H4v6h7.2v5h1.6v-5H20z"})),af=Object(l.createElement)(_r.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(l.createElement)(_r.Path,{d:"M4 15h11V9H4v6zM18.5 4v16H20V4h-1.5z"})),lf=Object(l.createElement)(_r.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(l.createElement)(_r.Path,{d:"M9 15h6V9H9v6zm-5 5h1.5V4H4v16zM18.5 4v16H20V4h-1.5z"})),sf={left:of,center:cf,right:af,"space-between":lf},uf=function(e){var t=e.allowedControls,n=void 0===t?["left","center","right","space-between"]:t,r=e.isCollapsed,o=void 0===r||r,c=e.onChange,i=e.value,a=e.popoverProps,s=function(e){c(e===i?void 0:e)},u=i?sf[i]:sf.left,d=[{name:"left",icon:of,title:Object(y.__)("Justify items left"),isActive:"left"===i,onClick:function(){return s("left")}},{name:"center",icon:cf,title:Object(y.__)("Justify items center"),isActive:"center"===i,onClick:function(){return s("center")}},{name:"right",icon:af,title:Object(y.__)("Justify items right"),isActive:"right"===i,onClick:function(){return s("right")}},{name:"space-between",icon:lf,title:Object(y.__)("Space between items"),isActive:"space-between"===i,onClick:function(){return s("space-between")}}];return Object(l.createElement)(v.ToolbarGroup,{icon:u,popoverProps:a,label:Object(y.__)("Change items justification"),isCollapsed:o,controls:d.filter((function(e){return n.includes(e.name)}))})},df=n(271);function bf(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function ff(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?bf(Object(n),!0).forEach((function(t){Object(a.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):bf(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var pf=[{id:"opensInNewTab",title:Object(y.__)("Open in new tab")}],mf=function(e){var t=e.value,n=e.onChange,r=void 0===n?d.noop:n,o=e.settings,c=void 0===o?pf:o;if(!c||!c.length)return null;var i=function(e){return function(n){r(ff(ff({},t),{},Object(a.a)({},e.id,n)))}},s=c.map((function(e){return Object(l.createElement)(v.ToggleControl,{className:"block-editor-link-control__setting",key:e.id,label:e.title,onChange:i(e),checked:!!t&&!!t[e.id]})}));return Object(l.createElement)("fieldset",{className:"block-editor-link-control__settings"},Object(l.createElement)(v.VisuallyHidden,{as:"legend"},Object(y.__)("Currently selected link settings")),s)};var vf=function(e){Object(Ai.a)(o,e);var t,n,r=(t=o,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=Object(Li.a)(t);if(n){var o=Object(Li.a)(this).constructor;e=Reflect.construct(r,arguments,o)}else e=r.apply(this,arguments);return Object(Ri.a)(this,e)});function o(e){var t;return Object(Ti.a)(this,o),(t=r.call(this,e)).onChange=t.onChange.bind(Object(Di.a)(t)),t.onFocus=t.onFocus.bind(Object(Di.a)(t)),t.onKeyDown=t.onKeyDown.bind(Object(Di.a)(t)),t.selectLink=t.selectLink.bind(Object(Di.a)(t)),t.handleOnClick=t.handleOnClick.bind(Object(Di.a)(t)),t.bindSuggestionNode=t.bindSuggestionNode.bind(Object(Di.a)(t)),t.autocompleteRef=e.autocompleteRef||Object(l.createRef)(),t.inputRef=Object(l.createRef)(),t.updateSuggestions=Object(d.debounce)(t.updateSuggestions.bind(Object(Di.a)(t)),200),t.suggestionNodes=[],t.isUpdatingSuggestions=!1,t.state={suggestions:[],showSuggestions:!1,selectedSuggestion:null,suggestionsListboxId:"",suggestionOptionIdPrefix:""},t}return Object(Ni.a)(o,[{key:"componentDidUpdate",value:function(e){var t=this,n=this.state,r=n.showSuggestions,o=n.selectedSuggestion,c=this.props.value;r&&null!==o&&this.suggestionNodes[o]&&!this.scrollingIntoView&&(this.scrollingIntoView=!0,pd()(this.suggestionNodes[o],this.autocompleteRef.current,{onlyScrollIfNeeded:!0}),this.props.setTimeout((function(){t.scrollingIntoView=!1}),100)),e.value!==c&&this.shouldShowInitialSuggestions()&&this.updateSuggestions()}},{key:"componentDidMount",value:function(){this.shouldShowInitialSuggestions()&&this.updateSuggestions()}},{key:"componentWillUnmount",value:function(){delete this.suggestionsRequest}},{key:"bindSuggestionNode",value:function(e){var t=this;return function(n){t.suggestionNodes[e]=n}}},{key:"shouldShowInitialSuggestions",value:function(){var e=this.state.suggestions,t=this.props,n=t.__experimentalShowInitialSuggestions,r=void 0!==n&&n,o=t.value;return!this.isUpdatingSuggestions&&r&&!(o&&o.length)&&!(e&&e.length)}},{key:"updateSuggestions",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",n=this.props,r=n.__experimentalFetchLinkSuggestions,o=n.__experimentalHandleURLSuggestions;if(r){var c=!(t&&t.length);if(c||!(t.length<2||!o&&Object(As.isURL)(t))){this.isUpdatingSuggestions=!0,this.setState({selectedSuggestion:null,loading:!0});var i=r(t,{isInitialSuggestions:c});i.then((function(t){e.suggestionsRequest===i&&(e.setState({suggestions:t,loading:!1,showSuggestions:!!t.length}),t.length?e.props.debouncedSpeak(Object(y.sprintf)(
61
  /* translators: %s: number of results. */
62
+ Object(y._n)("%d result found, use up and down arrow keys to navigate.","%d results found, use up and down arrow keys to navigate.",t.length),t.length),"assertive"):e.props.debouncedSpeak(Object(y.__)("No results."),"assertive"),e.isUpdatingSuggestions=!1)})).catch((function(){e.suggestionsRequest===i&&(e.setState({loading:!1}),e.isUpdatingSuggestions=!1)})),this.suggestionsRequest=i}else this.setState({showSuggestions:!1,selectedSuggestion:null,loading:!1})}}},{key:"onChange",value:function(e){var t=e.target.value;this.props.onChange(t),this.props.disableSuggestions||this.updateSuggestions(t.trim())}},{key:"onFocus",value:function(){var e=this.state.suggestions,t=this.props,n=t.disableSuggestions,r=t.value;!r||n||this.isUpdatingSuggestions||e&&e.length||this.updateSuggestions(r.trim())}},{key:"onKeyDown",value:function(e){var t=this.state,n=t.showSuggestions,r=t.selectedSuggestion,o=t.suggestions,c=t.loading;if(n&&o.length&&!c){var i=this.state.suggestions[this.state.selectedSuggestion];switch(e.keyCode){case Mc.UP:e.stopPropagation(),e.preventDefault();var a=r?r-1:o.length-1;this.setState({selectedSuggestion:a});break;case Mc.DOWN:e.stopPropagation(),e.preventDefault();var l=null===r||r===o.length-1?0:r+1;this.setState({selectedSuggestion:l});break;case Mc.TAB:null!==this.state.selectedSuggestion&&(this.selectLink(i),this.props.speak(Object(y.__)("Link selected.")));break;case Mc.ENTER:null!==this.state.selectedSuggestion&&(e.stopPropagation(),this.selectLink(i))}}else switch(e.keyCode){case Mc.UP:0!==e.target.selectionStart&&(e.stopPropagation(),e.preventDefault(),e.target.setSelectionRange(0,0));break;case Mc.DOWN:this.props.value.length!==e.target.selectionStart&&(e.stopPropagation(),e.preventDefault(),e.target.setSelectionRange(this.props.value.length,this.props.value.length))}}},{key:"selectLink",value:function(e){this.props.onChange(e.url,e),this.setState({selectedSuggestion:null,showSuggestions:!1})}},{key:"handleOnClick",value:function(e){this.selectLink(e),this.inputRef.current.focus()}},{key:"render",value:function(){return Object(l.createElement)(l.Fragment,null,this.renderControl(),this.renderSuggestions())}},{key:"renderControl",value:function(){var e=this.props,t=e.label,n=e.className,r=e.isFullWidth,o=e.instanceId,c=e.placeholder,i=void 0===c?Object(y.__)("Paste URL or type to search"):c,a=e.__experimentalRenderControl,s=e.value,d=void 0===s?"":s,b=this.state,f=b.loading,p=b.showSuggestions,m=b.selectedSuggestion,g=b.suggestionsListboxId,O=b.suggestionOptionIdPrefix,h={id:"url-input-control-".concat(o),label:t,className:u()("block-editor-url-input",n,{"is-full-width":r})},j={value:d,required:!0,className:"block-editor-url-input__input",type:"text",onChange:this.onChange,onFocus:this.onFocus,placeholder:i,onKeyDown:this.onKeyDown,role:"combobox","aria-label":Object(y.__)("URL"),"aria-expanded":p,"aria-autocomplete":"list","aria-owns":g,"aria-activedescendant":null!==m?"".concat(O,"-").concat(m):void 0,ref:this.inputRef};return a?a(h,j,f):Object(l.createElement)(v.BaseControl,h,Object(l.createElement)("input",j),f&&Object(l.createElement)(v.Spinner,null))}},{key:"renderSuggestions",value:function(){var e=this,t=this.props,n=t.className,r=t.__experimentalRenderSuggestions,o=t.value,c=void 0===o?"":o,a=t.__experimentalShowInitialSuggestions,s=void 0!==a&&a,b=this.state,f=b.showSuggestions,p=b.suggestions,m=b.selectedSuggestion,g=b.suggestionsListboxId,O=b.suggestionOptionIdPrefix,h=b.loading,j={id:g,ref:this.autocompleteRef,role:"listbox"},k=function(t,n){return{role:"option",tabIndex:"-1",id:"".concat(O,"-").concat(n),ref:e.bindSuggestionNode(n),"aria-selected":n===m}};return Object(d.isFunction)(r)&&f&&p.length?r({suggestions:p,selectedSuggestion:m,suggestionsListProps:j,buildSuggestionItemProps:k,isLoading:h,handleSuggestionClick:this.handleOnClick,isInitialSuggestions:s&&!(c&&c.length)}):!Object(d.isFunction)(r)&&f&&p.length?Object(l.createElement)(v.Popover,{position:"bottom",noArrow:!0,focusOnMount:!1},Object(l.createElement)("div",Object(i.a)({},j,{className:u()("block-editor-url-input__suggestions","".concat(n,"__suggestions"))}),p.map((function(t,n){return Object(l.createElement)(v.Button,Object(i.a)({},k(0,n),{key:t.id,className:u()("block-editor-url-input__suggestion",{"is-selected":n===m}),onClick:function(){return e.handleOnClick(t)}}),t.title)})))):null}}],[{key:"getDerivedStateFromProps",value:function(e,t){var n=e.value,r=e.instanceId,o=e.disableSuggestions,c=e.__experimentalShowInitialSuggestions,i=void 0!==c&&c,a=t.showSuggestions,l=n&&n.length;return i||l||(a=!1),!0===o&&(a=!1),{showSuggestions:a,suggestionsListboxId:"block-editor-url-input-suggestions-".concat(r),suggestionOptionIdPrefix:"block-editor-url-input-suggestion-".concat(r)}}}]),o}(l.Component),gf=Object(b.compose)(b.withSafeTimeout,v.withSpokenMessages,b.withInstanceId,Object(m.withSelect)((function(e,t){if(!Object(d.isFunction)(t.__experimentalFetchLinkSuggestions))return{__experimentalFetchLinkSuggestions:(0,e(vr).getSettings)().__experimentalFetchLinkSuggestions}})))(vf),Of=function(e){var t,n=e.searchTerm,r=e.onClick,o=e.itemProps,c=e.isSelected,a=e.buttonText;return n?(t=a?Object(d.isFunction)(a)?a(n):a:Object(l.createInterpolateElement)(Object(y.sprintf)(
63
  /* translators: %s: search term. */
64
+ Object(y.__)("Create: <mark>%s</mark>"),n),{mark:Object(l.createElement)("mark",null)}),Object(l.createElement)(v.Button,Object(i.a)({},o,{className:u()("block-editor-link-control__search-create block-editor-link-control__search-item",{"is-selected":c}),onClick:r}),Object(l.createElement)(cs.a,{className:"block-editor-link-control__search-item-icon",icon:ts.a}),Object(l.createElement)("span",{className:"block-editor-link-control__search-item-header"},Object(l.createElement)("span",{className:"block-editor-link-control__search-item-title"},t)))):null},hf=Object(l.createElement)(_r.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"-2 -2 24 24"},Object(l.createElement)(_r.Path,{d:"M9 0C4.03 0 0 4.03 0 9s4.03 9 9 9 9-4.03 9-9-4.03-9-9-9zM1.11 9.68h2.51c.04.91.167 1.814.38 2.7H1.84c-.403-.85-.65-1.764-.73-2.7zm8.57-5.4V1.19c.964.366 1.756 1.08 2.22 2 .205.347.386.708.54 1.08l-2.76.01zm3.22 1.35c.232.883.37 1.788.41 2.7H9.68v-2.7h3.22zM8.32 1.19v3.09H5.56c.154-.372.335-.733.54-1.08.462-.924 1.255-1.64 2.22-2.01zm0 4.44v2.7H4.7c.04-.912.178-1.817.41-2.7h3.21zm-4.7 2.69H1.11c.08-.936.327-1.85.73-2.7H4c-.213.886-.34 1.79-.38 2.7zM4.7 9.68h3.62v2.7H5.11c-.232-.883-.37-1.788-.41-2.7zm3.63 4v3.09c-.964-.366-1.756-1.08-2.22-2-.205-.347-.386-.708-.54-1.08l2.76-.01zm1.35 3.09v-3.04h2.76c-.154.372-.335.733-.54 1.08-.464.92-1.256 1.634-2.22 2v-.04zm0-4.44v-2.7h3.62c-.04.912-.178 1.817-.41 2.7H9.68zm4.71-2.7h2.51c-.08.936-.327 1.85-.73 2.7H14c.21-.87.337-1.757.38-2.65l.01-.05zm0-1.35c-.046-.894-.176-1.78-.39-2.65h2.16c.403.85.65 1.764.73 2.7l-2.5-.05zm1-4H13.6c-.324-.91-.793-1.76-1.39-2.52 1.244.56 2.325 1.426 3.14 2.52h.04zm-9.6-2.52c-.597.76-1.066 1.61-1.39 2.52H2.65c.815-1.094 1.896-1.96 3.14-2.52zm-3.15 12H4.4c.324.91.793 1.76 1.39 2.52-1.248-.567-2.33-1.445-3.14-2.55l-.01.03zm9.56 2.52c.597-.76 1.066-1.61 1.39-2.52h1.76c-.82 1.08-1.9 1.933-3.14 2.48l-.01.04z"})),jf=function(e){var t=e.itemProps,n=e.suggestion,r=e.isSelected,o=void 0!==r&&r,c=e.onClick,a=e.isURL,s=void 0!==a&&a,d=e.searchTerm,b=void 0===d?"":d,f=e.shouldShowType,p=void 0!==f&&f;return Object(l.createElement)(v.Button,Object(i.a)({},t,{onClick:c,className:u()("block-editor-link-control__search-item",{"is-selected":o,"is-url":s,"is-entity":!s})}),s&&Object(l.createElement)(cs.a,{className:"block-editor-link-control__search-item-icon",icon:hf}),Object(l.createElement)("span",{className:"block-editor-link-control__search-item-header"},Object(l.createElement)("span",{className:"block-editor-link-control__search-item-title"},Object(l.createElement)(v.TextHighlight,{text:n.title,highlight:b})),Object(l.createElement)("span",{"aria-hidden":!s,className:"block-editor-link-control__search-item-info"},!s&&(Object(As.filterURLForDisplay)(Object(As.safeDecodeURI)(n.url))||""),s&&Object(y.__)("Press ENTER to add this link"))),p&&n.type&&Object(l.createElement)("span",{className:"block-editor-link-control__search-item-type"},"post_tag"===n.type?"tag":n.type))};function kf(e){var t=e.instanceId,n=e.withCreateSuggestion,r=e.currentInputValue,o=e.handleSuggestionClick,c=e.suggestionsListProps,a=e.buildSuggestionItemProps,s=e.suggestions,d=e.selectedSuggestion,b=e.isLoading,f=e.isInitialSuggestions,p=e.createSuggestionButtonText,m=e.suggestionsQuery,g=u()("block-editor-link-control__search-results",{"is-loading":b}),O=["url","mailto","tel","internal"],h=1===s.length&&O.includes(s[0].type.toLowerCase()),j=n&&!h&&!f,k=!(null!=m&&m.type),_="block-editor-link-control-search-results-label-".concat(t),E=f?Object(y.__)("Recently updated"):Object(y.sprintf)(
65
  /* translators: %s: search term. */
66
+ Object(y.__)('Search results for "%s"'),r),w=Object(l.createElement)(f?l.Fragment:v.VisuallyHidden,{},Object(l.createElement)("span",{className:"block-editor-link-control__search-results-label",id:_},E));return Object(l.createElement)("div",{className:"block-editor-link-control__search-results-wrapper"},w,Object(l.createElement)("div",Object(i.a)({},c,{className:g,"aria-labelledby":_}),s.map((function(e,t){return j&&"__CREATE__"===e.type?Object(l.createElement)(Of,{searchTerm:r,buttonText:p,onClick:function(){return o(e)},key:e.type,itemProps:a(e,t),isSelected:t===d}):"__CREATE__"===e.type?null:Object(l.createElement)(jf,{key:"".concat(e.id,"-").concat(e.type),itemProps:a(e,t),suggestion:e,index:t,onClick:function(){o(e)},isSelected:t===d,isURL:O.includes(e.type.toLowerCase()),searchTerm:r,shouldShowType:k})}))))}function yf(e){var t=Object(d.startsWith)(e,"#");return Object(As.isURL)(e)||e&&e.includes("www.")||t}function _f(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Ef(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?_f(Object(n),!0).forEach((function(t){Object(a.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):_f(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var wf=function(){return Promise.resolve([])},Cf=function(e){var t="URL",n=Object(As.getProtocol)(e)||"";return n.includes("mailto")&&(t="mailto"),n.includes("tel")&&(t="tel"),Object(d.startsWith)(e,"#")&&(t="internal"),Promise.resolve([{id:e,title:e,url:"URL"===t?Object(As.prependHTTP)(e):e,type:t}])},Sf=function(){var e=Object(ll.a)(Pt.a.mark((function e(t,n,r,o,c,i){var a,l,s;return Pt.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=n.isInitialSuggestions,e.next=3,Promise.all([r(t,n),o(t)]);case 3:if(l=e.sent,s=!t.includes(" "),l=s&&i&&!a?l[0].concat(l[1]):l[0],!a){e.next=8;break}return e.abrupt("return",l);case 8:return e.abrupt("return",yf(t)||!c?l:l.concat({title:t,url:t,type:"__CREATE__"}));case 9:case"end":return e.stop()}}),e)})));return function(_x,t,n,r,o,c){return e.apply(this,arguments)}}();function Bf(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function If(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Bf(Object(n),!0).forEach((function(t){Object(a.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Bf(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var xf=Promise.resolve([]),Pf=Object(l.forwardRef)((function(e,t){var n=e.value,r=e.children,o=e.currentLink,c=void 0===o?{}:o,i=e.className,a=void 0===i?null:i,s=e.placeholder,u=void 0===s?null:s,f=e.withCreateSuggestion,p=void 0!==f&&f,v=e.onCreateSuggestion,g=void 0===v?d.noop:v,O=e.onChange,h=void 0===O?d.noop:O,j=e.onSelect,k=void 0===j?d.noop:j,_=e.showSuggestions,E=void 0===_||_,w=e.renderSuggestions,C=void 0===w?function(e){return Object(l.createElement)(kf,e)}:w,S=e.fetchSuggestions,B=void 0===S?null:S,I=e.allowDirectEntry,x=void 0===I||I,P=e.showInitialSuggestions,T=void 0!==P&&P,N=e.suggestionsQuery,D=void 0===N?{}:N,A=e.withURLSuggestion,R=void 0===A||A,L=e.createSuggestionButtonText,M=function(e,t,n,r){var o=Object(m.useSelect)((function(e){return{fetchSearchSuggestions:(0,e(vr).getSettings)().__experimentalFetchLinkSuggestions}}),[]).fetchSearchSuggestions,c=t?Cf:wf;return Object(l.useCallback)((function(t,i){var a=i.isInitialSuggestions;return yf(t)?c(t,{isInitialSuggestions:a}):Sf(t,Ef(Ef({},e),{},{isInitialSuggestions:a}),o,c,n,r)}),[c,o,n])}(D,x,p,R),F=E?B||M:xf,V=Object(b.useInstanceId)(Pf),H=Object(l.useState)(),z=Object(Ro.a)(H,2),G=z[0],U=z[1],W=function(){var e=Object(ll.a)(Pt.a.mark((function e(t){var n,r;return Pt.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=t,"__CREATE__"!==t.type){e.next=12;break}return e.prev=2,e.next=5,g(t.title);case 5:n=e.sent,null!==(r=n)&&void 0!==r&&r.url&&k(n),e.next=11;break;case 9:e.prev=9,e.t0=e.catch(2);case 11:return e.abrupt("return");case 12:(x||n&&Object.keys(n).length>=1)&&k(If(If({},Object(d.omit)(c,"id","url")),n),n);case 13:case"end":return e.stop()}}),e,null,[[2,9]])})));return function(_x){return e.apply(this,arguments)}}();return Object(l.createElement)("form",{onSubmit:function(e){e.preventDefault(),W(G||{url:n})}},Object(l.createElement)(gf,{className:a,value:n,onChange:function(e,t){h(e),U(t)},placeholder:null!=u?u:Object(y.__)("Search or type url"),__experimentalRenderSuggestions:E?function(e){return C(If(If({},e),{},{instanceId:V,withCreateSuggestion:p,currentInputValue:n,createSuggestionButtonText:L,suggestionsQuery:D,handleSuggestionClick:function(t){e.handleSuggestionClick&&e.handleSuggestionClick(t),W(t)}}))}:null,__experimentalFetchLinkSuggestions:F,__experimentalHandleURLSuggestions:!0,__experimentalShowInitialSuggestions:T,ref:t}),r)})),Tf=Pf,Nf=Object(v.createSlotFill)("BlockEditorLinkControlViewer"),Df=Nf.Slot,Af=Nf.Fill;function Rf(e){var t=e.value,n=e.onEditClick,r=t&&Object(As.filterURLForDisplay)(Object(As.safeDecodeURI)(t.url),16)||"";return Object(l.createElement)("div",{"aria-label":Object(y.__)("Currently selected"),"aria-selected":"true",className:u()("block-editor-link-control__search-item",{"is-current":!0})},Object(l.createElement)("span",{className:"block-editor-link-control__search-item-header"},Object(l.createElement)(v.ExternalLink,{className:"block-editor-link-control__search-item-title",href:t.url},t&&t.title||r),t&&t.title&&Object(l.createElement)("span",{className:"block-editor-link-control__search-item-info"},r)),Object(l.createElement)(v.Button,{isSecondary:!0,onClick:function(){return n()},className:"block-editor-link-control__search-item-action"},Object(y.__)("Edit")),Object(l.createElement)(Df,{fillProps:t}))}var Lf=function(e){var t=!1;return{promise:new Promise((function(n,r){e.then((function(e){return t?r({isCanceled:!0}):n(e)}),(function(e){return r(t?{isCanceled:!0}:e)}))})),cancel:function(){t=!0}}};function Mf(e){var t=e.searchInputPlaceholder,n=e.value,r=e.settings,o=e.onChange,c=void 0===o?d.noop:o,i=e.noDirectEntry,a=void 0!==i&&i,s=e.showSuggestions,u=void 0===s||s,b=e.showInitialSuggestions,f=e.forceIsEditingLink,p=e.createSuggestion,m=e.withCreateSuggestion,g=e.inputValue,O=void 0===g?"":g,h=e.suggestionsQuery,j=void 0===h?{}:h,k=e.noURLSuggestion,_=void 0!==k&&k,E=e.createSuggestionButtonText;void 0===m&&p&&(m=!0);var w=Object(l.useRef)(!0),C=Object(l.useRef)(),S=Object(l.useState)(n&&n.url||""),B=Object(Ro.a)(S,2),I=B[0],x=B[1],P=O||I,T=Object(l.useState)(void 0!==f?f:!n||!n.url),N=Object(Ro.a)(T,2),D=N[0],A=N[1],R=Object(l.useRef)(!1);Object(l.useEffect)((function(){void 0!==f&&f!==D&&A(f)}),[f]),Object(l.useEffect)((function(){w.current?w.current=!1:(C.current.contains(C.current.ownerDocument.activeElement)||(dl.focus.focusable.find(C.current)[0]||C.current).focus(),R.current=!1)}),[D]);var L=function(e){var t=Object(l.useRef)(),n=Object(l.useState)(!1),r=Object(Ro.a)(n,2),o=r[0],c=r[1],i=Object(l.useState)(null),a=Object(Ro.a)(i,2),s=a[0],u=a[1],d=function(){var n=Object(ll.a)(Pt.a.mark((function n(r){return Pt.a.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return c(!0),u(null),n.prev=2,t.current=Lf(Promise.resolve(e(r))),n.next=6,t.current.promise;case 6:return n.abrupt("return",n.sent);case 9:if(n.prev=9,n.t0=n.catch(2),!n.t0||!n.t0.isCanceled){n.next=13;break}return n.abrupt("return");case 13:throw u(n.t0.message||Object(y.__)("An unknown error occurred during creation. Please try again.")),n.t0;case 15:return n.prev=15,c(!1),n.finish(15);case 18:case"end":return n.stop()}}),n,null,[[2,9,15,18]])})));return function(_x){return n.apply(this,arguments)}}();return Object(l.useEffect)((function(){return function(){t.current&&t.current.cancel()}}),[]),{createPage:d,isCreatingPage:o,errorMessage:s}}(p),M=L.createPage,F=L.isCreatingPage,V=L.errorMessage;return Object(l.createElement)("div",{tabIndex:-1,ref:C,className:"block-editor-link-control"},F&&Object(l.createElement)("div",{className:"block-editor-link-control__loading"},Object(l.createElement)(v.Spinner,null)," ",Object(y.__)("Creating"),"…"),(D||!n)&&!F&&Object(l.createElement)(l.Fragment,null,Object(l.createElement)("div",{className:"block-editor-link-control__search-input-wrapper"},Object(l.createElement)(Tf,{currentLink:n,className:"block-editor-link-control__search-input",placeholder:t,value:P,withCreateSuggestion:m,onCreateSuggestion:M,onChange:x,onSelect:function(e){var t;c(e),R.current=!(null===(t=C.current)||void 0===t||!t.contains(C.current.ownerDocument.activeElement)),A(!1)},showInitialSuggestions:b,allowDirectEntry:!a,showSuggestions:u,suggestionsQuery:j,withURLSuggestion:!_,createSuggestionButtonText:E},Object(l.createElement)("div",{className:"block-editor-link-control__search-actions"},Object(l.createElement)(v.Button,{type:"submit",label:Object(y.__)("Submit"),icon:df.a,className:"block-editor-link-control__search-submit"})))),V&&Object(l.createElement)(v.Notice,{className:"block-editor-link-control__search-error",status:"error",isDismissible:!1},V)),n&&!D&&!F&&Object(l.createElement)(Rf,{value:n,onEditClick:function(){return A(!0)}}),Object(l.createElement)(mf,{value:n,settings:r,onChange:c}))}Mf.ViewerFill=Af;var Ff=Mf,Vf=n(391),Hf=n(272),zf=Object(v.withFilters)("editor.MediaUpload")((function(){return null})),Gf=function(e){var t=e.fallback,n=void 0===t?null:t,r=e.children;return Object(m.useSelect)((function(e){return!!(0,e(vr).getSettings)().mediaUpload}),[])?r:n},Uf=Object(b.compose)([Object(m.withDispatch)((function(e){var t=e(Bs.store);return{createNotice:t.createNotice,removeNotice:t.removeNotice}})),Object(v.withFilters)("editor.MediaReplaceFlow")])((function(e){var t=e.mediaURL,n=e.mediaId,r=e.allowedTypes,o=e.accept,c=e.onSelect,i=e.onSelectURL,a=e.onFilesUpload,s=void 0===a?d.noop:a,u=e.name,b=void 0===u?Object(y.__)("Replace"):u,f=e.createNotice,p=e.removeNotice,g=Object(l.useState)(t),O=Object(Ro.a)(g,2),h=O[0],j=O[1],k=Object(m.useSelect)((function(e){return e(vr).getSettings().mediaUpload}),[]),_=Object(l.createRef)(),E=Object(d.uniqueId)("block-editor/media-replace-flow/error-notice/"),w=function(e){var t=document.createElement("div");t.innerHTML=Object(l.renderToString)(e);var n=t.textContent||t.innerText||"";setTimeout((function(){f("error",n,{speak:!0,id:E,isDismissible:!0})}),1e3)},C=function(e){c(e),j(e.url),Object(Tt.speak)(Object(y.__)("The media file has been replaced")),p(E)},S=function(e){e.keyCode===Mc.DOWN&&(e.preventDefault(),e.stopPropagation(),e.target.click())};return Object(l.createElement)(v.Dropdown,{popoverProps:{isAlternate:!0},contentClassName:"block-editor-media-replace-flow__options",renderToggle:function(e){var t=e.isOpen,n=e.onToggle;return Object(l.createElement)(v.ToolbarGroup,{className:"media-replace-flow"},Object(l.createElement)(v.ToolbarButton,{ref:_,"aria-expanded":t,"aria-haspopup":"true",onClick:n,onKeyDown:S},b))},renderContent:function(e){return e.onClose,Object(l.createElement)(l.Fragment,null,Object(l.createElement)(v.NavigableMenu,{className:"block-editor-media-replace-flow__media-upload-menu"},Object(l.createElement)(zf,{value:n,onSelect:function(e){return C(e)},allowedTypes:r,render:function(e){var t=e.open;return Object(l.createElement)(v.MenuItem,{icon:Vf.a,onClick:t},Object(y.__)("Open Media Library"))}}),Object(l.createElement)(Gf,null,Object(l.createElement)(v.FormFileUpload,{onChange:function(e){!function(e){var t=e.target.files;s(t),k({allowedTypes:r,filesList:t,onFileChange:function(e){var t=Object(Ro.a)(e,1)[0];C(t)},onError:w})}(e)},accept:o,render:function(e){var t=e.openFileDialog;return Object(l.createElement)(v.MenuItem,{icon:Hf.a,onClick:function(){t()}},Object(y.__)("Upload"))}}))),i&&Object(l.createElement)("form",{className:"block-editor-media-flow__url-input",onKeyDown:function(e){[Mc.TAB,Mc.ESCAPE].includes(e.keyCode)||e.stopPropagation()},onKeyPress:function(e){[Mc.TAB,Mc.ESCAPE].includes(e.keyCode)||e.stopPropagation()}},Object(l.createElement)("span",{className:"block-editor-media-replace-flow__image-url-label"},Object(y.__)("Current media URL:")),Object(l.createElement)(Ff,{value:{url:h},settings:[],showSuggestions:!1,onChange:function(e){var t=e.url;j(t),i(t),_.current.focus()}})))}})})),Wf=n(246);function Kf(e){var t=e.url,n=e.urlLabel,r=e.className,o=u()(r,"block-editor-url-popover__link-viewer-url");return t?Object(l.createElement)(v.ExternalLink,{className:o,href:t},n||Object(As.filterURLForDisplay)(Object(As.safeDecodeURI)(t))):Object(l.createElement)("span",{className:o})}function qf(e){var t=e.additionalControls,n=e.children,r=e.renderSettings,o=e.position,c=void 0===o?"bottom center":o,a=e.focusOnMount,s=void 0===a?"firstElement":a,u=Object(j.a)(e,["additionalControls","children","renderSettings","position","focusOnMount"]),d=Object(l.useState)(!1),b=Object(Ro.a)(d,2),f=b[0],p=b[1],m=!!r&&f;return Object(l.createElement)(v.Popover,Object(i.a)({className:"block-editor-url-popover",focusOnMount:s,position:c},u),Object(l.createElement)("div",{className:"block-editor-url-popover__input-container"},Object(l.createElement)("div",{className:"block-editor-url-popover__row"},n,!!r&&Object(l.createElement)(v.Button,{className:"block-editor-url-popover__settings-toggle",icon:jl.a,label:Object(y.__)("Link settings"),onClick:function(){p(!f)},"aria-expanded":f})),m&&Object(l.createElement)("div",{className:"block-editor-url-popover__row block-editor-url-popover__settings"},r())),t&&!m&&Object(l.createElement)("div",{className:"block-editor-url-popover__additional-controls"},t))}qf.LinkEditor=function(e){var t=e.autocompleteRef,n=e.className,r=e.onChangeInputValue,o=e.value,c=Object(j.a)(e,["autocompleteRef","className","onChangeInputValue","value"]);return Object(l.createElement)("form",Object(i.a)({className:u()("block-editor-url-popover__link-editor",n)},c),Object(l.createElement)(gf,{value:o,onChange:r,autocompleteRef:t}),Object(l.createElement)(v.Button,{icon:df.a,label:Object(y.__)("Apply"),type:"submit"}))},qf.LinkViewer=function(e){var t=e.className,n=e.linkClassName,r=e.onEditLinkClick,o=e.url,c=e.urlLabel,a=Object(j.a)(e,["className","linkClassName","onEditLinkClick","url","urlLabel"]);return Object(l.createElement)("div",Object(i.a)({className:u()("block-editor-url-popover__link-viewer",t)},a),Object(l.createElement)(Kf,{url:o,urlLabel:c,className:n}),r&&Object(l.createElement)(v.Button,{icon:Wf.a,label:Object(y.__)("Edit"),onClick:r}))};var $f=qf,Yf=function(e){var t=e.src,n=e.onChange,r=e.onSubmit,o=e.onClose;return Object(l.createElement)($f,{onClose:o},Object(l.createElement)("form",{className:"block-editor-media-placeholder__url-input-form",onSubmit:r},Object(l.createElement)("input",{className:"block-editor-media-placeholder__url-input-field",type:"url","aria-label":Object(y.__)("URL"),placeholder:Object(y.__)("Paste or type URL"),onChange:n,value:t}),Object(l.createElement)(v.Button,{className:"block-editor-media-placeholder__url-input-submit-button",icon:df.a,label:Object(y.__)("Apply"),type:"submit"})))},Xf=Object(v.withFilters)("editor.MediaPlaceholder")((function(e){var t=e.value,n=void 0===t?{}:t,r=e.allowedTypes,o=e.className,c=e.icon,i=e.labels,a=void 0===i?{}:i,s=e.mediaPreview,b=e.notices,f=e.isAppender,p=e.accept,g=e.addToGallery,O=e.multiple,h=void 0!==O&&O,j=e.dropZoneUIOnly,k=e.disableDropZone,_=e.disableMediaButtons,E=e.onError,w=e.onSelect,C=e.onCancel,S=e.onSelectURL,B=e.onDoubleClick,I=e.onFilesPreUpload,x=void 0===I?d.noop:I,P=e.onHTMLDrop,T=void 0===P?d.noop:P,N=e.children,D=Object(m.useSelect)((function(e){return(0,e(vr).getSettings)().mediaUpload}),[]),A=Object(l.useState)(""),R=Object(Ro.a)(A,2),L=R[0],M=R[1],F=Object(l.useState)(!1),V=Object(Ro.a)(F,2),H=V[0],z=V[1];Object(l.useEffect)((function(){var e;M(null!==(e=null==n?void 0:n.src)&&void 0!==e?e:"")}),[null==n?void 0:n.src]);var G=function(e){M(e.target.value)},U=function(){z(!0)},W=function(){z(!1)},K=function(e){e.preventDefault(),L&&S&&(S(L),W())},q=function(e){var t;if(x(e),h)if(g){var o=[];t=function(e){var t=(null!=n?n:[]).filter((function(e){return e.id?!o.some((function(t){var n=t.id;return Number(n)===Number(e.id)})):!o.some((function(t){var n=t.urlSlug;return e.url.includes(n)}))}));w(t.concat(e)),o=e.map((function(e){var t=e.url.lastIndexOf("."),n=e.url.slice(0,t);return{id:e.id,urlSlug:n}}))}}else t=w;else t=function(e){var t=Object(Ro.a)(e,1)[0];return w(t)};D({allowedTypes:r,filesList:e,onFileChange:t,onError:E})},$=function(e){q(e.target.files)},Y=function(e,t){var n=a.instructions,i=a.title;if(D||S||(n=Object(y.__)("To edit this block, you need permission to upload media.")),void 0===n||void 0===i){var d=null!=r?r:[],p=Object(Ro.a)(d,1)[0],m=1===d.length,g=m&&"audio"===p,O=m&&"image"===p,h=m&&"video"===p;void 0===n&&D&&(n=Object(y.__)("Upload a media file or pick one from your media library."),g?n=Object(y.__)("Upload an audio file, pick one from your media library, or add one with a URL."):O?n=Object(y.__)("Upload an image file, pick one from your media library, or add one with a URL."):h&&(n=Object(y.__)("Upload a video file, pick one from your media library, or add one with a URL."))),void 0===i&&(i=Object(y.__)("Media"),g?i=Object(y.__)("Audio"):O?i=Object(y.__)("Image"):h&&(i=Object(y.__)("Video")))}var j=u()("block-editor-media-placeholder",o,{"is-appender":f});return Object(l.createElement)(v.Placeholder,{icon:c,label:i,instructions:n,className:j,notices:b,onClick:t,onDoubleClick:B,preview:s},e,N)},X=function(){return k?null:Object(l.createElement)(v.DropZone,{onFilesDrop:q,onHTMLDrop:T})},Q=function(){return C&&Object(l.createElement)(v.Button,{className:"block-editor-media-placeholder__cancel-button",title:Object(y.__)("Cancel"),isLink:!0,onClick:C},Object(y.__)("Cancel"))},Z=function(){return S&&Object(l.createElement)("div",{className:"block-editor-media-placeholder__url-input-container"},Object(l.createElement)(v.Button,{className:"block-editor-media-placeholder__button",onClick:U,isPressed:H,isTertiary:!0},Object(y.__)("Insert from URL")),H&&Object(l.createElement)(Yf,{src:L,onChange:G,onSubmit:K,onClose:W}))};return j||_?(j&&Dt()("wp.blockEditor.MediaPlaceholder dropZoneUIOnly prop",{alternative:"disableMediaButtons"}),Object(l.createElement)(Gf,null,X())):Object(l.createElement)(Gf,{fallback:Y(Z())},function(){var e=Object(l.createElement)(zf,{addToGallery:g,gallery:h&&!(!r||0===r.length)&&r.every((function(e){return"image"===e||e.startsWith("image/")})),multiple:h,onSelect:w,allowedTypes:r,value:Array.isArray(n)?n.map((function(e){return e.id})):n.id,render:function(e){var t=e.open;return Object(l.createElement)(v.Button,{isTertiary:!0,onClick:function(e){e.stopPropagation(),t()}},Object(y.__)("Media Library"))}});if(D&&f)return Object(l.createElement)(l.Fragment,null,X(),Object(l.createElement)(v.FormFileUpload,{onChange:$,accept:p,multiple:h,render:function(t){var n=t.openFileDialog,r=Object(l.createElement)(l.Fragment,null,Object(l.createElement)(v.Button,{isPrimary:!0,className:u()("block-editor-media-placeholder__button","block-editor-media-placeholder__upload-button")},Object(y.__)("Upload")),e,Z(),Q());return Y(r,n)}}));if(D){var t=Object(l.createElement)(l.Fragment,null,X(),Object(l.createElement)(v.FormFileUpload,{isPrimary:!0,className:u()("block-editor-media-placeholder__button","block-editor-media-placeholder__upload-button"),onChange:$,accept:p,multiple:h},Object(y.__)("Upload")),e,Z(),Q());return Y(t)}return Y(e)}())})),Qf=Object(l.forwardRef)((function(e,t){return Object(l.createElement)(Ob,Object(i.a)({ref:t},e,{__unstableDisableFormats:!0,preserveWhiteSpace:!0}))}));Qf.Content=function(e){var t=e.value,n=void 0===t?"":t,r=e.tagName,o=void 0===r?"div":r,c=Object(j.a)(e,["value","tagName"]);return Object(l.createElement)(o,c,n)};var Zf=Qf,Jf=Object(l.forwardRef)((function(e,t){var n=e.__experimentalVersion,r=Object(j.a)(e,["__experimentalVersion"]);if(2===n)return Object(l.createElement)(Zf,Object(i.a)({ref:t},r));var o=r.className,c=r.onChange,a=Object(j.a)(r,["className","onChange"]);return Object(l.createElement)(Fl.a,Object(i.a)({ref:t,className:u()("block-editor-plain-text",o),onChange:function(e){return c(e.target.value)}},a))}));function ep(e){var t=e.property,n=e.viewport,r=e.desc,o=Object(b.useInstanceId)(ep),c=r||Object(y.sprintf)(
67
  /* translators: 1: property name. 2: viewport name. */
68
+ Object(y._x)("Controls the %1$s property for %2$s viewports.","Text labelling a interface as controlling a given layout property (eg: margin) for a given screen size."),t,n.label);return Object(l.createElement)(l.Fragment,null,Object(l.createElement)("span",{"aria-describedby":"rbc-desc-".concat(o)},n.label),Object(l.createElement)(v.VisuallyHidden,{as:"span",id:"rbc-desc-".concat(o)},c))}var tp=function(e){var t=e.title,n=e.property,r=e.toggleLabel,o=e.onIsResponsiveChange,c=e.renderDefaultControl,i=e.renderResponsiveControls,a=e.isResponsive,s=void 0!==a&&a,d=e.defaultLabel,b=void 0===d?{id:"all",
69
  /* translators: 'Label. Used to signify a layout property (eg: margin, padding) will apply uniformly to all screensizes.' */
70
  label:Object(y.__)("All")}:d,f=e.viewports,p=void 0===f?[{id:"small",label:Object(y.__)("Small screens")},{id:"medium",label:Object(y.__)("Medium screens")},{id:"large",label:Object(y.__)("Large screens")}]:f;if(!t||!n||!c)return null;var m=r||Object(y.sprintf)(
71
  /* translators: 'Toggle control label. Should the property be the same across all screen sizes or unique per screen size.'. %s property value for the control (eg: margin, padding...etc) */
72
+ Object(y.__)("Use the same %s on all screensizes."),n),g=Object(y.__)("Toggle between using the same value for all screen sizes or using a unique value per screen size."),O=c(Object(l.createElement)(ep,{property:n,viewport:b}),b);
73
+ /* translators: 'Help text for the responsive mode toggle control.' */return Object(l.createElement)("fieldset",{className:"block-editor-responsive-block-control"},Object(l.createElement)("legend",{className:"block-editor-responsive-block-control__title"},t),Object(l.createElement)("div",{className:"block-editor-responsive-block-control__inner"},Object(l.createElement)(v.ToggleControl,{className:"block-editor-responsive-block-control__toggle",label:m,checked:!s,onChange:o,help:g}),Object(l.createElement)("div",{className:u()("block-editor-responsive-block-control__group",{"is-responsive":s})},!s&&O,s&&(i?i(p):p.map((function(e){return Object(l.createElement)(l.Fragment,{key:e.id},c(Object(l.createElement)(ep,{property:n,viewport:e}),e))}))))))};function np(e){var t=e.character,n=e.type,r=e.onUse;return Object(b.useKeyboardShortcut)(Mc.rawShortcut[n](t),(function(){return r(),!1}),{bindGlobal:!0}),null}function rp(e){var t,n=e.name,r=e.shortcutType,o=e.shortcutCharacter,c=Object(j.a)(e,["name","shortcutType","shortcutCharacter"]),a="RichText.ToolbarControls";return n&&(a+=".".concat(n)),r&&o&&(t=Mc.displayShortcut[r](o)),Object(l.createElement)(v.Fill,{name:a},Object(l.createElement)(v.ToolbarButton,Object(i.a)({},c,{shortcut:t})))}var op=function(e){Object(Ai.a)(o,e);var t,n,r=(t=o,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=Object(Li.a)(t);if(n){var o=Object(Li.a)(this).constructor;e=Reflect.construct(r,arguments,o)}else e=r.apply(this,arguments);return Object(Ri.a)(this,e)});function o(){var e;return Object(Ti.a)(this,o),(e=r.apply(this,arguments)).onInput=e.onInput.bind(Object(Di.a)(e)),e}return Object(Ni.a)(o,[{key:"onInput",value:function(e){e.inputType===this.props.inputType&&this.props.onInput()}},{key:"componentDidMount",value:function(){document.addEventListener("input",this.onInput,!0)}},{key:"componentWillUnmount",value:function(){document.removeEventListener("input",this.onInput,!0)}},{key:"render",value:function(){return null}}]),o}(l.Component),cp=Object(l.createElement)(v.SVG,{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},Object(l.createElement)(v.Path,{d:"M9.4 20.5L5.2 3.8l14.6 9-2 .3c-.2 0-.4.1-.7.1-.9.2-1.6.3-2.2.5-.8.3-1.4.5-1.8.8-.4.3-.8.8-1.3 1.5-.4.5-.8 1.2-1.2 2l-.3.6-.9 1.9zM7.6 7.1l2.4 9.3c.2-.4.5-.8.7-1.1.6-.8 1.1-1.4 1.6-1.8.5-.4 1.3-.8 2.2-1.1l1.2-.3-8.1-5z"})),ip=Object(l.forwardRef)((function(e,t){var n=Object(m.useSelect)((function(e){return e(vr).isNavigationMode()}),[]),r=Object(m.useDispatch)(vr).setNavigationMode,o=function(e){r("edit"!==e)};return Object(l.createElement)(v.Dropdown,{renderToggle:function(r){var o=r.isOpen,c=r.onToggle;return Object(l.createElement)(v.Button,Object(i.a)({},e,{ref:t,icon:n?cp:Wf.a,"aria-expanded":o,"aria-haspopup":"true",onClick:c
74
+ /* translators: button label text should, if possible, be under 16 characters. */,label:Object(y.__)("Modes")}))},position:"bottom right",renderContent:function(){return Object(l.createElement)(l.Fragment,null,Object(l.createElement)(v.NavigableMenu,{role:"menu","aria-label":Object(y.__)("Modes")},Object(l.createElement)(v.MenuItemsChoice,{value:n?"select":"edit",onSelect:o,choices:[{value:"edit",label:Object(l.createElement)(l.Fragment,null,Object(l.createElement)(cs.a,{icon:Wf.a}),Object(y.__)("Edit"))},{value:"select",label:Object(l.createElement)(l.Fragment,null,cp,Object(y.__)("Select"))}]})),Object(l.createElement)("div",{className:"block-editor-tool-selector__help"},Object(y.__)("Tools offer different interactions for block selection & editing. To select, press Escape, to go back to editing, press Enter.")))}})})),ap=n(231),lp=Object(l.createElement)(_r.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(l.createElement)(_r.Path,{d:"M9.737 18.011L3.98 12.255l5.734-6.28 1.107 1.012-4.103 4.494h13.3v1.5H6.828l3.97 3.97-1.06 1.06z"}));var sp=function(e){Object(Ai.a)(o,e);var t,n,r=(t=o,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=Object(Li.a)(t);if(n){var o=Object(Li.a)(this).constructor;e=Reflect.construct(r,arguments,o)}else e=r.apply(this,arguments);return Object(Ri.a)(this,e)});function o(){var e;return Object(Ti.a)(this,o),(e=r.apply(this,arguments)).toggle=e.toggle.bind(Object(Di.a)(e)),e.submitLink=e.submitLink.bind(Object(Di.a)(e)),e.state={expanded:!1},e}return Object(Ni.a)(o,[{key:"toggle",value:function(){this.setState({expanded:!this.state.expanded})}},{key:"submitLink",value:function(e){e.preventDefault(),this.toggle()}},{key:"render",value:function(){var e=this.props,t=e.url,n=e.onChange,r=this.state.expanded,o=t?Object(y.__)("Edit link"):Object(y.__)("Insert link");return Object(l.createElement)("div",{className:"block-editor-url-input__button"},Object(l.createElement)(v.Button,{icon:ap.a,label:o,onClick:this.toggle,className:"components-toolbar__control",isPressed:!!t}),r&&Object(l.createElement)("form",{className:"block-editor-url-input__button-modal",onSubmit:this.submitLink},Object(l.createElement)("div",{className:"block-editor-url-input__button-modal-line"},Object(l.createElement)(v.Button,{className:"block-editor-url-input__back",icon:lp,label:Object(y.__)("Close"),onClick:this.toggle}),Object(l.createElement)(gf,{value:t||"",onChange:n}),Object(l.createElement)(v.Button,{icon:df.a,label:Object(y.__)("Submit"),type:"submit"}))))}}]),o}(l.Component),up=n(158),dp=["noreferrer","noopener"],bp=Object(l.createElement)(v.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},Object(l.createElement)(v.Path,{d:"M0,0h24v24H0V0z",fill:"none"}),Object(l.createElement)(v.Path,{d:"m19 5v14h-14v-14h14m0-2h-14c-1.1 0-2 0.9-2 2v14c0 1.1 0.9 2 2 2h14c1.1 0 2-0.9 2-2v-14c0-1.1-0.9-2-2-2z"}),Object(l.createElement)(v.Path,{d:"m14.14 11.86l-3 3.87-2.14-2.59-3 3.86h12l-3.86-5.14z"})),fp=function(e){var t=e.linkDestination,n=e.onChangeUrl,r=e.url,o=e.mediaType,c=void 0===o?"image":o,i=e.mediaUrl,a=e.mediaLink,s=e.linkTarget,u=e.linkClass,b=e.rel,f=Object(l.useState)(!1),p=Object(Ro.a)(f,2),m=p[0],g=p[1],O=Object(l.useCallback)((function(){g(!0)})),h=Object(l.useState)(!1),j=Object(Ro.a)(h,2),k=j[0],_=j[1],E=Object(l.useState)(null),w=Object(Ro.a)(E,2),C=w[0],S=w[1],B=Object(l.useRef)(null),I=Object(l.useCallback)((function(){"media"!==t&&"attachment"!==t||S(""),_(!0)})),x=Object(l.useCallback)((function(){_(!1)})),P=Object(l.useCallback)((function(){S(null),x(),g(!1)})),T=function(e){var t=e;return void 0===e||Object(d.isEmpty)(t)||Object(d.isEmpty)(t)||(Object(d.each)(dp,(function(e){var n=new RegExp("\\b"+e+"\\b","gi");t=t.replace(n,"")})),t!==e&&(t=t.trim()),Object(d.isEmpty)(t)&&(t=void 0)),t},N=Object(l.useCallback)((function(){return function(e){var t=B.current;t&&t.contains(e.target)||(g(!1),S(null),x())}})),D=Object(l.useCallback)((function(){return function(e){if(C){var t,r=(null===(t=R().find((function(e){return e.url===C})))||void 0===t?void 0:t.linkDestination)||"custom";n({href:C,linkDestination:r})}x(),S(null),e.preventDefault()}})),A=Object(l.useCallback)((function(){n({linkDestination:"none",href:""})})),R=function(){var e=[{linkDestination:"media",title:Object(y.__)("Media File"),url:"image"===c?i:void 0,icon:bp}];return"image"===c&&a&&e.push({linkDestination:"attachment",title:Object(y.__)("Attachment Page"),url:"image"===c?a:void 0,icon:Object(l.createElement)(v.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},Object(l.createElement)(v.Path,{d:"M0 0h24v24H0V0z",fill:"none"}),Object(l.createElement)(v.Path,{d:"M14 2H6c-1.1 0-1.99.9-1.99 2L4 20c0 1.1.89 2 1.99 2H18c1.1 0 2-.9 2-2V8l-6-6zM6 20V4h7v5h5v11H6z"}))}),e},L=Object(l.createElement)(l.Fragment,null,Object(l.createElement)(v.ToggleControl,{label:Object(y.__)("Open in new tab"),onChange:function(e){var t=function(e){var t=e?"_blank":void 0;return{linkTarget:t,rel:t||b?T(b):void 0}}(e);n(t)},checked:"_blank"===s}),Object(l.createElement)(v.TextControl,{label:Object(y.__)("Link Rel"),value:T(b)||"",onChange:function(e){n({rel:e})}}),Object(l.createElement)(v.TextControl,{label:Object(y.__)("Link CSS Class"),value:u||"",onChange:function(e){n({linkClass:e})}})),M=null!==C?C:r,F=(Object(d.find)(R(),["linkDestination",t])||{}).title;return Object(l.createElement)(l.Fragment,null,Object(l.createElement)(v.ToolbarButton,{icon:ap.a,className:"components-toolbar__control",label:r?Object(y.__)("Edit link"):Object(y.__)("Insert link"),"aria-expanded":m,onClick:O}),m&&Object(l.createElement)($f,{onFocusOutside:N(),onClose:P,renderSettings:function(){return L},additionalControls:!M&&Object(l.createElement)(v.NavigableMenu,null,Object(d.map)(R(),(function(e){return Object(l.createElement)(v.MenuItem,{key:e.linkDestination,icon:e.icon,onClick:function(){var t,r,o;S(null),t=e.url,o=R(),r=t?(Object(d.find)(o,(function(e){return e.url===t}))||{linkDestination:"custom"}).linkDestination:"none",n({linkDestination:r,href:t}),x()}},e.title)})))},(!r||k)&&Object(l.createElement)($f.LinkEditor,{className:"block-editor-format-toolbar__link-container-content",value:M,onChangeInputValue:S,onSubmit:D(),autocompleteRef:B}),r&&!k&&Object(l.createElement)(l.Fragment,null,Object(l.createElement)($f.LinkViewer,{className:"block-editor-format-toolbar__link-container-content",url:r,onEditLinkClick:I,urlLabel:F}),Object(l.createElement)(v.Button,{icon:up.a,label:Object(y.__)("Remove link"),onClick:A}))))},pp=n(159);function mp(e){var t=e.children,n=e.className,r=e.isEnabled,o=void 0===r||r,c=e.deviceType,i=e.setDeviceType;if(Object(b.useViewportMatch)("small","<"))return null;var a={className:u()(n,"block-editor-post-preview__dropdown-content"),position:"bottom left"},s={isTertiary:!0,className:"block-editor-post-preview__button-toggle",disabled:!o,
75
  /* translators: button label text should, if possible, be under 16 characters. */
76
+ children:Object(y.__)("Preview")};return Object(l.createElement)(v.DropdownMenu,{className:"block-editor-post-preview__dropdown",popoverProps:a,toggleProps:s,icon:null},(function(){return Object(l.createElement)(l.Fragment,null,Object(l.createElement)(v.MenuGroup,null,Object(l.createElement)(v.MenuItem,{className:"block-editor-post-preview__button-resize",onClick:function(){return i("Desktop")},icon:"Desktop"===c&&pp.a},Object(y.__)("Desktop")),Object(l.createElement)(v.MenuItem,{className:"block-editor-post-preview__button-resize",onClick:function(){return i("Tablet")},icon:"Tablet"===c&&pp.a},Object(y.__)("Tablet")),Object(l.createElement)(v.MenuItem,{className:"block-editor-post-preview__button-resize",onClick:function(){return i("Mobile")},icon:"Mobile"===c&&pp.a},Object(y.__)("Mobile"))),t)}))}var vp=n(344),gp=/\((min|max)-width:[^\(]*?\)/g;function Op(e){return!!e.media&&!!e.media.mediaText.match(gp)}function hp(e,t,n){e.deleteRule(n),e.insertRule(t,n)}function jp(e,t){return e.replace(gp,(function(e){return Object(vp.match)(e,{type:"screen",width:t})?"(min-width:0px)":"(min-width:999999px)"}))}function kp(e,t){Object(l.useEffect)((function(){if(t){var n,r,o,c="undefined"==typeof window?[]:Object(d.filter)(null!==(n=null===(r=window)||void 0===r||null===(o=r.document)||void 0===o?void 0:o.styleSheets)&&void 0!==n?n:[],(function(e){return!!e.href&&Object(As.getProtocol)(e.href)===window.location.protocol&&Object(As.getAuthority)(e.href)===window.location.host})),i=[];return c.forEach((function(n,r){for(var o=!1,c=0;c<n.cssRules.length;++c){var a=n.cssRules[c];if((a.type===window.CSSRule.STYLE_RULE||a.type===window.CSSRule.MEDIA_RULE)&&(!o&&a.cssText.match(new RegExp("#start-".concat(e)))&&(o=!0),o&&a.cssText.match(new RegExp("#end-".concat(e)))&&(o=!1),o&&Op(a))){var l=a.cssText;i[r]||(i[r]=[]),i[r][c]=l,hp(n,jp(l,t),c)}}})),function(){i.forEach((function(e,t){if(e)for(var n=0;n<e.length;++n){var r=e[n];r&&hp(c[t],r,n)}}))}}}),[t])}function yp(e,t){var n=Object(l.useState)(window.innerWidth),r=Object(Ro.a)(n,2),o=r[0],c=r[1];Object(l.useEffect)((function(){if("Desktop"!==e){var t=function(){return c(window.innerWidth)};return window.addEventListener("resize",t),function(){window.removeEventListener("resize",t)}}}),[e]);var i=function(e){var t;switch(e){case"Tablet":t=780;break;case"Mobile":t=360;break;default:return null}return t<o?t:o};return kp("resizable-editor-section",t?null:i(e)),function(e){var t="Mobile"===e?"768px":"1024px";switch(e){case"Tablet":case"Mobile":return{width:i(e),margin:(window.innerHeight<800?36:72)+"px auto",flexGrow:0,height:t,minHeight:t,maxHeight:t,overflowY:"auto"};default:return null}}(e)}var _p=Object(m.withSelect)((function(e){return{selectedBlockClientId:e(vr).getBlockSelectionStart()}}))((function(e){var t=e.selectedBlockClientId;return t?Object(l.createElement)(v.Button,{isSecondary:!0,className:"block-editor-skip-to-selected-block",onClick:function(){rc(t,document).focus()}},Object(y.__)("Skip to the selected block")):null})),Ep=n(149),wp=Object(m.withSelect)((function(e){return{blocks:(0,e(vr).getMultiSelectedBlocks)()}}))((function(e){var t=e.blocks,n=Object(Ep.count)(Object(p.serialize)(t),"words");return Object(l.createElement)("div",{className:"block-editor-multi-selection-inspector__card"},Object(l.createElement)(Aa,{icon:wu,showColors:!0}),Object(l.createElement)("div",{className:"block-editor-multi-selection-inspector__card-content"},Object(l.createElement)("div",{className:"block-editor-multi-selection-inspector__card-title"},Object(y.sprintf)(
77
  /* translators: %d: number of blocks */
78
  Object(y._n)("%d block","%d blocks",t.length),t.length)),Object(l.createElement)("div",{className:"block-editor-multi-selection-inspector__card-description"},Object(y.sprintf)(
79
  /* translators: %d: number of words */
80
+ Object(y._n)("%d word","%d words",n),n))))}));function Cp(e){var t=e.blockName,n=Object(m.useSelect)((function(e){var n,r,o=e(vr).getSettings().__experimentalPreferredStyleVariations;return{preferredStyle:null==o||null===(n=o.value)||void 0===n?void 0:n[t],onUpdatePreferredStyleVariations:null!==(r=null==o?void 0:o.onChange)&&void 0!==r?r:null,styles:e(p.store).getBlockStyles(t)}}),[t]),r=n.preferredStyle,o=n.onUpdatePreferredStyleVariations,c=n.styles,i=Object(l.useMemo)((function(){return[{label:Object(y.__)("Not set"),value:""}].concat(Object(k.a)(c.map((function(e){return{label:e.label,value:e.name}}))))}),[c]),a=Object(l.useCallback)((function(e){o(t,e)}),[t,o]);return o&&Object(l.createElement)(v.SelectControl,{options:i,value:r||"",label:Object(y.__)("Default Style"),onChange:a})}var Sp=function(e){var t=e.clientId,n=e.blockName,r=e.hasBlockStyles,o=e.bubblesVirtually,c=za(t);return Object(l.createElement)("div",{className:"block-editor-block-inspector"},Object(l.createElement)(ls,c),Object(l.createElement)(Eb,{blockClientId:t}),r&&Object(l.createElement)("div",null,Object(l.createElement)(v.PanelBody,{title:Object(y.__)("Styles")},Object(l.createElement)(Tu,{clientId:t}),Object(p.hasBlockSupport)(n,"defaultStylePicker",!0)&&Object(l.createElement)(Cp,{blockName:n}))),Object(l.createElement)(ro.Slot,{bubblesVirtually:o}),Object(l.createElement)("div",null,Object(l.createElement)(Bp,{slotName:Zr.slotName,bubblesVirtually:o})),Object(l.createElement)(_p,{key:"back"}))},Bp=function(e){var t=e.slotName,n=e.bubblesVirtually,r=Object(v.__experimentalUseSlot)(t);return Boolean(r.fills&&r.fills.length)?Object(l.createElement)(v.PanelBody,{className:"block-editor-block-inspector__advanced",title:Object(y.__)("Advanced"),initialOpen:!1},Object(l.createElement)(Zr.Slot,{bubblesVirtually:n})):null},Ip=Object(m.withSelect)((function(e){var t=e(vr),n=t.getSelectedBlockClientId,r=t.getSelectedBlockCount,o=t.getBlockName,c=e(p.store).getBlockStyles,i=n(),a=i&&o(i),l=i&&Object(p.getBlockType)(a),s=i&&c(a);return{count:r(),hasBlockStyles:s&&s.length>0,selectedBlockName:a,selectedBlockClientId:i,blockType:l}}))((function(e){var t=e.blockType,n=e.count,r=e.hasBlockStyles,o=e.selectedBlockClientId,c=e.selectedBlockName,i=e.showNoBlockSelectedMessage,a=void 0===i||i,s=e.bubblesVirtually,u=void 0===s||s;if(n>1)return Object(l.createElement)("div",{className:"block-editor-block-inspector"},Object(l.createElement)(wp,null),Object(l.createElement)(ro.Slot,{bubblesVirtually:u}));var d=c===Object(p.getUnregisteredTypeHandlerName)();return t&&o&&!d?Object(l.createElement)(Sp,{clientId:o,blockName:t.name,hasBlockStyles:r,bubblesVirtually:u}):a?Object(l.createElement)("span",{className:"block-editor-block-inspector__no-blocks"},Object(y.__)("No block selected.")):null}));function xp(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Pp(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?xp(Object(n),!0).forEach((function(t){Object(a.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):xp(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Tp=Object(l.forwardRef)((function(e,t){var n=e.children,r=e.tagName,o=void 0===r?"div":r,c=Object(j.a)(e,["children","tagName"]);Dt()("wp.blockEditor.__experimentalBlock",{alternative:"wp.blockEditor.useBlockProps"});var i=Sd(Pp(Pp({},c),{},{ref:t}));return Object(l.createElement)(o,i,n)})),Np=["p","div","h1","h2","h3","h4","h5","h6","ol","ul","li","figure","nav","pre","header","section","aside","footer","main"].reduce((function(e,t){return e[t]=Object(l.forwardRef)((function(e,n){return Object(l.createElement)(Tp,Object(i.a)({},e,{ref:n,tagName:t}))})),e}),Tp);function Dp(){var e=Object(m.useSelect)((function(e){var t=e(vr),n=t.hasSelectedBlock,r=t.hasMultiSelection;return n()||r()})),t=Object(m.useDispatch)(vr).clearSelectedBlock;return Object(b.useRefEffect)((function(n){if(e)return n.addEventListener("mousedown",r),function(){n.removeEventListener("mousedown",r)};function r(e){e.target.closest(".wp-block")||t()}}),[e,t])}function Ap(e){return Object(l.createElement)("div",Object(i.a)({ref:Dp()},e))}var Rp=n(345),Lp=n.n(Rp),Mp=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g;function Fp(e){return e?e.replace(/^\s+|\s+$/g,""):""}var Vp=n(210),Hp=n.n(Vp),zp=Gp;function Gp(e){this.options=e||{}}Gp.prototype.emit=function(e){return e},Gp.prototype.visit=function(e){return this[e.type](e)},Gp.prototype.mapVisit=function(e,t){var n="";t=t||"";for(var r=0,o=e.length;r<o;r++)n+=this.visit(e[r]),t&&r<o-1&&(n+=this.emit(t));return n};var Up=Wp;function Wp(e){zp.call(this,e)}Hp()(Wp,zp),Wp.prototype.compile=function(e){return e.stylesheet.rules.map(this.visit,this).join("")},Wp.prototype.comment=function(e){return this.emit("",e.position)},Wp.prototype.import=function(e){return this.emit("@import "+e.import+";",e.position)},Wp.prototype.media=function(e){return this.emit("@media "+e.media,e.position)+this.emit("{")+this.mapVisit(e.rules)+this.emit("}")},Wp.prototype.document=function(e){var t="@"+(e.vendor||"")+"document "+e.document;return this.emit(t,e.position)+this.emit("{")+this.mapVisit(e.rules)+this.emit("}")},Wp.prototype.charset=function(e){return this.emit("@charset "+e.charset+";",e.position)},Wp.prototype.namespace=function(e){return this.emit("@namespace "+e.namespace+";",e.position)},Wp.prototype.supports=function(e){return this.emit("@supports "+e.supports,e.position)+this.emit("{")+this.mapVisit(e.rules)+this.emit("}")},Wp.prototype.keyframes=function(e){return this.emit("@"+(e.vendor||"")+"keyframes "+e.name,e.position)+this.emit("{")+this.mapVisit(e.keyframes)+this.emit("}")},Wp.prototype.keyframe=function(e){var t=e.declarations;return this.emit(e.values.join(","),e.position)+this.emit("{")+this.mapVisit(t)+this.emit("}")},Wp.prototype.page=function(e){var t=e.selectors.length?e.selectors.join(", "):"";return this.emit("@page "+t,e.position)+this.emit("{")+this.mapVisit(e.declarations)+this.emit("}")},Wp.prototype["font-face"]=function(e){return this.emit("@font-face",e.position)+this.emit("{")+this.mapVisit(e.declarations)+this.emit("}")},Wp.prototype.host=function(e){return this.emit("@host",e.position)+this.emit("{")+this.mapVisit(e.rules)+this.emit("}")},Wp.prototype["custom-media"]=function(e){return this.emit("@custom-media "+e.name+" "+e.media+";",e.position)},Wp.prototype.rule=function(e){var t=e.declarations;return t.length?this.emit(e.selectors.join(","),e.position)+this.emit("{")+this.mapVisit(t)+this.emit("}"):""},Wp.prototype.declaration=function(e){return this.emit(e.property+":"+e.value,e.position)+this.emit(";")};var Kp=qp;function qp(e){e=e||{},zp.call(this,e),this.indentation=e.indent}Hp()(qp,zp),qp.prototype.compile=function(e){return this.stylesheet(e)},qp.prototype.stylesheet=function(e){return this.mapVisit(e.stylesheet.rules,"\n\n")},qp.prototype.comment=function(e){return this.emit(this.indent()+"/*"+e.comment+"*/",e.position)},qp.prototype.import=function(e){return this.emit("@import "+e.import+";",e.position)},qp.prototype.media=function(e){return this.emit("@media "+e.media,e.position)+this.emit(" {\n"+this.indent(1))+this.mapVisit(e.rules,"\n\n")+this.emit(this.indent(-1)+"\n}")},qp.prototype.document=function(e){var t="@"+(e.vendor||"")+"document "+e.document;return this.emit(t,e.position)+this.emit(" {\n"+this.indent(1))+this.mapVisit(e.rules,"\n\n")+this.emit(this.indent(-1)+"\n}")},qp.prototype.charset=function(e){return this.emit("@charset "+e.charset+";",e.position)},qp.prototype.namespace=function(e){return this.emit("@namespace "+e.namespace+";",e.position)},qp.prototype.supports=function(e){return this.emit("@supports "+e.supports,e.position)+this.emit(" {\n"+this.indent(1))+this.mapVisit(e.rules,"\n\n")+this.emit(this.indent(-1)+"\n}")},qp.prototype.keyframes=function(e){return this.emit("@"+(e.vendor||"")+"keyframes "+e.name,e.position)+this.emit(" {\n"+this.indent(1))+this.mapVisit(e.keyframes,"\n")+this.emit(this.indent(-1)+"}")},qp.prototype.keyframe=function(e){var t=e.declarations;return this.emit(this.indent())+this.emit(e.values.join(", "),e.position)+this.emit(" {\n"+this.indent(1))+this.mapVisit(t,"\n")+this.emit(this.indent(-1)+"\n"+this.indent()+"}\n")},qp.prototype.page=function(e){var t=e.selectors.length?e.selectors.join(", ")+" ":"";return this.emit("@page "+t,e.position)+this.emit("{\n")+this.emit(this.indent(1))+this.mapVisit(e.declarations,"\n")+this.emit(this.indent(-1))+this.emit("\n}")},qp.prototype["font-face"]=function(e){return this.emit("@font-face ",e.position)+this.emit("{\n")+this.emit(this.indent(1))+this.mapVisit(e.declarations,"\n")+this.emit(this.indent(-1))+this.emit("\n}")},qp.prototype.host=function(e){return this.emit("@host",e.position)+this.emit(" {\n"+this.indent(1))+this.mapVisit(e.rules,"\n\n")+this.emit(this.indent(-1)+"\n}")},qp.prototype["custom-media"]=function(e){return this.emit("@custom-media "+e.name+" "+e.media+";",e.position)},qp.prototype.rule=function(e){var t=this.indent(),n=e.declarations;return n.length?this.emit(e.selectors.map((function(e){return t+e})).join(",\n"),e.position)+this.emit(" {\n")+this.emit(this.indent(1))+this.mapVisit(n,"\n")+this.emit(this.indent(-1))+this.emit("\n"+this.indent()+"}"):""},qp.prototype.declaration=function(e){return this.emit(this.indent())+this.emit(e.property+": "+e.value,e.position)+this.emit(";")},qp.prototype.indent=function(e){return this.level=this.level||1,null!==e?(this.level+=e,""):Array(this.level).join(this.indentation||" ")};var $p=function(e,t){try{var n=function(e,t){t=t||{};var n=1,r=1;function o(e){var t=e.match(/\n/g);t&&(n+=t.length);var o=e.lastIndexOf("\n");r=~o?e.length-o:r+e.length}function c(){var e={line:n,column:r};return function(t){return t.position=new i(e),f(),t}}function i(e){this.start=e,this.end={line:n,column:r},this.source=t.source}i.prototype.content=e;var a=[];function l(o){var c=new Error(t.source+":"+n+":"+r+": "+o);if(c.reason=o,c.filename=t.source,c.line=n,c.column=r,c.source=e,!t.silent)throw c;a.push(c)}function s(){return b(/^{\s*/)}function u(){return b(/^}/)}function d(){var t,n,r,o=[];for(f(),p(o);e.length&&"}"!==e.charAt(0)&&(t=w()||(n=void 0,r=void 0,n=c(),(r=v())?(p(),n({type:"rule",selectors:r,declarations:O()})):l("selector missing")));)!1!==t&&(o.push(t),p(o));return o}function b(t){var n=t.exec(e);if(n){var r=n[0];return o(r),e=e.slice(r.length),n}}function f(){b(/^\s*/)}function p(e){var t;for(e=e||[];t=m();)!1!==t&&e.push(t);return e}function m(){var t=c();if("/"===e.charAt(0)&&"*"===e.charAt(1)){for(var n=2;""!==e.charAt(n)&&("*"!==e.charAt(n)||"/"!==e.charAt(n+1));)++n;if(n+=2,""===e.charAt(n-1))return l("End of comment missing");var i=e.slice(2,n-2);return r+=2,o(i),e=e.slice(n),r+=2,t({type:"comment",comment:i})}}function v(){var e=b(/^([^{]+)/);if(e)return Fp(e[0]).replace(/\/\*([^*]|[\r\n]|(\*+([^*/]|[\r\n])))*\*\/+/g,"").replace(/"(?:\\"|[^"])*"|'(?:\\'|[^'])*'/g,(function(e){return e.replace(/,/g,"‌")})).split(/\s*(?![^(]*\)),\s*/).map((function(e){return e.replace(/\u200C/g,",")}))}function g(){var e=c(),t=b(/^(\*?[-#\/\*\\\w]+(\[[0-9a-z_-]+\])?)\s*/);if(t){if(t=Fp(t[0]),!b(/^:\s*/))return l("property missing ':'");var n=b(/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^\)]*?\)|[^};])+)/),r=e({type:"declaration",property:t.replace(Mp,""),value:n?Fp(n[0]).replace(Mp,""):""});return b(/^[;\s]*/),r}}function O(){var e,t=[];if(!s())return l("missing '{'");for(p(t);e=g();)!1!==e&&(t.push(e),p(t));return u()?t:l("missing '}'")}function h(){for(var e,t=[],n=c();e=b(/^((\d+\.\d+|\.\d+|\d+)%?|[a-z]+)\s*/);)t.push(e[1]),b(/^,\s*/);if(t.length)return n({type:"keyframe",values:t,declarations:O()})}var j,k=E("import"),y=E("charset"),_=E("namespace");function E(e){var t=new RegExp("^@"+e+"\\s*([^;]+);");return function(){var n=c(),r=b(t);if(r){var o={type:e};return o[e]=r[1].trim(),n(o)}}}function w(){if("@"===e[0])return function(){var e=c(),t=b(/^@([-\w]+)?keyframes\s*/);if(t){var n=t[1];if(!(t=b(/^([-\w]+)\s*/)))return l("@keyframes missing name");var r,o=t[1];if(!s())return l("@keyframes missing '{'");for(var i=p();r=h();)i.push(r),i=i.concat(p());return u()?e({type:"keyframes",name:o,vendor:n,keyframes:i}):l("@keyframes missing '}'")}}()||function(){var e=c(),t=b(/^@media *([^{]+)/);if(t){var n=Fp(t[1]);if(!s())return l("@media missing '{'");var r=p().concat(d());return u()?e({type:"media",media:n,rules:r}):l("@media missing '}'")}}()||function(){var e=c(),t=b(/^@custom-media\s+(--[^\s]+)\s*([^{;]+);/);if(t)return e({type:"custom-media",name:Fp(t[1]),media:Fp(t[2])})}()||function(){var e=c(),t=b(/^@supports *([^{]+)/);if(t){var n=Fp(t[1]);if(!s())return l("@supports missing '{'");var r=p().concat(d());return u()?e({type:"supports",supports:n,rules:r}):l("@supports missing '}'")}}()||k()||y()||_()||function(){var e=c(),t=b(/^@([-\w]+)?document *([^{]+)/);if(t){var n=Fp(t[1]),r=Fp(t[2]);if(!s())return l("@document missing '{'");var o=p().concat(d());return u()?e({type:"document",document:r,vendor:n,rules:o}):l("@document missing '}'")}}()||function(){var e=c();if(b(/^@page */)){var t=v()||[];if(!s())return l("@page missing '{'");for(var n,r=p();n=g();)r.push(n),r=r.concat(p());return u()?e({type:"page",selectors:t,declarations:r}):l("@page missing '}'")}}()||function(){var e=c();if(b(/^@host\s*/)){if(!s())return l("@host missing '{'");var t=p().concat(d());return u()?e({type:"host",rules:t}):l("@host missing '}'")}}()||function(){var e=c();if(b(/^@font-face\s*/)){if(!s())return l("@font-face missing '{'");for(var t,n=p();t=g();)n.push(t),n=n.concat(p());return u()?e({type:"font-face",declarations:n}):l("@font-face missing '}'")}}()}return function e(t,n){var r=t&&"string"==typeof t.type,o=r?t:n;for(var c in t){var i=t[c];Array.isArray(i)?i.forEach((function(t){e(t,o)})):i&&"object"===Object(H.a)(i)&&e(i,o)}return r&&Object.defineProperty(t,"parent",{configurable:!0,writable:!0,enumerable:!1,value:n||null}),t}((j=d(),{type:"stylesheet",stylesheet:{source:t.source,rules:j,parsingErrors:a}}))}(e);return r=Lp.a.map(n,(function(e){if(!e)return e;var n=t(e);return this.update(n)})),((o=o||{}).compress?new Up(o):new Kp(o)).compile(r)}catch(e){return console.warn("Error while traversing the CSS: "+e),null}var r,o};function Yp(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Xp(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Yp(Object(n),!0).forEach((function(t){Object(a.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Yp(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Qp(e){return 0!==e.value.indexOf("data:")&&0!==e.value.indexOf("#")&&(t=e.value,!/^\/(?!\/)/.test(t)&&!function(e){return/^(?:https?:)?\/\//.test(e)}(e.value));var t}function Zp(e,t){return new URL(e,t).toString()}var Jp=function(e){return function(t){if("declaration"===t.type){var n=function(e){for(var t,n=/url\((\s*)(['"]?)(.+?)\2(\s*)\)/g,r=[];null!==(t=n.exec(e));){var o={source:t[0],before:t[1],quote:t[2],value:t[3],after:t[4]};Qp(o)&&r.push(o)}return r}(t.value).map((c=e,function(e){return Xp(Xp({},e),{},{newUrl:"url("+e.before+e.quote+Zp(e.value,c)+e.quote+e.after+")"})}));return Xp(Xp({},t),{},{value:(r=t.value,o=n,o.forEach((function(e){r=r.replace(e.source,e.newUrl)})),r)})}var r,o,c;return t}};function em(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function tm(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?em(Object(n),!0).forEach((function(t){Object(a.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):em(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var nm=/^(body|html|:root).*$/,rm=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return function(n){return"rule"===n.type?tm(tm({},n),{},{selectors:n.selectors.map((function(n){return t.includes(n.trim())?n:n.match(nm)?n.replace(/^(body|html|:root)/,e):e+" "+n}))}):n}},om=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return Object(d.map)(e,(function(e){var n=e.css,r=e.baseURL,o=e.__experimentalNoWrapper,c=[];return t&&!(void 0!==o&&o)&&c.push(rm(t)),r&&c.push(Jp(r)),c.length?$p(n,Object(b.compose)(c)):n}))};function cm(e){return Object(l.useCallback)((function(e){if(e){var t=e.ownerDocument,n=t.defaultView,r=t.body,o=t.querySelector(".editor-styles-wrapper"),c=n.getComputedStyle(o,null).getPropertyValue("background-color");Co()(c).getLuminance()>.5?r.classList.remove("is-dark-theme"):r.classList.add("is-dark-theme")}}),[e])}function im(e){var t=e.styles;return Object(l.createElement)(l.Fragment,null,Object(l.createElement)("style",{ref:cm(t)}),om(t,".editor-styles-wrapper").map((function(e,t){return Object(l.createElement)("style",{key:t},e)})))}var am=function(e){var t=e.rootClientId,n=e.clientId,r=e.isAppender,o=e.showInserterHelpPanel,c=e.showMostUsedBlocks,i=void 0!==c&&c,a=e.__experimentalInsertionIndex,s=e.onSelect,u=void 0===s?d.noop:s,b=e.shouldFocusBlock,f=void 0!==b&&b,p=Object(m.useSelect)((function(e){var r=e(vr).getBlockRootClientId;return t||r(n)||void 0}),[n,t]);return Object(l.createElement)(Ys,{onSelect:u,rootClientId:p,clientId:n,isAppender:r,showInserterHelpPanel:o,showMostUsedBlocks:i,__experimentalInsertionIndex:a,shouldFocusBlock:f})};function lm(){var e=Object(m.useSelect)((function(e){var t=e(vr),n=t.getSelectedBlockClientIds,r=t.getBlockOrder,o=t.getBlockRootClientId,c=n(),i=Object(Ro.a)(c,1)[0];return{clientIds:c,rootBlocksClientIds:r(),rootClientId:o(i)}}),[]),t=e.clientIds,n=e.rootBlocksClientIds,r=e.rootClientId,o=Object(m.useDispatch)(vr),c=o.duplicateBlocks,i=o.removeBlocks,a=o.insertAfterBlock,s=o.insertBeforeBlock,u=o.multiSelect,b=o.clearSelectedBlock,f=o.moveBlocksUp,p=o.moveBlocksDown;return Object(al.useShortcut)("core/block-editor/move-up",Object(l.useCallback)((function(e){e.preventDefault(),f(t,r)}),[t,f]),{bindGlobal:!0,isDisabled:0===t.length}),Object(al.useShortcut)("core/block-editor/move-down",Object(l.useCallback)((function(e){e.preventDefault(),p(t,r)}),[t,p]),{bindGlobal:!0,isDisabled:0===t.length}),Object(al.useShortcut)("core/block-editor/duplicate",Object(l.useCallback)((function(e){e.preventDefault(),c(t)}),[t,c]),{bindGlobal:!0,isDisabled:0===t.length}),Object(al.useShortcut)("core/block-editor/remove",Object(l.useCallback)((function(e){e.preventDefault(),i(t)}),[t,i]),{bindGlobal:!0,isDisabled:0===t.length}),Object(al.useShortcut)("core/block-editor/insert-after",Object(l.useCallback)((function(e){e.preventDefault(),a(Object(d.last)(t))}),[t,a]),{bindGlobal:!0,isDisabled:0===t.length}),Object(al.useShortcut)("core/block-editor/insert-before",Object(l.useCallback)((function(e){e.preventDefault(),s(Object(d.first)(t))}),[t,s]),{bindGlobal:!0,isDisabled:0===t.length}),Object(al.useShortcut)("core/block-editor/delete-multi-selection",Object(l.useCallback)((function(e){e.preventDefault(),i(t)}),[t,i]),{isDisabled:t.length<2}),Object(al.useShortcut)("core/block-editor/select-all",Object(l.useCallback)((function(e){e.preventDefault(),u(Object(d.first)(n),Object(d.last)(n))}),[n,u])),Object(al.useShortcut)("core/block-editor/unselect",Object(l.useCallback)((function(e){e.preventDefault(),b(),e.target.ownerDocument.defaultView.getSelection().removeAllRanges()}),[t,b]),{isDisabled:t.length<2}),null}lm.Register=function(){var e=Object(m.useDispatch)(al.store).registerShortcut;return Object(l.useEffect)((function(){e({name:"core/block-editor/duplicate",category:"block",description:Object(y.__)("Duplicate the selected block(s)."),keyCombination:{modifier:"primaryShift",character:"d"}}),e({name:"core/block-editor/remove",category:"block",description:Object(y.__)("Remove the selected block(s)."),keyCombination:{modifier:"access",character:"z"}}),e({name:"core/block-editor/insert-before",category:"block",description:Object(y.__)("Insert a new block before the selected block(s)."),keyCombination:{modifier:"primaryAlt",character:"t"}}),e({name:"core/block-editor/insert-after",category:"block",description:Object(y.__)("Insert a new block after the selected block(s)."),keyCombination:{modifier:"primaryAlt",character:"y"}}),e({name:"core/block-editor/delete-multi-selection",category:"block",description:Object(y.__)("Remove multiple selected blocks."),keyCombination:{character:"del"},aliases:[{character:"backspace"}]}),e({name:"core/block-editor/select-all",category:"selection",description:Object(y.__)("Select all text when typing. Press again to select all blocks."),keyCombination:{modifier:"primary",character:"a"}}),e({name:"core/block-editor/unselect",category:"selection",description:Object(y.__)("Clear selection."),keyCombination:{character:"escape"}}),e({name:"core/block-editor/focus-toolbar",category:"global",description:Object(y.__)("Navigate to the nearest toolbar."),keyCombination:{modifier:"alt",character:"F10"}}),e({name:"core/block-editor/move-up",category:"block",description:Object(y.__)("Move the selected block(s) up."),keyCombination:{modifier:"secondary",character:"t"}}),e({name:"core/block-editor/move-down",category:"block",description:Object(y.__)("Move the selected block(s) down."),keyCombination:{modifier:"secondary",character:"y"}})}),[e]),null};var sm=lm,um=new Set([Mc.UP,Mc.RIGHT,Mc.DOWN,Mc.LEFT,Mc.ENTER,Mc.BACKSPACE]);function dm(){var e=Object(m.useSelect)((function(e){return e(vr).isTyping()})),t=Object(m.useDispatch)(vr).stopTyping;return Object(b.useRefEffect)((function(n){if(e){var r,o,c=n.ownerDocument;return c.addEventListener("mousemove",i),function(){c.removeEventListener("mousemove",i)}}function i(e){var n=e.clientX,c=e.clientY;r&&o&&(r!==n||o!==c)&&t(),r=n,o=c}}),[e,t])}function bm(){var e=Object(m.useSelect)((function(e){return e(vr).isTyping()})),t=Object(m.useDispatch)(vr),n=t.startTyping,r=t.stopTyping,o=dm(),c=Object(b.useRefEffect)((function(t){var o=t.ownerDocument,c=o.defaultView;if(e){var i;function a(e){var t=e.target;i=c.setTimeout((function(){Object(dl.isTextField)(t)||r()}))}function l(e){var t=e.keyCode;t!==Mc.ESCAPE&&t!==Mc.TAB||r()}function s(){var e=c.getSelection();e.rangeCount>0&&e.getRangeAt(0).collapsed||r()}return t.addEventListener("focus",a),t.addEventListener("keydown",l),o.addEventListener("selectionchange",s),function(){c.clearTimeout(i),t.removeEventListener("focus",a),t.removeEventListener("keydown",l),o.removeEventListener("selectionchange",s)}}function u(e){var r=e.type,o=e.target;Object(dl.isTextField)(o)&&t.contains(o)&&("keydown"!==r||function(e){var t=e.keyCode;return!e.shiftKey&&um.has(t)}(e))&&n()}return t.addEventListener("keypress",u),t.addEventListener("keydown",u),function(){t.removeEventListener("keypress",u),t.removeEventListener("keydown",u)}}),[e,n,r]);return Object(b.useMergeRefs)([o,c])}var fm=function(e){var t=e.children;return Object(l.createElement)("div",{ref:bm()},t)};function pm(){return Dt()("PreserveScrollInReorder component",{hint:"This behavior is now built-in the block list"}),null}var mm=-1!==window.navigator.userAgent.indexOf("Trident"),vm=new Set([Mc.UP,Mc.DOWN,Mc.LEFT,Mc.RIGHT]);function gm(){var e=Object(m.useSelect)((function(e){return e(vr).hasSelectedBlock()}));return Object(b.useRefEffect)((function(t){if(e){var n,r,o,c=t.ownerDocument,i=c.defaultView;return i.addEventListener("scroll",a,!0),i.addEventListener("resize",a,!0),t.addEventListener("keydown",l),t.addEventListener("keyup",s),t.addEventListener("mousedown",u),t.addEventListener("touchstart",u),function(){i.removeEventListener("scroll",a,!0),i.removeEventListener("resize",a,!0),t.removeEventListener("keydown",l),t.removeEventListener("keyup",s),t.removeEventListener("mousedown",u),t.removeEventListener("touchstart",u),c.removeEventListener("selectionchange",d),i.cancelAnimationFrame(n),i.cancelAnimationFrame(r)}}function a(){n||(n=i.requestAnimationFrame((function(){b(),n=null})))}function l(e){r&&i.cancelAnimationFrame(r),r=i.requestAnimationFrame((function(){s(e),r=null}))}function s(e){var n=e.keyCode;if(f()){var r=Object(dl.computeCaretRect)(i);if(r)if(o)if(vm.has(n))o=r;else{var a=r.top-o.top;if(0!==a){var l=Object(dl.getScrollContainer)(t);if(l){var s=l===c.body,u=s?i.scrollY:l.scrollTop,d=s?0:l.getBoundingClientRect().top,b=s?o.top/i.innerHeight:(o.top-d)/(i.innerHeight-d);if(0===u&&b<.75&&(p=t.querySelectorAll('[contenteditable="true"]'))[p.length-1]===c.activeElement)o=r;else{var p,m=s?i.innerHeight:l.clientHeight;o.top+o.height>d+m||o.top<d?o=r:s?i.scrollBy(0,a):l.scrollTop+=a}}}}else o=r}}function u(){c.addEventListener("selectionchange",d)}function d(){c.removeEventListener("selectionchange",d),b()}function b(){f()&&(o=Object(dl.computeCaretRect)(i))}function f(){return t.contains(c.activeElement)&&c.activeElement.isContentEditable}}),[e])}var Om=mm?function(e){return e.children}:function(e){var t=e.children;return Object(l.createElement)("div",{ref:gm(),className:"block-editor__typewriter"},t)},hm=Object(d.overEvery)([dl.isTextField,dl.focus.tabbable.isTabbableIndex]);function jm(){return Object(b.useRefEffect)((function(e){function t(t){if(t.target===e){var n=dl.focus.focusable.find(e),r=Object(d.findLast)(n,hm);r&&(Object(dl.placeCaretAtHorizontalEdge)(r,!0),t.preventDefault())}}return e.addEventListener("mousedown",t),function(){e.addEventListener("mousedown",t)}}),[])}function km(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function ym(e){e.dir=document.dir,e.body.className="editor-styles-wrapper";var t,n=function(e,t){var n;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return km(e,void 0);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?km(e,void 0):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var c,i=!0,a=!1;return{s:function(){n=e[Symbol.iterator]()},n:function(){var e=n.next();return i=e.done,e},e:function(e){a=!0,c=e},f:function(){try{i||null==n.return||n.return()}finally{if(a)throw c}}}}(document.body.classList);try{for(n.s();!(t=n.n()).done;){var r=t.value;r.startsWith("admin-color-")&&e.body.classList.add(r)}}catch(e){n.e(e)}finally{n.f()}}var _m=Object(l.forwardRef)((function(e,t){var n=e.contentRef,r=e.children,o=e.head,c=e.headHTML,a=Object(j.a)(e,["contentRef","children","head","headHTML"]),s=Object(l.useState)(),u=Object(Ro.a)(s,2),d=u[0],f=u[1],p=Object(l.useCallback)((function(e){function t(){var t,r=e.contentDocument,o=r.readyState,i=r.body;return("interactive"===o||"complete"===o)&&("function"==typeof n?n(i):n&&(n.current=i),function(e,t){e.head.innerHTML="<style>body{margin:0}</style>"+t}(r,c),ym(r),t=r,Array.from(document.styleSheets).forEach((function(e){try{e.cssRules}catch(e){return}var n=e.ownerNode,r=e.cssRules;r&&Array.from(r).find((function(e){var t=e.selectorText;return t&&(t.includes(".".concat("editor-styles-wrapper"))||t.includes(".".concat("wp-block")))}))&&!t.getElementById(n.id)&&t.head.appendChild(n.cloneNode(!0))})),function(e){var t=e.defaultView,n=t.frameElement;function r(e){var r=Object.getPrototypeOf(e).constructor.name,o=window[r],c={};for(var i in e)c[i]=e[i];if(e instanceof t.MouseEvent){var a=n.getBoundingClientRect();c.clientX+=a.left,c.clientY+=a.top}var l=new o(e.type,c);!n.dispatchEvent(l)&&e.preventDefault()}for(var o=0,c=["keydown","keypress","dragover"];o<c.length;o++){var i=c[o];e.addEventListener(i,r)}}(r),ym(r),f(r),!0)}e&&(t()||e.addEventListener("load",(function(){t()})))}),[]);return Object(l.createElement)("iframe",Object(i.a)({},a,{ref:Object(b.useMergeRefs)([t,p]),tabIndex:"0",title:Object(y.__)("Editor canvas"),name:"editor-canvas"}),d&&Object(l.createPortal)(r,d.body),d&&Object(l.createPortal)(o,d.head))})),Em=Object(l.createContext)(new Set);function wm(e){var t=Object(l.useContext)(Em),n=t.has(e),r=Object(l.useMemo)((function(){return n=e,(r=new Set(t)).add(n),r;var n,r}),[e,t]);return[n,Object(l.useCallback)((function(e){var t=e.children;return Object(l.createElement)(Em.Provider,{value:r},t)}),[r])]}function Cm(e){if(void 0===e)e=E.colors;else{var t=e.filter((function(e){return e.color}));0===t.length?e=E.colors:t.length<e.length&&(e=t)}return e}function Sm(e){if(void 0===e)e=E.gradients;else{var t=e.filter((function(e){return e.gradient}));0===t.length?e=E.gradients:t.length<e.length&&(e=t)}return e}},52:function(e,t){e.exports=window.wp.blob},54:function(e,t){e.exports=window.wp.a11y},58:function(e,t,n){"use strict";function r(e,t){return(r=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}n.d(t,"a",(function(){return r}))},62:function(e,t,n){var r;!function(o){var c=/^\s+/,i=/\s+$/,a=0,l=o.round,s=o.min,u=o.max,d=o.random;function b(e,t){if(t=t||{},(e=e||"")instanceof b)return e;if(!(this instanceof b))return new b(e,t);var n=function(e){var t,n,r,a={r:0,g:0,b:0},l=1,d=null,b=null,f=null,p=!1,m=!1;return"string"==typeof e&&(e=function(e){e=e.replace(c,"").replace(i,"").toLowerCase();var t,n=!1;if(x[e])e=x[e],n=!0;else if("transparent"==e)return{r:0,g:0,b:0,a:0,format:"name"};return(t=G.rgb.exec(e))?{r:t[1],g:t[2],b:t[3]}:(t=G.rgba.exec(e))?{r:t[1],g:t[2],b:t[3],a:t[4]}:(t=G.hsl.exec(e))?{h:t[1],s:t[2],l:t[3]}:(t=G.hsla.exec(e))?{h:t[1],s:t[2],l:t[3],a:t[4]}:(t=G.hsv.exec(e))?{h:t[1],s:t[2],v:t[3]}:(t=G.hsva.exec(e))?{h:t[1],s:t[2],v:t[3],a:t[4]}:(t=G.hex8.exec(e))?{r:A(t[1]),g:A(t[2]),b:A(t[3]),a:F(t[4]),format:n?"name":"hex8"}:(t=G.hex6.exec(e))?{r:A(t[1]),g:A(t[2]),b:A(t[3]),format:n?"name":"hex"}:(t=G.hex4.exec(e))?{r:A(t[1]+""+t[1]),g:A(t[2]+""+t[2]),b:A(t[3]+""+t[3]),a:F(t[4]+""+t[4]),format:n?"name":"hex8"}:!!(t=G.hex3.exec(e))&&{r:A(t[1]+""+t[1]),g:A(t[2]+""+t[2]),b:A(t[3]+""+t[3]),format:n?"name":"hex"}}(e)),"object"==typeof e&&(U(e.r)&&U(e.g)&&U(e.b)?(t=e.r,n=e.g,r=e.b,a={r:255*N(t,255),g:255*N(n,255),b:255*N(r,255)},p=!0,m="%"===String(e.r).substr(-1)?"prgb":"rgb"):U(e.h)&&U(e.s)&&U(e.v)?(d=L(e.s),b=L(e.v),a=function(e,t,n){e=6*N(e,360),t=N(t,100),n=N(n,100);var r=o.floor(e),c=e-r,i=n*(1-t),a=n*(1-c*t),l=n*(1-(1-c)*t),s=r%6;return{r:255*[n,a,i,i,l,n][s],g:255*[l,n,n,a,i,i][s],b:255*[i,i,l,n,n,a][s]}}(e.h,d,b),p=!0,m="hsv"):U(e.h)&&U(e.s)&&U(e.l)&&(d=L(e.s),f=L(e.l),a=function(e,t,n){var r,o,c;function i(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+6*(t-e)*n:n<.5?t:n<2/3?e+(t-e)*(2/3-n)*6:e}if(e=N(e,360),t=N(t,100),n=N(n,100),0===t)r=o=c=n;else{var a=n<.5?n*(1+t):n+t-n*t,l=2*n-a;r=i(l,a,e+1/3),o=i(l,a,e),c=i(l,a,e-1/3)}return{r:255*r,g:255*o,b:255*c}}(e.h,d,f),p=!0,m="hsl"),e.hasOwnProperty("a")&&(l=e.a)),l=T(l),{ok:p,format:e.format||m,r:s(255,u(a.r,0)),g:s(255,u(a.g,0)),b:s(255,u(a.b,0)),a:l}}(e);this._originalInput=e,this._r=n.r,this._g=n.g,this._b=n.b,this._a=n.a,this._roundA=l(100*this._a)/100,this._format=t.format||n.format,this._gradientType=t.gradientType,this._r<1&&(this._r=l(this._r)),this._g<1&&(this._g=l(this._g)),this._b<1&&(this._b=l(this._b)),this._ok=n.ok,this._tc_id=a++}function f(e,t,n){e=N(e,255),t=N(t,255),n=N(n,255);var r,o,c=u(e,t,n),i=s(e,t,n),a=(c+i)/2;if(c==i)r=o=0;else{var l=c-i;switch(o=a>.5?l/(2-c-i):l/(c+i),c){case e:r=(t-n)/l+(t<n?6:0);break;case t:r=(n-e)/l+2;break;case n:r=(e-t)/l+4}r/=6}return{h:r,s:o,l:a}}function p(e,t,n){e=N(e,255),t=N(t,255),n=N(n,255);var r,o,c=u(e,t,n),i=s(e,t,n),a=c,l=c-i;if(o=0===c?0:l/c,c==i)r=0;else{switch(c){case e:r=(t-n)/l+(t<n?6:0);break;case t:r=(n-e)/l+2;break;case n:r=(e-t)/l+4}r/=6}return{h:r,s:o,v:a}}function m(e,t,n,r){var o=[R(l(e).toString(16)),R(l(t).toString(16)),R(l(n).toString(16))];return r&&o[0].charAt(0)==o[0].charAt(1)&&o[1].charAt(0)==o[1].charAt(1)&&o[2].charAt(0)==o[2].charAt(1)?o[0].charAt(0)+o[1].charAt(0)+o[2].charAt(0):o.join("")}function v(e,t,n,r){return[R(M(r)),R(l(e).toString(16)),R(l(t).toString(16)),R(l(n).toString(16))].join("")}function g(e,t){t=0===t?0:t||10;var n=b(e).toHsl();return n.s-=t/100,n.s=D(n.s),b(n)}function O(e,t){t=0===t?0:t||10;var n=b(e).toHsl();return n.s+=t/100,n.s=D(n.s),b(n)}function h(e){return b(e).desaturate(100)}function j(e,t){t=0===t?0:t||10;var n=b(e).toHsl();return n.l+=t/100,n.l=D(n.l),b(n)}function k(e,t){t=0===t?0:t||10;var n=b(e).toRgb();return n.r=u(0,s(255,n.r-l(-t/100*255))),n.g=u(0,s(255,n.g-l(-t/100*255))),n.b=u(0,s(255,n.b-l(-t/100*255))),b(n)}function y(e,t){t=0===t?0:t||10;var n=b(e).toHsl();return n.l-=t/100,n.l=D(n.l),b(n)}function _(e,t){var n=b(e).toHsl(),r=(n.h+t)%360;return n.h=r<0?360+r:r,b(n)}function E(e){var t=b(e).toHsl();return t.h=(t.h+180)%360,b(t)}function w(e){var t=b(e).toHsl(),n=t.h;return[b(e),b({h:(n+120)%360,s:t.s,l:t.l}),b({h:(n+240)%360,s:t.s,l:t.l})]}function C(e){var t=b(e).toHsl(),n=t.h;return[b(e),b({h:(n+90)%360,s:t.s,l:t.l}),b({h:(n+180)%360,s:t.s,l:t.l}),b({h:(n+270)%360,s:t.s,l:t.l})]}function S(e){var t=b(e).toHsl(),n=t.h;return[b(e),b({h:(n+72)%360,s:t.s,l:t.l}),b({h:(n+216)%360,s:t.s,l:t.l})]}function B(e,t,n){t=t||6,n=n||30;var r=b(e).toHsl(),o=360/n,c=[b(e)];for(r.h=(r.h-(o*t>>1)+720)%360;--t;)r.h=(r.h+o)%360,c.push(b(r));return c}function I(e,t){t=t||6;for(var n=b(e).toHsv(),r=n.h,o=n.s,c=n.v,i=[],a=1/t;t--;)i.push(b({h:r,s:o,v:c})),c=(c+a)%1;return i}b.prototype={isDark:function(){return this.getBrightness()<128},isLight:function(){return!this.isDark()},isValid:function(){return this._ok},getOriginalInput:function(){return this._originalInput},getFormat:function(){return this._format},getAlpha:function(){return this._a},getBrightness:function(){var e=this.toRgb();return(299*e.r+587*e.g+114*e.b)/1e3},getLuminance:function(){var e,t,n,r=this.toRgb();return e=r.r/255,t=r.g/255,n=r.b/255,.2126*(e<=.03928?e/12.92:o.pow((e+.055)/1.055,2.4))+.7152*(t<=.03928?t/12.92:o.pow((t+.055)/1.055,2.4))+.0722*(n<=.03928?n/12.92:o.pow((n+.055)/1.055,2.4))},setAlpha:function(e){return this._a=T(e),this._roundA=l(100*this._a)/100,this},toHsv:function(){var e=p(this._r,this._g,this._b);return{h:360*e.h,s:e.s,v:e.v,a:this._a}},toHsvString:function(){var e=p(this._r,this._g,this._b),t=l(360*e.h),n=l(100*e.s),r=l(100*e.v);return 1==this._a?"hsv("+t+", "+n+"%, "+r+"%)":"hsva("+t+", "+n+"%, "+r+"%, "+this._roundA+")"},toHsl:function(){var e=f(this._r,this._g,this._b);return{h:360*e.h,s:e.s,l:e.l,a:this._a}},toHslString:function(){var e=f(this._r,this._g,this._b),t=l(360*e.h),n=l(100*e.s),r=l(100*e.l);return 1==this._a?"hsl("+t+", "+n+"%, "+r+"%)":"hsla("+t+", "+n+"%, "+r+"%, "+this._roundA+")"},toHex:function(e){return m(this._r,this._g,this._b,e)},toHexString:function(e){return"#"+this.toHex(e)},toHex8:function(e){return function(e,t,n,r,o){var c=[R(l(e).toString(16)),R(l(t).toString(16)),R(l(n).toString(16)),R(M(r))];return o&&c[0].charAt(0)==c[0].charAt(1)&&c[1].charAt(0)==c[1].charAt(1)&&c[2].charAt(0)==c[2].charAt(1)&&c[3].charAt(0)==c[3].charAt(1)?c[0].charAt(0)+c[1].charAt(0)+c[2].charAt(0)+c[3].charAt(0):c.join("")}(this._r,this._g,this._b,this._a,e)},toHex8String:function(e){return"#"+this.toHex8(e)},toRgb:function(){return{r:l(this._r),g:l(this._g),b:l(this._b),a:this._a}},toRgbString:function(){return 1==this._a?"rgb("+l(this._r)+", "+l(this._g)+", "+l(this._b)+")":"rgba("+l(this._r)+", "+l(this._g)+", "+l(this._b)+", "+this._roundA+")"},toPercentageRgb:function(){return{r:l(100*N(this._r,255))+"%",g:l(100*N(this._g,255))+"%",b:l(100*N(this._b,255))+"%",a:this._a}},toPercentageRgbString:function(){return 1==this._a?"rgb("+l(100*N(this._r,255))+"%, "+l(100*N(this._g,255))+"%, "+l(100*N(this._b,255))+"%)":"rgba("+l(100*N(this._r,255))+"%, "+l(100*N(this._g,255))+"%, "+l(100*N(this._b,255))+"%, "+this._roundA+")"},toName:function(){return 0===this._a?"transparent":!(this._a<1)&&(P[m(this._r,this._g,this._b,!0)]||!1)},toFilter:function(e){var t="#"+v(this._r,this._g,this._b,this._a),n=t,r=this._gradientType?"GradientType = 1, ":"";if(e){var o=b(e);n="#"+v(o._r,o._g,o._b,o._a)}return"progid:DXImageTransform.Microsoft.gradient("+r+"startColorstr="+t+",endColorstr="+n+")"},toString:function(e){var t=!!e;e=e||this._format;var n=!1,r=this._a<1&&this._a>=0;return t||!r||"hex"!==e&&"hex6"!==e&&"hex3"!==e&&"hex4"!==e&&"hex8"!==e&&"name"!==e?("rgb"===e&&(n=this.toRgbString()),"prgb"===e&&(n=this.toPercentageRgbString()),"hex"!==e&&"hex6"!==e||(n=this.toHexString()),"hex3"===e&&(n=this.toHexString(!0)),"hex4"===e&&(n=this.toHex8String(!0)),"hex8"===e&&(n=this.toHex8String()),"name"===e&&(n=this.toName()),"hsl"===e&&(n=this.toHslString()),"hsv"===e&&(n=this.toHsvString()),n||this.toHexString()):"name"===e&&0===this._a?this.toName():this.toRgbString()},clone:function(){return b(this.toString())},_applyModification:function(e,t){var n=e.apply(null,[this].concat([].slice.call(t)));return this._r=n._r,this._g=n._g,this._b=n._b,this.setAlpha(n._a),this},lighten:function(){return this._applyModification(j,arguments)},brighten:function(){return this._applyModification(k,arguments)},darken:function(){return this._applyModification(y,arguments)},desaturate:function(){return this._applyModification(g,arguments)},saturate:function(){return this._applyModification(O,arguments)},greyscale:function(){return this._applyModification(h,arguments)},spin:function(){return this._applyModification(_,arguments)},_applyCombination:function(e,t){return e.apply(null,[this].concat([].slice.call(t)))},analogous:function(){return this._applyCombination(B,arguments)},complement:function(){return this._applyCombination(E,arguments)},monochromatic:function(){return this._applyCombination(I,arguments)},splitcomplement:function(){return this._applyCombination(S,arguments)},triad:function(){return this._applyCombination(w,arguments)},tetrad:function(){return this._applyCombination(C,arguments)}},b.fromRatio=function(e,t){if("object"==typeof e){var n={};for(var r in e)e.hasOwnProperty(r)&&(n[r]="a"===r?e[r]:L(e[r]));e=n}return b(e,t)},b.equals=function(e,t){return!(!e||!t)&&b(e).toRgbString()==b(t).toRgbString()},b.random=function(){return b.fromRatio({r:d(),g:d(),b:d()})},b.mix=function(e,t,n){n=0===n?0:n||50;var r=b(e).toRgb(),o=b(t).toRgb(),c=n/100;return b({r:(o.r-r.r)*c+r.r,g:(o.g-r.g)*c+r.g,b:(o.b-r.b)*c+r.b,a:(o.a-r.a)*c+r.a})},b.readability=function(e,t){var n=b(e),r=b(t);return(o.max(n.getLuminance(),r.getLuminance())+.05)/(o.min(n.getLuminance(),r.getLuminance())+.05)},b.isReadable=function(e,t,n){var r,o,c,i,a,l=b.readability(e,t);switch(o=!1,(c=n,"AA"!==(i=((c=c||{level:"AA",size:"small"}).level||"AA").toUpperCase())&&"AAA"!==i&&(i="AA"),"small"!==(a=(c.size||"small").toLowerCase())&&"large"!==a&&(a="small"),r={level:i,size:a}).level+r.size){case"AAsmall":case"AAAlarge":o=l>=4.5;break;case"AAlarge":o=l>=3;break;case"AAAsmall":o=l>=7}return o},b.mostReadable=function(e,t,n){var r,o,c,i,a=null,l=0;o=(n=n||{}).includeFallbackColors,c=n.level,i=n.size;for(var s=0;s<t.length;s++)(r=b.readability(e,t[s]))>l&&(l=r,a=b(t[s]));return b.isReadable(e,a,{level:c,size:i})||!o?a:(n.includeFallbackColors=!1,b.mostReadable(e,["#fff","#000"],n))};var x=b.names={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"0ff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5