Gutenberg - Version 9.3.0

Version Description

Download this release

Release Info

Developer youknowriad
Plugin Icon 128x128 Gutenberg
Version 9.3.0
Comparing to
See all releases

Code changes from version 9.2.2 to 9.3.0

README.md CHANGED
@@ -39,7 +39,7 @@ Review the [Create a Block tutorial](/docs/designers-developers/developers/tutor
39
 
40
  ### Contribute to Gutenberg
41
 
42
- Gutenberg is an open-source project and welcomes all contributors from code to design, from documentation to triage. The project is built by many [contributors and volunteers](https://github.com/WordPress/gutenberg/blob/master/CONTRIBUTORS.md) and we'd love your help building it.
43
 
44
  See the [Contributors Handbook](https://developer.wordpress.org/block-editor/contributors/) for all the details on how you can contribute. See [CONTRIBUTING.md](https://github.com/WordPress/gutenberg/blob/master/CONTRIBUTING.md) for the contributing guidelines.
45
 
39
 
40
  ### Contribute to Gutenberg
41
 
42
+ Gutenberg is an open-source project and welcomes all contributors from code to design, from documentation to triage. The project is built by many contributors and volunteers and we'd love your help building it.
43
 
44
  See the [Contributors Handbook](https://developer.wordpress.org/block-editor/contributors/) for all the details on how you can contribute. See [CONTRIBUTING.md](https://github.com/WordPress/gutenberg/blob/master/CONTRIBUTING.md) for the contributing guidelines.
45
 
build/a11y/index.asset.php CHANGED
@@ -1 +1 @@
1
- <?php return array('dependencies' => array('wp-dom-ready', 'wp-i18n', 'wp-polyfill'), 'version' => '4d631dce09452d420a3b5a28c9e0b67c');
1
+ <?php return array('dependencies' => array('wp-dom-ready', 'wp-i18n', 'wp-polyfill'), 'version' => '1e17ce8ce757a742f21a015019ed4b2e');
build/a11y/index.js CHANGED
@@ -1 +1 @@
1
- this.wp=this.wp||{},this.wp.a11y=function(t){var e={};function n(r){if(e[r])return e[r].exports;var i=e[r]={i:r,l:!1,exports:{}};return t[r].call(i.exports,i,i.exports,n),i.l=!0,i.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 i in t)n.d(r,i,function(e){return t[e]}.bind(null,i));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=436)}({1:function(t,e){!function(){t.exports=this.wp.i18n}()},261:function(t,e){!function(){t.exports=this.wp.domReady}()},436:function(t,e,n){"use strict";n.r(e),n.d(e,"setup",(function(){return p})),n.d(e,"speak",(function(){return d}));var r=n(261),i=n.n(r),o=n(1);function a(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"polite",e=document.createElement("div");e.id="a11y-speak-".concat(t),e.className="a11y-speak-region",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("aria-live",t),e.setAttribute("aria-relevant","additions text"),e.setAttribute("aria-atomic","true");var n=document,r=n.body;return r&&r.appendChild(e),e}var u="";function p(){var t=document.getElementById("a11y-speak-intro-text"),e=document.getElementById("a11y-speak-assertive"),n=document.getElementById("a11y-speak-polite");null===t&&function(){var t=document.createElement("p");t.id="a11y-speak-intro-text",t.className="a11y-speak-intro-text",t.textContent=Object(o.__)("Notifications"),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("hidden","hidden");var e=document.body;e&&e.appendChild(t)}(),null===e&&a("assertive"),null===n&&a("polite")}function d(t,e){!function(){for(var t=document.getElementsByClassName("a11y-speak-region"),e=document.getElementById("a11y-speak-intro-text"),n=0;n<t.length;n++)t[n].textContent="";e&&e.setAttribute("hidden","hidden")}(),t=function(t){return t=t.replace(/<[^<>]+>/g," "),u===t&&(t+=" "),u=t,t}(t);var n=document.getElementById("a11y-speak-intro-text"),r=document.getElementById("a11y-speak-assertive"),i=document.getElementById("a11y-speak-polite");r&&"assertive"===e?r.textContent=t:i&&(i.textContent=t),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=429)}({1:function(e,t){e.exports=window.wp.i18n},260:function(e,t){e.exports=window.wp.domReady},429: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(260),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' => 'a50235e75ea2355afb2c0a099e2b5caa');
1
+ <?php return array('dependencies' => array('lodash', 'wp-data', 'wp-hooks', 'wp-i18n', 'wp-polyfill', 'wp-rich-text'), 'version' => '21375877449aa990b056f6d05665b2d8');
build/annotations/index.js CHANGED
@@ -1 +1 @@
1
- this.wp=this.wp||{},this.wp.annotations=function(t){var n={};function e(r){if(n[r])return n[r].exports;var o=n[r]={i:r,l:!1,exports:{}};return t[r].call(o.exports,o,o.exports,e),o.l=!0,o.exports}return e.m=t,e.c=n,e.d=function(t,n,r){e.o(t,n)||Object.defineProperty(t,n,{enumerable:!0,get:r})},e.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},e.t=function(t,n){if(1&n&&(t=e(t)),8&n)return t;if(4&n&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(e.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&n&&"string"!=typeof t)for(var o in t)e.d(r,o,function(n){return t[n]}.bind(null,o));return r},e.n=function(t){var n=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(n,"a",n),n},e.o=function(t,n){return Object.prototype.hasOwnProperty.call(t,n)},e.p="",e(e.s=418)}({1:function(t,n){!function(){t.exports=this.wp.i18n}()},17:function(t,n){!function(){t.exports=this.wp.richText}()},199:function(t,n,e){"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=[],u=0;u<256;++u)i[u]=(u+256).toString(16).substr(1);var c=function(t,n){var e=n||0,r=i;return[r[t[e++]],r[t[e++]],r[t[e++]],r[t[e++]],"-",r[t[e++]],r[t[e++]],"-",r[t[e++]],r[t[e++]],"-",r[t[e++]],r[t[e++]],"-",r[t[e++]],r[t[e++]],r[t[e++]],r[t[e++]],r[t[e++]],r[t[e++]]].join("")};n.a=function(t,n,e){var r=n&&e||0;"string"==typeof t&&(n="binary"===t?new Array(16):null,t=null);var o=(t=t||{}).random||(t.rng||a)();if(o[6]=15&o[6]|64,o[8]=63&o[8]|128,n)for(var i=0;i<16;++i)n[r+i]=o[i];return n||c(o)}},2:function(t,n){!function(){t.exports=this.lodash}()},26:function(t,n){!function(){t.exports=this.wp.hooks}()},4:function(t,n){!function(){t.exports=this.wp.data}()},418:function(t,n,e){"use strict";e.r(n);var r={};e.r(r),e.d(r,"__experimentalGetAnnotationsForBlock",(function(){return h})),e.d(r,"__experimentalGetAllAnnotationsForBlock",(function(){return j})),e.d(r,"__experimentalGetAnnotationsForRichText",(function(){return A})),e.d(r,"__experimentalGetAnnotations",(function(){return x}));var o={};e.r(o),e.d(o,"__experimentalAddAnnotation",(function(){return w})),e.d(o,"__experimentalRemoveAnnotation",(function(){return N})),e.d(o,"__experimentalUpdateAnnotationRange",(function(){return T})),e.d(o,"__experimentalRemoveAnnotationsBySource",(function(){return P}));var a=e(4);function i(t,n){(null==n||n>t.length)&&(n=t.length);for(var e=0,r=new Array(n);e<n;e++)r[e]=t[e];return r}function u(t){return function(t){if(Array.isArray(t))return i(t)}(t)||function(t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(t))return Array.from(t)}(t)||function(t,n){if(t){if("string"==typeof t)return i(t,n);var e=Object.prototype.toString.call(t).slice(8,-1);return"Object"===e&&t.constructor&&(e=t.constructor.name),"Map"===e||"Set"===e?Array.from(t):"Arguments"===e||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e)?i(t,n):void 0}}(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.")}()}function c(t,n,e){return n in t?Object.defineProperty(t,n,{value:e,enumerable:!0,configurable:!0,writable:!0}):t[n]=e,t}var l=e(2);function f(t,n){var e=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(t,n).enumerable}))),e.push.apply(e,r)}return e}function s(t){for(var n=1;n<arguments.length;n++){var e=null!=arguments[n]?arguments[n]:{};n%2?f(Object(e),!0).forEach((function(n){c(t,n,e[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(e)):f(Object(e)).forEach((function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(e,n))}))}return t}function p(t,n){var e=t.filter(n);return t.length===e.length?t:e}function d(t){return Object(l.isNumber)(t.start)&&Object(l.isNumber)(t.end)&&t.start<=t.end}var v=function(){var t,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=arguments.length>1?arguments[1]:void 0;switch(e.type){case"ANNOTATION_ADD":var r=e.blockClientId,o={id:e.id,blockClientId:r,richTextIdentifier:e.richTextIdentifier,source:e.source,selector:e.selector,range:e.range};if("range"===o.selector&&!d(o.range))return n;var a=null!==(t=null==n?void 0:n[r])&&void 0!==t?t:[];return s(s({},n),{},c({},r,[].concat(u(a),[o])));case"ANNOTATION_REMOVE":return Object(l.mapValues)(n,(function(t){return p(t,(function(t){return t.id!==e.annotationId}))}));case"ANNOTATION_UPDATE_RANGE":return Object(l.mapValues)(n,(function(t){var n=!1,r=t.map((function(t){return t.id===e.annotationId?(n=!0,s(s({},t),{},{range:{start:e.start,end:e.end}})):t}));return n?r:t}));case"ANNOTATION_REMOVE_SOURCE":return Object(l.mapValues)(n,(function(t){return p(t,(function(t){return t.source!==e.source}))}))}return n};function b(t,n){if(null==t)return{};var e,r,o=function(t,n){if(null==t)return{};var e,r,o={},a=Object.keys(t);for(r=0;r<a.length;r++)e=a[r],n.indexOf(e)>=0||(o[e]=t[e]);return o}(t,n);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);for(r=0;r<a.length;r++)e=a[r],n.indexOf(e)>=0||Object.prototype.propertyIsEnumerable.call(t,e)&&(o[e]=t[e])}return o}var O=e(44);function y(t,n){var e=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(t,n).enumerable}))),e.push.apply(e,r)}return e}function m(t){for(var n=1;n<arguments.length;n++){var e=null!=arguments[n]?arguments[n]:{};n%2?y(Object(e),!0).forEach((function(n){c(t,n,e[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(e)):y(Object(e)).forEach((function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(e,n))}))}return t}var g=[],h=Object(O.a)((function(t,n){var e;return(null!==(e=null==t?void 0:t[n])&&void 0!==e?e:[]).filter((function(t){return"block"===t.selector}))}),(function(t,n){var e;return[null!==(e=null==t?void 0:t[n])&&void 0!==e?e:g]}));function j(t,n){var e;return null!==(e=null==t?void 0:t[n])&&void 0!==e?e:g}var A=Object(O.a)((function(t,n,e){var r;return(null!==(r=null==t?void 0:t[n])&&void 0!==r?r:[]).filter((function(t){return"range"===t.selector&&e===t.richTextIdentifier})).map((function(t){var n=t.range,e=b(t,["range"]);return m(m({},n),e)}))}),(function(t,n){var e;return[null!==(e=null==t?void 0:t[n])&&void 0!==e?e:g]}));function x(t){return Object(l.flatMap)(t,(function(t){return t}))}var _=e(199);function w(t){var n=t.blockClientId,e=t.richTextIdentifier,r=void 0===e?null:e,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(_.a)():f,blockClientId:n,richTextIdentifier:r,source:l,selector:u};return"range"===u&&(s.range=a),s}function N(t){return{type:"ANNOTATION_REMOVE",annotationId:t}}function T(t,n,e){return{type:"ANNOTATION_UPDATE_RANGE",annotationId:t,start:n,end:e}}function P(t){return{type:"ANNOTATION_REMOVE_SOURCE",source:t}}Object(a.registerStore)("core/annotations",{reducer:v,selectors:r,actions:o});var E=e(17),I=e(1);var R={name:"core/annotation",title:Object(I.__)("Annotation"),tagName:"mark",className:"annotation-text",attributes:{className:"class",id:"id"},edit:function(){return null},__experimentalGetPropsForEditableTreePreparation:function(t,n){var e=n.richTextIdentifier,r=n.blockClientId;return{annotations:t("core/annotations").__experimentalGetAnnotationsForRichText(r,e)}},__experimentalCreatePrepareEditableTree:function(t){var n=t.annotations;return function(t,e){if(0===n.length)return t;var r={formats:t,text:e};return(r=function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return n.forEach((function(n){var e=n.start,r=n.end;e>t.text.length&&(e=t.text.length),r>t.text.length&&(r=t.text.length);var o="annotation-text-"+n.source,a="annotation-text-"+n.id;t=Object(E.applyFormat)(t,{type:"core/annotation",attributes:{className:o,id:a}},e,r)})),t}(r,n)).formats}},__experimentalGetPropsForEditableTreeChangeHandler:function(t){return{removeAnnotation:t("core/annotations").__experimentalRemoveAnnotation,updateAnnotationRange:t("core/annotations").__experimentalUpdateAnnotationRange}},__experimentalCreateOnChangeEditableValue:function(t){return function(n){var e=function(t){var n={};return t.forEach((function(t,e){(t=(t=t||[]).filter((function(t){return"core/annotation"===t.type}))).forEach((function(t){var r=t.attributes.id;r=r.replace("annotation-text-",""),n.hasOwnProperty(r)||(n[r]={start:e}),n[r].end=e+1}))})),n}(n),r=t.removeAnnotation,o=t.updateAnnotationRange;!function(t,n,e){var r=e.removeAnnotation,o=e.updateAnnotationRange;t.forEach((function(t){var e=n[t.id];if(e){var a=t.start,i=t.end;a===e.start&&i===e.end||o(t.id,e.start,e.end)}else r(t.id)}))}(t.annotations,e,{removeAnnotation:r,updateAnnotationRange:o})}}},S=R.name,k=b(R,["name"]);Object(E.registerFormatType)(S,k);var D=e(26);Object(D.addFilter)("editor.BlockListBlock","core/annotations",(function(t){return Object(a.withSelect)((function(t,n){var e=n.clientId,r=n.className;return{className:t("core/annotations").__experimentalGetAnnotationsForBlock(e).map((function(t){return"is-annotated-by-"+t.source})).concat(r).filter(Boolean).join(" ")}}))(t)}))},44:function(t,n,e){"use strict";var r,o;function a(t){return[t]}function i(){var t={clear:function(){t.head=null}};return t}function u(t,n,e){var r;if(t.length!==n.length)return!1;for(r=e;r<t.length;r++)if(t[r]!==n[r])return!1;return!0}r={},o="undefined"!=typeof WeakMap,n.a=function(t,n){var e,c;function l(){e=o?new WeakMap:i()}function f(){var e,r,o,a,i,l=arguments.length;for(a=new Array(l),o=0;o<l;o++)a[o]=arguments[o];for(i=n.apply(null,a),(e=c(i)).isUniqueByDependants||(e.lastDependants&&!u(i,e.lastDependants,0)&&e.clear(),e.lastDependants=i),r=e.head;r;){if(u(r.args,a,1))return r!==e.head&&(r.prev.next=r.next,r.next&&(r.next.prev=r.prev),r.next=e.head,r.prev=null,e.head.prev=r,e.head=r),r.val;r=r.next}return r={val:t.apply(null,a)},a[0]=null,r.args=a,e.head&&(e.head.prev=r,r.next=e.head),e.head=r,r.val}return n||(n=a),c=o?function(t){var n,o,a,u,c,l=e,f=!0;for(n=0;n<t.length;n++){if(o=t[n],!(c=o)||"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 e},f.getDependants=n,f.clear=l,l(),f}}});
1
+ window.wp=window.wp||{},window.wp.annotations=function(t){var n={};function e(r){if(n[r])return n[r].exports;var o=n[r]={i:r,l:!1,exports:{}};return t[r].call(o.exports,o,o.exports,e),o.l=!0,o.exports}return e.m=t,e.c=n,e.d=function(t,n,r){e.o(t,n)||Object.defineProperty(t,n,{enumerable:!0,get:r})},e.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},e.t=function(t,n){if(1&n&&(t=e(t)),8&n)return t;if(4&n&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(e.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&n&&"string"!=typeof t)for(var o in t)e.d(r,o,function(n){return t[n]}.bind(null,o));return r},e.n=function(t){var n=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(n,"a",n),n},e.o=function(t,n){return Object.prototype.hasOwnProperty.call(t,n)},e.p="",e(e.s=422)}({1:function(t,n){t.exports=window.wp.i18n},15:function(t,n,e){"use strict";e.d(n,"a",(function(){return o}));var r=e(45);function o(t,n){if(null==t)return{};var e,o,a=Object(r.a)(t,n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(o=0;o<i.length;o++)e=i[o],n.indexOf(e)>=0||Object.prototype.propertyIsEnumerable.call(t,e)&&(a[e]=t[e])}return a}},16:function(t,n,e){"use strict";e.d(n,"a",(function(){return i}));var r=e(27);var o=e(38),a=e(29);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.")}()}},167:function(t,n,e){"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)}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;for(var u=function(t){return"string"==typeof t&&i.test(t)},c=[],l=0;l<256;++l)c.push((l+256).toString(16).substr(1));var f=function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,e=(c[t[n+0]]+c[t[n+1]]+c[t[n+2]]+c[t[n+3]]+"-"+c[t[n+4]]+c[t[n+5]]+"-"+c[t[n+6]]+c[t[n+7]]+"-"+c[t[n+8]]+c[t[n+9]]+"-"+c[t[n+10]]+c[t[n+11]]+c[t[n+12]]+c[t[n+13]]+c[t[n+14]]+c[t[n+15]]).toLowerCase();if(!u(e))throw TypeError("Stringified UUID is invalid");return e};n.a=function(t,n,e){var r=(t=t||{}).random||(t.rng||a)();if(r[6]=15&r[6]|64,r[8]=63&r[8]|128,n){e=e||0;for(var o=0;o<16;++o)n[e+o]=r[o];return n}return f(r)}},2:function(t,n){t.exports=window.lodash},26:function(t,n){t.exports=window.wp.richText},27:function(t,n,e){"use strict";function r(t,n){(null==n||n>t.length)&&(n=t.length);for(var e=0,r=new Array(n);e<n;e++)r[e]=t[e];return r}e.d(n,"a",(function(){return r}))},29:function(t,n,e){"use strict";e.d(n,"a",(function(){return o}));var r=e(27);function o(t,n){if(t){if("string"==typeof t)return Object(r.a)(t,n);var e=Object.prototype.toString.call(t).slice(8,-1);return"Object"===e&&t.constructor&&(e=t.constructor.name),"Map"===e||"Set"===e?Array.from(t):"Arguments"===e||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e)?Object(r.a)(t,n):void 0}}},32:function(t,n){t.exports=window.wp.hooks},38:function(t,n,e){"use strict";function r(t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(t))return Array.from(t)}e.d(n,"a",(function(){return r}))},4:function(t,n){t.exports=window.wp.data},422:function(t,n,e){"use strict";e.r(n);var r={};e.r(r),e.d(r,"__experimentalGetAnnotationsForBlock",(function(){return m})),e.d(r,"__experimentalGetAllAnnotationsForBlock",(function(){return h})),e.d(r,"__experimentalGetAnnotationsForRichText",(function(){return j})),e.d(r,"__experimentalGetAnnotations",(function(){return A}));var o={};e.r(o),e.d(o,"__experimentalAddAnnotation",(function(){return x})),e.d(o,"__experimentalRemoveAnnotation",(function(){return _})),e.d(o,"__experimentalUpdateAnnotationRange",(function(){return T})),e.d(o,"__experimentalRemoveAnnotationsBySource",(function(){return N}));var a=e(4),i=e(16),u=e(6),c=e(2);function l(t,n){var e=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(t,n).enumerable}))),e.push.apply(e,r)}return e}function f(t){for(var n=1;n<arguments.length;n++){var e=null!=arguments[n]?arguments[n]:{};n%2?l(Object(e),!0).forEach((function(n){Object(u.a)(t,n,e[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(e)):l(Object(e)).forEach((function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(e,n))}))}return t}function s(t,n){var e=t.filter(n);return t.length===e.length?t:e}function d(t){return Object(c.isNumber)(t.start)&&Object(c.isNumber)(t.end)&&t.start<=t.end}var p=function(){var t,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=arguments.length>1?arguments[1]:void 0;switch(e.type){case"ANNOTATION_ADD":var r=e.blockClientId,o={id:e.id,blockClientId:r,richTextIdentifier:e.richTextIdentifier,source:e.source,selector:e.selector,range:e.range};if("range"===o.selector&&!d(o.range))return n;var a=null!==(t=null==n?void 0:n[r])&&void 0!==t?t:[];return f(f({},n),{},Object(u.a)({},r,[].concat(Object(i.a)(a),[o])));case"ANNOTATION_REMOVE":return Object(c.mapValues)(n,(function(t){return s(t,(function(t){return t.id!==e.annotationId}))}));case"ANNOTATION_UPDATE_RANGE":return Object(c.mapValues)(n,(function(t){var n=!1,r=t.map((function(t){return t.id===e.annotationId?(n=!0,f(f({},t),{},{range:{start:e.start,end:e.end}})):t}));return n?r:t}));case"ANNOTATION_REMOVE_SOURCE":return Object(c.mapValues)(n,(function(t){return s(t,(function(t){return t.source!==e.source}))}))}return n},v=e(15),b=e(49);function O(t,n){var e=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(t,n).enumerable}))),e.push.apply(e,r)}return e}function y(t){for(var n=1;n<arguments.length;n++){var e=null!=arguments[n]?arguments[n]:{};n%2?O(Object(e),!0).forEach((function(n){Object(u.a)(t,n,e[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(e)):O(Object(e)).forEach((function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(e,n))}))}return t}var g=[],m=Object(b.a)((function(t,n){var e;return(null!==(e=null==t?void 0:t[n])&&void 0!==e?e:[]).filter((function(t){return"block"===t.selector}))}),(function(t,n){var e;return[null!==(e=null==t?void 0:t[n])&&void 0!==e?e:g]}));function h(t,n){var e;return null!==(e=null==t?void 0:t[n])&&void 0!==e?e:g}var j=Object(b.a)((function(t,n,e){var r;return(null!==(r=null==t?void 0:t[n])&&void 0!==r?r:[]).filter((function(t){return"range"===t.selector&&e===t.richTextIdentifier})).map((function(t){var n=t.range,e=Object(v.a)(t,["range"]);return y(y({},n),e)}))}),(function(t,n){var e;return[null!==(e=null==t?void 0:t[n])&&void 0!==e?e:g]}));function A(t){return Object(c.flatMap)(t,(function(t){return t}))}var w=e(167);function x(t){var n=t.blockClientId,e=t.richTextIdentifier,r=void 0===e?null:e,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(w.a)():f,blockClientId:n,richTextIdentifier:r,source:l,selector:u};return"range"===u&&(s.range=a),s}function _(t){return{type:"ANNOTATION_REMOVE",annotationId:t}}function T(t,n,e){return{type:"ANNOTATION_UPDATE_RANGE",annotationId:t,start:n,end:e}}function N(t){return{type:"ANNOTATION_REMOVE_SOURCE",source:t}}Object(a.registerStore)("core/annotations",{reducer:p,selectors:r,actions:o});var P=e(26),E=e(1);var I={name:"core/annotation",title:Object(E.__)("Annotation"),tagName:"mark",className:"annotation-text",attributes:{className:"class",id:"id"},edit:function(){return null},__experimentalGetPropsForEditableTreePreparation:function(t,n){var e=n.richTextIdentifier,r=n.blockClientId;return{annotations:t("core/annotations").__experimentalGetAnnotationsForRichText(r,e)}},__experimentalCreatePrepareEditableTree:function(t){var n=t.annotations;return function(t,e){if(0===n.length)return t;var r={formats:t,text:e};return(r=function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return n.forEach((function(n){var e=n.start,r=n.end;e>t.text.length&&(e=t.text.length),r>t.text.length&&(r=t.text.length);var o="annotation-text-"+n.source,a="annotation-text-"+n.id;t=Object(P.applyFormat)(t,{type:"core/annotation",attributes:{className:o,id:a}},e,r)})),t}(r,n)).formats}},__experimentalGetPropsForEditableTreeChangeHandler:function(t){return{removeAnnotation:t("core/annotations").__experimentalRemoveAnnotation,updateAnnotationRange:t("core/annotations").__experimentalUpdateAnnotationRange}},__experimentalCreateOnChangeEditableValue:function(t){return function(n){var e=function(t){var n={};return t.forEach((function(t,e){(t=(t=t||[]).filter((function(t){return"core/annotation"===t.type}))).forEach((function(t){var r=t.attributes.id;r=r.replace("annotation-text-",""),n.hasOwnProperty(r)||(n[r]={start:e}),n[r].end=e+1}))})),n}(n),r=t.removeAnnotation,o=t.updateAnnotationRange;!function(t,n,e){var r=e.removeAnnotation,o=e.updateAnnotationRange;t.forEach((function(t){var e=n[t.id];if(e){var a=t.start,i=t.end;a===e.start&&i===e.end||o(t.id,e.start,e.end)}else r(t.id)}))}(t.annotations,e,{removeAnnotation:r,updateAnnotationRange:o})}}},R=I.name,S=Object(v.a)(I,["name"]);Object(P.registerFormatType)(R,S);var D=e(32);Object(D.addFilter)("editor.BlockListBlock","core/annotations",(function(t){return Object(a.withSelect)((function(t,n){var e=n.clientId,r=n.className;return{className:t("core/annotations").__experimentalGetAnnotationsForBlock(e).map((function(t){return"is-annotated-by-"+t.source})).concat(r).filter(Boolean).join(" ")}}))(t)}))},45:function(t,n,e){"use strict";function r(t,n){if(null==t)return{};var e,r,o={},a=Object.keys(t);for(r=0;r<a.length;r++)e=a[r],n.indexOf(e)>=0||(o[e]=t[e]);return o}e.d(n,"a",(function(){return r}))},49:function(t,n,e){"use strict";var r,o;function a(t){return[t]}function i(){var t={clear:function(){t.head=null}};return t}function u(t,n,e){var r;if(t.length!==n.length)return!1;for(r=e;r<t.length;r++)if(t[r]!==n[r])return!1;return!0}r={},o="undefined"!=typeof WeakMap,n.a=function(t,n){var e,c;function l(){e=o?new WeakMap:i()}function f(){var e,r,o,a,i,l=arguments.length;for(a=new Array(l),o=0;o<l;o++)a[o]=arguments[o];for(i=n.apply(null,a),(e=c(i)).isUniqueByDependants||(e.lastDependants&&!u(i,e.lastDependants,0)&&e.clear(),e.lastDependants=i),r=e.head;r;){if(u(r.args,a,1))return r!==e.head&&(r.prev.next=r.next,r.next&&(r.next.prev=r.prev),r.next=e.head,r.prev=null,e.head.prev=r,e.head=r),r.val;r=r.next}return r={val:t.apply(null,a)},a[0]=null,r.args=a,e.head&&(e.head.prev=r,r.next=e.head),e.head=r,r.val}return n||(n=a),c=o?function(t){var n,o,a,u,c,l=e,f=!0;for(n=0;n<t.length;n++){if(o=t[n],!(c=o)||"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 e},f.getDependants=n,f.clear=l,l(),f}},6:function(t,n,e){"use strict";function r(t,n,e){return n in t?Object.defineProperty(t,n,{value:e,enumerable:!0,configurable:!0,writable:!0}):t[n]=e,t}e.d(n,"a",(function(){return r}))}});
build/api-fetch/index.asset.php CHANGED
@@ -1 +1 @@
1
- <?php return array('dependencies' => array('wp-i18n', 'wp-polyfill', 'wp-url'), 'version' => 'eab504748387c9387458f0bd76ca171a');
1
+ <?php return array('dependencies' => array('wp-i18n', 'wp-polyfill', 'wp-url'), 'version' => '9ea7f232b79fb9899ecfcc411528e9cd');
build/api-fetch/index.js CHANGED
@@ -1 +1 @@
1
- this.wp=this.wp||{},this.wp.apiFetch=function(e){var r={};function t(n){if(r[n])return r[n].exports;var o=r[n]={i:n,l:!1,exports:{}};return e[n].call(o.exports,o,o.exports,t),o.l=!0,o.exports}return t.m=e,t.c=r,t.d=function(e,r,n){t.o(e,r)||Object.defineProperty(e,r,{enumerable:!0,get:n})},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,r){if(1&r&&(e=t(e)),8&r)return e;if(4&r&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(t.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&r&&"string"!=typeof e)for(var o in e)t.d(n,o,function(r){return e[r]}.bind(null,o));return n},t.n=function(e){var r=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(r,"a",r),r},t.o=function(e,r){return Object.prototype.hasOwnProperty.call(e,r)},t.p="",t(t.s=425)}({1:function(e,r){!function(){e.exports=this.wp.i18n}()},12:function(e,r){!function(){e.exports=this.regeneratorRuntime}()},18:function(e,r){!function(){e.exports=this.wp.url}()},425:function(e,r,t){"use strict";function n(e,r,t){return r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function o(e,r){if(null==e)return{};var t,n,o=function(e,r){if(null==e)return{};var t,n,o={},c=Object.keys(e);for(n=0;n<c.length;n++)t=c[n],r.indexOf(t)>=0||(o[t]=e[t]);return o}(e,r);if(Object.getOwnPropertySymbols){var c=Object.getOwnPropertySymbols(e);for(n=0;n<c.length;n++)t=c[n],r.indexOf(t)>=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(o[t]=e[t])}return o}t.r(r);var c=t(1);function i(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);r&&(n=n.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,n)}return t}function a(e){for(var r=1;r<arguments.length;r++){var t=null!=arguments[r]?arguments[r]:{};r%2?i(Object(t),!0).forEach((function(r){n(e,r,t[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):i(Object(t)).forEach((function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}))}return e}var u=function(e){function r(e,t){var n=e.headers,o=void 0===n?{}:n;for(var c in o)if("x-wp-nonce"===c.toLowerCase()&&o[c]===r.nonce)return t(e);return t(a(a({},e),{},{headers:a(a({},o),{},{"X-WP-Nonce":r.nonce})}))}return r.nonce=e,r};function s(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);r&&(n=n.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,n)}return t}function p(e){for(var r=1;r<arguments.length;r++){var t=null!=arguments[r]?arguments[r]:{};r%2?s(Object(t),!0).forEach((function(r){n(e,r,t[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):s(Object(t)).forEach((function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}))}return e}var f=function(e,r){var t,n,o=e.path;return"string"==typeof e.namespace&&"string"==typeof e.endpoint&&(t=e.namespace.replace(/^\/|\/$/g,""),o=(n=e.endpoint.replace(/^\//,""))?t+"/"+n:t),delete e.namespace,delete e.endpoint,r(p(p({},e),{},{path:o}))};function l(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);r&&(n=n.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,n)}return t}function O(e){for(var r=1;r<arguments.length;r++){var t=null!=arguments[r]?arguments[r]:{};r%2?l(Object(t),!0).forEach((function(r){n(e,r,t[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):l(Object(t)).forEach((function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}))}return e}var b=function(e){return function(r,t){return f(r,(function(r){var n,o=r.url,c=r.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),t(O(O({},r),{},{url:o}))}))}};function d(e){var r=e.split("?"),t=r[1],n=r[0];return t?n+"?"+t.split("&").map((function(e){return e.split("=")})).sort((function(e,r){return e[0].localeCompare(r[0])})).map((function(e){return e.join("=")})).join("&"):n}var y=function(e){var r=Object.keys(e).reduce((function(r,t){return r[d(t)]=e[t],r}),{});return function(e,t){var n=e.parse,o=void 0===n||n;if("string"==typeof e.path){var c=e.method||"GET",i=d(e.path);if("GET"===c&&r[i]){var a=r[i];return delete r[i],Promise.resolve(o?a.body:new window.Response(JSON.stringify(a.body),{status:200,statusText:"OK",headers:a.headers}))}if("OPTIONS"===c&&r[c]&&r[c][i])return Promise.resolve(r[c][i])}return t(e)}},h=t(12),j=t.n(h);function v(e,r,t,n,o,c,i){try{var a=e[c](i),u=a.value}catch(e){return void t(e)}a.done?r(u):Promise.resolve(u).then(n,o)}var g=t(18);function w(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);r&&(n=n.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,n)}return t}function P(e){for(var r=1;r<arguments.length;r++){var t=null!=arguments[r]?arguments[r]:{};r%2?w(Object(t),!0).forEach((function(r){n(e,r,t[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):w(Object(t)).forEach((function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}))}return e}var m=function(e){return e.json?e.json():Promise.reject(e)},x=function(e){return function(e){if(!e)return{};var r=e.match(/<([^>]+)>; rel="next"/);return r?{next:r[1]}:{}}(e.headers.get("link")).next},D=function(e){var r=e.path&&-1!==e.path.indexOf("per_page=-1"),t=e.url&&-1!==e.url.indexOf("per_page=-1");return r||t},S=function(){var e,r=(e=j.a.mark((function e(r,t){var n,c,i,a,u,s;return j.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!1!==r.parse){e.next=2;break}return e.abrupt("return",t(r));case 2:if(D(r)){e.next=4;break}return e.abrupt("return",t(r));case 4:return e.next=6,q(P(P({},(f={per_page:100},l=void 0,O=void 0,l=(p=r).path,O=p.url,P(P({},o(p,["path","url"])),{},{url:O&&Object(g.addQueryArgs)(O,f),path:l&&Object(g.addQueryArgs)(l,f)}))),{},{parse:!1}));case 6:return n=e.sent,e.next=9,m(n);case 9:if(c=e.sent,Array.isArray(c)){e.next=12;break}return e.abrupt("return",c);case 12:if(i=x(n)){e.next=15;break}return e.abrupt("return",c);case 15:a=[].concat(c);case 16:if(!i){e.next=27;break}return e.next=19,q(P(P({},r),{},{path:void 0,url:i,parse:!1}));case 19:return u=e.sent,e.next=22,m(u);case 22:s=e.sent,a=a.concat(s),i=x(u),e.next=16;break;case 27:return e.abrupt("return",a);case 28:case"end":return e.stop()}var p,f,l,O}),e)})),function(){var r=this,t=arguments;return new Promise((function(n,o){var c=e.apply(r,t);function i(e){v(c,n,o,i,a,"next",e)}function a(e){v(c,n,o,i,a,"throw",e)}i(void 0)}))});return function(e,t){return r.apply(this,arguments)}}();function _(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);r&&(n=n.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,n)}return t}function E(e){for(var r=1;r<arguments.length;r++){var t=null!=arguments[r]?arguments[r]:{};r%2?_(Object(t),!0).forEach((function(r){n(e,r,t[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):_(Object(t)).forEach((function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}))}return e}var k=new Set(["PATCH","PUT","DELETE"]);var T=function(e){var r=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return r?204===e.status?null:e.json?e.json():Promise.reject(e):e},A=function(e){var r={code:"invalid_json",message:Object(c.__)("The response is not a valid JSON response.")};if(!e||!e.json)throw r;return e.json().catch((function(){throw r}))},M=function(e){var r=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return Promise.resolve(T(e,r)).catch((function(e){return C(e,r)}))};function C(e){var r=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];if(!r)throw e;return A(e).then((function(e){var r={code:"unknown_error",message:Object(c.__)("An unknown error occurred.")};throw e||r}))}function N(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);r&&(n=n.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,n)}return t}function Q(e){for(var r=1;r<arguments.length;r++){var t=null!=arguments[r]?arguments[r]:{};r%2?N(Object(t),!0).forEach((function(r){n(e,r,t[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):N(Object(t)).forEach((function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}))}return e}var R=function(e,r){if(!(e.path&&-1!==e.path.indexOf("/wp/v2/media")||e.url&&-1!==e.url.indexOf("/wp/v2/media")))return r(e,r);var t=0;return r(Q(Q({},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 t++,r({path:"/wp/v2/media/".concat(n,"/post-process"),method:"POST",data:{action:"create-image-subsizes"},parse:!1}).catch((function(){return t<5?e(n):(r({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)})):C(n,e.parse)})).then((function(r){return M(r,e.parse)}))};function L(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);r&&(n=n.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,n)}return t}function U(e){for(var r=1;r<arguments.length;r++){var t=null!=arguments[r]?arguments[r]:{};r%2?L(Object(t),!0).forEach((function(r){n(e,r,t[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):L(Object(t)).forEach((function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}))}return e}var G={Accept:"application/json, */*;q=0.1"},H={credentials:"include"},I=[function(e,r){return"string"!=typeof e.url||Object(g.hasQueryArg)(e.url,"_locale")||(e.url=Object(g.addQueryArgs)(e.url,{_locale:"user"})),"string"!=typeof e.path||Object(g.hasQueryArg)(e.path,"_locale")||(e.path=Object(g.addQueryArgs)(e.path,{_locale:"user"})),r(e)},f,function(e,r){var t=e.method,n=void 0===t?"GET":t;return k.has(n.toUpperCase())&&(e=E(E({},e),{},{headers:E(E({},e.headers),{},{"X-HTTP-Method-Override":n,"Content-Type":"application/json"}),method:"POST"})),r(e)},S];var J=function(e){if(e.status>=200&&e.status<300)return e;throw e},F=function(e){var r=e.url,t=e.path,n=e.data,i=e.parse,a=void 0===i||i,u=o(e,["url","path","data","parse"]),s=e.body,p=e.headers;return p=U(U({},G),p),n&&(s=JSON.stringify(n),p["Content-Type"]="application/json"),window.fetch(r||t,U(U(U({},H),u),{},{body:s,headers:p})).then((function(e){return Promise.resolve(e).then(J).catch((function(e){return C(e,a)})).then((function(e){return M(e,a)}))}),(function(){throw{code:"fetch_error",message:Object(c.__)("You are probably offline.")}}))};function X(e){return I.reduceRight((function(e,r){return function(t){return r(t,e)}}),F)(e).catch((function(r){return"rest_cookie_invalid_nonce"!==r.code?Promise.reject(r):window.fetch(X.nonceEndpoint).then(J).then((function(e){return e.text()})).then((function(r){return X.nonceMiddleware.nonce=r,X(e)}))}))}X.use=function(e){I.unshift(e)},X.setFetchHandler=function(e){F=e},X.createNonceMiddleware=u,X.createPreloadingMiddleware=y,X.createRootURLMiddleware=b,X.fetchAllMiddleware=S,X.mediaUploadMiddleware=R;var q=r.default=X}}).default;
1
+ window.wp=window.wp||{},window.wp.apiFetch=function(e){var r={};function t(n){if(r[n])return r[n].exports;var o=r[n]={i:n,l:!1,exports:{}};return e[n].call(o.exports,o,o.exports,t),o.l=!0,o.exports}return t.m=e,t.c=r,t.d=function(e,r,n){t.o(e,r)||Object.defineProperty(e,r,{enumerable:!0,get:n})},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,r){if(1&r&&(e=t(e)),8&r)return e;if(4&r&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(t.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&r&&"string"!=typeof e)for(var o in e)t.d(n,o,function(r){return e[r]}.bind(null,o));return n},t.n=function(e){var r=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(r,"a",r),r},t.o=function(e,r){return Object.prototype.hasOwnProperty.call(e,r)},t.p="",t(t.s=420)}({1:function(e,r){e.exports=window.wp.i18n},15:function(e,r,t){"use strict";t.d(r,"a",(function(){return o}));var n=t(45);function o(e,r){if(null==e)return{};var t,o,c=Object(n.a)(e,r);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(o=0;o<i.length;o++)t=i[o],r.indexOf(t)>=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(c[t]=e[t])}return c}},18:function(e,r){e.exports=window.regeneratorRuntime},28:function(e,r){e.exports=window.wp.url},37:function(e,r,t){"use strict";function n(e,r,t,n,o,c,i){try{var a=e[c](i),u=a.value}catch(e){return void t(e)}a.done?r(u):Promise.resolve(u).then(n,o)}function o(e){return function(){var r=this,t=arguments;return new Promise((function(o,c){var i=e.apply(r,t);function a(e){n(i,o,c,a,u,"next",e)}function u(e){n(i,o,c,a,u,"throw",e)}a(void 0)}))}}t.d(r,"a",(function(){return o}))},420:function(e,r,t){"use strict";t.r(r);var n=t(6),o=t(15),c=t(1);function i(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);r&&(n=n.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,n)}return t}function a(e){for(var r=1;r<arguments.length;r++){var t=null!=arguments[r]?arguments[r]:{};r%2?i(Object(t),!0).forEach((function(r){Object(n.a)(e,r,t[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):i(Object(t)).forEach((function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}))}return e}var u=function(e){function r(e,t){var n=e.headers,o=void 0===n?{}:n;for(var c in o)if("x-wp-nonce"===c.toLowerCase()&&o[c]===r.nonce)return t(e);return t(a(a({},e),{},{headers:a(a({},o),{},{"X-WP-Nonce":r.nonce})}))}return r.nonce=e,r};function s(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);r&&(n=n.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,n)}return t}function p(e){for(var r=1;r<arguments.length;r++){var t=null!=arguments[r]?arguments[r]:{};r%2?s(Object(t),!0).forEach((function(r){Object(n.a)(e,r,t[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):s(Object(t)).forEach((function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}))}return e}var f=function(e,r){var t,n,o=e.path;return"string"==typeof e.namespace&&"string"==typeof e.endpoint&&(t=e.namespace.replace(/^\/|\/$/g,""),o=(n=e.endpoint.replace(/^\//,""))?t+"/"+n:t),delete e.namespace,delete e.endpoint,r(p(p({},e),{},{path:o}))};function l(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);r&&(n=n.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,n)}return t}function O(e){for(var r=1;r<arguments.length;r++){var t=null!=arguments[r]?arguments[r]:{};r%2?l(Object(t),!0).forEach((function(r){Object(n.a)(e,r,t[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):l(Object(t)).forEach((function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}))}return e}var b=function(e){return function(r,t){return f(r,(function(r){var n,o=r.url,c=r.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),t(O(O({},r),{},{url:o}))}))}};function d(e){var r=e.split("?"),t=r[1],n=r[0];return t?n+"?"+t.split("&").map((function(e){return e.split("=")})).sort((function(e,r){return e[0].localeCompare(r[0])})).map((function(e){return e.join("=")})).join("&"):n}var j=function(e){var r=Object.keys(e).reduce((function(r,t){return r[d(t)]=e[t],r}),{});return function(e,t){var n=e.parse,o=void 0===n||n;if("string"==typeof e.path){var c=e.method||"GET",i=d(e.path);if("GET"===c&&r[i]){var a=r[i];return delete r[i],Promise.resolve(o?a.body:new window.Response(JSON.stringify(a.body),{status:200,statusText:"OK",headers:a.headers}))}if("OPTIONS"===c&&r[c]&&r[c][i])return Promise.resolve(r[c][i])}return t(e)}},y=t(18),h=t.n(y),v=t(37),w=t(28);function g(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);r&&(n=n.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,n)}return t}function P(e){for(var r=1;r<arguments.length;r++){var t=null!=arguments[r]?arguments[r]:{};r%2?g(Object(t),!0).forEach((function(r){Object(n.a)(e,r,t[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):g(Object(t)).forEach((function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}))}return e}var m=function(e){return e.json?e.json():Promise.reject(e)},x=function(e){return function(e){if(!e)return{};var r=e.match(/<([^>]+)>; rel="next"/);return r?{next:r[1]}:{}}(e.headers.get("link")).next},D=function(e){var r=e.path&&-1!==e.path.indexOf("per_page=-1"),t=e.url&&-1!==e.url.indexOf("per_page=-1");return r||t},S=function(){var e=Object(v.a)(h.a.mark((function e(r,t){var n,c,i,a,u,s;return h.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!1!==r.parse){e.next=2;break}return e.abrupt("return",t(r));case 2:if(D(r)){e.next=4;break}return e.abrupt("return",t(r));case 4:return e.next=6,q(P(P({},(f={per_page:100},l=void 0,O=void 0,l=(p=r).path,O=p.url,P(P({},Object(o.a)(p,["path","url"])),{},{url:O&&Object(w.addQueryArgs)(O,f),path:l&&Object(w.addQueryArgs)(l,f)}))),{},{parse:!1}));case 6:return n=e.sent,e.next=9,m(n);case 9:if(c=e.sent,Array.isArray(c)){e.next=12;break}return e.abrupt("return",c);case 12:if(i=x(n)){e.next=15;break}return e.abrupt("return",c);case 15:a=[].concat(c);case 16:if(!i){e.next=27;break}return e.next=19,q(P(P({},r),{},{path:void 0,url:i,parse:!1}));case 19:return u=e.sent,e.next=22,m(u);case 22:s=e.sent,a=a.concat(s),i=x(u),e.next=16;break;case 27:return e.abrupt("return",a);case 28:case"end":return e.stop()}var p,f,l,O}),e)})));return function(r,t){return e.apply(this,arguments)}}();function _(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);r&&(n=n.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,n)}return t}function E(e){for(var r=1;r<arguments.length;r++){var t=null!=arguments[r]?arguments[r]:{};r%2?_(Object(t),!0).forEach((function(r){Object(n.a)(e,r,t[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):_(Object(t)).forEach((function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}))}return e}var k=new Set(["PATCH","PUT","DELETE"]);var T=function(e){var r=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return r?204===e.status?null:e.json?e.json():Promise.reject(e):e},A=function(e){var r={code:"invalid_json",message:Object(c.__)("The response is not a valid JSON response.")};if(!e||!e.json)throw r;return e.json().catch((function(){throw r}))},M=function(e){var r=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return Promise.resolve(T(e,r)).catch((function(e){return C(e,r)}))};function C(e){var r=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];if(!r)throw e;return A(e).then((function(e){var r={code:"unknown_error",message:Object(c.__)("An unknown error occurred.")};throw e||r}))}function N(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);r&&(n=n.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,n)}return t}function Q(e){for(var r=1;r<arguments.length;r++){var t=null!=arguments[r]?arguments[r]:{};r%2?N(Object(t),!0).forEach((function(r){Object(n.a)(e,r,t[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):N(Object(t)).forEach((function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}))}return e}var R=function(e,r){if(!(e.path&&-1!==e.path.indexOf("/wp/v2/media")||e.url&&-1!==e.url.indexOf("/wp/v2/media")))return r(e,r);var t=0;return r(Q(Q({},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 t++,r({path:"/wp/v2/media/".concat(n,"/post-process"),method:"POST",data:{action:"create-image-subsizes"},parse:!1}).catch((function(){return t<5?e(n):(r({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)})):C(n,e.parse)})).then((function(r){return M(r,e.parse)}))};function L(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);r&&(n=n.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,n)}return t}function U(e){for(var r=1;r<arguments.length;r++){var t=null!=arguments[r]?arguments[r]:{};r%2?L(Object(t),!0).forEach((function(r){Object(n.a)(e,r,t[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):L(Object(t)).forEach((function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}))}return e}var G={Accept:"application/json, */*;q=0.1"},H={credentials:"include"},I=[function(e,r){return"string"!=typeof e.url||Object(w.hasQueryArg)(e.url,"_locale")||(e.url=Object(w.addQueryArgs)(e.url,{_locale:"user"})),"string"!=typeof e.path||Object(w.hasQueryArg)(e.path,"_locale")||(e.path=Object(w.addQueryArgs)(e.path,{_locale:"user"})),r(e)},f,function(e,r){var t=e.method,n=void 0===t?"GET":t;return k.has(n.toUpperCase())&&(e=E(E({},e),{},{headers:E(E({},e.headers),{},{"X-HTTP-Method-Override":n,"Content-Type":"application/json"}),method:"POST"})),r(e)},S];var J=function(e){if(e.status>=200&&e.status<300)return e;throw e},F=function(e){var r=e.url,t=e.path,n=e.data,i=e.parse,a=void 0===i||i,u=Object(o.a)(e,["url","path","data","parse"]),s=e.body,p=e.headers;return p=U(U({},G),p),n&&(s=JSON.stringify(n),p["Content-Type"]="application/json"),window.fetch(r||t,U(U(U({},H),u),{},{body:s,headers:p})).then((function(e){return Promise.resolve(e).then(J).catch((function(e){return C(e,a)})).then((function(e){return M(e,a)}))}),(function(){throw{code:"fetch_error",message:Object(c.__)("You are probably offline.")}}))};function X(e){return I.reduceRight((function(e,r){return function(t){return r(t,e)}}),F)(e).catch((function(r){return"rest_cookie_invalid_nonce"!==r.code?Promise.reject(r):window.fetch(X.nonceEndpoint).then(J).then((function(e){return e.text()})).then((function(r){return X.nonceMiddleware.nonce=r,X(e)}))}))}X.use=function(e){I.unshift(e)},X.setFetchHandler=function(e){F=e},X.createNonceMiddleware=u,X.createPreloadingMiddleware=j,X.createRootURLMiddleware=b,X.fetchAllMiddleware=S,X.mediaUploadMiddleware=R;var q=r.default=X},45:function(e,r,t){"use strict";function n(e,r){if(null==e)return{};var t,n,o={},c=Object.keys(e);for(n=0;n<c.length;n++)t=c[n],r.indexOf(t)>=0||(o[t]=e[t]);return o}t.d(r,"a",(function(){return n}))},6:function(e,r,t){"use strict";function n(e,r,t){return r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}t.d(r,"a",(function(){return n}))}}).default;
build/autop/index.asset.php CHANGED
@@ -1 +1 @@
1
- <?php return array('dependencies' => array('wp-polyfill'), 'version' => 'dee0cfe0f194692e266e9c2103647f14');
1
+ <?php return array('dependencies' => array('wp-polyfill'), 'version' => 'fd14f6fee61fc953f7f2290d293c29a0');
build/autop/index.js CHANGED
@@ -1 +1 @@
1
- this.wp=this.wp||{},this.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=433)}({433: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}function p(e,r){return function(e){if(Array.isArray(e))return e}(e)||function(e,r){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e)){var n=[],t=!0,p=!1,a=void 0;try{for(var o,c=e[Symbol.iterator]();!(t=(o=c.next()).done)&&(n.push(o.value),!r||n.length!==r);t=!0);}catch(e){p=!0,a=e}finally{try{t||null==c.return||c.return()}finally{if(p)throw a}}return n}}(e,r)||function(e,r){if(e){if("string"==typeof e)return t(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)?t(e,r):void 0}}(e,r)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}n.r(r),n.d(r,"autop",(function(){return c})),n.d(r,"removep",(function(){return i}));var a=new RegExp("(<((?=!--|!\\[CDATA\\[)((?=!-)!(?:-(?!->)[^\\-]*)*(?:--\x3e)?|!\\[CDATA\\[[^\\]]*(?:](?!]>)[^\\]]*)*?(?:]]>)?)|[^>]*>?))");function o(e,r){for(var n=function(e){for(var r,n=[],t=e;r=t.match(a);){var p=r.index;n.push(t.slice(0,p)),n.push(r[0]),t=t.slice(p+r[0].length)}return t.length&&n.push(t),n}(e),t=!1,p=Object.keys(r),o=1;o<n.length;o+=2)for(var c=0;c<p.length;c++){var i=p[c];if(-1!==n[o].indexOf(i)){n[o]=n[o].replace(new RegExp(i,"g"),r[i]),t=!0;break}}return t&&(e=n.join("")),e}function c(e){var r=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=[];if(""===e.trim())return"";if(-1!==(e+="\n").indexOf("<pre")){var t=e.split("</pre>"),a=t.pop();e="";for(var c=0;c<t.length;c++){var i=t[c],l=i.indexOf("<pre");if(-1!==l){var s="<pre wp-pre-tag-"+c+"></pre>";n.push([s,i.substr(l)+"</pre>"]),e+=i.substr(0,l)+s}else e+=i}e+=a}var u="(?: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=o(e=(e=(e=(e=e.replace(/<br\s*\/?>\s*<br\s*\/?>/g,"\n\n")).replace(new RegExp("(<"+u+"[\\s/>])","g"),"\n\n$1")).replace(new RegExp("(</"+u+">)","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 g=(e=e.replace(/\n\n+/g,"\n\n")).split(/\n\s*\n/).filter(Boolean);return e="",g.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*(</?"+u+"[^>]*>)\\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*(</?"+u+"[^>]*>)","g"),"$1")).replace(new RegExp("(</?"+u+"[^>]*>)\\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("(</?"+u+"[^>]*>)\\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=p(r,2),t=n[0],a=n[1];e=e.replace(t,a)})),-1!==e.indexOf("\x3c!-- wpnl --\x3e")&&(e=e.replace(/\s?<!-- wpnl -->\s?/g,"\n")),e}function i(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=[],a=!1,o=!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")&&(a=!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")&&(o=!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]+$/,""),a&&(e=e.replace(/<wp-line-break>/g,"\n")),o&&(e=e.replace(/<wp-temp-br([^>]*)>/g,"<br$1>")),p.length&&(e=e.replace(/<wp-preserve>/g,(function(){return p.shift()}))),e):""}}});
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=284)}({27: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}))},284: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):""}},29:function(e,r,n){"use strict";n.d(r,"a",(function(){return p}));var t=n(27);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}}},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}))},9:function(e,r,n){"use strict";n.d(r,"a",(function(){return a}));var t=n(39);var p=n(29),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=[],t=!0,p=!1,c=void 0;try{for(var a,o=e[Symbol.iterator]();!(t=(a=o.next()).done)&&(n.push(a.value),!r||n.length!==r);t=!0);}catch(e){p=!0,c=e}finally{try{t||null==o.return||o.return()}finally{if(p)throw c}}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' => 'fd40c5e7c8651e2fc9cbe5ceb094cdf7');
1
+ <?php return array('dependencies' => array('wp-polyfill'), 'version' => 'dc03f240428ed3a3f5f00d583eeda67b');
build/blob/index.js CHANGED
@@ -1 +1 @@
1
- this.wp=this.wp||{},this.wp.blob=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=285)}({285:function(e,t,n){"use strict";n.r(t),n.d(t,"createBlobURL",(function(){return f})),n.d(t,"getBlobByURL",(function(){return c})),n.d(t,"getBlobTypeByURL",(function(){return l})),n.d(t,"revokeBlobURL",(function(){return d})),n.d(t,"isBlobURL",(function(){return a}));var r=window.URL,o=r.createObjectURL,u=r.revokeObjectURL,i={};function f(e){var t=o(e);return i[t]=e,t}function c(e){return i[e]}function l(e){var t;return null===(t=c(e))||void 0===t?void 0:t.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=285)}({285: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-data', 'wp-data-controls', 'wp-edit-post', 'wp-element', 'wp-hooks', 'wp-html-entities', 'wp-i18n', 'wp-notices', 'wp-plugins', 'wp-polyfill', 'wp-primitives'), 'version' => '1054b468783c8d39a2e32bd4353e25de');
1
+ <?php return array('dependencies' => array('lodash', 'wp-a11y', 'wp-api-fetch', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-data', 'wp-data-controls', 'wp-edit-post', 'wp-element', 'wp-hooks', 'wp-html-entities', 'wp-i18n', 'wp-notices', 'wp-plugins', 'wp-polyfill', 'wp-primitives'), 'version' => '7816dcc2bd25b44799867ec2788bf981');
build/block-directory/index.js CHANGED
@@ -1,27 +1,27 @@
1
- this.wp=this.wp||{},this.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=412)}({0:function(e,t){!function(){e.exports=this.wp.element}()},1:function(e,t){!function(){e.exports=this.wp.i18n}()},10:function(e,t){!function(){e.exports=this.wp.compose}()},12:function(e,t){!function(){e.exports=this.regeneratorRuntime}()},144: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}function c(e,t){if(null==e)return{};var n,r,c=function(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}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(c[n]=e[n])}return c}var 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,l=void 0===n?24:n,i=c(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){r(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:l,height:l},i))}},156:function(e,t,n){"use strict";var r=n(0),c=n(6),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},180:function(e,t,n){"use strict";var r=n(0),c=n(6),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},181:function(e,t,n){"use strict";var r=n(0),c=n(6),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},2:function(e,t){!function(){e.exports=this.lodash}()},24:function(e,t){!function(){e.exports=this.wp.dataControls}()},26:function(e,t){!function(){e.exports=this.wp.hooks}()},262:function(e,t){!function(){e.exports=this.wp.editPost}()},286:function(e,t,n){"use strict";var r=n(0),c=n(6),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},3:function(e,t){!function(){e.exports=this.wp.components}()},33:function(e,t){!function(){e.exports=this.wp.apiFetch}()},4:function(e,t){!function(){e.exports=this.wp.data}()},412:function(e,t,n){"use strict";n.r(t);var r={};n.r(r),n.d(r,"isRequestingDownloadableBlocks",(function(){return m})),n.d(r,"getDownloadableBlocks",(function(){return j})),n.d(r,"getInstalledBlockTypes",(function(){return k})),n.d(r,"getNewBlockTypes",(function(){return h})),n.d(r,"getUnusedBlockTypes",(function(){return y})),n.d(r,"isInstalling",(function(){return v})),n.d(r,"getErrorNotices",(function(){return g})),n.d(r,"getErrorNoticeForBlock",(function(){return w}));var c={};n.r(c),n.d(c,"fetchDownloadableBlocks",(function(){return M})),n.d(c,"receiveDownloadableBlocks",(function(){return F})),n.d(c,"installBlockType",(function(){return V})),n.d(c,"uninstallBlockType",(function(){return z})),n.d(c,"addInstalledBlockType",(function(){return H})),n.d(c,"removeInstalledBlockType",(function(){return K})),n.d(c,"setIsInstalling",(function(){return U})),n.d(c,"setErrorNotice",(function(){return W})),n.d(c,"clearErrorNotice",(function(){return Y}));n(78);function o(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var a=n(4),l=n(24);function i(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 s(e,t){if(e){if("string"==typeof e)return i(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(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?i(e,t):void 0}}function u(e){return function(e){if(Array.isArray(e))return i(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||s(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.")}()}var b=n(2);function d(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 f(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?d(Object(n),!0).forEach((function(t){o(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):d(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var p=Object(a.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 f(f({},e),{},o({},t.filterValue,{isRequesting:!0}));case"RECEIVE_DOWNLOADABLE_BLOCKS":return f(f({},e),{},o({},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 f(f({},e),{},{installedBlockTypes:[].concat(u(e.installedBlockTypes),[t.item])});case"REMOVE_INSTALLED_BLOCK_TYPE":return f(f({},e),{},{installedBlockTypes:e.installedBlockTypes.filter((function(e){return e.name!==t.item.name}))});case"SET_INSTALLING_BLOCK":return f(f({},e),{},{isInstalling:f(f({},e.isInstalling),{},o({},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 f(f({},e),{},o({},t.blockId,{message:t.message,isFatal:t.isFatal}));case"CLEAR_ERROR_NOTICE":return Object(b.omit)(e,t.blockId)}return e}});function O(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(O(e,t[n].innerBlocks))return!0;return!1}function m(e,t){return!(!e.downloadableBlocks[t]||!e.downloadableBlocks[t].isRequesting)&&e.downloadableBlocks[t].isRequesting}function j(e,t){return e.downloadableBlocks[t]&&e.downloadableBlocks[t].results?e.downloadableBlocks[t].results:[]}function k(e){return e.blockManagement.installedBlockTypes}var h=Object(a.createRegistrySelector)((function(e){return function(t){var n=e("core/block-editor").getBlocks();return k(t).filter((function(e){return O(e,n)}))}})),y=Object(a.createRegistrySelector)((function(e){return function(t){var n=e("core/block-editor").getBlocks();return k(t).filter((function(e){return!O(e,n)}))}}));function v(e,t){return e.blockManagement.isInstalling[t]||!1}function g(e){return e.errorNotices}function w(e,t){return e.errorNotices[t]}var _=n(12),E=n.n(_),B=n(1);function x(e,t,n,r,c,o,a){try{var l=e[o](a),i=l.value}catch(e){return void n(e)}l.done?t(i):Promise.resolve(i).then(r,c)}var S=n(33),P=n.n(S),N=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 T(e){return{type:"LOAD_ASSETS",assets:e}}var I={LOAD_ASSETS:function(){return P()({url:document.location.href,parse:!1}).then((function(e){return e.text()})).then((function(e){var t=(new window.DOMParser).parseFromString(e,"text/html"),n=Array.from(t.querySelectorAll('link[rel="stylesheet"],script')).filter((function(e){return e.id&&!document.getElementById(e.id)}));return new Promise(function(){var e,t=(e=E.a.mark((function e(t,r){var c;return E.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:e.t0=E.a.keys(n);case 1:if((e.t1=e.t0()).done){e.next=13;break}return c=e.t1.value,e.prev=3,e.next=6,N(n[c]);case 6:e.next=11;break;case 8:e.prev=8,e.t2=e.catch(3),r(e.t2);case 11:e.next=1;break;case 13:t();case 14:case"end":return e.stop()}}),e,null,[[3,8]])})),function(){var t=this,n=arguments;return new Promise((function(r,c){var o=e.apply(t,n);function a(e){x(o,r,c,a,l,"next",e)}function l(e){x(o,r,c,a,l,"throw",e)}a(void 0)}))});return function(e,n){return t.apply(this,arguments)}}())}))}};function L(e){if(!e)return!1;var t=e.links["wp:plugin"]||e.links.self;return!(!t||!t.length)&&t[0].href}var D=E.a.mark(V),C=E.a.mark(z);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}function R(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){o(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}function M(e){return{type:"FETCH_DOWNLOADABLE_BLOCKS",filterValue:e}}function F(e,t){return{type:"RECEIVE_DOWNLOADABLE_BLOCKS",downloadableBlocks:e,filterValue:t}}function V(e){var t,n,r,c,o,a,i,s,u,b;return E.a.wrap((function(d){for(;;)switch(d.prev=d.next){case 0:return t=e.id,n=e.assets,r=!1,d.next=4,Y(t);case 4:return d.prev=4,d.next=7,U(e.id,!0);case 7:if(c=L(e),o={},!c){d.next=14;break}return d.next=12,Object(l.apiFetch)({url:c,data:{status:"active"},method:"PUT"});case 12:d.next=18;break;case 14:return d.next=16,Object(l.apiFetch)({path:"wp/v2/plugins",data:{slug:e.id,status:"active"},method:"POST"});case 16:a=d.sent,o=a._links;case 18:return d.next=20,H(R(R({},e),{},{links:R(R({},e.links),o)}));case 20:return d.next=22,T(n);case 22:return d.next=24,Object(l.select)("core/blocks","getBlockTypes");case 24:if((i=d.sent).length&&i.filter((function(t){return t.name===e.name})).length){d.next=27;break}throw new Error(Object(B.__)("Error registering block. Try reloading the page."));case 27:r=!0,d.next=38;break;case 30:return d.prev=30,d.t0=d.catch(4),s=d.t0.message||Object(B.__)("An error occurred."),u=d.t0 instanceof Error,(b={folder_exists:Object(B.__)("This block is already installed. Try reloading the page."),unable_to_connect_to_filesystem:Object(B.__)("Error installing block. You can reload the page and try again.")})[d.t0.code]&&(u=!0,s=b[d.t0.code]),d.next=38,W(t,s,u);case 38:return d.next=40,U(e.id,!1);case 40:return d.abrupt("return",r);case 41:case"end":return d.stop()}}),D,null,[[4,30]])}function z(e){return E.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,Object(l.apiFetch)({url:L(e),data:{status:"inactive"},method:"PUT"});case 3:return t.next=5,Object(l.apiFetch)({url:L(e),method:"DELETE"});case 5:return t.next=7,K(e);case 7:t.next=13;break;case 9:return t.prev=9,t.t0=t.catch(0),t.next=13,Object(l.dispatch)("core/notices","createErrorNotice",t.t0.message||Object(B.__)("An error occurred."));case 13:case"end":return t.stop()}}),C,null,[[0,9]])}function H(e){return{type:"ADD_INSTALLED_BLOCK_TYPE",item:e}}function K(e){return{type:"REMOVE_INSTALLED_BLOCK_TYPE",item:e}}function U(e,t){return{type:"SET_INSTALLING_BLOCK",blockId:e,isInstalling:t}}function W(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 Y(e){return{type:"CLEAR_ERROR_NOTICE",blockId:e}}var G={getDownloadableBlocks:E.a.mark((function e(t){var n,r;return E.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,M(t);case 5:return e.next=7,Object(l.apiFetch)({path:"wp/v2/block-directory/search?term=".concat(t)});case 7:return n=e.sent,r=n.map((function(e){return Object(b.mapKeys)(e,(function(e,t){return Object(b.camelCase)(t)}))})),e.next=11,F(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 $(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 q(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?$(Object(n),!0).forEach((function(t){o(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):$(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var J={reducer:p,selectors:r,actions:c,controls:q(q({},l.controls),I),resolvers:G},Q=(Object(a.registerStore)("core/block-directory",J),n(0)),X=n(63),Z=n(26),ee=n(9);function te(){var e=Object(a.useDispatch)("core/block-directory").uninstallBlockType,t=Object(a.useSelect)((function(e){var t=e("core/editor"),n=t.isAutosavingPost;return(0,t.isSavingPost)()&&!n()}),[]),n=Object(a.useSelect)((function(e){return e("core/block-directory").getUnusedBlockTypes()}),[]);return Object(Q.useEffect)((function(){t&&n.length&&n.forEach((function(t){e(t),Object(ee.unregisterBlockType)(t.name)}))}),[t]),null}function ne(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e)){var n=[],r=!0,c=!1,o=void 0;try{for(var a,l=e[Symbol.iterator]();!(r=(a=l.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){c=!0,o=e}finally{try{r||null==l.return||l.return()}finally{if(c)throw o}}return n}}(e,t)||s(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var re=n(5),ce=n(10),oe=n(3),ae=n(48);var le=function(e){var t=e.author,n=e.authorBlockCount,r=e.authorBlockRating;return Object(Q.createElement)(Q.Fragment,null,Object(Q.createElement)("span",{className:"block-directory-downloadable-block-author-info__content-author"},Object(B.sprintf)(
2
  /* translators: %s: author name. */
3
- Object(B.__)("Authored by %s"),t)),Object(Q.createElement)("span",{className:"block-directory-downloadable-block-author-info__content"},r>0?Object(B.sprintf)(
4
  /* translators: 1: number of blocks. 2: average rating. */
5
- Object(B._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(B.sprintf)(
6
  /* translators: 1: number of blocks. */
7
- Object(B._n)("This author has %1$d block.","This author has %1$d blocks.",n),n)))},ie=n(71),se=n(144),ue=n(180),be=n(6),de=Object(Q.createElement)(be.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(Q.createElement)(be.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"})),fe=n(181);var pe=function(e){var t=e.rating,n=.5*Math.round(t/.5),r=Math.floor(t),c=Math.ceil(t-r),o=5-(r+c);return Object(Q.createElement)("div",{"aria-label":Object(B.sprintf)(
8
  /* translators: %s: number of stars. */
9
- Object(B.__)("%s out of 5 stars"),n)},Object(b.times)(r,(function(e){return Object(Q.createElement)(se.a,{key:"full_stars_".concat(e),icon:ue.a,size:16})})),Object(b.times)(c,(function(e){return Object(Q.createElement)(se.a,{key:"half_stars_".concat(e),icon:de,size:16})})),Object(b.times)(o,(function(e){return Object(Q.createElement)(se.a,{key:"empty_stars_".concat(e),icon:fe.a,size:16})})))},Oe=function(e){var t=e.rating,n=e.ratingCount;return Object(Q.createElement)("div",{className:"block-directory-block-ratings"},Object(Q.createElement)(pe,{rating:t}),Object(Q.createElement)("span",{className:"block-directory-block-ratings__rating-count","aria-label":Object(B.sprintf)(// translators: %d: number of ratings (number).
10
- Object(B._n)("%d total rating","%d total ratings",n),n)},"(",n,")"))};var me=function(e){var t=e.icon,n=e.title;return Object(Q.createElement)("div",{className:"block-directory-downloadable-block-icon"},null!==t.match(/\.(jpeg|jpg|gif|png|svg)(?:\?.*)?$/)?Object(Q.createElement)("img",{src:t,alt:Object(B.sprintf)(// translators: %s: Name of the plugin e.g: "Akismet".
11
- Object(B.__)("%s block icon"),n)}):Object(Q.createElement)(re.BlockIcon,{icon:t,showColors:!0}))};var je=function(e){var t=e.icon,n=e.title,r=e.rating,c=e.ratingCount,o=e.isLoading,a=void 0!==o&&o,l=e.isInstallable,i=void 0===l||l,s=e.onClick;return Object(Q.createElement)("div",{className:"block-directory-downloadable-block-header__row"},Object(Q.createElement)(me,{icon:t,title:n}),Object(Q.createElement)("div",{className:"block-directory-downloadable-block-header__column"},Object(Q.createElement)("h2",{className:"block-directory-downloadable-block-header__title"},Object(ie.decodeEntities)(n)),Object(Q.createElement)(Oe,{rating:r,ratingCount:c})),Object(Q.createElement)(oe.Button,{isSecondary:!0,isBusy:a,disabled:a||!i,onClick:function(e){e.preventDefault(),!a&&i&&s()}},a?Object(B.__)("Adding…"):Object(B.__)("Add block")))},ke=Object(Q.createElement)(be.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"-2 -2 24 24"},Object(Q.createElement)(be.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(286);var ye=function(e){var t,n=e.activeInstalls,r=e.description,c=e.humanizedUpdated;return t=n>1e6?Object(B.sprintf)(
12
  /* translators: %d: number of active installations. */
13
- Object(B.__)("%d+ Million active installations"),Math.floor(n/1e6)):0===n?Object(B.__)("Less than 10 active installations"):Object(B.sprintf)(
14
  /* translators: %d: number of active installations. */
15
- Object(B.__)("%d+ active installations"),n),Object(Q.createElement)(Q.Fragment,null,Object(Q.createElement)("p",{className:"block-directory-downloadable-block-info__content"},Object(ie.decodeEntities)(r)),Object(Q.createElement)("div",{className:"block-directory-downloadable-block-info__meta"},Object(Q.createElement)(se.a,{className:"block-directory-downloadable-block-info__icon",icon:ke}),t),Object(Q.createElement)("div",{className:"block-directory-downloadable-block-info__meta"},Object(Q.createElement)(se.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(B.sprintf)(Object(B.__)("Updated %s"),c)))},ve=function(e){var t=e.block,n=e.onClick,r=Object(a.useSelect)((function(e){return e("core/block-directory").getErrorNoticeForBlock(t.id)}),[t]);return r?Object(Q.createElement)(oe.Notice,{status:"error",isDismissible:!1,className:"block-directory-downloadable-block-notice"},Object(Q.createElement)("div",{className:"block-directory-downloadable-block-notice__content"},r.message),Object(Q.createElement)(oe.Button,{isSmall:!0,isPrimary:!0,onClick:function(){if(r.isFatal)return window.location.reload(),!1;n(t)}},r.isFatal?Object(B.__)("Reload"):Object(B.__)("Retry"))):null};function ge(e){var t=e.item,n=e.onClick,r=Object(a.useSelect)((function(e){var n=e("core/block-directory"),r=n.isInstalling,c=(0,n.getErrorNoticeForBlock)(t.id),o=c&&c.isFatal;return{isLoading:r(t.id),isInstallable:!o}}),[t]),c=r.isLoading,o=r.isInstallable,l=t.icon,i=t.title,s=t.description,u=t.rating,b=t.activeInstalls,d=t.ratingCount,f=t.author,p=t.humanizedUpdated,O=t.authorBlockCount,m=t.authorBlockRating;return Object(Q.createElement)("li",{className:"block-directory-downloadable-block-list-item"},Object(Q.createElement)("article",{className:"block-directory-downloadable-block-list-item__panel"},Object(Q.createElement)("header",{className:"block-directory-downloadable-block-list-item__header"},Object(Q.createElement)(je,{icon:l,onClick:n,title:i,rating:u,ratingCount:d,isLoading:c,isInstallable:o})),Object(Q.createElement)("section",{className:"block-directory-downloadable-block-list-item__body"},Object(Q.createElement)(ve,{onClick:n,block:t}),Object(Q.createElement)(ye,{activeInstalls:b,description:s,humanizedUpdated:p})),Object(Q.createElement)("footer",{className:"block-directory-downloadable-block-list-item__footer"},Object(Q.createElement)(le,{author:f,authorBlockCount:O,authorBlockRating:m}))))}var we=function(e){var t=e.items,n=e.onHover,r=void 0===n?b.noop:n,c=e.onSelect,o=Object(a.useDispatch)("core/block-directory").installBlockType,l=Object(a.useDispatch)("core/edit-post").setIsInserterOpened;return t.length?Object(Q.createElement)("ul",{role:"list",className:"block-directory-downloadable-blocks-list"},t.map((function(e){return Object(Q.createElement)(ge,{key:e.id,onClick:function(){o(e).then((function(t){t&&(c(e),l(!1))})),r(null)},item:e})}))):null};var _e=Object(ce.compose)([Object(a.withSelect)((function(e,t){var n=t.filterValue,r=e("core/block-directory"),c=r.getDownloadableBlocks,o=r.isRequestingDownloadableBlocks,a=e("core").canUser("read","block-directory/search");return{downloadableItems:a?c(n):[],hasPermission:a,isLoading:o(n)}}))])((function(e){var t=e.downloadableItems,n=e.onSelect,r=e.onHover,c=e.hasPermission,o=e.isLoading,a=e.isWaiting,l=Object(ce.useDebounce)(ae.speak,500);return!1===c?(l(Object(B.__)("No blocks found in your library.")),Object(Q.createElement)("p",{className:"block-directory-downloadable-blocks-panel__description has-no-results"},Object(B.__)("No blocks found in your library."))):void 0===c||o||a?Object(Q.createElement)("p",{className:"block-directory-downloadable-blocks-panel__description has-no-results"},Object(Q.createElement)(oe.Spinner,null)):t.length?(l(Object(B.sprintf)(
17
  /* translators: %s: number of available blocks. */
18
- Object(B._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(Q.createElement)(Q.Fragment,null,Object(Q.createElement)("p",{className:"block-directory-downloadable-blocks-panel__description"},Object(B.__)("No blocks found in your library. These blocks can be downloaded and installed:")),Object(Q.createElement)(we,{items:t,onSelect:n,onHover:r}))):Object(Q.createElement)("p",{className:"block-directory-downloadable-blocks-panel__description has-no-results"},Object(B.__)("No blocks found in your library."))}));var Ee=function(){var e=ne(Object(Q.useState)(""),2),t=e[0],n=e[1],r=Object(b.debounce)(n,400);return Object(Q.createElement)(re.__experimentalInserterMenuExtension,null,(function(e){var n=e.onSelect,c=e.onHover,o=e.filterValue;return e.hasItems||!o?null:(t!==o&&r(o),Object(Q.createElement)(_e,{onSelect:n,onHover:c,filterValue:t,isWaiting:o!==t}))}))},Be=n(262),xe=n(156);function Se(e){var t=e.items;return t.length?Object(Q.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(Q.createElement)("li",{key:n,className:"block-directory-compact-list__item"},Object(Q.createElement)(me,{icon:t,title:r}),Object(Q.createElement)("div",{className:"block-directory-compact-list__item-details"},Object(Q.createElement)("div",{className:"block-directory-compact-list__item-title"},r),Object(Q.createElement)("div",{className:"block-directory-compact-list__item-author"},Object(B.sprintf)(
19
  /* translators: %s: Name of the block author. */
20
- Object(B.__)("By %s"),c))))}))):null}function Pe(){var e=Object(a.useSelect)((function(e){return e("core/block-directory").getNewBlockTypes()}),[]);return e.length?Object(Q.createElement)(Be.PluginPrePublishPanel,{icon:xe.a,title:Object(B.sprintf)(// translators: %d: number of blocks (number).
21
- Object(B._n)("Added: %d block","Added: %d blocks",e.length),e.length),initialOpen:!0},Object(Q.createElement)("p",{className:"installed-blocks-pre-publish-panel__copy"},Object(B._n)("The following block has been added to your site.","The following blocks have been added to your site.",e.length)),Object(Q.createElement)(Se,{items:e})):null}function Ne(e){var t=e.attributes,n=e.block,r=e.clientId,c=Object(a.useSelect)((function(e){return e("core/block-directory").isInstalling(n.id)})),o=Object(a.useDispatch)("core/block-directory").installBlockType,l=Object(a.useDispatch)("core/block-editor").replaceBlock;return Object(Q.createElement)(oe.Button,{onClick:function(){return o(n).then((function(e){if(e){var c=Object(ee.getBlockType)(n.name),o=ne(Object(ee.parse)(t.originalContent),1)[0];o&&l(r,Object(ee.createBlock)(c.name,o.attributes,o.innerBlocks))}}))},disabled:c,isBusy:c,isPrimary:!0},Object(B.sprintf)(
22
  /* translators: %s: block name */
23
- Object(B.__)("Install %s"),n.title))}var Te=function(e){return function(t){var n=t.attributes,r=n.originalName,c=n.originalUndelimitedContent,o=Object(a.useSelect)((function(e){var t=(0,e("core/block-directory").getDownloadableBlocks)("block:"+r).filter((function(e){var t=e.name;return r===t}));return{hasPermission:e("core").canUser("read","block-directory/search"),block:t.length&&t[0]}}),[r]),l=o.block,i=o.hasPermission,s=Object(a.useDispatch)("core/block-editor").replaceBlock;if(!i||!l)return Object(Q.createElement)(e,t);var u=!!c,b=Object(ee.getBlockType)("core/html"),d=Object(B.sprintf)(
24
  /* translators: %s: block name */
25
- Object(B.__)("Your site doesn’t include support for the %s block. You can try installing the block or remove it entirely."),l.title||r),f=[Object(Q.createElement)(Ne,{key:"install",block:l,attributes:t.attributes,clientId:t.clientId})];return u&&b&&(d=Object(B.sprintf)(
26
  /* translators: %s: block name */
27
- Object(B.__)("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."),l.title||r),f.push(Object(Q.createElement)(oe.Button,{key:"convert",onClick:function(){s(t.clientId,Object(ee.createBlock)("core/html",{content:c}))},isLink:!0},Object(B.__)("Keep as HTML")))),Object(Q.createElement)(Q.Fragment,null,Object(Q.createElement)(re.Warning,{actions:f},d),Object(Q.createElement)(Q.RawHTML,null,c))}};Object(X.registerPlugin)("block-directory",{render:function(){return Object(Q.createElement)(Q.Fragment,null,Object(Q.createElement)(te,null),Object(Q.createElement)(Ee,null),Object(Q.createElement)(Pe,null))}}),Object(Z.addFilter)("blocks.registerBlockType","block-directory/fallback",(function(e,t){return"core/missing"!==t||(e.edit=Te(e.edit)),e}))},48:function(e,t){!function(){e.exports=this.wp.a11y}()},5:function(e,t){!function(){e.exports=this.wp.blockEditor}()},6:function(e,t){!function(){e.exports=this.wp.primitives}()},63:function(e,t){!function(){e.exports=this.wp.plugins}()},71:function(e,t){!function(){e.exports=this.wp.htmlEntities}()},78:function(e,t){!function(){e.exports=this.wp.notices}()},9:function(e,t){!function(){e.exports=this.wp.blocks}()}});
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=411)}({0:function(e,t){e.exports=window.wp.element},1:function(e,t){e.exports=window.wp.i18n},12:function(e,t){e.exports=window.wp.blocks},13:function(e,t){e.exports=window.wp.compose},131:function(e,t,n){"use strict";var r=n(6),c=n(15),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 c}));var r=n(45);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}},16:function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var r=n(27);var c=n(38),o=n(29);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.")}()}},160: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},18:function(e,t){e.exports=window.regeneratorRuntime},180: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},181: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},2:function(e,t){e.exports=window.lodash},261:function(e,t){e.exports=window.wp.editPost},27: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}))},286: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},29:function(e,t,n){"use strict";n.d(t,"a",(function(){return c}));var r=n(27);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}}},3:function(e,t){e.exports=window.wp.components},32:function(e,t){e.exports=window.wp.hooks},37: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}))},38: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}))},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}))},41:function(e,t){e.exports=window.wp.apiFetch},411:function(e,t,n){"use strict";n.r(t);var r={};n.r(r),n.d(r,"isRequestingDownloadableBlocks",(function(){return O})),n.d(r,"getDownloadableBlocks",(function(){return p})),n.d(r,"getInstalledBlockTypes",(function(){return m})),n.d(r,"getNewBlockTypes",(function(){return j})),n.d(r,"getUnusedBlockTypes",(function(){return k})),n.d(r,"isInstalling",(function(){return y})),n.d(r,"getErrorNotices",(function(){return v})),n.d(r,"getErrorNoticeForBlock",(function(){return w}));var c={};n.r(c),n.d(c,"fetchDownloadableBlocks",(function(){return A})),n.d(c,"receiveDownloadableBlocks",(function(){return R})),n.d(c,"installBlockType",(function(){return M})),n.d(c,"uninstallBlockType",(function(){return F})),n.d(c,"addInstalledBlockType",(function(){return V})),n.d(c,"removeInstalledBlockType",(function(){return z})),n.d(c,"setIsInstalling",(function(){return H})),n.d(c,"setErrorNotice",(function(){return K})),n.d(c,"clearErrorNotice",(function(){return U}));n(84);var o=n(6),a=n(4),i=n(59),l=n(16),s=n(2);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 b(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(o.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}var d=Object(a.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 b(b({},e),{},Object(o.a)({},t.filterValue,{isRequesting:!0}));case"RECEIVE_DOWNLOADABLE_BLOCKS":return b(b({},e),{},Object(o.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 b(b({},e),{},{installedBlockTypes:[].concat(Object(l.a)(e.installedBlockTypes),[t.item])});case"REMOVE_INSTALLED_BLOCK_TYPE":return b(b({},e),{},{installedBlockTypes:e.installedBlockTypes.filter((function(e){return e.name!==t.item.name}))});case"SET_INSTALLING_BLOCK":return b(b({},e),{},{isInstalling:b(b({},e.isInstalling),{},Object(o.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 b(b({},e),{},Object(o.a)({},t.blockId,{message:t.message,isFatal:t.isFatal}));case"CLEAR_ERROR_NOTICE":return Object(s.omit)(e,t.blockId)}return e}});function f(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(f(e,t[n].innerBlocks))return!0;return!1}function O(e,t){return!(!e.downloadableBlocks[t]||!e.downloadableBlocks[t].isRequesting)&&e.downloadableBlocks[t].isRequesting}function p(e,t){return e.downloadableBlocks[t]&&e.downloadableBlocks[t].results?e.downloadableBlocks[t].results:[]}function m(e){return e.blockManagement.installedBlockTypes}var j=Object(a.createRegistrySelector)((function(e){return function(t){var n=e("core/block-editor").getBlocks();return m(t).filter((function(e){return f(e,n)}))}})),k=Object(a.createRegistrySelector)((function(e){return function(t){var n=e("core/block-editor").getBlocks();return m(t).filter((function(e){return!f(e,n)}))}}));function y(e,t){return e.blockManagement.isInstalling[t]||!1}function v(e){return e.errorNotices}function w(e,t){return e.errorNotices[t]}var h=n(18),g=n.n(h),_=n(1),E=n(37),B=n(41),x=n.n(B),S=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 P(e){return{type:"LOAD_ASSETS",assets:e}}var N={LOAD_ASSETS:function(){return x()({url:document.location.href,parse:!1}).then((function(e){return e.text()})).then((function(e){var t=(new window.DOMParser).parseFromString(e,"text/html"),n=Array.from(t.querySelectorAll('link[rel="stylesheet"],script')).filter((function(e){return e.id&&!document.getElementById(e.id)}));return new Promise(function(){var e=Object(E.a)(g.a.mark((function e(t,r){var c;return g.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:e.t0=g.a.keys(n);case 1:if((e.t1=e.t0()).done){e.next=13;break}return c=e.t1.value,e.prev=3,e.next=6,S(n[c]);case 6:e.next=11;break;case 8:e.prev=8,e.t2=e.catch(3),r(e.t2);case 11:e.next=1;break;case 13:t();case 14:case"end":return e.stop()}}),e,null,[[3,8]])})));return function(t,n){return e.apply(this,arguments)}}())}))}};function T(e){if(!e)return!1;var t=e.links["wp:plugin"]||e.links.self;return!(!t||!t.length)&&t[0].href}var I=g.a.mark(M),L=g.a.mark(F);function D(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?D(Object(n),!0).forEach((function(t){Object(o.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):D(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function A(e){return{type:"FETCH_DOWNLOADABLE_BLOCKS",filterValue:e}}function R(e,t){return{type:"RECEIVE_DOWNLOADABLE_BLOCKS",downloadableBlocks:e,filterValue:t}}function M(e){var t,n,r,c,o,l,s,u,b;return g.a.wrap((function(d){for(;;)switch(d.prev=d.next){case 0:return t=e.id,n=e.assets,r=!1,d.next=4,U(t);case 4:return d.prev=4,d.next=7,H(e.id,!0);case 7:if(c=T(e),o={},!c){d.next=14;break}return d.next=12,Object(i.apiFetch)({url:c,data:{status:"active"},method:"PUT"});case 12:d.next=18;break;case 14:return d.next=16,Object(i.apiFetch)({path:"wp/v2/plugins",data:{slug:e.id,status:"active"},method:"POST"});case 16:l=d.sent,o=l._links;case 18:return d.next=20,V(C(C({},e),{},{links:C(C({},e.links),o)}));case 20:return d.next=22,P(n);case 22:return d.next=24,a.controls.select("core/blocks","getBlockTypes");case 24:if(d.sent.some((function(t){return t.name===e.name}))){d.next=27;break}throw new Error(Object(_.__)("Error registering block. Try reloading the page."));case 27:r=!0,d.next=38;break;case 30:return d.prev=30,d.t0=d.catch(4),s=d.t0.message||Object(_.__)("An error occurred."),u=d.t0 instanceof Error,(b={folder_exists:Object(_.__)("This block is already installed. Try reloading the page."),unable_to_connect_to_filesystem:Object(_.__)("Error installing block. You can reload the page and try again.")})[d.t0.code]&&(u=!0,s=b[d.t0.code]),d.next=38,K(t,s,u);case 38:return d.next=40,H(e.id,!1);case 40:return d.abrupt("return",r);case 41:case"end":return d.stop()}}),I,null,[[4,30]])}function F(e){return g.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,Object(i.apiFetch)({url:T(e),data:{status:"inactive"},method:"PUT"});case 3:return t.next=5,Object(i.apiFetch)({url:T(e),method:"DELETE"});case 5:return t.next=7,z(e);case 7:t.next=13;break;case 9:return t.prev=9,t.t0=t.catch(0),t.next=13,a.controls.dispatch("core/notices","createErrorNotice",t.t0.message||Object(_.__)("An error occurred."));case 13:case"end":return t.stop()}}),L,null,[[0,9]])}function V(e){return{type:"ADD_INSTALLED_BLOCK_TYPE",item:e}}function z(e){return{type:"REMOVE_INSTALLED_BLOCK_TYPE",item:e}}function H(e,t){return{type:"SET_INSTALLING_BLOCK",blockId:e,isInstalling:t}}function K(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 U(e){return{type:"CLEAR_ERROR_NOTICE",blockId:e}}var W={getDownloadableBlocks:g.a.mark((function e(t){var n,r;return g.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,A(t);case 5:return e.next=7,Object(i.apiFetch)({path:"wp/v2/block-directory/search?term=".concat(t)});case 7:return n=e.sent,r=n.map((function(e){return Object(s.mapKeys)(e,(function(e,t){return Object(s.camelCase)(t)}))})),e.next=11,R(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 Y(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 G(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Y(Object(n),!0).forEach((function(t){Object(o.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Y(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var $={reducer:d,selectors:r,actions:c,controls:G(G({},i.controls),N),resolvers:W},q=(Object(a.registerStore)("core/block-directory",$),n(0)),J=n(68),Q=n(32),X=n(12);function Z(){var e=Object(a.useDispatch)("core/block-directory").uninstallBlockType,t=Object(a.useSelect)((function(e){var t=e("core/editor"),n=t.isAutosavingPost;return(0,t.isSavingPost)()&&!n()}),[]),n=Object(a.useSelect)((function(e){return e("core/block-directory").getUnusedBlockTypes()}),[]);return Object(q.useEffect)((function(){t&&n.length&&n.forEach((function(t){e(t),Object(X.unregisterBlockType)(t.name)}))}),[t]),null}var ee=n(9),te=n(5),ne=n(13),re=n(3),ce=n(53);var oe=function(e){var t=e.author,n=e.authorBlockCount,r=e.authorBlockRating;return Object(q.createElement)(q.Fragment,null,Object(q.createElement)("span",{className:"block-directory-downloadable-block-author-info__content-author"},Object(_.sprintf)(
2
  /* translators: %s: author name. */
3
+ Object(_.__)("Authored by %s"),t)),Object(q.createElement)("span",{className:"block-directory-downloadable-block-author-info__content"},r>0?Object(_.sprintf)(
4
  /* translators: 1: number of blocks. 2: average rating. */
5
+ Object(_._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(_.sprintf)(
6
  /* translators: 1: number of blocks. */
7
+ Object(_._n)("This author has %1$d block.","This author has %1$d blocks.",n),n)))},ae=n(76),ie=n(131),le=n(180),se=n(7),ue=Object(q.createElement)(se.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(q.createElement)(se.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"})),be=n(181);var de=function(e){var t=e.rating,n=.5*Math.round(t/.5),r=Math.floor(t),c=Math.ceil(t-r),o=5-(r+c);return Object(q.createElement)("div",{"aria-label":Object(_.sprintf)(
8
  /* translators: %s: number of stars. */
9
+ Object(_.__)("%s out of 5 stars"),n)},Object(s.times)(r,(function(e){return Object(q.createElement)(ie.a,{key:"full_stars_".concat(e),icon:le.a,size:16})})),Object(s.times)(c,(function(e){return Object(q.createElement)(ie.a,{key:"half_stars_".concat(e),icon:ue,size:16})})),Object(s.times)(o,(function(e){return Object(q.createElement)(ie.a,{key:"empty_stars_".concat(e),icon:be.a,size:16})})))},fe=function(e){var t=e.rating,n=e.ratingCount;return Object(q.createElement)("div",{className:"block-directory-block-ratings"},Object(q.createElement)(de,{rating:t}),Object(q.createElement)("span",{className:"block-directory-block-ratings__rating-count","aria-label":Object(_.sprintf)(// translators: %d: number of ratings (number).
10
+ Object(_._n)("%d total rating","%d total ratings",n),n)},"(",n,")"))};var Oe=function(e){var t=e.icon,n=e.title;return Object(q.createElement)("div",{className:"block-directory-downloadable-block-icon"},null!==t.match(/\.(jpeg|jpg|gif|png|svg)(?:\?.*)?$/)?Object(q.createElement)("img",{src:t,alt:Object(_.sprintf)(// translators: %s: Name of the plugin e.g: "Akismet".
11
+ Object(_.__)("%s block icon"),n)}):Object(q.createElement)(te.BlockIcon,{icon:t,showColors:!0}))};var pe=function(e){var t=e.icon,n=e.title,r=e.rating,c=e.ratingCount,o=e.isLoading,a=void 0!==o&&o,i=e.isInstallable,l=void 0===i||i,s=e.onClick;return Object(q.createElement)("div",{className:"block-directory-downloadable-block-header__row"},Object(q.createElement)(Oe,{icon:t,title:n}),Object(q.createElement)("div",{className:"block-directory-downloadable-block-header__column"},Object(q.createElement)("h2",{className:"block-directory-downloadable-block-header__title"},Object(ae.decodeEntities)(n)),Object(q.createElement)(fe,{rating:r,ratingCount:c})),Object(q.createElement)(re.Button,{isSecondary:!0,isBusy:a,disabled:a||!l,onClick:function(e){e.preventDefault(),!a&&l&&s()}},a?Object(_.__)("Adding…"):Object(_.__)("Add block")))},me=Object(q.createElement)(se.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"-2 -2 24 24"},Object(q.createElement)(se.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"})),je=n(286);var ke=function(e){var t,n=e.activeInstalls,r=e.description,c=e.humanizedUpdated;return t=n>1e6?Object(_.sprintf)(
12
  /* translators: %d: number of active installations. */
13
+ Object(_.__)("%d+ Million active installations"),Math.floor(n/1e6)):0===n?Object(_.__)("Less than 10 active installations"):Object(_.sprintf)(
14
  /* translators: %d: number of active installations. */
15
+ Object(_.__)("%d+ active installations"),n),Object(q.createElement)(q.Fragment,null,Object(q.createElement)("p",{className:"block-directory-downloadable-block-info__content"},Object(ae.decodeEntities)(r)),Object(q.createElement)("div",{className:"block-directory-downloadable-block-info__meta"},Object(q.createElement)(ie.a,{className:"block-directory-downloadable-block-info__icon",icon:me}),t),Object(q.createElement)("div",{className:"block-directory-downloadable-block-info__meta"},Object(q.createElement)(ie.a,{className:"block-directory-downloadable-block-info__icon",icon:je.a}),// translators: %s: Humanized date of last update e.g: "2 months ago".
16
+ Object(_.sprintf)(Object(_.__)("Updated %s"),c)))},ye=function(e){var t=e.block,n=e.onClick,r=Object(a.useSelect)((function(e){return e("core/block-directory").getErrorNoticeForBlock(t.id)}),[t]);return r?Object(q.createElement)(re.Notice,{status:"error",isDismissible:!1,className:"block-directory-downloadable-block-notice"},Object(q.createElement)("div",{className:"block-directory-downloadable-block-notice__content"},r.message),Object(q.createElement)(re.Button,{isSmall:!0,isPrimary:!0,onClick:function(){if(r.isFatal)return window.location.reload(),!1;n(t)}},r.isFatal?Object(_.__)("Reload"):Object(_.__)("Retry"))):null};function ve(e){var t=e.item,n=e.onClick,r=Object(a.useSelect)((function(e){var n=e("core/block-directory"),r=n.isInstalling,c=(0,n.getErrorNoticeForBlock)(t.id),o=c&&c.isFatal;return{isLoading:r(t.id),isInstallable:!o}}),[t]),c=r.isLoading,o=r.isInstallable,i=t.icon,l=t.title,s=t.description,u=t.rating,b=t.activeInstalls,d=t.ratingCount,f=t.author,O=t.humanizedUpdated,p=t.authorBlockCount,m=t.authorBlockRating;return Object(q.createElement)("li",{className:"block-directory-downloadable-block-list-item"},Object(q.createElement)("article",{className:"block-directory-downloadable-block-list-item__panel"},Object(q.createElement)("header",{className:"block-directory-downloadable-block-list-item__header"},Object(q.createElement)(pe,{icon:i,onClick:n,title:l,rating:u,ratingCount:d,isLoading:c,isInstallable:o})),Object(q.createElement)("section",{className:"block-directory-downloadable-block-list-item__body"},Object(q.createElement)(ye,{onClick:n,block:t}),Object(q.createElement)(ke,{activeInstalls:b,description:s,humanizedUpdated:O})),Object(q.createElement)("footer",{className:"block-directory-downloadable-block-list-item__footer"},Object(q.createElement)(oe,{author:f,authorBlockCount:p,authorBlockRating:m}))))}var we=function(e){var t=e.items,n=e.onHover,r=void 0===n?s.noop:n,c=e.onSelect,o=Object(a.useDispatch)("core/block-directory").installBlockType,i=Object(a.useDispatch)("core/edit-post").setIsInserterOpened;return t.length?Object(q.createElement)("ul",{role:"list",className:"block-directory-downloadable-blocks-list"},t.map((function(e){return Object(q.createElement)(ve,{key:e.id,onClick:function(){o(e).then((function(t){t&&(c(e),i(!1))})),r(null)},item:e})}))):null};var he=Object(ne.compose)([Object(a.withSelect)((function(e,t){var n=t.filterValue,r=e("core/block-directory"),c=r.getDownloadableBlocks,o=r.isRequestingDownloadableBlocks,a=e("core").canUser("read","block-directory/search");return{downloadableItems:a?c(n):[],hasPermission:a,isLoading:o(n)}}))])((function(e){var t=e.downloadableItems,n=e.onSelect,r=e.onHover,c=e.hasPermission,o=e.isLoading,a=e.isWaiting,i=Object(ne.useDebounce)(ce.speak,500);return!1===c?(i(Object(_.__)("No blocks found in your library.")),Object(q.createElement)("p",{className:"block-directory-downloadable-blocks-panel__description has-no-results"},Object(_.__)("No blocks found in your library."))):void 0===c||o||a?Object(q.createElement)("p",{className:"block-directory-downloadable-blocks-panel__description has-no-results"},Object(q.createElement)(re.Spinner,null)):t.length?(i(Object(_.sprintf)(
17
  /* translators: %s: number of available blocks. */
18
+ Object(_._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(q.createElement)(q.Fragment,null,Object(q.createElement)("p",{className:"block-directory-downloadable-blocks-panel__description"},Object(_.__)("No blocks found in your library. These blocks can be downloaded and installed:")),Object(q.createElement)(we,{items:t,onSelect:n,onHover:r}))):Object(q.createElement)("p",{className:"block-directory-downloadable-blocks-panel__description has-no-results"},Object(_.__)("No blocks found in your library."))}));var ge=function(){var e=Object(q.useState)(""),t=Object(ee.a)(e,2),n=t[0],r=t[1],c=Object(s.debounce)(r,400);return Object(q.createElement)(te.__experimentalInserterMenuExtension,null,(function(e){var t=e.onSelect,r=e.onHover,o=e.filterValue;return e.hasItems||!o?null:(n!==o&&c(o),Object(q.createElement)(he,{onSelect:t,onHover:r,filterValue:n,isWaiting:o!==n}))}))},_e=n(261),Ee=n(160);function Be(e){var t=e.items;return t.length?Object(q.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(q.createElement)("li",{key:n,className:"block-directory-compact-list__item"},Object(q.createElement)(Oe,{icon:t,title:r}),Object(q.createElement)("div",{className:"block-directory-compact-list__item-details"},Object(q.createElement)("div",{className:"block-directory-compact-list__item-title"},r),Object(q.createElement)("div",{className:"block-directory-compact-list__item-author"},Object(_.sprintf)(
19
  /* translators: %s: Name of the block author. */
20
+ Object(_.__)("By %s"),c))))}))):null}function xe(){var e=Object(a.useSelect)((function(e){return e("core/block-directory").getNewBlockTypes()}),[]);return e.length?Object(q.createElement)(_e.PluginPrePublishPanel,{icon:Ee.a,title:Object(_.sprintf)(// translators: %d: number of blocks (number).
21
+ Object(_._n)("Added: %d block","Added: %d blocks",e.length),e.length),initialOpen:!0},Object(q.createElement)("p",{className:"installed-blocks-pre-publish-panel__copy"},Object(_._n)("The following block has been added to your site.","The following blocks have been added to your site.",e.length)),Object(q.createElement)(Be,{items:e})):null}function Se(e){var t=e.attributes,n=e.block,r=e.clientId,c=Object(a.useSelect)((function(e){return e("core/block-directory").isInstalling(n.id)})),o=Object(a.useDispatch)("core/block-directory").installBlockType,i=Object(a.useDispatch)("core/block-editor").replaceBlock;return Object(q.createElement)(re.Button,{onClick:function(){return o(n).then((function(e){if(e){var c=Object(X.getBlockType)(n.name),o=Object(X.parse)(t.originalContent),a=Object(ee.a)(o,1)[0];a&&i(r,Object(X.createBlock)(c.name,a.attributes,a.innerBlocks))}}))},disabled:c,isBusy:c,isPrimary:!0},Object(_.sprintf)(
22
  /* translators: %s: block name */
23
+ Object(_.__)("Install %s"),n.title))}var Pe=function(e){return function(t){var n=t.attributes,r=n.originalName,c=n.originalUndelimitedContent,o=Object(a.useSelect)((function(e){var t=(0,e("core/block-directory").getDownloadableBlocks)("block:"+r).filter((function(e){var t=e.name;return r===t}));return{hasPermission:e("core").canUser("read","block-directory/search"),block:t.length&&t[0]}}),[r]),i=o.block,l=o.hasPermission,s=Object(a.useDispatch)("core/block-editor").replaceBlock;if(!l||!i)return Object(q.createElement)(e,t);var u=!!c,b=Object(X.getBlockType)("core/html"),d=Object(_.sprintf)(
24
  /* translators: %s: block name */
25
+ Object(_.__)("Your site doesn’t include support for the %s block. You can try installing the block or remove it entirely."),i.title||r),f=[Object(q.createElement)(Se,{key:"install",block:i,attributes:t.attributes,clientId:t.clientId})];return u&&b&&(d=Object(_.sprintf)(
26
  /* translators: %s: block name */
27
+ Object(_.__)("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."),i.title||r),f.push(Object(q.createElement)(re.Button,{key:"convert",onClick:function(){s(t.clientId,Object(X.createBlock)("core/html",{content:c}))},isLink:!0},Object(_.__)("Keep as HTML")))),Object(q.createElement)(q.Fragment,null,Object(q.createElement)(te.Warning,{actions:f},d),Object(q.createElement)(q.RawHTML,null,c))}};Object(J.registerPlugin)("block-directory",{render:function(){return Object(q.createElement)(q.Fragment,null,Object(q.createElement)(Z,null),Object(q.createElement)(ge,null),Object(q.createElement)(xe,null))}}),Object(Q.addFilter)("blocks.registerBlockType","block-directory/fallback",(function(e,t){return"core/missing"!==t||(e.edit=Pe(e.edit)),e}))},45: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){e.exports=window.wp.blockEditor},53:function(e,t){e.exports=window.wp.a11y},59:function(e,t){e.exports=window.wp.dataControls},6: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}))},68:function(e,t){e.exports=window.wp.plugins},7:function(e,t){e.exports=window.wp.primitives},76:function(e,t){e.exports=window.wp.htmlEntities},84:function(e,t){e.exports=window.wp.notices},9:function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var r=n(39);var c=n(29),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=[],r=!0,c=!1,o=void 0;try{for(var a,i=e[Symbol.iterator]();!(r=(a=i.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){c=!0,o=e}finally{try{r||null==i.return||i.return()}finally{if(c)throw o}}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', 'react-dom', '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-viewport', 'wp-warning', 'wp-wordcount'), 'version' => '111d02e55937608149e0d53ccb3d5ab2');
1
+ <?php return array('dependencies' => array('lodash', 'react', 'react-dom', '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-viewport', 'wp-warning', 'wp-wordcount'), 'version' => '1eeb7e178f2218ff9d1b26fb9b2d9538');
build/block-editor/index.js CHANGED
@@ -1,83 +1,83 @@
1
- this.wp=this.wp||{},this.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=402)}([function(e,t){!function(){e.exports=this.wp.element}()},function(e,t){!function(){e.exports=this.wp.i18n}()},function(e,t){!function(){e.exports=this.lodash}()},function(e,t){!function(){e.exports=this.wp.components}()},function(e,t){!function(){e.exports=this.wp.data}()},,function(e,t){!function(){e.exports=this.wp.primitives}()},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)}()},function(e,t){!function(){e.exports=this.React}()},function(e,t){!function(){e.exports=this.wp.blocks}()},function(e,t){!function(){e.exports=this.wp.compose}()},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}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 c(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){r(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}function i(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}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}function l(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,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)?a(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}return(n=e[Symbol.iterator]()).next.bind(n)}n.d(t,"a",(function(){return i})),n.d(t,"b",(function(){return c})),n.d(t,"c",(function(){return l}))},function(e,t){!function(){e.exports=this.regeneratorRuntime}()},function(e,t){!function(){e.exports=this.wp.keycodes}()},,,,function(e,t){!function(){e.exports=this.wp.richText}()},function(e,t){!function(){e.exports=this.wp.url}()},,function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(169);var o=n(136),c=n(170);function i(e,t){return Object(r.a)(e)||function(e,t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e)){var n=[],r=!0,o=!1,c=void 0;try{for(var i,a=e[Symbol.iterator]();!(r=(i=a.next()).done)&&(n.push(i.value),!t||n.length!==t);r=!0);}catch(e){o=!0,c=e}finally{try{r||null==a.return||a.return()}finally{if(o)throw c}}return n}}(e,t)||Object(o.a)(e,t)||Object(c.a)()}},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}))},function(e,t,n){e.exports=n(139)()},function(e,t){!function(){e.exports=this.wp.dom}()},,,function(e,t){!function(){e.exports=this.wp.hooks}()},,,,,function(e,t){!function(){e.exports=this.wp.deprecated}()},function(e,t,n){"use strict";function r(e,t){if(null==e)return{};var n,r,o=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}(e,t);if(Object.getOwnPropertySymbols){var c=Object.getOwnPropertySymbols(e);for(r=0;r<c.length;r++)n=c[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}n.d(t,"a",(function(){return r}))},,,,,,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}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 c(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){r(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}function i(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}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}function l(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,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)?a(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}return(n=e[Symbol.iterator]()).next.bind(n)}n.d(t,"a",(function(){return c})),n.d(t,"b",(function(){return i})),n.d(t,"c",(function(){return l}))},,function(e,t,n){"use strict";n.d(t,"a",(function(){return c}));var r=n(8),o=n(52);function c(e){var t=Object(r.useRef)(e);return Object(o.a)((function(){t.current=e})),t}},function(e,t){!function(){e.exports=this.wp.blob}()},function(e,t,n){"use strict";n.d(t,"a",(function(){return l}));var r=n(8),o=n(57);function c(e,t){Object(r.useDebugValue)(e);var n=Object(r.useContext)(o.a);return null!=n[e]?n[e]:t}var i=n(38);var a=n(46);function l(e){var t,n,o,l=(o=e.compose,Array.isArray(o)?o:void 0!==o?[o]:[]),s=function(t,n){if(e.useOptions&&(t=e.useOptions(t,n)),e.name&&(t=function(e,t,n){void 0===t&&(t={}),void 0===n&&(n={});var o="use"+e+"Options";Object(r.useDebugValue)(o);var a=c(o);return a?Object(i.a)(Object(i.a)({},t),a(t,n)):t}(e.name,t,n)),e.compose)for(var o,a=Object(i.c)(l);!(o=a()).done;){t=o.value.__useOptions(t,n)}return t},u=function(t,n,o){if(void 0===t&&(t={}),void 0===n&&(n={}),void 0===o&&(o=!1),o||(t=s(t,n)),e.useProps&&(n=e.useProps(t,n)),e.name&&(n=function(e,t,n){void 0===t&&(t={}),void 0===n&&(n={});var o="use"+e+"Props";Object(r.useDebugValue)(o);var i=c(o);return i?i(t,n):n}(e.name,t,n)),e.compose)if(e.useComposeOptions&&(t=e.useComposeOptions(t,n)),e.useComposeProps)n=e.useComposeProps(t,n);else for(var a,u=Object(i.c)(l);!(a=u()).done;){n=(0,a.value)(t,n,!0)}var d={},f=n||{};for(var b in f)void 0!==f[b]&&(d[b]=f[b]);return d};u.__useOptions=s;var d=l.reduce((function(e,t){return e.push.apply(e,t.__keys||[]),e}),[]);return u.__keys=[].concat(d,(null===(t=e.useState)||void 0===t?void 0:t.__keys)||[],e.keys||[]),u.unstable_propsAreEqual=e.propsAreEqual||(null===(n=l[0])||void 0===n?void 0:n.unstable_propsAreEqual)||a.a,u}},function(e,t,n){"use strict";n.d(t,"a",(function(){return l}));var r=n(8),o=n(38),c=n(72);function i(e,t){for(var n={},r={},o=0,c=Object.keys(e);o<c.length;o++){var i=c[o];t.indexOf(i)>=0?n[i]=e[i]:r[i]=e[i]}return[n,r]}var a=n(46);function l(e){var t,n=e.as,l=e.useHook,s=e.memo,u=e.propsAreEqual,d=void 0===u?null==l?void 0:l.unstable_propsAreEqual:u,f=e.keys,b=void 0===f?(null==l?void 0:l.__keys)||[]:f,p=e.useCreateElement,m=void 0===p?c.a:p,v=function(e,t){var r=e.as,c=void 0===r?n:r,a=Object(o.b)(e,["as"]);if(l){var s,u=i(a,b),d=u[0],f=u[1],p=l(d,Object(o.a)({ref:t},f)),v=p.wrapElement,g=Object(o.b)(p,["wrapElement"]),O=(null===(s=c.render)||void 0===s?void 0:s.__keys)||c.__keys,h=O&&i(a,O)[0],j=h?Object(o.a)(Object(o.a)({},g),h):g,k=m(c,j);return v?v(k):k}return m(c,Object(o.a)({ref:t},a))};return t=v,v=Object(r.forwardRef)(t),s&&(v=function(e,t){return Object(r.memo)(e,t)}(v,d)),v.__keys=b,v.unstable_propsAreEqual=d||a.a,v}},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(o=e[t],!(l=o)||"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}},function(e,t,n){"use strict";function r(e){return e?e.ownerDocument||e:window.document}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";function r(e,t){if(e===t)return!0;if(!e)return!1;if(!t)return!1;if("object"!=typeof e)return!1;if("object"!=typeof t)return!1;var n=Object.keys(e),r=Object.keys(t),o=n.length;if(r.length!==o)return!1;for(var c=0,i=n;c<i.length;c++){var a=i[c];if(e[a]!==t[a])return!1}return!0}n.d(t,"a",(function(){return r}))},,function(e,t){!function(){e.exports=this.wp.a11y}()},function(e,t,n){"use strict";function r(e){return e.target===e.currentTarget}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";n.d(t,"a",(function(){return f})),n.d(t,"b",(function(){return g})),n.d(t,"c",(function(){return p})),n.d(t,"d",(function(){return b})),n.d(t,"e",(function(){return h})),n.d(t,"f",(function(){return s})),n.d(t,"g",(function(){return S}));var r=n(11),o=n(8),c=n(52),i=n(54),a=n(55),l=n(58);function s(e){return e.slice().reverse()}function u(e,t){return Boolean(t.compareDocumentPosition(e)&Node.DOCUMENT_POSITION_PRECEDING)}function d(e,t){return e.findIndex((function(e){return!(!e.ref.current||!t.ref.current)&&u(t.ref.current,e.ref.current)}))}function f(e,t){return t?e.find((function(e){return!e.disabled&&e.id!==t})):e.find((function(e){return!e.disabled}))}function b(e,t){if(t)return null==e?void 0:e.find((function(e){return e.id===t&&!e.disabled}))}function p(e){for(var t,n=[[]],o=function(){var e=t.value,r=n.find((function(t){return!t[0]||t[0].groupId===e.groupId}));r?r.push(e):n.push([e])},c=Object(r.c)(e);!(t=c()).done;)o();return n}function m(e){for(var t,n=0,o=Object(r.c)(e);!(t=o()).done;){var c=t.value.length;c>n&&(n=c)}return n}function v(e){for(var t=p(e),n=m(t),o=[],c=0;c<n;c+=1)for(var i,a=Object(r.c)(t);!(i=a()).done;){var l=i.value;l[c]&&o.push(Object(r.b)(Object(r.b)({},l[c]),{},{groupId:l[c].groupId?""+c:void 0}))}return o}function g(e){for(var t,n=[],o=Object(r.c)(e);!(t=o()).done;){var c=t.value;n.push.apply(n,c)}return n}function O(e){for(var t,n=m(e),o=Object(r.c)(e);!(t=o()).done;){var c=t.value;if(c.length<n)for(var i=0;i<n;i+=1)c[i]||(c[i]={id:"__EMPTY_ITEM__",disabled:!0,ref:{current:null},groupId:c[i-1].groupId})}return e}function h(e,t){var n;return t||null===t?t:e.currentId||null===e.currentId?e.currentId:null===(n=f(e.items||[]))||void 0===n?void 0:n.id}var j={id:null,ref:{current:null}};function k(e,t){return e.filter((function(e){return e.groupId===t}))}var y={horizontal:"vertical",vertical:"horizontal"};function _(e,t,n){return n in e?[].concat(e.slice(0,n),[t],e.slice(n)):[].concat(e,[t])}function E(e){var t=e.slice(),n=!1;return t.sort((function(e,t){var r=e.ref.current,o=t.ref.current;return r&&o&&u(r,o)?(n=!0,-1):0})),n?t:e}function C(e,t){var n=e.unstable_virtual,o=e.rtl,c=e.orientation,i=e.items,l=e.groups,u=e.currentId,m=e.loop,w=e.wrap,S=e.pastIds,I=e.unstable_moves,B=e.initialVirtual,x=e.initialRTL,P=e.initialOrientation,T=e.initialCurrentId,N=e.initialLoop,D=e.initialWrap,R=e.hasSetCurrentId;switch(t.type){case"registerGroup":var A=t.group;if(0===l.length)return Object(r.b)(Object(r.b)({},e),{},{groups:[A]});var M=d(l,A);return Object(r.b)(Object(r.b)({},e),{},{groups:_(l,A,M)});case"unregisterGroup":var L=t.id,F=l.filter((function(e){return e.id!==L}));return F.length===l.length?e:Object(r.b)(Object(r.b)({},e),{},{groups:F});case"registerItem":var V,H=t.item,z=l.find((function(e){var t;return null===(t=e.ref.current)||void 0===t?void 0:t.contains(H.ref.current)})),U=Object(r.b)({groupId:null==z?void 0:z.id},H),G=d(i,U),W=Object(r.b)(Object(r.b)({},e),{},{items:_(i,U,G)});return R||I||void 0!==T?W:Object(r.b)(Object(r.b)({},W),{},{currentId:null===(V=f(W.items))||void 0===V?void 0:V.id});case"unregisterItem":var K=t.id,q=i.filter((function(e){return e.id!==K}));if(q.length===i.length)return e;var $=S.filter((function(e){return e!==K})),Y=Object(r.b)(Object(r.b)({},e),{},{pastIds:$,items:q});if(u&&u===K){var X=h(Object(r.b)(Object(r.b)({},Y),{},{currentId:$[0]}));return Object(r.b)(Object(r.b)({},Y),{},{currentId:X})}return Y;case"move":var Q=t.id;if(void 0===Q)return e;var Z=S.filter((function(e){return e!==u&&e!==Q})),J=u?[u].concat(Z):Z,ee=Object(r.b)(Object(r.b)({},e),{},{pastIds:J});if(null===Q)return Object(r.b)(Object(r.b)({},ee),{},{unstable_moves:I+1,currentId:h(ee,Q)});var te=b(i,Q);return Object(r.b)(Object(r.b)({},ee),{},{unstable_moves:te?I+1:I,currentId:h(ee,null==te?void 0:te.id)});case"next":if(null==u)return C(e,Object(r.b)(Object(r.b)({},t),{},{type:"first"}));var ne=o&&"vertical"!==c,re=ne?s(i):i,oe=re.find((function(e){return e.id===u}));if(!oe)return C(e,Object(r.b)(Object(r.b)({},t),{},{type:"first"}));var ce=!!oe.groupId,ie=re.indexOf(oe),ae=re.slice(ie+1),le=k(ae,oe.groupId);if(t.allTheWay){var se=f(ne?k(re,oe.groupId):s(le));return C(e,Object(r.b)(Object(r.b)({},t),{},{type:"move",id:null==se?void 0:se.id}))}var ue=function(e){return e&&y[e]}(ce?c||"horizontal":c),de=m&&m!==ue,fe=ce&&w&&w!==ue,be=t.hasNullItem||!ce&&de&&null===T;if(de){var pe=f(function(e,t,n){var r=e.findIndex((function(e){return e.id===t}));return[].concat(e.slice(r+1),n?[j]:[],e.slice(0,r))}(fe&&!be?re:k(re,oe.groupId),u,be),u);return C(e,Object(r.b)(Object(r.b)({},t),{},{type:"move",id:null==pe?void 0:pe.id}))}if(fe){var me=f(be?le:ae,u),ve=be?(null==me?void 0:me.id)||null:null==me?void 0:me.id;return C(e,Object(r.b)(Object(r.b)({},t),{},{type:"move",id:ve}))}var ge=f(le,u);return C(e,!ge&&be?Object(r.b)(Object(r.b)({},t),{},{type:"move",id:null}):Object(r.b)(Object(r.b)({},t),{},{type:"move",id:null==ge?void 0:ge.id}));case"previous":var Oe=!!!l.length&&null===T,he=C(Object(r.b)(Object(r.b)({},e),{},{items:s(i)}),Object(r.b)(Object(r.b)({},t),{},{type:"next",hasNullItem:Oe}));return Object(r.b)(Object(r.b)({},he),{},{items:i});case"down":var je=v(g(O(p(i)))),ke=m&&"horizontal"!==m&&null===T,ye=C(Object(r.b)(Object(r.b)({},e),{},{orientation:"vertical",items:je}),Object(r.b)(Object(r.b)({},t),{},{type:"next",hasNullItem:ke}));return Object(r.b)(Object(r.b)({},ye),{},{orientation:c,items:i});case"up":var _e=v(s(g(O(p(i))))),Ee=null===T,Ce=C(Object(r.b)(Object(r.b)({},e),{},{orientation:"vertical",items:_e}),Object(r.b)(Object(r.b)({},t),{},{type:"next",hasNullItem:Ee}));return Object(r.b)(Object(r.b)({},Ce),{},{orientation:c,items:i});case"first":var we=f(i);return C(e,Object(r.b)(Object(r.b)({},t),{},{type:"move",id:null==we?void 0:we.id}));case"last":var Se=C(Object(r.b)(Object(r.b)({},e),{},{items:s(i)}),Object(r.b)(Object(r.b)({},t),{},{type:"first"}));return Object(r.b)(Object(r.b)({},Se),{},{items:i});case"sort":return Object(r.b)(Object(r.b)({},e),{},{items:E(i),groups:E(l)});case"setVirtual":return Object(r.b)(Object(r.b)({},e),{},{unstable_virtual:Object(a.a)(t.virtual,n)});case"setRTL":return Object(r.b)(Object(r.b)({},e),{},{rtl:Object(a.a)(t.rtl,o)});case"setOrientation":return Object(r.b)(Object(r.b)({},e),{},{orientation:Object(a.a)(t.orientation,c)});case"setCurrentId":var Ie=h(Object(r.b)(Object(r.b)({},e),{},{currentId:Object(a.a)(t.currentId,u)}));return Object(r.b)(Object(r.b)({},e),{},{currentId:Ie,hasSetCurrentId:!0});case"setLoop":return Object(r.b)(Object(r.b)({},e),{},{loop:Object(a.a)(t.loop,m)});case"setWrap":return Object(r.b)(Object(r.b)({},e),{},{wrap:Object(a.a)(t.wrap,w)});case"reset":return Object(r.b)(Object(r.b)({},e),{},{unstable_virtual:B,rtl:x,orientation:P,currentId:h(Object(r.b)(Object(r.b)({},e),{},{currentId:T})),loop:N,wrap:D,unstable_moves:0,pastIds:[]});default:throw new Error}}function w(e){return Object(o.useCallback)(e,[])}function S(e){void 0===e&&(e={});var t=Object(i.a)(e),n=t.unstable_virtual,a=void 0!==n&&n,s=t.rtl,u=void 0!==s&&s,d=t.orientation,f=t.currentId,b=t.loop,p=void 0!==b&&b,m=t.wrap,v=void 0!==m&&m,g=Object(r.a)(t,["unstable_virtual","rtl","orientation","currentId","loop","wrap"]),O=Object(o.useReducer)(C,{unstable_virtual:a,rtl:u,orientation:d,items:[],groups:[],currentId:f,loop:p,wrap:v,unstable_moves:0,pastIds:[],initialVirtual:a,initialRTL:u,initialOrientation:d,initialCurrentId:f,initialLoop:p,initialWrap:v}),h=O[0],j=(h.pastIds,h.initialVirtual,h.initialRTL,h.initialOrientation,h.initialCurrentId,h.initialLoop,h.initialWrap,h.hasSetCurrentId,Object(r.a)(h,["pastIds","initialVirtual","initialRTL","initialOrientation","initialCurrentId","initialLoop","initialWrap","hasSetCurrentId"])),k=O[1],y=Object(o.useState)(!1),_=y[0],E=y[1],S=Object(l.a)(g),I=function(){var e=Object(o.useRef)(!1);return Object(c.a)((function(){return function(){e.current=!0}}),[]),e}();return Object(r.b)(Object(r.b)(Object(r.b)({},S),j),{},{unstable_hasActiveWidget:_,unstable_setHasActiveWidget:E,registerItem:w((function(e){I.current||k({type:"registerItem",item:e})})),unregisterItem:w((function(e){I.current||k({type:"unregisterItem",id:e})})),registerGroup:w((function(e){I.current||k({type:"registerGroup",group:e})})),unregisterGroup:w((function(e){I.current||k({type:"unregisterGroup",id:e})})),move:w((function(e){return k({type:"move",id:e})})),next:w((function(e){return k({type:"next",allTheWay:e})})),previous:w((function(e){return k({type:"previous",allTheWay:e})})),up:w((function(e){return k({type:"up",allTheWay:e})})),down:w((function(e){return k({type:"down",allTheWay:e})})),first:w((function(){return k({type:"first"})})),last:w((function(){return k({type:"last"})})),unstable_sort:w((function(){return k({type:"sort"})})),unstable_setVirtual:w((function(e){return k({type:"setVirtual",virtual:e})})),setRTL:w((function(e){return k({type:"setRTL",rtl:e})})),setOrientation:w((function(e){return k({type:"setOrientation",orientation:e})})),setCurrentId:w((function(e){return k({type:"setCurrentId",currentId:e})})),setLoop:w((function(e){return k({type:"setLoop",loop:e})})),setWrap:w((function(e){return k({type:"setWrap",wrap:e})})),reset:w((function(){return k({type:"reset"})}))})}var I=[].concat(l.a.__keys,["unstable_virtual","rtl","orientation","items","groups","currentId","loop","wrap","unstable_moves","unstable_hasActiveWidget","registerItem","unregisterItem","registerGroup","unregisterGroup","move","next","previous","up","down","first","last","unstable_sort","unstable_setVirtual","setRTL","setOrientation","setCurrentId","setLoop","setWrap","reset","unstable_setHasActiveWidget"]);S.__keys=I},function(e,t){!function(){e.exports=this.wp.keyboardShortcuts}()},function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(8),o="undefined"==typeof window?r.useEffect:r.useLayoutEffect},function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(45);function o(e){return Object(r.a)(e).activeElement}},function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(8);function o(e){return Object(r.useState)(e)[0]}},function(e,t,n){"use strict";function r(e,t){return function(e){return"function"==typeof e}(e)?e(t):e}n.d(t,"a",(function(){return r}))},,function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(8),o=Object(r.createContext)({})},function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(8),o=n(54),c=n(60);function i(e){void 0===e&&(e={});var t=Object(o.a)(e).baseId,n=Object(r.useContext)(c.a),i=Object(r.useRef)(0),a=Object(r.useState)((function(){return t||n()}));return{baseId:a[0],unstable_setBaseId:a[1],unstable_idCountRef:i}}i.__keys=["baseId","unstable_setBaseId","unstable_idCountRef"]},,function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(8);var o=Object(r.createContext)((function(e){return void 0===e&&(e="id"),(e?e+"-":"")+Math.random().toString(32).substr(2,6)}))},function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var r=n(11),o=n(43),c=n(42),i=n(46),a=Object(c.a)({name:"Box",keys:["unstable_system"],propsAreEqual:function(e,t){var n=e.unstable_system,o=Object(r.a)(e,["unstable_system"]),c=t.unstable_system,a=Object(r.a)(t,["unstable_system"]);return!(n!==c&&!Object(i.a)(n,c))&&Object(i.a)(o,a)}});Object(o.a)({as:"div",useHook:a})},function(e,t,n){"use strict";n.d(t,"a",(function(){return c}));var r=n(8);function o(e,t){void 0===t&&(t=null),e&&("function"==typeof e?e(t):e.current=t)}function c(e,t){return Object(r.useMemo)((function(){return null==e&&null==t?null:function(n){o(e,n),o(t,n)}}),[e,t])}},,,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}},function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(53);function o(e){var t=Object(r.a)(e);if(!t)return!1;if(e.contains(t))return!0;var n=t.getAttribute("aria-activedescendant");return!!n&&(n===e.id||!!e.querySelector("#"+n))}},function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=["button","color","file","image","reset","submit"];function o(e){if("BUTTON"===e.tagName)return!0;if("INPUT"===e.tagName){var t=e;return-1!==r.indexOf(t.type)}return!1}},function(e,t,n){"use strict";function r(e,t){return"matches"in e?e.matches(t):"msMatchesSelector"in e?e.msMatchesSelector(t):e.webkitMatchesSelector(t)}function o(e,t){if("closest"in e)return e.closest(t);do{if(r(e,t))return e;e=e.parentElement||e.parentNode}while(null!==e&&1===e.nodeType);return null}n.d(t,"a",(function(){return u})),n.d(t,"b",(function(){return l}));var c=n(53),i="input:not([type='hidden']):not([disabled]), select:not([disabled]), textarea:not([disabled]), a[href], button:not([disabled]), [tabindex], iframe, object, embed, area[href], audio[controls], video[controls], [contenteditable]:not([contenteditable='false'])";function a(e){return r(e,i)&&function(e){return e.offsetWidth>0||e.offsetHeight>0||e.getClientRects().length>0}(e)}function l(e){for(;e&&!a(e);)e=o(e,i);return e}function s(e){return Object(c.a)(e)===e}function u(e,t){var n=void 0===t?{}:t,r=n.isActive,o=void 0===r?s:r,c=n.preventScroll;return o(e)?-1:(e.focus({preventScroll:c}),o(e)?-1:requestAnimationFrame((function(){e.focus({preventScroll:c})})))}},function(e,t,n){"use strict";function r(e){return t=e.currentTarget,n=e.target,!(t===n||t.contains(n));var t,n}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";n.d(t,"a",(function(){return h}));var r=n(11),o=n(43),c=n(42),i=n(61),a=n(8),l=n(62),s=n(67),u=(n(75),n(40)),d=n(52),f=n(66),b=n(69),p=n(53),m=n(68);function v(e){return"undefined"!=typeof window&&-1!==window.navigator.userAgent.indexOf(e)}var g=v("Mac")&&!v("Chrome")&&(v("Safari")||v("Firefox"));function O(e){Object(f.a)(e)||e.focus()}var h=Object(c.a)({name:"Tabbable",compose:i.a,keys:["disabled","focusable"],useOptions:function(e,t){var n=t.disabled;return Object(r.b)({disabled:n},e)},useProps:function(e,t){var n=t.ref,o=t.tabIndex,c=t.onClick,i=t.onMouseDown,f=t.style,v=Object(r.a)(t,["ref","tabIndex","onClick","onMouseDown","style"]),h=Object(a.useRef)(null),j=Object(u.a)(c),k=Object(u.a)(i),y=e.disabled&&!e.focusable,_=Object(a.useState)(!0),E=_[0],C=_[1],w=E?o:o||0,S=e.disabled?Object(r.b)({pointerEvents:"none"},f):f,I=function(){if(g){var e=Object(a.useState)(null),t=e[0],n=e[1];return Object(a.useEffect)((function(){t&&(O(t),n(null))}),[t]),Object(a.useCallback)((function(e){var t=e.currentTarget;if(!Object(b.a)(e)&&Object(s.a)(t)){var r=Object(p.a)(t);if(r){var o="BODY"===r.tagName,c=Object(m.b)(t.parentElement);if(r===c||o&&!c)n(t);else if(c){c.addEventListener("focusin",(function(){return n(t)}),{once:!0})}else{r.addEventListener("blur",(function(){return O(t)}),{once:!0})}}}}),[])}}();Object(d.a)((function(){var e,t=h.current;t&&("BUTTON"!==(e=t).tagName&&"INPUT"!==e.tagName&&"SELECT"!==e.tagName&&"TEXTAREA"!==e.tagName&&"A"!==e.tagName&&"AUDIO"!==e.tagName&&"VIDEO"!==e.tagName&&C(!1))}),[]);var B=Object(a.useCallback)((function(t){var n;if(e.disabled)return t.stopPropagation(),void t.preventDefault();null===(n=j.current)||void 0===n||n.call(j,t)}),[e.disabled]),x=Object(a.useCallback)((function(t){var n;if(e.disabled)return t.stopPropagation(),void t.preventDefault();null===(n=k.current)||void 0===n||n.call(k,t),t.defaultPrevented||null==I||I(t)}),[e.disabled,I]);return Object(r.b)({ref:Object(l.a)(h,n),style:S,tabIndex:y?void 0:w,disabled:!(!y||!E)||void 0,"aria-disabled":!!e.disabled||void 0,onClick:B,onMouseDown:x},v)}});Object(o.a)({as:"div",useHook:h})},function(e,t){!function(){e.exports=this.wp.htmlEntities}()},function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(8),o=n(57),c=n(38);var i=function(e,t,n){void 0===n&&(n=t.children);var i=Object(r.useContext)(o.a);if(i.useCreateElement)return i.useCreateElement(e,t,n);if("string"==typeof e&&function(e){return"function"==typeof e}(n)){t.children;return n(Object(c.b)(t,["children"]))}return Object(r.createElement)(e,t,n)}},function(e,t){!function(){e.exports=this.wp.isShallowEqual}()},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 f(e,t){if(t=t||{},(e=e||"")instanceof f)return e;if(!(this instanceof f))return new f(e,t);var n=function(e){var t={r:0,g:0,b:0},n=1,r=null,a=null,l=null,d=!1,f=!1;"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"};if(t=U.rgb.exec(e))return{r:t[1],g:t[2],b:t[3]};if(t=U.rgba.exec(e))return{r:t[1],g:t[2],b:t[3],a:t[4]};if(t=U.hsl.exec(e))return{h:t[1],s:t[2],l:t[3]};if(t=U.hsla.exec(e))return{h:t[1],s:t[2],l:t[3],a:t[4]};if(t=U.hsv.exec(e))return{h:t[1],s:t[2],v:t[3]};if(t=U.hsva.exec(e))return{h:t[1],s:t[2],v:t[3],a:t[4]};if(t=U.hex8.exec(e))return{r:R(t[1]),g:R(t[2]),b:R(t[3]),a:F(t[4]),format:n?"name":"hex8"};if(t=U.hex6.exec(e))return{r:R(t[1]),g:R(t[2]),b:R(t[3]),format:n?"name":"hex"};if(t=U.hex4.exec(e))return{r:R(t[1]+""+t[1]),g:R(t[2]+""+t[2]),b:R(t[3]+""+t[3]),a:F(t[4]+""+t[4]),format:n?"name":"hex8"};if(t=U.hex3.exec(e))return{r:R(t[1]+""+t[1]),g:R(t[2]+""+t[2]),b:R(t[3]+""+t[3]),format:n?"name":"hex"};return!1}(e));"object"==typeof e&&(G(e.r)&&G(e.g)&&G(e.b)?(b=e.r,p=e.g,m=e.b,t={r:255*N(b,255),g:255*N(p,255),b:255*N(m,255)},d=!0,f="%"===String(e.r).substr(-1)?"prgb":"rgb"):G(e.h)&&G(e.s)&&G(e.v)?(r=M(e.s),a=M(e.v),t=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,r,a),d=!0,f="hsv"):G(e.h)&&G(e.s)&&G(e.l)&&(r=M(e.s),l=M(e.l),t=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,r,l),d=!0,f="hsl"),e.hasOwnProperty("a")&&(n=e.a));var b,p,m;return n=T(n),{ok:d,format:e.format||f,r:s(255,u(t.r,0)),g:s(255,u(t.g,0)),b:s(255,u(t.b,0)),a:n}}(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 b(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=[A(l(e).toString(16)),A(l(t).toString(16)),A(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[A(L(r)),A(l(e).toString(16)),A(l(t).toString(16)),A(l(n).toString(16))].join("")}function g(e,t){t=0===t?0:t||10;var n=f(e).toHsl();return n.s-=t/100,n.s=D(n.s),f(n)}function O(e,t){t=0===t?0:t||10;var n=f(e).toHsl();return n.s+=t/100,n.s=D(n.s),f(n)}function h(e){return f(e).desaturate(100)}function j(e,t){t=0===t?0:t||10;var n=f(e).toHsl();return n.l+=t/100,n.l=D(n.l),f(n)}function k(e,t){t=0===t?0:t||10;var n=f(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))),f(n)}function y(e,t){t=0===t?0:t||10;var n=f(e).toHsl();return n.l-=t/100,n.l=D(n.l),f(n)}function _(e,t){var n=f(e).toHsl(),r=(n.h+t)%360;return n.h=r<0?360+r:r,f(n)}function E(e){var t=f(e).toHsl();return t.h=(t.h+180)%360,f(t)}function C(e){var t=f(e).toHsl(),n=t.h;return[f(e),f({h:(n+120)%360,s:t.s,l:t.l}),f({h:(n+240)%360,s:t.s,l:t.l})]}function w(e){var t=f(e).toHsl(),n=t.h;return[f(e),f({h:(n+90)%360,s:t.s,l:t.l}),f({h:(n+180)%360,s:t.s,l:t.l}),f({h:(n+270)%360,s:t.s,l:t.l})]}function S(e){var t=f(e).toHsl(),n=t.h;return[f(e),f({h:(n+72)%360,s:t.s,l:t.l}),f({h:(n+216)%360,s:t.s,l:t.l})]}function I(e,t,n){t=t||6,n=n||30;var r=f(e).toHsl(),o=360/n,c=[f(e)];for(r.h=(r.h-(o*t>>1)+720)%360;--t;)r.h=(r.h+o)%360,c.push(f(r));return c}function B(e,t){t=t||6;for(var n=f(e).toHsv(),r=n.h,o=n.s,c=n.v,i=[],a=1/t;t--;)i.push(f({h:r,s:o,v:c})),c=(c+a)%1;return i}f.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=b(this._r,this._g,this._b);return{h:360*e.h,s:e.s,l:e.l,a:this._a}},toHslString:function(){var e=b(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=[A(l(e).toString(16)),A(l(t).toString(16)),A(l(n).toString(16)),A(L(r))];if(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))return c[0].charAt(0)+c[1].charAt(0)+c[2].charAt(0)+c[3].charAt(0);return 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=f(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 f(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(I,arguments)},complement:function(){return this._applyCombination(E,arguments)},monochromatic:function(){return this._applyCombination(B,arguments)},splitcomplement:function(){return this._applyCombination(S,arguments)},triad:function(){return this._applyCombination(C,arguments)},tetrad:function(){return this._applyCombination(w,arguments)}},f.fromRatio=function(e,t){if("object"==typeof e){var n={};for(var r in e)e.hasOwnProperty(r)&&(n[r]="a"===r?e[r]:M(e[r]));e=n}return f(e,t)},f.equals=function(e,t){return!(!e||!t)&&f(e).toRgbString()==f(t).toRgbString()},f.random=function(){return f.fromRatio({r:d(),g:d(),b:d()})},f.mix=function(e,t,n){n=0===n?0:n||50;var r=f(e).toRgb(),o=f(t).toRgb(),c=n/100;return f({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})},f.readability=function(e,t){var n=f(e),r=f(t);return(o.max(n.getLuminance(),r.getLuminance())+.05)/(o.min(n.getLuminance(),r.getLuminance())+.05)},f.isReadable=function(e,t,n){var r,o,c=f.readability(e,t);switch(o=!1,(r=function(e){var t,n;t=((e=e||{level:"AA",size:"small"}).level||"AA").toUpperCase(),n=(e.size||"small").toLowerCase(),"AA"!==t&&"AAA"!==t&&(t="AA");"small"!==n&&"large"!==n&&(n="small");return{level:t,size:n}}(n)).level+r.size){case"AAsmall":case"AAAlarge":o=c>=4.5;break;case"AAlarge":o=c>=3;break;case"AAAsmall":o=c>=7}return o},f.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=f.readability(e,t[s]))>l&&(l=r,a=f(t[s]));return f.isReadable(e,a,{level:c,size:i})||!o?a:(n.includeFallbackColors=!1,f.mostReadable(e,["#fff","#000"],n))};var x=f.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=f.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 R(e){return parseInt(e,16)}function A(e){return 1==e.length?"0"+e:""+e}function M(e){return e<=1&&(e=100*e+"%"),e}function L(e){return o.round(255*parseFloat(e)).toString(16)}function F(e){return R(e)/255}var V,H,z,U=(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 G(e){return!!U.CSS_UNIT.exec(e)}e.exports?e.exports=f:void 0===(r=function(){return f}.call(t,n,t,e))||(e.exports=r)}(Math)},function(e,t,n){"use strict";n(91),n(8)},function(e,t,n){"use strict";function r(e){var t=void 0===e?{}:e,n=t.keyMap,r=t.onKey,o=t.stopPropagation,c=t.onKeyDown,i=t.shouldKeyDown,a=void 0===i?function(){return!0}:i,l=t.preventDefault,s=void 0===l||l;return function(e){if(n){var t,i="function"==typeof n?n(e):n,l="function"==typeof s?s(e):s,u="function"==typeof o?o(e):o;if(e.key in i){var d=i[e.key];if("function"==typeof d&&a(e))return l&&e.preventDefault(),u&&e.stopPropagation(),r&&r(e),void d(e)}if(c&&"current"in c)null===(t=c.current)||void 0===t||t.call(c,e);else null==c||c(e)}}}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";n.d(t,"a",(function(){return d}));var r=n(11),o=n(43),c=n(42),i=n(8),a=n(67),l=(n(75),n(40)),s=n(49),u=n(70);var d=Object(c.a)({name:"Clickable",compose:u.a,keys:["unstable_clickOnEnter","unstable_clickOnSpace"],useOptions:function(e){var t=e.unstable_clickOnEnter,n=void 0===t||t,o=e.unstable_clickOnSpace,c=void 0===o||o,i=Object(r.a)(e,["unstable_clickOnEnter","unstable_clickOnSpace"]);return Object(r.b)({unstable_clickOnEnter:n,unstable_clickOnSpace:c},i)},useProps:function(e,t){var n=t.onKeyDown,o=t.onKeyUp,c=Object(r.a)(t,["onKeyDown","onKeyUp"]),u=Object(i.useState)(!1),d=u[0],f=u[1],b=Object(l.a)(n),p=Object(l.a)(o),m=Object(i.useCallback)((function(t){var n;if(null===(n=b.current)||void 0===n||n.call(b,t),!t.defaultPrevented&&!e.disabled&&!t.metaKey&&Object(s.a)(t)){var r=e.unstable_clickOnEnter&&"Enter"===t.key,o=e.unstable_clickOnSpace&&" "===t.key;if(r||o){if(function(e){var t=e.currentTarget;return!!e.isTrusted&&(Object(a.a)(t)||"INPUT"===t.tagName||"TEXTAREA"===t.tagName||"A"===t.tagName||"SELECT"===t.tagName)}(t))return;t.preventDefault(),r?t.currentTarget.click():o&&f(!0)}}}),[e.disabled,e.unstable_clickOnEnter,e.unstable_clickOnSpace]),v=Object(i.useCallback)((function(t){var n;if(null===(n=p.current)||void 0===n||n.call(p,t),!t.defaultPrevented&&!e.disabled&&!t.metaKey){var r=e.unstable_clickOnSpace&&" "===t.key;d&&r&&(f(!1),t.currentTarget.click())}}),[e.disabled,e.unstable_clickOnSpace,d]);return Object(r.b)({"data-active":d||void 0,onKeyDown:m,onKeyUp:v},c)}});Object(o.a)({as:"button",memo:!0,useHook:d})},function(e,t){!function(){e.exports=this.wp.notices}()},,,function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(100);function o(e,t,n){return e.dispatchEvent(Object(r.a)(e,t,n))}},function(e,t,n){"use strict";function r(e){try{var t=e instanceof HTMLInputElement&&null!==e.selectionStart,n="TEXTAREA"===e.tagName,r="true"===e.contentEditable;return t||n||r||!1}catch(e){return!1}}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";function r(e,t){e.value=t}n.d(t,"a",(function(){return r}))},,function(e,t,n){"use strict";n.d(t,"a",(function(){return i})),n.d(t,"b",(function(){return a}));var r=n(2),o=n(0),c=Object(o.createContext)({name:"",isSelected:!1,focusedElement:null,setFocusedElement:r.noop,clientId:null}),i=c.Provider;function a(){return Object(o.useContext)(c)}},function(e,t,n){"use strict";n.d(t,"a",(function(){return s}));var r=n(11),o=n(43),c=n(42),i=n(8),a=n(60),l=n(58),s=Object(c.a)({useState:l.a,keys:["id"],useOptions:function(e,t){var n=Object(i.useContext)(a.a),o=Object(i.useState)((function(){return e.unstable_idCountRef?(e.unstable_idCountRef.current+=1,"-"+e.unstable_idCountRef.current):e.baseId?"-"+n(""):""}))[0],c=Object(i.useMemo)((function(){return e.baseId||n()}),[e.baseId,n]),l=t.id||e.id||""+c+o;return Object(r.b)(Object(r.b)({},e),{},{id:l})},useProps:function(e,t){return Object(r.b)({id:e.id},t)}});Object(o.a)({as:"div",useHook:s})},,,,,function(e,t,n){"use strict"},,function(e,t,n){"use strict";n.d(t,"a",(function(){return c}));var r=n(45);function o(e,t,n){if(void 0===n&&(n={}),"function"==typeof KeyboardEvent)return new KeyboardEvent(t,n);var o=Object(r.a)(e).createEvent("KeyboardEvent");return o.initKeyboardEvent(t,n.bubbles,n.cancelable,function(e){return Object(r.a)(e).defaultView||window}(e),n.key,n.location,n.ctrlKey,n.altKey,n.shiftKey,n.metaKey),o}function c(e,t,n){return e.dispatchEvent(o(e,t,n))}},function(e,t){!function(){e.exports=this.wp.warning}()},,,function(e,t,n){"use strict";t.__esModule=!0;var r=n(185);t.default=r.default},,function(e,t){!function(){e.exports=this.wp.viewport}()},function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(45);function o(e,t,n){var o,c;if(void 0===n&&(n={}),"function"==typeof Event)return new Event(t,n);var i=Object(r.a)(e).createEvent("Event");return i.initEvent(t,null===(o=n)||void 0===o?void 0:o.bubbles,null===(c=n)||void 0===c?void 0:c.cancelable),i}},function(e,t){var n,r,o=e.exports={};function c(){throw new Error("setTimeout has not been defined")}function i(){throw new Error("clearTimeout has not been defined")}function a(e){if(n===setTimeout)return setTimeout(e,0);if((n===c||!n)&&setTimeout)return n=setTimeout,setTimeout(e,0);try{return n(e,0)}catch(t){try{return n.call(null,e,0)}catch(t){return n.call(this,e,0)}}}!function(){try{n="function"==typeof setTimeout?setTimeout:c}catch(e){n=c}try{r="function"==typeof clearTimeout?clearTimeout:i}catch(e){r=i}}();var l,s=[],u=!1,d=-1;function f(){u&&l&&(u=!1,l.length?s=l.concat(s):d=-1,s.length&&b())}function b(){if(!u){var e=a(f);u=!0;for(var t=s.length;t;){for(l=s,s=[];++d<t;)l&&l[d].run();d=-1,t=s.length}l=null,u=!1,function(e){if(r===clearTimeout)return clearTimeout(e);if((r===i||!r)&&clearTimeout)return r=clearTimeout,clearTimeout(e);try{r(e)}catch(t){try{return r.call(null,e)}catch(t){return r.call(this,e)}}}(e)}}function p(e,t){this.fun=e,this.array=t}function m(){}o.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)t[n-1]=arguments[n];s.push(new p(e,t)),1!==s.length||u||a(b)},p.prototype.run=function(){this.fun.apply(null,this.array)},o.title="browser",o.browser=!0,o.env={},o.argv=[],o.version="",o.versions={},o.on=m,o.addListener=m,o.once=m,o.off=m,o.removeListener=m,o.removeAllListeners=m,o.emit=m,o.prependListener=m,o.prependOnceListener=m,o.listeners=function(e){return[]},o.binding=function(e){throw new Error("process.binding is not supported")},o.cwd=function(){return"/"},o.chdir=function(e){throw new Error("process.chdir is not supported")},o.umask=function(){return 0}},,,,,function(e,t){!function(){e.exports=this.ReactDOM}()},,,,function(e,t,n){"use strict";n.d(t,"a",(function(){return E})),n.d(t,"b",(function(){return _}));var r=n(11),o=n(43),c=n(42),i=n(61),a=n(8),l=n(62),s=(n(75),n(40)),u=n(49),d=n(53),f=n(70),b=n(72),p=n(76),m=n(45),v=n(81),g=n(93),O=n(50),h="undefined"!=typeof window&&"msCrypto"in window;var j="undefined"!=typeof window&&"msCrypto"in window;function k(e,t,n){var r=Object(s.a)(n);return Object(a.useCallback)((function(n){var o;if(e&&function(e){return!!Object(u.a)(e)&&(!e.metaKey&&"Tab"!==e.key)}(n)){var c=null==t?void 0:t.ref.current;if(c&&(Object(g.a)(c,n.type,n),n.currentTarget.contains(c)))return n.stopPropagation(),void n.preventDefault()}null===(o=r.current)||void 0===o||o.call(r,n)}),[e,t])}function y(e,t){return null==e?void 0:e.some((function(e){return!!t&&e.ref.current===t}))}var _=Object(c.a)({name:"Composite",compose:[f.a],useState:O.g,useOptions:function(e){return Object(r.b)(Object(r.b)({},e),{},{currentId:Object(O.e)(e)})},useProps:function(e,t){var n=t.ref,o=t.onFocus,c=t.onBlur,i=t.onKeyDown,f=t.onKeyUp,b=Object(r.a)(t,["ref","onFocus","onBlur","onKeyDown","onKeyUp"]),g=Object(a.useRef)(null),_=Object(O.d)(e.items,e.currentId),E=Object(a.useRef)(void 0),C=Object(s.a)(o),w=Object(s.a)(c),S=j?function(e){var t=Object(a.useRef)(null);return Object(a.useEffect)((function(){var n=Object(m.a)(e.current),r=function(e){var n=e.target;t.current=n};return n.addEventListener("focus",r,!0),function(){n.removeEventListener("focus",r,!0)}}),[]),t}(g):void 0;Object(a.useEffect)((function(){var t=g.current;t&&e.unstable_moves&&!_&&t.focus()}),[e.unstable_moves,_]);var I=k(e.unstable_virtual,_,i),B=k(e.unstable_virtual,_,f),x=Object(a.useCallback)((function(t){var n;if(e.unstable_virtual){var r,o,c=(null==S?void 0:S.current)||t.relatedTarget,i=y(e.items,c);if(Object(u.a)(t)&&!i)return null===(r=C.current)||void 0===r||r.call(C,t),void(null==_||null===(o=_.ref.current)||void 0===o||o.focus());if(i)return void t.stopPropagation()}else if(Object(u.a)(t)){var a;null===(a=e.setCurrentId)||void 0===a||a.call(e,null)}null===(n=C.current)||void 0===n||n.call(C,t)}),[e.unstable_virtual,e.items,_,e.setCurrentId]),P=Object(a.useCallback)((function(t){var n;if(e.unstable_virtual){var r,o=y(e.items,t.target),c=function(e){return h?Object(d.a)(e.target):e.relatedTarget}(t),i=y(e.items,c);if(Object(u.a)(t)&&i)return(null===(r=E.current)||void 0===r?void 0:r.ref.current)&&Object(v.a)(E.current.ref.current,"blur",t),E.current=_,void t.stopPropagation();o?E.current=_:((null==_?void 0:_.ref.current)&&Object(v.a)(_.ref.current,"blur",t),E.current=void 0)}null===(n=w.current)||void 0===n||n.call(w,t)}),[e.unstable_virtual,e.items,_]),T=Object(a.useMemo)((function(){return Object(p.a)({onKeyDown:I,stopPropagation:!0,shouldKeyDown:function(t){return Object(u.a)(t)&&null===e.currentId},keyMap:function(){var t,n="horizontal"!==e.orientation,r="vertical"!==e.orientation,o=!!(null===(t=e.groups)||void 0===t?void 0:t.length),c=e.first&&function(){return e.first()},i=e.last&&function(){return e.last()};return{ArrowUp:(o||n)&&function(){if(o){var t,n=(c=e.items,Object(O.a)(Object(O.b)(Object(O.f)(Object(O.c)(c)))));if(null==n?void 0:n.id)null===(t=e.move)||void 0===t||t.call(e,n.id)}else{var r;null===(r=e.last)||void 0===r||r.call(e)}var c},ArrowRight:(o||r)&&c,ArrowDown:(o||n)&&c,ArrowLeft:(o||r)&&i,Home:c,End:i,PageUp:c,PageDown:i}}})}),[I,e.currentId,e.orientation,e.groups,e.items,e.move,e.last,e.first]);return Object(r.b)({ref:Object(l.a)(g,n),id:e.baseId,onFocus:x,onBlur:P,onKeyDown:T,onKeyUp:B,"aria-activedescendant":e.unstable_virtual&&(null==_?void 0:_.id)||void 0},b)},useComposeProps:function(e,t){t=Object(i.a)(e,t,!0);var n=Object(f.a)(e,t,!0);return e.unstable_virtual||null===e.currentId?n:Object(r.b)(Object(r.b)({},t),{},{ref:n.ref})}}),E=Object(o.a)({as:"div",useHook:_,useCreateElement:function(e,t,n){return Object(b.a)(e,t,n)}})},function(e,t,n){"use strict";n.d(t,"a",(function(){return y})),n.d(t,"b",(function(){return k}));var r=n(11),o=n(43),c=n(42),i=n(8),a=n(62),l=(n(75),n(40)),s=n(49),u=n(66),d=n(69),f=n(68),b=n(77),p=n(76),m=n(45),v=n(50),g=n(86),O=n(82),h=n(83);function j(e){return e.querySelector("[data-composite-item-widget]")}var k=Object(c.a)({name:"CompositeItem",compose:[b.a,g.a],useState:v.g,propsAreEqual:function(e,t){if(!t.id||e.id!==t.id)return b.a.unstable_propsAreEqual(e,t);var n=e.currentId,o=e.unstable_moves,c=Object(r.a)(e,["currentId","unstable_moves"]),i=t.currentId,a=t.unstable_moves,l=Object(r.a)(t,["currentId","unstable_moves"]);if(i!==n){if(t.id===i||t.id===n)return!1}else if(o!==a)return!1;return b.a.unstable_propsAreEqual(c,l)},useOptions:function(e){return Object(r.b)(Object(r.b)({},e),{},{id:e.id,currentId:Object(v.e)(e),unstable_clickOnSpace:!e.unstable_hasActiveWidget&&e.unstable_clickOnSpace})},useProps:function(e,t){var n,o=t.ref,c=t.tabIndex,b=void 0===c?0:c,v=t.onFocus,g=t.onBlur,k=t.onKeyDown,y=t.onClick,_=Object(r.a)(t,["ref","tabIndex","onFocus","onBlur","onKeyDown","onClick"]),E=Object(i.useRef)(null),C=e.id,w=e.disabled&&!e.focusable,S=e.currentId===C,I=Object(l.a)(S),B=Object(i.useRef)(!1),x=function(e){return Object(i.useMemo)((function(){var t;return null===(t=e.items)||void 0===t?void 0:t.find((function(t){return e.id&&t.id===e.id}))}),[e.items,e.id])}(e),P=Object(l.a)(v),T=Object(l.a)(g),N=Object(l.a)(k),D=Object(l.a)(y),R=!e.unstable_virtual&&!e.unstable_hasActiveWidget&&S||!(null===(n=e.items)||void 0===n?void 0:n.length);Object(i.useEffect)((function(){var t;if(C)return null===(t=e.registerItem)||void 0===t||t.call(e,{id:C,ref:E,disabled:!!w}),function(){var t;null===(t=e.unregisterItem)||void 0===t||t.call(e,C)}}),[C,w,e.registerItem,e.unregisterItem]),Object(i.useEffect)((function(){var t=E.current;t&&e.unstable_moves&&I.current&&t.focus()}),[e.unstable_moves]);var A=Object(i.useCallback)((function(t){var n,o;if(null===(n=P.current)||void 0===n||n.call(P,t),!t.defaultPrevented&&!Object(d.a)(t)&&C&&!function(e,t){if(Object(s.a)(e))return!1;for(var n,o=Object(r.c)(t);!(n=o()).done;){if(n.value.ref.current===e.target)return!0}return!1}(t,e.items)&&(null===(o=e.setCurrentId)||void 0===o||o.call(e,C),e.unstable_virtual&&e.baseId&&Object(s.a)(t))){var c=t.target,i=Object(m.a)(c).getElementById(e.baseId);i&&(B.current=!0,Object(f.a)(i))}}),[C,e.items,e.setCurrentId,e.unstable_virtual,e.baseId]),M=Object(i.useCallback)((function(t){var n;if(e.unstable_virtual&&B.current)return B.current=!1,t.preventDefault(),void t.stopPropagation();null===(n=T.current)||void 0===n||n.call(T,t)}),[e.unstable_virtual]),L=Object(i.useCallback)((function(e){var t;if(null===(t=N.current)||void 0===t||t.call(N,e),Object(s.a)(e)&&1===e.key.length&&" "!==e.key){var n=j(e.currentTarget);if(n&&Object(O.a)(n)){n.focus();var r=e.key;window.requestAnimationFrame((function(){Object(h.a)(n,r)}))}}}),[]),F=Object(i.useMemo)((function(){return Object(p.a)({onKeyDown:L,stopPropagation:!0,shouldKeyDown:s.a,keyMap:function(){var t="horizontal"!==e.orientation,n="vertical"!==e.orientation,r=!!(null==x?void 0:x.groupId),o=function(e){var t=j(e.currentTarget);t&&Object(O.a)(t)&&Object(h.a)(t,"")},c=e.up&&function(){return e.up()},i=e.next&&function(){return e.next()},a=e.down&&function(){return e.down()},l=e.previous&&function(){return e.previous()};return{Delete:o,Backspace:o,ArrowUp:(r||t)&&c,ArrowRight:(r||n)&&i,ArrowDown:(r||t)&&a,ArrowLeft:(r||n)&&l,Home:function(t){var n,o;!r||t.ctrlKey?null===(n=e.first)||void 0===n||n.call(e):null===(o=e.previous)||void 0===o||o.call(e,!0)},End:function(t){var n,o;!r||t.ctrlKey?null===(n=e.last)||void 0===n||n.call(e):null===(o=e.next)||void 0===o||o.call(e,!0)},PageUp:function(){var t,n;r?null===(t=e.up)||void 0===t||t.call(e,!0):null===(n=e.first)||void 0===n||n.call(e)},PageDown:function(){var t,n;r?null===(t=e.down)||void 0===t||t.call(e,!0):null===(n=e.last)||void 0===n||n.call(e)}}}})}),[L,e.orientation,x,e.up,e.next,e.down,e.previous,e.first,e.last]),V=Object(i.useCallback)((function(e){var t;if(null===(t=D.current)||void 0===t||t.call(D,e),!e.defaultPrevented){var n=j(e.currentTarget);n&&!Object(u.a)(n)&&n.focus()}}),[]);return Object(r.b)({ref:Object(a.a)(E,o),id:C,tabIndex:R?b:-1,"aria-selected":!(!e.unstable_virtual||!S)||void 0,onFocus:A,onBlur:M,onKeyDown:F,onClick:V},_)}}),y=Object(o.a)({as:"button",memo:!0,useHook:k})},,,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(182)),c=r(n(183)),i=n(8),a=r(i),l=r(n(145)),s=r(n(184)),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 f(e,t){return u.und(e)||u.nul(e)?t:e}function b(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},C=function(e){"undefined"!=typeof window&&window.cancelAnimationFrame(e)};function w(e){_=e}var S,I=function(){return Date.now()};function B(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 C},injectFrame:function(e,t){E=e,C=t},get interpolation(){return _},injectStringInterpolator:w,get now(){return I},injectNow:function(e){I=e},get defaultElement(){return S},injectDefaultElement:B,get animatedApi(){return T},injectAnimatedApi:function(e){T=e},get createAnimatedStyle(){return x},injectCreateAnimatedStyle:N,get manualFrameloop(){return P},injectManualFrameloop:function(e){P=e}}),R=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),A=!1,M=new Set,L=function e(){if(!A)return!1;var t=I(),n=M,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,f=0;f<s.animatedValues.length;f++){var b=s.animatedValues[f];if(!b.done){var p=s.fromValues[f],m=s.toValues[f],v=b.lastPosition,g=m instanceof O,h=Array.isArray(s.initialVelocity)?s.initialVelocity[f]:s.initialVelocity;if(g&&(m=m.getValue()),s.immediate)b.setValue(m),b.done=!0;else if("string"!=typeof p&&"string"!=typeof m){if(void 0!==s.duration)v=p+s.easing((t-b.startTime)/s.duration)*(m-p),u=t>=b.startTime+s.duration;else if(s.decay)v=p+h/(1-.998)*(1-Math.exp(-(1-.998)*(t-b.startTime))),(u=Math.abs(b.lastPosition-v)<.1)&&(m=v);else{d=void 0!==b.lastTime?b.lastTime:t,h=void 0!==b.lastVelocity?b.lastVelocity:s.initialVelocity,t>d+64&&(d=t);for(var j=Math.floor(t-d),k=0;k<j;++k){v+=1*(h+=1*((-s.tension*(v-m)+-s.friction*h)/s.mass)/1e3)/1e3}var y=!(!s.clamp||0===s.tension)&&(p<m?v>m:v<m),_=Math.abs(h)<=s.precision,C=0===s.tension||Math.abs(m-v)<=s.precision;u=y||_&&C,b.lastVelocity=h,b.lastTime=t}g&&!s.toValues[f].done&&(u=!1),u?(b.value!==m&&(v=m),b.done=!0):a=!0,b.setValue(v),b.lastPosition=v}else b.setValue(m),b.done=!0}}i.props.onFrame&&(i.values[s.name]=s.interpolation.getValue())}i.props.onFrame&&i.props.onFrame(i.values),a||(M.delete(i),i.stop(!0))}return M.size?P?P():E(e):A=!1,A};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)}if(r===o)return r;if(t===n)return 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;return 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);var 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),U=0,G=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=U++}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,n=this;if(this.queue.length){this.idle=!1,this.localQueue&&this.localQueue.forEach((function(e){var t=e.from,r=void 0===t?{}:t,c=e.to,i=void 0===c?{}:c;u.obj(r)&&(n.merged=o({},r,n.merged)),u.obj(i)&&(n.merged=o({},n.merged,i))}));var r=this.local=++this.guid,i=this.localQueue=this.queue;this.queue=[],i.forEach((function(t,o){var a=t.delay,l=c(t,["delay"]),s=function(t){o===i.length-1&&r===n.guid&&t&&(n.idle=!0,n.props.onRest&&n.props.onRest(n.merged)),e&&e()},d=u.arr(l.to)||u.fun(l.to);a?setTimeout((function(){r===n.guid&&(d?n.runAsync(l,s):n.diff(l).start(s))}),a):d?n.runAsync(l,s):n.diff(l).start(s)}))}else u.fun(e)&&this.listeners.push(e),this.props.onStart&&this.props.onStart(),t=this,M.has(t)||M.add(t),A||(A=!0,E(P||L));return this},t.stop=function(e){return this.listeners.forEach((function(t){return t(e)})),this.listeners=[],this},t.pause=function(e){var t;return this.stop(!0),e&&(t=this,M.has(t)&&M.delete(t)),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,f=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[f]),f++,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 C,w=a.parent,S=a.interpolation,B=b(j?y.getPayload():y),x=i;h&&(x=_({range:[0,1],output:[i,i]})(1));var P,T=S&&S.getValue(),N=!u.und(w)&&a.animatedValues.some((function(e){return!e.done})),D=!u.equ(x,T),R=!u.equ(x,a.previous),A=!u.equ(E,a.config);if(v||R&&D||A){var M;if(l||d)w=S=a.parent||new H(k);else if(m)w=S=a.parent||new z(k);else if(h){var L=a.interpolation&&a.interpolation.calc(a.parent.value);L=void 0===L||v?k:L,a.parent?(w=a.parent).setValue(0,!1):w=new H(0);var F={output:[L,i]};a.interpolation?(S=a.interpolation,a.interpolation.updateConfig(F)):S=w.interpolate(F)}return B=b(j?y.getPayload():y),C=b(w.getPayload()),v&&!h&&w.setValue(k,!1),t.hasChanged=!0,C.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=I(),e.done=!1,e.animatedStyles.clear()})),p(O,r)&&w.setValue(h?y:i,!1),o({},e,((M={})[r]=o({},a,{name:r,parent:w,interpolation:S,animatedValues:C,toValues:B,previous:x,config:E,fromValues:b(w.getValue()),immediate:p(O,r),initialVelocity:f(E.velocity,0),clamp:f(E.clamp,!1),precision:f(E.precision,.01),tension:f(E.tension,170),friction:f(E.friction,26),mass:f(E.mass,1),duration:E.duration,easing:f(E.easing,(function(e){return e})),decay:E.decay}),M))}return D?e:(h&&(w.setValue(1,!1),S.updateConfig({output:[x,x]})),w.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 G,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):b(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=b(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 fe(e){var t=parseFloat(e);return t<0?0:t>1?255:Math.round(255*t)}function be(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|fe(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]),be(n[2]),be(n[3])))>>>0:(n=re.exec(t))?(se(de(n[1]),be(n[2]),be(n[3]))|fe(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)})),B("div"),w((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 f in a){var b=l?f:ke[f]||(ke[f]=f.replace(/([A-Z])/g,(function(e){return"-"+e.toLowerCase()})));void 0!==e.getAttribute(b)&&e.setAttribute(b,a[f])}}),(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),f=i.useRef(null),b=i.useCallback((function(e){var t=s.current;s.current=new R(e,(function(){f.current&&!1===v.fn(f.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(f,l,r)})),b(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 f.current=function(e,t){return t&&(u.fun(t)?t(e):u.obj(t)&&(t.current=e)),e}(e,n)}}))}))},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)}),Ce=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=L,t.animated=Ce,t.a=Ce,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],f=l[2],b=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&&b(t)})),i.useEffect((function(){n.current=!0}),[]),r?[s,b,f]: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),f=void 0!==u&&u,b=(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){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,f=a.enter,b=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,C=o({},i.current),w=[].concat(i.deleted),S=Object.keys(C),I=new Set(S),B=new Set(s),x=s.filter((function(e){return!I.has(e)})),P=i.transitions.filter((function(e){return!e.destroyed&&!B.has(e.originalKey)})).map((function(e){return e.originalKey})),T=s.filter((function(e){return I.has(e)})),N=-g;for(;k.length;){switch(k.shift()){case"enter":x.forEach((function(e,t){O&&w.find((function(t){return t.originalKey===e}))&&(w=w.filter((function(t){return t.originalKey!==e})));var r=s.indexOf(e),o=l[r],c=n&&void 0!==u?"initial":"enter";C[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(f,o)}}));break;case"leave":P.forEach((function(e){var t=_.indexOf(e),n=E[t];w.unshift(o({},C[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(b,n)})),delete C[e]}));break;case"update":T.forEach((function(e){var t=s.indexOf(e),n=l[t];C[e]=o({},C[e],{item:n,slot:"update",trail:N+=g,config:p(h,n,"update"),to:p(m,n)})}))}}var D=s.map((function(e){return C[e]}));return w.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:C,deleted:w,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 G);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),b&&b(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:f&&"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},,,,,,,,,function(e,t,n){"use strict";e.exports=n(190)},function(e,t){!function(){e.exports=this.wp.wordcount}()},,function(e,t){!function(){e.exports=this.wp.shortcode}()},function(e,t,n){"use strict";var r=n(0),o=n(6),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},function(e,t,n){"use strict";var r=n(0),o=n(6),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},function(e,t,n){"use strict";var r=n(0),o=n(6),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},,function(e,t,n){"use strict";var r=n(21),o=n(32),c=n(0),i=n(2),a=n(3),l=n(168),s=Object(a.createSlotFill)("BlockControls"),u=s.Fill,d=s.Slot;var f=function(e){return"BlockControls".concat(e?"-expanded":"")},b=function(e){var t=e.controls,n=e.__experimentalIsExpanded,r=e.children;return Object(l.a)()?Object(c.createElement)(u,{name:f(n)},(function(e){var n=Object(i.isEmpty)(e)?null:e;return Object(c.createElement)(a.__experimentalToolbarContext.Provider,{value:n},Object(c.createElement)(a.ToolbarGroup,{controls:t}),r)})):null};b.Slot=function(e){var t=e.__experimentalIsExpanded,n=void 0!==t&&t,i=Object(o.a)(e,["__experimentalIsExpanded"]),l=Object(c.useContext)(a.__experimentalToolbarContext);return Object(c.createElement)(d,Object(r.a)({name:f(n)},i,{fillProps:l}))},t.a=b},,,,,function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(152);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}}},,,function(e,t,n){"use strict";var r=n(140);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}},function(e,t,n){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},,,,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}function o(e,t){if(null==e)return{};var n,r,o=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}(e,t);if(Object.getOwnPropertySymbols){var c=Object.getOwnPropertySymbols(e);for(r=0;r<c.length;r++)n=c[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var 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=o(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){r(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))}},function(e,t){e.exports=function(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}},function(e,t,n){e.exports=function(){"use strict";return function(e){var t={};return function e(t,n){var r;if(Array.isArray(n))for(r=0;r<n.length;r++)e(t,n[r]);else for(r in n)t[r]=(t[r]||[]).concat(n[r])}(t,e),function(e){return function(n){return function(r){var o,c,i=t[r.type],a=n(r);if(i)for(o=0;o<i.length;o++)(c=i[o](r,e))&&e.dispatch(c);return a}}}}}()},,,,,,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}))},function(e,t){!function(){e.exports=this.wp.tokenList}()},,,function(e,t,n){"use strict";var r=n(0),o=n(6),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},function(e,t,n){"use strict";var r=n(0),o=n(6),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},,,,,,,,,,,function(e,t,n){"use strict";n.d(t,"a",(function(){return c}));var r=n(4),o=n(85);function c(){var e=Object(o.b)(),t=e.isSelected,n=e.clientId,c=e.name,i=Object(r.useSelect)((function(e){if(!t){var r=e("core/block-editor"),o=r.getBlockName,i=r.isFirstMultiSelectedBlock,a=r.getMultiSelectedBlockClientIds;return!!i(n)&&a().every((function(e){return o(e)===c}))}}),[n,t,c]);return t||i}},function(e,t,n){"use strict";function r(e){if(Array.isArray(e))return e}n.d(t,"a",(function(){return r}))},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}))},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}},,,,function(e,t,n){"use strict";var r=a(n(291)),o=a(n(296)),c=a(n(212)),i=a(n(209));function a(e){return e&&e.__esModule?e:{default:e}}e.exports={Transition:i.default,TransitionGroup:c.default,ReplaceTransition:o.default,CSSTransition:r.default}},,,,,,,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},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}},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}},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 n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),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(22),s=n(186),u=n(187),d=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.state={lineHeight:null},t.dispatchEvent=function(e){var n=document.createEvent("Event");n.initEvent(e,!0,!1),t.textarea.dispatchEvent(n)},t.updateLineHeight=function(){t.setState({lineHeight:u(t.textarea)})},t.onChange=function(e){var n=t.props.onChange;t.currentValue=e.currentTarget.value,n&&n(e)},t.saveDOMNodeRef=function(e){var n=t.props.innerRef;n&&n(e),t.textarea=e},t.getLocals=function(){var e=t,n=e.props,r=(n.onResize,n.maxRows),o=(n.onChange,n.style),a=(n.innerRef,i(n,["onResize","maxRows","onChange","style","innerRef"])),l=e.state.lineHeight,s=e.saveDOMNodeRef,u=r&&l?l*r:null;return c({},a,{saveDOMNodeRef:s,style:u?c({},o,{maxHeight:u}):o,onChange:t.onChange})},t}return o(t,e),t.prototype.componentDidMount=function(){var e=this,t=this.props,n=t.onResize;"number"==typeof t.maxRows&&this.updateLineHeight(),setTimeout((function(){return s(e.textarea)})),n&&this.textarea.addEventListener("autosize:resized",n)},t.prototype.componentWillUnmount=function(){var e=this.props.onResize;e&&this.textarea.removeEventListener("autosize:resized",e),this.dispatchEvent("autosize:destroy")},t.prototype.render=function(){var e=this.getLocals(),t=e.children,n=e.saveDOMNodeRef,r=i(e,["children","saveDOMNodeRef"]);return a.createElement("textarea",c({},r,{ref:n}),t)},t.prototype.componentDidUpdate=function(){this.props.value!==this.currentValue&&this.dispatchEvent("autosize:update")},t.defaultProps={rows:1},t.propTypes={rows:l.number,maxRows:l.number,onResize:l.func,innerRef:l.func},t}(a.Component);t.default=d},function(e,t,n){var r,o,c;o=[e,t],void 0===(c="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){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){}}}}function a(e){var t=o.get(e);t&&t.destroy()}function l(e){var t=o.get(e);t&&t.update()}var s=null;"undefined"==typeof window||"function"!=typeof window.getComputedStyle?((s=function(e){return e}).destroy=function(e){return e},s.update=function(e){return e}):((s=function(e,t){return e&&Array.prototype.forEach.call(e.length?e:[e],(function(e){return i(e)})),e}).destroy=function(e){return e&&Array.prototype.forEach.call(e.length?e:[e],a),e},s.update=function(e){return e&&Array.prototype.forEach.call(e.length?e:[e],l),e}),t.default=s,e.exports=t.default})?r.apply(t,o):r)||(e.exports=c)},function(e,t,n){var r=n(188);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}},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()}))]}},function(e,t,n){"use strict";var r=n(0),o=n(6),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},function(e,t,n){"use strict";var r=n(191);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 f=r.isWindow(t),b=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,C=void 0;f?(y=t,C=r.height(y),E=r.width(y),_={left:r.scrollLeft(y),top:r.scrollTop(y)},j={left:b.left-_.left-s,top:b.top-_.top-l},k={left:b.left+m-(_.left+E)+d,top:b.top+p-(_.top+C)+u},h=_):(v=r.offset(t),g=t.clientHeight,O=t.clientWidth,h={left:t.scrollLeft,top:t.scrollTop},j={left:b.left-(v.left+(parseFloat(r.css(t,"borderLeftWidth"))||0))-s,top:b.top-(v.top+(parseFloat(r.css(t,"borderTopWidth"))||0))-l},k={left:b.left+m-(v.left+O+(parseFloat(r.css(t,"borderRightWidth"))||0))+d,top:b.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)))}},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";var f=void 0;function b(e,t){for(var n=0;n<e.length;n++)t(e[n])}function p(e){return"border-box"===f(e,"boxSizing")}"undefined"!=typeof window&&(f=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=void 0;a="border"===o?o+n[i]+"Width":o+n[i],r+=parseFloat(f(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=(f(e),p(e)),i=0;(null==o||o<=0)&&(o=void 0,(null==(i=f(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)}b(["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)):f(e,t);for(var c in t)t.hasOwnProperty(c)&&_(e,c,t[c])}b(["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){if(void 0===r)return t&&y(t,e,-1);if(t){f(t);return p(t)&&(r+=g(t,["padding","border"],n)),_(t,e,r)}}})),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:b,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)},function(e,t,n){"use strict";var r=n(0),o=n(6),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},,,,,,,,function(e,t,n){"use strict";var r=n(0),o=n(6),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},,,,,,,,,function(e,t,n){"use strict";t.__esModule=!0,t.default=t.EXITING=t.ENTERED=t.ENTERING=t.EXITED=t.UNMOUNTED=void 0;var r=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){var r=Object.defineProperty&&Object.getOwnPropertyDescriptor?Object.getOwnPropertyDescriptor(e,n):{};r.get||r.set?Object.defineProperty(t,n,r):t[n]=e[n]}return t.default=e,t}(n(22)),o=a(n(8)),c=a(n(106)),i=n(210);n(211);function a(e){return e&&e.__esModule?e:{default:e}}t.UNMOUNTED="unmounted";t.EXITED="exited";t.ENTERING="entering";t.ENTERED="entered";t.EXITING="exiting";var l=function(e){var t,n;function r(t,n){var r;r=e.call(this,t,n)||this;var o,c=n.transitionGroup,i=c&&!c.isMounting?t.enter:t.appear;return r.appearStatus=null,t.in?i?(o="exited",r.appearStatus="entering"):o="entered":o=t.unmountOnExit||t.mountOnEnter?"unmounted":"exited",r.state={status:o},r.nextCallback=null,r}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n;var i=r.prototype;return i.getChildContext=function(){return{transitionGroup:null}},r.getDerivedStateFromProps=function(e,t){return e.in&&"unmounted"===t.status?{status:"exited"}:null},i.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},i.componentDidUpdate=function(e){var t=null;if(e!==this.props){var n=this.state.status;this.props.in?"entering"!==n&&"entered"!==n&&(t="entering"):"entering"!==n&&"entered"!==n||(t="exiting")}this.updateStatus(!1,t)},i.componentWillUnmount=function(){this.cancelNextCallback()},i.getTimeouts=function(){var e,t,n,r=this.props.timeout;return e=t=n=r,null!=r&&"number"!=typeof r&&(e=r.exit,t=r.enter,n=void 0!==r.appear?r.appear:t),{exit:e,enter:t,appear:n}},i.updateStatus=function(e,t){if(void 0===e&&(e=!1),null!==t){this.cancelNextCallback();var n=c.default.findDOMNode(this);"entering"===t?this.performEnter(n,e):this.performExit(n)}else this.props.unmountOnExit&&"exited"===this.state.status&&this.setState({status:"unmounted"})},i.performEnter=function(e,t){var n=this,r=this.props.enter,o=this.context.transitionGroup?this.context.transitionGroup.isMounting:t,c=this.getTimeouts(),i=o?c.appear:c.enter;t||r?(this.props.onEnter(e,o),this.safeSetState({status:"entering"},(function(){n.props.onEntering(e,o),n.onTransitionEnd(e,i,(function(){n.safeSetState({status:"entered"},(function(){n.props.onEntered(e,o)}))}))}))):this.safeSetState({status:"entered"},(function(){n.props.onEntered(e)}))},i.performExit=function(e){var t=this,n=this.props.exit,r=this.getTimeouts();n?(this.props.onExit(e),this.safeSetState({status:"exiting"},(function(){t.props.onExiting(e),t.onTransitionEnd(e,r.exit,(function(){t.safeSetState({status:"exited"},(function(){t.props.onExited(e)}))}))}))):this.safeSetState({status:"exited"},(function(){t.props.onExited(e)}))},i.cancelNextCallback=function(){null!==this.nextCallback&&(this.nextCallback.cancel(),this.nextCallback=null)},i.safeSetState=function(e,t){t=this.setNextCallback(t),this.setState(e,t)},i.setNextCallback=function(e){var t=this,n=!0;return this.nextCallback=function(r){n&&(n=!1,t.nextCallback=null,e(r))},this.nextCallback.cancel=function(){n=!1},this.nextCallback},i.onTransitionEnd=function(e,t,n){this.setNextCallback(n);var r=null==t&&!this.props.addEndListener;e&&!r?(this.props.addEndListener&&this.props.addEndListener(e,this.nextCallback),null!=t&&setTimeout(this.nextCallback,t)):setTimeout(this.nextCallback,0)},i.render=function(){var e=this.state.status;if("unmounted"===e)return null;var t=this.props,n=t.children,r=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}(t,["children"]);if(delete r.in,delete r.mountOnEnter,delete r.unmountOnExit,delete r.appear,delete r.enter,delete r.exit,delete r.timeout,delete r.addEndListener,delete r.onEnter,delete r.onEntering,delete r.onEntered,delete r.onExit,delete r.onExiting,delete r.onExited,"function"==typeof n)return n(e,r);var c=o.default.Children.only(n);return o.default.cloneElement(c,r)},r}(o.default.Component);function s(){}l.contextTypes={transitionGroup:r.object},l.childContextTypes={transitionGroup:function(){}},l.propTypes={},l.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:s,onEntering:s,onEntered:s,onExit:s,onExiting:s,onExited:s},l.UNMOUNTED=0,l.EXITED=1,l.ENTERING=2,l.ENTERED=3,l.EXITING=4;var u=(0,i.polyfill)(l);t.default=u},function(e,t,n){"use strict";function r(){var e=this.constructor.getDerivedStateFromProps(this.props,this.state);null!=e&&this.setState(e)}function o(e){this.setState(function(t){var n=this.constructor.getDerivedStateFromProps(e,t);return null!=n?n:null}.bind(this))}function c(e,t){try{var n=this.props,r=this.state;this.props=e,this.state=t,this.__reactInternalSnapshotFlag=!0,this.__reactInternalSnapshot=this.getSnapshotBeforeUpdate(n,r)}finally{this.props=n,this.state=r}}function i(e){var t=e.prototype;if(!t||!t.isReactComponent)throw new Error("Can only polyfill class components");if("function"!=typeof e.getDerivedStateFromProps&&"function"!=typeof t.getSnapshotBeforeUpdate)return e;var n=null,i=null,a=null;if("function"==typeof t.componentWillMount?n="componentWillMount":"function"==typeof t.UNSAFE_componentWillMount&&(n="UNSAFE_componentWillMount"),"function"==typeof t.componentWillReceiveProps?i="componentWillReceiveProps":"function"==typeof t.UNSAFE_componentWillReceiveProps&&(i="UNSAFE_componentWillReceiveProps"),"function"==typeof t.componentWillUpdate?a="componentWillUpdate":"function"==typeof t.UNSAFE_componentWillUpdate&&(a="UNSAFE_componentWillUpdate"),null!==n||null!==i||null!==a){var l=e.displayName||e.name,s="function"==typeof e.getDerivedStateFromProps?"getDerivedStateFromProps()":"getSnapshotBeforeUpdate()";throw Error("Unsafe legacy lifecycles will not be called for components using new component APIs.\n\n"+l+" uses "+s+" but also contains the following legacy lifecycles:"+(null!==n?"\n "+n:"")+(null!==i?"\n "+i:"")+(null!==a?"\n "+a:"")+"\n\nThe above lifecycles should be removed. Learn more about this warning here:\nhttps://fb.me/react-async-component-lifecycle-hooks")}if("function"==typeof e.getDerivedStateFromProps&&(t.componentWillMount=r,t.componentWillReceiveProps=o),"function"==typeof t.getSnapshotBeforeUpdate){if("function"!=typeof t.componentDidUpdate)throw new Error("Cannot polyfill getSnapshotBeforeUpdate() for components that do not define componentDidUpdate() on the prototype");t.componentWillUpdate=c;var u=t.componentDidUpdate;t.componentDidUpdate=function(e,t,n){var r=this.__reactInternalSnapshotFlag?this.__reactInternalSnapshot:n;u.call(this,e,t,r)}}return e}n.r(t),n.d(t,"polyfill",(function(){return i})),r.__suppressDeprecationWarning=!0,o.__suppressDeprecationWarning=!0,c.__suppressDeprecationWarning=!0},function(e,t,n){"use strict";t.__esModule=!0,t.classNamesShape=t.timeoutsShape=void 0;var r;(r=n(22))&&r.__esModule;t.timeoutsShape=null;t.classNamesShape=null},function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var r=a(n(22)),o=a(n(8)),c=n(210),i=n(297);function a(e){return e&&e.__esModule?e:{default:e}}function l(){return(l=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)}function s(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}var u=Object.values||function(e){return Object.keys(e).map((function(t){return e[t]}))},d=function(e){var t,n;function r(t,n){var r,o=(r=e.call(this,t,n)||this).handleExited.bind(s(s(r)));return r.state={handleExited:o,firstRender:!0},r}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n;var c=r.prototype;return c.getChildContext=function(){return{transitionGroup:{isMounting:!this.appeared}}},c.componentDidMount=function(){this.appeared=!0,this.mounted=!0},c.componentWillUnmount=function(){this.mounted=!1},r.getDerivedStateFromProps=function(e,t){var n=t.children,r=t.handleExited;return{children:t.firstRender?(0,i.getInitialChildMapping)(e,r):(0,i.getNextChildMapping)(e,n,r),firstRender:!1}},c.handleExited=function(e,t){var n=(0,i.getChildMapping)(this.props.children);e.key in n||(e.props.onExited&&e.props.onExited(t),this.mounted&&this.setState((function(t){var n=l({},t.children);return delete n[e.key],{children:n}})))},c.render=function(){var e=this.props,t=e.component,n=e.childFactory,r=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}(e,["component","childFactory"]),c=u(this.state.children).map(n);return delete r.appear,delete r.enter,delete r.exit,null===t?c:o.default.createElement(t,r,c)},r}(o.default.Component);d.childContextTypes={transitionGroup:r.default.object.isRequired},d.propTypes={},d.defaultProps={component:"div",childFactory:function(e){return e}};var f=(0,c.polyfill)(d);t.default=f,e.exports=t.default},function(e,t,n){"use strict";var r=n(0),o=n(6),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},function(e,t,n){"use strict";var r=n(0),o=n(6),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},function(e,t,n){"use strict";var r=n(0),o=n(6),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},function(e,t,n){"use strict";var r=n(0),o=n(6),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},function(e,t,n){"use strict";var r=n(0),o=n(6),c=Object(r.createElement)(o.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"-2 -2 24 24"},Object(r.createElement)(o.Path,{d:"M16 4h2v9H7v3l-5-4 5-4v3h9V4z"}));t.a=c},function(e,t,n){"use strict";var r=n(0),o=n(6),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},,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t=e.dispatch;return function(e){return function(n){return Array.isArray(n)?n.filter(Boolean).map(t):e(n)}}}},function(e,t,n){"use strict";(function(e){n.d(t,"a",(function(){return l}));var r=n(20),o=n(0),c=n(175),i=n(2),a=(n(94),n(131));function l(e){var t=e.children,n=e.className;return Object(o.createElement)(a.a.Slot,{__experimentalIsExpanded:!0},(function(e){return Object(o.createElement)(s,{className:n,fills:e},t)}))}function s(t){var n=t.fills,a=t.className,l=void 0===a?"":a,s=t.children,u=Object(o.useRef)(),d=Object(o.useRef)(),f=Object(o.useRef)(),b=Object(o.useState)({}),p=Object(r.a)(b,2),m=p[0],v=p[1],g=Object(o.useRef)();g.current=n;var O=Object(o.useCallback)(Object(i.throttle)((function(){var e=g.current.length?d.current:f.current;if(e){e.style.position="absolute",e.style.width="auto";var t,n=(t=e).ownerDocument.defaultView.getComputedStyle(t);v({width:n.getPropertyValue("width"),height:n.getPropertyValue("height")}),e.style.position="",e.style.width=""}}),100),[]);Object(o.useEffect)((function(){var e=new window.MutationObserver((function(e){e.find((function(e){return"childList"===e.type}))&&O()}));return e.observe(u.current,{childList:!0,subtree:!0}),function(){return e.disconnect()}}),[]),Object(o.useEffect)((function(){n.length>1&&void 0!==e&&e.env}),[n.length]);var h=n[0];return Object(o.createElement)("div",{className:"block-editor-block-toolbar-animated-width-container",ref:u,style:m},Object(o.createElement)(c.TransitionGroup,null,h?Object(o.createElement)(c.CSSTransition,{key:"fills",timeout:300,classNames:"block-editor-block-toolbar-content"},Object(o.createElement)("div",{className:l,ref:d},h)):Object(o.createElement)(c.CSSTransition,{key:"default",timeout:300,classNames:"block-editor-block-toolbar-content"},Object(o.createElement)("div",{className:l,ref:f},s))))}}).call(this,n(101))},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(298))&&r.__esModule?r:{default:r}).default);t.characterDiff=o},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}}},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 f=n?c(d):d,b={},p=!0,m={node:f,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){b.before=e},after:function(e){b.after=e},pre:function(e){b.pre=e},post:function(e){b.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),b.before&&b.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),b.pre&&b.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,b.post&&b.post.call(m,c),r.pop()})),o.pop()),b.after&&b.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}},,,,,,,,,,,,,,,,,,,,function(e,t,n){"use strict";var r=n(0),o=n(6),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},function(e,t,n){"use strict";var r=n(0),o=n(6),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},function(e,t,n){"use strict";var r=n(0),o=n(6),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},function(e,t,n){"use strict";var r=n(0),o=n(6),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},function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;!function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){var r=Object.defineProperty&&Object.getOwnPropertyDescriptor?Object.getOwnPropertyDescriptor(e,n):{};r.get||r.set?Object.defineProperty(t,n,r):t[n]=e[n]}t.default=e}(n(22));var r=a(n(292)),o=a(n(295)),c=a(n(8)),i=a(n(209));n(211);function a(e){return e&&e.__esModule?e:{default:e}}function l(){return(l=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)}var s=function(e,t){return e&&t&&t.split(" ").forEach((function(t){return(0,r.default)(e,t)}))},u=function(e,t){return e&&t&&t.split(" ").forEach((function(t){return(0,o.default)(e,t)}))},d=function(e){var t,n;function r(){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).onEnter=function(e,n){var r=t.getClassNames(n?"appear":"enter").className;t.removeClasses(e,"exit"),s(e,r),t.props.onEnter&&t.props.onEnter(e,n)},t.onEntering=function(e,n){var r=t.getClassNames(n?"appear":"enter").activeClassName;t.reflowAndAddClass(e,r),t.props.onEntering&&t.props.onEntering(e,n)},t.onEntered=function(e,n){var r=t.getClassNames("appear").doneClassName,o=t.getClassNames("enter").doneClassName,c=n?r+" "+o:o;t.removeClasses(e,n?"appear":"enter"),s(e,c),t.props.onEntered&&t.props.onEntered(e,n)},t.onExit=function(e){var n=t.getClassNames("exit").className;t.removeClasses(e,"appear"),t.removeClasses(e,"enter"),s(e,n),t.props.onExit&&t.props.onExit(e)},t.onExiting=function(e){var n=t.getClassNames("exit").activeClassName;t.reflowAndAddClass(e,n),t.props.onExiting&&t.props.onExiting(e)},t.onExited=function(e){var n=t.getClassNames("exit").doneClassName;t.removeClasses(e,"exit"),s(e,n),t.props.onExited&&t.props.onExited(e)},t.getClassNames=function(e){var n=t.props.classNames,r="string"==typeof n,o=r?(r&&n?n+"-":"")+e:n[e];return{className:o,activeClassName:r?o+"-active":n[e+"Active"],doneClassName:r?o+"-done":n[e+"Done"]}},t}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n;var o=r.prototype;return o.removeClasses=function(e,t){var n=this.getClassNames(t),r=n.className,o=n.activeClassName,c=n.doneClassName;r&&u(e,r),o&&u(e,o),c&&u(e,c)},o.reflowAndAddClass=function(e,t){t&&(e&&e.scrollTop,s(e,t))},o.render=function(){var e=l({},this.props);return delete e.classNames,c.default.createElement(i.default,l({},e,{onEnter:this.onEnter,onEntered:this.onEntered,onEntering:this.onEntering,onExit:this.onExit,onExiting:this.onExiting,onExited:this.onExited}))},r}(c.default.Component);d.defaultProps={classNames:""},d.propTypes={};var f=d;t.default=f,e.exports=t.default},function(e,t,n){"use strict";var r=n(293);t.__esModule=!0,t.default=function(e,t){e.classList?e.classList.add(t):(0,o.default)(e,t)||("string"==typeof e.className?e.className=e.className+" "+t:e.setAttribute("class",(e.className&&e.className.baseVal||"")+" "+t))};var o=r(n(294));e.exports=t.default},function(e,t){e.exports=function(e){return e&&e.__esModule?e:{default:e}}},function(e,t,n){"use strict";t.__esModule=!0,t.default=function(e,t){return e.classList?!!t&&e.classList.contains(t):-1!==(" "+(e.className.baseVal||e.className)+" ").indexOf(" "+t+" ")},e.exports=t.default},function(e,t,n){"use strict";function r(e,t){return e.replace(new RegExp("(^|\\s)"+t+"(?:\\s|$)","g"),"$1").replace(/\s+/g," ").replace(/^\s*|\s*$/g,"")}e.exports=function(e,t){e.classList?e.classList.remove(t):"string"==typeof e.className?e.className=r(e.className,t):e.setAttribute("class",r(e.className&&e.className.baseVal||"",t))}},function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;i(n(22));var r=i(n(8)),o=n(106),c=i(n(212));function i(e){return e&&e.__esModule?e:{default:e}}var a=function(e){var t,n;function i(){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).handleEnter=function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return t.handleLifecycle("onEnter",0,n)},t.handleEntering=function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return t.handleLifecycle("onEntering",0,n)},t.handleEntered=function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return t.handleLifecycle("onEntered",0,n)},t.handleExit=function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return t.handleLifecycle("onExit",1,n)},t.handleExiting=function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return t.handleLifecycle("onExiting",1,n)},t.handleExited=function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return t.handleLifecycle("onExited",1,n)},t}n=e,(t=i).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n;var a=i.prototype;return a.handleLifecycle=function(e,t,n){var c,i=this.props.children,a=r.default.Children.toArray(i)[t];a.props[e]&&(c=a.props)[e].apply(c,n),this.props[e]&&this.props[e]((0,o.findDOMNode)(this))},a.render=function(){var e=this.props,t=e.children,n=e.in,o=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}(e,["children","in"]),i=r.default.Children.toArray(t),a=i[0],l=i[1];return delete o.onEnter,delete o.onEntering,delete o.onEntered,delete o.onExit,delete o.onExiting,delete o.onExited,r.default.createElement(c.default,o,n?r.default.cloneElement(a,{key:"first",onEnter:this.handleEnter,onEntering:this.handleEntering,onEntered:this.handleEntered}):r.default.cloneElement(l,{key:"second",onEnter:this.handleExit,onEntering:this.handleExiting,onEntered:this.handleExited}))},i}(r.default.Component);a.propTypes={};var l=a;t.default=l,e.exports=t.default},function(e,t,n){"use strict";t.__esModule=!0,t.getChildMapping=o,t.mergeChildMappings=c,t.getInitialChildMapping=function(e,t){return o(e.children,(function(n){return(0,r.cloneElement)(n,{onExited:t.bind(null,n),in:!0,appear:i(n,"appear",e),enter:i(n,"enter",e),exit:i(n,"exit",e)})}))},t.getNextChildMapping=function(e,t,n){var a=o(e.children),l=c(t,a);return Object.keys(l).forEach((function(o){var c=l[o];if((0,r.isValidElement)(c)){var s=o in t,u=o in a,d=t[o],f=(0,r.isValidElement)(d)&&!d.props.in;!u||s&&!f?u||!s||f?u&&s&&(0,r.isValidElement)(d)&&(l[o]=(0,r.cloneElement)(c,{onExited:n.bind(null,c),in:d.props.in,exit:i(c,"exit",e),enter:i(c,"enter",e)})):l[o]=(0,r.cloneElement)(c,{in:!1}):l[o]=(0,r.cloneElement)(c,{onExited:n.bind(null,c),in:!0,exit:i(c,"exit",e),enter:i(c,"enter",e)})}})),l};var r=n(8);function o(e,t){var n=Object.create(null);return e&&r.Children.map(e,(function(e){return e})).forEach((function(e){n[e.key]=function(e){return t&&(0,r.isValidElement)(e)?t(e):e}(e)})),n}function c(e,t){function n(n){return n in t?t[n]:e[n]}e=e||{},t=t||{};var r,o=Object.create(null),c=[];for(var i in e)i in t?c.length&&(o[i]=c,c=[]):c.push(i);var a={};for(var l in t){if(o[l])for(r=0;r<o[l].length;r++){var s=o[l][r];a[o[l][r]]=n(s)}a[l]=n(l)}for(r=0;r<c.length;r++)a[c[r]]=n(c[r]);return a}function i(e,t,n){return null!=n[t]?n[t]:e.props[t]}},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 f=t[i-1];return i>1&&"string"==typeof f.value&&(f.added||f.removed)&&e.equals("",f.value)&&(t[i-2].value+=f.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,f=[{newPos:-1,components:[]}],b=this.extractCommon(f[0],t,e,0);if(f[0].newPos+1>=l&&b+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=f[n-1],b=f[n+1],p=(b?b.newPos:0)-n;d&&(f[n-1]=void 0);var m=d&&d.newPos+1<l,v=b&&0<=p&&p<s;if(m||v){if(!m||v&&d.newPos<b.newPos?(r=c(b),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));f[n]=r}else f[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("")}}},function(e,t,n){"use strict";var r=n(0),o=n(6),c=Object(r.createElement)(o.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"-2 -2 24 24"},Object(r.createElement)(o.Path,{d:"M2 2h5v11H2V2zm6 0h5v5H8V2zm6 0h4v16h-4V2zM8 8h5v5H8V8zm-6 6h11v4H2v-4z"}));t.a=c},function(e,t,n){"use strict";var r=n(0),o=n(6),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},,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(e,t,n){"use strict";n.r(t),n.d(t,"__experimentalAlignmentHookSettingsProvider",(function(){return F})),n.d(t,"getColorClassName",(function(){return pe})),n.d(t,"getColorObjectByAttributeValues",(function(){return fe})),n.d(t,"getColorObjectByColorValue",(function(){return be})),n.d(t,"createCustomColorsHOC",(function(){return dn})),n.d(t,"withColors",(function(){return fn})),n.d(t,"__experimentalUseColors",(function(){return In})),n.d(t,"__experimentalGetGradientClass",(function(){return Oe})),n.d(t,"getGradientValueBySlug",(function(){return he})),n.d(t,"__experimentalGetGradientObjectByGradientValue",(function(){return je})),n.d(t,"getGradientSlugByValue",(function(){return ke})),n.d(t,"__experimentalUseGradient",(function(){return ye})),n.d(t,"getFontSize",(function(){return yt})),n.d(t,"getFontSizeClass",(function(){return Et})),n.d(t,"getFontSizeObjectByValue",(function(){return _t})),n.d(t,"FontSizePicker",(function(){return Ct})),n.d(t,"withFontSizes",(function(){return Nn})),n.d(t,"AlignmentToolbar",(function(){return Hn})),n.d(t,"Autocomplete",(function(){return or})),n.d(t,"BlockAlignmentToolbar",(function(){return T})),n.d(t,"__experimentalBlockAlignmentMatrixToolbar",(function(){return cr})),n.d(t,"BlockBreadcrumb",(function(){return ar})),n.d(t,"BlockContextProvider",(function(){return dr})),n.d(t,"BlockControls",(function(){return g.a})),n.d(t,"BlockColorsStyleSelector",(function(){return mr})),n.d(t,"BlockEdit",(function(){return Or})),n.d(t,"useBlockEditContext",(function(){return z.b})),n.d(t,"BlockFormatControls",(function(){return _r})),n.d(t,"BlockIcon",(function(){return tr})),n.d(t,"BlockNavigationDropdown",(function(){return cd})),n.d(t,"__experimentalBlockNavigationBlockFill",(function(){return Gu})),n.d(t,"__experimentalBlockNavigationEditor",(function(){return jd})),n.d(t,"__experimentalBlockNavigationTree",(function(){return td})),n.d(t,"__experimentalBlockVariationPicker",(function(){return yd})),n.d(t,"BlockVerticalAlignmentToolbar",(function(){return xd})),n.d(t,"ButtonBlockerAppender",(function(){return rl})),n.d(t,"ColorPalette",(function(){return Dd})),n.d(t,"ColorPaletteControl",(function(){return Rd})),n.d(t,"ContrastChecker",(function(){return We})),n.d(t,"__experimentalGradientPicker",(function(){return Ld})),n.d(t,"__experimentalGradientPickerControl",(function(){return Fd})),n.d(t,"__experimentalGradientPickerPanel",(function(){return Vd})),n.d(t,"__experimentalColorGradientControl",(function(){return Ne})),n.d(t,"__experimentalPanelColorGradientSettings",(function(){return ze})),n.d(t,"__experimentalImageSizeControl",(function(){return zd})),n.d(t,"InnerBlocks",(function(){return tf})),n.d(t,"__experimentalUseInnerBlocksProps",(function(){return ef})),n.d(t,"InspectorAdvancedControls",(function(){return q})),n.d(t,"InspectorControls",(function(){return Qe})),n.d(t,"__experimentalLinkControl",(function(){return Af})),n.d(t,"__experimentalLinkControlSearchInput",(function(){return Bf})),n.d(t,"__experimentalLinkControlSearchResults",(function(){return Of})),n.d(t,"__experimentalLinkControlSearchItem",(function(){return gf})),n.d(t,"LineHeightControl",(function(){return mt})),n.d(t,"MediaReplaceFlow",(function(){return Hf})),n.d(t,"MediaPlaceholder",(function(){return qf})),n.d(t,"MediaUpload",(function(){return Ff})),n.d(t,"MediaUploadCheck",(function(){return Vf})),n.d(t,"PanelColorSettings",(function(){return gn})),n.d(t,"PlainText",(function(){return Xf})),n.d(t,"__experimentalResponsiveBlockControl",(function(){return Zf})),n.d(t,"RichText",(function(){return hd})),n.d(t,"RichTextShortcut",(function(){return Jf})),n.d(t,"RichTextToolbarButton",(function(){return eb})),n.d(t,"__unstableRichTextInputEvent",(function(){return nb})),n.d(t,"ToolSelector",(function(){return ob})),n.d(t,"__experimentalUnitControl",(function(){return Rt})),n.d(t,"URLInput",(function(){return bf})),n.d(t,"URLInputButton",(function(){return lb})),n.d(t,"URLPopover",(function(){return Wf})),n.d(t,"__experimentalImageURLInputUI",(function(){return fb})),n.d(t,"withColorContext",(function(){return Nd})),n.d(t,"__experimentalBlockSettingsMenuFirstItem",(function(){return Zs})),n.d(t,"__experimentalInserterMenuExtension",(function(){return Rl})),n.d(t,"__experimentalPreviewOptions",(function(){return pb})),n.d(t,"__experimentalUseResizeCanvas",(function(){return kb})),n.d(t,"BlockInspector",(function(){return Sb})),n.d(t,"BlockList",(function(){return hl})),n.d(t,"__experimentalBlock",(function(){return xu})),n.d(t,"useBlockProps",(function(){return Iu})),n.d(t,"BlockMover",(function(){return Ss})),n.d(t,"BlockPreview",(function(){return yl})),n.d(t,"BlockSelectionClearer",(function(){return Ib})),n.d(t,"BlockSettingsMenu",(function(){return au})),n.d(t,"BlockSettingsMenuControls",(function(){return ou})),n.d(t,"BlockTitle",(function(){return ir})),n.d(t,"BlockToolbar",(function(){return bu})),n.d(t,"CopyHandler",(function(){return Ws})),n.d(t,"DefaultBlockAppender",(function(){return nl})),n.d(t,"__unstableEditorStyles",(function(){return Jb})),n.d(t,"Inserter",(function(){return fs})),n.d(t,"__experimentalLibrary",(function(){return ep})),n.d(t,"__experimentalSearchForm",(function(){return ko})),n.d(t,"BlockEditorKeyboardShortcuts",(function(){return np})),n.d(t,"MultiSelectScrollIntoView",(function(){return rp})),n.d(t,"NavigableToolbar",(function(){return _s})),n.d(t,"ObserveTyping",(function(){return cp})),n.d(t,"PreserveScrollInReorder",(function(){return ip})),n.d(t,"SkipToSelectedBlock",(function(){return yb})),n.d(t,"Typewriter",(function(){return dp})),n.d(t,"Warning",(function(){return Xr})),n.d(t,"WritingFlow",(function(){return gs})),n.d(t,"BlockEditorProvider",(function(){return el})),n.d(t,"__experimentalUseSimulatedMediaQuery",(function(){return jb})),n.d(t,"__experimentalUseEditorFeature",(function(){return ve})),n.d(t,"transformStyles",(function(){return Zb})),n.d(t,"validateThemeColors",(function(){return fp})),n.d(t,"validateThemeGradients",(function(){return bp})),n.d(t,"storeConfig",(function(){return Qa})),n.d(t,"SETTINGS_DEFAULTS",(function(){return Eo}));var r={};n.r(r),n.d(r,"resetBlocks",(function(){return sc})),n.d(r,"resetSelection",(function(){return uc})),n.d(r,"receiveBlocks",(function(){return dc})),n.d(r,"updateBlockAttributes",(function(){return fc})),n.d(r,"updateBlock",(function(){return bc})),n.d(r,"selectBlock",(function(){return pc})),n.d(r,"selectPreviousBlock",(function(){return mc})),n.d(r,"selectNextBlock",(function(){return vc})),n.d(r,"startMultiSelect",(function(){return gc})),n.d(r,"stopMultiSelect",(function(){return Oc})),n.d(r,"multiSelect",(function(){return hc})),n.d(r,"clearSelectedBlock",(function(){return jc})),n.d(r,"toggleSelection",(function(){return kc})),n.d(r,"replaceBlocks",(function(){return _c})),n.d(r,"replaceBlock",(function(){return Ec})),n.d(r,"moveBlocksDown",(function(){return wc})),n.d(r,"moveBlocksUp",(function(){return Sc})),n.d(r,"moveBlocksToPosition",(function(){return Ic})),n.d(r,"moveBlockToPosition",(function(){return Bc})),n.d(r,"insertBlock",(function(){return xc})),n.d(r,"insertBlocks",(function(){return Pc})),n.d(r,"showInsertionPoint",(function(){return Tc})),n.d(r,"hideInsertionPoint",(function(){return Nc})),n.d(r,"setTemplateValidity",(function(){return Dc})),n.d(r,"synchronizeTemplate",(function(){return Rc})),n.d(r,"mergeBlocks",(function(){return Ac})),n.d(r,"removeBlocks",(function(){return Mc})),n.d(r,"removeBlock",(function(){return Lc})),n.d(r,"replaceInnerBlocks",(function(){return Fc})),n.d(r,"toggleBlockMode",(function(){return Vc})),n.d(r,"startTyping",(function(){return Hc})),n.d(r,"stopTyping",(function(){return zc})),n.d(r,"startDraggingBlocks",(function(){return Uc})),n.d(r,"stopDraggingBlocks",(function(){return Gc})),n.d(r,"enterFormattedText",(function(){return Wc})),n.d(r,"exitFormattedText",(function(){return Kc})),n.d(r,"selectionChange",(function(){return qc})),n.d(r,"insertDefaultBlock",(function(){return $c})),n.d(r,"updateBlockListSettings",(function(){return Yc})),n.d(r,"updateSettings",(function(){return Xc})),n.d(r,"__unstableSaveReusableBlock",(function(){return Qc})),n.d(r,"__unstableMarkLastChangeAsPersistent",(function(){return Zc})),n.d(r,"__unstableMarkNextChangeAsNotPersistent",(function(){return Jc})),n.d(r,"__unstableMarkAutomaticChange",(function(){return ei})),n.d(r,"setNavigationMode",(function(){return ti})),n.d(r,"setBlockMovingClientId",(function(){return ni})),n.d(r,"duplicateBlocks",(function(){return ri})),n.d(r,"insertBeforeBlock",(function(){return oi})),n.d(r,"insertAfterBlock",(function(){return ci})),n.d(r,"toggleBlockHighlight",(function(){return ii})),n.d(r,"flashBlock",(function(){return ai})),n.d(r,"setHasControlledInnerBlocks",(function(){return li}));var o={};n.r(o),n.d(o,"getBlockName",(function(){return vi})),n.d(o,"isBlockValid",(function(){return gi})),n.d(o,"getBlockAttributes",(function(){return Oi})),n.d(o,"getBlock",(function(){return hi})),n.d(o,"__unstableGetBlockWithoutInnerBlocks",(function(){return ji})),n.d(o,"getBlocks",(function(){return ki})),n.d(o,"__unstableGetBlockWithBlockTree",(function(){return yi})),n.d(o,"__unstableGetBlockTree",(function(){return _i})),n.d(o,"getClientIdsOfDescendants",(function(){return Ei})),n.d(o,"getClientIdsWithDescendants",(function(){return Ci})),n.d(o,"getGlobalBlockCount",(function(){return wi})),n.d(o,"getBlocksByClientId",(function(){return Si})),n.d(o,"getBlockCount",(function(){return Ii})),n.d(o,"getSelectionStart",(function(){return Bi})),n.d(o,"getSelectionEnd",(function(){return xi})),n.d(o,"getBlockSelectionStart",(function(){return Pi})),n.d(o,"getBlockSelectionEnd",(function(){return Ti})),n.d(o,"getSelectedBlockCount",(function(){return Ni})),n.d(o,"hasSelectedBlock",(function(){return Di})),n.d(o,"getSelectedBlockClientId",(function(){return Ri})),n.d(o,"getSelectedBlock",(function(){return Ai})),n.d(o,"getBlockRootClientId",(function(){return Mi})),n.d(o,"getBlockParents",(function(){return Li})),n.d(o,"getBlockParentsByBlockName",(function(){return Fi})),n.d(o,"getBlockHierarchyRootClientId",(function(){return Vi})),n.d(o,"getLowestCommonAncestorWithSelectedBlock",(function(){return Hi})),n.d(o,"getAdjacentBlockClientId",(function(){return zi})),n.d(o,"getPreviousBlockClientId",(function(){return Ui})),n.d(o,"getNextBlockClientId",(function(){return Gi})),n.d(o,"getSelectedBlocksInitialCaretPosition",(function(){return Wi})),n.d(o,"getSelectedBlockClientIds",(function(){return Ki})),n.d(o,"getMultiSelectedBlockClientIds",(function(){return qi})),n.d(o,"getMultiSelectedBlocks",(function(){return $i})),n.d(o,"getFirstMultiSelectedBlockClientId",(function(){return Yi})),n.d(o,"getLastMultiSelectedBlockClientId",(function(){return Xi})),n.d(o,"isFirstMultiSelectedBlock",(function(){return Qi})),n.d(o,"isBlockMultiSelected",(function(){return Zi})),n.d(o,"isAncestorMultiSelected",(function(){return Ji})),n.d(o,"getMultiSelectedBlocksStartClientId",(function(){return ea})),n.d(o,"getMultiSelectedBlocksEndClientId",(function(){return ta})),n.d(o,"getBlockOrder",(function(){return na})),n.d(o,"getBlockIndex",(function(){return ra})),n.d(o,"isBlockSelected",(function(){return oa})),n.d(o,"hasSelectedInnerBlock",(function(){return ca})),n.d(o,"isBlockWithinSelection",(function(){return ia})),n.d(o,"hasMultiSelection",(function(){return aa})),n.d(o,"isMultiSelecting",(function(){return la})),n.d(o,"isSelectionEnabled",(function(){return sa})),n.d(o,"getBlockMode",(function(){return ua})),n.d(o,"isTyping",(function(){return da})),n.d(o,"isDraggingBlocks",(function(){return fa})),n.d(o,"getDraggedBlockClientIds",(function(){return ba})),n.d(o,"isBlockBeingDragged",(function(){return pa})),n.d(o,"isAncestorBeingDragged",(function(){return ma})),n.d(o,"isCaretWithinFormattedText",(function(){return va})),n.d(o,"getBlockInsertionPoint",(function(){return ga})),n.d(o,"isBlockInsertionPointVisible",(function(){return Oa})),n.d(o,"isValidTemplate",(function(){return ha})),n.d(o,"getTemplate",(function(){return ja})),n.d(o,"getTemplateLock",(function(){return ka})),n.d(o,"canInsertBlockType",(function(){return _a})),n.d(o,"canInsertBlocks",(function(){return Ea})),n.d(o,"getInserterItems",(function(){return Ia})),n.d(o,"hasInserterItems",(function(){return Ba})),n.d(o,"__experimentalGetAllowedBlocks",(function(){return xa})),n.d(o,"getBlockListSettings",(function(){return Pa})),n.d(o,"getSettings",(function(){return Ta})),n.d(o,"isLastBlockChangePersistent",(function(){return Na})),n.d(o,"__experimentalGetBlockListSettingsForBlocks",(function(){return Da})),n.d(o,"__experimentalGetParsedReusableBlock",(function(){return Ra})),n.d(o,"__unstableIsLastBlockChangeIgnored",(function(){return Aa})),n.d(o,"__experimentalGetLastBlockAttributeChanges",(function(){return Ma})),n.d(o,"isNavigationMode",(function(){return Fa})),n.d(o,"hasBlockMovingClientId",(function(){return Va})),n.d(o,"didAutomaticChange",(function(){return Ha})),n.d(o,"isBlockHighlighted",(function(){return za})),n.d(o,"areInnerBlocksControlled",(function(){return Ua})),n.d(o,"__experimentalGetActiveBlockIdByBlockNames",(function(){return Ga}));var c=n(9),i=n(17),a=(n(99),n(51)),l=(n(78),n(21));function s(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var u=n(0),d=n(7),f=n.n(d),b=n(2),p=n(10),m=n(26),v=n(4),g=n(131),O=n(1),h=n(3),j=n(6),k=Object(u.createElement)(j.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(u.createElement)(j.Path,{d:"M4 9v6h14V9H4zm8-4.8H4v1.5h8V4.2zM4 19.8h8v-1.5H4v1.5z"})),y=Object(u.createElement)(j.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(u.createElement)(j.Path,{d:"M5 15h14V9H5v6zm0 4.8h14v-1.5H5v1.5zM5 4.2v1.5h14V4.2H5z"})),_=Object(u.createElement)(j.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(u.createElement)(j.Path,{d:"M6 15h14V9H6v6zm6-10.8v1.5h8V4.2h-8zm0 15.6h8v-1.5h-8v1.5z"})),E=Object(u.createElement)(j.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(u.createElement)(j.Path,{d:"M5 9v6h14V9H5zm11-4.8H8v1.5h8V4.2zM8 19.8h8v-1.5H8v1.5z"})),C=Object(u.createElement)(j.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(u.createElement)(j.Path,{d:"M5 4v11h14V4H5zm3 15.8h8v-1.5H8v1.5z"}));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 S(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){s(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 I={left:{icon:k,title:Object(O.__)("Align left")},center:{icon:y,title:Object(O.__)("Align center")},right:{icon:_,title:Object(O.__)("Align right")},wide:{icon:E,title:Object(O.__)("Wide width")},full:{icon:C,title:Object(O.__)("Full width")}},B=["left","center","right","wide","full"],x=["wide","full"],P={isAlternate:!0};var T=Object(p.compose)(Object(v.withSelect)((function(e){return{wideControlsEnabled:(0,e("core/block-editor").getSettings)().alignWide}})))((function(e){var t=e.value,n=e.onChange,r=e.controls,o=void 0===r?B:r,c=e.isCollapsed,i=void 0===c||c,a=e.wideControlsEnabled,l=void 0!==a&&a?o:o.filter((function(e){return-1===x.indexOf(e)})),s=I[t],d=I.center;return Object(u.createElement)(h.ToolbarGroup,{popoverProps:P,isCollapsed:i,icon:s?s.icon:d.icon,label:Object(O.__)("Change alignment"),controls:l.map((function(e){return S(S({},I[e]),{},{isActive:t===e,role:i?"menuitemradio":void 0,onClick:(r=e,function(){return n(t===r?void 0:r)})});var r}))})}));function N(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?N(Object(n),!0).forEach((function(t){s(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):N(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var R=["left","center","right","wide","full"],A=["wide","full"];function M(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)?e:!0===e?R:[],!r||!0===e&&!n?b.without.apply(void 0,[t].concat(A)):t}var L=Object(u.createContext)({}),F=L.Provider,V=Object(p.createHigherOrderComponent)((function(e){return function(t){var n=Object(u.useContext)(L).isEmbedButton,r=t.name,o=n?[]:M(Object(c.getBlockSupport)(r,"align"),Object(c.hasBlockSupport)(r,"alignWide",!0));return[o.length>0&&t.isSelected&&Object(u.createElement)(g.a,{key:"align-controls"},Object(u.createElement)(T,{value:t.attributes.align,onChange:function(e){var n,r;e||(null===(n=Object(c.getBlockType)(t.name).attributes)||void 0===n||null===(r=n.align)||void 0===r?void 0:r.default)&&(e="");t.setAttributes({align:e})},controls:o})),Object(u.createElement)(e,Object(l.a)({key:"edit"},t))]}}),"withToolbarControls"),H=Object(p.createHigherOrderComponent)((function(e){return function(t){var n=t.name,r=t.attributes.align,o=Object(v.useSelect)((function(e){return!!e("core/block-editor").getSettings().alignWide}),[]);if(void 0===r)return Object(u.createElement)(e,t);var i=M(Object(c.getBlockSupport)(n,"align"),Object(c.hasBlockSupport)(n,"alignWide",!0),o),a=t.wrapperProps;return i.includes(r)&&(a=D(D({},a),{},{"data-align":r})),Object(u.createElement)(e,Object(l.a)({},t,{wrapperProps:a}))}}));Object(m.addFilter)("blocks.registerBlockType","core/align/addAttribute",(function(e){return Object(b.has)(e.attributes,["align","type"])||Object(c.hasBlockSupport)(e,"align")&&(e.attributes=D(D({},e.attributes),{},{align:{type:"string",enum:[].concat(R,[""])}})),e})),Object(m.addFilter)("editor.BlockListBlock","core/editor/align/with-data-align",H),Object(m.addFilter)("editor.BlockEdit","core/editor/align/with-toolbar-controls",V),Object(m.addFilter)("blocks.getSaveContent.extraProps","core/align/addAssignedAlign",(function(e,t,n){var r=n.align;return M(Object(c.getBlockSupport)(t,"align"),Object(c.hasBlockSupport)(t,"alignWide",!0)).includes(r)&&(e.className=f()("align".concat(r),e.className)),e}));var z=n(85),U=Object(h.createSlotFill)("InspectorAdvancedControls"),G=U.Fill,W=U.Slot;function K(e){var t=e.children;return Object(z.b)().isSelected?Object(u.createElement)(G,null,t):null}K.slotName="InspectorAdvancedControls",K.Slot=W;var q=K;function $(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 Y(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?$(Object(n),!0).forEach((function(t){s(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):$(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var X=/[\s#]/g;var Q=Object(p.createHigherOrderComponent)((function(e){return function(t){return Object(c.hasBlockSupport)(t.name,"anchor")&&t.isSelected?Object(u.createElement)(u.Fragment,null,Object(u.createElement)(e,t),Object(u.createElement)(q,null,Object(u.createElement)(h.TextControl,{className:"html-anchor-control",label:Object(O.__)("HTML anchor"),help:Object(u.createElement)(u.Fragment,null,Object(O.__)("Enter a word or two — without spaces — to make a unique web address just for this heading, called an “anchor.” Then, you’ll be able to link directly to this section of your page."),Object(u.createElement)(h.ExternalLink,{href:"https://wordpress.org/support/article/page-jumps/"},Object(O.__)("Learn more about anchors"))),value:t.attributes.anchor||"",onChange:function(e){e=e.replace(X,"-"),t.setAttributes({anchor:e})},autoComplete:"off"}))):Object(u.createElement)(e,t)}}),"withInspectorControl");function Z(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 J(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Z(Object(n),!0).forEach((function(t){s(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Z(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}Object(m.addFilter)("blocks.registerBlockType","core/anchor/attribute",(function(e){return Object(b.has)(e.attributes,["anchor","type"])||Object(c.hasBlockSupport)(e,"anchor")&&(e.attributes=Y(Y({},e.attributes),{},{anchor:{type:"string",source:"attribute",attribute:"id",selector:"*"}})),e})),Object(m.addFilter)("editor.BlockEdit","core/editor/anchor/with-inspector-control",Q),Object(m.addFilter)("blocks.getSaveContent.extraProps","core/anchor/save-props",(function(e,t,n){return Object(c.hasBlockSupport)(t,"anchor")&&(e.id=""===n.anchor?null:n.anchor),e}));var ee=Object(p.createHigherOrderComponent)((function(e){return function(t){return Object(c.hasBlockSupport)(t.name,"customClassName",!0)&&t.isSelected?Object(u.createElement)(u.Fragment,null,Object(u.createElement)(e,t),Object(u.createElement)(q,null,Object(u.createElement)(h.TextControl,{autoComplete:"off",label:Object(O.__)("Additional CSS class(es)"),value:t.attributes.className||"",onChange:function(e){t.setAttributes({className:""!==e?e:void 0})},help:Object(O.__)("Separate multiple classes with spaces.")}))):Object(u.createElement)(e,t)}}),"withInspectorControl");function te(e){e="<div data-custom-class-name>".concat(e,"</div>");var t=Object(c.parseWithAttributeSchema)(e,{type:"string",source:"attribute",selector:"[data-custom-class-name] > *",attribute:"class"});return t?t.trim().split(/\s+/):[]}Object(m.addFilter)("blocks.registerBlockType","core/custom-class-name/attribute",(function(e){return Object(c.hasBlockSupport)(e,"customClassName",!0)&&(e.attributes=J(J({},e.attributes),{},{className:{type:"string"}})),e})),Object(m.addFilter)("editor.BlockEdit","core/editor/custom-class-name/with-inspector-control",ee),Object(m.addFilter)("blocks.getSaveContent.extraProps","core/custom-class-name/save-props",(function(e,t,n){return Object(c.hasBlockSupport)(t,"customClassName",!0)&&n.className&&(e.className=f()(e.className,n.className)),e})),Object(m.addFilter)("blocks.getBlockAttributes","core/custom-class-name/addParsedDifference",(function(e,t,n){if(Object(c.hasBlockSupport)(t,"customClassName",!0)){var r=Object(b.omit)(e,["className"]),o=Object(c.getSaveContent)(t,r),i=te(o),a=te(n),l=Object(b.difference)(a,i);l.length?e.className=l.join(" "):o&&delete e.className}return e}));var ne=n(152);function re(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}var oe=n(136);function ce(e){return function(e){if(Array.isArray(e))return Object(ne.a)(e)}(e)||re(e)||Object(oe.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.")}()}Object(m.addFilter)("blocks.getSaveContent.extraProps","core/generated-class-name/save-props",(function(e,t){return Object(c.hasBlockSupport)(t,"className",!0)&&("string"==typeof e.className?e.className=Object(b.uniq)([Object(c.getBlockDefaultClassName)(t.name)].concat(ce(e.className.split(" ")))).join(" ").trim():e.className=Object(c.getBlockDefaultClassName)(t.name)),e}));var ie=n(20),ae=n(169),le=n(170);function se(e){return Object(ae.a)(e)||re(e)||Object(oe.a)(e)||Object(le.a)()}var ue=n(74),de=n.n(ue),fe=function(e,t,n){if(t){var r=Object(b.find)(e,{slug:t});if(r)return r}return{color:n}},be=function(e,t){return Object(b.find)(e,{color:t})};function pe(e,t){if(e&&t)return"has-".concat(Object(b.kebabCase)(t),"-").concat(e)}var me={"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}};function ve(e){var t=Object(z.b)().name;return Object(v.useSelect)((function(n){var r,o=n("core/block-editor").getSettings(),c="__experimentalFeatures.global.".concat(e),i="__experimentalFeatures.".concat(t,".").concat(e),a=null!==(r=Object(b.get)(o,i))&&void 0!==r?r:Object(b.get)(o,c);if(void 0!==a)return a;var l=me[e]?me[e](o):void 0;return void 0!==l?l:"typography.dropCap"===e||void 0}),[t,e])}var ge=[];function Oe(e){if(e)return"has-".concat(e,"-gradient-background")}function he(e,t){var n=Object(b.find)(e,["slug",t]);return n&&n.gradient}function je(e,t){return Object(b.find)(e,["gradient",t])}function ke(e,t){var n=je(e,t);return n&&n.slug}function ye(){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=Object(z.b)(),i=c.clientId,a=ve("color.gradients")||ge,l=Object(v.useSelect)((function(e){var t=(0,e("core/block-editor").getBlockAttributes)(i);return{customGradient:t[o],gradient:t[n]}}),[i,n,o]),d=l.gradient,f=l.customGradient,b=Object(v.useDispatch)("core/block-editor"),p=b.updateBlockAttributes,m=Object(u.useCallback)((function(e){var t,r,c=ke(a,e);c?p(i,(s(r={},n,c),s(r,o,void 0),r)):p(i,(s(t={},n,void 0),s(t,o,e),t))}),[a,i,p]),g=Oe(d);return{gradientClass:g,gradientValue:d?he(a,d):f,setGradient:m}}var _e=function e(t){if(!Object(b.isObject)(t))return t;var n=Object(b.pickBy)(Object(b.mapValues)(t,e),b.identity);return Object(b.isEqual)(n,{})?void 0:n},Ee=n(32);function Ce(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 we(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Ce(Object(n),!0).forEach((function(t){s(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ce(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}
2
  // translators: first %s: the color name or value (e.g. red or #ff0000)
3
- var Se=Object(O.__)("(Color: %s)"),Ie=Object(O.__)("(Gradient: %s)"),Be=["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%)
4
- function xe(e){var t,n,r=e.colors,o=e.gradients,c=e.label,i=e.currentTab,a=e.colorValue,l=e.gradientValue;if("color"===i){if(a){var s=be(r,t=a),d=s&&s.name;n=Object(O.sprintf)(Se,d||t)}}else if("gradient"===i&&l){var f=je(o,t=l),b=f&&f.name;n=Object(O.sprintf)(Ie,b||t)}return Object(u.createElement)(u.Fragment,null,c,!!t&&Object(u.createElement)(h.ColorIndicator,{colorValue:t,"aria-label":n}))}function Pe(e){var t=e.colors,n=e.gradients,r=e.disableCustomColors,o=e.disableCustomGradients,c=e.className,i=e.label,a=e.onColorChange,s=e.onGradientChange,d=e.colorValue,p=e.gradientValue,m=a&&(!Object(b.isEmpty)(t)||!r),v=s&&(!Object(b.isEmpty)(n)||!o),g=Object(u.useState)(p?"gradient":!!m&&"color"),j=Object(ie.a)(g,2),k=j[0],y=j[1];return m||v?Object(u.createElement)(h.BaseControl,{className:f()("block-editor-color-gradient-control",c)},Object(u.createElement)("fieldset",null,Object(u.createElement)("legend",null,Object(u.createElement)("div",{className:"block-editor-color-gradient-control__color-indicator"},Object(u.createElement)(h.BaseControl.VisualLabel,null,Object(u.createElement)(xe,{currentTab:k,label:i,colorValue:d,gradientValue:p})))),m&&v&&Object(u.createElement)(h.ButtonGroup,{className:"block-editor-color-gradient-control__button-tabs"},Object(u.createElement)(h.Button,{isSmall:!0,isPressed:"color"===k,onClick:function(){return y("color")}},Object(O.__)("Solid")),Object(u.createElement)(h.Button,{isSmall:!0,isPressed:"gradient"===k,onClick:function(){return y("gradient")}},Object(O.__)("Gradient"))),("color"===k||!v)&&Object(u.createElement)(h.ColorPalette,Object(l.a)({value:d,onChange:v?function(e){a(e),s()}:a},{colors:t,disableCustomColors:r})),("gradient"===k||!m)&&Object(u.createElement)(h.__experimentalGradientPicker,Object(l.a)({value:p,onChange:m?function(e){s(e),a()}:s},{gradients:n,disableCustomGradients:o})))):null}function Te(e){var t={};return t.colors=ve("color.palette"),t.gradients=ve("color.gradients"),t.disableCustomColors=!ve("color.custom"),t.disableCustomGradients=!ve("color.customGradient"),Object(u.createElement)(Pe,we(we({},t),e))}var Ne=function(e){return Object(b.every)(Be,(function(t){return e.hasOwnProperty(t)}))?Object(u.createElement)(Pe,e):Object(u.createElement)(Te,e)};function De(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 Re(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?De(Object(n),!0).forEach((function(t){s(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):De(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}
5
  // 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)
6
- var Ae=Object(O.__)("(%s: color %s)"),Me=Object(O.__)("(%s: gradient %s)"),Le=["colors","disableCustomColors","gradients","disableCustomGradients"],Fe=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,l=e.colors,s=e.gradients;if(!c&&!i)return null;if(c){var d=be(l||t,c);o=Object(O.sprintf)(Ae,a.toLowerCase(),d&&d.name||c)}else{var f=je(s||n,c);o=Object(O.sprintf)(Me,a.toLowerCase(),f&&f.name||i)}return Object(u.createElement)(h.ColorIndicator,{key:r,colorValue:c||i,"aria-label":o})}))},Ve=function(e){var t=e.className,n=e.colors,r=e.gradients,o=e.disableCustomColors,c=e.disableCustomGradients,i=e.children,a=e.settings,s=e.title,d=Object(Ee.a)(e,["className","colors","gradients","disableCustomColors","disableCustomGradients","children","settings","title"]);if(Object(b.isEmpty)(n)&&Object(b.isEmpty)(r)&&o&&c&&Object(b.every)(a,(function(e){return Object(b.isEmpty)(e.colors)&&Object(b.isEmpty)(e.gradients)&&(void 0===e.disableCustomColors||e.disableCustomColors)&&(void 0===e.disableCustomGradients||e.disableCustomGradients)})))return null;var p=Object(u.createElement)("span",{className:"block-editor-panel-color-gradient-settings__panel-title"},s,Object(u.createElement)(Fe,{colors:n,gradients:r,settings:a}));return Object(u.createElement)(h.PanelBody,Object(l.a)({className:f()("block-editor-panel-color-gradient-settings",t),title:p},d),a.map((function(e,t){return Object(u.createElement)(Ne,Object(l.a)({key:t},Re({colors:n,gradients:r,disableCustomColors:o,disableCustomGradients:c},e)))})),i)},He=function(e){var t={};return t.colors=ve("color.palette"),t.gradients=ve("color.gradients"),t.disableCustomColors=!ve("color.custom"),t.disableCustomGradients=!ve("color.customGradient"),Object(u.createElement)(Ve,Re(Re({},t),e))},ze=function(e){return Object(b.every)(Le,(function(t){return e.hasOwnProperty(t)}))?Object(u.createElement)(Ve,e):Object(u.createElement)(He,e)},Ue=n(48);// 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)
7
- function Ge(e){var t=e.tinyBackgroundColor,n=e.tinyTextColor,r=e.backgroundColor,o=e.textColor,c=t.getBrightness()<n.getBrightness()?Object(O.__)("This color combination may be hard for people to read. Try using a darker background color and/or a brighter text color."):Object(O.__)("This color combination may be hard for people to read. Try using a brighter background color and/or a darker text color.");return Object(u.useEffect)((function(){Object(Ue.speak)(Object(O.__)("This color combination may be hard for people to read."))}),[r,o]),Object(u.createElement)("div",{className:"block-editor-contrast-checker"},Object(u.createElement)(h.Notice,{spokenMessage:null,status:"warning",isDismissible:!1},c))}var We=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=de()(t||n),l=de()(i||r);return 1!==a.getAlpha()||1!==l.getAlpha()||de.a.isReadable(a,l,{level:"AA",size:c||!1!==c&&o>=24?"large":"small"})?null:Object(u.createElement)(Ge,{backgroundColor:t,textColor:i,tinyBackgroundColor:a,tinyTextColor:l})},Ke=n(168),qe=Object(h.createSlotFill)("InspectorControls"),$e=qe.Fill,Ye=qe.Slot;function Xe(e){var t=e.children;return Object(Ke.a)()?Object(u.createElement)($e,null,t):null}Xe.Slot=Ye;var Qe=Xe;function Ze(e){return document.getElementById("block-"+e)}function Je(e,t){return t.closest(".block-editor-block-list__block")===e}function et(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 tt(e){return e.ownerDocument.defaultView.getComputedStyle(e)}function nt(e){var t=e.settings,n=e.clientId,r=e.enableContrastChecking,o=void 0===r||r,c=Object(u.useState)(),i=Object(ie.a)(c,2),a=i[0],l=i[1],s=Object(u.useState)(),d=Object(ie.a)(s,2),f=d[0],b=d[1];return Object(u.useEffect)((function(){if(o){var e=Ze(n);if(e){b(tt(e).color);for(var t=e,r=tt(t).backgroundColor;"rgba(0, 0, 0, 0)"===r&&t.parentNode&&t.parentNode.nodeType===t.parentNode.ELEMENT_NODE;)r=tt(t=t.parentNode).backgroundColor;l(r)}}})),Object(u.createElement)(Qe,null,Object(u.createElement)(ze,{title:Object(O.__)("Color settings"),initialOpen:!1,settings:t},o&&Object(u.createElement)(We,{backgroundColor:a,textColor:f})))}function rt(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 ot(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?rt(Object(n),!0).forEach((function(t){s(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):rt(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var ct=[],it=function(e){if("web"!==u.Platform.OS)return!1;var t=Object(c.getBlockSupport)(e,"color");return t&&(!0===t.link||!0===t.gradient||!1!==t.background||!1!==t.text)},at=function(e){if("web"!==u.Platform.OS)return!1;var t=Object(c.getBlockSupport)(e,"color");return Object(b.isObject)(t)&&!!t.link},lt=function(e){if("web"!==u.Platform.OS)return!1;var t=Object(c.getBlockSupport)(e,"color");return Object(b.isObject)(t)&&!!t.gradients},st=function(e){if("web"!==u.Platform.OS)return!1;var t=Object(c.getBlockSupport)(e,"color");return t&&!1!==t.text};function ut(e,t,n){var r,o,c,i,a,l;if(!it(t))return e;var u=lt(t),d=n.backgroundColor,b=n.textColor,p=n.gradient,m=n.style,v=pe("background-color",d),g=Oe(p),O=pe("color",b),h=f()(e.className,O,g,(s(l={},v,!(u&&(null==m||null===(r=m.color)||void 0===r?void 0:r.gradient)||!v)),s(l,"has-text-color",b||(null==m||null===(o=m.color)||void 0===o?void 0:o.text)),s(l,"has-background",d||(null==m||null===(c=m.color)||void 0===c?void 0:c.background)||u&&(p||(null==m||null===(i=m.color)||void 0===i?void 0:i.gradient))),s(l,"has-link-color",null==m||null===(a=m.color)||void 0===a?void 0:a.link),l));return e.className=h||void 0,e}var dt=function(e,t){var n=/var:preset\|color\|(.+)/.exec(t);return n&&n[1]?fe(e,n[1]).color:t};function ft(e){var t,n,r,o,i,a,l=e.name,d=e.attributes,f=ve("color.link"),b=ve("color.palette")||ct,p=ve("color.gradients")||ct,m=Object(u.useRef)(d);if(Object(u.useEffect)((function(){m.current=d}),[d]),!it(l))return null;var v,g=function(e){if("web"!==u.Platform.OS)return!1;var t=Object(c.getBlockSupport)(e,"color");return t&&!1!==t.background}(l),h=lt(l),j=d.style,k=d.textColor,y=d.backgroundColor,_=d.gradient;if(h&&_)v=he(p,_);else if(h){var E;v=null==j||null===(E=j.color)||void 0===E?void 0:E.gradient}var C=function(t){return function(n){var r,o,c=be(b,n),i=t+"Color",a=ot(ot({},m.current.style),{},{color:ot(ot({},null===(r=m.current)||void 0===r||null===(o=r.style)||void 0===o?void 0:o.color),{},s({},t,(null==c?void 0:c.slug)?void 0:n))}),l=(null==c?void 0:c.slug)?c.slug:void 0,u=s({style:_e(a)},i,l);e.setAttributes(u),m.current=ot(ot({},m.current),u)}};return Object(u.createElement)(nt,{enableContrastChecking:"web"===u.Platform.OS&&!_&&!(null==j||null===(t=j.color)||void 0===t?void 0:t.gradient),clientId:e.clientId,settings:[].concat(ce(st(l)?[{label:Object(O.__)("Text Color"),onColorChange:C("text"),colorValue:fe(b,k,null==j||null===(n=j.color)||void 0===n?void 0:n.text).color}]:[]),ce(g||h?[{label:Object(O.__)("Background Color"),onColorChange:g?C("background"):void 0,colorValue:fe(b,y,null==j||null===(r=j.color)||void 0===r?void 0:r.background).color,gradientValue:v,onGradientChange:h?function(t){var n,r=ke(p,t);if(r){var o,c,i,a=ot(ot({},null===(o=m.current)||void 0===o?void 0:o.style),{},{color:ot(ot({},null===(c=m.current)||void 0===c||null===(i=c.style)||void 0===i?void 0:i.color),{},{gradient:void 0})});n={style:_e(a),gradient:r}}else{var l,s,u,d=ot(ot({},null===(l=m.current)||void 0===l?void 0:l.style),{},{color:ot(ot({},null===(s=m.current)||void 0===s||null===(u=s.style)||void 0===u?void 0:u.color),{},{gradient:t})});n={style:_e(d),gradient:void 0}}e.setAttributes(n),m.current=ot(ot({},m.current),n)}:void 0}]:[]),ce(f&&at(l)?[{label:Object(O.__)("Link Color"),onColorChange:function(t){var n,r=be(b,t);e.setAttributes({style:ot(ot({},e.attributes.style),{},{color:ot(ot({},null===(n=e.attributes.style)||void 0===n?void 0:n.color),{},{link:(null==r?void 0:r.slug)?"var:preset|color|".concat(r.slug):t})})})},colorValue:dt(b,null==j||null===(o=j.color)||void 0===o?void 0:o.link),clearable:!!(null===(i=e.attributes.style)||void 0===i||null===(a=i.color)||void 0===a?void 0:a.link)}]:[]))})}var bt=Object(p.createHigherOrderComponent)((function(e){return function(t){var n,r,o,c=t.name,i=t.attributes,a=i.backgroundColor,s=i.textColor,d=ve("color.palette")||ct;if(!it(c))return Object(u.createElement)(e,t);var f={color:s?null===(n=fe(d,s))||void 0===n?void 0:n.color:void 0,backgroundColor:a?null===(r=fe(d,a))||void 0===r?void 0:r.color:void 0},b=t.wrapperProps;return b=ot(ot({},t.wrapperProps),{},{style:ot(ot({},f),null===(o=t.wrapperProps)||void 0===o?void 0:o.style)}),Object(u.createElement)(e,Object(l.a)({},t,{wrapperProps:b}))}}));Object(m.addFilter)("blocks.registerBlockType","core/color/addAttribute",(function(e){return it(e)?(e.attributes.backgroundColor||Object.assign(e.attributes,{backgroundColor:{type:"string"}}),e.attributes.textColor||Object.assign(e.attributes,{textColor:{type:"string"}}),lt(e)&&!e.attributes.gradient&&Object.assign(e.attributes,{gradient:{type:"string"}}),e):e})),Object(m.addFilter)("blocks.getSaveContent.extraProps","core/color/addSaveProps",ut),Object(m.addFilter)("blocks.registerBlockType","core/color/addEditProps",(function(e){if(!it(e))return e;var t=e.getEditWrapperProps;return e.getEditWrapperProps=function(n){var r={};return t&&(r=t(n)),ut(r,e,n)},e})),Object(m.addFilter)("editor.BlockListBlock","core/color/with-color-palette-styles",bt);var pt=n(13);function mt(e){var t=e.value,n=e.onChange,r=function(e){return void 0!==e&&""!==e}(t),o=r?t:"";return Object(u.createElement)("div",{className:"block-editor-line-height-control"},Object(u.createElement)(h.TextControl,{autoComplete:"off",onKeyDown:function(e){e.keyCode!==pt.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(O.__)("Line height"),placeholder:1.5,step:.1,type:"number",value:o,min:0}))}function vt(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 gt(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?vt(Object(n),!0).forEach((function(t){s(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):vt(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Ot(e){var t,n=e.attributes.style;if(ht(e))return null;return Object(u.createElement)(mt,{value:null==n||null===(t=n.typography)||void 0===t?void 0:t.lineHeight,onChange:function(t){var r=gt(gt({},n),{},{typography:gt(gt({},null==n?void 0:n.typography),{},{lineHeight:t})});e.setAttributes({style:_e(r)})}})}function ht(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.name,n=!ve("typography.customLineHeight");return!Object(c.hasBlockSupport)(t,"lineHeight")||n}var jt=n(153),kt=n.n(jt),yt=function(e,t,n){if(t){var r=Object(b.find)(e,{slug:t});if(r)return r}return{size:n}};function _t(e,t){var n=Object(b.find)(e,{size:t});return n||{size:t}}function Et(e){if(e)return"has-".concat(Object(b.kebabCase)(e),"-font-size")}var Ct=function(e){var t=ve("typography.fontSizes"),n=!ve("typography.customFontSize");return Object(u.createElement)(h.FontSizePicker,Object(l.a)({},e,{fontSizes:t,disableCustomFontSizes:n}))};function wt(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 St(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?wt(Object(n),!0).forEach((function(t){s(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):wt(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function It(e,t,n){if(!Object(c.hasBlockSupport)(t,"fontSize"))return e;var r=new kt.a(e.className);r.add(Et(n.fontSize));var o=r.value;return e.className=o||void 0,e}function Bt(e){var t,n=e.attributes,r=n.fontSize,o=n.style,c=e.setAttributes,i=xt(e),a=ve("typography.fontSizes");if(i)return null;var l=yt(a,r,null==o||null===(t=o.typography)||void 0===t?void 0:t.fontSize);return Object(u.createElement)(Ct,{value:l.size,onChange:function(e){var t=_t(a,e).slug;c({style:_e(St(St({},o),{},{typography:St(St({},null==o?void 0:o.typography),{},{fontSize:t?void 0:e})})),fontSize:t})}})}function xt(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.name,n=ve("typography.fontSizes"),r=!!(null==n?void 0:n.length);return!Object(c.hasBlockSupport)(t,"fontSize")||!r}var Pt=Object(p.createHigherOrderComponent)((function(e){return function(t){var n,r=ve("typography.fontSizes"),o=t.name,i=t.attributes,a=i.fontSize,l=i.style,s=t.wrapperProps,d=St({},t);if(Object(c.hasBlockSupport)(o,"fontSize")&&a&&!(null==l||null===(n=l.typography)||void 0===n?void 0:n.fontSize)){var f,b=yt(r,a,null==l||null===(f=l.typography)||void 0===f?void 0:f.fontSize).size;d.wrapperProps=St(St({},s),{},{style:St({fontSize:b},null==s?void 0:s.style)})}return Object(u.createElement)(e,d)}}),"withFontSizeInlineStyles");Object(m.addFilter)("blocks.registerBlockType","core/font/addAttribute",(function(e){return Object(c.hasBlockSupport)(e,"fontSize")?(e.attributes.fontSize||Object.assign(e.attributes,{fontSize:{type:"string"}}),e):e})),Object(m.addFilter)("blocks.getSaveContent.extraProps","core/font/addSaveProps",It),Object(m.addFilter)("blocks.registerBlockType","core/font/addEditProps",(function(e){if(!Object(c.hasBlockSupport)(e,"fontSize"))return e;var t=e.getEditWrapperProps;return e.getEditWrapperProps=function(n){var r={};return t&&(r=t(n)),It(r,e,n)},e})),Object(m.addFilter)("editor.BlockListBlock","core/font-size/with-font-size-inline-styles",Pt);var Tt=["lineHeight","fontSize"];function Nt(e){var t=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=[xt(e),ht(e)];return t.filter(Boolean).length===t.length}(e),n=Dt(e.name);return t||!n?null:Object(u.createElement)(Qe,null,Object(u.createElement)(h.PanelBody,{title:Object(O.__)("Typography")},Object(u.createElement)(Bt,e),Object(u.createElement)(Ot,e)))}var Dt=function(e){return"web"===u.Platform.OS&&Tt.some((function(t){return Object(c.hasBlockSupport)(e,t)}))};function Rt(e){var t=e.units,n=Object(Ee.a)(e,["units"]),r=At(t);return Object(u.createElement)(h.__experimentalUnitControl,Object(l.a)({units:r},n))}function At(e){var t=ve("spacing.units"),n=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)}))}(t||[],e);return 0!==n.length&&n}function Mt(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 Lt(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Mt(Object(n),!0).forEach((function(t){s(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Mt(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Ft(e){var t,n=e.name,r=e.attributes.style,o=e.setAttributes,i=At();if(!function(e){var t=Object(c.getBlockSupport)(e,"spacing");return t&&!1!==t.padding}(n))return null;return u.Platform.select({web:Object(u.createElement)(u.Fragment,null,Object(u.createElement)(h.__experimentalBoxControl,{values:null==r||null===(t=r.spacing)||void 0===t?void 0:t.padding,onChange:function(e){var t=Lt(Lt({},r),{},{spacing:{padding:e}});o({style:_e(t)})},onChangeShowVisualizer:function(e){var t=Lt(Lt({},r),{},{visualizers:{padding:e}});o({style:_e(t)})},label:Object(O.__)("Padding"),units:i})),native:null})}function Vt(e){var t=e.children,n=Object(Ee.a)(e,["children"]);return ve("spacing.customPadding")?Object(u.createElement)(Qe,n,Object(u.createElement)(h.PanelBody,{title:Object(O.__)("Spacing")},t)):null}function Ht(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 zt(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Ht(Object(n),!0).forEach((function(t){s(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ht(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Ut=[].concat(ce(Tt),["color","spacing"]),Gt=function(e){return Ut.some((function(t){return Object(c.hasBlockSupport)(e,t)}))};function Wt(e){if(Object(b.startsWith)(e,"var:")){var t=e.slice("var:".length).split("|").join("--");return"var(--wp--".concat(t,")")}return e}function Kt(e,t,n){if(!Gt(t))return e;var r=n.style;return e.style=zt(zt({},function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t={};return Object.entries(c.__EXPERIMENTAL_STYLE_PROPERTY).forEach((function(n){var r=se(n),o=r[0],c=r.slice(1),i=Object(ie.a)(c,1)[0];Object(b.has)(e,i)&&(t[o]=Wt(Object(b.get)(e,i)))})),t}(r)),e.style),e}var qt=Object(p.createHigherOrderComponent)((function(e){return function(t){var n=t.name,r=Object(c.hasBlockSupport)(n,"spacing");return[Object(u.createElement)(Nt,Object(l.a)({key:"typography"},t)),Object(u.createElement)(ft,Object(l.a)({key:"colors"},t)),Object(u.createElement)(e,Object(l.a)({key:"edit"},t)),r&&Object(u.createElement)(Vt,{key:"spacing"},Object(u.createElement)(Ft,t))]}}),"withToolbarControls");function $t(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Yt(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 Xt(e,t,n){return t&&Yt(e.prototype,t),n&&Yt(e,n),e}function Qt(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Zt(e,t){return(Zt=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Jt(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&&Zt(e,t)}function en(e){return(en="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)}function tn(e,t){return!t||"object"!==en(t)&&"function"!=typeof t?Qt(e):t}function nn(e){return(nn=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function rn(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=nn(e);if(t){var o=nn(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return tn(this,n)}}function on(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 cn(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?on(Object(n),!0).forEach((function(t){s(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):on(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}Object(m.addFilter)("blocks.registerBlockType","core/style/addAttribute",(function(e){return Gt(e)?(e.attributes.style||Object.assign(e.attributes,{style:{type:"object"}}),e):e})),Object(m.addFilter)("blocks.getSaveContent.extraProps","core/style/addSaveProps",Kt),Object(m.addFilter)("blocks.registerBlockType","core/style/addEditProps",(function(e){if(!Gt(e))return e;var t=e.getEditWrapperProps;return e.getEditWrapperProps=function(n){var r={};return t&&(r=t(n)),Kt(r,e,n)},e})),Object(m.addFilter)("editor.BlockEdit","core/style/with-block-controls",qt);var an=[],ln=function(e){return Object(p.createHigherOrderComponent)((function(t){return function(n){return Object(u.createElement)(t,Object(l.a)({},n,{colors:e}))}}),"withCustomColorPalette")},sn=function(){return Object(p.createHigherOrderComponent)((function(e){return function(t){var n=ve("color.palette")||an;return Object(u.createElement)(e,Object(l.a)({},t,{colors:n}))}}),"withEditorColorPalette")};function un(e,t){var n=Object(b.reduce)(e,(function(e,t){return cn(cn({},e),Object(b.isString)(t)?s({},t,Object(b.kebabCase)(t)):t)}),{});return Object(p.compose)([t,function(e){return function(t){Jt(o,t);var r=rn(o);function o(e){var t;return $t(this,o),(t=r.call(this,e)).setters=t.createSetters(),t.colorUtils={getMostReadableColor:t.getMostReadableColor.bind(Qt(t))},t.state={},t}return Xt(o,[{key:"getMostReadableColor",value:function(e){return function(e,t){return de.a.mostReadable(t,Object(b.map)(e,"color")).toHexString()}(this.props.colors,e)}},{key:"createSetters",value:function(){var e=this;return Object(b.reduce)(n,(function(t,n,r){var o=Object(b.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=be(n.props.colors,r);n.props.setAttributes((s(o={},e,c&&c.slug?c.slug:void 0),s(o,t,c&&c.slug?void 0:r),o))}}},{key:"render",value:function(){return Object(u.createElement)(e,cn(cn(cn(cn({},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(b.reduce)(n,(function(e,n,c){var i=fe(o,r[c],r["custom".concat(Object(b.upperFirst)(c))]),a=t[c];return(null==a?void 0:a.color)===i.color&&a?e[c]=a:e[c]=cn(cn({},i),{},{class:pe(n,i.slug)}),e}),{})}}]),o}(u.Component)}])}function dn(e){return function(){for(var t=ln(e),n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return Object(p.createHigherOrderComponent)(un(r,t),"withCustomColors")}}function fn(){for(var e=sn(),t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return Object(p.createHigherOrderComponent)(un(n,e),"withColors")}var bn=n(65),pn=n.n(bn);function mn(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 vn(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?mn(Object(n),!0).forEach((function(t){s(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):mn(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var gn=function(e){var t=e.colorSettings,n=Object(Ee.a)(e,["colorSettings"]),r=t.map((function(e){var t=e.value,n=e.onChange;return vn(vn({},Object(Ee.a)(e,["value","onChange"])),{},{colorValue:t,onColorChange:n})}));return Object(u.createElement)(ze,Object(l.a)({settings:r,gradients:[],disableCustomGradients:!0},n))},On=function(e,t,n){return"function"==typeof e?e(t):!0===e?n:e};function hn(e){var t=e.title,n=e.colorSettings,r=e.colorPanelProps,o=e.contrastCheckers,c=e.detectedBackgroundColor,i=e.detectedColor,a=e.panelChildren,s=e.initialOpen;return Object(u.createElement)(gn,Object(l.a)({title:t,initialOpen:s,colorSettings:Object.values(n)},r),o&&(Array.isArray(o)?o.map((function(e){var t=e.backgroundColor,r=e.textColor,o=Object(Ee.a)(e,["backgroundColor","textColor"]);return t=On(t,n,c),r=On(r,n,i),Object(u.createElement)(We,Object(l.a)({key:"".concat(t,"-").concat(r),backgroundColor:t,textColor:r},o))})):Object(b.map)(n,(function(e){var t=e.value,r=o.backgroundColor,a=o.textColor;return r=On(r||t,n,c),a=On(a||t,n,i),Object(u.createElement)(We,Object(l.a)({},o,{key:"".concat(r,"-").concat(a),backgroundColor:r,textColor:a}))}))),"function"==typeof a?a(n):a)}function jn(e,t){var n;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return kn(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return kn(e,t)}(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 kn(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 yn(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 _n(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?yn(Object(n),!0).forEach((function(t){s(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):yn(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function En(e){return e.ownerDocument.defaultView.getComputedStyle(e)}var Cn=[],wn={textColor:Object(O.__)("Text Color"),backgroundColor:Object(O.__)("Background Color")},Sn=function(e){return Object(u.createElement)(Qe,null,Object(u.createElement)(hn,e))};function In(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{panelTitle:Object(O.__)("Color settings")},n=t.panelTitle,r=void 0===n?Object(O.__)("Color settings"):n,o=t.colorPanelProps,c=t.contrastCheckers,i=t.panelChildren,a=t.colorDetector,l=(a=void 0===a?{}:a).targetRef,d=a.backgroundColorTargetRef,p=void 0===d?l:d,m=a.textColorTargetRef,g=void 0===m?l:m,h=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],j=Object(z.b)(),k=j.clientId,y=ve("color.palette")||Cn,_=Object(v.useSelect)((function(e){return{attributes:(0,e("core/block-editor").getBlockAttributes)(k)}}),[k]),E=_.attributes,C=Object(v.useDispatch)("core/block-editor"),w=C.updateBlockAttributes,S=Object(u.useCallback)((function(e){return w(k,e)}),[w,k]),I=Object(u.useMemo)((function(){return pn()((function(e,t,n,r,o,c){return function(i){var a,l=i.children,d=i.className,p=void 0===d?"":d,m=i.style,v=void 0===m?{}:m,g={};r?g=s({},t,o):c&&(g=s({},t,c));var O={className:f()(p,(a={},s(a,"has-".concat(Object(b.kebabCase)(r),"-").concat(Object(b.kebabCase)(t)),r),s(a,n||"has-".concat(Object(b.kebabCase)(e)),r||c),a)),style:_n(_n({},g),v)};return Object(b.isFunction)(l)?l(O):u.Children.map(l,(function(e){return Object(u.cloneElement)(e,{className:f()(e.props.className,O.className),style:_n(_n({},O.style),e.props.style||{})})}))}}),{maxSize:e.length})}),[e.length]),B=Object(u.useMemo)((function(){return pn()((function(e,t){return function(n){var r=t.find((function(e){return e.color===n}));S(s({},r?Object(b.camelCase)("custom ".concat(e)):e,void 0)),S(s({},r?e:Object(b.camelCase)("custom ".concat(e)),r?r.slug:n))}}),{maxSize:e.length})}),[S,e.length]),x=Object(u.useState)(),P=Object(ie.a)(x,2),T=P[0],N=P[1],D=Object(u.useState)(),R=Object(ie.a)(D,2),A=R[0],M=R[1];return Object(u.useEffect)((function(){if(c){var e,t=!1,n=!1,r=jn(Object(b.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&&M(En(g.current).color),t){for(var l=p.current,s=En(l).backgroundColor;"rgba(0, 0, 0, 0)"===s&&l.parentNode&&l.parentNode.nodeType===l.parentNode.ELEMENT_NODE;)s=En(l=l.parentNode).backgroundColor;N(s)}}}),[e.reduce((function(e,t){return"".concat(e," | ").concat(E[t.name]," | ").concat(E[Object(b.camelCase)("custom ".concat(t.name))])}),"")].concat(ce(h))),Object(u.useMemo)((function(){var t={},n=e.reduce((function(e,n){"string"==typeof n&&(n={name:n});var r=_n(_n({},n),{},{color:E[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||wn[o]||Object(b.startCase)(o):l,u=r.componentName,d=void 0===u?Object(b.startCase)(o).replace(/\s/g,""):u,f=r.color,p=void 0===f?n.color:f,m=r.colors,v=void 0===m?y:m,g=E[Object(b.camelCase)("custom ".concat(o))],O=g?void 0:v.find((function(e){return e.slug===p}));return e[d]=I(o,i,a,p,O&&O.color,g),e[d].displayName=d,e[d].color=g||O&&O.color,e[d].slug=p,e[d].setColor=B(o,v),t[d]={value:O?O.color:E[Object(b.camelCase)("custom ".concat(o))],onChange:e[d].setColor,label:s,colors:v},v||delete t[d].colors,e}),{}),a={title:r,initialOpen:!1,colorSettings:t,colorPanelProps:o,contrastCheckers:c,detectedBackgroundColor:T,detectedColor:A,panelChildren:i};return _n(_n({},n),{},{ColorPanel:Object(u.createElement)(hn,a),InspectorControlsColorPanel:Object(u.createElement)(Sn,a)})}),[E,S,A,T].concat(ce(h)))}function Bn(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 xn(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Bn(Object(n),!0).forEach((function(t){s(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Bn(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Pn(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=nn(e);if(t){var o=nn(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return tn(this,n)}}var Tn=[],Nn=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var r=Object(b.reduce)(t,(function(e,t){return e[t]="custom".concat(Object(b.upperFirst)(t)),e}),{});return Object(p.createHigherOrderComponent)(Object(p.compose)([Object(p.createHigherOrderComponent)((function(e){return function(t){var n=ve("typography.fontSizes")||Tn;return Object(u.createElement)(e,Object(l.a)({},t,{fontSizes:n}))}}),"withFontSizes"),function(e){return function(t){Jt(o,t);var n=Pn(o);function o(e){var t;return $t(this,o),(t=n.call(this,e)).setters=t.createSetters(),t.state={},t}return Xt(o,[{key:"createSetters",value:function(){var e=this;return Object(b.reduce)(r,(function(t,n,r){var o=Object(b.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(b.find)(n.props.fontSizes,{size:Number(r)});n.props.setAttributes((s(o={},e,c&&c.slug?c.slug:void 0),s(o,t,c&&c.slug?void 0:r),o))}}},{key:"render",value:function(){return Object(u.createElement)(e,xn(xn(xn({},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(b.some)(r,c))return null;var i=Object(b.reduce)(Object(b.pickBy)(r,c),(function(e,t,r){var c=n[r],i=yt(o,c,n[t]);return e[r]=xn(xn({},i),{},{class:Et(c)}),e}),{});return xn(xn({},t),i)}}]),o}(u.Component)}]),"withFontSizes")},Dn=n(287),Rn=n(288),An=n(289);function Mn(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 Ln(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Mn(Object(n),!0).forEach((function(t){s(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Mn(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Fn=[{icon:Dn.a,title:Object(O.__)("Align text left"),align:"left"},{icon:Rn.a,title:Object(O.__)("Align text center"),align:"center"},{icon:An.a,title:Object(O.__)("Align text right"),align:"right"}],Vn={position:"bottom right",isAlternate:!0};var Hn=function(e){var t=e.value,n=e.onChange,r=e.alignmentControls,o=void 0===r?Fn:r,c=e.label,i=void 0===c?Object(O.__)("Change text alignment"):c,a=e.isCollapsed,l=void 0===a||a,s=e.isRTL;function d(e){return function(){return n(t===e?void 0:e)}}var f=Object(b.find)(o,(function(e){return e.align===t}));return Object(u.createElement)(h.ToolbarGroup,{isCollapsed:l,icon:f?f.icon:s?An.a:Dn.a,label:i,popoverProps:Vn,controls:o.map((function(e){var n=e.align,r=t===n;return Ln(Ln({},e),{},{isActive:r,role:l?"menuitemradio":void 0,onClick:d(n)})}))})},zn=function(e){return e.name||""},Un=function(e){return e.title},Gn=function(e){return e.keywords||[]},Wn=function(e){return e.category},Kn=function(){return null};function qn(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return e=(e=(e=Object(b.deburr)(e)).replace(/^\//,"")).toLowerCase()}var $n=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return Object(b.words)(qn(e))},Yn=function(e,t){return Object(b.differenceWith)(e,$n(t),(function(e,t){return t.includes(e)}))},Xn=function(e,t,n,r){return 0===$n(r).length?e:Qn(e,r,{getCategory:function(e){var n;return null===(n=Object(b.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},getVariations:function(e){var t=e.variations,n=void 0===t?[]:t;return Array.from(n.reduce((function(e,t){var n=t.title,r=t.keywords,o=void 0===r?[]:r;return e.add(n),o.forEach((function(t){return e.add(t)})),e}),new Set))}})},Qn=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=$n(t);if(0===r.length)return e;var o=e.map((function(e){return[e,Zn(e,t,n)]})).filter((function(e){return Object(ie.a)(e,2)[1]>0}));return o.sort((function(e,t){var n=Object(ie.a)(e,2)[1];return Object(ie.a)(t,2)[1]-n})),o.map((function(e){return Object(ie.a)(e,1)[0]}))};function Zn(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=n.getName,o=void 0===r?zn:r,c=n.getTitle,i=void 0===c?Un:c,a=n.getKeywords,l=void 0===a?Gn:a,s=n.getCategory,u=void 0===s?Wn:s,d=n.getCollection,f=void 0===d?Kn:d,p=o(e),m=i(e),v=l(e),g=u(e),O=f(e),h=qn(t),j=qn(m),k=0;if(h===j)k+=30;else if(j.startsWith(h))k+=20;else{var y=[p,m].concat(ce(v),[g,O]).join(" "),_=Object(b.words)(h),E=Yn(_,y);0===E.length&&(k+=10)}return 0!==k&&p.startsWith("core/")&&k++,k}var Jn=function(e,t){var n=Object(v.useSelect)((function(t){var n=t("core/block-editor").getInserterItems,r=t("core/blocks"),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,function(e){var n=e.name,r=e.initialAttributes,o=e.innerBlocks,i=Object(c.createBlock)(n,r,Object(c.createBlocksFromInnerBlocksTemplate)(o));t(i)}]},er=n(156);function tr(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:er.a});var i=Object(u.createElement)(h.Icon,{icon:n&&n.src?n.src:n}),a=o?{backgroundColor:n&&n.background,color:n&&n.foreground}:{};return Object(u.createElement)("span",{style:a,className:f()("block-editor-block-icon",c,{"has-colors":o})},i)}var nr={name:"blocks",className:"block-editor-autocompleters__block",triggerPrefix:"/",useItems:function(e){var t=Object(v.useSelect)((function(e){var t=e("core/block-editor"),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=Jn(n,b.noop),c=Object(ie.a)(o,3),i=c[0],a=c[1],l=c[2],s=Object(u.useMemo)((function(){return(e.trim()?Xn(i,a,l,e):Object(b.orderBy)(i,["frecency"],["desc"])).filter((function(e){return e.name!==r})).slice(0,9)}),[e,r,i,a,l]);return[Object(u.useMemo)((function(){return s.map((function(e){var t=e.title,n=e.icon,r=e.isDisabled;return{key:"block-".concat(e.id),value:e,label:Object(u.createElement)(u.Fragment,null,Object(u.createElement)(tr,{key:"icon",icon:n,showColors:!0}),t),isDisabled:r}}))}),[s])]},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(c.createBlock)(t,n,Object(c.createBlocksFromInnerBlocksTemplate)(r))}}},rr=[];var or=function(e){var t=Object(z.b)().name,n=e.completers,r=void 0===n?rr:n;return r=Object(u.useMemo)((function(){var e=r;return t===Object(c.getDefaultBlockName)()&&(e=e.concat([nr])),Object(m.hasFilter)("editor.Autocomplete.completers")&&(e===r&&(e=e.map(b.clone)),e=Object(m.applyFilters)("editor.Autocomplete.completers",e,t)),e}),[r,t]),Object(u.createElement)(h.Autocomplete,Object(l.a)({},e,{completers:r}))};var cr=function(e){var t=e.label,n=void 0===t?Object(O.__)("Change matrix alignment"):t,r=e.onChange,o=void 0===r?b.noop:r,c=e.value,i=void 0===c?"center":c,a=Object(u.createElement)(h.__experimentalAlignmentMatrixControl.Icon,{value:i}),l="block-editor-block-alignment-matrix-toolbar",s="".concat(l,"__popover");return Object(u.createElement)(h.Dropdown,{position:"bottom right",className:l,popoverProps:{className:s,isAlternate:!0},renderToggle:function(e){var t=e.onToggle,r=e.isOpen;return Object(u.createElement)(h.ToolbarGroup,null,Object(u.createElement)(h.ToolbarButton,{onClick:t,"aria-haspopup":"true","aria-expanded":r,onKeyDown:function(e){r||e.keyCode!==pt.DOWN||(e.preventDefault(),e.stopPropagation(),t())},label:n,icon:a,showTooltip:!0}))},renderContent:function(){return Object(u.createElement)(h.__experimentalAlignmentMatrixControl,{hasFocusBorder:!1,onChange:o,value:i})}})};function ir(e){var t=e.clientId,n=Object(v.useSelect)((function(e){if(!t)return{};var n=e("core/block-editor"),r=n.getBlockName;return{attributes:(0,n.getBlockAttributes)(t),name:r(t)}}),[t]),r=n.attributes,o=n.name;if(!o)return null;var i=Object(c.getBlockType)(o);if(!i)return null;var a=i.title,l=Object(c.__experimentalGetBlockLabel)(i,r);return l!==a?"".concat(a,": ").concat(Object(b.truncate)(l,{length:15})):a}var ar=function(){var e=Object(v.useDispatch)("core/block-editor"),t=e.selectBlock,n=e.clearSelectedBlock,r=Object(v.useSelect)((function(e){var t=e("core/block-editor"),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(u.createElement)("ul",{className:"block-editor-block-breadcrumb",role:"list","aria-label":Object(O.__)("Block breadcrumb")},Object(u.createElement)("li",{className:i?void 0:"block-editor-block-breadcrumb__current","aria-current":i?void 0:"true"},i&&Object(u.createElement)(h.Button,{className:"block-editor-block-breadcrumb__button",isTertiary:!0,onClick:n},Object(O.__)("Document")),!i&&Object(O.__)("Document")),c.map((function(e){return Object(u.createElement)("li",{key:e},Object(u.createElement)(h.Button,{className:"block-editor-block-breadcrumb__button",isTertiary:!0,onClick:function(){return t(e)}},Object(u.createElement)(ir,{clientId:e})))})),!!o&&Object(u.createElement)("li",{className:"block-editor-block-breadcrumb__current","aria-current":"true"},Object(u.createElement)(ir,{clientId:o})))};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 sr(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){s(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 ur=Object(u.createContext)({});function dr(e){var t=e.value,n=e.children,r=Object(u.useContext)(ur),o=Object(u.useMemo)((function(){return sr(sr({},r),t)}),[r,t]);return Object(u.createElement)(ur.Provider,{value:o,children:n})}var fr=ur,br=function(){return Object(u.createElement)(h.SVG,{xmlns:"https://www.w3.org/2000/svg",viewBox:"0 0 20 20"},Object(u.createElement)(h.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"}))},pr=function(e){var t=e.style,n=e.className;return Object(u.createElement)("div",{className:"block-library-colors-selector__icon-container"},Object(u.createElement)("div",{className:"".concat(n," block-library-colors-selector__state-selection"),style:t},Object(u.createElement)(br,null)))},mr=function(e){var t,n,r,o=e.children,c=Object(Ee.a)(e,["children"]);return Object(u.createElement)(h.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(u.createElement)(h.ToolbarGroup,null,Object(u.createElement)(h.ToolbarButton,{className:"components-toolbar__control block-library-colors-selector__toggle",label:Object(O.__)("Open Colors Selector"),onClick:t,onKeyDown:function(e){o||e.keyCode!==pt.DOWN||(e.preventDefault(),e.stopPropagation(),t())},icon:Object(u.createElement)(r,null,Object(u.createElement)(n,null,Object(u.createElement)(pr,null)))}))}),renderContent:function(){return o}})},vr={},gr=Object(h.withFilters)("editor.BlockEdit")((function(e){var t=e.attributes,n=void 0===t?{}:t,r=e.name,o=Object(c.getBlockType)(r),i=Object(u.useContext)(fr),a=Object(u.useMemo)((function(){return o&&o.usesContext?Object(b.pick)(i,o.usesContext):vr}),[o,i]);if(!o)return null;var s=o.edit||o.save;if(o.apiVersion>1||Object(c.hasBlockSupport)(o,"lightBlockWrapper",!1))return Object(u.createElement)(s,Object(l.a)({},e,{context:a}));var d=Object(c.hasBlockSupport)(o,"className",!0)?Object(c.getBlockDefaultClassName)(r):null,p=f()(d,n.className);return Object(u.createElement)(s,Object(l.a)({},e,{context:a,className:p}))}));function Or(e){var t={name:e.name,isSelected:e.isSelected,clientId:e.clientId,onFocus:e.onFocus,onCaretVerticalPositionChange:e.onCaretVerticalPositionChange};return Object(u.createElement)(z.a,{value:Object(u.useMemo)((function(){return t}),Object.values(t))},Object(u.createElement)(gr,e))}var hr=Object(h.createSlotFill)("BlockFormatControls"),jr=hr.Fill,kr=hr.Slot;var yr=function(e){return Object(z.b)().isSelected?Object(u.createElement)(jr,null,(function(t){var n=Object(b.isEmpty)(t)?null:t;return Object(u.createElement)(h.__experimentalToolbarContext.Provider,{value:n},e.children)})):null};yr.Slot=function(e){var t=Object(u.useContext)(h.__experimentalToolbarContext);return Object(u.createElement)(kr,Object(l.a)({},e,{fillProps:t}))};var _r=yr,Er=n(12),Cr=n.n(Er);function wr(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 Sr(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var c=e.apply(t,n);function i(e){wr(c,r,o,i,a,"next",e)}function a(e){wr(c,r,o,i,a,"throw",e)}i(void 0)}))}}var Ir=n(216),Br=n(114),xr=n(23),Pr=function(e){return e+1},Tr=function(e){return{top:e.offsetTop,left:e.offsetLeft}};var Nr=function(e,t,n,r,o){var c=Object(p.useReducedMotion)()||!r,i=Object(u.useReducer)(Pr,0),a=Object(ie.a)(i,2),l=a[0],s=a[1],d=Object(u.useReducer)(Pr,0),f=Object(ie.a)(d,2),b=f[0],m=f[1],v=Object(u.useState)({x:0,y:0}),g=Object(ie.a)(v,2),O=g[0],h=g[1],j=Object(u.useMemo)((function(){return e.current?Tr(e.current):null}),[o]),k=Object(u.useMemo)((function(){if(!n||!e.current)return function(){};var t=Object(xr.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(u.useLayoutEffect)((function(){l&&m()}),[l]),Object(u.useLayoutEffect)((function(){if(j)if(c)k();else{e.current.style.transform="";var t=Tr(e.current);s(),h({x:Math.round(j.left-t.left),y:Math.round(j.top-t.top)})}}),[o]),y.x=0,y.y=0,Object(Br.useSpring)({from:{x:O.x,y:O.y},to:{x:0,y:0},reset:l!==b,config:{mass:5,tension:2e3,friction:200},immediate:c,onFrame:y})},Dr=Object(Br.animated)(h.__experimentalTreeGridRow);function Rr(e){var t=e.isSelected,n=e.position,r=e.level,o=e.rowCount,c=e.children,i=e.className,a=e.path,s=Object(Ee.a)(e,["isSelected","position","level","rowCount","children","className","path"]),d=Object(u.useRef)(null),b=a.join("_"),p=Nr(d,t,!1,!0,b);return Object(u.createElement)(Dr,Object(l.a)({ref:d,style:p,className:f()("block-editor-block-navigation-leaf",i),level:r,positionInSet:n,setSize:o},s),c)}var Ar=n(213),Mr=n(214),Lr=n(215),Fr=n(189);function Vr(e,t,n,r,o,c,i,a){var l=n+1,s=function(e){return"up"===e?"horizontal"===i?a?"right":"left":"up":"down"===e?"horizontal"===i?a?"left":"right":"down":null};if(e>1)return function(e,t,n,r,o){var c=t+1;if(o<0&&n)return Object(O.__)("Blocks cannot be moved up as they are already at the top");if(o>0&&r)return Object(O.__)("Blocks cannot be moved down as they are already at the bottom");if(o<0&&!n)return Object(O.sprintf)(// translators: 1: Number of selected blocks, 2: Position of selected blocks
8
- Object(O._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);if(o>0&&!r)return Object(O.sprintf)(// translators: 1: Number of selected blocks, 2: Position of selected blocks
9
- Object(O._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)}(e,n,r,o,c);if(r&&o)return Object(O.sprintf)(// translators: %s: Type of block (i.e. Text, Image etc)
10
- Object(O.__)("Block %s is the only block, and cannot be moved"),t);if(c>0&&!o){var u=s("down");if("down"===u)return Object(O.sprintf)(// translators: 1: Type of block (i.e. Text, Image etc), 2: Position of selected block, 3: New position
11
- Object(O.__)("Move %1$s block from position %2$d down to position %3$d"),t,l,l+1);if("left"===u)return Object(O.sprintf)(// translators: 1: Type of block (i.e. Text, Image etc), 2: Position of selected block, 3: New position
12
- Object(O.__)("Move %1$s block from position %2$d left to position %3$d"),t,l,l+1);if("right"===u)return Object(O.sprintf)(// translators: 1: Type of block (i.e. Text, Image etc), 2: Position of selected block, 3: New position
13
- Object(O.__)("Move %1$s block from position %2$d right to position %3$d"),t,l,l+1)}if(c>0&&o){var d=s("down");if("down"===d)return Object(O.sprintf)(// translators: 1: Type of block (i.e. Text, Image etc)
14
- Object(O.__)("Block %1$s is at the end of the content and can’t be moved down"),t);if("left"===d)return Object(O.sprintf)(// translators: 1: Type of block (i.e. Text, Image etc)
15
- Object(O.__)("Block %1$s is at the end of the content and can’t be moved left"),t);if("right"===d)return Object(O.sprintf)(// translators: 1: Type of block (i.e. Text, Image etc)
16
- Object(O.__)("Block %1$s is at the end of the content and can’t be moved right"),t)}if(c<0&&!r){var f=s("up");if("up"===f)return Object(O.sprintf)(// translators: 1: Type of block (i.e. Text, Image etc), 2: Position of selected block, 3: New position
17
- Object(O.__)("Move %1$s block from position %2$d up to position %3$d"),t,l,l-1);if("left"===f)return Object(O.sprintf)(// translators: 1: Type of block (i.e. Text, Image etc), 2: Position of selected block, 3: New position
18
- Object(O.__)("Move %1$s block from position %2$d left to position %3$d"),t,l,l-1);if("right"===f)return Object(O.sprintf)(// translators: 1: Type of block (i.e. Text, Image etc), 2: Position of selected block, 3: New position
19
- Object(O.__)("Move %1$s block from position %2$d right to position %3$d"),t,l,l-1)}if(c<0&&r){var b=s("up");if("up"===b)return Object(O.sprintf)(// translators: 1: Type of block (i.e. Text, Image etc)
20
- Object(O.__)("Block %1$s is at the beginning of the content and can’t be moved up"),t);if("left"===b)return Object(O.sprintf)(// translators: 1: Type of block (i.e. Text, Image etc)
21
- Object(O.__)("Block %1$s is at the beginning of the content and can’t be moved left"),t);if("right"===b)return Object(O.sprintf)(// translators: 1: Type of block (i.e. Text, Image etc)
22
- Object(O.__)("Block %1$s is at the beginning of the content and can’t be moved right"),t)}}var Hr=function(e,t,n){return"up"===e?"horizontal"===t?n?Ar.a:Mr.a:Lr.a:"down"===e?"horizontal"===t?n?Mr.a:Ar.a:Fr.a:null},zr=function(e,t,n){return"up"===e?"horizontal"===t?n?Object(O.__)("Move right"):Object(O.__)("Move left"):Object(O.__)("Move up"):"down"===e?"horizontal"===t?n?Object(O.__)("Move left"):Object(O.__)("Move right"):Object(O.__)("Move down"):null},Ur=Object(u.forwardRef)((function(e,t){var n=e.clientIds,r=e.direction,o=e.orientation,i=Object(Ee.a)(e,["clientIds","direction","orientation"]),a=Object(p.useInstanceId)(Ur),s=Object(b.castArray)(n).length,d=Object(v.useSelect)((function(e){var t=e("core/block-editor"),i=t.getBlockIndex,a=t.getBlockRootClientId,l=t.getBlockOrder,s=t.getBlock,u=t.getSettings,d=t.getBlockListSettings,f=Object(b.castArray)(n),p=Object(b.first)(f),m=a(p),v=i(p,m),g=i(Object(b.last)(f),m),O=l(m),h=s(p),j=0===v,k=g===O.length-1,y=(d(m)||{}).orientation;return{blockType:h?Object(c.getBlockType)(h.name):null,isDisabled:"up"===r?j:k,rootClientId:m,firstIndex:v,isFirst:j,isLast:k,isRTL:u().isRTL,orientation:o||y}}),[n,r]),m=d.blockType,g=d.isDisabled,O=d.rootClientId,j=d.isFirst,k=d.isLast,y=d.firstIndex,_=d.isRTL,E=d.orientation,C=void 0===E?"vertical":E,w=Object(v.useDispatch)("core/block-editor"),S=w.moveBlocksDown,I=w.moveBlocksUp,B="up"===r?I:S,x="block-editor-block-mover-button__description-".concat(a);return Object(u.createElement)(u.Fragment,null,Object(u.createElement)(h.Button,Object(l.a)({ref:t,className:f()("block-editor-block-mover-button","is-".concat(r,"-button")),icon:Hr(r,C,_),label:zr(r,C,_),"aria-describedby":x},i,{onClick:g?null:function(e){B(n,O),i.onClick&&i.onClick(e)},"aria-disabled":g})),Object(u.createElement)("span",{id:x,className:"block-editor-block-mover-button__description"},Vr(s,m&&m.title,y,j,k,"up"===r?-1:1,C,_)))})),Gr=Object(u.forwardRef)((function(e,t){return Object(u.createElement)(Ur,Object(l.a)({direction:"up",ref:t},e))})),Wr=Object(u.forwardRef)((function(e,t){return Object(u.createElement)(Ur,Object(l.a)({direction:"down",ref:t},e))}));function Kr(e){var t=e.level,n=e.isLastRow,r=e.terminatedLevels;return Object(b.times)(t-1,(function(e){var o=e+2,c=o===t;return Object(u.createElement)("div",{key:e,"aria-hidden":"true",className:f()("block-editor-block-navigator-descender-line",{"has-item":c,"is-last-row":n,"is-terminated":r.includes(o)})})}))}var qr=Object(u.createContext)({__experimentalFeatures:!1}),$r=function(){return Object(u.useContext)(qr)},Yr=Object(u.createElement)(j.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(u.createElement)(j.Path,{d:"M11 13h2v-2h-2v2zm-6 0h2v-2H5v2zm12-2v2h2v-2h-2z"}));var Xr=function(e){var t=e.className,n=e.actions,r=e.children,o=e.secondaryActions;return Object(u.createElement)("div",{className:f()(t,"block-editor-warning")},Object(u.createElement)("div",{className:"block-editor-warning__contents"},Object(u.createElement)("p",{className:"block-editor-warning__message"},r),(u.Children.count(n)>0||o)&&Object(u.createElement)("div",{className:"block-editor-warning__actions"},u.Children.count(n)>0&&u.Children.map(n,(function(e,t){return Object(u.createElement)("span",{key:t,className:"block-editor-warning__action"},e)})),o&&Object(u.createElement)(h.DropdownMenu,{className:"block-editor-warning__secondary",icon:Yr,label:Object(O.__)("More options"),popoverProps:{position:"bottom left",className:"block-editor-warning__dropdown"},noIcons:!0},(function(){return Object(u.createElement)(h.MenuGroup,null,o.map((function(e,t){return Object(u.createElement)(h.MenuItem,{onClick:e.onClick,key:t},e.title)})))})))))},Qr=n(265),Zr=function(e){var t=e.title,n=e.rawContent,r=e.renderedContent,o=e.action,c=e.actionText,i=e.className;return Object(u.createElement)("div",{className:i},Object(u.createElement)("div",{className:"block-editor-block-compare__content"},Object(u.createElement)("h2",{className:"block-editor-block-compare__heading"},t),Object(u.createElement)("div",{className:"block-editor-block-compare__html"},n),Object(u.createElement)("div",{className:"block-editor-block-compare__preview edit-post-visual-editor"},r)),Object(u.createElement)("div",{className:"block-editor-block-compare__action"},Object(u.createElement)(h.Button,{isSecondary:!0,tabIndex:"0",onClick:o},c)))};var Jr=function(e){var t,n,r,o,i=e.block,a=e.onKeep,l=e.onConvert,s=e.convertor,d=e.convertButtonText,p={rawContent:i.originalContent,renderedContent:Object(c.getSaveElement)(i.name,i.attributes)},m=(t=s(i),n=Object(b.castArray)(t),r=n.map((function(e){return Object(c.getSaveContent)(e.name,e.attributes,e.innerBlocks)})),o=n.map((function(e){return Object(c.getSaveElement)(e.name,e.attributes,e.innerBlocks)})),{rawContent:r.join(""),renderedContent:o}),v=function(e,t){return Object(Qr.diffChars)(e,t).map((function(e,t){var n=f()({"block-editor-block-compare__added":e.added,"block-editor-block-compare__removed":e.removed});return Object(u.createElement)("span",{key:t,className:n},e.value)}))}(p.rawContent,m.rawContent);return Object(u.createElement)("div",{className:"block-editor-block-compare__wrapper"},Object(u.createElement)(Zr,{title:Object(O.__)("Current"),className:"block-editor-block-compare__current",action:a,actionText:Object(O.__)("Convert to HTML"),rawContent:p.rawContent,renderedContent:p.renderedContent}),Object(u.createElement)(Zr,{title:Object(O.__)("After Conversion"),className:"block-editor-block-compare__converted",action:l,actionText:d,rawContent:v,renderedContent:m.renderedContent}))};var eo=function(e){return Object(c.rawHandler)({HTML:e.originalContent})},to=Object(p.compose)([Object(v.withSelect)((function(e,t){var n=t.clientId;return{block:e("core/block-editor").getBlock(n)}})),Object(v.withDispatch)((function(e,t){var n=t.block,r=e("core/block-editor").replaceBlock;return{convertToClassic:function(){r(n.clientId,function(e){return Object(c.createBlock)("core/freeform",{content:e.originalContent})}(n))},convertToHTML:function(){r(n.clientId,function(e){return Object(c.createBlock)("core/html",{content:e.originalContent})}(n))},convertToBlocks:function(){r(n.clientId,eo(n))},attemptBlockRecovery:function(){var e,t,o,i;r(n.clientId,(t=(e=n).name,o=e.attributes,i=e.innerBlocks,Object(c.createBlock)(t,o,i)))}}}))])((function(e){var t=e.convertToHTML,n=e.convertToBlocks,r=e.convertToClassic,o=e.attemptBlockRecovery,i=e.block,a=!!Object(c.getBlockType)("core/html"),l=Object(u.useState)(!1),s=Object(ie.a)(l,2),d=s[0],f=s[1],b=Object(u.useCallback)((function(){return f(!0)}),[]),p=Object(u.useCallback)((function(){return f(!1)}),[]),m=Object(u.useMemo)((function(){return[{
23
  // translators: Button to fix block content
24
- title:Object(O._x)("Resolve","imperative verb"),onClick:b},a&&{title:Object(O.__)("Convert to HTML"),onClick:t},{title:Object(O.__)("Convert to Classic Block"),onClick:r}].filter(Boolean)}),[b,t,r]);return Object(u.createElement)(u.Fragment,null,Object(u.createElement)(Xr,{actions:[Object(u.createElement)(h.Button,{key:"recover",onClick:o,isPrimary:!0},Object(O.__)("Attempt Block Recovery"))],secondaryActions:m},Object(O.__)("This block contains unexpected or invalid content.")),d&&Object(u.createElement)(h.Modal,{title:// translators: Dialog title to fix block content
25
- Object(O.__)("Resolve Block"),onRequestClose:p,className:"block-editor-block-compare"},Object(u.createElement)(Jr,{block:i,onKeep:t,onConvert:n,convertor:eo,convertButtonText:Object(O.__)("Convert to Blocks")})))})),no=Object(u.createElement)(Xr,{className:"block-editor-block-list__block-crash-warning"},Object(O.__)("This block has encountered an error and cannot be previewed.")),ro=function(){return no};function oo(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=nn(e);if(t){var o=nn(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return tn(this,n)}}var co=function(e){Jt(n,e);var t=oo(n);function n(){var e;return $t(this,n),(e=t.apply(this,arguments)).state={hasError:!1},e}return Xt(n,[{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}}]),n}(u.Component),io=n(97),ao=n.n(io);var lo=function(e){var t=e.clientId,n=Object(u.useState)(""),r=Object(ie.a)(n,2),o=r[0],i=r[1],a=Object(v.useSelect)((function(e){return e("core/block-editor").getBlock(t)}),[t]),l=Object(v.useDispatch)("core/block-editor").updateBlock;return Object(u.useEffect)((function(){i(Object(c.getBlockContent)(a))}),[a]),Object(u.createElement)(ao.a,{className:"block-editor-block-list__block-html-textarea",value:o,onBlur:function(){var e=Object(c.getBlockType)(a.name),n=Object(c.getBlockAttributes)(e,o,a.attributes),r=o||Object(c.getSaveContent)(e,n),s=!o||Object(c.isValidBlockContent)(e,n,r);l(t,{attributes:n,originalContent:r,isValid:s}),o||i({content:r})},onChange:function(e){return i(e.target.value)}})},so=n(31),uo=n.n(so);function fo(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 bo(e){var t=e("core/block-editor"),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 po(e,t){Array.from(e.querySelectorAll(".rich-text")).forEach((function(e){t?e.setAttribute("contenteditable",!0):e.removeAttribute("contenteditable")}))}var mo=n(157),vo=[Object(u.createInterpolateElement)(Object(O.__)("While writing, you can press <kbd>/</kbd> to quickly insert new blocks."),{kbd:Object(u.createElement)("kbd",null)}),Object(u.createInterpolateElement)(Object(O.__)("Indent a list by pressing <kbd>space</kbd> at the beginning of a line."),{kbd:Object(u.createElement)("kbd",null)}),Object(u.createInterpolateElement)(Object(O.__)("Outdent a list by pressing <kbd>backspace</kbd> at the beginning of a line."),{kbd:Object(u.createElement)("kbd",null)}),Object(O.__)("Drag files into the editor to automatically insert media blocks."),Object(O.__)("Change a block's type by pressing the block icon on the toolbar.")];var go=function(){var e=Object(u.useState)(Math.floor(Math.random()*vo.length)),t=Object(ie.a)(e,1)[0];return Object(u.createElement)(h.Tip,null,vo[t])},Oo=n(127),ho=n(144),jo=n(290);var ko=function e(t){var n=t.className,r=t.onChange,o=t.value,c=t.placeholder,i=Object(p.useInstanceId)(e),a=Object(u.useRef)();return Object(u.createElement)("div",{className:f()("block-editor-inserter__search",n)},Object(u.createElement)(h.VisuallyHidden,{as:"label",htmlFor:"block-editor-inserter__search-".concat(i)},c),Object(u.createElement)("input",{ref:a,className:"block-editor-inserter__search-input",id:"block-editor-inserter__search-".concat(i),type:"search",placeholder:c,autoFocus:!0,onChange:function(e){return r(e.target.value)},autoComplete:"off",value:o||""}),Object(u.createElement)("div",{className:"block-editor-inserter__search-icon"},!!o&&Object(u.createElement)(h.Button,{icon:Oo.a,label:Object(O.__)("Reset search"),onClick:function(){r(""),a.current.focus()}}),!o&&Object(u.createElement)(ho.a,{icon:jo.a})))};var yo=function(e){var t=e.blockType;return Object(u.createElement)("div",{className:"block-editor-block-card"},Object(u.createElement)(tr,{icon:t.icon,showColors:!0}),Object(u.createElement)("div",{className:"block-editor-block-card__content"},Object(u.createElement)("h2",{className:"block-editor-block-card__title"},t.title),Object(u.createElement)("span",{className:"block-editor-block-card__description"},t.description)))},_o={insertUsage:{}},Eo={alignWide:!1,colors:[{name:Object(O.__)("Black"),slug:"black",color:"#000000"},{name:Object(O.__)("Cyan bluish gray"),slug:"cyan-bluish-gray",color:"#abb8c3"},{name:Object(O.__)("White"),slug:"white",color:"#ffffff"},{name:Object(O.__)("Pale pink"),slug:"pale-pink",color:"#f78da7"},{name:Object(O.__)("Vivid red"),slug:"vivid-red",color:"#cf2e2e"},{name:Object(O.__)("Luminous vivid orange"),slug:"luminous-vivid-orange",color:"#ff6900"},{name:Object(O.__)("Luminous vivid amber"),slug:"luminous-vivid-amber",color:"#fcb900"},{name:Object(O.__)("Light green cyan"),slug:"light-green-cyan",color:"#7bdcb5"},{name:Object(O.__)("Vivid green cyan"),slug:"vivid-green-cyan",color:"#00d084"},{name:Object(O.__)("Pale cyan blue"),slug:"pale-cyan-blue",color:"#8ed1fc"},{name:Object(O.__)("Vivid cyan blue"),slug:"vivid-cyan-blue",color:"#0693e3"},{name:Object(O.__)("Vivid purple"),slug:"vivid-purple",color:"#9b51e0"}],fontSizes:[{name:Object(O._x)("Small","font size name"),size:13,slug:"small"},{name:Object(O._x)("Normal","font size name"),size:16,slug:"normal"},{name:Object(O._x)("Medium","font size name"),size:20,slug:"medium"},{name:Object(O._x)("Large","font size name"),size:36,slug:"large"},{name:Object(O._x)("Huge","font size name"),size:42,slug:"huge"}],imageSizes:[{slug:"thumbnail",name:Object(O.__)("Thumbnail")},{slug:"medium",name:Object(O.__)("Medium")},{slug:"large",name:Object(O.__)("Large")},{slug:"full",name:Object(O.__)("Full Size")}],imageEditing:!0,maxWidth:580,allowedBlockTypes:!0,maxUploadFileSize:0,allowedMimeTypes:null,availableLegacyWidgets:{},__experimentalCanUserUseUnfilteredHTML:!1,__experimentalBlockDirectory:!1,__experimentalEnableFullSiteEditing:!1,__experimentalEnableFullSiteEditingDemo:!1,__mobileEnablePageTemplates:!1,__experimentalBlockPatterns:[],__experimentalBlockPatternCategories:[],__experimentalSpotlightEntityBlocks:[],gradients:[{name:Object(O.__)("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(O.__)("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(O.__)("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(O.__)("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(O.__)("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(O.__)("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(O.__)("Blush light purple"),gradient:"linear-gradient(135deg,rgb(255,206,236) 0%,rgb(152,150,240) 100%)",slug:"blush-light-purple"},{name:Object(O.__)("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(O.__)("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(O.__)("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(O.__)("Electric grass"),gradient:"linear-gradient(135deg,rgb(202,248,128) 0%,rgb(113,206,126) 100%)",slug:"electric-grass"},{name:Object(O.__)("Midnight"),gradient:"linear-gradient(135deg,rgb(2,3,129) 0%,rgb(40,116,252) 100%)",slug:"midnight"}]};function Co(e,t,n){return[].concat(ce(e.slice(0,n)),ce(Object(b.castArray)(t)),ce(e.slice(n)))}function wo(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:1,o=ce(e);return o.splice(t,r),Co(o,e.slice(t,t+r),n)}function So(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 Io(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?So(Object(n),!0).forEach((function(t){s(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):So(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Bo(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=s({},t,[]);return e.forEach((function(e){var r=e.clientId,o=e.innerBlocks;n[t].push(r),Object.assign(n,Bo(o,r))})),n}function xo(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return e.reduce((function(e,n){return Object.assign(e,s({},n.clientId,t),xo(n.innerBlocks,n.clientId))}),{})}function Po(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:b.identity,n={},r=ce(e);r.length;){var o=r.shift(),c=o.innerBlocks,i=Object(Ee.a)(o,["innerBlocks"]);r.push.apply(r,ce(c)),n[i.clientId]=t(i)}return n}function To(e){return Po(e,(function(e){return Object(b.omit)(e,"attributes")}))}function No(e){return Po(e,(function(e){return e.attributes}))}function Do(e,t){return e===t?Io({},e):t}function Ro(e,t){return"UPDATE_BLOCK_ATTRIBUTES"===e.type&&void 0!==t&&"UPDATE_BLOCK_ATTRIBUTES"===t.type&&Object(b.isEqual)(e.clientIds,t.clientIds)&&(n=e.attributes,r=t.attributes,Object(b.isEqual)(Object(b.keys)(n),Object(b.keys)(r)));var n,r}var Ao=function(e){return e.reduce((function(e,t){return e[t]={},e}),{})};var Mo=Object(b.flow)(v.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=Io({},t)).attributes=Object(b.mapValues)(t.attributes,(function(e,n){return"core/block"===t.byClientId[n].name&&e.ref===r?Io(Io({},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(b.mapValues)(Po(n.blocks),(function(){return{}}));break;case"RECEIVE_BLOCKS":case"INSERT_BLOCKS":var c=Object(b.keys)(Po(n.blocks));n.rootClientId&&!t.controlledInnerBlocks[n.rootClientId]&&c.push(n.rootClientId),r.cache=Io(Io({},r.cache),Ao(o(c)));break;case"UPDATE_BLOCK":r.cache=Io(Io({},r.cache),Ao(o([n.clientId])));break;case"UPDATE_BLOCK_ATTRIBUTES":r.cache=Io(Io({},r.cache),Ao(o(n.clientIds)));break;case"REPLACE_BLOCKS_AUGMENTED_WITH_CHILDREN":var i=Ao(o(n.replacedClientIds));r.cache=Io(Io(Io({},Object(b.omit)(r.cache,n.replacedClientIds)),Object(b.omit)(i,n.replacedClientIds)),Ao(Object(b.keys)(Po(n.blocks))));break;case"REMOVE_BLOCKS_AUGMENTED_WITH_CHILDREN":r.cache=Io(Io({},Object(b.omit)(r.cache,n.removedClientIds)),Ao(Object(b.difference)(o(n.clientIds),n.clientIds)));break;case"MOVE_BLOCKS_TO_POSITION":var a=ce(n.clientIds);n.fromRootClientId&&a.push(n.fromRootClientId),n.toRootClientId&&a.push(n.toRootClientId),r.cache=Io(Io({},r.cache),Ao(o(a)));break;case"MOVE_BLOCKS_UP":case"MOVE_BLOCKS_DOWN":var l=[];n.rootClientId&&l.push(n.rootClientId),r.cache=Io(Io({},r.cache),Ao(o(l)));break;case"SAVE_REUSABLE_BLOCK_SUCCESS":var s=Object(b.keys)(Object(b.omitBy)(r.attributes,(function(e,t){return"core/block"!==r.byClientId[t].name||e.ref!==n.updatedId})));r.cache=Io(Io({},r.cache),Ao(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=ce(r)),(c=r).push.apply(c,ce(t.order[r[o]])))}return r};if(t)switch(n.type){case"REMOVE_BLOCKS":n=Io(Io({},n),{},{type:"REMOVE_BLOCKS_AUGMENTED_WITH_CHILDREN",removedClientIds:r(n.clientIds)});break;case"REPLACE_BLOCKS":n=Io(Io({},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=ce(n.blocks);o.length;){var c=o.shift(),i=c.innerBlocks,a=Object(Ee.a)(c,["innerBlocks"]);o.push.apply(o,ce(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,Io(Io({},n),{},{type:"INSERT_BLOCKS",index:0}))).order=Io(Io({},s.order),Object(b.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(b.reduce)(t[n],(function(n,o){return r[o]?n:[].concat(ce(n),[o],ce(e(t,o)))}),[])}(t.order,"",t.controlledInnerBlocks),o=Object.keys(Object(b.pickBy)(t.controlledInnerBlocks));return Io(Io({},t),{},{byClientId:Io(Io({},Object(b.omit)(t.byClientId,r)),To(n.blocks)),attributes:Io(Io({},Object(b.omit)(t.attributes,r)),No(n.blocks)),order:Io(Io({},Object(b.omit)(t.order,r)),Object(b.omit)(Bo(n.blocks),o)),parents:Io(Io({},Object(b.omit)(t.parents,r)),xo(n.blocks)),cache:Io(Io({},Object(b.omit)(t.cache,r)),Object(b.omit)(Object(b.mapValues)(Po(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:Io(Io({},c),{},{isPersistentChange:l})}return c=Io(Io({},c),{},{isPersistentChange:i?!n:!Ro(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 To(t.blocks);case"RECEIVE_BLOCKS":case"INSERT_BLOCKS":return Io(Io({},e),To(t.blocks));case"UPDATE_BLOCK":if(!e[t.clientId])return e;var n=Object(b.omit)(t.updates,"attributes");return Object(b.isEmpty)(n)?e:Io(Io({},e),{},s({},t.clientId,Io(Io({},e[t.clientId]),n)));case"REPLACE_BLOCKS_AUGMENTED_WITH_CHILDREN":return t.blocks?Io(Io({},Object(b.omit)(e,t.replacedClientIds)),To(t.blocks)):e;case"REMOVE_BLOCKS_AUGMENTED_WITH_CHILDREN":return Object(b.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 No(t.blocks);case"RECEIVE_BLOCKS":case"INSERT_BLOCKS":return Io(Io({},e),No(t.blocks));case"UPDATE_BLOCK":return e[t.clientId]&&t.updates.attributes?Io(Io({},e),{},s({},t.clientId,Io(Io({},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 Io(Io({},n),{},s({},r,Object(b.reduce)(t.attributes,(function(t,n,o){return n!==t[o]&&((t=Do(e[r],t))[o]=n),t}),e[r])))}),{});return t.clientIds.every((function(t){return n[t]===e[t]}))?e:Io(Io({},e),n);case"REPLACE_BLOCKS_AUGMENTED_WITH_CHILDREN":return t.blocks?Io(Io({},Object(b.omit)(e,t.replacedClientIds)),No(t.blocks)):e;case"REMOVE_BLOCKS_AUGMENTED_WITH_CHILDREN":return Object(b.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 Bo(t.blocks);case"RECEIVE_BLOCKS":return Io(Io({},e),Object(b.omit)(Bo(t.blocks),""));case"INSERT_BLOCKS":var n=t.rootClientId,r=void 0===n?"":n,o=e[r]||[],c=Bo(t.blocks,r),i=t.index,a=void 0===i?o.length:i;return Io(Io(Io({},e),c),{},s({},r,Co(o,c[r],a)));case"MOVE_BLOCKS_TO_POSITION":var l,u=t.fromRootClientId,d=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(d===p){var O=e[p],h=O.indexOf(m[0]);return Io(Io({},e),{},s({},p,wo(e[p],h,g,m.length)))}return Io(Io({},e),{},(s(l={},d,b.without.apply(void 0,[e[d]].concat(ce(m)))),s(l,p,Co(e[p],m,g)),l));case"MOVE_BLOCKS_UP":var j=t.clientIds,k=t.rootClientId,y=void 0===k?"":k,_=Object(b.first)(j),E=e[y];if(!E.length||_===Object(b.first)(E))return e;var C=E.indexOf(_);return Io(Io({},e),{},s({},y,wo(E,C,C-1,j.length)));case"MOVE_BLOCKS_DOWN":var w=t.clientIds,S=t.rootClientId,I=void 0===S?"":S,B=Object(b.first)(w),x=Object(b.last)(w),P=e[I];if(!P.length||x===Object(b.last)(P))return e;var T=P.indexOf(B);return Io(Io({},e),{},s({},I,wo(P,T,T+1,w.length)));case"REPLACE_BLOCKS_AUGMENTED_WITH_CHILDREN":var N=t.clientIds;if(!t.blocks)return e;var D=Bo(t.blocks);return Object(b.flow)([function(e){return Object(b.omit)(e,t.replacedClientIds)},function(e){return Io(Io({},e),Object(b.omit)(D,""))},function(e){return Object(b.mapValues)(e,(function(e){return Object(b.reduce)(e,(function(e,t){return t===N[0]?[].concat(ce(e),ce(D[""])):(-1===N.indexOf(t)&&e.push(t),e)}),[])}))}])(e);case"REMOVE_BLOCKS_AUGMENTED_WITH_CHILDREN":return Object(b.flow)([function(e){return Object(b.omit)(e,t.removedClientIds)},function(e){return Object(b.mapValues)(e,(function(e){return b.without.apply(void 0,[e].concat(ce(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 xo(t.blocks);case"RECEIVE_BLOCKS":return Io(Io({},e),xo(t.blocks));case"INSERT_BLOCKS":return Io(Io({},e),xo(t.blocks,t.rootClientId||""));case"MOVE_BLOCKS_TO_POSITION":return Io(Io({},e),t.clientIds.reduce((function(e,n){return e[n]=t.toRootClientId||"",e}),{}));case"REPLACE_BLOCKS_AUGMENTED_WITH_CHILDREN":return Io(Io({},Object(b.omit)(e,t.replacedClientIds)),xo(t.blocks,e[t.clientIds[0]]));case"REMOVE_BLOCKS_AUGMENTED_WITH_CHILDREN":return Object(b.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?Io(Io({},e),{},s({},r,o)):e}});function Lo(){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}var Fo=Object(v.combineReducers)({blocks:Mo,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},selectionStart:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"SELECTION_CHANGE":return{clientId:t.clientId,attributeKey:t.attributeKey,offset:t.startOffset};case"RESET_SELECTION":return t.selectionStart;case"MULTI_SELECT":return{clientId:t.start}}return Lo(e,t)},selectionEnd:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"SELECTION_CHANGE":return{clientId:t.clientId,attributeKey:t.attributeKey,offset:t.endOffset};case"RESET_SELECTION":return t.selectionEnd;case"MULTI_SELECT":return{clientId:t.end}}return Lo(e,t)},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 Io(Io({},e),{},s({},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(b.omit)(e,t.clientIds);case"UPDATE_BLOCK_LIST_SETTINGS":var n=t.clientId;return t.settings?Object(b.isEqual)(e[n],t.settings)?e:Io(Io({},e),{},s({},n,t.settings)):e.hasOwnProperty(n)?Object(b.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"SHOW_INSERTION_POINT":var n=t.rootClientId,r=t.index;return{rootClientId:n,index:r};case"HIDE_INSERTION_POINT":return null}return e},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 Io(Io({},e),{},{isValid:t.isValid})}return e},settings:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Eo,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"UPDATE_SETTINGS":return Io(Io({},e),t.settings)}return e},preferences:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:_o,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.name,o={name:n.name};return Object(c.isReusableBlock)(n)&&(o.ref=n.attributes.ref,r+="/"+n.attributes.ref),Io(Io({},e),{},{insertUsage:Io(Io({},e.insertUsage),{},s({},r,{time:t.time,count:e.insertUsage[r]?e.insertUsage[r].count+1:1,insert:o}))})}),e)}return e},lastBlockAttributesChange:function(e,t){switch(t.type){case"UPDATE_BLOCK":if(!t.updates.attributes)break;return s({},t.clientId,t.updates.attributes);case"UPDATE_BLOCK_ATTRIBUTES":return t.clientIds.reduce((function(e,n){return Io(Io({},e),{},s({},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: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"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}}),Vo=n(146),Ho=n.n(Vo),zo=n(263),Uo=n.n(zo);function Go(e,t){var n;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return Wo(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Wo(e,t)}(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 Wo(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 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){s(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}var $o=Cr.a.mark(lc),Yo=Cr.a.mark(mc),Xo=Cr.a.mark(vc),Qo=Cr.a.mark(_c),Zo=Cr.a.mark(Ic),Jo=Cr.a.mark(Bc),ec=Cr.a.mark(Pc),tc=Cr.a.mark(Mc),nc=Cr.a.mark(ti),rc=Cr.a.mark(ni),oc=Cr.a.mark(ri),cc=Cr.a.mark(oi),ic=Cr.a.mark(ci),ac=Cr.a.mark(ai);function lc(){return Cr.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,v.controls.select("core/block-editor","getBlockCount");case 2:if(0!==e.sent){e.next=7;break}return e.next=6,$c();case 6:return e.abrupt("return",e.sent);case 7:case"end":return e.stop()}}),$o)}function sc(e){return{type:"RESET_BLOCKS",blocks:e}}function uc(e,t){return{type:"RESET_SELECTION",selectionStart:e,selectionEnd:t}}function dc(e){return{type:"RECEIVE_BLOCKS",blocks:e}}function fc(e,t){return{type:"UPDATE_BLOCK_ATTRIBUTES",clientIds:Object(b.castArray)(e),attributes:t}}function bc(e,t){return{type:"UPDATE_BLOCK",clientId:e,updates:t}}function pc(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return{type:"SELECT_BLOCK",initialPosition:t,clientId:e}}function mc(e){var t;return Cr.a.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,v.controls.select("core/block-editor","getPreviousBlockClientId",e);case 2:if(!(t=n.sent)){n.next=7;break}return n.next=6,pc(t,-1);case 6:return n.abrupt("return",[t]);case 7:case"end":return n.stop()}}),Yo)}function vc(e){var t;return Cr.a.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,v.controls.select("core/block-editor","getNextBlockClientId",e);case 2:if(!(t=n.sent)){n.next=7;break}return n.next=6,pc(t);case 6:return n.abrupt("return",[t]);case 7:case"end":return n.stop()}}),Xo)}function gc(){return{type:"START_MULTI_SELECT"}}function Oc(){return{type:"STOP_MULTI_SELECT"}}function hc(e,t){return{type:"MULTI_SELECT",start:e,end:t}}function jc(){return{type:"CLEAR_SELECTED_BLOCK"}}function kc(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];return{type:"TOGGLE_SELECTION",isSelectionEnabled:e}}function yc(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(c.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?void 0:r.includes("is-style-"))return e;var i=e.attributes,a=void 0===i?{}:i,l=o[n];return qo(qo({},e),{},{attributes:qo(qo({},a),{},{className:"".concat(r||""," is-style-").concat(l).trim()})})}))}function _c(e,t,n,r,o){var c,i,a;return Cr.a.wrap((function(l){for(;;)switch(l.prev=l.next){case 0:return e=Object(b.castArray)(e),l.t0=yc,l.t1=Object(b.castArray)(t),l.next=5,v.controls.select("core/block-editor","getSettings");case 5:return l.t2=l.sent,t=(0,l.t0)(l.t1,l.t2),l.next=9,v.controls.select("core/block-editor","getBlockRootClientId",Object(b.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,v.controls.select("core/block-editor","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(lc(),"t3",24);case 24:case"end":return l.stop()}}),Qo)}function Ec(e,t){return _c(e,t)}function Cc(e){return function(t,n){return{clientIds:Object(b.castArray)(t),type:e,rootClientId:n}}}var wc=Cc("MOVE_BLOCKS_DOWN"),Sc=Cc("MOVE_BLOCKS_UP");function Ic(e){var t,n,r,o,c,i=arguments;return Cr.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,v.controls.select("core/block-editor","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,v.controls.select("core/block-editor","canInsertBlocks",e,n);case 17:if(!a.sent){a.next=21;break}return a.next=21,c;case 21:case"end":return a.stop()}}),Zo)}function Bc(e){var t,n,r,o=arguments;return Cr.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,Ic([e],t,n,r);case 5:case"end":return c.stop()}}),Jo)}function xc(e,t,n){var r=!(arguments.length>3&&void 0!==arguments[3])||arguments[3];return Pc([e],t,n,r)}function Pc(e,t,n){var r,o,c,i,a,l,s=arguments;return Cr.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=yc,u.t1=Object(b.castArray)(e),u.next=6,v.controls.select("core/block-editor","getSettings");case 6:u.t2=u.sent,e=(0,u.t0)(u.t1,u.t2),c=[],i=Go(e),u.prev=10,i.s();case 12:if((a=i.n()).done){u.next=20;break}return l=a.value,u.next=16,v.controls.select("core/block-editor","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()}}),ec,null,[[10,22,25,28]])}function Tc(e,t){return{type:"SHOW_INSERTION_POINT",rootClientId:e,index:t}}function Nc(){return{type:"HIDE_INSERTION_POINT"}}function Dc(e){return{type:"SET_TEMPLATE_VALIDITY",isValid:e}}function Rc(){return{type:"SYNCHRONIZE_TEMPLATE"}}function Ac(e,t){return{type:"MERGE_BLOCKS",blocks:[e,t]}}function Mc(e){var t,n,r,o,c=arguments;return Cr.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(b.castArray)(e),i.next=6,v.controls.select("core/block-editor","getBlockRootClientId",e[0]);case 6:return n=i.sent,i.next=9,v.controls.select("core/block-editor","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,mc(e[0]);case 15:r=i.sent,i.next=21;break;case 18:return i.next=20,v.controls.select("core/block-editor","getPreviousBlockClientId",e[0]);case 20:r=i.sent;case 21:return i.next=23,{type:"REMOVE_BLOCKS",clientIds:e};case 23:return i.delegateYield(lc(),"t0",24);case 24:return o=i.t0,i.abrupt("return",[r||o]);case 26:case"end":return i.stop()}}),tc)}function Lc(e,t){return Mc([e],t)}function Fc(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 Vc(e){return{type:"TOGGLE_BLOCK_MODE",clientId:e}}function Hc(){return{type:"START_TYPING"}}function zc(){return{type:"STOP_TYPING"}}function Uc(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return{type:"START_DRAGGING_BLOCKS",clientIds:e}}function Gc(){return{type:"STOP_DRAGGING_BLOCKS"}}function Wc(){return{type:"ENTER_FORMATTED_TEXT"}}function Kc(){return{type:"EXIT_FORMATTED_TEXT"}}function qc(e,t,n,r){return{type:"SELECTION_CHANGE",clientId:e,attributeKey:t,startOffset:n,endOffset:r}}function $c(e,t,n){var r=Object(c.getDefaultBlockName)();if(r)return xc(Object(c.createBlock)(r,e),n,t)}function Yc(e,t){return{type:"UPDATE_BLOCK_LIST_SETTINGS",clientId:e,settings:t}}function Xc(e){return{type:"UPDATE_SETTINGS",settings:e}}function Qc(e,t){return{type:"SAVE_REUSABLE_BLOCK_SUCCESS",id:e,updatedId:t}}function Zc(){return{type:"MARK_LAST_CHANGE_AS_PERSISTENT"}}function Jc(){return{type:"MARK_NEXT_CHANGE_AS_NOT_PERSISTENT"}}function ei(){return{type:"MARK_AUTOMATIC_CHANGE"}}function ti(){var e,t=arguments;return Cr.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(Ue.speak)(Object(O.__)("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(Ue.speak)(Object(O.__)("You are currently in edit mode. To return to the navigation mode, press Escape."));case 4:case"end":return n.stop()}}),nc)}function ni(){var e,t=arguments;return Cr.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(Ue.speak)(Object(O.__)("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()}}),rc)}function ri(e){var t,n,r,o,i,a,l=arguments;return Cr.a.wrap((function(s){for(;;)switch(s.prev=s.next){case 0:if(t=!(l.length>1&&void 0!==l[1])||l[1],e||e.length){s.next=3;break}return s.abrupt("return");case 3:return s.next=5,v.controls.select("core/block-editor","getBlocksByClientId",e);case 5:return n=s.sent,s.next=8,v.controls.select("core/block-editor","getBlockRootClientId",e[0]);case 8:if(r=s.sent,!Object(b.some)(n,(function(e){return!e}))){s.next=11;break}return s.abrupt("return");case 11:if(o=n.map((function(e){return e.name})),!Object(b.some)(o,(function(e){return!Object(c.hasBlockSupport)(e,"multiple",!0)}))){s.next=14;break}return s.abrupt("return");case 14:return s.next=16,v.controls.select("core/block-editor","getBlockIndex",Object(b.last)(Object(b.castArray)(e)),r);case 16:return i=s.sent,a=n.map((function(e){return Object(c.cloneBlock)(e)})),s.next=20,Pc(a,i+1,r,t);case 20:if(!(a.length>1&&t)){s.next=23;break}return s.next=23,hc(Object(b.first)(a).clientId,Object(b.last)(a).clientId);case 23:return s.abrupt("return",a.map((function(e){return e.clientId})));case 24:case"end":return s.stop()}}),oc)}function oi(e){var t,n;return Cr.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,v.controls.select("core/block-editor","getBlockRootClientId",e);case 4:return t=r.sent,r.next=7,v.controls.select("core/block-editor","getTemplateLock",t);case 7:if(!r.sent){r.next=10;break}return r.abrupt("return");case 10:return r.next=12,v.controls.select("core/block-editor","getBlockIndex",e,t);case 12:return n=r.sent,r.next=15,$c({},t,n);case 15:return r.abrupt("return",r.sent);case 16:case"end":return r.stop()}}),cc)}function ci(e){var t,n;return Cr.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,v.controls.select("core/block-editor","getBlockRootClientId",e);case 4:return t=r.sent,r.next=7,v.controls.select("core/block-editor","getTemplateLock",t);case 7:if(!r.sent){r.next=10;break}return r.abrupt("return");case 10:return r.next=12,v.controls.select("core/block-editor","getBlockIndex",e,t);case 12:return n=r.sent,r.next=15,$c({},t,n+1);case 15:return r.abrupt("return",r.sent);case 16:case"end":return r.stop()}}),ic)}function ii(e,t){return{type:"TOGGLE_BLOCK_HIGHLIGHT",clientId:e,isHighlighted:t}}function ai(e){return Cr.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,ii(e,!0);case 2:return t.next=4,{type:"SLEEP",duration:150};case 4:return t.next=6,ii(e,!1);case 6:case"end":return t.stop()}}),ac)}function li(e,t){return{type:"SET_HAS_CONTROLLED_INNER_BLOCKS",hasControlledInnerBlocks:t,clientId:e}}var si=n(44);function ui(e,t){var n;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return di(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return di(e,t)}(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 di(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 fi(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 bi(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?fi(Object(n),!0).forEach((function(t){s(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):fi(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var pi=Object(u.createElement)(h.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(u.createElement)(h.Rect,{x:"0",fill:"none",width:"24",height:"24"}),Object(u.createElement)(h.G,null,Object(u.createElement)(h.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"}))),mi=[];function vi(e,t){var n=e.blocks.byClientId[t];if("web"!==u.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 gi(e,t){var n=e.blocks.byClientId[t];return!!n&&n.isValid}function Oi(e,t){return e.blocks.byClientId[t]?e.blocks.attributes[t]:null}var hi=Object(si.a)((function(e,t){var n=e.blocks.byClientId[t];return n?bi(bi({},n),{},{attributes:Oi(e,t),innerBlocks:Ua(e,t)?mi:ki(e,t)}):null}),(function(e,t){return[e.blocks.cache[t]]})),ji=Object(si.a)((function(e,t){var n=e.blocks.byClientId[t];return n?bi(bi({},n),{},{attributes:Oi(e,t)}):null}),(function(e,t){return[e.blocks.byClientId[t],e.blocks.attributes[t]]})),ki=Object(si.a)((function(e,t){return Object(b.map)(na(e,t),(function(t){return hi(e,t)}))}),(function(e,t){return Object(b.map)(e.blocks.order[t||""],(function(t){return e.blocks.cache[t]}))})),yi=Object(si.a)((function(e,t){var n=e.blocks.byClientId[t];return n?bi(bi({},n),{},{attributes:Oi(e,t),innerBlocks:_i(e,t)}):null}),(function(e){return[e.blocks.byClientId,e.blocks.order,e.blocks.attributes]})),_i=Object(si.a)((function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return Object(b.map)(na(e,t),(function(t){return yi(e,t)}))}),(function(e){return[e.blocks.byClientId,e.blocks.order,e.blocks.attributes]})),Ei=function e(t,n){return Object(b.flatMap)(n,(function(n){var r=na(t,n);return[].concat(ce(r),ce(e(t,r)))}))},Ci=Object(si.a)((function(e){var t=na(e);return[].concat(ce(t),ce(Ei(e,t)))}),(function(e){return[e.blocks.order]})),wi=Object(si.a)((function(e,t){var n=Ci(e);return t?Object(b.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]})),Si=Object(si.a)((function(e,t){return Object(b.map)(Object(b.castArray)(t),(function(t){return hi(e,t)}))}),(function(e){return[e.blocks.byClientId,e.blocks.order,e.blocks.attributes]}));function Ii(e,t){return na(e,t).length}function Bi(e){return e.selectionStart}function xi(e){return e.selectionEnd}function Pi(e){return e.selectionStart.clientId}function Ti(e){return e.selectionEnd.clientId}function Ni(e){var t=qi(e).length;return t||(e.selectionStart.clientId?1:0)}function Di(e){var t=e.selectionStart,n=e.selectionEnd;return!!t.clientId&&t.clientId===n.clientId}function Ri(e){var t=e.selectionStart,n=e.selectionEnd,r=t.clientId;return r&&r===n.clientId?r:null}function Ai(e){var t=Ri(e);return t?hi(e,t):null}function Mi(e,t){return void 0!==e.blocks.parents[t]?e.blocks.parents[t]:null}var Li=Object(si.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]})),Fi=Object(si.a)((function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]&&arguments[3],o=Li(e,t,r);return Object(b.map)(Object(b.filter)(Object(b.map)(o,(function(t){return{id:t,name:vi(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 Vi(e,t){var n,r=t;do{n=r,r=e.blocks.parents[r]}while(r);return n}function Hi(e,t){for(var n,r=Ri(e),o=[].concat(ce(Li(e,t)),[t]),c=[].concat(ce(Li(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 zi(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;if(void 0===t&&(t=Ri(e)),void 0===t&&(t=n<0?Yi(e):Xi(e)),!t)return null;var r=Mi(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 Ui(e,t){return zi(e,t,-1)}function Gi(e,t){return zi(e,t,1)}function Wi(e){return e.initialPosition}var Ki=Object(si.a)((function(e){var t=e.selectionStart,n=e.selectionEnd;if(void 0===t.clientId||void 0===n.clientId)return mi;if(t.clientId===n.clientId)return[t.clientId];var r=Mi(e,t.clientId);if(null===r)return mi;var o=na(e,r),c=o.indexOf(t.clientId),i=o.indexOf(n.clientId);return c>i?o.slice(i,c+1):o.slice(c,i+1)}),(function(e){return[e.blocks.order,e.selectionStart.clientId,e.selectionEnd.clientId]}));function qi(e){var t=e.selectionStart,n=e.selectionEnd;return t.clientId===n.clientId?mi:Ki(e)}var $i=Object(si.a)((function(e){var t=qi(e);return t.length?t.map((function(t){return hi(e,t)})):mi}),(function(e){return[].concat(ce(Ki.getDependants(e)),[e.blocks.byClientId,e.blocks.order,e.blocks.attributes])}));function Yi(e){return Object(b.first)(qi(e))||null}function Xi(e){return Object(b.last)(qi(e))||null}function Qi(e,t){return Yi(e)===t}function Zi(e,t){return-1!==qi(e).indexOf(t)}var Ji=Object(si.a)((function(e,t){for(var n=t,r=!1;n&&!r;)r=Zi(e,n=Mi(e,n));return r}),(function(e){return[e.blocks.order,e.selectionStart.clientId,e.selectionEnd.clientId]}));function ea(e){var t=e.selectionStart,n=e.selectionEnd;return t.clientId===n.clientId?null:t.clientId||null}function ta(e){var t=e.selectionStart,n=e.selectionEnd;return t.clientId===n.clientId?null:n.clientId||null}function na(e,t){return e.blocks.order[t||""]||mi}function ra(e,t,n){return na(e,n).indexOf(t)}function oa(e,t){var n=e.selectionStart,r=e.selectionEnd;return n.clientId===r.clientId&&n.clientId===t}function ca(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return Object(b.some)(na(e,t),(function(t){return oa(e,t)||Zi(e,t)||n&&ca(e,t,n)}))}function ia(e,t){if(!t)return!1;var n=qi(e),r=n.indexOf(t);return r>-1&&r<n.length-1}function aa(e){var t=e.selectionStart,n=e.selectionEnd;return t.clientId!==n.clientId}function la(e){return e.isMultiSelecting}function sa(e){return e.isSelectionEnabled}function ua(e,t){return e.blocksMode[t]||"visual"}function da(e){return e.isTyping}function fa(e){return!!e.draggedBlocks.length}function ba(e){return e.draggedBlocks}function pa(e,t){return e.draggedBlocks.includes(t)}function ma(e,t){if(!fa(e))return!1;var n=Li(e,t);return Object(b.some)(n,(function(t){return pa(e,t)}))}function va(e){return e.isCaretWithinFormattedText}function ga(e){var t,n,r=e.insertionPoint,o=e.selectionEnd;if(null!==r)return r;var c=o.clientId;return c?(t=Mi(e,c)||void 0,n=ra(e,o.clientId,t)+1):n=na(e).length,{rootClientId:t,index:n}}function Oa(e){return null!==e.insertionPoint}function ha(e){return e.template.isValid}function ja(e){return e.settings.template}function ka(e,t){if(!t)return e.settings.templateLock;var n=Pa(e,t);return n?n.templateLock:null}var ya=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,r=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;return Object(b.isBoolean)(e)?e:Object(b.isArray)(e)?!(!e.includes("core/post-content")||null!==t)||e.includes(t):n},o=Object(c.getBlockType)(t);if(!o)return!1;var i=Ta(e),a=i.allowedBlockTypes,l=r(a,t,!0);if(!l)return!1;var s=!!ka(e,n);if(s)return!1;var u=Pa(e,n);if(n&&void 0===u)return!1;var d=null==u?void 0:u.allowedBlocks,f=r(d,t),p=o.parent,m=vi(e,n),v=r(p,m);return null!==f&&null!==v?f||v:null!==f?f:null===v||v},_a=Object(si.a)(ya,(function(e,t,n){return[e.blockListSettings[n],e.blocks.byClientId[n],e.settings.allowedBlockTypes,e.settings.templateLock]}));function Ea(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;return t.every((function(t){return _a(e,vi(e,t),n)}))}function Ca(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 wa=function(e,t,n){return!!Object(c.hasBlockSupport)(t,"inserter",!0)&&ya(e,t.name,n)},Sa=function(e){return function(t){return bi(bi({},e),{},{id:"".concat(e.id,"-").concat(t.name),icon:t.icon||e.icon,title:t.title||e.title,description:t.description||e.description,example:t.hasOwnProperty("example")?t.example:e.example,initialAttributes:bi(bi({},e.initialAttributes),t.attributes),innerBlocks:t.innerBlocks,keywords:t.keywords||e.keywords})}},Ia=Object(si.a)((function(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,r=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}},o=function(t){var n=t.name,o=!1;Object(c.hasBlockSupport)(t.name,"multiple",!0)||(o=Object(b.some)(Si(e,Ci(e)),{name:t.name}));var i=Ca(e,n)||{},a=i.time,l=i.count,s=void 0===l?0:l,u=t.variations.filter((function(e){var t=e.scope;return!t||t.includes("inserter")}));return{id:n,name:t.name,initialAttributes:{},title:t.title,description:t.description,icon:t.icon,category:t.category,keywords:t.keywords,variations:u,example:t.example,isDisabled:o,utility:1,frecency:r(a,s)}},i=function(t){var n,o="core/block/".concat(t.id),i=Ra(e,t.id);1===i.length&&(n=Object(c.getBlockType)(i[0].name));var a=Ca(e,o)||{},l=a.time,s=a.count,u=r(l,void 0===s?0:s);return{id:o,name:"core/block",initialAttributes:{ref:t.id},title:t.title.raw,icon:n?n.icon:pi,category:"reusable",keywords:[],isDisabled:!1,utility:1,frecency:u}},a=Object(c.getBlockTypes)().filter((function(t){return wa(e,t,n)})).map(o),l=ya(e,"core/block",n)?La(e).map(i):[],s=a.filter((function(e){var t=e.variations;return!(void 0===t?[]:t).some((function(e){return e.isDefault}))})),u=[],d=ui(a);try{for(d.s();!(t=d.n()).done;){var f=t.value,p=f.variations,m=void 0===p?[]:p;if(m.length){var v=Sa(f);u.push.apply(u,ce(m.map(v)))}}}catch(e){d.e(e)}finally{d.f()}return[].concat(ce(s),u,ce(l))}),(function(e,t){return[e.blockListSettings[t],e.blocks.byClientId,e.blocks.order,e.preferences.insertUsage,e.settings.allowedBlockTypes,e.settings.templateLock,La(e),Object(c.getBlockTypes)()]})),Ba=Object(si.a)((function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=Object(b.some)(Object(c.getBlockTypes)(),(function(n){return wa(e,n,t)}));if(n)return!0;var r=ya(e,"core/block",t)&&La(e).length>0;return r}),(function(e,t){return[e.blockListSettings[t],e.blocks.byClientId,e.settings.allowedBlockTypes,e.settings.templateLock,La(e),Object(c.getBlockTypes)()]})),xa=Object(si.a)((function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if(t)return Object(b.filter)(Object(c.getBlockTypes)(),(function(n){return wa(e,n,t)}))}),(function(e,t){return[e.blockListSettings[t],e.blocks.byClientId,e.settings.allowedBlockTypes,e.settings.templateLock,Object(c.getBlockTypes)()]}));function Pa(e,t){return e.blockListSettings[t]}function Ta(e){return e.settings}function Na(e){return e.blocks.isPersistentChange}var Da=Object(si.a)((function(e,t){return Object(b.filter)(e.blockListSettings,(function(e,n){return t.includes(n)}))}),(function(e){return[e.blockListSettings]})),Ra=Object(si.a)((function(e,t){var n=Object(b.find)(La(e),(function(e){return e.id===t}));return n?Object(c.parse)(n.content.raw||n.content):null}),(function(e){return[La(e)]}));function Aa(e){return e.blocks.isIgnoredChange}function Ma(e){return e.lastBlockAttributesChange}function La(e){var t,n;return null!==(t=null==e||null===(n=e.settings)||void 0===n?void 0:n.__experimentalReusableBlocks)&&void 0!==t?t:mi}function Fa(e){return e.isNavigationMode}function Va(e){return e.hasBlockMovingClientId}function Ha(e){return!!e.automaticChangeStatus}function za(e,t){return e.highlightedBlock===t}function Ua(e,t){return!!e.blocks.controlledInnerBlocks[t]}var Ga=Object(si.a)((function(e,t){if(!t.length)return null;var n=Ri(e);if(t.includes(vi(e,n)))return n;var r=qi(e),o=Fi(e,n||r[0],t);return o?Object(b.last)(o):null}),(function(e,t){return[e.selectionStart.clientId,e.selectionEnd.clientId,t]}));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){s(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={MERGE_BLOCKS:function(e,t){var n=t.dispatch,r=t.getState(),o=Object(ie.a)(e.blocks,2),a=o[0],l=o[1],s=hi(r,a),u=Object(c.getBlockType)(s.name);if(u.merge){var d=hi(r,l),f=Object(c.getBlockType)(d.name),p=Bi(r),m=p.clientId,v=p.attributeKey,g=p.offset,O=(m===a?u:f).attributes[v],h=(m===a||m===l)&&void 0!==v&&void 0!==g&&!!O;O||("number"==typeof v?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(en(v))):window.console.error("The RichText identifier prop does not match any attributes defined by the block."));var j=Object(c.cloneBlock)(s),k=Object(c.cloneBlock)(d);if(h){var y=m===a?j:k,_=y.attributes[v],E=O.multiline,C=O.__unstableMultilineWrapperTags,w=O.__unstablePreserveWhiteSpace,S=Object(i.insert)(Object(i.create)({html:_,multilineTag:E,multilineWrapperTags:C,preserveWhiteSpace:w}),"†",g,g);y.attributes[v]=Object(i.toHTMLString)({value:S,multilineTag:E,preserveWhiteSpace:w})}var I=s.name===d.name?[k]:Object(c.switchToBlockType)(k,s.name);if(I&&I.length){var B=u.merge(j.attributes,I[0].attributes);if(h){var x=Object(b.findKey)(B,(function(e){return"string"==typeof e&&-1!==e.indexOf("†")})),P=B[x],T=u.attributes[x],N=T.multiline,D=T.__unstableMultilineWrapperTags,R=T.__unstablePreserveWhiteSpace,A=Object(i.create)({html:P,multilineTag:N,multilineWrapperTags:D,preserveWhiteSpace:R}),M=A.text.indexOf("†"),L=Object(i.remove)(A,M,M+1),F=Object(i.toHTMLString)({value:L,multilineTag:N,preserveWhiteSpace:R});B[x]=F,n(qc(s.clientId,x,M,M))}n(_c([s.clientId,d.clientId],[Ka(Ka({},s),{},{attributes:Ka(Ka({},s.attributes),B)})].concat(ce(I.slice(1)))))}}else n(pc(s.clientId))},RESET_BLOCKS:[function(e,t){var n=t.getState(),r=ja(n),o=ka(n),i=!r||"all"!==o||Object(c.doBlocksMatchTemplate)(e.blocks,r);if(i!==ha(n))return Dc(i)}],MULTI_SELECT:function(e,t){var n=Ni((0,t.getState)());Object(Ue.speak)(Object(O.sprintf)(
26
  /* translators: %s: number of selected blocks */
27
- Object(O._n)("%s block selected.","%s blocks selected.",n),n),"assertive")},SYNCHRONIZE_TEMPLATE:function(e,t){var n=(0,t.getState)(),r=ki(n),o=ja(n);return sc(Object(c.synchronizeBlocksWithTemplate)(r,o))},MARK_AUTOMATIC_CHANGE:function(e,t){var n=window,r=n.setTimeout,o=n.requestIdleCallback;(void 0===o?function(e){return r(e,100)}:o)((function(){t.dispatch({type:"MARK_AUTOMATIC_CHANGE_FINAL"})}))}};var $a=function(e){var t,n=[Ho()(qa),Uo.a],r=function(){throw new Error("Dispatching while constructing your middleware is not allowed. Other middleware would not be applied to this dispatch.")},o={getState:e.getState,dispatch:function(){return r.apply(void 0,arguments)}};return t=n.map((function(e){return e(o)})),r=b.flowRight.apply(void 0,ce(t))(e.dispatch),e.dispatch=r,e};function Ya(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 Xa(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Ya(Object(n),!0).forEach((function(t){s(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ya(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Qa={reducer:Fo,selectors:o,actions:r,controls:{SLEEP:function(e){var t=e.duration;return new Promise((function(e){setTimeout(e,t)}))}}},Za=Object(v.registerStore)("core/block-editor",Xa(Xa({},Qa),{},{persist:["preferences"]}));$a(Za);function Ja(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?b.noop:i,l=e.onInput,s=void 0===l?b.noop:l,d=Object(v.useRegistry)(),f=d.dispatch("core/block-editor"),p=f.resetBlocks,m=f.resetSelection,g=f.replaceInnerBlocks,O=f.setHasControlledInnerBlocks,h=f.__unstableMarkNextChangeAsNotPersistent,j=d.select("core/block-editor"),k=j.getBlockName,y=j.getBlocks,_=Object(u.useRef)({incoming:null,outgoing:[]}),E=Object(u.useRef)(s),C=Object(u.useRef)(a);Object(u.useEffect)((function(){E.current=s,C.current=a}),[s,a]),Object(u.useEffect)((function(){var e,t=d.select("core/block-editor"),r=t.getSelectionStart,o=t.getSelectionEnd,c=t.isLastBlockChangePersistent,i=t.__unstableIsLastBlockChangeIgnored,a=c(),l=!1,s=d.subscribe((function(){if(null===n||null!==k(n)){var t=c(),s=y(n),u=s!==e;if(e=s,u&&(_.current.incoming||i()))return _.current.incoming=null,void(a=t);if(u||l&&!u&&t&&!a)a=t,_.current.outgoing.push(e),(a?C.current:E.current)(e,{selectionStart:r(),selectionEnd:o()});l=u}}));return function(){return s()}}),[d,n]),Object(u.useEffect)((function(){_.current.outgoing.includes(r)?Object(b.last)(_.current.outgoing)===r&&(_.current.outgoing=[]):y(n)!==r&&(_.current.outgoing=[],_.current.incoming=r,r&&(h(),n?(O(n,!0),h(),g(n,r,!1)):p(r)),o&&c&&m(o,c))}),[r,n])}var el=Object(p.createHigherOrderComponent)((function(e){return Object(v.withRegistry)((function(t){var n=t.useSubRegistry,r=void 0===n||n,o=t.registry,c=Object(Ee.a)(t,["useSubRegistry","registry"]);if(!r)return Object(u.createElement)(e,Object(l.a)({registry:o},c));var i=Object(u.useState)(null),a=Object(ie.a)(i,2),s=a[0],d=a[1];return Object(u.useEffect)((function(){var e=Object(v.createRegistry)({},o),t=e.registerStore("core/block-editor",Qa);$a(t),d(e)}),[o]),s?Object(u.createElement)(v.RegistryProvider,{value:s},Object(u.createElement)(e,Object(l.a)({registry:s},c))):null}))}),"withRegistryProvider")((function(e){var t=e.children,n=e.settings,r=Object(v.useDispatch)("core/block-editor").updateSettings;return Object(u.useEffect)((function(){r(n)}),[n]),Ja(e),t})),tl=n(71);var nl=Object(p.compose)(Object(v.withSelect)((function(e,t){var n=e("core/block-editor"),r=n.getBlockCount,o=n.getBlockName,i=n.isBlockValid,a=n.getSettings,l=n.getTemplateLock,s=!r(t.rootClientId),u=o(t.lastBlockClientId)===Object(c.getDefaultBlockName)(),d=i(t.lastBlockClientId),f=a().bodyPlaceholder;return{isVisible:s||!u||!d,showPrompt:s,isLocked:!!l(t.rootClientId),placeholder:f}})),Object(v.withDispatch)((function(e,t){var n=e("core/block-editor"),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(tl.decodeEntities)(c)||Object(O.__)("Start writing or type / to choose a block");return Object(u.createElement)("div",{"data-root-client-id":i||"",className:"wp-block block-editor-default-block-appender"},Object(u.createElement)(ao.a,{role:"button","aria-label":Object(O.__)("Add block"),className:"block-editor-default-block-appender__content",readOnly:!0,onFocus:r,value:o?a:""}),Object(u.createElement)(fs,{rootClientId:i,position:"bottom right",isAppender:!0,__experimentalIsQuick:!0}))}));var rl=Object(u.forwardRef)((function(e,t){var n=e.rootClientId,r=e.className,o=e.__experimentalSelectBlockOnInsert,c=e.onFocus,i=e.tabIndex;return Object(u.createElement)(fs,{position:"bottom center",rootClientId:n,__experimentalSelectBlockOnInsert:o,__experimentalIsQuick:!0,renderToggle:function(e){var n,o=e.onToggle,a=e.disabled,l=e.isOpen,s=e.blockTitle,d=e.hasSingleBlockType;n=d?Object(O.sprintf)(// translators: %s: the name of the block when there is only one
28
- Object(O._x)("Add %s","directly add the only allowed block"),s):Object(O._x)("Add block","Generic label for block inserter button");var b=!d,p=Object(u.createElement)(h.Button,{ref:t,onFocus:c,tabIndex:i,className:f()(r,"block-editor-button-block-appender"),onClick:o,"aria-haspopup":b?"true":void 0,"aria-expanded":b?l:void 0,disabled:a,label:n},!d&&Object(u.createElement)(h.VisuallyHidden,{as:"span"},n),Object(u.createElement)(ho.a,{icon:mo.a}));return(b||d)&&(p=Object(u.createElement)(h.Tooltip,{text:n},p)),p},isAppender:!0})})),ol=Object(u.createContext)();function cl(e){e.stopPropagation()}var il=Object(v.withSelect)((function(e,t){var n=t.rootClientId,r=e("core/block-editor"),o=r.getBlockOrder,i=r.canInsertBlockType,a=r.getTemplateLock,l=r.getSelectedBlockClientId;return{isLocked:!!a(n),blockClientIds:o(n),canInsertDefaultBlock:i(Object(c.getDefaultBlockName)(),n),selectedBlockClientId:l()}}))((function(e){var t,n=e.blockClientIds,r=e.rootClientId,o=e.canInsertDefaultBlock,c=e.isLocked,i=e.renderAppender,a=e.className,l=e.selectedBlockClientId,s=e.tagName,d=void 0===s?"div":s,p=Object(u.useContext)(ol);if(c||!1===i)return null;if(i)t=Object(u.createElement)(i,null);else{var m=!r,v=l===r,g=l&&!n.includes(l);if(!m&&!v&&(!l||g))return null;t=o?Object(u.createElement)(nl,{rootClientId:r,lastBlockClientId:Object(b.last)(n)}):Object(u.createElement)(rl,{rootClientId:r,className:"block-list-appender__toggle"})}return Object(u.createElement)(d,{tabIndex:-1,onFocus:cl,className:f()("block-list-appender","wp-block",a),ref:function(e){e?p.set(r||"",e):p.delete(r||"")}},t)}));function al(e,t,n,r,o){return function(c){var i=function(e){var t={srcRootClientId:null,srcClientIds:null,srcIndex:null,type:null};if(!e.dataTransfer)return t;try{t=Object.assign(t,JSON.parse(e.dataTransfer.getData("text")))}catch(e){return t}return t}(c),a=i.srcRootClientId,l=i.srcClientIds;if("block"===i.type){var s=n(l[0],a);if(!(a===e&&s===t||l.includes(e)||r(l).some((function(t){return t===e})))){var u=a===e,d=l.length;o(l,a,e,u&&s<t?t-d:t)}}}}function ll(e,t,n,r,o){return function(i){if(n){var a=Object(c.findTransform)(Object(c.getBlockTransforms)("from"),(function(e){return"files"===e.type&&e.isMatch(i)}));if(a){var l=a.transform(i,r);o(l,t,e)}}}}function sl(e,t,n){return function(r){var o=Object(c.pasteHandler)({HTML:r,mode:"BLOCKS"});o.length&&n(o,t,e)}}function ul(e,t){var n=Object(v.useSelect)((function(e){var t=e("core/block-editor");return{getBlockIndex:t.getBlockIndex,getClientIdsOfDescendants:t.getClientIdsOfDescendants,hasUploadPermissions:(0,t.getSettings)().mediaUpload}}),[]),r=n.getBlockIndex,o=n.getClientIdsOfDescendants,c=n.hasUploadPermissions,i=Object(v.useDispatch)("core/block-editor"),a=i.insertBlocks,l=i.moveBlocksToPosition,s=i.updateBlockAttributes;return{onDrop:al(e,t,r,o,l),onFilesDrop:ll(e,t,c,s,a),onHTMLDrop:sl(e,t,a)}}function dl(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 fl(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=dl(e,t,o);(void 0===n||c<n)&&(n=c,r=o)})),[n,r]}function bl(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 pl(e){var t=e.element,n=e.rootClientId,r=void 0===n?"":n,o=Object(u.useState)(null),c=Object(ie.a)(o,2),i=c[0],a=c[1],l=Object(v.useSelect)((function(e){var t,n=e("core/block-editor"),o=n.getBlockListSettings;return{isLockedAll:"all"===(0,n.getTemplateLock)(r),orientation:null===(t=o(r))||void 0===t?void 0:t.orientation}}),[r]),d=l.isLockedAll,f=l.orientation,b=ul(r,i),p=Object(h.__unstableUseDropZone)(function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?bl(Object(n),!0).forEach((function(t){s(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):bl(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({element:t,isDisabled:d,withPosition:!0},b)).position;if(Object(u.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=fl(t,a,c),s=Object(ie.a)(l,2),u=s[0],d=s[1];if(void 0===o||u<o){var f="bottom"===d||"right"===d,b=f?1:0,p=f&&e[i+1]&&e[i+1].classList.contains("is-dragging");o=u,r=i+(b+=p?1:0)}}})),r}(Array.from(t.current.children),p,f);a(void 0===e?0:e)}}),[p]),p)return i}var ml=new Map;function vl(e){var t=e.placeholder,n=e.rootClientId,r=e.renderAppender,o=e.__experimentalAppenderTagName,c=e.wrapperRef;var i=Object(v.useSelect)((function(e){var t,r=e("core/block-editor"),o=r.getBlockOrder,c=r.getBlockListSettings,i=r.getSettings,a=r.getSelectedBlockClientId,l=r.getMultiSelectedBlockClientIds,s=r.hasMultiSelection,u=r.getGlobalBlockCount,d=r.isTyping,f=r.isDraggingBlocks,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,isDraggingBlocks:f(),activeEntityBlockId:b}}),[n]),a=i.blockClientIds,l=i.selectedBlockClientId,s=i.multiSelectedBlockClientIds,d=i.orientation,b=i.hasMultiSelection,p=i.enableAnimation,m=i.isDraggingBlocks,g=i.activeEntityBlockId,O=pl({element:c,rootClientId:n}),h=O===a.length&&m;return Object(u.createElement)(u.Fragment,null,a.map((function(e,t){var r=b?s.includes(e):l===e,o=O===t&&m;return Object(u.createElement)(v.AsyncModeProvider,{key:e,value:!r},Object(u.createElement)(Mu,{rootClientId:n,clientId:e,index:t,enableAnimation:p,className:f()({"is-drop-target":o,"is-dropping-horizontally":o&&"horizontal"===d,"has-active-entity":g}),activeEntityBlockId:g}))})),a.length<1&&t,Object(u.createElement)(il,{tagName:o,rootClientId:n,renderAppender:r,className:f()({"is-drop-target":h,"is-dropping-horizontally":h&&"horizontal"===d})}))}function gl(e){return Object(u.createElement)(v.AsyncModeProvider,{value:!1},Object(u.createElement)(vl,e))}var Ol,hl=Object(u.forwardRef)((function(e,t){var n=e.className,r=e.placeholder,o=e.rootClientId,c=e.renderAppender,i=o?"div":Eu,a=Object(u.useRef)(),l=t||a;return Object(u.createElement)(ol.Provider,{value:ml},Object(u.createElement)(i,{ref:l,className:f()("block-editor-block-list__layout",n)},Object(u.createElement)(gl,{placeholder:r,rootClientId:o,renderAppender:c,wrapperRef:l})))}));function jl(e){var t=e.onClick;return Object(u.createElement)("div",{tabIndex:0,role:"button",onClick:t,onKeyPress:t},Object(u.createElement)(h.Disabled,null,Object(u.createElement)(hl,null)))}var kl=function(e){var t=e.viewportWidth,n=e.__experimentalPadding,r=Object(p.useResizeObserver)(),o=Object(ie.a)(r,2),c=o[0],i=o[1].width,a=Object(p.useResizeObserver)(),l=Object(ie.a)(a,2),s=l[0],d=l[1].height;Ol=Ol||Object(p.pure)(hl);var f=(i-2*n)/t;return Object(u.createElement)("div",{className:"block-editor-block-preview__container editor-styles-wrapper","aria-hidden":!0,style:{height:d*f+2*n}},c,Object(u.createElement)(h.Disabled,{style:{transform:"scale(".concat(f,")"),width:t,left:n,right:n,top:n},className:"block-editor-block-preview__content"},s,Object(u.createElement)(Ol,null)))};var yl=Object(u.memo)((function(e){var t=e.blocks,n=e.__experimentalPadding,r=void 0===n?0:n,o=e.viewportWidth,c=void 0===o?700:o,i=e.__experimentalLive,a=void 0!==i&&i,l=e.__experimentalOnClick,s=Object(v.useSelect)((function(e){return e("core/block-editor").getSettings()}),[]),d=Object(u.useMemo)((function(){return Object(b.castArray)(t)}),[t]);return t&&0!==t.length?Object(u.createElement)(el,{value:d,settings:s},a?Object(u.createElement)(jl,{onClick:l}):Object(u.createElement)(kl,{viewportWidth:c,__experimentalPadding:r})):null}));function _l(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 El(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?_l(Object(n),!0).forEach((function(t){s(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):_l(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Cl=function(e){var t=e.item,n=Object(c.getBlockType)(t.name);return Object(u.createElement)("div",{className:"block-editor-inserter__preview-container"},Object(u.createElement)("div",{className:"block-editor-inserter__preview"},Object(c.isReusableBlock)(t)||n.example?Object(u.createElement)("div",{className:"block-editor-inserter__preview-content"},Object(u.createElement)(yl,{__experimentalPadding:16,viewportWidth:500,blocks:n.example?Object(c.getBlockFromExample)(t.name,{attributes:El(El({},n.example.attributes),t.initialAttributes),innerBlocks:n.example.innerBlocks}):Object(c.createBlock)(t.name,t.initialAttributes)})):Object(u.createElement)("div",{className:"block-editor-inserter__preview-content-missing"},Object(O.__)("No Preview Available."))),!Object(c.isReusableBlock)(t)&&Object(u.createElement)(yo,{blockType:t}))},wl=n(50),Sl=n(110),Il=n(111);var Bl=function(e){var t=e.icon,n=e.onClick,r=e.isDisabled,o=e.title,c=e.className,i=e.composite,a=Object(Ee.a)(e,["icon","onClick","isDisabled","title","className","composite"]),s=t?{backgroundColor:t.background,color:t.foreground}:{};return Object(u.createElement)("div",{className:"block-editor-block-types-list__list-item"},Object(u.createElement)(Il.a,Object(l.a)({role:"option",as:h.Button},i,{className:f()("block-editor-block-types-list__item",c),onClick:function(e){e.preventDefault(),n()},disabled:r},a),Object(u.createElement)("span",{className:"block-editor-block-types-list__item-icon",style:s},Object(u.createElement)(tr,{icon:t,showColors:!0})),Object(u.createElement)("span",{className:"block-editor-block-types-list__item-title"},o)))};var xl=function(e){var t=e.items,n=void 0===t?[]:t,r=e.onSelect,o=e.onHover,i=void 0===o?function(){}:o,a=e.children,s=e.label,d=Object(wl.g)(),f=n.reduce((function(e,t){return e+"--"+t.id}),"");return Object(u.useEffect)((function(){d.unstable_sort()}),[d.unstable_sort,f]),Object(u.createElement)(Sl.a,Object(l.a)({},d,{role:"listbox",className:"block-editor-block-types-list","aria-label":s}),n.map((function(e){return Object(u.createElement)(Bl,{key:e.id,className:Object(c.getBlockMenuDefaultClassName)(e.id),icon:e.icon,onClick:function(){r(e),i(null)},onFocus:function(){return i(e)},onMouseEnter:function(){return i(e)},onMouseLeave:function(){return i(null)},onBlur:function(){return i(null)},isDisabled:e.isDisabled,title:e.title,composite:d})})),a)};function Pl(e){var t=e.rootClientId,n=e.children,r=Object(v.useSelect)((function(e){var n=(0,e("core/blocks").getBlockType)((0,e("core/block-editor").getBlockName)(t));return{rootBlockTitle:n&&n.title,rootBlockIcon:n&&n.icon}})),o=r.rootBlockTitle,c=r.rootBlockIcon;return Object(u.createElement)("div",{className:"block-editor-inserter__child-blocks"},(c||o)&&Object(u.createElement)("div",{className:"block-editor-inserter__parent-block-header"},Object(u.createElement)(tr,{icon:c,showColors:!0}),o&&Object(u.createElement)("h2",null,o)),n)}var Tl=Object(h.createSlotFill)("__experimentalInserterMenuExtension"),Nl=Tl.Fill,Dl=Tl.Slot;Nl.Slot=Dl;var Rl=Nl;var Al=function(e){var t=e.title,n=e.icon,r=e.children;return Object(u.createElement)(u.Fragment,null,Object(u.createElement)("div",{className:"block-editor-inserter__panel-header"},Object(u.createElement)("h2",{className:"block-editor-inserter__panel-title"},t),Object(u.createElement)(h.Icon,{icon:n})),Object(u.createElement)("div",{className:"block-editor-inserter__panel-content"},r))};var Ml=function(){return Object(u.createElement)("div",{className:"block-editor-inserter__no-results"},Object(u.createElement)(ho.a,{className:"block-editor-inserter__no-results-icon",icon:er.a}),Object(u.createElement)("p",null,Object(O.__)("No results found.")))};function Ll(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 Fl=Object(h.withSpokenMessages)((function(e){var t=e.rootClientId,n=e.onInsert,r=e.onHover,o=e.filterValue,c=e.debouncedSpeak,i=e.showMostUsedBlocks,a=Jn(t,n),l=Object(ie.a)(a,4),d=l[0],f=l[1],p=l[2],m=l[3],g=Object(v.useSelect)((function(e){var n=e("core/block-editor").getBlockName;return!!(0,e("core/blocks").getChildBlockNames)(n(t)).length}),[t]),h=Object(u.useMemo)((function(){return Xn(d,f,p,o)}),[o,d,f,p]),j=Object(u.useMemo)((function(){return Object(b.orderBy)(d,["frecency"],["desc"]).slice(0,6)}),[d]),k=Object(u.useMemo)((function(){return h.filter((function(e){return!e.category}))}),[h]),y=Object(u.useMemo)((function(){var e=function(e){return Object(b.findIndex)(f,(function(t){return t.slug===e.category}))};return Object(b.flow)((function(e){return e.filter((function(e){return e.category&&"reusable"!==e.category}))}),(function(t){return Object(b.sortBy)(t,e)}),(function(e){return Object(b.groupBy)(e,"category")}))(h)}),[h,f]),_=Object(u.useMemo)((function(){var e=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Ll(Object(n),!0).forEach((function(t){s(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ll(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({},p);return Object.keys(p).forEach((function(t){e[t]=h.filter((function(e){return function(e){return e.name.split("/")[0]}(e)===t})),0===e[t].length&&delete e[t]})),e}),[h,p]);Object(u.useEffect)((function(){return function(){return r(null)}}),[]),Object(u.useEffect)((function(){var e=Object(O.sprintf)(
29
  /* translators: %d: number of results. */
30
- Object(O._n)("%d result found.","%d results found.",h.length),h.length);c(e)}),[o,c]);var E=!Object(b.isEmpty)(h);return Object(u.createElement)("div",null,g&&Object(u.createElement)(Pl,{rootClientId:t},Object(u.createElement)(xl,{items:h,onSelect:m,onHover:r,label:Object(O.__)("Child Blocks")})),i&&!g&&!!j.length&&!o&&Object(u.createElement)(Al,{title:Object(O._x)("Most used","blocks")},Object(u.createElement)(xl,{items:j,onSelect:m,onHover:r,label:Object(O._x)("Most used","blocks")})),!g&&Object(b.map)(f,(function(e){var t=y[e.slug];return t&&t.length?Object(u.createElement)(Al,{key:e.slug,title:e.title,icon:e.icon},Object(u.createElement)(xl,{items:t,onSelect:m,onHover:r,label:e.title})):null})),!g&&!!k.length&&Object(u.createElement)(Al,{className:"block-editor-inserter__uncategorized-blocks-panel",title:Object(O.__)("Uncategorized")},Object(u.createElement)(xl,{items:k,onSelect:m,onHover:r,label:Object(O.__)("Uncategorized")})),!g&&Object(b.map)(p,(function(e,t){var n=_[t];return n&&n.length?Object(u.createElement)(Al,{key:t,title:e.title,icon:e.icon},Object(u.createElement)(xl,{items:n,onSelect:m,onHover:r,label:e.title})):null})),Object(u.createElement)(Rl.Slot,{fillProps:{onSelect:m,onHover:r,filterValue:o,hasItems:E}},(function(e){return e.length?e:E?null:Object(u.createElement)(Ml,null)})))}));var Vl=function(e){var t,n=e.selectedCategory,r=e.patternCategories,o=e.onClickCategory,c=e.children;return Object(u.createElement)(u.Fragment,null,Object(u.createElement)("div",{className:f()("block-editor-inserter__panel-header","block-editor-inserter__panel-header-patterns")},Object(u.createElement)(h.SelectControl,{className:"block-editor-inserter__panel-dropdown",label:Object(O.__)("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(u.createElement)("div",{className:"block-editor-inserter__panel-content"},c))},Hl=function(e){var t=Object(v.useSelect)((function(e){var t=e("core/block-editor").getSettings();return{patterns:t.__experimentalBlockPatterns,patternCategories:t.__experimentalBlockPatternCategories}}),[]),n=t.patternCategories,r=t.patterns,o=Object(v.useDispatch)("core/notices").createSuccessNotice;return[r,n,Object(u.useCallback)((function(t,n){e(Object(b.map)(n,(function(e){return Object(c.cloneBlock)(e)})),t.name),o(Object(O.sprintf)(
31
  /* translators: %s: block pattern title. */
32
- Object(O.__)('Block pattern "%s" inserted.'),t.title),{type:"snackbar"})}),[])]};function zl(e){var t=e.pattern,n=e.onClick,r=t.content,o=t.viewportWidth,i=Object(u.useMemo)((function(){return Object(c.parse)(r)}),[r]),a=Object(p.useInstanceId)(zl),l="block-editor-block-patterns-list__item-description-".concat(a);return Object(u.createElement)("div",{className:"block-editor-block-patterns-list__item",role:"button",onClick:function(){return n(t,i)},onKeyDown:function(e){pt.ENTER!==e.keyCode&&pt.SPACE!==e.keyCode||n(t,i)},tabIndex:0,"aria-label":t.title,"aria-describedby":t.description?l:void 0},Object(u.createElement)(yl,{blocks:i,viewportWidth:o}),Object(u.createElement)("div",{className:"block-editor-block-patterns-list__item-title"},t.title),!!t.description&&Object(u.createElement)(h.VisuallyHidden,{id:l},t.description))}function Ul(){return Object(u.createElement)("div",{className:"block-editor-block-patterns-list__item is-placeholder"})}var Gl=function(e){var t=e.blockPatterns,n=e.shownPatterns,r=e.onClickPattern;return t.map((function(e){return n.includes(e)?Object(u.createElement)(zl,{key:e.name,pattern:e,onClick:r}):Object(u.createElement)(Ul,{key:e.name})}))};function Wl(e){var t=e.filterValue,n=e.onInsert,r=Hl(n),o=Object(ie.a)(r,3),c=o[0],i=o[2],a=Object(u.useMemo)((function(){return Qn(c,t)}),[t,c]),l=Object(p.useAsyncList)(a);if(t)return a.length?Object(u.createElement)(Al,{title:Object(O.__)("Search Results")},Object(u.createElement)(Gl,{shownPatterns:l,blockPatterns:a,onClickPattern:i})):Object(u.createElement)(Ml,null)}function Kl(e){var t=e.onInsert,n=e.selectedCategory,r=e.onClickCategory,o=Hl(t),c=Object(ie.a)(o,3),i=c[0],a=c[1],l=c[2],s=Object(u.useMemo)((function(){return a.filter((function(e){return i.some((function(t){return t.categories.includes(e.name)}))}))}),[i,a]),d=n||s[0];Object(u.useEffect)((function(){i.some((function(e){return f(e)===1/0}))&&!s.find((function(e){return"uncategorized"===e.name}))&&s.push({name:"uncategorized",label:Object(O._x)("Uncategorized")})}),[s,i]);var f=Object(u.useCallback)((function(e){if(!e.categories||!e.categories.length)return 1/0;var t=Object(b.fromPairs)(s.map((function(e,t){return[e.name,t]})));return Math.min.apply(Math,ce(e.categories.map((function(e){return void 0!==t[e]?t[e]:1/0}))))}),[s]),m=Object(u.useMemo)((function(){return i.filter((function(e){return"uncategorized"===d.name?f(e)===1/0:e.categories&&e.categories.includes(d.name)}))}),[i,d]),v=Object(u.useMemo)((function(){return m.sort((function(e,t){return f(e)-f(t)}))}),[m,f]),g=Object(p.useAsyncList)(v);return Object(u.createElement)(u.Fragment,null,!!m.length&&Object(u.createElement)(Vl,{key:d.name,title:d.title,selectedCategory:d,patternCategories:s,onClickCategory:r},Object(u.createElement)(Gl,{shownPatterns:g,blockPatterns:m,onClickPattern:l})))}var ql=function(e){var t=e.onInsert,n=e.onClickCategory,r=e.filterValue,o=e.selectedCategory;return r?Object(u.createElement)(Wl,{onInsert:t,filterValue:r}):Object(u.createElement)(Kl,{selectedCategory:o,onInsert:t,onClickCategory:n})},$l=n(18);function Yl(e){var t=e.debouncedSpeak,n=e.filterValue,r=e.onHover,o=e.onInsert,c=e.rootClientId,i=Jn(c,o),a=Object(ie.a)(i,4),l=a[0],s=a[1],d=a[2],f=a[3],b=Object(u.useMemo)((function(){var e=l.filter((function(e){return"reusable"===e.category}));return n?Xn(e,s,d,n):e}),[n,l,s,d]);return Object(u.useEffect)((function(){var e=Object(O.sprintf)(
33
  /* translators: %d: number of results. */
34
- Object(O._n)("%d result found.","%d results found.",b.length),b.length);t(e)}),[n,t]),0===b.length?Object(u.createElement)(Ml,null):Object(u.createElement)(Al,{title:n?Object(O.__)("Search Results"):Object(O.__)("Reusable blocks")},Object(u.createElement)(xl,{items:b,onSelect:f,onHover:r,label:n?Object(O.__)("Search Results"):Object(O.__)("Reusable blocks")}))}var Xl=Object(h.withSpokenMessages)((function(e){var t=e.rootClientId,n=e.onInsert,r=e.onHover,o=e.filterValue,c=e.debouncedSpeak;return Object(u.createElement)(u.Fragment,null,Object(u.createElement)(Yl,{debouncedSpeak:c,filterValue:o,onHover:r,onInsert:n,rootClientId:t}),Object(u.createElement)("div",{className:"block-editor-inserter__manage-reusable-blocks-container"},Object(u.createElement)("a",{className:"block-editor-inserter__manage-reusable-blocks",href:Object($l.addQueryArgs)("edit.php",{post_type:"wp_block"})},Object(O.__)("Manage all reusable blocks"))))}));function Ql(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 Zl=function(e){var t=e.onSelect,n=e.rootClientId,r=e.clientId,o=e.isAppender,i=e.selectBlockOnInsert,a=e.insertionIndex,l=Object(v.useSelect)((function(e){var t,c=e("core/block-editor"),i=c.getSettings,a=c.getBlockRootClientId,l=c.getBlockSelectionEnd,u=n;if(!u&&!r&&!o){var d=l();d&&(u=a(d))}return function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Ql(Object(n),!0).forEach((function(t){s(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ql(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({hasPatterns:!!(null===(t=i().__experimentalBlockPatterns)||void 0===t?void 0:t.length),destinationRootClientId:u},Object(b.pick)(e("core/block-editor"),["getSelectedBlock","getBlockIndex","getBlockSelectionEnd","getBlockOrder"]))}),[o,r,n]),u=l.destinationRootClientId,d=l.getSelectedBlock,f=l.getBlockIndex,p=l.getBlockSelectionEnd,m=l.getBlockOrder,g=Object(v.useDispatch)("core/block-editor"),h=g.replaceBlocks,j=g.insertBlocks,k=g.showInsertionPoint,y=g.hideInsertionPoint;function _(){if(void 0!==a)return a;if(r)return f(r,u);var e=p();return!o&&e?f(e,u)+1:m(u).length}return[u,function(e,n){var r=d();if(!o&&r&&Object(c.isUnmodifiedDefaultBlock)(r)?h(r.clientId,e,null,null,n):j(e,_(),u,i,n),!i){
35
  // translators: %d: the name of the block that has been added
36
- var a=Object(O._n)("%d block added.","%d blocks added.",e.length);Object(Ue.speak)(a)}t&&t()},function(e){if(e){var t=_();k(u,t)}else y()}]},Jl={name:"blocks",
37
  /* translators: Blocks tab title in the block inserter. */
38
- title:Object(O.__)("Blocks")},es={name:"patterns",
39
  /* translators: Patterns tab title in the block inserter. */
40
- title:Object(O.__)("Patterns")},ts={name:"reusable",
41
  /* translators: Reusable blocks tab title in the block inserter. */
42
- title:Object(O.__)("Reusable")};var ns=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=[Jl];return r&&a.push(es),c&&a.push(ts),Object(u.createElement)(h.TabPanel,{className:"block-editor-inserter__tabs",tabs:a,onSelect:i},t)},rs=function(e){return e.stopPropagation()};var os=function(e){var t=e.rootClientId,n=e.clientId,r=e.isAppender,o=e.__experimentalSelectBlockOnInsert,c=e.__experimentalInsertionIndex,i=e.onSelect,a=e.showInserterHelpPanel,l=e.showMostUsedBlocks,s=Object(u.useState)("blocks"),d=Object(ie.a)(s,2),f=d[0],b=d[1],p=Object(u.useState)(""),m=Object(ie.a)(p,2),g=m[0],j=m[1],k=Object(u.useState)(null),y=Object(ie.a)(k,2),_=y[0],E=y[1],C=Object(u.useState)(null),w=Object(ie.a)(C,2),S=w[0],I=w[1],B=Zl({rootClientId:t,clientId:n,isAppender:r,selectBlockOnInsert:o,insertionIndex:c}),x=Object(ie.a)(B,3),P=x[0],T=x[1],N=x[2],D=Object(v.useSelect)((function(e){var t=e("core/block-editor").getSettings(),n=t.__experimentalBlockPatterns,r=t.__experimentalReusableBlocks;return{hasPatterns:!!(null==n?void 0:n.length),hasReusableBlocks:!!(null==r?void 0:r.length)}}),[]),R=D.hasPatterns,A=D.hasReusableBlocks,M=!P&&R,L=function(e){T(e),i()},F=function(e){N(!!e),E(e)},V=Object(u.createElement)(u.Fragment,null,Object(u.createElement)("div",{className:"block-editor-inserter__block-list"},Object(u.createElement)(Fl,{rootClientId:P,onInsert:L,onHover:F,filterValue:g,showMostUsedBlocks:l})),a&&Object(u.createElement)("div",{className:"block-editor-inserter__tips"},Object(u.createElement)(h.VisuallyHidden,{as:"h2"},Object(O.__)("A tip for using the block editor")),Object(u.createElement)(go,null))),H=Object(u.createElement)(ql,{onInsert:function(e,t){T(e,{patternName:t}),i()},filterValue:g,onClickCategory:function(e){I(e)},selectedCategory:S}),z=Object(u.createElement)(Xl,{rootClientId:P,onInsert:L,onHover:F,filterValue:g});return Object(u.createElement)("div",{className:"block-editor-inserter__menu",onKeyPress:rs,onKeyDown:function(e){[pt.LEFT,pt.DOWN,pt.RIGHT,pt.UP,pt.BACKSPACE,pt.ENTER].includes(e.keyCode)&&e.stopPropagation()}},Object(u.createElement)("div",{className:"block-editor-inserter__main-area"},Object(u.createElement)("div",{className:"block-editor-inserter__content"},Object(u.createElement)(ko,{onChange:function(e){_&&E(null),j(e)},value:g,placeholder:"reusable"===f?Object(O.__)("Search for a reusable block"):"patterns"===f?Object(O.__)("Search for a pattern"):Object(O.__)("Search for a block")}),(M||A)&&Object(u.createElement)(ns,{showPatterns:M,showReusableBlocks:A,onSelect:b},(function(e){return"blocks"===e.name?V:"patterns"===e.name?H:z})),!M&&!A&&V)),a&&_&&Object(u.createElement)(Cl,{item:_}))},cs=function(e){[pt.LEFT,pt.DOWN,pt.RIGHT,pt.UP,pt.BACKSPACE,pt.ENTER].includes(e.keyCode)&&e.stopPropagation()},is=function(e){return e.stopPropagation()};function as(e){var t=e.blockTypes,n=e.blockPatterns,r=e.onSelectBlockType,o=e.onSelectBlockPattern,c=e.onHover,i=Object(u.useMemo)((function(){return Object(b.orderBy)(t,["frecency"],["desc"]).slice(0,6)}),[t]),a=Object(u.useMemo)((function(){return n.slice(0,2)}),[t]);return Object(u.createElement)("div",{className:"block-editor-inserter__quick-inserter-results"},!i.length&&!a.length&&Object(u.createElement)(Ml,null),!!i.length&&Object(u.createElement)(Al,{title:Object(u.createElement)(h.VisuallyHidden,null,Object(O.__)("Blocks"))},Object(u.createElement)(xl,{items:i,onSelect:r,onHover:c,label:Object(O.__)("Blocks")})),!!i.length&&!!a.length&&Object(u.createElement)("div",{className:"block-editor-inserter__quick-inserter-separator"}),!!a.length&&Object(u.createElement)(Al,{title:Object(u.createElement)(h.VisuallyHidden,null,Object(O.__)("Blocks"))},Object(u.createElement)("div",{className:"block-editor-inserter__quick-inserter-patterns"},Object(u.createElement)(Gl,{shownPatterns:a,blockPatterns:a,onClickPattern:o}))))}function ls(e){var t=e.onSelect,n=e.rootClientId,r=e.clientId,o=e.isAppender,c=e.selectBlockOnInsert,i=Object(p.useDebounce)(Ue.speak,500),a=Object(u.useState)(""),l=Object(ie.a)(a,2),s=l[0],d=l[1],b=Zl({onSelect:t,rootClientId:n,clientId:r,isAppender:o,selectBlockOnInsert:c}),m=Object(ie.a)(b,3),g=m[0],j=m[1],k=m[2],y=Jn(g,j),_=Object(ie.a)(y,4),E=_[0],C=_[1],w=_[2],S=_[3],I=Hl(j),B=Object(ie.a)(I,3),x=B[0],P=B[2],T=!g&&x.length&&!!s,N=T&&x.length>6||E.length>6,D=Object(u.useMemo)((function(){return Xn(E,C,w,s)}),[s,E,C,w]),R=Object(u.useMemo)((function(){return Qn(x,s)}),[s,x]),A=Object(v.useSelect)((function(e){return e("core/block-editor").getSettings().__experimentalSetIsInserterOpened}),[]),M=Object(v.useSelect)((function(e){return e("core/block-editor").getPreviousBlockClientId(r)}),[r]);Object(u.useEffect)((function(){A&&A(!1)}),[A]);var L=Object(v.useDispatch)("core/block-editor").selectBlock;Object(u.useEffect)((function(){if(s){var e=D.length+R.length,t=Object(O.sprintf)(
43
  /* translators: %d: number of results. */
44
- Object(O._n)("%d result found.","%d results found.",e),e);i(t)}}),[s,i]);return Object(u.createElement)("div",{className:f()("block-editor-inserter__quick-inserter",{"has-search":N,"has-expand":A}),onKeyPress:is,onKeyDown:cs},N&&Object(u.createElement)(ko,{value:s,onChange:function(e){d(e)},placeholder:Object(O.__)("Search for a block")}),Object(u.createElement)(as,{blockTypes:D,blockPatterns:T?R:[],onSelectBlockPattern:P,onSelectBlockType:S,onHover:k}),A&&Object(u.createElement)(h.Button,{className:"block-editor-inserter__quick-inserter-expand",onClick:function(){L(M),setTimeout((function(){A(!0)}))},"aria-label":Object(O.__)("Browse all. This will open the main inserter panel in the editor toolbar.")},Object(O.__)("Browse all")))}function ss(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=nn(e);if(t){var o=nn(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return tn(this,n)}}var us=function(e){var t,n=e.onToggle,r=e.disabled,o=e.isOpen,c=e.blockTitle,i=e.hasSingleBlockType,a=e.toggleProps,s=void 0===a?{}:a;t=i?Object(O.sprintf)(// translators: %s: the name of the block when there is only one
45
- Object(O._x)("Add %s","directly add the only allowed block"),c):Object(O._x)("Add block","Generic label for block inserter button");var d=s.onClick,f=Object(Ee.a)(s,["onClick"]);return Object(u.createElement)(h.Button,Object(l.a)({icon:mo.a,label:t,tooltipPosition:"bottom",onClick:function(e){n&&n(e),d&&d(e)},className:"block-editor-inserter__toggle","aria-haspopup":!i&&"true","aria-expanded":!i&&o,disabled:r},f))},ds=function(e){Jt(n,e);var t=ss(n);function n(){var e;return $t(this,n),(e=t.apply(this,arguments)).onToggle=e.onToggle.bind(Qt(e)),e.renderToggle=e.renderToggle.bind(Qt(e)),e.renderContent=e.renderContent.bind(Qt(e)),e}return Xt(n,[{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,u=void 0===s?us:s;return u({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(u.createElement)(ls,{onSelect:t,rootClientId:r,clientId:o,isAppender:c,selectBlockOnInsert:a}):Object(u.createElement)(os,{onSelect: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;return n?this.renderToggle({onToggle:r}):Object(u.createElement)(h.Dropdown,{className:"block-editor-inserter",contentClassName:f()("block-editor-inserter__popover",{"is-quick":o}),position:t,onToggle:this.onToggle,expandOnMobile:!0,headerTitle:Object(O.__)("Add a block"),renderToggle:this.renderToggle,renderContent:this.renderContent})}}]),n}(u.Component),fs=Object(p.compose)([Object(v.withSelect)((function(e,t){var n=t.clientId,r=t.rootClientId,o=e("core/block-editor"),c=o.getBlockRootClientId,i=o.hasInserterItems,a=o.__experimentalGetAllowedBlocks,l=e("core/blocks").getBlockVariations,s=a(r=r||c(n)||void 0),u=1===Object(b.size)(s)&&0===Object(b.size)(l(s[0].name,"inserter")),d=!1;return u&&(d=s[0]),{hasItems:i(r),hasSingleBlockType:u,blockTitle:d?d.title:"",allowedBlockType:d,rootClientId:r}})),Object(v.withDispatch)((function(e,t,n){var r=n.select;return{insertOnlyAllowedBlock:function(){var n=t.rootClientId,o=t.clientId,i=t.isAppender,a=t.hasSingleBlockType,l=t.allowedBlockType,s=t.__experimentalSelectBlockOnInsert;if(a&&((0,e("core/block-editor").insertBlock)(Object(c.createBlock)(l.name),function(){var e=r("core/block-editor"),t=e.getBlockIndex,c=e.getBlockSelectionEnd,a=e.getBlockOrder;if(o)return t(o,n);var l=c();return!i&&l?t(l,n)+1:a(n).length}(),n,s),!s)){var u=Object(O.sprintf)(// translators: %s: the name of the block that has been added
46
- Object(O.__)("%s block added"),l.title);Object(Ue.speak)(u)}}}})),Object(p.ifCondition)((function(e){var t=e.hasItems,n=e.isAppender,r=e.rootClientId,o=e.clientId;return t||!n&&!r&&!o}))])(ds),bs=Object(u.forwardRef)((function(e,t){var n=e.selectedClientId,r=e.isReverse,o=e.containerRef,c=e.noCapture,i=e.hasMultiSelection,a=e.multiSelectionContainer,l=Object(v.useSelect)((function(e){return e("core/block-editor").isNavigationMode()})),s=Object(v.useDispatch)("core/block-editor").setNavigationMode;return Object(u.createElement)("div",{ref:t,tabIndex:l?void 0:"0",onFocus:function(){if(c.current)c.current=null;else if(n){var e=Ze(n);if(r){var t=xr.focus.tabbable.find(e);(Object(b.last)(t)||e).focus()}else e.focus()}else{if(i)return void a.current.focus();s(!0);var l=xr.focus.tabbable.find(o.current);l.length&&(r?Object(b.last)(l).focus():Object(b.first)(l).focus())}},style:{position:"fixed"}})}));var ps=Object(b.overEvery)([xr.isTextField,xr.focus.tabbable.isTabbableIndex]);function ms(e,t,n,r){var o,c=xr.focus.focusable.find(n);return t&&(c=Object(b.reverse)(c)),c=c.slice(c.indexOf(e)+1),r&&(o=e.getBoundingClientRect()),Object(b.find)(c,(function t(n,c,i){if(!xr.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(xr.isTextField)(n))return!0;if(!n.classList.contains("block-editor-block-list__block"))return!1;if(function(e){return e.classList.contains("block-editor-block-list__layout")||!!e.querySelector(".block-editor-block-list__layout")}(n))return!0;if(n.contains(e))return!1;for(var l,s=1;(l=i[c+s])&&n.contains(l);s++)if(t(l,c+s,i))return!1;return!0}))}function vs(e){var t=e("core/block-editor"),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,d=t.isNavigationMode,f=t.hasBlockMovingClientId,b=t.getBlockIndex,p=t.getBlockRootClientId,m=t.getClientIdsOfDescendants,v=t.canInsertBlockType,g=t.getBlockName,O=t.isSelectionEnabled,h=t.getBlockSelectionStart,j=t.isMultiSelecting,k=t.getSettings,y=n(),_=r(),E=o();return{selectedBlockClientId:y,selectionStartClientId:_,selectionBeforeEndClientId:c(E||y),selectionAfterEndClientId:i(E||y),selectedFirstClientId:a(),selectedLastClientId:l(),hasMultiSelection:s(),blocks:u(),isNavigationMode:d(),hasBlockMovingClientId:f,getBlockIndex:b,getBlockRootClientId:p,getClientIdsOfDescendants:m,canInsertBlockType:v,getBlockName:g,isSelectionEnabled:O(),blockSelectionStart:h(),isMultiSelecting:j(),keepCaretInsideBlock:k().keepCaretInsideBlock}}function gs(e){var t=e.children,n=Object(u.useRef)(),r=Object(u.useRef)(),o=Object(u.useRef)(),c=Object(u.useRef)(),i=Object(u.useRef)(),a=Object(u.useRef)(),l=Object(u.useRef)(),s=Object(v.useSelect)(vs,[]),d=s.selectedBlockClientId,p=s.selectionStartClientId,m=s.selectionBeforeEndClientId,g=s.selectionAfterEndClientId,h=s.selectedFirstClientId,j=s.selectedLastClientId,k=s.hasMultiSelection,y=s.blocks,_=s.isNavigationMode,E=s.hasBlockMovingClientId,C=s.isSelectionEnabled,w=s.blockSelectionStart,S=s.isMultiSelecting,I=s.getBlockIndex,B=s.getBlockRootClientId,x=s.getClientIdsOfDescendants,P=s.canInsertBlockType,T=s.getBlockName,N=s.keepCaretInsideBlock,D=Object(v.useDispatch)("core/block-editor"),R=D.multiSelect,A=D.selectBlock,M=D.clearSelectedBlock,L=D.setNavigationMode,F=D.setBlockMovingClientId,V=D.moveBlockToPosition,H=Object(u.useState)(!1),z=Object(ie.a)(H,2),U=z[0],G=z[1];Object(u.useEffect)((function(){k&&!S&&c.current.focus()}),[k,S]);var W=f()("block-editor-writing-flow",{"is-navigate-mode":_,"is-block-moving-mode":!!E(),"can-insert-moving-block":U});return Object(u.createElement)("div",{className:W},Object(u.createElement)(bs,{ref:r,selectedClientId:d,containerRef:n,noCapture:a,hasMultiSelection:k,multiSelectionContainer:c}),Object(u.createElement)("div",{ref:n,onKeyDown:function(e){var t=e.keyCode,s=e.target,u=t===pt.UP,f=t===pt.DOWN,v=t===pt.LEFT,O=t===pt.RIGHT,C=t===pt.TAB,w=t===pt.ESCAPE,S=t===pt.ENTER,D=t===pt.SPACE,H=u||v,z=v||O,U=u||f,W=z||U,K=e.shiftKey,q=K||e.ctrlKey||e.altKey||e.metaKey,$=U?xr.isVerticalEdge:xr.isHorizontalEdge;if(_){var Y,X=C&&K||u,Q=C&&!K||f,Z=v,J=O;if(X)Y=m;else if(Q)Y=g;else if(Z){var ee;Y=null!==(ee=B(d))&&void 0!==ee?ee:d}else if(J){var te;Y=null!==(te=x([d])[0])&&void 0!==te?te:d}var ne=E();if(ne&&Y&&G(P(T(ne),B(Y))),w&&ne&&(F(null),G(!1)),(S||D)&&ne){var re=B(ne),oe=B(d),ce=I(ne,re),ie=I(d,oe);ce<ie&&re===oe&&(ie-=1),V(ne,re,oe,ie),A(ne),F(null)}if(Q||X||Z||J)if(Y)e.preventDefault(),A(Y);else if(C&&d){var ae,le=Ze(d);(ae=Q?xr.focus.tabbable.findNext(le):xr.focus.tabbable.findPrevious(le))&&(e.preventDefault(),ae.focus(),M())}}else{if(d)if(C){var se=Ze(d);if(K){if(s===se)return a.current=!0,void r.current.focus()}else{var ue=xr.focus.tabbable.find(se);if(s===(Object(b.last)(ue)||se))return a.current=!0,void o.current.focus()}}else w&&L(!0);else if(k&&C&&s===c.current)return a.current=!0,void(K?r.current.focus():o.current.focus());var de=n.current.ownerDocument.defaultView;if(U?l.current||(l.current=Object(xr.computeCaretRect)(de)):l.current=null,!W)return pt.isKeyboardEvent.primary(e)&&(i.current=Object(xr.isEntirelySelected)(s)),void(pt.isKeyboardEvent.primary(e,"a")&&((s.isContentEditable?i.current:Object(xr.isEntirelySelected)(s))&&(R(Object(b.first)(y),Object(b.last)(y)),e.preventDefault()),i.current=!0));if(!e.nativeEvent.defaultPrevented&&function(e,t,n){if((t===pt.UP||t===pt.DOWN)&&!n)return!0;var r=e.tagName;return"INPUT"!==r&&"TEXTAREA"!==r}(s,t,q)){var fe,be="rtl"===(fe=s).ownerDocument.defaultView.getComputedStyle(fe).direction?!H:H;if(K)(H&&m||!H&&g)&&(k||function(e,t){var r,o,c=ms(e,t,n.current);return!(c&&(r=e,o=c,r.closest(".block-editor-block-list__block")===o.closest(".block-editor-block-list__block")))}(s,H)&&$(s,H))&&(!function(e){var t=e?m:g;t&&R(p||d,t)}(H),e.preventDefault());else if(k)!function(e){var t=e?h:j;t&&A(t)}(H),e.preventDefault();else if(U&&Object(xr.isVerticalEdge)(s,H)&&!N){var pe=ms(s,H,n.current,!0);pe&&(Object(xr.placeCaretAtVerticalEdge)(pe,H,l.current),e.preventDefault())}else if(z&&de.getSelection().isCollapsed&&Object(xr.isHorizontalEdge)(s,be)&&!N){var me=ms(s,be,n.current);Object(xr.placeCaretAtHorizontalEdge)(me,be),e.preventDefault()}}}},onMouseDown:function(e){if(l.current=null,_&&d&&Je(Ze(d),e.target)?(L(!1),F(null)):_&&E()&&et(e.target)&&G(P(T(E()),B(et(e.target)))),C&&0===e.button){var t=et(e.target);t&&(e.shiftKey?w!==t&&(R(w,t),e.preventDefault()):k&&A(t))}}},Object(u.createElement)("div",{ref:c,tabIndex:k?"0":void 0,"aria-label":k?Object(O.__)("Multiple selected blocks"):void 0,style:{position:"fixed"}}),t),Object(u.createElement)(bs,{ref:o,selectedClientId:d,containerRef:n,noCapture:a,hasMultiSelection:k,multiSelectionContainer:c,isReverse:!0}),Object(u.createElement)("div",{"aria-hidden":!0,tabIndex:-1,onClick:function(){var e=xr.focus.focusable.find(n.current),t=Object(b.findLast)(e,ps);t&&Object(xr.placeCaretAtHorizontalEdge)(t,!0)},className:"block-editor-writing-flow__click-redirect"}))}function Os(e){var t=e.clientId,n=e.setIsInserterForced,r=e.containerRef,o=Object(u.useRef)(),c=Object(v.useSelect)((function(e){var n=e("core/block-editor"),r=n.getMultiSelectedBlockClientIds,o=n.getSelectedBlockClientId,c=n.hasMultiSelection;if((0,n.getSettings)().hasReducedUI)return!0;var i=r(),a=o();return c()?i.includes(t):t===a}),[t]);return Object(u.createElement)("div",{ref:o,onFocus:function(){return n(!0)},onBlur:function(){return n(!1)},onClick:function(e){var n=e.clientX,c=e.clientY,i=e.target;if(i===o.current){var a=i.getBoundingClientRect(),l=c<a.top+a.height/2,s=Ze(t),u=ms(s,!0,l?r.current:s)||s,d=new window.DOMRect(n,c,0,16);Object(xr.placeCaretAtVerticalEdge)(u,l,d,!1)}},tabIndex:-1,className:f()("block-editor-block-list__insertion-point-inserter",{"is-inserter-hidden":c})},Object(u.createElement)(fs,{position:"bottom center",clientId:t,__experimentalIsQuick:!0}))}function hs(e){var t=e.clientId,n=e.rootClientId,r=e.isInserterShown,o=e.isInserterForced,c=e.setIsInserterForced,i=e.containerRef,a=e.showInsertionPoint,l=Object(u.useContext)(ol),s=Object(u.useMemo)((function(){return t?Ze(t):l.get(n||"")}),[t,n,l]);return Object(u.createElement)(h.Popover,{noArrow:!0,animate:!1,anchorRef:s,position:"top right left",focusOnMount:!1,className:"block-editor-block-list__insertion-point-popover",__unstableSlotName:"block-toolbar"},Object(u.createElement)("div",{className:"block-editor-block-list__insertion-point",style:{width:null==s?void 0:s.offsetWidth}},a&&Object(u.createElement)("div",{className:"block-editor-block-list__insertion-point-indicator"}),(r||o)&&Object(u.createElement)(Os,{clientId:t,setIsInserterForced:c,containerRef:i})))}function js(e){var t=e.children,n=e.containerRef,r=Object(u.useState)(!1),o=Object(ie.a)(r,2),c=o[0],i=o[1],a=Object(u.useState)(!1),l=Object(ie.a)(a,2),s=l[0],d=l[1],f=Object(u.useState)(null),b=Object(ie.a)(f,2),p=b[0],m=b[1],g=Object(v.useSelect)((function(e){var t=e("core/block-editor"),n=t.isMultiSelecting,r=t.isBlockInsertionPointVisible,o=t.getBlockInsertionPoint,c=t.getBlockOrder,i=o(),a=c(i.rootClientId);return{isMultiSelecting:n(),isInserterVisible:r(),selectedClientId:a[i.index],selectedRootClientId:i.rootClientId}}),[]),O=g.isMultiSelecting,h=g.isInserterVisible,j=g.selectedClientId,k=g.selectedRootClientId;var y=c||s||h;return Object(u.createElement)(u.Fragment,null,!O&&y&&Object(u.createElement)(hs,{clientId:h?j:p,rootClientId:k,isInserterShown:c,isInserterForced:s,setIsInserterForced:d,containerRef:n,showInsertionPoint:h}),Object(u.createElement)("div",{onMouseMove:s||O?void 0:function(e){if(e.target.classList.contains("block-editor-block-list__layout")){var t=e.target.getBoundingClientRect(),n=e.clientY-t.top,r=Array.from(e.target.children).find((function(e){return e.offsetTop>n}));if(r&&(r.id||(r=r.firstElementChild))){var o=r.id.slice("block-".length);if(o){var a=r.getBoundingClientRect();e.clientX>a.right||e.clientX<a.left?c&&i(!1):(i(!0),m(o))}}}else c&&i(!1)}},t))}var ks=function(e){var t=e.clientId,n=e.rootClientId,r=Object(Ee.a)(e,["clientId","rootClientId"]),o=Object(v.useSelect)((function(e){var r,o=e("core/block-editor"),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]),i=o.index,a=o.name,s=o.attributes,d=o.blockMovingMode,b=o.orientation,p=Object(v.useDispatch)("core/block-editor"),m=p.setNavigationMode,g=p.removeBlock,O=Object(u.useRef)();Object(u.useEffect)((function(){O.current.focus(),window.navigator.platform.indexOf("Win")>-1&&Object(Ue.speak)(k)}),[]);var j=Object(c.getBlockType)(a),k=Object(c.__experimentalGetAccessibleBlockLabel)(j,s,i+1,b),y=f()("block-editor-block-list__block-selection-button",{"is-block-moving-mode":!!d});return Object(u.createElement)("div",Object(l.a)({className:y},r),Object(u.createElement)(h.Button,{ref:O,onClick:function(){return m(!1)},onKeyDown:function(e){var n=e.keyCode;n!==pt.BACKSPACE&&n!==pt.DELETE||(g(t),e.preventDefault())},label:k},Object(u.createElement)(ir,{clientId:t})))};function ys(e,t,n){var r=Object(u.useState)(t),o=Object(ie.a)(r,1)[0],c=Object(u.useCallback)((function(){var t,n,r;t=e.current,n=xr.focus.tabbable.find(t),(r=Object(ie.a)(n,1)[0])&&r.focus()}),[]);Object(a.useShortcut)("core/block-editor/focus-toolbar",c,{bindGlobal:!0,eventName:"keydown"}),Object(u.useEffect)((function(){o&&c()}),[n,o,c])}var _s=function(e){var t=e.children,n=e.focusOnMount,r=Object(Ee.a)(e,["children","focusOnMount"]),o=Object(u.useRef)(),c=function(e){var t=Object(u.useState)(!0),n=Object(ie.a)(t,2),r=n[0],o=n[1],c=Object(u.useCallback)((function(){var t=xr.focus.tabbable.find(e.current),n=!t.some((function(e){return!("toolbarItem"in e.dataset)}));n||uo()("Using custom components as toolbar controls",{alternative:"ToolbarItem or ToolbarButton components",link:"https://developer.wordpress.org/block-editor/components/toolbar-button/#inside-blockcontrols"}),o(n)}),[]);return Object(u.useLayoutEffect)((function(){var t=new window.MutationObserver(c);return t.observe(e.current,{childList:!0,subtree:!0}),function(){return t.disconnect()}}),[r]),r}(o);return ys(o,n,c),c?Object(u.createElement)(h.Toolbar,Object(l.a)({label:r["aria-label"],ref:o},r),t):Object(u.createElement)(h.NavigableMenu,Object(l.a)({orientation:"horizontal",role:"toolbar",ref:o},r),t)},Es=Object(u.createElement)(j.SVG,{width:"18",height:"18",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 18 18"},Object(u.createElement)(j.Path,{d:"M5 4h2V2H5v2zm6-2v2h2V2h-2zm-6 8h2V8H5v2zm6 0h2V8h-2v2zm-6 6h2v-2H5v2zm6 0h2v-2h-2v2z"}));function Cs(e){var t=e.clientIds,n=Object(v.useSelect)((function(e){var n;if(1===t.length){var r=(0,e("core/block-editor").getBlockName)(Object(ie.a)(t,1)[0]);return null===(n=Object(c.getBlockType)(r))||void 0===n?void 0:n.icon}}),[t]);return Object(u.createElement)("div",{className:"block-editor-block-draggable-chip-wrapper"},Object(u.createElement)("div",{className:"block-editor-block-draggable-chip"},Object(u.createElement)(h.Flex,{justify:"center",className:"block-editor-block-draggable-chip__content"},Object(u.createElement)(h.FlexItem,null,n?Object(u.createElement)(tr,{icon:n}):Object(O.sprintf)(
47
  /* translators: %d: Number of blocks. */
48
- Object(O._n)("%d block","%d blocks",t.length),t.length)),Object(u.createElement)(h.FlexItem,null,Object(u.createElement)(tr,{icon:Es})))))}var ws=function(e){var t,n,r,o,c=e.children,i=e.clientIds,a=e.cloneClassname,l=e.onDragStart,s=e.onDragEnd,d=e.elementId,f=Object(v.useSelect)((function(e){var t=e("core/block-editor"),n=t.getBlockRootClientId,r=t.getTemplateLock,o=n(i[0]);return{srcRootClientId:o,isDraggable:"all"!==(o?r(o):null)}}),[i]),b=f.srcRootClientId,p=f.isDraggable,m=Object(u.useRef)(!1),g=(t=Object(u.useRef)(null),n=Object(u.useRef)(null),r=Object(u.useRef)(null),o=Object(u.useRef)(null),Object(u.useEffect)((function(){return function(){o.current&&(clearInterval(o.current),o.current=null)}}),[]),[Object(u.useCallback)((function(e){t.current=e.clientY,r.current=Object(xr.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(u.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)}]),O=Object(ie.a)(g,3),j=O[0],k=O[1],y=O[2],_=Object(v.useDispatch)("core/block-editor"),E=_.startDraggingBlocks,C=_.stopDraggingBlocks;if(Object(u.useEffect)((function(){return function(){m.current&&C()}}),[]),!p)return c({isDraggable:!1});var w={type:"block",srcClientIds:i,srcRootClientId:b};return Object(u.createElement)(h.Draggable,{cloneClassname:a,elementId:d||"block-".concat(i[0]),transferData:w,onDragStart:function(e){E(i),m.current=!0,j(e),l&&l()},onDragOver:k,onDragEnd:function(){C(),m.current=!1,y(),s&&s()},__experimentalDragComponent:Object(u.createElement)(Cs,{clientIds:i})},(function(e){var t=e.onDraggableStart,n=e.onDraggableEnd;return c({isDraggable:!0,onDraggableStart:t,onDraggableEnd:n})}))};var Ss=Object(v.withSelect)((function(e,t){var n,r=t.clientIds,o=e("core/block-editor"),i=o.getBlock,a=o.getBlockIndex,l=o.getBlockListSettings,s=o.getTemplateLock,u=o.getBlockOrder,d=o.getBlockRootClientId,f=Object(b.castArray)(r),p=Object(b.first)(f),m=i(p),v=d(Object(b.first)(f)),g=a(p,v),O=0===g,h=a(Object(b.last)(f),v)===u(v).length-1;return{blockType:m?Object(c.getBlockType)(m.name):null,isLocked:"all"===s(v),rootClientId:v,firstIndex:g,isFirst:O,isLast:h,orientation:null===(n=l(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,i=e.rootClientId,a=e.orientation,s=e.hideDragHandle,d=Object(u.useState)(!1),b=Object(ie.a)(d,2),p=b[0],m=b[1],v=function(){return m(!0)},g=function(){return m(!1)};return o||t&&n&&!i?null:Object(u.createElement)("div",{className:f()("block-editor-block-mover",{"is-visible":p||!c,"is-horizontal":"horizontal"===a})},!s&&Object(u.createElement)(ws,{clientIds:r,cloneClassname:"block-editor-block-mover__drag-clone"},(function(e){var t=e.isDraggable,n=e.onDraggableStart,o=e.onDraggableEnd;return Object(u.createElement)(h.Button,{icon:Es,className:"block-editor-block-mover__drag-handle","aria-hidden":"true",label:Object(O._n)("Drag block","Drag blocks",r.length),tabIndex:"-1",onDragStart:n,onDragEnd:o,draggable:t})})),Object(u.createElement)(h.ToolbarGroup,{className:"block-editor-block-mover__move-button-container"},Object(u.createElement)(h.ToolbarItem,{onFocus:v,onBlur:g},(function(e){return Object(u.createElement)(Gr,Object(l.a)({clientIds:r},e))})),Object(u.createElement)(h.ToolbarItem,{onFocus:v,onBlur:g},(function(e){return Object(u.createElement)(Wr,Object(l.a)({clientIds:r},e))}))))}));function Is(){var e=Object(v.useDispatch)("core/block-editor").selectBlock,t=Object(v.useSelect)((function(e){var t=e("core/block-editor"),r=t.getBlockName,o=t.getBlockParents,i=t.getSelectedBlockClientId,a=e("core/blocks").hasBlockSupport,l=o(i()),s=l[l.length-1],u=r(s);return{parentBlockType:Object(c.getBlockType)(u),firstParentClientId:s,shouldHide:!a(n,"__experimentalParentSelector",!0)}}),[]),n=t.parentBlockType,r=t.firstParentClientId;return t.shouldHide?null:void 0!==r?Object(u.createElement)("div",{className:"block-editor-block-parent-selector",key:r},Object(u.createElement)(h.ToolbarButton,{className:"block-editor-block-parent-selector__button",onClick:function(){return e(r)},label:Object(O.sprintf)(
49
  /* translators: %s: Name of the block's parent. */
50
- Object(O.__)("Select parent (%s)"),n.title),showTooltip:!0,icon:Object(u.createElement)(tr,{icon:n.icon})})):null}var Bs=Object(u.createElement)(j.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(u.createElement)(j.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 xs(e,t){var n;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return Ps(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Ps(e,t)}(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 Ps(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 Ts(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 Ns(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Ts(Object(n),!0).forEach((function(t){s(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ts(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Ds(e){var t=e.genericPreviewBlock,n=e.style,r=e.isActive,o=e.onBlur,c=e.onHover,i=e.onSelect,a=e.styleClassName,l=e.itemRole,s=Object(u.useMemo)((function(){return Ns(Ns({},t),{},{attributes:Ns(Ns({},t.attributes),{},{className:a})})}),[t,a]);return Object(u.createElement)("div",{key:n.name,className:f()("block-editor-block-styles__item",{"is-active":r}),onClick:function(){return i()},onKeyDown:function(e){pt.ENTER!==e.keyCode&&pt.SPACE!==e.keyCode||(e.preventDefault(),i())},onMouseEnter:c,onMouseLeave:o,role:l||"button",tabIndex:"0","aria-label":n.label||n.name},Object(u.createElement)("div",{className:"block-editor-block-styles__item-preview"},Object(u.createElement)(yl,{viewportWidth:500,blocks:s})),Object(u.createElement)("div",{className:"block-editor-block-styles__item-label"},n.label||n.name))}var Rs=function(e){var t=e.clientId,n=e.onSwitch,r=void 0===n?b.noop:n,o=e.onHoverClassName,i=void 0===o?b.noop:o,a=e.itemRole,l=Object(v.useSelect)((function(e){var n=e("core/block-editor").getBlock,r=e("core/blocks").getBlockStyles,o=n(t);return{block:o,type:Object(c.getBlockType)(o.name),styles:r(o.name),className:o.attributes.className||""}}),[t]),s=l.styles,d=l.block,f=l.type,p=l.className,m=Object(v.useDispatch)("core/block-editor").updateBlockAttributes,g=function(e,t){return Object(u.useMemo)((function(){return t.example?Object(c.getBlockFromExample)(e.name,{attributes:t.example.attributes,innerBlocks:t.example.innerBlocks}):Object(c.cloneBlock)(e)}),[t.example?e.name:e,t])}(d,f);if(!s||0===s.length)return null;var h=Object(b.find)(s,"isDefault")?s:[{name:"default",label:Object(O._x)("Default","block style"),isDefault:!0}].concat(ce(s)),j=function(e,t){var n,r=xs(new kt.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(b.find)(e,{name:c});if(i)return i}}}catch(e){r.e(e)}finally{r.f()}return Object(b.find)(e,"isDefault")}(h,p);return Object(u.createElement)("div",{className:"block-editor-block-styles"},h.map((function(e){var n=function(e,t,n){var r=new kt.a(e);return t&&r.remove("is-style-"+t.name),r.add("is-style-"+n.name),r.value}(p,j,e);return Object(u.createElement)(Ds,{genericPreviewBlock:g,className:p,isActive:j===e,key:e.name,onSelect:function(){m(t,{className:n}),i(null),r()},onBlur:function(){return i(null)},onHover:function(){return i(n)},style:e,styleClassName:n,itemRole:a})})))},As=function(e){var t=e.className,n=e.possibleBlockTransformations,r=e.onSelect;return Object(u.createElement)(h.MenuGroup,{label:Object(O.__)("Transform to"),className:t},n.map((function(e){var t=e.name,n=e.icon,o=e.title;return Object(u.createElement)(h.MenuItem,{key:t,className:Object(c.getBlockMenuDefaultClassName)(t),onClick:function(e){e.preventDefault(),r(t)}},Object(u.createElement)(tr,{icon:n,showColors:!0}),o)})))};function Ms(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=nn(e);if(t){var o=nn(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return tn(this,n)}}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}function Fs(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){s(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}function Vs(e){var t=e.hoveredBlock,n=e.hoveredClassName,r=Object(c.getBlockType)(t.name);return Object(u.createElement)("div",{className:"block-editor-block-switcher__popover__preview__parent"},Object(u.createElement)("div",{className:"block-editor-block-switcher__popover__preview__container"},Object(u.createElement)(h.Popover,{className:"block-editor-block-switcher__preview__popover",position:"bottom right",focusOnMount:!1},Object(u.createElement)("div",{className:"block-editor-block-switcher__preview"},Object(u.createElement)("div",{className:"block-editor-block-switcher__preview-title"},Object(O.__)("Preview")),Object(u.createElement)(yl,{viewportWidth:500,blocks:r.example?Object(c.getBlockFromExample)(t.name,{attributes:Fs(Fs({},r.example.attributes),{},{className:n}),innerBlocks:r.example.innerBlocks}):Object(c.cloneBlock)(t,{className:n})})))))}var Hs=function(e){Jt(n,e);var t=Ms(n);function n(){var e;return $t(this,n),(e=t.apply(this,arguments)).state={hoveredClassName:null},e.onHoverClassName=e.onHoverClassName.bind(Qt(e)),e}return Xt(n,[{key:"onHoverClassName",value:function(e){this.setState({hoveredClassName:e})}},{key:"render",value:function(){var e=this,t=this.props,n=t.blocks,r=t.onTransform,o=t.inserterItems,i=t.hasBlockStyles,a=this.state.hoveredClassName;if(!Array.isArray(n)||!n.length)return null;var l,s=Object(ie.a)(n,1)[0],d=Object(b.mapKeys)(o,(function(e){return e.name})),f=Object(b.orderBy)(Object(b.filter)(Object(c.getPossibleBlockTransformations)(n),(function(e){return e&&!!d[e.name]})),(function(e){return d[e.name].frecency}),"desc");if(1===Object(b.uniq)(Object(b.map)(n,"name")).length){var p=s.name,m=Object(c.getBlockType)(p);l=m.icon}else l=Bs;var v=!!f.length;if(!i&&!v)return Object(u.createElement)(h.ToolbarGroup,null,Object(u.createElement)(h.ToolbarButton,{disabled:!0,className:"block-editor-block-switcher__no-switcher-icon",title:Object(O.__)("Block icon"),icon:Object(u.createElement)(tr,{icon:l,showColors:!0})}));var g=1===n.length?Object(O.__)("Change block type or style"):Object(O.sprintf)(
51
  /* translators: %s: number of blocks. */
52
- Object(O._n)("Change type of %d block","Change type of %d blocks",n.length),n.length);return Object(u.createElement)(h.ToolbarGroup,null,Object(u.createElement)(h.ToolbarItem,null,(function(t){return Object(u.createElement)(h.DropdownMenu,{className:"block-editor-block-switcher",label:g,popoverProps:{position:"bottom right",isAlternate:!0,className:"block-editor-block-switcher__popover"},icon:Object(u.createElement)(tr,{icon:l,className:"block-editor-block-switcher__toggle",showColors:!0}),toggleProps:t,menuProps:{orientation:"both"}},(function(t){var o=t.onClose;return(i||v)&&Object(u.createElement)("div",{className:"block-editor-block-switcher__container"},v&&Object(u.createElement)(As,{className:"block-editor-block-switcher__transforms__menugroup",possibleBlockTransformations:f,onSelect:function(e){r(n,e),o()}}),i&&Object(u.createElement)(h.MenuGroup,{label:Object(O.__)("Styles"),className:"block-editor-block-switcher__styles__menugroup"},null!==a&&Object(u.createElement)(Vs,{hoveredBlock:s,hoveredClassName:a}),Object(u.createElement)(Rs,{clientId:s.clientId,onSwitch:o,onHoverClassName:e.onHoverClassName,itemRole:"menuitem"})))}))})))}}]),n}(u.Component),zs=Object(p.compose)(Object(v.withSelect)((function(e,t){var n=t.clientIds,r=e("core/block-editor"),o=r.getBlocksByClientId,c=r.getBlockRootClientId,i=r.getInserterItems,a=e("core/blocks").getBlockStyles,l=c(Object(b.castArray)(n)[0]),s=o(n),u=s&&1===s.length?s[0]:null,d=u&&a(u.name);return{blocks:s,inserterItems:i(l),hasBlockStyles:d&&d.length>0}})),Object(v.withDispatch)((function(e,t){return{onTransform:function(n,r){e("core/block-editor").replaceBlocks(t.clientIds,Object(c.switchToBlockType)(n,r))}}})))(Hs),Us=n(41);function Gs(){var e=Object(v.useSelect)((function(e){return e("core/block-editor")}),[]).getBlockName,t=Object(v.useSelect)((function(e){return e("core/blocks")}),[]).getBlockType,n=Object(v.useDispatch)("core/notices").createSuccessNotice;return Object(u.useCallback)((function(r,o){var c="";if(1===o.length){var i=o[0],a=t(e(i)).title;c="copy"===r?Object(O.sprintf)(// Translators: Name of the block being copied, e.g. "Paragraph".
53
- Object(O.__)('Copied "%s" to clipboard.'),a):Object(O.sprintf)(// Translators: Name of the block being cut, e.g. "Paragraph".
54
- Object(O.__)('Moved "%s" to clipboard.'),a)}else c="copy"===r?Object(O.sprintf)(// Translators: %d: Number of blocks being copied.
55
- Object(O._n)("Copied %d block to clipboard.","Copied %d blocks to clipboard.",o.length),o.length):Object(O.sprintf)(// Translators: %d: Number of blocks being cut.
56
- Object(O._n)("Moved %d block to clipboard.","Moved %d blocks to clipboard.",o.length),o.length);n(c,{type:"snackbar"})}),[])}var Ws=function(e){var t=e.children,n=Object(u.useRef)(),r=Object(v.useSelect)((function(e){return e("core/block-editor")}),[]),o=r.getBlocksByClientId,i=r.getSelectedBlockClientIds,a=r.hasMultiSelection,l=r.getSettings,s=Object(v.useDispatch)("core/block-editor"),d=s.flashBlock,f=s.removeBlocks,p=s.replaceBlocks,m=Gs(),g=l().__experimentalCanUserUseUnfilteredHTML,O=function(e){var t=i();if(0!==t.length){if(!a()){var r=e.target.ownerDocument;if("copy"===e.type||"cut"===e.type?Object(xr.documentHasUncollapsedSelection)(r):Object(xr.documentHasSelection)(r))return}if(n.current.contains(e.target)){if(e.preventDefault(),"copy"===e.type||"cut"===e.type){1===t.length&&d(t[0]),m(e.type,t);var l=o(t),s=Object(c.serialize)(l);e.clipboardData.setData("text/plain",s),e.clipboardData.setData("text/html",s)}if("cut"===e.type)f(t);else if("paste"===e.type){var u=function(e){var t=e.clipboardData,n=t.items,r=t.files;n=Object(b.isNil)(n)?[]:n,r=Object(b.isNil)(r)?[]:r;var o="",c="";try{o=t.getData("text/plain"),c=t.getData("text/html")}catch(e){try{c=t.getData("Text")}catch(e){return}}return r=Array.from(r),Array.from(n).forEach((function(e){if(e.getAsFile){var t=e.getAsFile();if(t){var n=t.name,o=t.type,c=t.size;Object(b.find)(r,{name:n,type:o,size:c})||r.push(t)}}})),(r=r.filter((function(e){var t=e.type;return/^image\/(?:jpe?g|png|gif)$/.test(t)}))).length&&!c&&(c=r.map((function(e){return'<img src="'.concat(Object(Us.createBlobURL)(e),'">')})).join(""),o=""),{html:c,plainText:o}}(e),v=u.plainText,O=u.html,h=Object(c.pasteHandler)({HTML:O,plainText:v,mode:"BLOCKS",canUserUseUnfilteredHTML:g});p(t,h,h.length-1,-1)}}}};return Object(u.createElement)("div",{ref:n,onCopy:O,onCut:O,onPaste:O},t)};function Ks(e){var t=e.clientIds,n=e.children,r=e.__experimentalUpdateSelection,o=Object(v.useSelect)((function(e){return e("core/block-editor")}),[]),i=o.canInsertBlockType,a=o.getBlockRootClientId,l=o.getBlocksByClientId,s=o.getTemplateLock,u=Object(v.useSelect)((function(e){return e("core/blocks")}),[]),d=u.getDefaultBlockName,f=u.getGroupingBlockName,p=l(t),m=a(t[0]),g=Object(b.every)(p,(function(e){return!!e&&Object(c.hasBlockSupport)(e.name,"multiple",!0)&&i(e.name,m)})),O=i(d(),m),h=Object(v.useDispatch)("core/block-editor"),j=h.removeBlocks,k=h.replaceBlocks,y=h.duplicateBlocks,_=h.insertAfterBlock,E=h.insertBeforeBlock,C=h.flashBlock,w=h.setBlockMovingClientId,S=h.setNavigationMode,I=h.selectBlock,B=Gs();return n({canDuplicate:g,canInsertDefaultBlock:O,isLocked:!!s(m),rootClientId:m,blocks:p,onDuplicate:function(){return y(t,r)},onRemove:function(){return j(t,r)},onInsertBefore:function(){E(Object(b.first)(Object(b.castArray)(t)))},onInsertAfter:function(){_(Object(b.last)(Object(b.castArray)(t)))},onMoveTo:function(){S(!0),I(t[0]),w(t[0])},onGroup:function(){if(p.length){var e=f(),n=Object(c.switchToBlockType)(p,e);n&&k(t,n)}},onUngroup:function(){if(p.length){var e=p[0].innerBlocks;e.length&&k(t,e)}},onCopy:function(){var e=p.map((function(e){return e.clientId}));1===p.length&&C(e[0]),B("copy",e)}})}var qs=Object(p.compose)([Object(v.withSelect)((function(e,t){var n=t.clientId,r=e("core/block-editor"),o=r.getBlock,i=r.getBlockMode,a=r.getSettings,l=o(n),s=a().codeEditingEnabled;return{mode:i(n),blockType:l?Object(c.getBlockType)(l.name):null,isCodeEditingEnabled:s}})),Object(v.withDispatch)((function(e,t){var n=t.onToggle,r=void 0===n?b.noop:n,o=t.clientId;return{onToggleMode:function(){e("core/block-editor").toggleBlockMode(o),r()}}}))])((function(e){var t=e.blockType,n=e.mode,r=e.onToggleMode,o=e.small,i=void 0!==o&&o,a=e.isCodeEditingEnabled,l=void 0===a||a;if(!Object(c.hasBlockSupport)(t,"html",!0)||!l)return null;var s="visual"===n?Object(O.__)("Edit as HTML"):Object(O.__)("Edit visually");return Object(u.createElement)(h.MenuItem,{onClick:r},!i&&s)}));var $s=Object(p.compose)(Object(v.withSelect)((function(e,t){var n=t.clientId,r=e("core/block-editor").getBlock(n);return{block:r,shouldRender:r&&"core/html"===r.name}})),Object(v.withDispatch)((function(e,t){var n=t.block;return{onClick:function(){return e("core/block-editor").replaceBlocks(n.clientId,Object(c.rawHandler)({HTML:Object(c.getBlockContent)(n)}))}}})))((function(e){var t=e.shouldRender,n=e.onClick,r=e.small;if(!t)return null;var o=Object(O.__)("Convert to Blocks");return Object(u.createElement)(h.MenuItem,{onClick:n},!r&&o)})),Ys=Object(h.createSlotFill)("__experimentalBlockSettingsMenuFirstItem"),Xs=Ys.Fill,Qs=Ys.Slot;Xs.Slot=Qs;var Zs=Xs;function Js(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 eu(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Js(Object(n),!0).forEach((function(t){s(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Js(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var tu=Object(h.createSlotFill)("BlockSettingsMenuControls"),nu=tu.Fill,ru=tu.Slot;nu.Slot=function(e){var t=e.fillProps,n=e.clientIds,r=void 0===n?null:n,o=Object(v.useSelect)((function(e){var t=e("core/block-editor"),n=t.getBlocksByClientId,o=t.getSelectedBlockClientIds,c=null!==r?r:o();return Object(b.map)(Object(b.compact)(n(c)),(function(e){return e.name}))}),[r]);return Object(u.createElement)(ru,{fillProps:eu(eu({},t),{},{selectedBlocks:o})},(function(e){return!Object(b.isEmpty)(e)&&Object(u.createElement)(h.MenuGroup,null,e)}))};var ou=nu,cu={className:"block-editor-block-settings-menu__popover",position:"bottom right",isAlternate:!0};var iu=function(e){var t=e.clientIds,n=e.__experimentalSelectBlock,r=e.children,o=Object(Ee.a)(e,["clientIds","__experimentalSelectBlock","children"]),i=Object(b.castArray)(t),a=i.length,s=i[0],d=Object(v.useSelect)((function(e){var t=e("core/keyboard-shortcuts").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")}}),[]),f=Object(u.useCallback)(n?function(){var e=Sr(Cr.a.mark((function e(t){var r;return Cr.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(t){return e.apply(this,arguments)}}():b.noop,[n]);return Object(u.createElement)(Ks,{clientIds:t,__experimentalUpdateSelection:!n},(function(e){var n=e.canDuplicate,i=e.canInsertDefaultBlock,p=e.isLocked,m=e.onDuplicate,v=e.onInsertAfter,g=e.onInsertBefore,j=e.onRemove,k=e.onCopy,y=e.onMoveTo,_=e.blocks;return Object(u.createElement)(h.DropdownMenu,Object(l.a)({icon:Ir.a,label:Object(O.__)("More options"),className:"block-editor-block-settings-menu",popoverProps:cu,noIcons:!0},o),(function(e){var o=e.onClose;return Object(u.createElement)(u.Fragment,null,Object(u.createElement)(h.MenuGroup,null,Object(u.createElement)(Zs.Slot,{fillProps:{onClose:o}}),1===a&&Object(u.createElement)($s,{clientId:s}),Object(u.createElement)(h.ClipboardButton,{text:function(){return Object(c.serialize)(_)},role:"menuitem",className:"components-menu-item__button",onCopy:k},Object(O.__)("Copy")),n&&Object(u.createElement)(h.MenuItem,{onClick:Object(b.flow)(o,m,f),shortcut:d.duplicate},Object(O.__)("Duplicate")),i&&Object(u.createElement)(u.Fragment,null,Object(u.createElement)(h.MenuItem,{onClick:Object(b.flow)(o,g),shortcut:d.insertBefore},Object(O.__)("Insert Before")),Object(u.createElement)(h.MenuItem,{onClick:Object(b.flow)(o,v),shortcut:d.insertAfter},Object(O.__)("Insert After"))),!p&&Object(u.createElement)(h.MenuItem,{onClick:Object(b.flow)(o,y)},Object(O.__)("Move To")),1===a&&Object(u.createElement)(qs,{clientId:s,onToggle:o})),Object(u.createElement)(ou.Slot,{fillProps:{onClose:o},clientIds:t}),"function"==typeof r?r({onClose:o}):u.Children.map((function(e){return Object(u.cloneElement)(e,{onClose:o})})),Object(u.createElement)(h.MenuGroup,null,!p&&Object(u.createElement)(h.MenuItem,{onClick:Object(b.flow)(o,j,f),shortcut:d.remove},Object(O._n)("Remove block","Remove blocks",a))))}))}))};var au=function(e){var t=e.clientIds,n=Object(Ee.a)(e,["clientIds"]);return Object(u.createElement)(h.ToolbarGroup,null,Object(u.createElement)(h.ToolbarItem,null,(function(e){return Object(u.createElement)(iu,Object(l.a)({clientIds:t,toggleProps:e},n))})))},lu=window,su=lu.clearTimeout,uu=lu.setTimeout;function du(e){var t=e.ref,n=e.isFocused,r=e.debounceTimeout,o=void 0===r?200:r,c=e.onChange,i=void 0===c?b.noop:c,a=Object(u.useState)(!1),l=Object(ie.a)(a,2),s=l[0],d=l[1],f=Object(u.useRef)(),p=function(e){(null==t?void 0:t.current)&&d(e),i(e)},m=function(){var e=(null==t?void 0:t.current)&&t.current.matches(":hover");return!n&&!e},v=function(){var e=f.current;e&&su&&su(e)};return Object(u.useEffect)((function(){return function(){return v()}}),[]),{showMovers:s,debouncedShowMovers:function(e){e&&e.stopPropagation(),v(),s||p(!0)},debouncedHideMovers:function(e){e&&e.stopPropagation(),v(),f.current=uu((function(){m()&&p(!1)}),o)}}}var fu=n(264);function bu(e){var t=e.hideDragHandle,n=e.__experimentalExpandedControl,r=void 0!==n&&n,o=Object(v.useSelect)((function(e){var t=e("core/block-editor"),n=t.getBlockName,r=t.getBlockMode,o=t.getSelectedBlockClientIds,i=t.isBlockValid,a=t.getBlockRootClientId,l=t.getSettings,s=o(),u=s[0],d=a(u),f=l();return{blockClientIds:s,blockClientId:u,blockType:u&&Object(c.getBlockType)(n(u)),hasFixedToolbar:f.hasFixedToolbar,hasReducedUI:f.hasReducedUI,rootClientId:d,isValid:s.every((function(e){return i(e)})),isVisual:s.every((function(e){return"visual"===r(e)}))}}),[]),i=o.blockClientIds,a=o.blockClientId,s=o.blockType,d=o.hasFixedToolbar,m=o.hasReducedUI,O=o.isValid,j=o.isVisual,k=Object(v.useDispatch)("core/block-editor").toggleBlockHighlight,y=Object(u.useRef)(),_=function(e){var t=e.ref,n=e.debounceTimeout,r=void 0===n?200:n,o=e.onChange,c=void 0===o?b.noop:o,i=Object(u.useState)(!1),a=Object(ie.a)(i,2),l=a[0],s=a[1],d=du({ref:t,debounceTimeout:r,isFocused:l,onChange:c}),f=d.showMovers,p=d.debouncedShowMovers,m=d.debouncedHideMovers,v=Object(u.useRef)(!1),g=function(){return(null==t?void 0:t.current)&&t.current.contains(t.current.ownerDocument.activeElement)};return Object(u.useEffect)((function(){var e=t.current,n=function(){g()&&(s(!0),p())},r=function(){g()||(s(!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,s,p,m]),{showMovers:f,gestures:{onMouseMove:p,onMouseLeave:m}}}({ref:y,onChange:function(e){e&&m||k(a,e)}}),E=_.showMovers,C=_.gestures,w=Object(p.useViewportMatch)("medium","<")||d;if(s&&!Object(c.hasBlockSupport)(s,"__experimentalToolbar",!0))return null;var S=w||E;if(0===i.length)return null;var I=O&&j,B=i.length>1,x=f()("block-editor-block-toolbar",S&&"is-showing-movers"),P=r?fu.a:"div";return Object(u.createElement)(P,{className:x},Object(u.createElement)("div",Object(l.a)({ref:y},C),!B&&Object(u.createElement)("div",{className:"block-editor-block-toolbar__block-parent-selector-wrapper"},Object(u.createElement)(Is,{clientIds:i})),(I||B)&&Object(u.createElement)(h.ToolbarGroup,{className:"block-editor-block-toolbar__block-controls"},Object(u.createElement)(zs,{clientIds:i}),Object(u.createElement)(Ss,{clientIds:i,hideDragHandle:t||m}))),I&&Object(u.createElement)(u.Fragment,null,Object(u.createElement)(g.a.Slot,{bubblesVirtually:!0,className:"block-editor-block-toolbar__slot"}),Object(u.createElement)(_r.Slot,{bubblesVirtually:!0,className:"block-editor-block-toolbar__slot"})),Object(u.createElement)(au,{clientIds:i}))}var pu=function(e){var t=e.focusOnMount,n=Object(Ee.a)(e,["focusOnMount"]),r=Object(v.useSelect)((function(e){var t=e("core/block-editor"),n=t.getBlockName,r=t.getSelectedBlockClientIds,o=e("core/blocks").getBlockType,c=r()[0];return{blockType:c&&o(n(c))}}),[]).blockType;return r&&!Object(c.hasBlockSupport)(r,"__experimentalToolbar",!0)?null:Object(u.createElement)("div",{className:"block-editor-block-contextual-toolbar-wrapper"},Object(u.createElement)(_s,Object(l.a)({focusOnMount:t,className:"block-editor-block-contextual-toolbar"
57
- /* translators: accessibility text for the block toolbar */,"aria-label":Object(O.__)("Block tools")},n),Object(u.createElement)(bu,null)))};function mu(e){var t=e("core/block-editor"),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 vu(e){var t=e.clientId,n=e.rootClientId,r=e.isValid,o=e.isEmptyDefaultBlock,c=e.capturingClientId,i=Object(v.useSelect)(mu,[]),l=i.isNavigationMode,s=i.isMultiSelecting,d=i.isTyping,b=i.isCaretWithinFormattedText,m=i.hasMultiSelection,g=i.hasFixedToolbar,O=i.lastClientId,j=Object(p.useViewportMatch)("medium"),k=Object(u.useState)(!1),y=Object(ie.a)(k,2),_=y[0],E=y[1],C=Object(u.useState)(!1),w=Object(ie.a)(C,2),S=w[0],I=w[1],B=Object(u.useContext)(ju),x=!d&&!l&&o&&r,P=l,T=!l&&!g&&j&&!x&&!s&&(!d||b),N=!(l||T||g||o);if(Object(a.useShortcut)("core/block-editor/focus-toolbar",Object(u.useCallback)((function(){return E(!0)}),[]),{bindGlobal:!0,eventName:"keydown",isDisabled:!N}),!(P||T||_||x))return null;var D=B[t];if(c&&(D=document.getElementById("block-"+c)),!D)return null;var R=D;if(m){var A=B[O];if(!A)return null;R={top:D,bottom:A}}var M=x?"top left right":"top right left";return Object(u.createElement)(h.Popover,{noArrow:!0,animate:!1,position:M,focusOnMount:!1,anchorRef:R,className:"block-editor-block-list__block-popover",__unstableSticky:!x,__unstableSlotName:"block-toolbar",__unstableBoundaryParent:!0,__unstableObserveElement:D,onBlur:function(){return E(!1)},shouldAnchorIncludePadding:!0},(T||_)&&Object(u.createElement)("div",{onFocus:function(){I(!0)},onBlur:function(){I(!1)},tabIndex:-1,className:f()("block-editor-block-list__block-popover-inserter",{"is-visible":S})},Object(u.createElement)(fs,{clientId:t,rootClientId:n,__experimentalIsQuick:!0})),(T||_)&&Object(u.createElement)(pu,{focusOnMount:_}),P&&Object(u.createElement)(ks,{clientId:t,rootClientId:n}),x&&Object(u.createElement)("div",{className:"block-editor-block-list__empty-block-inserter"},Object(u.createElement)(fs,{position:"bottom right",rootClientId:n,clientId:t,__experimentalIsQuick:!0})))}function gu(e){var t=e("core/block-editor"),n=t.getSelectedBlockClientId,r=t.getFirstMultiSelectedBlockClientId,o=t.getBlockRootClientId,i=t.__unstableGetBlockWithoutInnerBlocks,a=t.getBlockParents,l=t.__experimentalGetBlockListSettingsForBlocks,s=n()||r();if(s){var u,d=i(s)||{},f=d.name,p=d.attributes,m=void 0===p?{}:p,v=d.isValid,g=a(s),O=l(g),h=Object(b.findIndex)(O,["__experimentalCaptureToolbars",!0]);return-1!==h&&(u=g[h]),{clientId:s,rootClientId:o(s),name:f,isValid:v,isEmptyDefaultBlock:f&&Object(c.isUnmodifiedDefaultBlock)({name:f,attributes:m}),capturingClientId:u}}}function Ou(){var e=Object(v.useSelect)(gu,[]);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(u.createElement)(vu,{clientId:t,rootClientId:n,isValid:o,isEmptyDefaultBlock:c,capturingClientId:i}):null}var hu=Object(u.createContext)(),ju=Object(u.createContext)(),ku=Object(u.createContext)();function yu(e){var t=e("core/block-editor"),n=t.getSelectedBlockClientId,r=t.hasMultiSelection;return{selectedBlockClientId:n(),hasMultiSelection:r()}}function _u(e){et(e.target)&&e.preventDefault()}var Eu=Object(u.forwardRef)((function(e,t){var n=e.children,r=e.className,o=Object(v.useSelect)(yu,[]),c=o.selectedBlockClientId,i=o.hasMultiSelection,a=Object(v.useDispatch)("core/block-editor").selectBlock,l=function(e){var t=Object(v.useSelect)(bo,[]),n=t.isSelectionEnabled,r=t.isMultiSelecting,o=t.multiSelectedBlockClientIds,c=t.hasMultiSelection,i=t.getBlockParents,a=t.selectedBlockClientId,l=Object(v.useDispatch)("core/block-editor"),s=l.startMultiSelect,d=l.stopMultiSelect,f=l.multiSelect,b=l.selectBlock,p=Object(u.useRef)(),m=Object(u.useRef)(),g=Object(u.useRef)();Object(u.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=Ze(l),d=Ze(s),f=n.getSelection(),b=t.createRange();u=fo(u,"start"),d=fo(d,"end"),b.setStartBefore(u),b.setEndAfter(d),f.removeAllRanges(),f.addRange(b)}}else{if(!a||r)return;var p=n.getSelection();if(p.rangeCount&&!p.isCollapsed){var m=Ze(a),v=p.getRangeAt(0),g=v.startContainer,O=v.endContainer;!m||m.contains(g)&&m.contains(O)||p.removeAllRanges()}}}),[c,r,o,b,a]);var O=Object(u.useCallback)((function(t){var n=t.isSelectionEnd,r=e.current.ownerDocument.defaultView.getSelection();if(r.rangeCount&&!r.isCollapsed){var o=et(r.focusNode);if(m.current===o){if(b(o),n&&(po(e.current,!0),r.rangeCount)){var c=r.getRangeAt(0).commonAncestorContainer;g.current.contains(c)&&g.current.focus()}}else{var a=[].concat(ce(i(m.current)),[m.current]),l=[].concat(ce(i(o)),[o]),s=Math.min(a.length,l.length)-1;f(a[s],l[s])}}else po(e.current,!0)}),[b,i,f]),h=Object(u.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(u.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(u.useCallback)((function(t){if(n){var r=e.current.ownerDocument,o=r.defaultView;m.current=t,g.current=r.activeElement,s(),r.addEventListener("selectionchange",O),o.addEventListener("mouseup",h),po(e.current,!1)}}),[n,s,h])}(t),s=Object(u.useState)({}),d=Object(ie.a)(s,2),b=d[0],p=d[1];return Object(u.createElement)(js,{containerRef:t},Object(u.createElement)(ju.Provider,{value:b},Object(u.createElement)(Ou,null),Object(u.createElement)("div",{ref:t,className:f()(r,"is-root-container"),onFocus:function(e){if(!i){var t=et(e.target);t&&t!==c&&a(t)}},onDragStart:_u},Object(u.createElement)(ku.Provider,{value:p},Object(u.createElement)(hu.Provider,{value:l},n)))))})),Cu=["p","div","h1","h2","h3","h4","h5","h6","ol","ul","li","figure","nav","pre","header","section","aside","footer","main"];function wu(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 Su(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?wu(Object(n),!0).forEach((function(t){s(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):wu(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Iu(){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(u.useRef)(),o=e.ref||r,c=Object(u.useContext)(hu),i=Object(u.useContext)(ku),a=Object(u.useContext)(Nu),l=a.clientId,d=a.rootClientId,p=a.isSelected,m=a.isFirstMultiSelected,g=a.isLastMultiSelected,h=a.isPartOfMultiSelection,j=a.enableAnimation,k=a.index,y=a.className,_=a.name,E=a.mode,C=a.blockTitle,w=a.wrapperProps,S=void 0===w?{}:w,I=Object(v.useSelect)((function(e){var t=e("core/block-editor"),n=t.getSelectedBlocksInitialCaretPosition,r=t.isMultiSelecting,o=t.isNavigationMode;return{shouldFocusFirstElement:p&&!r()&&!o(),initialPosition:p?n():void 0,isNavigationMode:o}}),[p]),B=I.initialPosition,x=I.shouldFocusFirstElement,P=I.isNavigationMode,T=Object(v.useDispatch)("core/block-editor"),N=T.insertDefaultBlock,D=T.removeBlock,R=Object(u.useState)(!1),A=Object(ie.a)(R,2),M=A[0],L=A[1];Object(u.useEffect)((function(){if(p||m||g){var e=o.current;return i((function(t){return Su(Su({},t),{},s({},l,e))})),function(){i((function(e){return Object(b.omit)(e,l)}))}}}),[p,m,g]),Object(u.useEffect)((function(){var e=o.current;i((function(t){return t[l]&&t[l]!==e?Su(Su({},t),{},s({},l,e)):t}))}));// translators: %s: Type of block (i.e. Text, Image etc)
58
- var F=Object(O.sprintf)(Object(O.__)("Block: %s"),C),V=function(){var e=o.current.ownerDocument;if(!e.activeElement||!Je(o.current,e.activeElement)){var t=xr.focus.tabbable.find(o.current).filter((function(e){return Object(xr.isTextField)(e)&&Je(o.current,e)&&!e.closest(".block-list-appender")})),n=-1===B,r=(n?b.last:b.first)(t)||o.current;Object(xr.placeCaretAtHorizontalEdge)(r,n)}};Object(u.useEffect)((function(){x&&V()}),[x]),Nr(o,p||h,p||m,j,k),Object(u.useEffect)((function(){if(p)return o.current.addEventListener("keydown",e),o.current.addEventListener("mouseleave",t),function(){o.current.removeEventListener("mouseleave",t),o.current.removeEventListener("keydown",e)};function e(e){var t=e.keyCode,n=e.target;t!==pt.ENTER&&t!==pt.BACKSPACE&&t!==pt.DELETE||n!==o.current||Object(xr.isTextField)(n)||(e.preventDefault(),t===pt.ENTER?N({},d,k+1):D(l))}function t(e){1===e.buttons&&c(l)}}),[p,c,N,D]),Object(u.useEffect)((function(){if(P)return o.current.addEventListener("mouseover",e),o.current.addEventListener("mouseout",t),function(){o.current.removeEventListener("mouseover",e),o.current.removeEventListener("mouseout",t)};function e(e){e.defaultPrevented||(e.preventDefault(),M||L(!0))}function t(e){e.defaultPrevented||(e.preventDefault(),M&&L(!1))}}),[P,M,L]);var H="html"!==E||n?"":"-visual";return Su(Su(Su({},S),e),{},{ref:o,id:"block-".concat(l).concat(H),tabIndex:0,role:"group","aria-label":F,"data-block":l,"data-type":_,"data-title":C,className:f()(y,e.className,S.className,{"is-hovered":M}),style:Su(Su({},S.style),e.style)})}Iu.save=c.__unstableGetBlockProps;var Bu=Object(u.forwardRef)((function(e,t){var n=e.children,r=e.tagName,o=void 0===r?"div":r,c=Object(Ee.a)(e,["children","tagName"]);uo()("wp.blockEditor.__experimentalBlock",{alternative:"wp.blockEditor.useBlockProps"});var i=Iu(Su(Su({},c),{},{ref:t}));return Object(u.createElement)(o,i,n)})),xu=Cu.reduce((function(e,t){return e[t]=Object(u.forwardRef)((function(e,n){return Object(u.createElement)(Bu,Object(l.a)({},e,{ref:n,tagName:t}))})),e}),Bu);function Pu(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 Tu(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Pu(Object(n),!0).forEach((function(t){s(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Pu(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Nu=Object(u.createContext)();function Du(e){var t=e.children,n=e.isHtml,r=Object(Ee.a)(e,["children","isHtml"]);return Object(u.createElement)("div",Iu(r,{__unstableIsHtml:n}),t)}var Ru=Object(v.withSelect)((function(e,t){var n=t.clientId,r=t.rootClientId,o=e("core/block-editor"),c=o.isBlockSelected,i=o.isAncestorMultiSelected,a=o.isBlockMultiSelected,l=o.isFirstMultiSelectedBlock,s=o.getLastMultiSelectedBlockClientId,u=o.isTyping,d=o.getBlockMode,f=o.isSelectionEnabled,b=o.hasSelectedInnerBlock,p=o.getTemplateLock,m=o.__unstableGetBlockWithoutInnerBlocks,v=o.getMultiSelectedBlockClientIds,g=m(n),O=c(n),h=p(r),j=b(n,!0),k=g||{},y=k.name,_=k.attributes,E=k.isValid,C=l(n);return{isMultiSelected:a(n),isPartOfMultiSelection:a(n)||i(n),isFirstMultiSelected:C,isLastMultiSelected:s()===n,multiSelectedClientIds:C?v():void 0,isTypingWithinBlock:(O||j)&&u(),mode:d(n),isSelectionEnabled:f(),isLocked:!!h,block:g,name:y,attributes:_,isValid:E,isSelected:O,isAncestorOfSelectedBlock:j}})),Au=Object(v.withDispatch)((function(e,t,n){var r=n.select,o=e("core/block-editor"),i=o.updateBlockAttributes,a=o.insertBlocks,l=o.mergeBlocks,s=o.replaceBlocks,u=o.toggleSelection,d=o.__unstableMarkLastChangeAsPersistent;return{setAttributes:function(e){var n=t.clientId,r=t.isFirstMultiSelected,o=t.multiSelectedClientIds;i(r?o:[n],e)},onInsertBlocks:function(e,n){var r=t.rootClientId;a(e,n,r)},onInsertBlocksAfter:function(e){var n=t.clientId,o=t.rootClientId,c=(0,r("core/block-editor").getBlockIndex)(n,o);a(e,c+1,o)},onMerge:function(e){var n=t.clientId,o=r("core/block-editor"),c=o.getPreviousBlockClientId,i=o.getNextBlockClientId;if(e){var a=i(n);a&&l(n,a)}else{var s=c(n);s&&l(s,n)}},onReplace:function(e,n,r){e.length&&!Object(c.isUnmodifiedDefaultBlock)(e[e.length-1])&&d(),s([t.clientId],e,n,r)},toggleSelection:function(e){u(e)}}})),Mu=Object(p.compose)(p.pure,Ru,Au,Object(p.ifCondition)((function(e){return!!e.block})),Object(h.withFilters)("editor.BlockListBlock"))((function(e){var t,n,r,o=e.mode,i=e.isLocked,a=e.clientId,s=e.rootClientId,d=e.isSelected,m=e.isMultiSelected,g=e.isPartOfMultiSelection,O=e.isFirstMultiSelected,h=e.isLastMultiSelected,j=e.isTypingWithinBlock,k=e.isAncestorOfSelectedBlock,y=e.isSelectionEnabled,_=e.className,E=e.name,C=e.isValid,w=e.attributes,S=e.wrapperProps,I=e.setAttributes,B=e.onReplace,x=e.onInsertBlocksAfter,P=e.onMerge,T=e.toggleSelection,N=e.index,D=e.enableAnimation,R=e.activeEntityBlockId,A=Object(p.useViewportMatch)("medium"),M=Object(v.useSelect)((function(e){var t=e("core/block-editor"),n=t.isBlockBeingDragged,r=t.isBlockHighlighted,o=t.getSettings;return{isDragging:n(a),isHighlighted:r(a),isFocusMode:o().focusMode}}),[a]),L=M.isDragging,F=M.isHighlighted,V=M.isFocusMode,H=Object(v.useDispatch)("core/block-editor").removeBlock,z=Object(u.useCallback)((function(){return H(a)}),[a]),U=Object(u.useState)(!1),G=Object(ie.a)(U,2),W=G[0],K=G[1],q=Object(c.getBlockType)(E),$=q.apiVersion>1||Object(c.hasBlockSupport)(q,"lightBlockWrapper",!1),Y=E===Object(c.getUnregisteredTypeHandlerName)();q.getEditWrapperProps&&(t=S,n=q.getEditWrapperProps(w),r=Tu(Tu({},t),n),t&&n&&t.className&&n.className&&(r.className=f()(t.className,n.className)),t&&n&&t.style&&n.style&&(r.style=Tu(Tu({},t.style),n.style)),S=r);var X=$&&Object(c.hasBlockSupport)(q,"className",!0)?Object(c.getBlockDefaultClassName)(E):null,Q=$?w.className:null,Z=S&&!!S["data-align"],J=f()(X,Q,"block-editor-block-list__block",{"wp-block":!Z,"has-warning":!C||!!W||Y,"is-selected":d&&!L,"is-highlighted":F,"is-multi-selected":m,"is-reusable":Object(c.isReusableBlock)(q),"is-dragging":L,"is-typing":j,"is-focused":V&&A&&(d||k),"is-focus-mode":V&&A,"has-child-selected":k&&!L,"is-active-entity":R===a},_),ee=Object(u.createElement)(Or,{name:E,isSelected:d,attributes:w,setAttributes:I,insertBlocksAfter:i?void 0:x,onReplace:i?void 0:B,onRemove:i?void 0:z,mergeBlocks:i?void 0:P,clientId:a,isSelectionEnabled:y,toggleSelection:T});if(Z){var te={"data-align":S["data-align"]};ee=Object(u.createElement)("div",Object(l.a)({className:"wp-block"},te),ee)}var ne,re={clientId:a,rootClientId:s,isSelected:d,isFirstMultiSelected:O,isLastMultiSelected:h,isPartOfMultiSelection:g,enableAnimation:D,index:N,className:J,isLocked:i,name:E,mode:o,blockTitle:q.title,wrapperProps:Object(b.omit)(S,["data-align"])},oe=Object(u.useMemo)((function(){return re}),Object.values(re));return ne=C?"html"===o?Object(u.createElement)(u.Fragment,null,Object(u.createElement)("div",{style:{display:"none"}},ee),Object(u.createElement)(Du,{isHtml:!0},Object(u.createElement)(lo,{clientId:a}))):$?ee:Object(u.createElement)(Du,S,ee):Object(u.createElement)(Du,null,Object(u.createElement)(to,{clientId:a}),Object(u.createElement)("div",null,Object(c.getSaveElement)(q,w))),Object(u.createElement)(Nu.Provider,{value:oe},Object(u.createElement)(co,{onError:function(){return K(!0)}},ne),!!W&&Object(u.createElement)(Du,null,Object(u.createElement)(ro,null)))})),Lu=function(e,t,n){return Object(O.sprintf)(
59
  /* translators: 1: The numerical position of the block. 2: The total number of blocks. 3. The level of nesting for the block. */
60
- Object(O.__)("Block %1$d of %2$d, Level %3$d"),e,t,n)};var Fu=Object(u.forwardRef)((function e(t,n){var r=t.className,o=t.block,i=t.isSelected,a=t.onClick,l=t.position,s=t.siblingBlockCount,d=t.level,b=t.tabIndex,m=t.onFocus,v=t.onDragStart,g=t.onDragEnd,j=t.draggable,k=o.name,y=o.attributes,_=Object(c.getBlockType)(k),E=Object(c.__experimentalGetBlockLabel)(_,y),C=Object(p.useInstanceId)(e),w="block-navigation-block-select-button__".concat(C),S=Lu(l,s,d);return Object(u.createElement)(u.Fragment,null,Object(u.createElement)(h.Button,{className:f()("block-editor-block-navigation-block-select-button",r),onClick:a,"aria-describedby":w,ref:n,tabIndex:b,onFocus:m,onDragStart:v,onDragEnd:g,draggable:j},Object(u.createElement)(tr,{icon:_.icon,showColors:!0}),E,i&&Object(u.createElement)(h.VisuallyHidden,null,Object(O.__)("(selected block)"))),Object(u.createElement)("div",{className:"block-editor-block-navigation-block-select-button__description",id:w},S))}));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 Hu(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){s(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}var zu=function(e){return"BlockNavigationBlock-".concat(e)};var Uu=Object(u.forwardRef)((function e(t,n){var r=Object(p.useInstanceId)(e),o=t.block.clientId;return Object(u.createElement)(h.Slot,{name:zu(o)},(function(e){if(!e.length)return Object(u.createElement)(Fu,Object(l.a)({ref:n},t));var o=t.className,i=t.block,a=t.isSelected,s=t.position,d=t.siblingBlockCount,b=t.level,p=t.tabIndex,m=t.onFocus,v=i.name,g=Object(c.getBlockType)(v),j="block-navigation-block-slot__".concat(r),k=Lu(s,d,b),y={tabIndex:p,onFocus:m,ref:n,"aria-describedby":j};return Object(u.createElement)(u.Fragment,null,Object(u.createElement)("div",{className:f()("block-editor-block-navigation-block-slot",o)},Object(u.createElement)(tr,{icon:g.icon,showColors:!0}),u.Children.map(e,(function(e){return Object(u.cloneElement)(e,Hu(Hu({},e.props),y))})),a&&Object(u.createElement)(h.VisuallyHidden,null,Object(O.__)("(selected block)")),Object(u.createElement)("div",{className:"block-editor-block-navigation-block-slot__description",id:j},k)))}))})),Gu=function(e){var t=Object(u.useContext)(Nu).clientId;return Object(u.createElement)(h.Fill,Object(l.a)({},e,{name:zu(t)}))},Wu=Object(u.forwardRef)((function(e,t){var n=e.onClick,r=e.block,o=e.isSelected,c=e.position,i=e.siblingBlockCount,a=e.level,s=Object(Ee.a)(e,["onClick","block","isSelected","position","siblingBlockCount","level"]),d=$r(),b=d.__experimentalFeatures,p=d.blockDropTarget,m=void 0===p?{}:p,g=r.clientId,O=Object(v.useSelect)((function(e){var t=e("core/block-editor"),n=t.getBlockRootClientId,r=t.hasBlockMovingClientId,o=t.getSelectedBlockClientId;return{rootClientId:n(g)||"",blockMovingClientId:r(),selectedBlockInBlockEditor:o()}}),[g]),h=O.rootClientId,j=O.blockMovingClientId,k=O.selectedBlockInBlockEditor,y=j&&k===g,_=m.rootClientId,E=m.clientId,C=m.dropPosition,w=_===h&&E===g&&"top"===C,S=_===h&&E===g&&"bottom"===C,I=_===g&&"inside"===C,B=f()("block-editor-block-navigation-block-contents",{"is-dropping-before":w||y,"is-dropping-after":S,"is-dropping-to-inner-blocks":I});return Object(u.createElement)(ws,{clientIds:[r.clientId],elementId:"block-navigation-block-".concat(r.clientId)},(function(e){var d=e.isDraggable,f=e.onDraggableStart,p=e.onDraggableEnd;return b?Object(u.createElement)(Uu,Object(l.a)({ref:t,className:B,block:r,onClick:n,isSelected:o,position:c,siblingBlockCount:i,level:a,draggable:d&&b,onDragStart:f,onDragEnd:p},s)):Object(u.createElement)(Fu,Object(l.a)({ref:t,className:B,block:r,onClick:n,isSelected:o,position:c,siblingBlockCount:i,level:a,draggable:d&&b,onDragStart:f,onDragEnd:p},s))}))}));function Ku(e){var t=e.block,n=e.isSelected,r=e.onClick,o=e.position,c=e.level,i=e.rowCount,a=e.siblingBlockCount,l=e.showBlockMovers,s=e.terminatedLevels,d=e.path,b=Object(u.useRef)(null),p=Object(u.useState)(!1),m=Object(ie.a)(p,2),g=m[0],j=m[1],k=Object(u.useState)(!1),y=Object(ie.a)(k,2),_=y[0],E=y[1],C=t.clientId,w=Object(v.useSelect)((function(e){var t=e("core/block-editor"),n=t.isBlockBeingDragged,r=t.isAncestorBeingDragged;return n(C)||r(C)}),[C]),S=Object(v.useDispatch)("core/block-editor").selectBlock,I=l&&a>0,B=g||_,x=f()("block-editor-block-navigation-block__mover-cell",{"is-visible":B}),P=$r().__experimentalFeatures,T=f()("block-editor-block-navigation-block__menu-cell",{"is-visible":B});return Object(u.useEffect)((function(){P&&n&&b.current.focus()}),[P,n]),Object(u.createElement)(Rr,{className:f()({"is-selected":n,"is-dragging":w}),onMouseEnter:function(){return j(!0)},onMouseLeave:function(){return j(!1)},onFocus:function(){return E(!0)},onBlur:function(){return E(!1)},level:c,position:o,rowCount:i,path:d,id:"block-navigation-block-".concat(C),"data-block":C},Object(u.createElement)(h.__experimentalTreeGridCell,{className:"block-editor-block-navigation-block__contents-cell",colSpan:I?void 0:2,ref:b},(function(e){var l=e.ref,d=e.tabIndex,f=e.onFocus;return Object(u.createElement)("div",{className:"block-editor-block-navigation-block__contents-container"},Object(u.createElement)(Kr,{level:c,isLastRow:o===i,terminatedLevels:s}),Object(u.createElement)(Wu,{block:t,onClick:function(){return r(t.clientId)},isSelected:n,position:o,siblingBlockCount:a,level:c,ref:l,tabIndex:d,onFocus:f}))})),I&&Object(u.createElement)(u.Fragment,null,Object(u.createElement)(h.__experimentalTreeGridCell,{className:x,withoutGridItem:!0},Object(u.createElement)(h.__experimentalTreeGridItem,null,(function(e){var t=e.ref,n=e.tabIndex,r=e.onFocus;return Object(u.createElement)(Gr,{orientation:"vertical",clientIds:[C],ref:t,tabIndex:n,onFocus:r})})),Object(u.createElement)(h.__experimentalTreeGridItem,null,(function(e){var t=e.ref,n=e.tabIndex,r=e.onFocus;return Object(u.createElement)(Wr,{orientation:"vertical",clientIds:[C],ref:t,tabIndex:n,onFocus:r})})))),P&&Object(u.createElement)(h.__experimentalTreeGridCell,{className:T},(function(e){var t=e.ref,n=e.tabIndex,o=e.onFocus;return Object(u.createElement)(iu,{clientIds:[C],icon:Ir.a,toggleProps:{ref:t,tabIndex:n,onFocus:o},disableOpenOnArrowDown:!0,__experimentalSelectBlock:r},(function(e){var t=e.onClose;return Object(u.createElement)(h.MenuGroup,null,Object(u.createElement)(h.MenuItem,{onClick:Sr(Cr.a.mark((function e(){return Cr.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,S(null);case 2:return e.next=4,S(C);case 4:t();case 5:case"end":return e.stop()}}),e)})))},Object(O.__)("Go to block")))}))})))}function qu(e){var t=e.parentBlockClientId,n=e.position,r=e.level,o=e.rowCount,c=e.terminatedLevels,i=e.path,a=Object(v.useSelect)((function(e){var n=e("core/block-editor"),r=n.isBlockBeingDragged,o=n.isAncestorBeingDragged;return r(t)||o(t)}),[t]),l=Object(p.useInstanceId)(qu),s="block-navigation-appender-row__description_".concat(l),d=Object(O.sprintf)(
61
  /* translators: 1: The numerical position of the block that will be inserted. 2: The level of nesting for the block that will be inserted. */
62
- Object(O.__)("Add block at position %1$d, Level %2$d"),n,r);return Object(u.createElement)(Rr,{className:f()({"is-dragging":a}),level:r,position:n,rowCount:o,path:i},Object(u.createElement)(h.__experimentalTreeGridCell,{className:"block-editor-block-navigation-appender__cell",colSpan:"3"},(function(e){var i=e.ref,a=e.tabIndex,l=e.onFocus;return Object(u.createElement)("div",{className:"block-editor-block-navigation-appender__container"},Object(u.createElement)(Kr,{level:r,isLastRow:n===o,terminatedLevels:c}),Object(u.createElement)(fs,{rootClientId:t,__experimentalIsQuick:!0,__experimentalSelectBlockOnInsert:!1,"aria-describedby":s,toggleProps:{ref:i,tabIndex:a,onFocus:l}}),Object(u.createElement)("div",{className:"block-editor-block-navigation-appender__description",id:s},d))})))}function $u(e){var t=e.blocks,n=e.selectBlock,r=e.selectedBlockClientId,o=e.showAppender,c=e.showBlockMovers,i=e.showNestedBlocks,a=e.parentBlockClientId,l=e.level,s=void 0===l?1:l,d=e.terminatedLevels,f=void 0===d?[]:d,p=e.path,m=void 0===p?[]:p,v=!a,g=Object(b.compact)(t),O=function(e){return o&&!v&&r===e},h=O(a),j=g.length,k=h?j+1:j,y=k;return Object(u.createElement)(u.Fragment,null,Object(b.map)(g,(function(e,t){var a=e.clientId,l=e.innerBlocks,d=t+1,b=k===d?[].concat(ce(f),[s]):f,p=[].concat(ce(m),[d]),v=i&&!!l&&!!l.length,g=O(a);return Object(u.createElement)(u.Fragment,{key:a},Object(u.createElement)(Ku,{block:e,onClick:n,isSelected:r===a,level:s,position:d,rowCount:k,siblingBlockCount:j,showBlockMovers:c,terminatedLevels:f,path:p}),(v||g)&&Object(u.createElement)($u,{blocks:l,selectedBlockClientId:r,selectBlock:n,showAppender:o,showBlockMovers:c,showNestedBlocks:i,parentBlockClientId:a,level:s+1,terminatedLevels:b,path:p}))})),h&&Object(u.createElement)(qu,{parentBlockClientId:a,position:k,rowCount:y,level:s,terminatedLevels:f,path:[].concat(ce(m),[y])}))}function Yu(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,t){var n;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return Qu(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Qu(e,t)}(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 Qu(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 Zu(e,t){return t.left<=e.x&&t.right>=e.x&&t.top<=e.y&&t.bottom>=e.y}$u.defaultProps={selectBlock:function(){}};var Ju=["top","bottom"];function ed(e){var t=Object(u.useState)(),n=Object(ie.a)(t,2),r=n[0],o=void 0===r?{}:r,c=n[1],i=ul(o.rootClientId,o.blockIndex),a=Object(h.__unstableUseDropZone)(function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Yu(Object(n),!0).forEach((function(t){s(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Yu(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({element:e,withPosition:!0},i)),l=a.position,d=a.type,f=function(e,t,n){var r=Object(v.useSelect)((function(e){var t=e("core/block-editor");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,l=r.canInsertBlocks,s=Object(u.useRef)(),d=!!t;return Object(u.useEffect)((function(){if(e.current&&d){var t="default"===n,r=t?a():void 0,u=Array.from(e.current.querySelectorAll("[data-block]"));s.current=u.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||l(r,a),canInsertDraggedBlocksAsChild:!t||l(r,n)}}))}}),[e,d,n,l,i,c,o,a]),s}(e,l,d);if(Object(u.useEffect)((function(){if(l){var e=function(e,t){var n,r,o,c,i,a=Xu(e);try{for(a.s();!(i=a.n()).done;){var l=i.value;if(!l.isDraggedBlock){var s=l.element.getBoundingClientRect(),u=fl(t,s,Ju),d=Object(ie.a)(u,2),f=d[0],b=d[1],p=Zu(t,s);if(void 0===o||f<o||p){o=f;var m=e.indexOf(l),v=e[m-1];if("top"===b&&v&&v.rootClientId===l.rootClientId&&!v.isDraggedBlock?(r=v,n="bottom",c=v.element.getBoundingClientRect()):(r=l,n=b,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}}}}(f.current,l);e&&c(e)}}),[f,l]),l)return o}function td(e){var t=e.__experimentalFeatures,n=Object(Ee.a)(e,["__experimentalFeatures"]),r=Object(u.useRef)(),o=ed(r);t||(o=void 0);var c=Object(u.useMemo)((function(){return{__experimentalFeatures:t,blockDropTarget:o}}),[t,o]);return Object(u.createElement)(h.__experimentalTreeGrid,{className:"block-editor-block-navigation-tree","aria-label":Object(O.__)("Block navigation structure"),ref:r},Object(u.createElement)(qr.Provider,{value:c},Object(u.createElement)($u,n)))}var nd=Object(p.compose)(Object(v.withSelect)((function(e){var t=e("core/block-editor"),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(v.withDispatch)((function(e,t){var n=t.onSelect,r=void 0===n?b.noop:n;return{selectBlock:function(t){e("core/block-editor").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(u.createElement)("div",{className:"block-editor-block-navigation__container"},Object(u.createElement)("p",{className:"block-editor-block-navigation__label"},Object(O.__)("List view")),i&&Object(u.createElement)(td,{blocks:[t],selectedBlockClientId:r,selectBlock:o,__experimentalFeatures:c,showNestedBlocks:!0}),!i&&Object(u.createElement)(td,{blocks:n,selectedBlockClientId:r,selectBlock:o,__experimentalFeatures:c}))})),rd=Object(u.createElement)(h.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:"24",height:"24"},Object(u.createElement)(h.Path,{d:"M13.8 5.2H3v1.5h10.8V5.2zm-3.6 12v1.5H21v-1.5H10.2zm7.2-6H6.6v1.5h10.8v-1.5z"}));function od(e){var t=e.isEnabled,n=e.onToggle,r=e.isOpen,o=e.innerRef,c=Object(Ee.a)(e,["isEnabled","onToggle","isOpen","innerRef"]);Object(a.useShortcut)("core/edit-post/toggle-block-navigation",Object(u.useCallback)(n,[n]),{bindGlobal:!0,isDisabled:!t});var i=Object(v.useSelect)((function(e){return e("core/keyboard-shortcuts").getShortcutRepresentation("core/edit-post/toggle-block-navigation")}),[]);return Object(u.createElement)(h.Button,Object(l.a)({},c,{ref:o,icon:rd,"aria-expanded":r,"aria-haspopup":"true",onClick:t?n:void 0
63
- /* translators: button label text should, if possible, be under 16 characters. */,label:Object(O.__)("Outline"),className:"block-editor-block-navigation",shortcut:i,"aria-disabled":!t}))}var cd=Object(u.forwardRef)((function(e,t){var n=e.isDisabled,r=e.__experimentalFeatures,o=Object(Ee.a)(e,["isDisabled","__experimentalFeatures"]),c=Object(v.useSelect)((function(e){return!!e("core/block-editor").getBlockCount()}),[])&&!n;return Object(u.createElement)(h.Dropdown,{contentClassName:"block-editor-block-navigation__popover",position:"bottom right",renderToggle:function(e){var n=e.isOpen,r=e.onToggle;return Object(u.createElement)(od,Object(l.a)({},o,{innerRef:t,isOpen:n,onToggle:r,isEnabled:c}))},renderContent:function(e){var t=e.onClose;return Object(u.createElement)(nd,{onSelect:t,__experimentalFeatures:r})}})})),id=n(126),ad=[pt.rawShortcut.primary("z"),pt.rawShortcut.primaryShift("z"),pt.rawShortcut.primary("y")],ld=Object(u.createElement)(h.KeyboardShortcuts,{bindGlobal:!0,shortcuts:Object(b.fromPairs)(ad.map((function(e){return[e,function(e){return e.preventDefault()}]})))}),sd=function(){return ld};function ud(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(Us.createBlobURL)(e),'">')})).join("")}var dd={position:"bottom right",isAlternate:!0},fd=function(){return Object(u.createElement)("div",{className:"block-editor-format-toolbar"},Object(u.createElement)(h.ToolbarGroup,null,["bold","italic","link","text-color"].map((function(e){return Object(u.createElement)(h.Slot,{name:"RichText.ToolbarControls.".concat(e),key:e})})),Object(u.createElement)(h.Slot,{name:"RichText.ToolbarControls"},(function(e){return 0!==e.length&&Object(u.createElement)(h.ToolbarItem,null,(function(t){return Object(u.createElement)(h.DropdownMenu,{icon:Fr.a,label:Object(O.__)("More rich text controls"),toggleProps:t,controls:Object(b.orderBy)(e.map((function(e){return Object(ie.a)(e,1)[0].props})),"title"),popoverProps:dd})}))}))))},bd=function(e){var t=e.inline,n=e.anchorRef;return t?Object(u.createElement)(h.Popover,{noArrow:!0,position:"top center",focusOnMount:!1,anchorRef:n,className:"block-editor-rich-text__inline-format-toolbar"},Object(u.createElement)(fd,null)):Object(u.createElement)(_r,null,Object(u.createElement)(fd,null))};function pd(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){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?pd(Object(n),!0).forEach((function(t){s(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):pd(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function vd(e){if(!0===e||"p"===e||"li"===e)return!0===e?"p":e}function gd(e){var t=e.allowedFormats,n=e.formattingControls;return e.disableFormats?gd.EMPTY_ARRAY:t||n?t||(uo()("wp.blockEditor.RichText formattingControls prop",{alternative:"allowedFormats"}),n.map((function(e){return"core/".concat(e)}))):void 0}gd.EMPTY_ARRAY=[];var Od=Object(u.forwardRef)((function e(t,n){var r=t.children,o=t.tagName,a=t.value,s=t.onChange,d=t.isSelected,b=t.multiline,m=t.inlineToolbar,g=t.wrapperClassName,O=t.autocompleters,h=t.onReplace,j=t.placeholder,k=t.keepPlaceholderOnFocus,y=t.allowedFormats,_=t.formattingControls,E=t.withoutInteractiveFormatting,C=t.onRemove,w=t.onMerge,S=t.onSplit,I=t.__unstableOnSplitAtEnd,B=t.__unstableOnSplitMiddle,x=t.identifier,P=t.preserveWhiteSpace,T=t.__unstableEmbedURLOnPaste,N=t.__unstableDisableFormats,D=t.disableLineBreaks,R=t.unstableOnFocus,A=t.__unstableAllowPrefixTransformations,M=t.__unstableMultilineRootTag,L=t.__unstableMobileNoFocusOnMount,F=t.deleteEnter,V=t.placeholderTextColor,H=t.textAlign,U=t.selectionColor,G=t.tagsToEliminate,W=t.rootTagsToEliminate,K=t.disableEditingMenu,q=t.fontSize,$=t.fontFamily,Y=t.fontWeight,X=t.fontStyle,Q=t.minWidth,Z=t.maxWidth,J=t.onBlur,ee=t.setRef,te=Object(Ee.a)(t,["children","tagName","value","onChange","isSelected","multiline","inlineToolbar","wrapperClassName","autocompleters","onReplace","placeholder","keepPlaceholderOnFocus","allowedFormats","formattingControls","withoutInteractiveFormatting","onRemove","onMerge","onSplit","__unstableOnSplitAtEnd","__unstableOnSplitMiddle","identifier","preserveWhiteSpace","__unstableEmbedURLOnPaste","__unstableDisableFormats","disableLineBreaks","unstableOnFocus","__unstableAllowPrefixTransformations","__unstableMultilineRootTag","__unstableMobileNoFocusOnMount","deleteEnter","placeholderTextColor","textAlign","selectionColor","tagsToEliminate","rootTagsToEliminate","disableEditingMenu","fontSize","fontFamily","fontWeight","fontStyle","minWidth","maxWidth","onBlur","setRef"]),ne=Object(p.useInstanceId)(e);x=x||ne;var re=Object(u.useRef)(),oe=n||re,ae=Object(z.b)(),le=ae.clientId,se=ae.onCaretVerticalPositionChange,ue=ae.isSelected,de=Object(v.useSelect)((function(e){var t,n=e("core/block-editor"),r=n.isCaretWithinFormattedText,o=n.getSelectionStart,i=n.getSelectionEnd,a=n.getSettings,l=n.didAutomaticChange,s=n.__unstableGetBlockWithoutInnerBlocks,f=n.isMultiSelecting,b=n.hasMultiSelection,p=o(),m=i(),v=a().__experimentalUndo;void 0===d?t=p.clientId===le&&p.attributeKey===x:d&&(t=p.clientId===le);var g={};if("native"===u.Platform.OS){var O=le&&s(le);g={shouldBlurOnUnmount:O&&t&&Object(c.isUnmodifiedDefaultBlock)(O)}}return md({isCaretWithinFormattedText:r(),selectionStart:t?p.offset:void 0,selectionEnd:t?m.offset:void 0,isSelected:t,didAutomaticChange:l(),disabled:f()||b(),undo:v},g)})),fe=de.isCaretWithinFormattedText,be=de.selectionStart,pe=de.selectionEnd,me=de.isSelected,ve=de.didAutomaticChange,ge=de.disabled,Oe=de.undo,he=de.shouldBlurOnUnmount,je=Object(v.useDispatch)("core/block-editor"),ke=je.__unstableMarkLastChangeAsPersistent,ye=je.enterFormattedText,_e=je.exitFormattedText,Ce=je.selectionChange,we=je.__unstableMarkAutomaticChange,Se=vd(b),Ie=gd({allowedFormats:y,formattingControls:_,disableFormats:N}),Be=!Ie||Ie.length>0,xe=a,Pe=s;Array.isArray(a)&&(xe=c.children.toHTML(a),Pe=function(e){return s(c.children.fromDOM(Object(i.__unstableCreateElement)(document,e).childNodes))});var Te=Object(u.useCallback)((function(e,t){Ce(le,x,e,t)}),[le,x]),Ne=Object(u.useCallback)((function(e){var t=e.value,n=e.isReverse;w&&w(!n),C&&Object(i.isEmpty)(t)&&n&&C(!n)}),[w,C]),De=Object(u.useCallback)((function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];if(h&&S){var n=[],r=Object(i.split)(e),o=Object(ie.a)(r,2),c=o[0],a=o[1],l=t.length>0,s=-1;l&&Object(i.isEmpty)(c)||(n.push(S(Object(i.toHTMLString)({value:c,multilineTag:Se}))),s+=1),l?(n.push.apply(n,ce(t)),s+=t.length):B&&n.push(B()),(l||B)&&Object(i.isEmpty)(a)||n.push(S(Object(i.toHTMLString)({value:a,multilineTag:Se})));var u=l?s:1,d=l?-1:null;h(n,u,d)}}),[h,S,Se,B]),Re=Object(u.useCallback)((function(e){var t=e.value,n=e.onChange,r=e.shiftKey,o=h&&S;if(h){var a=Object(c.getBlockTransforms)("from").filter((function(e){return"enter"===e.type})),l=Object(c.findTransform)(a,(function(e){return e.regExp.test(t.text)}));l&&(h([l.transform({content:t.text})]),we())}if(b)r?D||n(Object(i.insert)(t,"\n")):o&&Object(i.__unstableIsEmptyLine)(t)?De(t):n(Object(i.__unstableInsertLineSeparator)(t));else{var s=t.text,u=t.start,d=t.end,f=I&&u===d&&d===s.length;r||!o&&!f?D||n(Object(i.insert)(t,"\n")):!o&&f?I():o&&De(t)}}),[h,S,we,b,De,I]),Ae=Object(u.useCallback)((function(e){var t=e.value,n=e.onChange,r=e.html,a=e.plainText,l=e.files,s=e.activeFormats;if(l&&l.length&&!r){var u=Object(c.pasteHandler)({HTML:ud(l),mode:"BLOCKS",tagName:o,preserveWhiteSpace:P});return window.console.log("Received items:\n\n",l),void(h&&Object(i.isEmpty)(t)?h(u):De(t,u))}var d,f=h&&S?"AUTO":"INLINE";"AUTO"===f&&Object(i.isEmpty)(t)&&(d=a,Object(id.regexp)(".*").test(d))&&(f="BLOCKS"),T&&Object(i.isEmpty)(t)&&Object($l.isURL)(a.trim())&&(f="BLOCKS");var p=Object(c.pasteHandler)({HTML:r,plainText:a,mode:f,tagName:o,preserveWhiteSpace:P});if("string"==typeof p){var m=Object(i.create)({html:p});if(s.length)for(var v=m.formats.length;v--;)m.formats[v]=[].concat(ce(s),ce(m.formats[v]||[]));b&&(m=Object(i.replace)(m,/\n+/g,i.__UNSTABLE_LINE_SEPARATOR)),n(Object(i.insert)(t,m))}else p.length>0&&(h&&Object(i.isEmpty)(t)?h(p,p.length-1,-1):De(t,p))}),[o,h,S,De,T,b,P]),Me=Object(u.useCallback)((function(e,t){if(h){var n=e.start,r=e.text;if(" "===r.slice(n-1,n)){var o=r.slice(0,n).trim(),a=Object(c.getBlockTransforms)("from").filter((function(e){return"prefix"===e.type})),l=Object(c.findTransform)(a,(function(e){var t=e.prefix;return o===t}));if(l){var s=t(Object(i.slice)(e,n,r.length)),u=l.transform(s);h([u]),we()}}}}),[h,we]),Le=Object(u.createElement)(i.__experimentalRichText,{clientId:le,identifier:x,ref:oe,value:xe,onChange:Pe,selectionStart:be,selectionEnd:pe,onSelectionChange:Te,tagName:o,placeholder:j,allowedFormats:Ie,withoutInteractiveFormatting:E,onEnter:Re,onDelete:Ne,onPaste:Ae,__unstableIsSelected:me,__unstableInputRule:Me,__unstableMultilineTag:Se,__unstableIsCaretWithinFormattedText:fe,__unstableOnEnterFormattedText:ye,__unstableOnExitFormattedText:_e,__unstableOnCreateUndoLevel:ke,__unstableMarkAutomaticChange:we,__unstableDidAutomaticChange:ve,__unstableUndo:Oe,__unstableDisableFormats:N,preserveWhiteSpace:P,disabled:ge,unstableOnFocus:R,__unstableAllowPrefixTransformations:A,__unstableMultilineRootTag:M,onCaretVerticalPositionChange:se,blockIsSelected:void 0!==d?d:ue,shouldBlurOnUnmount:he,__unstableMobileNoFocusOnMount:L,deleteEnter:F,placeholderTextColor:V,textAlign:H,selectionColor:U,tagsToEliminate:G,rootTagsToEliminate:W,disableEditingMenu:K,fontSize:q,fontFamily:$,fontWeight:Y,fontStyle:X,minWidth:Q,maxWidth:Z,onBlur:J,setRef:ee,id:te.id,style:te.style},(function(e){var t=e.isSelected,n=e.value,o=e.onChange,c=e.onFocus,i=e.editableProps,a=e.editableTagName;return Object(u.createElement)(u.Fragment,null,r&&r({value:n,onChange:o,onFocus:c}),t&&Be&&Object(u.createElement)(bd,{inline:m,anchorRef:oe.current}),t&&Object(u.createElement)(sd,null),Object(u.createElement)(or,{onReplace:h,completers:O,record:n,onChange:o,isSelected:t},(function(e){var t=e.listBoxId,n=e.activeId,r=e.onKeyDown;return Object(u.createElement)(a,Object(l.a)({},i,te,{style:te.style?md(md({},te.style),i.style):i.style,className:f()("block-editor-rich-text__editable",te.className,i.className,{"keep-placeholder-on-focus":k}),"aria-autocomplete":t?"list":void 0,"aria-owns":t,"aria-activedescendant":n,onKeyDown:function(e){r(e),i.onKeyDown(e)}}))})))}));return g?(uo()("wp.blockEditor.RichText wrapperClassName prop",{alternative:"className prop or create your own wrapper div"}),Object(u.createElement)("div",{className:f()("block-editor-rich-text",g)},Le)):Le}));Od.Content=function(e){var t=e.value,n=e.tagName,r=e.multiline,o=Object(Ee.a)(e,["value","tagName","multiline"]);Array.isArray(t)&&(t=c.children.toHTML(t));var i=vd(r);!t&&i&&(t="<".concat(i,"></").concat(i,">"));var a=Object(u.createElement)(u.RawHTML,null,t);return n?Object(u.createElement)(n,Object(b.omit)(o,["format"]),a):a},Od.isEmpty=function(e){return!e||0===e.length},Od.Content.defaultProps={format:"string",value:""};var hd=Od;function jd(e){var t=e.value,n=e.onChange;return Object(u.createElement)(Gu,null,Object(u.createElement)(hd,{value:t,onChange:n,placeholder:Object(O.__)("Navigation item"),keepPlaceholderOnFocus:!0,withoutInteractiveFormatting:!0,allowedFormats:["core/bold","core/italic","core/image","core/strikethrough"]}))}var kd=n(299);var yd=function(e){var t=e.icon,n=void 0===t?kd.a:t,r=e.label,o=void 0===r?Object(O.__)("Choose variation"):r,c=e.instructions,i=void 0===c?Object(O.__)("Select a variation to start with."):c,a=e.variations,l=e.onSelect,s=e.allowSkip,d=f()("block-editor-block-variation-picker",{"has-many-variations":a.length>4});return Object(u.createElement)(h.Placeholder,{icon:n,label:o,instructions:i,className:d},Object(u.createElement)("ul",{className:"block-editor-block-variation-picker__variations",role:"list","aria-label":Object(O.__)("Block variations")},a.map((function(e){return Object(u.createElement)("li",{key:e.name},Object(u.createElement)(h.Button,{isSecondary:!0,icon:e.icon,iconSize:48,onClick:function(){return l(e)},className:"block-editor-block-variation-picker__variation",label:e.description||e.title}),Object(u.createElement)("span",{className:"block-editor-block-variation-picker__variation-label",role:"presentation"},e.title))}))),s&&Object(u.createElement)("div",{className:"block-editor-block-variation-picker__skip"},Object(u.createElement)(h.Button,{isLink:!0,onClick:function(){return l()}},Object(O.__)("Skip"))))},_d=Object(u.createElement)(h.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(u.createElement)(h.Path,{d:"M15 4H9v11h6V4zM4 18.5V20h16v-1.5H4z"})),Ed=Object(u.createElement)(h.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(u.createElement)(h.Path,{d:"M20 11h-5V4H9v7H4v1.5h5V20h6v-7.5h5z"}));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 wd(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){s(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 Sd={top:{icon:Object(u.createElement)(h.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(u.createElement)(h.Path,{d:"M9 20h6V9H9v11zM4 4v1.5h16V4H4z"})),title:Object(O._x)("Vertically Align Top","Block vertical alignment setting")},center:{icon:Ed,title:Object(O._x)("Vertically Align Middle","Block vertical alignment setting")},bottom:{icon:_d,title:Object(O._x)("Vertically Align Bottom","Block vertical alignment setting")}},Id=["top","center","bottom"],Bd={isAlternate:!0};var xd=function(e){var t=e.value,n=e.onChange,r=e.controls,o=void 0===r?Id:r,c=e.isCollapsed,i=void 0===c||c,a=Sd[t],l=Sd.top;return Object(u.createElement)(h.ToolbarGroup,{popoverProps:Bd,isCollapsed:i,icon:a?a.icon:l.icon,label:Object(O._x)("Change vertical alignment","Block vertical alignment setting label"),controls:o.map((function(e){return wd(wd({},Sd[e]),{},{isActive:t===e,role:i?"menuitemradio":void 0,onClick:(r=e,function(){return n(t===r?void 0:r)})});var r}))})};function Pd(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 Td(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Pd(Object(n),!0).forEach((function(t){s(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Pd(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Nd=Object(p.createHigherOrderComponent)((function(e){return function(t){var n=ve("color.palette"),r=!ve("color.custom"),o=void 0===t.colors?n:t.colors,c=void 0===t.disableCustomColors?r:t.disableCustomColors,i=!Object(b.isEmpty)(o)||!c;return Object(u.createElement)(e,Td(Td({},t),{},{colors:o,disableCustomColors:c,hasColorsToChoose:i}))}}),"withColorContext"),Dd=Nd(h.ColorPalette);function Rd(e){var t=e.onChange,n=e.value,r=Object(Ee.a)(e,["onChange","value"]);return Object(u.createElement)(Ne,Object(l.a)({},r,{onColorChange:t,colorValue:n,gradients:[],disableCustomGradients:!0}))}var Ad=[];function Md(e){var t=ve("color.gradients")||Ad,n=!ve("color.customGradient");return Object(u.createElement)(h.__experimentalGradientPicker,Object(l.a)({gradients:void 0!==e.gradients?e.gradient:t,disableCustomGradients:void 0!==e.disableCustomGradients?e.disableCustomGradients:n},e))}var Ld=function(e){var t=void 0!==e.gradients&&void 0!==e.disableCustomGradients?h.__experimentalGradientPicker:Md;return Object(u.createElement)(t,e)};function Fd(e){var t=e.className,n=e.value,r=e.onChange,o=e.label,c=void 0===o?Object(O.__)("Gradient Presets"):o,i=Object(Ee.a)(e,["className","value","onChange","label"]),a=ve("color.gradients"),s=!ve("color.customGradient");return Object(b.isEmpty)(a)&&s?null:Object(u.createElement)(h.BaseControl,{className:f()("block-editor-gradient-picker-control",t)},Object(u.createElement)(h.BaseControl.VisualLabel,null,c),Object(u.createElement)(Ld,Object(l.a)({value:n,onChange:r,className:"block-editor-gradient-picker-control__gradient-picker-presets",gradients:a,disableCustomGradients:s},i)))}function Vd(e){var t=ve("color.gradients");return Object(b.isEmpty)(t)?null:Object(u.createElement)(h.PanelBody,{title:Object(O.__)("Gradient")},Object(u.createElement)(Fd,e))}var Hd=[25,50,75,100];function zd(e){var t,n,r=e.imageWidth,o=e.imageHeight,c=e.imageSizeOptions,i=void 0===c?[]:c,a=e.isResizable,l=void 0===a||a,s=e.slug,d=e.width,f=e.height,p=e.onChange,m=e.onChangeImage,v=void 0===m?b.noop:m;function g(e,t){return function(){p({width:e,height:t})}}return Object(u.createElement)(u.Fragment,null,!Object(b.isEmpty)(i)&&Object(u.createElement)(h.SelectControl,{label:Object(O.__)("Image size"),value:s,options:i,onChange:v}),l&&Object(u.createElement)("div",{className:"block-editor-image-size-control"},Object(u.createElement)("p",{className:"block-editor-image-size-control__row"},Object(O.__)("Image dimensions")),Object(u.createElement)("div",{className:"block-editor-image-size-control__row"},Object(u.createElement)(h.TextControl,{type:"number",className:"block-editor-image-size-control__width",label:Object(O.__)("Width"),value:null!==(t=null!=d?d:r)&&void 0!==t?t:"",min:1,onChange:function(e){return p({width:parseInt(e,10)})}}),Object(u.createElement)(h.TextControl,{type:"number",className:"block-editor-image-size-control__height",label:Object(O.__)("Height"),value:null!==(n=null!=f?f:o)&&void 0!==n?n:"",min:1,onChange:function(e){return p({height:parseInt(e,10)})}})),Object(u.createElement)("div",{className:"block-editor-image-size-control__row"},Object(u.createElement)(h.ButtonGroup,{"aria-label":Object(O.__)("Image size presets")},Hd.map((function(e){var t=Math.round(r*(e/100)),n=Math.round(o*(e/100)),c=d===t&&f===n;return Object(u.createElement)(h.Button,{key:e,isSmall:!0,isPrimary:c,isPressed:c,onClick:g(t,n)},e,"%")}))),Object(u.createElement)(h.Button,{isSmall:!0,onClick:g()},Object(O.__)("Reset")))))}var Ud=Object(p.createHigherOrderComponent)((function(e){return function(t){var n=Object(z.b)().clientId;return Object(u.createElement)(e,Object(l.a)({},t,{clientId:n}))}}),"withClientId"),Gd=Ud((function(e){var t=e.clientId,n=e.showSeparator,r=e.isFloating,o=e.onAddBlock;return Object(u.createElement)(rl,{rootClientId:t,showSeparator:n,isFloating:r,onAddBlock:o})})),Wd=Object(p.compose)([Ud,Object(v.withSelect)((function(e,t){var n=t.clientId,r=(0,e("core/block-editor").getBlockOrder)(n);return{lastBlockClientId:Object(b.last)(r)}}))])((function(e){var t=e.clientId,n=e.lastBlockClientId;return Object(u.createElement)(nl,{rootClientId:t,lastBlockClientId:n})})),Kd=n(73),qd=n.n(Kd);var $d=new WeakMap;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){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Yd(Object(n),!0).forEach((function(t){s(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 Qd(e){var t=e.clientId,n=e.allowedBlocks,r=e.template,o=e.templateLock,i=e.wrapperRef,a=e.templateInsertUpdatesSelection,l=e.__experimentalCaptureToolbars,s=e.__experimentalAppenderTagName,d=e.renderAppender,f=e.orientation,p=e.placeholder;!function(e,t,n,r,o){var c=Object(v.useDispatch)("core/block-editor").updateBlockListSettings,i=Object(v.useSelect)((function(t){var n=t("core/block-editor").getBlockRootClientId(e);return{blockListSettings:t("core/block-editor").getBlockListSettings(e),parentLock:t("core/block-editor").getTemplateLock(n)}}),[e]),a=i.blockListSettings,l=i.parentLock;Object(u.useLayoutEffect)((function(){var i={allowedBlocks:t,templateLock:void 0===n?l:n};void 0!==r&&(i.__experimentalCaptureToolbars=r),void 0!==o&&(i.orientation=o),qd()(a,i)||c(e,i)}),[e,a,t,n,l,r,o,c])}(t,n,o,l,f),function(e,t,n,r){var o=Object(v.useDispatch)("core/block-editor").replaceInnerBlocks,i=Object(v.useSelect)((function(t){return t("core/block-editor").getBlocks(e)}),[e]),a=Object(u.useRef)(null);Object(u.useLayoutEffect)((function(){if((0===i.length||"all"===n)&&!Object(b.isEqual)(t,a.current)){a.current=t;var l=Object(c.synchronizeBlocksWithTemplate)(i,t);Object(b.isEqual)(l,i)||o(e,l,0===i.length&&r&&0!==l.length)}}),[i,n,e])}(t,r,o,a);var m=Object(v.useSelect)((function(e){var n=e("core/block-editor").getBlock(t),r=Object(c.getBlockType)(n.name);if(r&&r.providesContext)return function(e,t){$d.has(t)||$d.set(t,new WeakMap);var n=$d.get(t);if(!n.has(e)){var r=Object(b.mapValues)(t.providesContext,(function(t){return e[t]}));n.set(e,r)}return n.get(e)}(n.attributes,r)}),[t]);return Object(u.createElement)(dr,{value:m},Object(u.createElement)(gl,{rootClientId:t,renderAppender:d,__experimentalAppenderTagName:s,wrapperRef:i,placeholder:p}))}function Zd(e){return Ja(e),Object(u.createElement)(Qd,e)}var Jd=Object(u.forwardRef)((function(e,t){var n=ef({ref:t},e);return Object(u.createElement)("div",{className:"block-editor-inner-blocks"},Object(u.createElement)("div",n))}));function ef(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=Object(u.useRef)(),r=Object(z.b)(),o=r.clientId,c=Object(p.useViewportMatch)("medium","<"),i=Object(v.useSelect)((function(e){var t=e("core/block-editor"),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]),a=e.ref||n,s=t.value&&t.onChange?Zd:Qd;return Xd(Xd({},e),{},{ref:a,className:f()(e.className,"block-editor-block-list__layout",{"has-overlay":i}),children:Object(u.createElement)(s,Object(l.a)({},t,{clientId:o,wrapperRef:a}))})}Jd.DefaultBlockAppender=Wd,Jd.ButtonBlockAppender=Gd,Jd.Content=Object(c.withBlockContentContext)((function(e){var t=e.BlockContent;return Object(u.createElement)(t,null)}));var tf=Jd,nf=n(217);function rf(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 of(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?rf(Object(n),!0).forEach((function(t){s(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):rf(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var cf=[{id:"opensInNewTab",title:Object(O.__)("Open in new tab")}],af=function(e){var t=e.value,n=e.onChange,r=void 0===n?b.noop:n,o=e.settings,c=void 0===o?cf:o;if(!c||!c.length)return null;var i=function(e){return function(n){r(of(of({},t),{},s({},e.id,n)))}},a=c.map((function(e){return Object(u.createElement)(h.ToggleControl,{className:"block-editor-link-control__setting",key:e.id,label:e.title,onChange:i(e),checked:!!t&&!!t[e.id]})}));return Object(u.createElement)("fieldset",{className:"block-editor-link-control__settings"},Object(u.createElement)(h.VisuallyHidden,{as:"legend"},Object(O.__)("Currently selected link settings")),a)},lf=n(123),sf=n.n(lf);function uf(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=nn(e);if(t){var o=nn(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return tn(this,n)}}var df=function(e){return e.stopPropagation()},ff=function(e){Jt(n,e);var t=uf(n);function n(e){var r;return $t(this,n),(r=t.call(this,e)).onChange=r.onChange.bind(Qt(r)),r.onFocus=r.onFocus.bind(Qt(r)),r.onKeyDown=r.onKeyDown.bind(Qt(r)),r.selectLink=r.selectLink.bind(Qt(r)),r.handleOnClick=r.handleOnClick.bind(Qt(r)),r.bindSuggestionNode=r.bindSuggestionNode.bind(Qt(r)),r.autocompleteRef=e.autocompleteRef||Object(u.createRef)(),r.inputRef=Object(u.createRef)(),r.updateSuggestions=Object(b.throttle)(r.updateSuggestions.bind(Qt(r)),200),r.suggestionNodes=[],r.isUpdatingSuggestions=!1,r.state={suggestions:[],showSuggestions:!1,selectedSuggestion:null,suggestionsListboxId:"",suggestionOptionIdPrefix:""},r}return Xt(n,[{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,sf()(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($l.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(O.sprintf)(
64
  /* translators: %s: number of results. */
65
- Object(O._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(O.__)("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 pt.UP:e.stopPropagation(),e.preventDefault();var a=r?r-1:o.length-1;this.setState({selectedSuggestion:a});break;case pt.DOWN:e.stopPropagation(),e.preventDefault();var l=null===r||r===o.length-1?0:r+1;this.setState({selectedSuggestion:l});break;case pt.TAB:null!==this.state.selectedSuggestion&&(this.selectLink(i),this.props.speak(Object(O.__)("Link selected.")));break;case pt.ENTER:null!==this.state.selectedSuggestion&&(e.stopPropagation(),this.selectLink(i))}}else switch(e.keyCode){case pt.UP:0!==e.target.selectionStart&&(e.stopPropagation(),e.preventDefault(),e.target.setSelectionRange(0,0));break;case pt.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(u.createElement)(u.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(O.__)("Paste URL or type to search"):c,a=e.__experimentalRenderControl,l=e.value,s=void 0===l?"":l,d=e.autoFocus,b=void 0===d||d,p=this.state,m=p.loading,v=p.showSuggestions,g=p.selectedSuggestion,j=p.suggestionsListboxId,k=p.suggestionOptionIdPrefix,y={id:"url-input-control-".concat(o),label:t,className:f()("block-editor-url-input",n,{"is-full-width":r})},_={value:s,required:!0,autoFocus:b,className:"block-editor-url-input__input",type:"text",onChange:this.onChange,onFocus:this.onFocus,onInput:df,placeholder:i,onKeyDown:this.onKeyDown,role:"combobox","aria-label":Object(O.__)("URL"),"aria-expanded":v,"aria-autocomplete":"list","aria-owns":j,"aria-activedescendant":null!==g?"".concat(k,"-").concat(g):void 0,ref:this.inputRef};return a?a(y,_,m):Object(u.createElement)(h.BaseControl,y,Object(u.createElement)("input",_),m&&Object(u.createElement)(h.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,i=t.__experimentalShowInitialSuggestions,a=void 0!==i&&i,s=this.state,d=s.showSuggestions,p=s.suggestions,m=s.selectedSuggestion,v=s.suggestionsListboxId,g=s.suggestionOptionIdPrefix,O=s.loading,j={id:v,ref:this.autocompleteRef,role:"listbox"},k=function(t,n){return{role:"option",tabIndex:"-1",id:"".concat(g,"-").concat(n),ref:e.bindSuggestionNode(n),"aria-selected":n===m}};return Object(b.isFunction)(r)&&d&&p.length?r({suggestions:p,selectedSuggestion:m,suggestionsListProps:j,buildSuggestionItemProps:k,isLoading:O,handleSuggestionClick:this.handleOnClick,isInitialSuggestions:a&&!(c&&c.length)}):!Object(b.isFunction)(r)&&d&&p.length?Object(u.createElement)(h.Popover,{position:"bottom",noArrow:!0,focusOnMount:!1},Object(u.createElement)("div",Object(l.a)({},j,{className:f()("block-editor-url-input__suggestions","".concat(n,"__suggestions"))}),p.map((function(t,n){return Object(u.createElement)(h.Button,Object(l.a)({},k(0,n),{key:t.id,className:f()("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)}}}]),n}(u.Component),bf=Object(p.compose)(p.withSafeTimeout,h.withSpokenMessages,p.withInstanceId,Object(v.withSelect)((function(e,t){if(!Object(b.isFunction)(t.__experimentalFetchLinkSuggestions))return{__experimentalFetchLinkSuggestions:(0,e("core/block-editor").getSettings)().__experimentalFetchLinkSuggestions}})))(ff),pf=Object(u.createElement)(j.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"-2 -2 24 24"},Object(u.createElement)(j.Path,{d:"M10 1c-5 0-9 4-9 9s4 9 9 9 9-4 9-9-4-9-9-9zm0 16c-3.9 0-7-3.1-7-7s3.1-7 7-7 7 3.1 7 7-3.1 7-7 7zm1-11H9v3H6v2h3v3h2v-3h3V9h-3V6zM10 1c-5 0-9 4-9 9s4 9 9 9 9-4 9-9-4-9-9-9zm0 16c-3.9 0-7-3.1-7-7s3.1-7 7-7 7 3.1 7 7-3.1 7-7 7zm1-11H9v3H6v2h3v3h2v-3h3V9h-3V6z"})),mf=function(e){var t,n=e.searchTerm,r=e.onClick,o=e.itemProps,c=e.isSelected,i=e.buttonText;return n?(t=i?Object(b.isFunction)(i)?i(n):i:Object(u.createInterpolateElement)(Object(O.sprintf)(
66
  /* translators: %s: search term. */
67
- Object(O.__)("Create: <mark>%s</mark>"),n),{mark:Object(u.createElement)("mark",null)}),Object(u.createElement)(h.Button,Object(l.a)({},o,{className:f()("block-editor-link-control__search-create block-editor-link-control__search-item",{"is-selected":c}),onClick:r}),Object(u.createElement)(ho.a,{className:"block-editor-link-control__search-item-icon",icon:pf}),Object(u.createElement)("span",{className:"block-editor-link-control__search-item-header"},Object(u.createElement)("span",{className:"block-editor-link-control__search-item-title"},t)))):null},vf=Object(u.createElement)(j.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"-2 -2 24 24"},Object(u.createElement)(j.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"})),gf=function(e){var t=e.itemProps,n=e.suggestion,r=e.isSelected,o=void 0!==r&&r,c=e.onClick,i=e.isURL,a=void 0!==i&&i,s=e.searchTerm,d=void 0===s?"":s,b=e.shouldShowType,p=void 0!==b&&b;return Object(u.createElement)(h.Button,Object(l.a)({},t,{onClick:c,className:f()("block-editor-link-control__search-item",{"is-selected":o,"is-url":a,"is-entity":!a})}),a&&Object(u.createElement)(ho.a,{className:"block-editor-link-control__search-item-icon",icon:vf}),Object(u.createElement)("span",{className:"block-editor-link-control__search-item-header"},Object(u.createElement)("span",{className:"block-editor-link-control__search-item-title"},Object(u.createElement)(h.TextHighlight,{text:n.title,highlight:d})),Object(u.createElement)("span",{"aria-hidden":!a,className:"block-editor-link-control__search-item-info"},!a&&(Object($l.filterURLForDisplay)(Object($l.safeDecodeURI)(n.url))||""),a&&Object(O.__)("Press ENTER to add this link"))),p&&n.type&&Object(u.createElement)("span",{className:"block-editor-link-control__search-item-type"},"post_tag"===n.type?"tag":n.type))};function Of(e){var t=e.instanceId,n=e.withCreateSuggestion,r=e.currentInputValue,o=e.handleSuggestionClick,c=e.suggestionsListProps,i=e.buildSuggestionItemProps,a=e.suggestions,s=e.selectedSuggestion,d=e.isLoading,b=e.isInitialSuggestions,p=e.createSuggestionButtonText,m=e.suggestionsQuery,v=f()("block-editor-link-control__search-results",{"is-loading":d}),g=["url","mailto","tel","internal"],j=1===a.length&&g.includes(a[0].type.toLowerCase()),k=n&&!j&&!b,y=!(null==m?void 0:m.type),_="block-editor-link-control-search-results-label-".concat(t),E=b?Object(O.__)("Recently updated"):Object(O.sprintf)(
68
  /* translators: %s: search term. */
69
- Object(O.__)('Search results for "%s"'),r),C=Object(u.createElement)(b?u.Fragment:h.VisuallyHidden,{},Object(u.createElement)("span",{className:"block-editor-link-control__search-results-label",id:_},E));return Object(u.createElement)("div",{className:"block-editor-link-control__search-results-wrapper"},C,Object(u.createElement)("div",Object(l.a)({},c,{className:v,"aria-labelledby":_}),a.map((function(e,t){return k&&"__CREATE__"===e.type?Object(u.createElement)(mf,{searchTerm:r,buttonText:p,onClick:function(){return o(e)},key:e.type,itemProps:i(e,t),isSelected:t===s}):"__CREATE__"===e.type?null:Object(u.createElement)(gf,{key:"".concat(e.id,"-").concat(e.type),itemProps:i(e,t),suggestion:e,index:t,onClick:function(){o(e)},isSelected:t===s,isURL:g.includes(e.type.toLowerCase()),searchTerm:r,shouldShowType:y})}))))}function hf(e){var t=Object(b.startsWith)(e,"#");return Object($l.isURL)(e)||e&&e.includes("www.")||t}function jf(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 kf(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?jf(Object(n),!0).forEach((function(t){s(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):jf(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var yf=function(){return Promise.resolve([])},_f=function(e){var t="URL",n=Object($l.getProtocol)(e)||"";return n.includes("mailto")&&(t="mailto"),n.includes("tel")&&(t="tel"),Object(b.startsWith)(e,"#")&&(t="internal"),Promise.resolve([{id:e,title:e,url:"URL"===t?Object($l.prependHTTP)(e):e,type:t}])},Ef=function(){var e=Sr(Cr.a.mark((function e(t,n,r,o,c,i){var a,l,s;return Cr.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",hf(t)||!c?l:l.concat({title:t,url:t,type:"__CREATE__"}));case 9:case"end":return e.stop()}}),e)})));return function(t,n,r,o,c,i){return e.apply(this,arguments)}}();function Cf(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 wf(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Cf(Object(n),!0).forEach((function(t){s(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Cf(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Sf=Promise.resolve([]),If=Object(u.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,l=e.placeholder,s=void 0===l?null:l,d=e.withCreateSuggestion,f=void 0!==d&&d,m=e.onCreateSuggestion,g=void 0===m?b.noop:m,h=e.onChange,j=void 0===h?b.noop:h,k=e.onSelect,y=void 0===k?b.noop:k,_=e.showSuggestions,E=void 0===_||_,C=e.renderSuggestions,w=void 0===C?function(e){return Object(u.createElement)(Of,e)}:C,S=e.fetchSuggestions,I=void 0===S?null:S,B=e.allowDirectEntry,x=void 0===B||B,P=e.showInitialSuggestions,T=void 0!==P&&P,N=e.suggestionsQuery,D=void 0===N?{}:N,R=e.withURLSuggestion,A=void 0===R||R,M=e.createSuggestionButtonText,L=function(e,t,n,r){var o=Object(v.useSelect)((function(e){return{fetchSearchSuggestions:(0,e("core/block-editor").getSettings)().__experimentalFetchLinkSuggestions}}),[]).fetchSearchSuggestions,c=t?_f:yf;return Object(u.useCallback)((function(t,i){var a=i.isInitialSuggestions;return hf(t)?c(t,{isInitialSuggestions:a}):Ef(t,kf(kf({},e),{},{isInitialSuggestions:a}),o,c,n,r)}),[c,o,n])}(D,x,f,A),F=E?I||L:Sf,V=Object(p.useInstanceId)(If),H=Object(u.useState)(),z=Object(ie.a)(H,2),U=z[0],G=z[1],W=function(){var e=Sr(Cr.a.mark((function e(t){var n,r;return Cr.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?void 0:r.url)&&y(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)&&y(wf(wf({},Object(b.omit)(c,"id","url")),n),n);case 13:case"end":return e.stop()}}),e,null,[[2,9]])})));return function(t){return e.apply(this,arguments)}}();return Object(u.createElement)("form",{onSubmit:function(e){e.preventDefault(),W(U||{url:n})}},Object(u.createElement)(bf,{className:a,value:n,onChange:function(e,t){j(e),G(t)},placeholder:null!=s?s:Object(O.__)("Search or type url"),__experimentalRenderSuggestions:E?function(e){return w(wf(wf({},e),{},{instanceId:V,withCreateSuggestion:f,currentInputValue:n,createSuggestionButtonText:M,suggestionsQuery:D,handleSuggestionClick:function(t){e.handleSuggestionClick&&e.handleSuggestionClick(t),W(t)}}))}:null,__experimentalFetchLinkSuggestions:F,__experimentalHandleURLSuggestions:!0,__experimentalShowInitialSuggestions:T,ref:t}),r)})),Bf=If,xf=Object(h.createSlotFill)("BlockEditorLinkControlViewer"),Pf=xf.Slot,Tf=xf.Fill;function Nf(e){var t=e.value,n=e.onEditClick,r=t&&Object($l.filterURLForDisplay)(Object($l.safeDecodeURI)(t.url))||"";return Object(u.createElement)("div",{"aria-label":Object(O.__)("Currently selected"),"aria-selected":"true",className:f()("block-editor-link-control__search-item",{"is-current":!0})},Object(u.createElement)("span",{className:"block-editor-link-control__search-item-header"},Object(u.createElement)(h.ExternalLink,{className:"block-editor-link-control__search-item-title",href:t.url},t&&t.title||r),t&&t.title&&Object(u.createElement)("span",{className:"block-editor-link-control__search-item-info"},r)),Object(u.createElement)(h.Button,{isSecondary:!0,onClick:function(){return n()},className:"block-editor-link-control__search-item-action"},Object(O.__)("Edit")),Object(u.createElement)(Pf,{fillProps:t}))}var Df=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 Rf(e){var t=e.searchInputPlaceholder,n=e.value,r=e.settings,o=e.onChange,c=void 0===o?b.noop:o,i=e.noDirectEntry,a=void 0!==i&&i,l=e.showSuggestions,s=void 0===l||l,d=e.showInitialSuggestions,f=e.forceIsEditingLink,p=e.createSuggestion,m=e.withCreateSuggestion,v=e.inputValue,g=void 0===v?"":v,j=e.suggestionsQuery,k=void 0===j?{}:j,y=e.noURLSuggestion,_=void 0!==y&&y,E=e.createSuggestionButtonText;void 0===m&&p&&(m=!0);var C=Object(u.useRef)(),w=Object(u.useState)(n&&n.url||""),S=Object(ie.a)(w,2),I=S[0],B=S[1],x=g||I,P=Object(u.useState)(void 0!==f?f:!n||!n.url),T=Object(ie.a)(P,2),N=T[0],D=T[1],R=Object(u.useRef)(!1);Object(u.useEffect)((function(){void 0!==f&&f!==N&&D(f)}),[f]),Object(u.useEffect)((function(){R.current&&C.current&&!C.current.contains(C.current.ownerDocument.activeElement)&&(xr.focus.focusable.find(C.current)[0]||C.current).focus();R.current=!1}),[N]);var A=function(e){var t=Object(u.useRef)(),n=Object(u.useState)(!1),r=Object(ie.a)(n,2),o=r[0],c=r[1],i=Object(u.useState)(null),a=Object(ie.a)(i,2),l=a[0],s=a[1],d=function(){var n=Sr(Cr.a.mark((function n(r){return Cr.a.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return c(!0),s(null),n.prev=2,t.current=Df(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 s(n.t0.message||Object(O.__)("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(e){return n.apply(this,arguments)}}();return Object(u.useEffect)((function(){return function(){t.current&&t.current.cancel()}}),[]),{createPage:d,isCreatingPage:o,errorMessage:l}}(p),M=A.createPage,L=A.isCreatingPage,F=A.errorMessage;return Object(u.createElement)("div",{tabIndex:-1,ref:C,className:"block-editor-link-control"},L&&Object(u.createElement)("div",{className:"block-editor-link-control__loading"},Object(u.createElement)(h.Spinner,null)," ",Object(O.__)("Creating"),"…"),(N||!n)&&!L&&Object(u.createElement)(u.Fragment,null,Object(u.createElement)("div",{className:"block-editor-link-control__search-input-wrapper"},Object(u.createElement)(Bf,{currentLink:n,className:"block-editor-link-control__search-input",placeholder:t,value:x,withCreateSuggestion:m,onCreateSuggestion:M,onChange:B,onSelect:function(e){var t;c(e),R.current=!!(null===(t=C.current)||void 0===t?void 0:t.contains(C.current.ownerDocument.activeElement)),D(!1)},showInitialSuggestions:d,allowDirectEntry:!a,showSuggestions:s,suggestionsQuery:k,withURLSuggestion:!_,createSuggestionButtonText:E},Object(u.createElement)("div",{className:"block-editor-link-control__search-actions"},Object(u.createElement)(h.Button,{type:"submit",label:Object(O.__)("Submit"),icon:nf.a,className:"block-editor-link-control__search-submit"})))),F&&Object(u.createElement)(h.Notice,{className:"block-editor-link-control__search-error",status:"error",isDismissible:!1},F)),n&&!N&&!L&&Object(u.createElement)(Nf,{value:n,onEditClick:function(){return D(!0)}}),Object(u.createElement)(af,{value:n,settings:r,onChange:c}))}Rf.ViewerFill=Tf;var Af=Rf,Mf=n(300),Lf=n(218),Ff=Object(h.withFilters)("editor.MediaUpload")((function(){return null}));var Vf=function(e){var t=e.fallback,n=void 0===t?null:t,r=e.children;return Object(v.useSelect)((function(e){return!!(0,e("core/block-editor").getSettings)().mediaUpload}),[])?r:n},Hf=Object(p.compose)([Object(v.withDispatch)((function(e){var t=e("core/notices");return{createNotice:t.createNotice,removeNotice:t.removeNotice}})),Object(h.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,l=void 0===a?b.noop:a,s=e.name,d=void 0===s?Object(O.__)("Replace"):s,f=e.createNotice,p=e.removeNotice,m=Object(u.useState)(t),g=Object(ie.a)(m,2),j=g[0],k=g[1],y=Object(v.useSelect)((function(e){return e("core/block-editor").getSettings().mediaUpload}),[]),_=Object(u.createRef)(),E=Object(b.uniqueId)("block-editor/media-replace-flow/error-notice/"),C=function(e){var t=document.createElement("div");t.innerHTML=Object(u.renderToString)(e);var n=t.textContent||t.innerText||"";setTimeout((function(){f("error",n,{speak:!0,id:E,isDismissible:!0})}),1e3)},w=function(e){c(e),k(e.url),Object(Ue.speak)(Object(O.__)("The media file has been replaced")),p(E)},S=function(e){e.keyCode===pt.DOWN&&(e.preventDefault(),e.stopPropagation(),e.target.click())};return Object(u.createElement)(h.Dropdown,{popoverProps:{isAlternate:!0},contentClassName:"block-editor-media-replace-flow__options",renderToggle:function(e){var t=e.isOpen,n=e.onToggle;return Object(u.createElement)(h.ToolbarGroup,{className:"media-replace-flow"},Object(u.createElement)(h.ToolbarButton,{ref:_,"aria-expanded":t,"aria-haspopup":"true",onClick:n,onKeyDown:S},d))},renderContent:function(e){e.onClose;return Object(u.createElement)(u.Fragment,null,Object(u.createElement)(h.NavigableMenu,{className:"block-editor-media-replace-flow__media-upload-menu"},Object(u.createElement)(Ff,{value:n,onSelect:function(e){return w(e)},allowedTypes:r,render:function(e){var t=e.open;return Object(u.createElement)(h.MenuItem,{icon:Mf.a,onClick:t},Object(O.__)("Open Media Library"))}}),Object(u.createElement)(Vf,null,Object(u.createElement)(h.FormFileUpload,{onChange:function(e){!function(e){var t=e.target.files;l(t);y({allowedTypes:r,filesList:t,onFileChange:function(e){var t=Object(ie.a)(e,1)[0];w(t)},onError:C})}(e)},accept:o,render:function(e){var t=e.openFileDialog;return Object(u.createElement)(h.MenuItem,{icon:Lf.a,onClick:function(){t()}},Object(O.__)("Upload"))}}))),i&&Object(u.createElement)("form",{className:"block-editor-media-flow__url-input",onKeyDown:function(e){e.stopPropagation()},onKeyPress:function(e){e.stopPropagation()}},Object(u.createElement)("span",{className:"block-editor-media-replace-flow__image-url-label"},Object(O.__)("Current media URL:")),Object(u.createElement)(Af,{value:{url:j},settings:[],showSuggestions:!1,onChange:function(e){var t=e.url;k(t),i(t),_.current.focus()}})))}})})),zf=n(200);function Uf(e){var t=e.url,n=e.urlLabel,r=e.className,o=f()(r,"block-editor-url-popover__link-viewer-url");return t?Object(u.createElement)(h.ExternalLink,{className:o,href:t},n||Object($l.filterURLForDisplay)(Object($l.safeDecodeURI)(t))):Object(u.createElement)("span",{className:o})}function Gf(e){var t=e.additionalControls,n=e.children,r=e.renderSettings,o=e.position,c=void 0===o?"bottom center":o,i=e.focusOnMount,a=void 0===i?"firstElement":i,s=Object(Ee.a)(e,["additionalControls","children","renderSettings","position","focusOnMount"]),d=Object(u.useState)(!1),f=Object(ie.a)(d,2),b=f[0],p=f[1],m=!!r&&b;return Object(u.createElement)(h.Popover,Object(l.a)({className:"block-editor-url-popover",focusOnMount:a,position:c},s),Object(u.createElement)("div",{className:"block-editor-url-popover__input-container"},Object(u.createElement)("div",{className:"block-editor-url-popover__row"},n,!!r&&Object(u.createElement)(h.Button,{className:"block-editor-url-popover__settings-toggle",icon:Fr.a,label:Object(O.__)("Link settings"),onClick:function(){p(!b)},"aria-expanded":b})),m&&Object(u.createElement)("div",{className:"block-editor-url-popover__row block-editor-url-popover__settings"},r())),t&&!m&&Object(u.createElement)("div",{className:"block-editor-url-popover__additional-controls"},t))}Gf.LinkEditor=function(e){var t=e.autocompleteRef,n=e.className,r=e.onChangeInputValue,o=e.value,c=Object(Ee.a)(e,["autocompleteRef","className","onChangeInputValue","value"]);return Object(u.createElement)("form",Object(l.a)({className:f()("block-editor-url-popover__link-editor",n)},c),Object(u.createElement)(bf,{value:o,onChange:r,autocompleteRef:t}),Object(u.createElement)(h.Button,{icon:nf.a,label:Object(O.__)("Apply"),type:"submit"}))},Gf.LinkViewer=function(e){var t=e.className,n=e.linkClassName,r=e.onEditLinkClick,o=e.url,c=e.urlLabel,i=Object(Ee.a)(e,["className","linkClassName","onEditLinkClick","url","urlLabel"]);return Object(u.createElement)("div",Object(l.a)({className:f()("block-editor-url-popover__link-viewer",t)},i),Object(u.createElement)(Uf,{url:o,urlLabel:c,className:n}),r&&Object(u.createElement)(h.Button,{icon:zf.a,label:Object(O.__)("Edit"),onClick:r}))};var Wf=Gf,Kf=function(e){var t=e.src,n=e.onChange,r=e.onSubmit,o=e.onClose;return Object(u.createElement)(Wf,{onClose:o},Object(u.createElement)("form",{className:"block-editor-media-placeholder__url-input-form",onSubmit:r},Object(u.createElement)("input",{className:"block-editor-media-placeholder__url-input-field",type:"url","aria-label":Object(O.__)("URL"),placeholder:Object(O.__)("Paste or type URL"),onChange:n,value:t}),Object(u.createElement)(h.Button,{className:"block-editor-media-placeholder__url-input-submit-button",icon:nf.a,label:Object(O.__)("Apply"),type:"submit"})))};var qf=Object(h.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,l=e.mediaPreview,s=e.notices,d=e.isAppender,p=e.accept,m=e.addToGallery,g=e.multiple,j=void 0!==g&&g,k=e.dropZoneUIOnly,y=e.disableDropZone,_=e.disableMediaButtons,E=e.onError,C=e.onSelect,w=e.onCancel,S=e.onSelectURL,I=e.onDoubleClick,B=e.onFilesPreUpload,x=void 0===B?b.noop:B,P=e.onHTMLDrop,T=void 0===P?b.noop:P,N=e.children,D=Object(v.useSelect)((function(e){return(0,e("core/block-editor").getSettings)().mediaUpload}),[]),R=Object(u.useState)(""),A=Object(ie.a)(R,2),M=A[0],L=A[1],F=Object(u.useState)(!1),V=Object(ie.a)(F,2),H=V[0],z=V[1];Object(u.useEffect)((function(){var e;L(null!==(e=null==n?void 0:n.src)&&void 0!==e?e:"")}),[null==n?void 0:n.src]);var U=function(e){L(e.target.value)},G=function(){z(!0)},W=function(){z(!1)},K=function(e){e.preventDefault(),M&&S&&(S(M),W())},q=function(e){var t;if(x(e),j)if(m){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)}))}));C(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=C;else t=function(e){var t=Object(ie.a)(e,1)[0];return C(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(O.__)("To edit this block, you need permission to upload media.")),void 0===n||void 0===i){var b=null!=r?r:[],p=Object(ie.a)(b,1)[0],m=1===b.length,v=m&&"audio"===p,g=m&&"image"===p,j=m&&"video"===p;void 0===n&&D&&(n=Object(O.__)("Upload a media file or pick one from your media library."),v?n=Object(O.__)("Upload an audio file, pick one from your media library, or add one with a URL."):g?n=Object(O.__)("Upload an image file, pick one from your media library, or add one with a URL."):j&&(n=Object(O.__)("Upload a video file, pick one from your media library, or add one with a URL."))),void 0===i&&(i=Object(O.__)("Media"),v?i=Object(O.__)("Audio"):g?i=Object(O.__)("Image"):j&&(i=Object(O.__)("Video")))}var k=f()("block-editor-media-placeholder",o,{"is-appender":d});return Object(u.createElement)(h.Placeholder,{icon:c,label:i,instructions:n,className:k,notices:s,onClick:t,onDoubleClick:I,preview:l},e,N)},X=function(){return y?null:Object(u.createElement)(h.DropZone,{onFilesDrop:q,onHTMLDrop:T})},Q=function(){return w&&Object(u.createElement)(h.Button,{className:"block-editor-media-placeholder__cancel-button",title:Object(O.__)("Cancel"),isLink:!0,onClick:w},Object(O.__)("Cancel"))},Z=function(){return S&&Object(u.createElement)("div",{className:"block-editor-media-placeholder__url-input-container"},Object(u.createElement)(h.Button,{className:"block-editor-media-placeholder__button",onClick:G,isPressed:H,isTertiary:!0},Object(O.__)("Insert from URL")),H&&Object(u.createElement)(Kf,{src:M,onChange:U,onSubmit:K,onClose:W}))};return k||_?(k&&uo()("wp.blockEditor.MediaPlaceholder dropZoneUIOnly prop",{alternative:"disableMediaButtons"}),Object(u.createElement)(Vf,null,X())):Object(u.createElement)(Vf,{fallback:Y(Z())},function(){var e=Object(u.createElement)(Ff,{addToGallery:m,gallery:j&&!(!r||0===r.length)&&r.every((function(e){return"image"===e||e.startsWith("image/")})),multiple:j,onSelect:C,allowedTypes:r,value:Array.isArray(n)?n.map((function(e){return e.id})):n.id,render:function(e){var t=e.open;return Object(u.createElement)(h.Button,{isTertiary:!0,onClick:function(e){e.stopPropagation(),t()}},Object(O.__)("Media Library"))}});if(D&&d)return Object(u.createElement)(u.Fragment,null,X(),Object(u.createElement)(h.FormFileUpload,{onChange:$,accept:p,multiple:j,render:function(t){var n=t.openFileDialog,r=Object(u.createElement)(u.Fragment,null,Object(u.createElement)(h.Button,{isPrimary:!0,className:f()("block-editor-media-placeholder__button","block-editor-media-placeholder__upload-button")},Object(O.__)("Upload")),e,Z(),Q());return Y(r,n)}}));if(D){var t=Object(u.createElement)(u.Fragment,null,X(),Object(u.createElement)(h.FormFileUpload,{isPrimary:!0,className:f()("block-editor-media-placeholder__button","block-editor-media-placeholder__upload-button"),onChange:$,accept:p,multiple:j},Object(O.__)("Upload")),e,Z(),Q());return Y(t)}return Y(e)}())})),$f=Object(u.forwardRef)((function(e,t){return Object(u.createElement)(hd,Object(l.a)({ref:t},e,{__unstableDisableFormats:!0,preserveWhiteSpace:!0}))}));$f.Content=function(e){var t=e.value,n=void 0===t?"":t,r=e.tagName,o=void 0===r?"div":r,c=Object(Ee.a)(e,["value","tagName"]);return Object(u.createElement)(o,c,n)};var Yf=$f,Xf=Object(u.forwardRef)((function(e,t){var n=e.__experimentalVersion,r=Object(Ee.a)(e,["__experimentalVersion"]);if(2===n)return Object(u.createElement)(Yf,Object(l.a)({ref:t},r));var o=r.className,c=r.onChange,i=Object(Ee.a)(r,["className","onChange"]);return Object(u.createElement)(ao.a,Object(l.a)({ref:t,className:f()("block-editor-plain-text",o),onChange:function(e){return c(e.target.value)}},i))}));function Qf(e){var t=e.property,n=e.viewport,r=e.desc,o=Object(p.useInstanceId)(Qf),c=r||Object(O.sprintf)(
70
  /* translators: 1: property name. 2: viewport name. */
71
- Object(O._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(u.createElement)(u.Fragment,null,Object(u.createElement)("span",{"aria-describedby":"rbc-desc-".concat(o)},n.label),Object(u.createElement)(h.VisuallyHidden,{as:"span",id:"rbc-desc-".concat(o)},c))}var Zf=function(e){var t=e.title,n=e.property,r=e.toggleLabel,o=e.onIsResponsiveChange,c=e.renderDefaultControl,i=e.renderResponsiveControls,a=e.isResponsive,l=void 0!==a&&a,s=e.defaultLabel,d=void 0===s?{id:"all",
72
  /* translators: 'Label. Used to signify a layout property (eg: margin, padding) will apply uniformly to all screensizes.' */
73
- label:Object(O.__)("All")}:s,b=e.viewports,p=void 0===b?[{id:"small",label:Object(O.__)("Small screens")},{id:"medium",label:Object(O.__)("Medium screens")},{id:"large",label:Object(O.__)("Large screens")}]:b;if(!t||!n||!c)return null;var m=r||Object(O.sprintf)(
74
  /* 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) */
75
- Object(O.__)("Use the same %s on all screensizes."),n),v=Object(O.__)("Toggle between using the same value for all screen sizes or using a unique value per screen size."),g=c(Object(u.createElement)(Qf,{property:n,viewport:d}),d);
76
- /* translators: 'Help text for the responsive mode toggle control.' */return Object(u.createElement)("fieldset",{className:"block-editor-responsive-block-control"},Object(u.createElement)("legend",{className:"block-editor-responsive-block-control__title"},t),Object(u.createElement)("div",{className:"block-editor-responsive-block-control__inner"},Object(u.createElement)(h.ToggleControl,{className:"block-editor-responsive-block-control__toggle",label:m,checked:!l,onChange:o,help:v}),Object(u.createElement)("div",{className:f()("block-editor-responsive-block-control__group",{"is-responsive":l})},!l&&g,l&&(i?i(p):p.map((function(e){return Object(u.createElement)(u.Fragment,{key:e.id},c(Object(u.createElement)(Qf,{property:n,viewport:e}),e))}))))))};function Jf(e){var t=e.character,n=e.type,r=e.onUse;return Object(p.useKeyboardShortcut)(pt.rawShortcut[n](t),(function(){return r(),!1}),{bindGlobal:!0}),null}function eb(e){var t,n=e.name,r=e.shortcutType,o=e.shortcutCharacter,c=Object(Ee.a)(e,["name","shortcutType","shortcutCharacter"]),i="RichText.ToolbarControls";return n&&(i+=".".concat(n)),r&&o&&(t=pt.displayShortcut[r](o)),Object(u.createElement)(h.Fill,{name:i},Object(u.createElement)(h.ToolbarButton,Object(l.a)({},c,{shortcut:t})))}function tb(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=nn(e);if(t){var o=nn(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return tn(this,n)}}var nb=function(e){Jt(n,e);var t=tb(n);function n(){var e;return $t(this,n),(e=t.apply(this,arguments)).onInput=e.onInput.bind(Qt(e)),e}return Xt(n,[{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}}]),n}(u.Component),rb=Object(u.createElement)(h.SVG,{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},Object(u.createElement)(h.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"}));var ob=Object(u.forwardRef)((function(e,t){var n=Object(v.useSelect)((function(e){return e("core/block-editor").isNavigationMode()}),[]),r=Object(v.useDispatch)("core/block-editor").setNavigationMode,o=function(e){r("edit"!==e)};return Object(u.createElement)(h.Dropdown,{renderToggle:function(r){var o=r.isOpen,c=r.onToggle;return Object(u.createElement)(h.Button,Object(l.a)({},e,{ref:t,icon:n?rb:zf.a,"aria-expanded":o,"aria-haspopup":"true",onClick:c
77
- /* translators: button label text should, if possible, be under 16 characters. */,label:Object(O.__)("Modes")}))},position:"bottom right",renderContent:function(){return Object(u.createElement)(u.Fragment,null,Object(u.createElement)(h.NavigableMenu,{role:"menu","aria-label":Object(O.__)("Modes")},Object(u.createElement)(h.MenuItemsChoice,{value:n?"select":"edit",onSelect:o,choices:[{value:"edit",label:Object(u.createElement)(u.Fragment,null,Object(u.createElement)(ho.a,{icon:zf.a}),Object(O.__)("Edit"))},{value:"select",label:Object(u.createElement)(u.Fragment,null,rb,Object(O.__)("Select"))}]})),Object(u.createElement)("div",{className:"block-editor-tool-selector__help"},Object(O.__)("Tools offer different interactions for block selection & editing. To select, press Escape, to go back to editing, press Enter.")))}})})),cb=n(192),ib=Object(u.createElement)(j.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(u.createElement)(j.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"}));function ab(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=nn(e);if(t){var o=nn(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return tn(this,n)}}var lb=function(e){Jt(n,e);var t=ab(n);function n(){var e;return $t(this,n),(e=t.apply(this,arguments)).toggle=e.toggle.bind(Qt(e)),e.submitLink=e.submitLink.bind(Qt(e)),e.state={expanded:!1},e}return Xt(n,[{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(O.__)("Edit link"):Object(O.__)("Insert link");return Object(u.createElement)("div",{className:"block-editor-url-input__button"},Object(u.createElement)(h.Button,{icon:cb.a,label:o,onClick:this.toggle,className:"components-toolbar__control",isPressed:!!t}),r&&Object(u.createElement)("form",{className:"block-editor-url-input__button-modal",onSubmit:this.submitLink},Object(u.createElement)("div",{className:"block-editor-url-input__button-modal-line"},Object(u.createElement)(h.Button,{className:"block-editor-url-input__back",icon:ib,label:Object(O.__)("Close"),onClick:this.toggle}),Object(u.createElement)(bf,{value:t||"",onChange:n}),Object(u.createElement)(h.Button,{icon:nf.a,label:Object(O.__)("Submit"),type:"submit"}))))}}]),n}(u.Component),sb=n(128),ub=["noreferrer","noopener"],db=Object(u.createElement)(h.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},Object(u.createElement)(h.Path,{d:"M0,0h24v24H0V0z",fill:"none"}),Object(u.createElement)(h.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(u.createElement)(h.Path,{d:"m14.14 11.86l-3 3.87-2.14-2.59-3 3.86h12l-3.86-5.14z"})),fb=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,l=e.linkTarget,s=e.linkClass,d=e.rel,f=Object(u.useState)(!1),p=Object(ie.a)(f,2),m=p[0],v=p[1],g=Object(u.useCallback)((function(){v(!0)})),j=Object(u.useState)(!1),k=Object(ie.a)(j,2),y=k[0],_=k[1],E=Object(u.useState)(null),C=Object(ie.a)(E,2),w=C[0],S=C[1],I=Object(u.useRef)(null),B=function(e){e.stopPropagation()},x=function(e){[pt.LEFT,pt.DOWN,pt.RIGHT,pt.UP,pt.BACKSPACE,pt.ENTER].indexOf(e.keyCode)>-1&&e.stopPropagation()},P=Object(u.useCallback)((function(){"media"!==t&&"attachment"!==t||S(""),_(!0)})),T=Object(u.useCallback)((function(){_(!1)})),N=Object(u.useCallback)((function(){S(null),T(),v(!1)})),D=function(e){var t=e;return void 0===e||Object(b.isEmpty)(t)||Object(b.isEmpty)(t)||(Object(b.each)(ub,(function(e){var n=new RegExp("\\b"+e+"\\b","gi");t=t.replace(n,"")})),t!==e&&(t=t.trim()),Object(b.isEmpty)(t)&&(t=void 0)),t},R=Object(u.useCallback)((function(){return function(e){var t=I.current;t&&t.contains(e.target)||(v(!1),S(null),T())}})),A=Object(u.useCallback)((function(){return function(e){w&&n({href:w}),T(),S(null),e.preventDefault()}})),M=Object(u.useCallback)((function(){n({linkDestination:"none",href:""})})),L=function(){var e=[{linkDestination:"media",title:Object(O.__)("Media File"),url:"image"===c?i:void 0,icon:db}];return"image"===c&&a&&e.push({linkDestination:"attachment",title:Object(O.__)("Attachment Page"),url:"image"===c?a:void 0,icon:Object(u.createElement)(h.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},Object(u.createElement)(h.Path,{d:"M0 0h24v24H0V0z",fill:"none"}),Object(u.createElement)(h.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},F=Object(u.createElement)(u.Fragment,null,Object(u.createElement)(h.ToggleControl,{label:Object(O.__)("Open in new tab"),onChange:function(e){var t=function(e){var t=e?"_blank":void 0;return{linkTarget:t,rel:t||d?D(d):void 0}}(e);n(t)},checked:"_blank"===l}),Object(u.createElement)(h.TextControl,{label:Object(O.__)("Link Rel"),value:D(d)||"",onChange:function(e){n({rel:e})},onKeyPress:B,onKeyDown:x}),Object(u.createElement)(h.TextControl,{label:Object(O.__)("Link CSS Class"),value:s||"",onKeyPress:B,onKeyDown:x,onChange:function(e){n({linkClass:e})}})),V=null!==w?w:r,H=(Object(b.find)(L(),["linkDestination",t])||{}).title;return Object(u.createElement)(u.Fragment,null,Object(u.createElement)(h.ToolbarButton,{icon:cb.a,className:"components-toolbar__control",label:r?Object(O.__)("Edit link"):Object(O.__)("Insert link"),"aria-expanded":m,onClick:g}),m&&Object(u.createElement)(Wf,{onFocusOutside:R(),onClose:N,renderSettings:function(){return F},additionalControls:!V&&Object(u.createElement)(h.NavigableMenu,null,Object(b.map)(L(),(function(e){return Object(u.createElement)(h.MenuItem,{key:e.linkDestination,icon:e.icon,onClick:function(){var t,r,o;S(null),t=e.url,o=L(),r=t?(Object(b.find)(o,(function(e){return e.url===t}))||{linkDestination:"custom"}).linkDestination:"none",n({linkDestination:r,href:t}),T()}},e.title)})))},(!r||y)&&Object(u.createElement)(Wf.LinkEditor,{className:"block-editor-format-toolbar__link-container-content",value:V,onChangeInputValue:S,onKeyDown:x,onKeyPress:B,onSubmit:A(),autocompleteRef:I}),r&&!y&&Object(u.createElement)(u.Fragment,null,Object(u.createElement)(Wf.LinkViewer,{className:"block-editor-format-toolbar__link-container-content",onKeyPress:B,url:r,onEditLinkClick:P,urlLabel:H}),Object(u.createElement)(h.Button,{icon:sb.a,label:Object(O.__)("Remove link"),onClick:M}))))},bb=n(129);function pb(e){var t=e.children,n=e.className,r=e.isEnabled,o=vo
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=403)}([function(e,t){e.exports=window.wp.element},function(e,t){e.exports=window.wp.i18n},function(e,t){e.exports=window.lodash},function(e,t){e.exports=window.wp.components},function(e,t){e.exports=window.wp.data},,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}))},function(e,t){e.exports=window.wp.primitives},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}))},function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(39);var o=n(29),c=n(40);function i(e,t){return Object(r.a)(e)||function(e,t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e)){var n=[],r=!0,o=!1,c=void 0;try{for(var i,a=e[Symbol.iterator]();!(r=(i=a.next()).done)&&(n.push(i.value),!t||n.length!==t);r=!0);}catch(e){o=!0,c=e}finally{try{r||null==a.return||a.return()}finally{if(o)throw c}}return n}}(e,t)||Object(o.a)(e,t)||Object(c.a)()}},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)}()},function(e,t){e.exports=window.React},function(e,t){e.exports=window.wp.blocks},function(e,t){e.exports=window.wp.compose},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}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 c(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){r(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}function i(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}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}function l(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,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)?a(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}return(n=e[Symbol.iterator]()).next.bind(n)}n.d(t,"a",(function(){return i})),n.d(t,"b",(function(){return c})),n.d(t,"c",(function(){return l}))},function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(45);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}},function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(27);var o=n(38),c=n(29);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.")}()}},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}))},function(e,t){e.exports=window.regeneratorRuntime},function(e,t){e.exports=window.wp.keycodes},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}))},,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}))},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}))},function(e,t,n){"use strict";function r(e,t){return(r=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}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&&r(e,t)}n.d(t,"a",(function(){return o}))},function(e,t,n){"use strict";n.d(t,"a",(function(){return c}));var r=n(36),o=n(17);function c(e,t){return!t||"object"!==Object(r.a)(t)&&"function"!=typeof t?Object(o.a)(e):t}},function(e,t){e.exports=window.wp.richText},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}))},function(e,t){e.exports=window.wp.url},function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(27);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}}},function(e,t,n){e.exports=n(143)()},function(e,t){e.exports=window.wp.dom},function(e,t){e.exports=window.wp.hooks},,,function(e,t){e.exports=window.wp.deprecated},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}))},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}))},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}))},function(e,t,n){"use strict";function r(e){if(Array.isArray(e))return e}n.d(t,"a",(function(){return r}))},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}))},,,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}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 c(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){r(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}function i(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}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}function l(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,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)?a(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}return(n=e[Symbol.iterator]()).next.bind(n)}n.d(t,"a",(function(){return c})),n.d(t,"b",(function(){return i})),n.d(t,"c",(function(){return l}))},function(e,t,n){"use strict";n.d(t,"a",(function(){return c}));var r=n(11),o=n(57);function c(e){var t=Object(r.useRef)(e);return Object(o.a)((function(){t.current=e})),t}},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}))},function(e,t){e.exports=window.wp.blob},function(e,t,n){"use strict";n.d(t,"a",(function(){return l}));var r=n(11),o=n(63);function c(e,t){Object(r.useDebugValue)(e);var n=Object(r.useContext)(o.a);return null!=n[e]?n[e]:t}var i=n(43);var a=n(51);function l(e){var t,n,o,l=(o=e.compose,Array.isArray(o)?o:void 0!==o?[o]:[]),u=function(t,n){if(e.useOptions&&(t=e.useOptions(t,n)),e.name&&(t=function(e,t,n){void 0===t&&(t={}),void 0===n&&(n={});var o="use"+e+"Options";Object(r.useDebugValue)(o);var a=c(o);return a?Object(i.a)(Object(i.a)({},t),a(t,n)):t}(e.name,t,n)),e.compose)for(var o,a=Object(i.c)(l);!(o=a()).done;){t=o.value.__useOptions(t,n)}return t},s=function(t,n,o){if(void 0===t&&(t={}),void 0===n&&(n={}),void 0===o&&(o=!1),o||(t=u(t,n)),e.useProps&&(n=e.useProps(t,n)),e.name&&(n=function(e,t,n){void 0===t&&(t={}),void 0===n&&(n={});var o="use"+e+"Props";Object(r.useDebugValue)(o);var i=c(o);return i?i(t,n):n}(e.name,t,n)),e.compose)if(e.useComposeOptions&&(t=e.useComposeOptions(t,n)),e.useComposeProps)n=e.useComposeProps(t,n);else for(var a,s=Object(i.c)(l);!(a=s()).done;){n=(0,a.value)(t,n,!0)}var d={},b=n||{};for(var f in b)void 0!==b[f]&&(d[f]=b[f]);return d};s.__useOptions=u;var d=l.reduce((function(e,t){return e.push.apply(e,t.__keys||[]),e}),[]);return s.__keys=[].concat(d,(null===(t=e.useState)||void 0===t?void 0:t.__keys)||[],e.keys||[]),s.unstable_propsAreEqual=e.propsAreEqual||(null===(n=l[0])||void 0===n?void 0:n.unstable_propsAreEqual)||a.a,s}},function(e,t,n){"use strict";n.d(t,"a",(function(){return l}));var r=n(11),o=n(43),c=n(77);function i(e,t){for(var n={},r={},o=0,c=Object.keys(e);o<c.length;o++){var i=c[o];t.indexOf(i)>=0?n[i]=e[i]:r[i]=e[i]}return[n,r]}var a=n(51);function l(e){var t,n=e.as,l=e.useHook,u=e.memo,s=e.propsAreEqual,d=void 0===s?null==l?void 0:l.unstable_propsAreEqual:s,b=e.keys,f=void 0===b?(null==l?void 0:l.__keys)||[]:b,p=e.useCreateElement,m=void 0===p?c.a:p,v=function(e,t){var r=e.as,c=void 0===r?n:r,a=Object(o.b)(e,["as"]);if(l){var u,s=i(a,f),d=s[0],b=s[1],p=l(d,Object(o.a)({ref:t},b)),v=p.wrapElement,O=Object(o.b)(p,["wrapElement"]),g=(null===(u=c.render)||void 0===u?void 0:u.__keys)||c.__keys,h=g&&i(a,g)[0],j=h?Object(o.a)(Object(o.a)({},O),h):O,k=m(c,j);return v?v(k):k}return m(c,Object(o.a)({ref:t},a))};return t=v,v=Object(r.forwardRef)(t),u&&(v=function(e,t){return Object(r.memo)(e,t)}(v,d)),v.__keys=f,v.unstable_propsAreEqual=d||a.a,v}},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 u(){n=o?new WeakMap:i()}function s(){var n,r,o,c,i,u=arguments.length;for(c=new Array(u),o=0;o<u;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,u=n,s=!0;for(t=0;t<e.length;t++){if(o=e[t],!(l=o)||"object"!=typeof l){s=!1;break}u.has(o)?u=u.get(o):(c=new WeakMap,u.set(o,c),u=c)}return u.has(r)||((a=i()).isUniqueByDependants=s,u.set(r,a)),u.get(r)}:function(){return n},s.getDependants=t,s.clear=u,u(),s}},function(e,t,n){"use strict";function r(e){return e?e.ownerDocument||e:window.document}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";function r(e,t){if(e===t)return!0;if(!e)return!1;if(!t)return!1;if("object"!=typeof e)return!1;if("object"!=typeof t)return!1;var n=Object.keys(e),r=Object.keys(t),o=n.length;if(r.length!==o)return!1;for(var c=0,i=n;c<i.length;c++){var a=i[c];if(e[a]!==t[a])return!1}return!0}n.d(t,"a",(function(){return r}))},,function(e,t){e.exports=window.wp.a11y},function(e,t,n){"use strict";function r(e){return e.target===e.currentTarget}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";n.d(t,"a",(function(){return b})),n.d(t,"b",(function(){return O})),n.d(t,"c",(function(){return p})),n.d(t,"d",(function(){return f})),n.d(t,"e",(function(){return h})),n.d(t,"f",(function(){return u})),n.d(t,"g",(function(){return S}));var r=n(14),o=n(11),c=n(57),i=n(60),a=n(61),l=n(64);function u(e){return e.slice().reverse()}function s(e,t){return Boolean(t.compareDocumentPosition(e)&Node.DOCUMENT_POSITION_PRECEDING)}function d(e,t){return e.findIndex((function(e){return!(!e.ref.current||!t.ref.current)&&s(t.ref.current,e.ref.current)}))}function b(e,t){return t?e.find((function(e){return!e.disabled&&e.id!==t})):e.find((function(e){return!e.disabled}))}function f(e,t){if(t)return null==e?void 0:e.find((function(e){return e.id===t&&!e.disabled}))}function p(e){for(var t,n=[[]],o=function(){var e=t.value,r=n.find((function(t){return!t[0]||t[0].groupId===e.groupId}));r?r.push(e):n.push([e])},c=Object(r.c)(e);!(t=c()).done;)o();return n}function m(e){for(var t,n=0,o=Object(r.c)(e);!(t=o()).done;){var c=t.value.length;c>n&&(n=c)}return n}function v(e){for(var t=p(e),n=m(t),o=[],c=0;c<n;c+=1)for(var i,a=Object(r.c)(t);!(i=a()).done;){var l=i.value;l[c]&&o.push(Object(r.b)(Object(r.b)({},l[c]),{},{groupId:l[c].groupId?""+c:void 0}))}return o}function O(e){for(var t,n=[],o=Object(r.c)(e);!(t=o()).done;){var c=t.value;n.push.apply(n,c)}return n}function g(e){for(var t,n=m(e),o=Object(r.c)(e);!(t=o()).done;){var c=t.value;if(c.length<n)for(var i=0;i<n;i+=1)c[i]||(c[i]={id:"__EMPTY_ITEM__",disabled:!0,ref:{current:null},groupId:c[i-1].groupId})}return e}function h(e,t){var n;return t||null===t?t:e.currentId||null===e.currentId?e.currentId:null===(n=b(e.items||[]))||void 0===n?void 0:n.id}var j={id:null,ref:{current:null}};function k(e,t){return e.filter((function(e){return e.groupId===t}))}var y={horizontal:"vertical",vertical:"horizontal"};function _(e,t,n){return n in e?[].concat(e.slice(0,n),[t],e.slice(n)):[].concat(e,[t])}function E(e){var t=e.slice(),n=!1;return t.sort((function(e,t){var r=e.ref.current,o=t.ref.current;return r&&o&&s(r,o)?(n=!0,-1):0})),n?t:e}function C(e,t){var n=e.unstable_virtual,o=e.rtl,c=e.orientation,i=e.items,l=e.groups,s=e.currentId,m=e.loop,w=e.wrap,S=e.pastIds,I=e.unstable_moves,B=e.initialVirtual,x=e.initialRTL,P=e.initialOrientation,T=e.initialCurrentId,N=e.initialLoop,D=e.initialWrap,R=e.hasSetCurrentId;switch(t.type){case"registerGroup":var A=t.group;if(0===l.length)return Object(r.b)(Object(r.b)({},e),{},{groups:[A]});var M=d(l,A);return Object(r.b)(Object(r.b)({},e),{},{groups:_(l,A,M)});case"unregisterGroup":var L=t.id,F=l.filter((function(e){return e.id!==L}));return F.length===l.length?e:Object(r.b)(Object(r.b)({},e),{},{groups:F});case"registerItem":var V,H=t.item,z=l.find((function(e){var t;return null===(t=e.ref.current)||void 0===t?void 0:t.contains(H.ref.current)})),U=Object(r.b)({groupId:null==z?void 0:z.id},H),G=d(i,U),W=Object(r.b)(Object(r.b)({},e),{},{items:_(i,U,G)});return R||I||void 0!==T?W:Object(r.b)(Object(r.b)({},W),{},{currentId:null===(V=b(W.items))||void 0===V?void 0:V.id});case"unregisterItem":var K=t.id,q=i.filter((function(e){return e.id!==K}));if(q.length===i.length)return e;var $=S.filter((function(e){return e!==K})),Y=Object(r.b)(Object(r.b)({},e),{},{pastIds:$,items:q});if(s&&s===K){var X=h(Object(r.b)(Object(r.b)({},Y),{},{currentId:$[0]}));return Object(r.b)(Object(r.b)({},Y),{},{currentId:X})}return Y;case"move":var Q=t.id;if(void 0===Q)return e;var Z=S.filter((function(e){return e!==s&&e!==Q})),J=s?[s].concat(Z):Z,ee=Object(r.b)(Object(r.b)({},e),{},{pastIds:J});if(null===Q)return Object(r.b)(Object(r.b)({},ee),{},{unstable_moves:I+1,currentId:h(ee,Q)});var te=f(i,Q);return Object(r.b)(Object(r.b)({},ee),{},{unstable_moves:te?I+1:I,currentId:h(ee,null==te?void 0:te.id)});case"next":if(null==s)return C(e,Object(r.b)(Object(r.b)({},t),{},{type:"first"}));var ne=o&&"vertical"!==c,re=ne?u(i):i,oe=re.find((function(e){return e.id===s}));if(!oe)return C(e,Object(r.b)(Object(r.b)({},t),{},{type:"first"}));var ce=!!oe.groupId,ie=re.indexOf(oe),ae=re.slice(ie+1),le=k(ae,oe.groupId);if(t.allTheWay){var ue=b(ne?k(re,oe.groupId):u(le));return C(e,Object(r.b)(Object(r.b)({},t),{},{type:"move",id:null==ue?void 0:ue.id}))}var se=function(e){return e&&y[e]}(ce?c||"horizontal":c),de=m&&m!==se,be=ce&&w&&w!==se,fe=t.hasNullItem||!ce&&de&&null===T;if(de){var pe=b(function(e,t,n){var r=e.findIndex((function(e){return e.id===t}));return[].concat(e.slice(r+1),n?[j]:[],e.slice(0,r))}(be&&!fe?re:k(re,oe.groupId),s,fe),s);return C(e,Object(r.b)(Object(r.b)({},t),{},{type:"move",id:null==pe?void 0:pe.id}))}if(be){var me=b(fe?le:ae,s),ve=fe?(null==me?void 0:me.id)||null:null==me?void 0:me.id;return C(e,Object(r.b)(Object(r.b)({},t),{},{type:"move",id:ve}))}var Oe=b(le,s);return C(e,!Oe&&fe?Object(r.b)(Object(r.b)({},t),{},{type:"move",id:null}):Object(r.b)(Object(r.b)({},t),{},{type:"move",id:null==Oe?void 0:Oe.id}));case"previous":var ge=!!!l.length&&null===T,he=C(Object(r.b)(Object(r.b)({},e),{},{items:u(i)}),Object(r.b)(Object(r.b)({},t),{},{type:"next",hasNullItem:ge}));return Object(r.b)(Object(r.b)({},he),{},{items:i});case"down":var je=v(O(g(p(i)))),ke=m&&"horizontal"!==m&&null===T,ye=C(Object(r.b)(Object(r.b)({},e),{},{orientation:"vertical",items:je}),Object(r.b)(Object(r.b)({},t),{},{type:"next",hasNullItem:ke}));return Object(r.b)(Object(r.b)({},ye),{},{orientation:c,items:i});case"up":var _e=v(u(O(g(p(i))))),Ee=null===T,Ce=C(Object(r.b)(Object(r.b)({},e),{},{orientation:"vertical",items:_e}),Object(r.b)(Object(r.b)({},t),{},{type:"next",hasNullItem:Ee}));return Object(r.b)(Object(r.b)({},Ce),{},{orientation:c,items:i});case"first":var we=b(i);return C(e,Object(r.b)(Object(r.b)({},t),{},{type:"move",id:null==we?void 0:we.id}));case"last":var Se=C(Object(r.b)(Object(r.b)({},e),{},{items:u(i)}),Object(r.b)(Object(r.b)({},t),{},{type:"first"}));return Object(r.b)(Object(r.b)({},Se),{},{items:i});case"sort":return Object(r.b)(Object(r.b)({},e),{},{items:E(i),groups:E(l)});case"setVirtual":return Object(r.b)(Object(r.b)({},e),{},{unstable_virtual:Object(a.a)(t.virtual,n)});case"setRTL":return Object(r.b)(Object(r.b)({},e),{},{rtl:Object(a.a)(t.rtl,o)});case"setOrientation":return Object(r.b)(Object(r.b)({},e),{},{orientation:Object(a.a)(t.orientation,c)});case"setCurrentId":var Ie=h(Object(r.b)(Object(r.b)({},e),{},{currentId:Object(a.a)(t.currentId,s)}));return Object(r.b)(Object(r.b)({},e),{},{currentId:Ie,hasSetCurrentId:!0});case"setLoop":return Object(r.b)(Object(r.b)({},e),{},{loop:Object(a.a)(t.loop,m)});case"setWrap":return Object(r.b)(Object(r.b)({},e),{},{wrap:Object(a.a)(t.wrap,w)});case"reset":return Object(r.b)(Object(r.b)({},e),{},{unstable_virtual:B,rtl:x,orientation:P,currentId:h(Object(r.b)(Object(r.b)({},e),{},{currentId:T})),loop:N,wrap:D,unstable_moves:0,pastIds:[]});default:throw new Error}}function w(e){return Object(o.useCallback)(e,[])}function S(e){void 0===e&&(e={});var t=Object(i.a)(e),n=t.unstable_virtual,a=void 0!==n&&n,u=t.rtl,s=void 0!==u&&u,d=t.orientation,b=t.currentId,f=t.loop,p=void 0!==f&&f,m=t.wrap,v=void 0!==m&&m,O=Object(r.a)(t,["unstable_virtual","rtl","orientation","currentId","loop","wrap"]),g=Object(o.useReducer)(C,{unstable_virtual:a,rtl:s,orientation:d,items:[],groups:[],currentId:b,loop:p,wrap:v,unstable_moves:0,pastIds:[],initialVirtual:a,initialRTL:s,initialOrientation:d,initialCurrentId:b,initialLoop:p,initialWrap:v}),h=g[0],j=(h.pastIds,h.initialVirtual,h.initialRTL,h.initialOrientation,h.initialCurrentId,h.initialLoop,h.initialWrap,h.hasSetCurrentId,Object(r.a)(h,["pastIds","initialVirtual","initialRTL","initialOrientation","initialCurrentId","initialLoop","initialWrap","hasSetCurrentId"])),k=g[1],y=Object(o.useState)(!1),_=y[0],E=y[1],S=Object(l.a)(O),I=function(){var e=Object(o.useRef)(!1);return Object(c.a)((function(){return function(){e.current=!0}}),[]),e}();return Object(r.b)(Object(r.b)(Object(r.b)({},S),j),{},{unstable_hasActiveWidget:_,unstable_setHasActiveWidget:E,registerItem:w((function(e){I.current||k({type:"registerItem",item:e})})),unregisterItem:w((function(e){I.current||k({type:"unregisterItem",id:e})})),registerGroup:w((function(e){I.current||k({type:"registerGroup",group:e})})),unregisterGroup:w((function(e){I.current||k({type:"unregisterGroup",id:e})})),move:w((function(e){return k({type:"move",id:e})})),next:w((function(e){return k({type:"next",allTheWay:e})})),previous:w((function(e){return k({type:"previous",allTheWay:e})})),up:w((function(e){return k({type:"up",allTheWay:e})})),down:w((function(e){return k({type:"down",allTheWay:e})})),first:w((function(){return k({type:"first"})})),last:w((function(){return k({type:"last"})})),unstable_sort:w((function(){return k({type:"sort"})})),unstable_setVirtual:w((function(e){return k({type:"setVirtual",virtual:e})})),setRTL:w((function(e){return k({type:"setRTL",rtl:e})})),setOrientation:w((function(e){return k({type:"setOrientation",orientation:e})})),setCurrentId:w((function(e){return k({type:"setCurrentId",currentId:e})})),setLoop:w((function(e){return k({type:"setLoop",loop:e})})),setWrap:w((function(e){return k({type:"setWrap",wrap:e})})),reset:w((function(){return k({type:"reset"})}))})}var I=[].concat(l.a.__keys,["unstable_virtual","rtl","orientation","items","groups","currentId","loop","wrap","unstable_moves","unstable_hasActiveWidget","registerItem","unregisterItem","registerGroup","unregisterGroup","move","next","previous","up","down","first","last","unstable_sort","unstable_setVirtual","setRTL","setOrientation","setCurrentId","setLoop","setWrap","reset","unstable_setHasActiveWidget"]);S.__keys=I},function(e,t){e.exports=window.wp.keyboardShortcuts},function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(11),o="undefined"==typeof window?r.useEffect:r.useLayoutEffect},function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(50);function o(e){return Object(r.a)(e).activeElement}},,function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(11);function o(e){return Object(r.useState)(e)[0]}},function(e,t,n){"use strict";function r(e,t){return function(e){return"function"==typeof e}(e)?e(t):e}n.d(t,"a",(function(){return r}))},,function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(11),o=Object(r.createContext)({})},function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(11),o=n(60),c=n(65);function i(e){void 0===e&&(e={});var t=Object(o.a)(e).baseId,n=Object(r.useContext)(c.a),i=Object(r.useRef)(0),a=Object(r.useState)((function(){return t||n()}));return{baseId:a[0],unstable_setBaseId:a[1],unstable_idCountRef:i}}i.__keys=["baseId","unstable_setBaseId","unstable_idCountRef"]},function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(11);var o=Object(r.createContext)((function(e){return void 0===e&&(e="id"),(e?e+"-":"")+Math.random().toString(32).substr(2,6)}))},function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var r=n(14),o=n(48),c=n(47),i=n(51),a=Object(c.a)({name:"Box",keys:["unstable_system"],propsAreEqual:function(e,t){var n=e.unstable_system,o=Object(r.a)(e,["unstable_system"]),c=t.unstable_system,a=Object(r.a)(t,["unstable_system"]);return!(n!==c&&!Object(i.a)(n,c))&&Object(i.a)(o,a)}});Object(o.a)({as:"div",useHook:a})},function(e,t,n){"use strict";n.d(t,"a",(function(){return c}));var r=n(11);function o(e,t){void 0===t&&(t=null),e&&("function"==typeof e?e(t):e.current=t)}function c(e,t){return Object(r.useMemo)((function(){return null==e&&null==t?null:function(n){o(e,n),o(t,n)}}),[e,t])}},,,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}},function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(58);function o(e){var t=Object(r.a)(e);if(!t)return!1;if(e.contains(t))return!0;var n=t.getAttribute("aria-activedescendant");return!!n&&(n===e.id||!!e.querySelector("#"+n))}},function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=["button","color","file","image","reset","submit"];function o(e){if("BUTTON"===e.tagName)return!0;if("INPUT"===e.tagName){var t=e;return-1!==r.indexOf(t.type)}return!1}},function(e,t,n){"use strict";function r(e,t){return"matches"in e?e.matches(t):"msMatchesSelector"in e?e.msMatchesSelector(t):e.webkitMatchesSelector(t)}function o(e,t){if("closest"in e)return e.closest(t);do{if(r(e,t))return e;e=e.parentElement||e.parentNode}while(null!==e&&1===e.nodeType);return null}n.d(t,"a",(function(){return s})),n.d(t,"b",(function(){return l}));var c=n(58),i="input:not([type='hidden']):not([disabled]), select:not([disabled]), textarea:not([disabled]), a[href], button:not([disabled]), [tabindex], iframe, object, embed, area[href], audio[controls], video[controls], [contenteditable]:not([contenteditable='false'])";function a(e){return r(e,i)&&function(e){return e.offsetWidth>0||e.offsetHeight>0||e.getClientRects().length>0}(e)}function l(e){for(;e&&!a(e);)e=o(e,i);return e}function u(e){return Object(c.a)(e)===e}function s(e,t){var n=void 0===t?{}:t,r=n.isActive,o=void 0===r?u:r,c=n.preventScroll;return o(e)?-1:(e.focus({preventScroll:c}),o(e)?-1:requestAnimationFrame((function(){e.focus({preventScroll:c})})))}},function(e,t,n){"use strict";function r(e){return t=e.currentTarget,n=e.target,!(t===n||t.contains(n));var t,n}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";n.d(t,"a",(function(){return h}));var r=n(14),o=n(48),c=n(47),i=n(66),a=n(11),l=n(67),u=n(72),s=(n(81),n(44)),d=n(57),b=n(71),f=n(74),p=n(58),m=n(73);function v(e){return"undefined"!=typeof window&&-1!==window.navigator.userAgent.indexOf(e)}var O=v("Mac")&&!v("Chrome")&&(v("Safari")||v("Firefox"));function g(e){Object(b.a)(e)||e.focus()}var h=Object(c.a)({name:"Tabbable",compose:i.a,keys:["disabled","focusable"],useOptions:function(e,t){var n=t.disabled;return Object(r.b)({disabled:n},e)},useProps:function(e,t){var n=t.ref,o=t.tabIndex,c=t.onClick,i=t.onMouseDown,b=t.style,v=Object(r.a)(t,["ref","tabIndex","onClick","onMouseDown","style"]),h=Object(a.useRef)(null),j=Object(s.a)(c),k=Object(s.a)(i),y=e.disabled&&!e.focusable,_=Object(a.useState)(!0),E=_[0],C=_[1],w=E?o:o||0,S=e.disabled?Object(r.b)({pointerEvents:"none"},b):b,I=function(){if(O){var e=Object(a.useState)(null),t=e[0],n=e[1];return Object(a.useEffect)((function(){t&&(g(t),n(null))}),[t]),Object(a.useCallback)((function(e){var t=e.currentTarget;if(!Object(f.a)(e)&&Object(u.a)(t)){var r=Object(p.a)(t);if(r){var o="BODY"===r.tagName,c=Object(m.b)(t.parentElement);if(r===c||o&&!c)n(t);else if(c){c.addEventListener("focusin",(function(){return n(t)}),{once:!0})}else{r.addEventListener("blur",(function(){return g(t)}),{once:!0})}}}}),[])}}();Object(d.a)((function(){var e,t=h.current;t&&("BUTTON"!==(e=t).tagName&&"INPUT"!==e.tagName&&"SELECT"!==e.tagName&&"TEXTAREA"!==e.tagName&&"A"!==e.tagName&&"AUDIO"!==e.tagName&&"VIDEO"!==e.tagName&&C(!1))}),[]);var B=Object(a.useCallback)((function(t){var n;if(e.disabled)return t.stopPropagation(),void t.preventDefault();null===(n=j.current)||void 0===n||n.call(j,t)}),[e.disabled]),x=Object(a.useCallback)((function(t){var n;if(e.disabled)return t.stopPropagation(),void t.preventDefault();null===(n=k.current)||void 0===n||n.call(k,t),t.defaultPrevented||null==I||I(t)}),[e.disabled,I]);return Object(r.b)({ref:Object(l.a)(h,n),style:S,tabIndex:y?void 0:w,disabled:!(!y||!E)||void 0,"aria-disabled":!!e.disabled||void 0,onClick:B,onMouseDown:x},v)}});Object(o.a)({as:"div",useHook:h})},function(e,t){e.exports=window.wp.htmlEntities},function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(11),o=n(63),c=n(43);var i=function(e,t,n){void 0===n&&(n=t.children);var i=Object(r.useContext)(o.a);if(i.useCreateElement)return i.useCreateElement(e,t,n);if("string"==typeof e&&function(e){return"function"==typeof e}(n)){t.children;return n(Object(c.b)(t,["children"]))}return Object(r.createElement)(e,t,n)}},function(e,t){e.exports=window.wp.isShallowEqual},function(e,t,n){var r;!function(o){var c=/^\s+/,i=/\s+$/,a=0,l=o.round,u=o.min,s=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={r:0,g:0,b:0},n=1,r=null,a=null,l=null,d=!1,b=!1;"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"};if(t=U.rgb.exec(e))return{r:t[1],g:t[2],b:t[3]};if(t=U.rgba.exec(e))return{r:t[1],g:t[2],b:t[3],a:t[4]};if(t=U.hsl.exec(e))return{h:t[1],s:t[2],l:t[3]};if(t=U.hsla.exec(e))return{h:t[1],s:t[2],l:t[3],a:t[4]};if(t=U.hsv.exec(e))return{h:t[1],s:t[2],v:t[3]};if(t=U.hsva.exec(e))return{h:t[1],s:t[2],v:t[3],a:t[4]};if(t=U.hex8.exec(e))return{r:R(t[1]),g:R(t[2]),b:R(t[3]),a:F(t[4]),format:n?"name":"hex8"};if(t=U.hex6.exec(e))return{r:R(t[1]),g:R(t[2]),b:R(t[3]),format:n?"name":"hex"};if(t=U.hex4.exec(e))return{r:R(t[1]+""+t[1]),g:R(t[2]+""+t[2]),b:R(t[3]+""+t[3]),a:F(t[4]+""+t[4]),format:n?"name":"hex8"};if(t=U.hex3.exec(e))return{r:R(t[1]+""+t[1]),g:R(t[2]+""+t[2]),b:R(t[3]+""+t[3]),format:n?"name":"hex"};return!1}(e));"object"==typeof e&&(G(e.r)&&G(e.g)&&G(e.b)?(f=e.r,p=e.g,m=e.b,t={r:255*N(f,255),g:255*N(p,255),b:255*N(m,255)},d=!0,b="%"===String(e.r).substr(-1)?"prgb":"rgb"):G(e.h)&&G(e.s)&&G(e.v)?(r=M(e.s),a=M(e.v),t=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),u=r%6;return{r:255*[n,a,i,i,l,n][u],g:255*[l,n,n,a,i,i][u],b:255*[i,i,l,n,n,a][u]}}(e.h,r,a),d=!0,b="hsv"):G(e.h)&&G(e.s)&&G(e.l)&&(r=M(e.s),l=M(e.l),t=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,r,l),d=!0,b="hsl"),e.hasOwnProperty("a")&&(n=e.a));var f,p,m;return n=T(n),{ok:d,format:e.format||b,r:u(255,s(t.r,0)),g:u(255,s(t.g,0)),b:u(255,s(t.b,0)),a:n}}(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=s(e,t,n),i=u(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=s(e,t,n),i=u(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=[A(l(e).toString(16)),A(l(t).toString(16)),A(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[A(L(r)),A(l(e).toString(16)),A(l(t).toString(16)),A(l(n).toString(16))].join("")}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 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 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=s(0,u(255,n.r-l(-t/100*255))),n.g=s(0,u(255,n.g-l(-t/100*255))),n.b=s(0,u(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 C(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 w(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 I(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 B(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=[A(l(e).toString(16)),A(l(t).toString(16)),A(l(n).toString(16)),A(L(r))];if(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))return c[0].charAt(0)+c[1].charAt(0)+c[2].charAt(0)+c[3].charAt(0);return 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(O,arguments)},saturate:function(){return this._applyModification(g,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(I,arguments)},complement:function(){return this._applyCombination(E,arguments)},monochromatic:function(){return this._applyCombination(B,arguments)},splitcomplement:function(){return this._applyCombination(S,arguments)},triad:function(){return this._applyCombination(C,arguments)},tetrad:function(){return this._applyCombination(w,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]:M(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=b.readability(e,t);switch(o=!1,(r=function(e){var t,n;t=((e=e||{level:"AA",size:"small"}).level||"AA").toUpperCase(),n=(e.size||"small").toLowerCase(),"AA"!==t&&"AAA"!==t&&(t="AA");"small"!==n&&"large"!==n&&(n="small");return{level:t,size:n}}(n)).level+r.size){case"AAsmall":case"AAAlarge":o=c>=4.5;break;case"AAlarge":o=c>=3;break;case"AAAsmall":o=c>=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 u=0;u<t.length;u++)(r=b.readability(e,t[u]))>l&&(l=r,a=b(t[u]));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=u(t,s(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 u(1,s(0,e))}function R(e){return parseInt(e,16)}function A(e){return 1==e.length?"0"+e:""+e}function M(e){return e<=1&&(e=100*e+"%"),e}function L(e){return o.round(255*parseFloat(e)).toString(16)}function F(e){return R(e)/255}var V,H,z,U=(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 G(e){return!!U.CSS_UNIT.exec(e)}e.exports?e.exports=b:void 0===(r=function(){return b}.call(t,n,t,e))||(e.exports=r)}(Math)},,function(e,t,n){"use strict";n(97),n(11)},function(e,t,n){"use strict";function r(e){var t=void 0===e?{}:e,n=t.keyMap,r=t.onKey,o=t.stopPropagation,c=t.onKeyDown,i=t.shouldKeyDown,a=void 0===i?function(){return!0}:i,l=t.preventDefault,u=void 0===l||l;return function(e){if(n){var t,i="function"==typeof n?n(e):n,l="function"==typeof u?u(e):u,s="function"==typeof o?o(e):o;if(e.key in i){var d=i[e.key];if("function"==typeof d&&a(e))return l&&e.preventDefault(),s&&e.stopPropagation(),r&&r(e),void d(e)}if(c&&"current"in c)null===(t=c.current)||void 0===t||t.call(c,e);else null==c||c(e)}}}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";n.d(t,"a",(function(){return d}));var r=n(14),o=n(48),c=n(47),i=n(11),a=n(72),l=(n(81),n(44)),u=n(54),s=n(75);var d=Object(c.a)({name:"Clickable",compose:s.a,keys:["unstable_clickOnEnter","unstable_clickOnSpace"],useOptions:function(e){var t=e.unstable_clickOnEnter,n=void 0===t||t,o=e.unstable_clickOnSpace,c=void 0===o||o,i=Object(r.a)(e,["unstable_clickOnEnter","unstable_clickOnSpace"]);return Object(r.b)({unstable_clickOnEnter:n,unstable_clickOnSpace:c},i)},useProps:function(e,t){var n=t.onKeyDown,o=t.onKeyUp,c=Object(r.a)(t,["onKeyDown","onKeyUp"]),s=Object(i.useState)(!1),d=s[0],b=s[1],f=Object(l.a)(n),p=Object(l.a)(o),m=Object(i.useCallback)((function(t){var n;if(null===(n=f.current)||void 0===n||n.call(f,t),!t.defaultPrevented&&!e.disabled&&!t.metaKey&&Object(u.a)(t)){var r=e.unstable_clickOnEnter&&"Enter"===t.key,o=e.unstable_clickOnSpace&&" "===t.key;if(r||o){if(function(e){var t=e.currentTarget;return!!e.isTrusted&&(Object(a.a)(t)||"INPUT"===t.tagName||"TEXTAREA"===t.tagName||"A"===t.tagName||"SELECT"===t.tagName)}(t))return;t.preventDefault(),r?t.currentTarget.click():o&&b(!0)}}}),[e.disabled,e.unstable_clickOnEnter,e.unstable_clickOnSpace]),v=Object(i.useCallback)((function(t){var n;if(null===(n=p.current)||void 0===n||n.call(p,t),!t.defaultPrevented&&!e.disabled&&!t.metaKey){var r=e.unstable_clickOnSpace&&" "===t.key;d&&r&&(b(!1),t.currentTarget.click())}}),[e.disabled,e.unstable_clickOnSpace,d]);return Object(r.b)({"data-active":d||void 0,onKeyDown:m,onKeyUp:v},c)}});Object(o.a)({as:"button",memo:!0,useHook:d})},function(e,t){e.exports=window.wp.notices},,,function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(106);function o(e,t,n){return e.dispatchEvent(Object(r.a)(e,t,n))}},function(e,t,n){"use strict";function r(e){try{var t=e instanceof HTMLInputElement&&null!==e.selectionStart,n="TEXTAREA"===e.tagName,r="true"===e.contentEditable;return t||n||r||!1}catch(e){return!1}}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";function r(e,t){e.value=t}n.d(t,"a",(function(){return r}))},,function(e,t,n){"use strict";n.d(t,"a",(function(){return i})),n.d(t,"b",(function(){return a}));var r=n(2),o=n(0),c=Object(o.createContext)({name:"",isSelected:!1,focusedElement:null,setFocusedElement:r.noop,clientId:null}),i=c.Provider;function a(){return Object(o.useContext)(c)}},function(e,t,n){"use strict";n.d(t,"a",(function(){return u}));var r=n(14),o=n(48),c=n(47),i=n(11),a=n(65),l=n(64),u=Object(c.a)({useState:l.a,keys:["id"],useOptions:function(e,t){var n=Object(i.useContext)(a.a),o=Object(i.useState)((function(){return e.unstable_idCountRef?(e.unstable_idCountRef.current+=1,"-"+e.unstable_idCountRef.current):e.baseId?"-"+n(""):""}))[0],c=Object(i.useMemo)((function(){return e.baseId||n()}),[e.baseId,n]),l=t.id||e.id||""+c+o;return Object(r.b)(Object(r.b)({},e),{},{id:l})},useProps:function(e,t){return Object(r.b)({id:e.id},t)}});Object(o.a)({as:"div",useHook:u})},,,,,function(e,t,n){"use strict"},,function(e,t,n){"use strict";n.d(t,"a",(function(){return c}));var r=n(50);function o(e,t,n){if(void 0===n&&(n={}),"function"==typeof KeyboardEvent)return new KeyboardEvent(t,n);var o=Object(r.a)(e).createEvent("KeyboardEvent");return o.initKeyboardEvent(t,n.bubbles,n.cancelable,function(e){return Object(r.a)(e).defaultView||window}(e),n.key,n.location,n.ctrlKey,n.altKey,n.shiftKey,n.metaKey),o}function c(e,t,n){return e.dispatchEvent(o(e,t,n))}},function(e,t){e.exports=window.wp.warning},,,function(e,t,n){"use strict";t.__esModule=!0;var r=n(185);t.default=r.default},,function(e,t){e.exports=window.wp.viewport},function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(50);function o(e,t,n){var o,c;if(void 0===n&&(n={}),"function"==typeof Event)return new Event(t,n);var i=Object(r.a)(e).createEvent("Event");return i.initEvent(t,null===(o=n)||void 0===o?void 0:o.bubbles,null===(c=n)||void 0===c?void 0:c.cancelable),i}},function(e,t){var n,r,o=e.exports={};function c(){throw new Error("setTimeout has not been defined")}function i(){throw new Error("clearTimeout has not been defined")}function a(e){if(n===setTimeout)return setTimeout(e,0);if((n===c||!n)&&setTimeout)return n=setTimeout,setTimeout(e,0);try{return n(e,0)}catch(t){try{return n.call(null,e,0)}catch(t){return n.call(this,e,0)}}}!function(){try{n="function"==typeof setTimeout?setTimeout:c}catch(e){n=c}try{r="function"==typeof clearTimeout?clearTimeout:i}catch(e){r=i}}();var l,u=[],s=!1,d=-1;function b(){s&&l&&(s=!1,l.length?u=l.concat(u):d=-1,u.length&&f())}function f(){if(!s){var e=a(b);s=!0;for(var t=u.length;t;){for(l=u,u=[];++d<t;)l&&l[d].run();d=-1,t=u.length}l=null,s=!1,function(e){if(r===clearTimeout)return clearTimeout(e);if((r===i||!r)&&clearTimeout)return r=clearTimeout,clearTimeout(e);try{r(e)}catch(t){try{return r.call(null,e)}catch(t){return r.call(this,e)}}}(e)}}function p(e,t){this.fun=e,this.array=t}function m(){}o.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)t[n-1]=arguments[n];u.push(new p(e,t)),1!==u.length||s||a(f)},p.prototype.run=function(){this.fun.apply(null,this.array)},o.title="browser",o.browser=!0,o.env={},o.argv=[],o.version="",o.versions={},o.on=m,o.addListener=m,o.once=m,o.off=m,o.removeListener=m,o.removeAllListeners=m,o.emit=m,o.prependListener=m,o.prependOnceListener=m,o.listeners=function(e){return[]},o.binding=function(e){throw new Error("process.binding is not supported")},o.cwd=function(){return"/"},o.chdir=function(e){throw new Error("process.chdir is not supported")},o.umask=function(){return 0}},,,,,,function(e,t){e.exports=window.ReactDOM},,,,function(e,t,n){"use strict";n.d(t,"a",(function(){return E})),n.d(t,"b",(function(){return _}));var r=n(14),o=n(48),c=n(47),i=n(66),a=n(11),l=n(67),u=(n(81),n(44)),s=n(54),d=n(58),b=n(75),f=n(77),p=n(82),m=n(50),v=n(87),O=n(99),g=n(55),h="undefined"!=typeof window&&"msCrypto"in window;var j="undefined"!=typeof window&&"msCrypto"in window;function k(e,t,n){var r=Object(u.a)(n);return Object(a.useCallback)((function(n){var o;if(e&&function(e){return!!Object(s.a)(e)&&(!e.metaKey&&"Tab"!==e.key)}(n)){var c=null==t?void 0:t.ref.current;if(c&&(Object(O.a)(c,n.type,n),n.currentTarget.contains(c)))return n.stopPropagation(),void n.preventDefault()}null===(o=r.current)||void 0===o||o.call(r,n)}),[e,t])}function y(e,t){return null==e?void 0:e.some((function(e){return!!t&&e.ref.current===t}))}var _=Object(c.a)({name:"Composite",compose:[b.a],useState:g.g,useOptions:function(e){return Object(r.b)(Object(r.b)({},e),{},{currentId:Object(g.e)(e)})},useProps:function(e,t){var n=t.ref,o=t.onFocus,c=t.onBlur,i=t.onKeyDown,b=t.onKeyUp,f=Object(r.a)(t,["ref","onFocus","onBlur","onKeyDown","onKeyUp"]),O=Object(a.useRef)(null),_=Object(g.d)(e.items,e.currentId),E=Object(a.useRef)(void 0),C=Object(u.a)(o),w=Object(u.a)(c),S=j?function(e){var t=Object(a.useRef)(null);return Object(a.useEffect)((function(){var n=Object(m.a)(e.current),r=function(e){var n=e.target;t.current=n};return n.addEventListener("focus",r,!0),function(){n.removeEventListener("focus",r,!0)}}),[]),t}(O):void 0;Object(a.useEffect)((function(){var t=O.current;t&&e.unstable_moves&&!_&&t.focus()}),[e.unstable_moves,_]);var I=k(e.unstable_virtual,_,i),B=k(e.unstable_virtual,_,b),x=Object(a.useCallback)((function(t){var n;if(e.unstable_virtual){var r,o,c=(null==S?void 0:S.current)||t.relatedTarget,i=y(e.items,c);if(Object(s.a)(t)&&!i)return null===(r=C.current)||void 0===r||r.call(C,t),void(null==_||null===(o=_.ref.current)||void 0===o||o.focus());if(i)return void t.stopPropagation()}else if(Object(s.a)(t)){var a;null===(a=e.setCurrentId)||void 0===a||a.call(e,null)}null===(n=C.current)||void 0===n||n.call(C,t)}),[e.unstable_virtual,e.items,_,e.setCurrentId]),P=Object(a.useCallback)((function(t){var n;if(e.unstable_virtual){var r,o=y(e.items,t.target),c=function(e){return h?Object(d.a)(e.target):e.relatedTarget}(t),i=y(e.items,c);if(Object(s.a)(t)&&i)return(null===(r=E.current)||void 0===r?void 0:r.ref.current)&&Object(v.a)(E.current.ref.current,"blur",t),E.current=_,void t.stopPropagation();o?E.current=_:((null==_?void 0:_.ref.current)&&Object(v.a)(_.ref.current,"blur",t),E.current=void 0)}null===(n=w.current)||void 0===n||n.call(w,t)}),[e.unstable_virtual,e.items,_]),T=Object(a.useMemo)((function(){return Object(p.a)({onKeyDown:I,stopPropagation:!0,shouldKeyDown:function(t){return Object(s.a)(t)&&null===e.currentId},keyMap:function(){var t,n="horizontal"!==e.orientation,r="vertical"!==e.orientation,o=!!(null===(t=e.groups)||void 0===t?void 0:t.length),c=e.first&&function(){return e.first()},i=e.last&&function(){return e.last()};return{ArrowUp:(o||n)&&function(){if(o){var t,n=(c=e.items,Object(g.a)(Object(g.b)(Object(g.f)(Object(g.c)(c)))));if(null==n?void 0:n.id)null===(t=e.move)||void 0===t||t.call(e,n.id)}else{var r;null===(r=e.last)||void 0===r||r.call(e)}var c},ArrowRight:(o||r)&&c,ArrowDown:(o||n)&&c,ArrowLeft:(o||r)&&i,Home:c,End:i,PageUp:c,PageDown:i}}})}),[I,e.currentId,e.orientation,e.groups,e.items,e.move,e.last,e.first]);return Object(r.b)({ref:Object(l.a)(O,n),id:e.baseId,onFocus:x,onBlur:P,onKeyDown:T,onKeyUp:B,"aria-activedescendant":e.unstable_virtual&&(null==_?void 0:_.id)||void 0},f)},useComposeProps:function(e,t){t=Object(i.a)(e,t,!0);var n=Object(b.a)(e,t,!0);return e.unstable_virtual||null===e.currentId?n:Object(r.b)(Object(r.b)({},t),{},{ref:n.ref})}}),E=Object(o.a)({as:"div",useHook:_,useCreateElement:function(e,t,n){return Object(f.a)(e,t,n)}})},function(e,t,n){"use strict";n.d(t,"a",(function(){return y})),n.d(t,"b",(function(){return k}));var r=n(14),o=n(48),c=n(47),i=n(11),a=n(67),l=(n(81),n(44)),u=n(54),s=n(71),d=n(74),b=n(73),f=n(83),p=n(82),m=n(50),v=n(55),O=n(92),g=n(88),h=n(89);function j(e){return e.querySelector("[data-composite-item-widget]")}var k=Object(c.a)({name:"CompositeItem",compose:[f.a,O.a],useState:v.g,propsAreEqual:function(e,t){if(!t.id||e.id!==t.id)return f.a.unstable_propsAreEqual(e,t);var n=e.currentId,o=e.unstable_moves,c=Object(r.a)(e,["currentId","unstable_moves"]),i=t.currentId,a=t.unstable_moves,l=Object(r.a)(t,["currentId","unstable_moves"]);if(i!==n){if(t.id===i||t.id===n)return!1}else if(o!==a)return!1;return f.a.unstable_propsAreEqual(c,l)},useOptions:function(e){return Object(r.b)(Object(r.b)({},e),{},{id:e.id,currentId:Object(v.e)(e),unstable_clickOnSpace:!e.unstable_hasActiveWidget&&e.unstable_clickOnSpace})},useProps:function(e,t){var n,o=t.ref,c=t.tabIndex,f=void 0===c?0:c,v=t.onFocus,O=t.onBlur,k=t.onKeyDown,y=t.onClick,_=Object(r.a)(t,["ref","tabIndex","onFocus","onBlur","onKeyDown","onClick"]),E=Object(i.useRef)(null),C=e.id,w=e.disabled&&!e.focusable,S=e.currentId===C,I=Object(l.a)(S),B=Object(i.useRef)(!1),x=function(e){return Object(i.useMemo)((function(){var t;return null===(t=e.items)||void 0===t?void 0:t.find((function(t){return e.id&&t.id===e.id}))}),[e.items,e.id])}(e),P=Object(l.a)(v),T=Object(l.a)(O),N=Object(l.a)(k),D=Object(l.a)(y),R=!e.unstable_virtual&&!e.unstable_hasActiveWidget&&S||!(null===(n=e.items)||void 0===n?void 0:n.length);Object(i.useEffect)((function(){var t;if(C)return null===(t=e.registerItem)||void 0===t||t.call(e,{id:C,ref:E,disabled:!!w}),function(){var t;null===(t=e.unregisterItem)||void 0===t||t.call(e,C)}}),[C,w,e.registerItem,e.unregisterItem]),Object(i.useEffect)((function(){var t=E.current;t&&e.unstable_moves&&I.current&&t.focus()}),[e.unstable_moves]);var A=Object(i.useCallback)((function(t){var n,o;if(null===(n=P.current)||void 0===n||n.call(P,t),!t.defaultPrevented&&!Object(d.a)(t)&&C&&!function(e,t){if(Object(u.a)(e))return!1;for(var n,o=Object(r.c)(t);!(n=o()).done;){if(n.value.ref.current===e.target)return!0}return!1}(t,e.items)&&(null===(o=e.setCurrentId)||void 0===o||o.call(e,C),e.unstable_virtual&&e.baseId&&Object(u.a)(t))){var c=t.target,i=Object(m.a)(c).getElementById(e.baseId);i&&(B.current=!0,Object(b.a)(i))}}),[C,e.items,e.setCurrentId,e.unstable_virtual,e.baseId]),M=Object(i.useCallback)((function(t){var n;if(e.unstable_virtual&&B.current)return B.current=!1,t.preventDefault(),void t.stopPropagation();null===(n=T.current)||void 0===n||n.call(T,t)}),[e.unstable_virtual]),L=Object(i.useCallback)((function(e){var t;if(null===(t=N.current)||void 0===t||t.call(N,e),Object(u.a)(e)&&1===e.key.length&&" "!==e.key){var n=j(e.currentTarget);if(n&&Object(g.a)(n)){n.focus();var r=e.key;window.requestAnimationFrame((function(){Object(h.a)(n,r)}))}}}),[]),F=Object(i.useMemo)((function(){return Object(p.a)({onKeyDown:L,stopPropagation:!0,shouldKeyDown:u.a,keyMap:function(){var t="horizontal"!==e.orientation,n="vertical"!==e.orientation,r=!!(null==x?void 0:x.groupId),o=function(e){var t=j(e.currentTarget);t&&Object(g.a)(t)&&Object(h.a)(t,"")},c=e.up&&function(){return e.up()},i=e.next&&function(){return e.next()},a=e.down&&function(){return e.down()},l=e.previous&&function(){return e.previous()};return{Delete:o,Backspace:o,ArrowUp:(r||t)&&c,ArrowRight:(r||n)&&i,ArrowDown:(r||t)&&a,ArrowLeft:(r||n)&&l,Home:function(t){var n,o;!r||t.ctrlKey?null===(n=e.first)||void 0===n||n.call(e):null===(o=e.previous)||void 0===o||o.call(e,!0)},End:function(t){var n,o;!r||t.ctrlKey?null===(n=e.last)||void 0===n||n.call(e):null===(o=e.next)||void 0===o||o.call(e,!0)},PageUp:function(){var t,n;r?null===(t=e.up)||void 0===t||t.call(e,!0):null===(n=e.first)||void 0===n||n.call(e)},PageDown:function(){var t,n;r?null===(t=e.down)||void 0===t||t.call(e,!0):null===(n=e.last)||void 0===n||n.call(e)}}}})}),[L,e.orientation,x,e.up,e.next,e.down,e.previous,e.first,e.last]),V=Object(i.useCallback)((function(e){var t;if(null===(t=D.current)||void 0===t||t.call(D,e),!e.defaultPrevented){var n=j(e.currentTarget);n&&!Object(s.a)(n)&&n.focus()}}),[]);return Object(r.b)({ref:Object(a.a)(E,o),id:C,tabIndex:R?f:-1,"aria-selected":!(!e.unstable_virtual||!S)||void 0,onFocus:A,onBlur:M,onKeyDown:F,onClick:V},_)}}),y=Object(o.a)({as:"button",memo:!0,useHook:k})},,,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(182)),c=r(n(183)),i=n(11),a=r(i),l=r(n(148)),u=r(n(184)),s={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(s.str(e)||s.num(e))return e===t;if(s.obj(e)&&s.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!s.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 s.und(e)||s.nul(e)?t:e}function f(e){return s.und(e)?[]:s.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 s.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(s.und(t))return o({to:t},e);var n=Object.keys(e).reduce((function(n,r){var c;return s.und(t[r])?o({},n,((c={})[r]=e[r],c)):n}),{});return o({to:t},n)}var v,O,g=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 g&&e.addChild(u(t))}))},t.detach=function(){return t.payload.forEach((function(e){return e instanceof g&&e.removeChild(u(t))}))},t}return l(t,e),t}(g),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 g&&e.addChild(u(t))}))},t.detach=function(){return Object.values(t.payload).forEach((function(e){return e instanceof g&&e.removeChild(u(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 g)&&(t[n]=r instanceof g?r[e?"getAnimatedValue":"getValue"]():r)}return t},n.getAnimatedValue=function(){return this.getValue(!0)},t}(g);function k(e,t){v={fn:e,transform:t}}function y(e){O=e}var _,E=function(e){return"undefined"!=typeof window?window.requestAnimationFrame(e):-1},C=function(e){"undefined"!=typeof window&&window.cancelAnimationFrame(e)};function w(e){_=e}var S,I=function(){return Date.now()};function B(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 O},injectColorNames:y,get requestFrame(){return E},get cancelFrame(){return C},injectFrame:function(e,t){E=e,C=t},get interpolation(){return _},injectStringInterpolator:w,get now(){return I},injectNow:function(e){I=e},get defaultElement(){return S},injectDefaultElement:B,get animatedApi(){return T},injectAnimatedApi:function(e){T=e},get createAnimatedStyle(){return x},injectCreateAnimatedStyle:N,get manualFrameloop(){return P},injectManualFrameloop:function(e){P=e}}),R=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),A=!1,M=new Set,L=function e(){if(!A)return!1;var t=I(),n=M,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 u=i.configs[l],s=void 0,d=void 0,b=0;b<u.animatedValues.length;b++){var f=u.animatedValues[b];if(!f.done){var p=u.fromValues[b],m=u.toValues[b],v=f.lastPosition,O=m instanceof g,h=Array.isArray(u.initialVelocity)?u.initialVelocity[b]:u.initialVelocity;if(O&&(m=m.getValue()),u.immediate)f.setValue(m),f.done=!0;else if("string"!=typeof p&&"string"!=typeof m){if(void 0!==u.duration)v=p+u.easing((t-f.startTime)/u.duration)*(m-p),s=t>=f.startTime+u.duration;else if(u.decay)v=p+h/(1-.998)*(1-Math.exp(-(1-.998)*(t-f.startTime))),(s=Math.abs(f.lastPosition-v)<.1)&&(m=v);else{d=void 0!==f.lastTime?f.lastTime:t,h=void 0!==f.lastVelocity?f.lastVelocity:u.initialVelocity,t>d+64&&(d=t);for(var j=Math.floor(t-d),k=0;k<j;++k){v+=1*(h+=1*((-u.tension*(v-m)+-u.friction*h)/u.mass)/1e3)/1e3}var y=!(!u.clamp||0===u.tension)&&(p<m?v>m:v<m),_=Math.abs(h)<=u.precision,C=0===u.tension||Math.abs(m-v)<=u.precision;s=y||_&&C,f.lastVelocity=h,f.lastTime=t}O&&!u.toValues[b].done&&(s=!1),s?(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[u.name]=u.interpolation.getValue())}i.props.onFrame&&i.props.onFrame(i.values),a||(M.delete(i),i.stop(!0))}return M.size?P?P():E(e):A=!1,A};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 u=l?l(e):e;if(u<t){if("identity"===i)return u;"clamp"===i&&(u=t)}if(u>n){if("identity"===a)return u;"clamp"===a&&(u=n)}if(r===o)return r;if(t===n)return e<=t?r:o;t===-1/0?u=-u:n===1/0?u-=t:u=(u-t)/(n-t);u=c(u),r===-1/0?u=-u:o===1/0?u+=r:u=u*(o-r)+r;return u}(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);var 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}(g),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),U=0,G=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=U++}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(s.arr(i)||s.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),u=l[i.delay]&&l[i.delay].to;l[i.delay]=o({},l[i.delay],i,{to:o({},u,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,n=this;if(this.queue.length){this.idle=!1,this.localQueue&&this.localQueue.forEach((function(e){var t=e.from,r=void 0===t?{}:t,c=e.to,i=void 0===c?{}:c;s.obj(r)&&(n.merged=o({},r,n.merged)),s.obj(i)&&(n.merged=o({},n.merged,i))}));var r=this.local=++this.guid,i=this.localQueue=this.queue;this.queue=[],i.forEach((function(t,o){var a=t.delay,l=c(t,["delay"]),u=function(t){o===i.length-1&&r===n.guid&&t&&(n.idle=!0,n.props.onRest&&n.props.onRest(n.merged)),e&&e()},d=s.arr(l.to)||s.fun(l.to);a?setTimeout((function(){r===n.guid&&(d?n.runAsync(l,u):n.diff(l).start(u))}),a):d?n.runAsync(l,u):n.diff(l).start(u)}))}else s.fun(e)&&this.listeners.push(e),this.props.onStart&&this.props.onStart(),t=this,M.has(t)||M.add(t),A||(A=!0,E(P||L));return this},t.stop=function(e){return this.listeners.forEach((function(t){return t(e)})),this.listeners=[],this},t.pause=function(e){var t;return this.stop(!0),e&&(t=this,M.has(t)&&M.delete(t)),this},t.runAsync=function(e,t){var n=this,r=(e.delay,c(e,["delay"])),i=this.local,a=Promise.resolve(void 0);if(s.arr(r.to))for(var l=function(e){var t=e,c=o({},r,m(r.to[t]));s.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)}))}))},u=0;u<r.to.length;u++)l(u);else if(s.fun(r.to)){var d,b=0;a=a.then((function(){return r.to((function(e){var t=o({},r,m(e));if(s.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,u=void 0===l?{}:l,d=n.reverse,m=n.attach,v=n.reset,g=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=s.num(i),d=s.str(i)&&!i.startsWith("#")&&!/\d/.test(i)&&!O[i],m=s.arr(i),h=!l&&!m&&!d,k=s.und(c[r])?i:c[r],y=l||m||d?i:1,E=p(u,r);j&&(y=j.animations[r].parent);var C,w=a.parent,S=a.interpolation,B=f(j?y.getPayload():y),x=i;h&&(x=_({range:[0,1],output:[i,i]})(1));var P,T=S&&S.getValue(),N=!s.und(w)&&a.animatedValues.some((function(e){return!e.done})),D=!s.equ(x,T),R=!s.equ(x,a.previous),A=!s.equ(E,a.config);if(v||R&&D||A){var M;if(l||d)w=S=a.parent||new H(k);else if(m)w=S=a.parent||new z(k);else if(h){var L=a.interpolation&&a.interpolation.calc(a.parent.value);L=void 0===L||v?k:L,a.parent?(w=a.parent).setValue(0,!1):w=new H(0);var F={output:[L,i]};a.interpolation?(S=a.interpolation,a.interpolation.updateConfig(F)):S=w.interpolate(F)}return B=f(j?y.getPayload():y),C=f(w.getPayload()),v&&!h&&w.setValue(k,!1),t.hasChanged=!0,C.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=I(),e.done=!1,e.animatedStyles.clear()})),p(g,r)&&w.setValue(h?y:i,!1),o({},e,((M={})[r]=o({},a,{name:r,parent:w,interpolation:S,animatedValues:C,toValues:B,previous:x,config:E,fromValues:f(w.getValue()),immediate:p(g,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}),M))}return D?e:(h&&(w.setValue(1,!1),S.updateConfig({output:[x,x]})),w.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=s.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 G,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 u=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||u(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,u,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};(s.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 g||(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 ue(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 se(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))?(se(n[1])<<24|se(n[2])<<16|se(n[3])<<8|255)>>>0:(n=te.exec(t))?(se(n[1])<<24|se(n[2])<<16|se(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|ue(de(n[1]),fe(n[2]),fe(n[3])))>>>0:(n=re.exec(t))?(ue(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,Oe=new RegExp("("+Object.keys(Q).join("|")+")","g"),ge={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||ge.hasOwnProperty(e)&&ge[e]?(""+t).trim():t+"px"}ge=Object.keys(ge).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}),ge);var ke={};N((function(e){return new X(e)})),B("div"),w((function(e){var t=e.output.map((function(e){return e.replace(ve,pe)})).map((function(e){return e.replace(Oe,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 u in void 0!==o&&(e.scrollTop=o),void 0!==i&&(e.scrollLeft=i),void 0!==r&&(e.textContent=r),n)if(n.hasOwnProperty(u)){var s=0===u.indexOf("--"),d=je(u,n[u],s);"float"===u&&(u="cssFloat"),s?e.style.setProperty(u,d):e.style[u]=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),u=i.useRef(null),b=i.useRef(null),f=i.useCallback((function(e){var t=u.current;u.current=new R(e,(function(){b.current&&!1===v.fn(b.current,u.current.getAnimatedValue())&&r()})),t&&t.detach()}),[]);i.useEffect((function(){return function(){l.current=!1,u.current&&u.current.detach()}}),[]),i.useImperativeHandle(n,(function(){return T(b,l,r)})),f(t);var p=u.current.getValue(),m=(p.scrollTop,p.scrollLeft,c(p,["scrollTop","scrollLeft"]));return a.createElement(e,o({},m,{ref:function(e){return b.current=function(e,t){return t&&(s.fun(t)?t(e):s.obj(t)&&(t.current=e)),e}(e,n)}}))}))},void 0===(_e=!1)&&(_e=!0),function(e){return(s.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)}),Ce=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=L,t.animated=Ce,t.a=Ce,t.interpolate=function(e,t,n){return e&&new V(e,t,n)},t.Globals=D,t.useSpring=function(e){var t=s.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=s.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]}})})),u=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?[u,f,b]:u},t.useTransition=function(e,t,n){var r=o({items:e,keys:t||function(e){return e}},n),a=$(r),l=a.lazy,u=void 0!==l&&l,s=(a.unique,a.reset),b=void 0!==s&&s,f=(a.enter,a.leave,a.update,a.onDestroyed),m=(a.keys,a.items,a.onFrame),v=a.onRest,O=a.onStart,g=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){var n=e.first,r=e.prevProps,i=c(e,["first","prevProps"]),a=$(t),l=a.items,u=a.keys,s=a.initial,d=a.from,b=a.enter,f=a.leave,m=a.update,v=a.trail,O=void 0===v?0:v,g=a.unique,h=a.config,j=a.order,k=void 0===j?["enter","leave","update"]:j,y=$(r),_=y.keys,E=y.items,C=o({},i.current),w=[].concat(i.deleted),S=Object.keys(C),I=new Set(S),B=new Set(u),x=u.filter((function(e){return!I.has(e)})),P=i.transitions.filter((function(e){return!e.destroyed&&!B.has(e.originalKey)})).map((function(e){return e.originalKey})),T=u.filter((function(e){return I.has(e)})),N=-O;for(;k.length;){switch(k.shift()){case"enter":x.forEach((function(e,t){g&&w.find((function(t){return t.originalKey===e}))&&(w=w.filter((function(t){return t.originalKey!==e})));var r=u.indexOf(e),o=l[r],c=n&&void 0!==s?"initial":"enter";C[e]={slot:c,originalKey:e,key:g?String(e):K++,item:o,trail:N+=O,config:p(h,o,c),from:p(n&&void 0!==s?s||{}:d,o),to:p(b,o)}}));break;case"leave":P.forEach((function(e){var t=_.indexOf(e),n=E[t];w.unshift(o({},C[e],{slot:"leave",destroyed:!0,left:_[Math.max(0,t-1)],right:_[Math.min(_.length,t+1)],trail:N+=O,config:p(h,n,"leave"),to:p(f,n)})),delete C[e]}));break;case"update":T.forEach((function(e){var t=u.indexOf(e),n=l[t];C[e]=o({},C[e],{item:n,slot:"update",trail:N+=O,config:p(h,n,"update"),to:p(m,n)})}))}}var D=u.map((function(e){return C[e]}));return w.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:C,deleted:w,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 G);var s=y.current.instances.get(a),d=o({},h,{to:r,from:n,config:c,ref:g,onRest:function(n){y.current.mounted&&(e.destroyed&&(g||u||Y(y,a),f&&f(l)),!Array.from(y.current.instances).some((function(e){return!e[1].idle}))&&(g||u)&&y.current.deleted.length>0&&Y(y),v&&v(l,t,n))},onStart:O&&function(){return O(l,t)},onFrame:m&&function(e){return m(l,t,e)},delay:i,reset:b&&"enter"===t});s.update(d),y.current.paused||s.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(){s.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},,,,,,function(e,t,n){"use strict";e.exports=n(190)},function(e,t){e.exports=window.wp.wordcount},,function(e,t){e.exports=window.wp.shortcode},function(e,t,n){"use strict";var r=n(6),o=n(15),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))}},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},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},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},,function(e,t,n){"use strict";var r=n(8),o=n(15),c=n(0),i=n(2),a=n(3),l=n(173),u=Object(a.createSlotFill)("BlockControls"),s=u.Fill,d=u.Slot;var b=function(e){return"BlockControls".concat(e?"-expanded":"")},f=function(e){var t=e.controls,n=e.__experimentalIsExpanded,r=e.children;return Object(l.a)()?Object(c.createElement)(s,{name:b(n)},(function(e){var n=Object(i.isEmpty)(e)?null:e;return Object(c.createElement)(a.__experimentalToolbarContext.Provider,{value:n},Object(c.createElement)(a.ToolbarGroup,{controls:t}),r)})):null};f.Slot=function(e){var t=e.__experimentalIsExpanded,n=void 0!==t&&t,i=Object(o.a)(e,["__experimentalIsExpanded"]),l=Object(c.useContext)(a.__experimentalToolbarContext);return Object(c.createElement)(d,Object(r.a)({name:b(n)},i,{fillProps:l}))},t.a=f},,,,,,,function(e,t,n){"use strict";var r=n(144);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}},function(e,t,n){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},,,,function(e,t){e.exports=function(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}},function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var r=n(39),o=n(38),c=n(29),i=n(40);function a(e){return Object(r.a)(e)||Object(o.a)(e)||Object(c.a)(e)||Object(i.a)()}},function(e,t,n){e.exports=function(){"use strict";return function(e){var t={};return function e(t,n){var r;if(Array.isArray(n))for(r=0;r<n.length;r++)e(t,n[r]);else for(r in n)t[r]=(t[r]||[]).concat(n[r])}(t,e),function(e){return function(n){return function(r){var o,c,i=t[r.type],a=n(r);if(i)for(o=0;o<i.length;o++)(c=i[o](r,e))&&e.dispatch(c);return a}}}}}()},,,,,,function(e,t){e.exports=window.wp.tokenList},,,,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},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},,,,,,,,,,,,function(e,t,n){"use strict";n.d(t,"a",(function(){return c}));var r=n(4),o=n(91);function c(){var e=Object(o.b)(),t=e.isSelected,n=e.clientId,c=e.name,i=Object(r.useSelect)((function(e){if(!t){var r=e("core/block-editor"),o=r.getBlockName,i=r.isFirstMultiSelectedBlock,a=r.getMultiSelectedBlockClientIds;return!!i(n)&&a().every((function(e){return o(e)===c}))}}),[n,t,c]);return t||i}},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}},,,function(e,t,n){"use strict";var r=a(n(290)),o=a(n(295)),c=a(n(211)),i=a(n(208));function a(e){return e&&e.__esModule?e:{default:e}}e.exports={Transition:i.default,TransitionGroup:c.default,ReplaceTransition:o.default,CSSTransition:r.default}},,,,,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},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}},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}},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 n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),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(11),l=n(30),u=n(186),s=n(187),d=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.state={lineHeight:null},t.dispatchEvent=function(e){var n=document.createEvent("Event");n.initEvent(e,!0,!1),t.textarea.dispatchEvent(n)},t.updateLineHeight=function(){t.setState({lineHeight:s(t.textarea)})},t.onChange=function(e){var n=t.props.onChange;t.currentValue=e.currentTarget.value,n&&n(e)},t.saveDOMNodeRef=function(e){var n=t.props.innerRef;n&&n(e),t.textarea=e},t.getLocals=function(){var e=t,n=e.props,r=(n.onResize,n.maxRows),o=(n.onChange,n.style),a=(n.innerRef,i(n,["onResize","maxRows","onChange","style","innerRef"])),l=e.state.lineHeight,u=e.saveDOMNodeRef,s=r&&l?l*r:null;return c({},a,{saveDOMNodeRef:u,style:s?c({},o,{maxHeight:s}):o,onChange:t.onChange})},t}return o(t,e),t.prototype.componentDidMount=function(){var e=this,t=this.props,n=t.onResize;"number"==typeof t.maxRows&&this.updateLineHeight(),setTimeout((function(){return u(e.textarea)})),n&&this.textarea.addEventListener("autosize:resized",n)},t.prototype.componentWillUnmount=function(){var e=this.props.onResize;e&&this.textarea.removeEventListener("autosize:resized",e),this.dispatchEvent("autosize:destroy")},t.prototype.render=function(){var e=this.getLocals(),t=e.children,n=e.saveDOMNodeRef,r=i(e,["children","saveDOMNodeRef"]);return a.createElement("textarea",c({},r,{ref:n}),t)},t.prototype.componentDidUpdate=function(){this.props.value!==this.currentValue&&this.dispatchEvent("autosize:update")},t.defaultProps={rows:1},t.propTypes={rows:l.number,maxRows:l.number,onResize:l.func,innerRef:l.func},t}(a.Component);t.default=d},function(e,t,n){var r,o,c;o=[e,t],void 0===(c="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){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 u(t){var n=e.style.width;e.style.width="0px",e.offsetWidth,e.style.width=n,e.style.overflowY=t}function s(){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(){s();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&&(u("scroll"),s(),r="content-box"===n.boxSizing?Math.round(parseFloat(window.getComputedStyle(e,null).height)):e.offsetHeight):"hidden"!==n.overflowY&&(u("hidden"),s(),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){}}}}function a(e){var t=o.get(e);t&&t.destroy()}function l(e){var t=o.get(e);t&&t.update()}var u=null;"undefined"==typeof window||"function"!=typeof window.getComputedStyle?((u=function(e){return e}).destroy=function(e){return e},u.update=function(e){return e}):((u=function(e,t){return e&&Array.prototype.forEach.call(e.length?e:[e],(function(e){return i(e)})),e}).destroy=function(e){return e&&Array.prototype.forEach.call(e.length?e:[e],a),e},u.update=function(e){return e&&Array.prototype.forEach.call(e.length?e:[e],l),e}),t.default=u,e.exports=t.default})?r.apply(t,o):r)||(e.exports=c)},function(e,t,n){var r=n(188);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}},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()}))]}},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},function(e,t,n){"use strict";var r=n(191);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,u=n.offsetLeft||0,s=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,O=void 0,g=void 0,h=void 0,j=void 0,k=void 0,y=void 0,_=void 0,E=void 0,C=void 0;b?(y=t,C=r.height(y),E=r.width(y),_={left:r.scrollLeft(y),top:r.scrollTop(y)},j={left:f.left-_.left-u,top:f.top-_.top-l},k={left:f.left+m-(_.left+E)+d,top:f.top+p-(_.top+C)+s},h=_):(v=r.offset(t),O=t.clientHeight,g=t.clientWidth,h={left:t.scrollLeft,top:t.scrollTop},j={left:f.left-(v.left+(parseFloat(r.css(t,"borderLeftWidth"))||0))-u,top:f.top-(v.top+(parseFloat(r.css(t,"borderTopWidth"))||0))-l},k={left:f.left+m-(v.left+g+(parseFloat(r.css(t,"borderRightWidth"))||0))+d,top:f.top+p-(v.top+O+(parseFloat(r.css(t,"borderBottomWidth"))||0))+s}),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)))}},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 u=new RegExp("^("+/[\-+]?(?:\d*\.|)\d+(?:[eE][\-+]?\d+|)/.source+")(?!px)[a-z%]+$","i"),s=/^(top|right|bottom|left)$/,d="left";var 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(u.test(n)&&!s.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 O(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=void 0;a="border"===o?o+n[i]+"Width":o+n[i],r+=parseFloat(b(e,a))||0}return r}function g(e){return null!=e&&e==e.window}var h={};function j(e,t,n){if(g(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-O(e,["border","padding"],r):i;if(a){var u=2===n?-O(e,["border"],r):O(e,["margin"],r);return l+(1===n?0:u)}return i+O(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){if(void 0===r)return t&&y(t,e,-1);if(t){b(t);return p(t)&&(r+=O(t,["padding","border"],n)),_(t,e,r)}}})),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:g,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(g(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(g(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)},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},,,,,,,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},,,,,,,,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},function(e,t,n){"use strict";t.__esModule=!0,t.default=t.EXITING=t.ENTERED=t.ENTERING=t.EXITED=t.UNMOUNTED=void 0;var r=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){var r=Object.defineProperty&&Object.getOwnPropertyDescriptor?Object.getOwnPropertyDescriptor(e,n):{};r.get||r.set?Object.defineProperty(t,n,r):t[n]=e[n]}return t.default=e,t}(n(30)),o=a(n(11)),c=a(n(113)),i=n(209);n(210);function a(e){return e&&e.__esModule?e:{default:e}}t.UNMOUNTED="unmounted";t.EXITED="exited";t.ENTERING="entering";t.ENTERED="entered";t.EXITING="exiting";var l=function(e){var t,n;function r(t,n){var r;r=e.call(this,t,n)||this;var o,c=n.transitionGroup,i=c&&!c.isMounting?t.enter:t.appear;return r.appearStatus=null,t.in?i?(o="exited",r.appearStatus="entering"):o="entered":o=t.unmountOnExit||t.mountOnEnter?"unmounted":"exited",r.state={status:o},r.nextCallback=null,r}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n;var i=r.prototype;return i.getChildContext=function(){return{transitionGroup:null}},r.getDerivedStateFromProps=function(e,t){return e.in&&"unmounted"===t.status?{status:"exited"}:null},i.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},i.componentDidUpdate=function(e){var t=null;if(e!==this.props){var n=this.state.status;this.props.in?"entering"!==n&&"entered"!==n&&(t="entering"):"entering"!==n&&"entered"!==n||(t="exiting")}this.updateStatus(!1,t)},i.componentWillUnmount=function(){this.cancelNextCallback()},i.getTimeouts=function(){var e,t,n,r=this.props.timeout;return e=t=n=r,null!=r&&"number"!=typeof r&&(e=r.exit,t=r.enter,n=void 0!==r.appear?r.appear:t),{exit:e,enter:t,appear:n}},i.updateStatus=function(e,t){if(void 0===e&&(e=!1),null!==t){this.cancelNextCallback();var n=c.default.findDOMNode(this);"entering"===t?this.performEnter(n,e):this.performExit(n)}else this.props.unmountOnExit&&"exited"===this.state.status&&this.setState({status:"unmounted"})},i.performEnter=function(e,t){var n=this,r=this.props.enter,o=this.context.transitionGroup?this.context.transitionGroup.isMounting:t,c=this.getTimeouts(),i=o?c.appear:c.enter;t||r?(this.props.onEnter(e,o),this.safeSetState({status:"entering"},(function(){n.props.onEntering(e,o),n.onTransitionEnd(e,i,(function(){n.safeSetState({status:"entered"},(function(){n.props.onEntered(e,o)}))}))}))):this.safeSetState({status:"entered"},(function(){n.props.onEntered(e)}))},i.performExit=function(e){var t=this,n=this.props.exit,r=this.getTimeouts();n?(this.props.onExit(e),this.safeSetState({status:"exiting"},(function(){t.props.onExiting(e),t.onTransitionEnd(e,r.exit,(function(){t.safeSetState({status:"exited"},(function(){t.props.onExited(e)}))}))}))):this.safeSetState({status:"exited"},(function(){t.props.onExited(e)}))},i.cancelNextCallback=function(){null!==this.nextCallback&&(this.nextCallback.cancel(),this.nextCallback=null)},i.safeSetState=function(e,t){t=this.setNextCallback(t),this.setState(e,t)},i.setNextCallback=function(e){var t=this,n=!0;return this.nextCallback=function(r){n&&(n=!1,t.nextCallback=null,e(r))},this.nextCallback.cancel=function(){n=!1},this.nextCallback},i.onTransitionEnd=function(e,t,n){this.setNextCallback(n);var r=null==t&&!this.props.addEndListener;e&&!r?(this.props.addEndListener&&this.props.addEndListener(e,this.nextCallback),null!=t&&setTimeout(this.nextCallback,t)):setTimeout(this.nextCallback,0)},i.render=function(){var e=this.state.status;if("unmounted"===e)return null;var t=this.props,n=t.children,r=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}(t,["children"]);if(delete r.in,delete r.mountOnEnter,delete r.unmountOnExit,delete r.appear,delete r.enter,delete r.exit,delete r.timeout,delete r.addEndListener,delete r.onEnter,delete r.onEntering,delete r.onEntered,delete r.onExit,delete r.onExiting,delete r.onExited,"function"==typeof n)return n(e,r);var c=o.default.Children.only(n);return o.default.cloneElement(c,r)},r}(o.default.Component);function u(){}l.contextTypes={transitionGroup:r.object},l.childContextTypes={transitionGroup:function(){}},l.propTypes={},l.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:u,onEntering:u,onEntered:u,onExit:u,onExiting:u,onExited:u},l.UNMOUNTED=0,l.EXITED=1,l.ENTERING=2,l.ENTERED=3,l.EXITING=4;var s=(0,i.polyfill)(l);t.default=s},function(e,t,n){"use strict";function r(){var e=this.constructor.getDerivedStateFromProps(this.props,this.state);null!=e&&this.setState(e)}function o(e){this.setState(function(t){var n=this.constructor.getDerivedStateFromProps(e,t);return null!=n?n:null}.bind(this))}function c(e,t){try{var n=this.props,r=this.state;this.props=e,this.state=t,this.__reactInternalSnapshotFlag=!0,this.__reactInternalSnapshot=this.getSnapshotBeforeUpdate(n,r)}finally{this.props=n,this.state=r}}function i(e){var t=e.prototype;if(!t||!t.isReactComponent)throw new Error("Can only polyfill class components");if("function"!=typeof e.getDerivedStateFromProps&&"function"!=typeof t.getSnapshotBeforeUpdate)return e;var n=null,i=null,a=null;if("function"==typeof t.componentWillMount?n="componentWillMount":"function"==typeof t.UNSAFE_componentWillMount&&(n="UNSAFE_componentWillMount"),"function"==typeof t.componentWillReceiveProps?i="componentWillReceiveProps":"function"==typeof t.UNSAFE_componentWillReceiveProps&&(i="UNSAFE_componentWillReceiveProps"),"function"==typeof t.componentWillUpdate?a="componentWillUpdate":"function"==typeof t.UNSAFE_componentWillUpdate&&(a="UNSAFE_componentWillUpdate"),null!==n||null!==i||null!==a){var l=e.displayName||e.name,u="function"==typeof e.getDerivedStateFromProps?"getDerivedStateFromProps()":"getSnapshotBeforeUpdate()";throw Error("Unsafe legacy lifecycles will not be called for components using new component APIs.\n\n"+l+" uses "+u+" but also contains the following legacy lifecycles:"+(null!==n?"\n "+n:"")+(null!==i?"\n "+i:"")+(null!==a?"\n "+a:"")+"\n\nThe above lifecycles should be removed. Learn more about this warning here:\nhttps://fb.me/react-async-component-lifecycle-hooks")}if("function"==typeof e.getDerivedStateFromProps&&(t.componentWillMount=r,t.componentWillReceiveProps=o),"function"==typeof t.getSnapshotBeforeUpdate){if("function"!=typeof t.componentDidUpdate)throw new Error("Cannot polyfill getSnapshotBeforeUpdate() for components that do not define componentDidUpdate() on the prototype");t.componentWillUpdate=c;var s=t.componentDidUpdate;t.componentDidUpdate=function(e,t,n){var r=this.__reactInternalSnapshotFlag?this.__reactInternalSnapshot:n;s.call(this,e,t,r)}}return e}n.r(t),n.d(t,"polyfill",(function(){return i})),r.__suppressDeprecationWarning=!0,o.__suppressDeprecationWarning=!0,c.__suppressDeprecationWarning=!0},function(e,t,n){"use strict";t.__esModule=!0,t.classNamesShape=t.timeoutsShape=void 0;var r;(r=n(30))&&r.__esModule;t.timeoutsShape=null;t.classNamesShape=null},function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var r=a(n(30)),o=a(n(11)),c=n(209),i=n(296);function a(e){return e&&e.__esModule?e:{default:e}}function l(){return(l=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)}function u(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}var s=Object.values||function(e){return Object.keys(e).map((function(t){return e[t]}))},d=function(e){var t,n;function r(t,n){var r,o=(r=e.call(this,t,n)||this).handleExited.bind(u(u(r)));return r.state={handleExited:o,firstRender:!0},r}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n;var c=r.prototype;return c.getChildContext=function(){return{transitionGroup:{isMounting:!this.appeared}}},c.componentDidMount=function(){this.appeared=!0,this.mounted=!0},c.componentWillUnmount=function(){this.mounted=!1},r.getDerivedStateFromProps=function(e,t){var n=t.children,r=t.handleExited;return{children:t.firstRender?(0,i.getInitialChildMapping)(e,r):(0,i.getNextChildMapping)(e,n,r),firstRender:!1}},c.handleExited=function(e,t){var n=(0,i.getChildMapping)(this.props.children);e.key in n||(e.props.onExited&&e.props.onExited(t),this.mounted&&this.setState((function(t){var n=l({},t.children);return delete n[e.key],{children:n}})))},c.render=function(){var e=this.props,t=e.component,n=e.childFactory,r=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}(e,["component","childFactory"]),c=s(this.state.children).map(n);return delete r.appear,delete r.enter,delete r.exit,null===t?c:o.default.createElement(t,r,c)},r}(o.default.Component);d.childContextTypes={transitionGroup:r.default.object.isRequired},d.propTypes={},d.defaultProps={component:"div",childFactory:function(e){return e}};var b=(0,c.polyfill)(d);t.default=b,e.exports=t.default},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},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},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},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},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:"M16 4h2v9H7v3l-5-4 5-4v3h9V4z"}));t.a=c},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},,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t=e.dispatch;return function(e){return function(n){return Array.isArray(n)?n.filter(Boolean).map(t):e(n)}}}},function(e,t,n){"use strict";(function(e){n.d(t,"a",(function(){return l}));var r=n(9),o=n(0),c=n(177),i=n(2),a=(n(100),n(136));function l(e){var t=e.children,n=e.className;return Object(o.createElement)(a.a.Slot,{__experimentalIsExpanded:!0},(function(e){return Object(o.createElement)(u,{className:n,fills:e},t)}))}function u(t){var n=t.fills,a=t.className,l=void 0===a?"":a,u=t.children,s=Object(o.useRef)(),d=Object(o.useRef)(),b=Object(o.useRef)(),f=Object(o.useState)({}),p=Object(r.a)(f,2),m=p[0],v=p[1],O=Object(o.useRef)();O.current=n;var g=Object(o.useCallback)(Object(i.throttle)((function(){var e=O.current.length?d.current:b.current;if(e){e.style.position="absolute",e.style.width="auto";var t,n=(t=e).ownerDocument.defaultView.getComputedStyle(t);v({width:n.getPropertyValue("width"),height:n.getPropertyValue("height")}),e.style.position="",e.style.width=""}}),100),[]);Object(o.useEffect)((function(){var e=new window.MutationObserver((function(e){e.find((function(e){return"childList"===e.type}))&&g()}));return e.observe(s.current,{childList:!0,subtree:!0}),function(){return e.disconnect()}}),[]),Object(o.useEffect)((function(){n.length>1&&void 0!==e&&e.env}),[n.length]);var h=n[0];return Object(o.createElement)("div",{className:"block-editor-block-toolbar-animated-width-container",ref:s,style:m},Object(o.createElement)(c.TransitionGroup,null,h?Object(o.createElement)(c.CSSTransition,{key:"fills",timeout:300,classNames:"block-editor-block-toolbar-content"},Object(o.createElement)("div",{className:l,ref:d},h)):Object(o.createElement)(c.CSSTransition,{key:"default",timeout:300,classNames:"block-editor-block-toolbar-content"},Object(o.createElement)("div",{className:l,ref:b},u))))}}).call(this,n(107))},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(297))&&r.__esModule?r:{default:r}).default);t.characterDiff=o},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=s(o),c=s(c);break;case"aspect-ratio":case"device-aspect-ratio":case"device-pixel-ratio":o=u(o),c=u(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 u(e){var t,n=Number(e);return n||(n=(t=e.match(/^(\d+)\s*\/\s*(\d+)$/))[1]/t[2]),n}function s(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}}},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 O=t.call(m,m.node);return void 0!==O&&m.update&&m.update(O),f.before&&f.before.call(m,m.node),p?("object"!=typeof m.node||null===m.node||m.circular||(o.push(m),v(),u(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&&s.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 u(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||!s.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||!s.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];s.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),u(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)},u=function(e,t){if(e.forEach)return e.forEach(t);for(var n=0;n<e.length;n++)t(e[n],n,e)};u(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 s=Object.hasOwnProperty||function(e,t){return t in e}},,,,,,,,,,,,,,,,,,,,,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},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},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},function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;!function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){var r=Object.defineProperty&&Object.getOwnPropertyDescriptor?Object.getOwnPropertyDescriptor(e,n):{};r.get||r.set?Object.defineProperty(t,n,r):t[n]=e[n]}t.default=e}(n(30));var r=a(n(291)),o=a(n(294)),c=a(n(11)),i=a(n(208));n(210);function a(e){return e&&e.__esModule?e:{default:e}}function l(){return(l=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)}var u=function(e,t){return e&&t&&t.split(" ").forEach((function(t){return(0,r.default)(e,t)}))},s=function(e,t){return e&&t&&t.split(" ").forEach((function(t){return(0,o.default)(e,t)}))},d=function(e){var t,n;function r(){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).onEnter=function(e,n){var r=t.getClassNames(n?"appear":"enter").className;t.removeClasses(e,"exit"),u(e,r),t.props.onEnter&&t.props.onEnter(e,n)},t.onEntering=function(e,n){var r=t.getClassNames(n?"appear":"enter").activeClassName;t.reflowAndAddClass(e,r),t.props.onEntering&&t.props.onEntering(e,n)},t.onEntered=function(e,n){var r=t.getClassNames("appear").doneClassName,o=t.getClassNames("enter").doneClassName,c=n?r+" "+o:o;t.removeClasses(e,n?"appear":"enter"),u(e,c),t.props.onEntered&&t.props.onEntered(e,n)},t.onExit=function(e){var n=t.getClassNames("exit").className;t.removeClasses(e,"appear"),t.removeClasses(e,"enter"),u(e,n),t.props.onExit&&t.props.onExit(e)},t.onExiting=function(e){var n=t.getClassNames("exit").activeClassName;t.reflowAndAddClass(e,n),t.props.onExiting&&t.props.onExiting(e)},t.onExited=function(e){var n=t.getClassNames("exit").doneClassName;t.removeClasses(e,"exit"),u(e,n),t.props.onExited&&t.props.onExited(e)},t.getClassNames=function(e){var n=t.props.classNames,r="string"==typeof n,o=r?(r&&n?n+"-":"")+e:n[e];return{className:o,activeClassName:r?o+"-active":n[e+"Active"],doneClassName:r?o+"-done":n[e+"Done"]}},t}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n;var o=r.prototype;return o.removeClasses=function(e,t){var n=this.getClassNames(t),r=n.className,o=n.activeClassName,c=n.doneClassName;r&&s(e,r),o&&s(e,o),c&&s(e,c)},o.reflowAndAddClass=function(e,t){t&&(e&&e.scrollTop,u(e,t))},o.render=function(){var e=l({},this.props);return delete e.classNames,c.default.createElement(i.default,l({},e,{onEnter:this.onEnter,onEntered:this.onEntered,onEntering:this.onEntering,onExit:this.onExit,onExiting:this.onExiting,onExited:this.onExited}))},r}(c.default.Component);d.defaultProps={classNames:""},d.propTypes={};var b=d;t.default=b,e.exports=t.default},function(e,t,n){"use strict";var r=n(292);t.__esModule=!0,t.default=function(e,t){e.classList?e.classList.add(t):(0,o.default)(e,t)||("string"==typeof e.className?e.className=e.className+" "+t:e.setAttribute("class",(e.className&&e.className.baseVal||"")+" "+t))};var o=r(n(293));e.exports=t.default},function(e,t){e.exports=function(e){return e&&e.__esModule?e:{default:e}}},function(e,t,n){"use strict";t.__esModule=!0,t.default=function(e,t){return e.classList?!!t&&e.classList.contains(t):-1!==(" "+(e.className.baseVal||e.className)+" ").indexOf(" "+t+" ")},e.exports=t.default},function(e,t,n){"use strict";function r(e,t){return e.replace(new RegExp("(^|\\s)"+t+"(?:\\s|$)","g"),"$1").replace(/\s+/g," ").replace(/^\s*|\s*$/g,"")}e.exports=function(e,t){e.classList?e.classList.remove(t):"string"==typeof e.className?e.className=r(e.className,t):e.setAttribute("class",r(e.className&&e.className.baseVal||"",t))}},function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;i(n(30));var r=i(n(11)),o=n(113),c=i(n(211));function i(e){return e&&e.__esModule?e:{default:e}}var a=function(e){var t,n;function i(){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).handleEnter=function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return t.handleLifecycle("onEnter",0,n)},t.handleEntering=function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return t.handleLifecycle("onEntering",0,n)},t.handleEntered=function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return t.handleLifecycle("onEntered",0,n)},t.handleExit=function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return t.handleLifecycle("onExit",1,n)},t.handleExiting=function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return t.handleLifecycle("onExiting",1,n)},t.handleExited=function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return t.handleLifecycle("onExited",1,n)},t}n=e,(t=i).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n;var a=i.prototype;return a.handleLifecycle=function(e,t,n){var c,i=this.props.children,a=r.default.Children.toArray(i)[t];a.props[e]&&(c=a.props)[e].apply(c,n),this.props[e]&&this.props[e]((0,o.findDOMNode)(this))},a.render=function(){var e=this.props,t=e.children,n=e.in,o=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}(e,["children","in"]),i=r.default.Children.toArray(t),a=i[0],l=i[1];return delete o.onEnter,delete o.onEntering,delete o.onEntered,delete o.onExit,delete o.onExiting,delete o.onExited,r.default.createElement(c.default,o,n?r.default.cloneElement(a,{key:"first",onEnter:this.handleEnter,onEntering:this.handleEntering,onEntered:this.handleEntered}):r.default.cloneElement(l,{key:"second",onEnter:this.handleExit,onEntering:this.handleExiting,onEntered:this.handleExited}))},i}(r.default.Component);a.propTypes={};var l=a;t.default=l,e.exports=t.default},function(e,t,n){"use strict";t.__esModule=!0,t.getChildMapping=o,t.mergeChildMappings=c,t.getInitialChildMapping=function(e,t){return o(e.children,(function(n){return(0,r.cloneElement)(n,{onExited:t.bind(null,n),in:!0,appear:i(n,"appear",e),enter:i(n,"enter",e),exit:i(n,"exit",e)})}))},t.getNextChildMapping=function(e,t,n){var a=o(e.children),l=c(t,a);return Object.keys(l).forEach((function(o){var c=l[o];if((0,r.isValidElement)(c)){var u=o in t,s=o in a,d=t[o],b=(0,r.isValidElement)(d)&&!d.props.in;!s||u&&!b?s||!u||b?s&&u&&(0,r.isValidElement)(d)&&(l[o]=(0,r.cloneElement)(c,{onExited:n.bind(null,c),in:d.props.in,exit:i(c,"exit",e),enter:i(c,"enter",e)})):l[o]=(0,r.cloneElement)(c,{in:!1}):l[o]=(0,r.cloneElement)(c,{onExited:n.bind(null,c),in:!0,exit:i(c,"exit",e),enter:i(c,"enter",e)})}})),l};var r=n(11);function o(e,t){var n=Object.create(null);return e&&r.Children.map(e,(function(e){return e})).forEach((function(e){n[e.key]=function(e){return t&&(0,r.isValidElement)(e)?t(e):e}(e)})),n}function c(e,t){function n(n){return n in t?t[n]:e[n]}e=e||{},t=t||{};var r,o=Object.create(null),c=[];for(var i in e)i in t?c.length&&(o[i]=c,c=[]):c.push(i);var a={};for(var l in t){if(o[l])for(r=0;r<o[l].length;r++){var u=o[l][r];a[o[l][r]]=n(u)}a[l]=n(l)}for(r=0;r<c.length;r++)a[c[r]]=n(c[r]);return a}function i(e,t,n){return null!=n[t]?n[t]:e.props[t]}},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 u=t[c];if(u.removed){if(u.value=e.join(r.slice(l,l+u.count)),l+=u.count,c&&t[c-1].added){var s=t[c-1];t[c-1]=t[c],t[c]=s}}else{if(!u.added&&o){var d=n.slice(a,a+u.count);d=d.map((function(e,t){var n=r[l+t];return n.length>e.length?n:e})),u.value=e.join(d)}else u.value=e.join(n.slice(a,a+u.count));a+=u.count,u.added||(l+=u.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,u=e.length,s=1,d=l+u,b=[{newPos:-1,components:[]}],f=this.extractCommon(b[0],t,e,0);if(b[0].newPos+1>=l&&f+1>=u)return a([{value:this.join(t),count:t.length}]);function p(){for(var n=-1*s;n<=s;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<u;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>=u)return a(o(i,r.components,t,e,i.useLongestToken));b[n]=r}else b[n]=void 0}s++}if(r)!function e(){setTimeout((function(){if(s>d)return r();p()||e()}),0)}();else for(;s<=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("")}}},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:"M2 2h5v11H2V2zm6 0h5v5H8V2zm6 0h4v16h-4V2zM8 8h5v5H8V8zm-6 6h11v4H2v-4z"}));t.a=c},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},,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(e,t,n){"use strict";n.r(t),n.d(t,"getColorClassName",(function(){return se})),n.d(t,"getColorObjectByAttributeValues",(function(){return le})),n.d(t,"getColorObjectByColorValue",(function(){return ue})),n.d(t,"createCustomColorsHOC",(function(){return rn})),n.d(t,"withColors",(function(){return on})),n.d(t,"__experimentalUseColors",(function(){return kn})),n.d(t,"__experimentalGetGradientClass",(function(){return pe})),n.d(t,"getGradientValueBySlug",(function(){return me})),n.d(t,"__experimentalGetGradientObjectByGradientValue",(function(){return ve})),n.d(t,"getGradientSlugByValue",(function(){return Oe})),n.d(t,"__experimentalUseGradient",(function(){return ge})),n.d(t,"getFontSize",(function(){return gt})),n.d(t,"getFontSizeClass",(function(){return jt})),n.d(t,"getFontSizeObjectByValue",(function(){return ht})),n.d(t,"FontSizePicker",(function(){return kt})),n.d(t,"withFontSizes",(function(){return wn})),n.d(t,"AlignmentToolbar",(function(){return Dn})),n.d(t,"Autocomplete",(function(){return Qn})),n.d(t,"BlockAlignmentToolbar",(function(){return R})),n.d(t,"__experimentalBlockAlignmentMatrixToolbar",(function(){return Zn})),n.d(t,"BlockBreadcrumb",(function(){return er})),n.d(t,"BlockContextProvider",(function(){return or})),n.d(t,"BlockControls",(function(){return O.a})),n.d(t,"BlockColorsStyleSelector",(function(){return lr})),n.d(t,"BlockEdit",(function(){return dr})),n.d(t,"useBlockEditContext",(function(){return U.b})),n.d(t,"BlockFormatControls",(function(){return vr})),n.d(t,"BlockIcon",(function(){return $n})),n.d(t,"BlockNavigationDropdown",(function(){return Js})),n.d(t,"__experimentalBlockNavigationBlockFill",(function(){return Ls})),n.d(t,"__experimentalBlockNavigationEditor",(function(){return pd})),n.d(t,"__experimentalBlockNavigationTree",(function(){return Ys})),n.d(t,"__experimentalBlockVariationPicker",(function(){return vd})),n.d(t,"BlockVerticalAlignmentToolbar",(function(){return Ed})),n.d(t,"ButtonBlockerAppender",(function(){return Xa})),n.d(t,"ColorPalette",(function(){return Id})),n.d(t,"ColorPaletteControl",(function(){return Bd})),n.d(t,"ContrastChecker",(function(){return He})),n.d(t,"__experimentalGradientPicker",(function(){return Td})),n.d(t,"__experimentalGradientPickerControl",(function(){return Nd})),n.d(t,"__experimentalGradientPickerPanel",(function(){return Dd})),n.d(t,"__experimentalColorGradientControl",(function(){return Be})),n.d(t,"__experimentalPanelColorGradientSettings",(function(){return Le})),n.d(t,"__experimentalImageSizeControl",(function(){return Ad})),n.d(t,"InnerBlocks",(function(){return Yd})),n.d(t,"__experimentalUseInnerBlocksProps",(function(){return $d})),n.d(t,"InspectorAdvancedControls",(function(){return $})),n.d(t,"InspectorControls",(function(){return qe})),n.d(t,"__experimentalLinkControl",(function(){return Bb})),n.d(t,"__experimentalLinkControlSearchInput",(function(){return yb})),n.d(t,"__experimentalLinkControlSearchResults",(function(){return db})),n.d(t,"__experimentalLinkControlSearchItem",(function(){return sb})),n.d(t,"LineHeightControl",(function(){return dt})),n.d(t,"MediaReplaceFlow",(function(){return Db})),n.d(t,"MediaPlaceholder",(function(){return Vb})),n.d(t,"MediaUpload",(function(){return Tb})),n.d(t,"MediaUploadCheck",(function(){return Nb})),n.d(t,"PanelColorSettings",(function(){return sn})),n.d(t,"PlainText",(function(){return Ub})),n.d(t,"__experimentalResponsiveBlockControl",(function(){return Wb})),n.d(t,"RichText",(function(){return fd})),n.d(t,"RichTextShortcut",(function(){return Kb})),n.d(t,"RichTextToolbarButton",(function(){return qb})),n.d(t,"__unstableRichTextInputEvent",(function(){return Yb})),n.d(t,"ToolSelector",(function(){return Qb})),n.d(t,"__experimentalUnitControl",(function(){return Pt})),n.d(t,"URLInput",(function(){return ib})),n.d(t,"URLInputButton",(function(){return tf})),n.d(t,"URLPopover",(function(){return Lb})),n.d(t,"__experimentalImageURLInputUI",(function(){return cf})),n.d(t,"withColorContext",(function(){return Sd})),n.d(t,"__experimentalBlockSettingsMenuFirstItem",(function(){return Ku})),n.d(t,"__experimentalInserterMenuExtension",(function(){return Il})),n.d(t,"__experimentalPreviewOptions",(function(){return lf})),n.d(t,"__experimentalUseResizeCanvas",(function(){return mf})),n.d(t,"BlockInspector",(function(){return kf})),n.d(t,"BlockList",(function(){return bl})),n.d(t,"__experimentalBlock",(function(){return Es})),n.d(t,"useBlockProps",(function(){return ys})),n.d(t,"BlockMover",(function(){return ku})),n.d(t,"BlockPreview",(function(){return ml})),n.d(t,"BlockSelectionClearer",(function(){return yf})),n.d(t,"BlockSettingsMenu",(function(){return ts})),n.d(t,"BlockSettingsMenuControls",(function(){return Zu})),n.d(t,"BlockTitle",(function(){return Jn})),n.d(t,"BlockToolbar",(function(){return as})),n.d(t,"CopyHandler",(function(){return Fu})),n.d(t,"DefaultBlockAppender",(function(){return Ya})),n.d(t,"__unstableEditorStyles",(function(){return qf})),n.d(t,"Inserter",(function(){return cu})),n.d(t,"__experimentalLibrary",(function(){return $f})),n.d(t,"__experimentalSearchForm",(function(){return fo})),n.d(t,"BlockEditorKeyboardShortcuts",(function(){return Xf})),n.d(t,"MultiSelectScrollIntoView",(function(){return Qf})),n.d(t,"NavigableToolbar",(function(){return Ou})),n.d(t,"ObserveTyping",(function(){return Jf})),n.d(t,"PreserveScrollInReorder",(function(){return ep})),n.d(t,"SkipToSelectedBlock",(function(){return vf})),n.d(t,"Typewriter",(function(){return cp})),n.d(t,"Warning",(function(){return zr})),n.d(t,"WritingFlow",(function(){return su})),n.d(t,"BlockEditorProvider",(function(){return qa})),n.d(t,"__experimentalUseSimulatedMediaQuery",(function(){return pf})),n.d(t,"__experimentalUseEditorFeature",(function(){return be})),n.d(t,"transformStyles",(function(){return Kf})),n.d(t,"validateThemeColors",(function(){return ip})),n.d(t,"validateThemeGradients",(function(){return ap})),n.d(t,"storeConfig",(function(){return Ga})),n.d(t,"SETTINGS_DEFAULTS",(function(){return vo}));var r={};n.r(r),n.d(r,"resetBlocks",(function(){return nc})),n.d(r,"resetSelection",(function(){return rc})),n.d(r,"receiveBlocks",(function(){return oc})),n.d(r,"updateBlockAttributes",(function(){return cc})),n.d(r,"updateBlock",(function(){return ic})),n.d(r,"selectBlock",(function(){return ac})),n.d(r,"selectPreviousBlock",(function(){return lc})),n.d(r,"selectNextBlock",(function(){return uc})),n.d(r,"startMultiSelect",(function(){return sc})),n.d(r,"stopMultiSelect",(function(){return dc})),n.d(r,"multiSelect",(function(){return bc})),n.d(r,"clearSelectedBlock",(function(){return fc})),n.d(r,"toggleSelection",(function(){return pc})),n.d(r,"replaceBlocks",(function(){return vc})),n.d(r,"replaceBlock",(function(){return Oc})),n.d(r,"moveBlocksDown",(function(){return hc})),n.d(r,"moveBlocksUp",(function(){return jc})),n.d(r,"moveBlocksToPosition",(function(){return kc})),n.d(r,"moveBlockToPosition",(function(){return yc})),n.d(r,"insertBlock",(function(){return _c})),n.d(r,"insertBlocks",(function(){return Ec})),n.d(r,"showInsertionPoint",(function(){return Cc})),n.d(r,"hideInsertionPoint",(function(){return wc})),n.d(r,"setTemplateValidity",(function(){return Sc})),n.d(r,"synchronizeTemplate",(function(){return Ic})),n.d(r,"mergeBlocks",(function(){return Bc})),n.d(r,"removeBlocks",(function(){return xc})),n.d(r,"removeBlock",(function(){return Pc})),n.d(r,"replaceInnerBlocks",(function(){return Tc})),n.d(r,"toggleBlockMode",(function(){return Nc})),n.d(r,"startTyping",(function(){return Dc})),n.d(r,"stopTyping",(function(){return Rc})),n.d(r,"startDraggingBlocks",(function(){return Ac})),n.d(r,"stopDraggingBlocks",(function(){return Mc})),n.d(r,"enterFormattedText",(function(){return Lc})),n.d(r,"exitFormattedText",(function(){return Fc})),n.d(r,"selectionChange",(function(){return Vc})),n.d(r,"insertDefaultBlock",(function(){return Hc})),n.d(r,"updateBlockListSettings",(function(){return zc})),n.d(r,"updateSettings",(function(){return Uc})),n.d(r,"__unstableSaveReusableBlock",(function(){return Gc})),n.d(r,"__unstableMarkLastChangeAsPersistent",(function(){return Wc})),n.d(r,"__unstableMarkNextChangeAsNotPersistent",(function(){return Kc})),n.d(r,"__unstableMarkAutomaticChange",(function(){return qc})),n.d(r,"setNavigationMode",(function(){return $c})),n.d(r,"setBlockMovingClientId",(function(){return Yc})),n.d(r,"duplicateBlocks",(function(){return Xc})),n.d(r,"insertBeforeBlock",(function(){return Qc})),n.d(r,"insertAfterBlock",(function(){return Zc})),n.d(r,"toggleBlockHighlight",(function(){return Jc})),n.d(r,"flashBlock",(function(){return ei})),n.d(r,"setHasControlledInnerBlocks",(function(){return ti}));var o={};n.r(o),n.d(o,"getBlockName",(function(){return ui})),n.d(o,"isBlockValid",(function(){return si})),n.d(o,"getBlockAttributes",(function(){return di})),n.d(o,"getBlock",(function(){return bi})),n.d(o,"__unstableGetBlockWithoutInnerBlocks",(function(){return fi})),n.d(o,"getBlocks",(function(){return pi})),n.d(o,"__unstableGetBlockWithBlockTree",(function(){return mi})),n.d(o,"__unstableGetBlockTree",(function(){return vi})),n.d(o,"getClientIdsOfDescendants",(function(){return Oi})),n.d(o,"getClientIdsWithDescendants",(function(){return gi})),n.d(o,"getGlobalBlockCount",(function(){return hi})),n.d(o,"getBlocksByClientId",(function(){return ji})),n.d(o,"getBlockCount",(function(){return ki})),n.d(o,"getSelectionStart",(function(){return yi})),n.d(o,"getSelectionEnd",(function(){return _i})),n.d(o,"getBlockSelectionStart",(function(){return Ei})),n.d(o,"getBlockSelectionEnd",(function(){return Ci})),n.d(o,"getSelectedBlockCount",(function(){return wi})),n.d(o,"hasSelectedBlock",(function(){return Si})),n.d(o,"getSelectedBlockClientId",(function(){return Ii})),n.d(o,"getSelectedBlock",(function(){return Bi})),n.d(o,"getBlockRootClientId",(function(){return xi})),n.d(o,"getBlockParents",(function(){return Pi})),n.d(o,"getBlockParentsByBlockName",(function(){return Ti})),n.d(o,"getBlockHierarchyRootClientId",(function(){return Ni})),n.d(o,"getLowestCommonAncestorWithSelectedBlock",(function(){return Di})),n.d(o,"getAdjacentBlockClientId",(function(){return Ri})),n.d(o,"getPreviousBlockClientId",(function(){return Ai})),n.d(o,"getNextBlockClientId",(function(){return Mi})),n.d(o,"getSelectedBlocksInitialCaretPosition",(function(){return Li})),n.d(o,"getSelectedBlockClientIds",(function(){return Fi})),n.d(o,"getMultiSelectedBlockClientIds",(function(){return Vi})),n.d(o,"getMultiSelectedBlocks",(function(){return Hi})),n.d(o,"getFirstMultiSelectedBlockClientId",(function(){return zi})),n.d(o,"getLastMultiSelectedBlockClientId",(function(){return Ui})),n.d(o,"isFirstMultiSelectedBlock",(function(){return Gi})),n.d(o,"isBlockMultiSelected",(function(){return Wi})),n.d(o,"isAncestorMultiSelected",(function(){return Ki})),n.d(o,"getMultiSelectedBlocksStartClientId",(function(){return qi})),n.d(o,"getMultiSelectedBlocksEndClientId",(function(){return $i})),n.d(o,"getBlockOrder",(function(){return Yi})),n.d(o,"getBlockIndex",(function(){return Xi})),n.d(o,"isBlockSelected",(function(){return Qi})),n.d(o,"hasSelectedInnerBlock",(function(){return Zi})),n.d(o,"isBlockWithinSelection",(function(){return Ji})),n.d(o,"hasMultiSelection",(function(){return ea})),n.d(o,"isMultiSelecting",(function(){return ta})),n.d(o,"isSelectionEnabled",(function(){return na})),n.d(o,"getBlockMode",(function(){return ra})),n.d(o,"isTyping",(function(){return oa})),n.d(o,"isDraggingBlocks",(function(){return ca})),n.d(o,"getDraggedBlockClientIds",(function(){return ia})),n.d(o,"isBlockBeingDragged",(function(){return aa})),n.d(o,"isAncestorBeingDragged",(function(){return la})),n.d(o,"isCaretWithinFormattedText",(function(){return ua})),n.d(o,"getBlockInsertionPoint",(function(){return sa})),n.d(o,"isBlockInsertionPointVisible",(function(){return da})),n.d(o,"isValidTemplate",(function(){return ba})),n.d(o,"getTemplate",(function(){return fa})),n.d(o,"getTemplateLock",(function(){return pa})),n.d(o,"canInsertBlockType",(function(){return va})),n.d(o,"canInsertBlocks",(function(){return Oa})),n.d(o,"getInserterItems",(function(){return ka})),n.d(o,"hasInserterItems",(function(){return ya})),n.d(o,"__experimentalGetAllowedBlocks",(function(){return _a})),n.d(o,"getBlockListSettings",(function(){return Ea})),n.d(o,"getSettings",(function(){return Ca})),n.d(o,"isLastBlockChangePersistent",(function(){return wa})),n.d(o,"__experimentalGetBlockListSettingsForBlocks",(function(){return Sa})),n.d(o,"__experimentalGetParsedReusableBlock",(function(){return Ia})),n.d(o,"__unstableIsLastBlockChangeIgnored",(function(){return Ba})),n.d(o,"__experimentalGetLastBlockAttributeChanges",(function(){return xa})),n.d(o,"isNavigationMode",(function(){return Ta})),n.d(o,"hasBlockMovingClientId",(function(){return Na})),n.d(o,"didAutomaticChange",(function(){return Da})),n.d(o,"isBlockHighlighted",(function(){return Ra})),n.d(o,"areInnerBlocksControlled",(function(){return Aa})),n.d(o,"__experimentalGetActiveBlockIdByBlockNames",(function(){return Ma}));var c=n(12),i=n(26),a=(n(105),n(56)),l=(n(84),n(8)),u=n(6),s=n(0),d=n(10),b=n.n(d),f=n(2),p=n(13),m=n(32),v=n(4),O=n(136),g=n(1),h=n(3),j=n(7),k=Object(s.createElement)(j.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(s.createElement)(j.Path,{d:"M4 9v6h14V9H4zm8-4.8H4v1.5h8V4.2zM4 19.8h8v-1.5H4v1.5z"})),y=Object(s.createElement)(j.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(s.createElement)(j.Path,{d:"M5 15h14V9H5v6zm0 4.8h14v-1.5H5v1.5zM5 4.2v1.5h14V4.2H5z"})),_=Object(s.createElement)(j.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(s.createElement)(j.Path,{d:"M6 15h14V9H6v6zm6-10.8v1.5h8V4.2h-8zm0 15.6h8v-1.5h-8v1.5z"})),E=Object(s.createElement)(j.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(s.createElement)(j.Path,{d:"M5 9v6h14V9H5zm11-4.8H8v1.5h8V4.2zM8 19.8h8v-1.5H8v1.5z"})),C=Object(s.createElement)(j.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(s.createElement)(j.Path,{d:"M5 4v11h14V4H5zm3 15.8h8v-1.5H8v1.5z"})),w={type:"default"},S=Object(s.createContext)(w),I=S.Provider;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}function x(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(u.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}var P={left:{icon:k,title:Object(g.__)("Align left")},center:{icon:y,title:Object(g.__)("Align center")},right:{icon:_,title:Object(g.__)("Align right")},wide:{icon:E,title:Object(g.__)("Wide width")},full:{icon:C,title:Object(g.__)("Full width")}},T=["left","center","right","wide","full"],N=["wide","full"],D={isAlternate:!0};var R=function(e){var t=e.value,n=e.onChange,r=e.controls,o=void 0===r?T:r,c=e.isCollapsed,i=void 0===c||c,a=Object(v.useSelect)((function(e){return{wideControlsEnabled:(0,e("core/block-editor").getSettings)().alignWide}})).wideControlsEnabled,l=void 0!==a&&a,u=Object(s.useContext)(S);if(!("default"===u.type))return null;var d=u.alignments,b=void 0===d?T:d,f=o.filter((function(e){return(l||!N.includes(e))&&b.includes(e)}));if(0===f.length)return null;var p=P[t],m=P.center;return Object(s.createElement)(h.ToolbarGroup,{popoverProps:D,isCollapsed:i,icon:p?p.icon:m.icon,label:Object(g.__)("Change alignment"),controls:f.map((function(e){return x(x({},P[e]),{},{isActive:t===e,role:i?"menuitemradio":void 0,onClick:(r=e,function(){return n(t===r?void 0:r)})});var r}))})};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}function M(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(u.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}var L=["left","center","right","wide","full"],F=["wide","full"];function V(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)?L.filter((function(t){return e.includes(t)})):!0===e?L:[],!r||!0===e&&!n?f.without.apply(void 0,[t].concat(F)):t}var H=Object(p.createHigherOrderComponent)((function(e){return function(t){var n=t.name,r=V(Object(c.getBlockSupport)(n,"align"),Object(c.hasBlockSupport)(n,"alignWide",!0));return[r.length>0&&t.isSelected&&Object(s.createElement)(O.a,{key:"align-controls"},Object(s.createElement)(R,{value:t.attributes.align,onChange:function(e){var n,r;e||(null===(n=Object(c.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(s.createElement)(e,Object(l.a)({key:"edit"},t))]}}),"withToolbarControls"),z=Object(p.createHigherOrderComponent)((function(e){return function(t){var n=t.name,r=t.attributes.align,o=Object(v.useSelect)((function(e){return!!e("core/block-editor").getSettings().alignWide}),[]);if(void 0===r)return Object(s.createElement)(e,t);var i=V(Object(c.getBlockSupport)(n,"align"),Object(c.hasBlockSupport)(n,"alignWide",!0),o),a=t.wrapperProps;return i.includes(r)&&(a=M(M({},a),{},{"data-align":r})),Object(s.createElement)(e,Object(l.a)({},t,{wrapperProps:a}))}}));Object(m.addFilter)("blocks.registerBlockType","core/align/addAttribute",(function(e){return Object(f.has)(e.attributes,["align","type"])||Object(c.hasBlockSupport)(e,"align")&&(e.attributes=M(M({},e.attributes),{},{align:{type:"string",enum:[].concat(L,[""])}})),e})),Object(m.addFilter)("editor.BlockListBlock","core/editor/align/with-data-align",z),Object(m.addFilter)("editor.BlockEdit","core/editor/align/with-toolbar-controls",H),Object(m.addFilter)("blocks.getSaveContent.extraProps","core/align/addAssignedAlign",(function(e,t,n){var r=n.align;return V(Object(c.getBlockSupport)(t,"align"),Object(c.hasBlockSupport)(t,"alignWide",!0)).includes(r)&&(e.className=b()("align".concat(r),e.className)),e}));var U=n(91),G=Object(h.createSlotFill)("InspectorAdvancedControls"),W=G.Fill,K=G.Slot;function q(e){var t=e.children;return Object(U.b)().isSelected?Object(s.createElement)(W,null,t):null}q.slotName="InspectorAdvancedControls",q.Slot=K;var $=q;function Y(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 X(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Y(Object(n),!0).forEach((function(t){Object(u.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Y(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Q=/[\s#]/g;var Z=Object(p.createHigherOrderComponent)((function(e){return function(t){return Object(c.hasBlockSupport)(t.name,"anchor")&&t.isSelected?Object(s.createElement)(s.Fragment,null,Object(s.createElement)(e,t),Object(s.createElement)($,null,Object(s.createElement)(h.TextControl,{className:"html-anchor-control",label:Object(g.__)("HTML anchor"),help:Object(s.createElement)(s.Fragment,null,Object(g.__)("Enter a word or two — without spaces — to make a unique web address just for this heading, called an “anchor.” Then, you’ll be able to link directly to this section of your page."),Object(s.createElement)(h.ExternalLink,{href:"https://wordpress.org/support/article/page-jumps/"},Object(g.__)("Learn more about anchors"))),value:t.attributes.anchor||"",onChange:function(e){e=e.replace(Q,"-"),t.setAttributes({anchor:e})},autoComplete:"off"}))):Object(s.createElement)(e,t)}}),"withInspectorControl");function J(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 ee(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?J(Object(n),!0).forEach((function(t){Object(u.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):J(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}Object(m.addFilter)("blocks.registerBlockType","core/anchor/attribute",(function(e){return Object(f.has)(e.attributes,["anchor","type"])||Object(c.hasBlockSupport)(e,"anchor")&&(e.attributes=X(X({},e.attributes),{},{anchor:{type:"string",source:"attribute",attribute:"id",selector:"*"}})),e})),Object(m.addFilter)("editor.BlockEdit","core/editor/anchor/with-inspector-control",Z),Object(m.addFilter)("blocks.getSaveContent.extraProps","core/anchor/save-props",(function(e,t,n){return Object(c.hasBlockSupport)(t,"anchor")&&(e.id=""===n.anchor?null:n.anchor),e}));var te=Object(p.createHigherOrderComponent)((function(e){return function(t){return Object(c.hasBlockSupport)(t.name,"customClassName",!0)&&t.isSelected?Object(s.createElement)(s.Fragment,null,Object(s.createElement)(e,t),Object(s.createElement)($,null,Object(s.createElement)(h.TextControl,{autoComplete:"off",label:Object(g.__)("Additional CSS class(es)"),value:t.attributes.className||"",onChange:function(e){t.setAttributes({className:""!==e?e:void 0})},help:Object(g.__)("Separate multiple classes with spaces.")}))):Object(s.createElement)(e,t)}}),"withInspectorControl");function ne(e){e="<div data-custom-class-name>".concat(e,"</div>");var t=Object(c.parseWithAttributeSchema)(e,{type:"string",source:"attribute",selector:"[data-custom-class-name] > *",attribute:"class"});return t?t.trim().split(/\s+/):[]}Object(m.addFilter)("blocks.registerBlockType","core/custom-class-name/attribute",(function(e){return Object(c.hasBlockSupport)(e,"customClassName",!0)&&(e.attributes=ee(ee({},e.attributes),{},{className:{type:"string"}})),e})),Object(m.addFilter)("editor.BlockEdit","core/editor/custom-class-name/with-inspector-control",te),Object(m.addFilter)("blocks.getSaveContent.extraProps","core/custom-class-name/save-props",(function(e,t,n){return Object(c.hasBlockSupport)(t,"customClassName",!0)&&n.className&&(e.className=b()(e.className,n.className)),e})),Object(m.addFilter)("blocks.getBlockAttributes","core/custom-class-name/addParsedDifference",(function(e,t,n){if(Object(c.hasBlockSupport)(t,"customClassName",!0)){var r=Object(f.omit)(e,["className"]),o=Object(c.getSaveContent)(t,r),i=ne(o),a=ne(n),l=Object(f.difference)(a,i);l.length?e.className=l.join(" "):o&&delete e.className}return e}));var re=n(16);Object(m.addFilter)("blocks.getSaveContent.extraProps","core/generated-class-name/save-props",(function(e,t){return Object(c.hasBlockSupport)(t,"className",!0)&&("string"==typeof e.className?e.className=Object(f.uniq)([Object(c.getBlockDefaultClassName)(t.name)].concat(Object(re.a)(e.className.split(" ")))).join(" ").trim():e.className=Object(c.getBlockDefaultClassName)(t.name)),e}));var oe=n(9),ce=n(149),ie=n(79),ae=n.n(ie),le=function(e,t,n){if(t){var r=Object(f.find)(e,{slug:t});if(r)return r}return{color:n}},ue=function(e,t){return Object(f.find)(e,{color:t})};function se(e,t){if(e&&t)return"has-".concat(Object(f.kebabCase)(t),"-").concat(e)}var de={"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}};function be(e){var t=Object(U.b)().name;return Object(v.useSelect)((function(n){var r,o=n("core/block-editor").getSettings(),c="__experimentalFeatures.global.".concat(e),i="__experimentalFeatures.".concat(t,".").concat(e),a=null!==(r=Object(f.get)(o,i))&&void 0!==r?r:Object(f.get)(o,c);if(void 0!==a)return a;var l=de[e]?de[e](o):void 0;return void 0!==l?l:"typography.dropCap"===e||void 0}),[t,e])}var fe=[];function pe(e){if(e)return"has-".concat(e,"-gradient-background")}function me(e,t){var n=Object(f.find)(e,["slug",t]);return n&&n.gradient}function ve(e,t){return Object(f.find)(e,["gradient",t])}function Oe(e,t){var n=ve(e,t);return n&&n.slug}function ge(){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=Object(U.b)(),i=c.clientId,a=be("color.gradients")||fe,l=Object(v.useSelect)((function(e){var t=(0,e("core/block-editor").getBlockAttributes)(i);return{customGradient:t[o],gradient:t[n]}}),[i,n,o]),d=l.gradient,b=l.customGradient,f=Object(v.useDispatch)("core/block-editor"),p=f.updateBlockAttributes,m=Object(s.useCallback)((function(e){var t,r,c=Oe(a,e);c?p(i,(r={},Object(u.a)(r,n,c),Object(u.a)(r,o,void 0),r)):p(i,(t={},Object(u.a)(t,n,void 0),Object(u.a)(t,o,e),t))}),[a,i,p]),O=pe(d);return{gradientClass:O,gradientValue:d?me(a,d):b,setGradient:m}}var he=function e(t){if(!Object(f.isObject)(t))return t;var n=Object(f.pickBy)(Object(f.mapValues)(t,e),f.identity);return Object(f.isEqual)(n,{})?void 0:n},je=n(15);function ke(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 ye(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ke(Object(n),!0).forEach((function(t){Object(u.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ke(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}
2
  // translators: first %s: the color name or value (e.g. red or #ff0000)
3
+ var _e=Object(g.__)("(Color: %s)"),Ee=Object(g.__)("(Gradient: %s)"),Ce=["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%)
4
+ function we(e){var t,n,r=e.colors,o=e.gradients,c=e.label,i=e.currentTab,a=e.colorValue,l=e.gradientValue;if("color"===i){if(a){var u=ue(r,t=a),d=u&&u.name;n=Object(g.sprintf)(_e,d||t)}}else if("gradient"===i&&l){var b=ve(o,t=l),f=b&&b.name;n=Object(g.sprintf)(Ee,f||t)}return Object(s.createElement)(s.Fragment,null,c,!!t&&Object(s.createElement)(h.ColorIndicator,{colorValue:t,"aria-label":n}))}function Se(e){var t=e.colors,n=e.gradients,r=e.disableCustomColors,o=e.disableCustomGradients,c=e.className,i=e.label,a=e.onColorChange,u=e.onGradientChange,d=e.colorValue,p=e.gradientValue,m=a&&(!Object(f.isEmpty)(t)||!r),v=u&&(!Object(f.isEmpty)(n)||!o),O=Object(s.useState)(p?"gradient":!!m&&"color"),j=Object(oe.a)(O,2),k=j[0],y=j[1];return m||v?Object(s.createElement)(h.BaseControl,{className:b()("block-editor-color-gradient-control",c)},Object(s.createElement)("fieldset",null,Object(s.createElement)("legend",null,Object(s.createElement)("div",{className:"block-editor-color-gradient-control__color-indicator"},Object(s.createElement)(h.BaseControl.VisualLabel,null,Object(s.createElement)(we,{currentTab:k,label:i,colorValue:d,gradientValue:p})))),m&&v&&Object(s.createElement)(h.ButtonGroup,{className:"block-editor-color-gradient-control__button-tabs"},Object(s.createElement)(h.Button,{isSmall:!0,isPressed:"color"===k,onClick:function(){return y("color")}},Object(g.__)("Solid")),Object(s.createElement)(h.Button,{isSmall:!0,isPressed:"gradient"===k,onClick:function(){return y("gradient")}},Object(g.__)("Gradient"))),("color"===k||!v)&&Object(s.createElement)(h.ColorPalette,Object(l.a)({value:d,onChange:v?function(e){a(e),u()}:a},{colors:t,disableCustomColors:r})),("gradient"===k||!m)&&Object(s.createElement)(h.__experimentalGradientPicker,Object(l.a)({value:p,onChange:m?function(e){u(e),a()}:u},{gradients:n,disableCustomGradients:o})))):null}function Ie(e){var t={};return t.colors=be("color.palette"),t.gradients=be("color.gradients"),t.disableCustomColors=!be("color.custom"),t.disableCustomGradients=!be("color.customGradient"),Object(s.createElement)(Se,ye(ye({},t),e))}var Be=function(e){return Object(f.every)(Ce,(function(t){return e.hasOwnProperty(t)}))?Object(s.createElement)(Se,e):Object(s.createElement)(Ie,e)};function xe(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 Pe(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?xe(Object(n),!0).forEach((function(t){Object(u.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):xe(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}
5
  // 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)
6
+ var Te=Object(g.__)("(%s: color %s)"),Ne=Object(g.__)("(%s: gradient %s)"),De=["colors","disableCustomColors","gradients","disableCustomGradients"],Re=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,l=e.colors,u=e.gradients;if(!c&&!i)return null;if(c){var d=ue(l||t,c);o=Object(g.sprintf)(Te,a.toLowerCase(),d&&d.name||c)}else{var b=ve(u||n,c);o=Object(g.sprintf)(Ne,a.toLowerCase(),b&&b.name||i)}return Object(s.createElement)(h.ColorIndicator,{key:r,colorValue:c||i,"aria-label":o})}))},Ae=function(e){var t=e.className,n=e.colors,r=e.gradients,o=e.disableCustomColors,c=e.disableCustomGradients,i=e.children,a=e.settings,u=e.title,d=Object(je.a)(e,["className","colors","gradients","disableCustomColors","disableCustomGradients","children","settings","title"]);if(Object(f.isEmpty)(n)&&Object(f.isEmpty)(r)&&o&&c&&Object(f.every)(a,(function(e){return Object(f.isEmpty)(e.colors)&&Object(f.isEmpty)(e.gradients)&&(void 0===e.disableCustomColors||e.disableCustomColors)&&(void 0===e.disableCustomGradients||e.disableCustomGradients)})))return null;var p=Object(s.createElement)("span",{className:"block-editor-panel-color-gradient-settings__panel-title"},u,Object(s.createElement)(Re,{colors:n,gradients:r,settings:a}));return Object(s.createElement)(h.PanelBody,Object(l.a)({className:b()("block-editor-panel-color-gradient-settings",t),title:p},d),a.map((function(e,t){return Object(s.createElement)(Be,Object(l.a)({key:t},Pe({colors:n,gradients:r,disableCustomColors:o,disableCustomGradients:c},e)))})),i)},Me=function(e){var t={};return t.colors=be("color.palette"),t.gradients=be("color.gradients"),t.disableCustomColors=!be("color.custom"),t.disableCustomGradients=!be("color.customGradient"),Object(s.createElement)(Ae,Pe(Pe({},t),e))},Le=function(e){return Object(f.every)(De,(function(t){return e.hasOwnProperty(t)}))?Object(s.createElement)(Ae,e):Object(s.createElement)(Me,e)},Fe=n(53);// 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)
7
+ function Ve(e){var t=e.tinyBackgroundColor,n=e.tinyTextColor,r=e.backgroundColor,o=e.textColor,c=t.getBrightness()<n.getBrightness()?Object(g.__)("This color combination may be hard for people to read. Try using a darker background color and/or a brighter text color."):Object(g.__)("This color combination may be hard for people to read. Try using a brighter background color and/or a darker text color.");return Object(s.useEffect)((function(){Object(Fe.speak)(Object(g.__)("This color combination may be hard for people to read."))}),[r,o]),Object(s.createElement)("div",{className:"block-editor-contrast-checker"},Object(s.createElement)(h.Notice,{spokenMessage:null,status:"warning",isDismissible:!1},c))}var He=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=ae()(t||n),l=ae()(i||r);return 1!==a.getAlpha()||1!==l.getAlpha()||ae.a.isReadable(a,l,{level:"AA",size:c||!1!==c&&o>=24?"large":"small"})?null:Object(s.createElement)(Ve,{backgroundColor:t,textColor:i,tinyBackgroundColor:a,tinyTextColor:l})},ze=n(173),Ue=Object(h.createSlotFill)("InspectorControls"),Ge=Ue.Fill,We=Ue.Slot;function Ke(e){var t=e.children;return Object(ze.a)()?Object(s.createElement)(Ge,null,t):null}Ke.Slot=We;var qe=Ke;function $e(e){return document.getElementById("block-"+e)}function Ye(e,t){return t.closest(".block-editor-block-list__block")===e}function Xe(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 Qe(e){return e.ownerDocument.defaultView.getComputedStyle(e)}function Ze(e){var t=e.settings,n=e.clientId,r=e.enableContrastChecking,o=void 0===r||r,c=Object(s.useState)(),i=Object(oe.a)(c,2),a=i[0],l=i[1],u=Object(s.useState)(),d=Object(oe.a)(u,2),b=d[0],f=d[1];return Object(s.useEffect)((function(){if(o){var e=$e(n);if(e){f(Qe(e).color);for(var t=e,r=Qe(t).backgroundColor;"rgba(0, 0, 0, 0)"===r&&t.parentNode&&t.parentNode.nodeType===t.parentNode.ELEMENT_NODE;)r=Qe(t=t.parentNode).backgroundColor;l(r)}}})),Object(s.createElement)(qe,null,Object(s.createElement)(Le,{title:Object(g.__)("Color settings"),initialOpen:!1,settings:t},o&&Object(s.createElement)(He,{backgroundColor:a,textColor:b})))}function Je(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 et(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Je(Object(n),!0).forEach((function(t){Object(u.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Je(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var tt=[],nt=function(e){if("web"!==s.Platform.OS)return!1;var t=Object(c.getBlockSupport)(e,"color");return t&&(!0===t.link||!0===t.gradient||!1!==t.background||!1!==t.text)},rt=function(e){if("web"!==s.Platform.OS)return!1;var t=Object(c.getBlockSupport)(e,"color");return Object(f.isObject)(t)&&!!t.link},ot=function(e){if("web"!==s.Platform.OS)return!1;var t=Object(c.getBlockSupport)(e,"color");return Object(f.isObject)(t)&&!!t.gradients},ct=function(e){if("web"!==s.Platform.OS)return!1;var t=Object(c.getBlockSupport)(e,"color");return t&&!1!==t.text};function it(e,t,n){var r,o,c,i,a,l;if(!nt(t))return e;var s=ot(t),d=n.backgroundColor,f=n.textColor,p=n.gradient,m=n.style,v=se("background-color",d),O=pe(p),g=se("color",f),h=b()(e.className,g,O,(l={},Object(u.a)(l,v,!(s&&(null==m||null===(r=m.color)||void 0===r?void 0:r.gradient)||!v)),Object(u.a)(l,"has-text-color",f||(null==m||null===(o=m.color)||void 0===o?void 0:o.text)),Object(u.a)(l,"has-background",d||(null==m||null===(c=m.color)||void 0===c?void 0:c.background)||s&&(p||(null==m||null===(i=m.color)||void 0===i?void 0:i.gradient))),Object(u.a)(l,"has-link-color",null==m||null===(a=m.color)||void 0===a?void 0:a.link),l));return e.className=h||void 0,e}var at=function(e,t){var n=/var:preset\|color\|(.+)/.exec(t);return n&&n[1]?le(e,n[1]).color:t};function lt(e){var t,n,r,o,i,a,l=e.name,d=e.attributes,b=be("color.link"),f=be("color.palette")||tt,p=be("color.gradients")||tt,m=Object(s.useRef)(d);if(Object(s.useEffect)((function(){m.current=d}),[d]),!nt(l))return null;var v,O=function(e){if("web"!==s.Platform.OS)return!1;var t=Object(c.getBlockSupport)(e,"color");return t&&!1!==t.background}(l),h=ot(l),j=d.style,k=d.textColor,y=d.backgroundColor,_=d.gradient;if(h&&_)v=me(p,_);else if(h){var E;v=null==j||null===(E=j.color)||void 0===E?void 0:E.gradient}var C=function(t){return function(n){var r,o,c=ue(f,n),i=t+"Color",a=et(et({},m.current.style),{},{color:et(et({},null===(r=m.current)||void 0===r||null===(o=r.style)||void 0===o?void 0:o.color),{},Object(u.a)({},t,(null==c?void 0:c.slug)?void 0:n))}),l=(null==c?void 0:c.slug)?c.slug:void 0,s=Object(u.a)({style:he(a)},i,l);e.setAttributes(s),m.current=et(et({},m.current),s)}};return Object(s.createElement)(Ze,{enableContrastChecking:"web"===s.Platform.OS&&!_&&!(null==j||null===(t=j.color)||void 0===t?void 0:t.gradient),clientId:e.clientId,settings:[].concat(Object(re.a)(ct(l)?[{label:Object(g.__)("Text Color"),onColorChange:C("text"),colorValue:le(f,k,null==j||null===(n=j.color)||void 0===n?void 0:n.text).color}]:[]),Object(re.a)(O||h?[{label:Object(g.__)("Background Color"),onColorChange:O?C("background"):void 0,colorValue:le(f,y,null==j||null===(r=j.color)||void 0===r?void 0:r.background).color,gradientValue:v,onGradientChange:h?function(t){var n,r=Oe(p,t);if(r){var o,c,i,a=et(et({},null===(o=m.current)||void 0===o?void 0:o.style),{},{color:et(et({},null===(c=m.current)||void 0===c||null===(i=c.style)||void 0===i?void 0:i.color),{},{gradient:void 0})});n={style:he(a),gradient:r}}else{var l,u,s,d=et(et({},null===(l=m.current)||void 0===l?void 0:l.style),{},{color:et(et({},null===(u=m.current)||void 0===u||null===(s=u.style)||void 0===s?void 0:s.color),{},{gradient:t})});n={style:he(d),gradient:void 0}}e.setAttributes(n),m.current=et(et({},m.current),n)}:void 0}]:[]),Object(re.a)(b&&rt(l)?[{label:Object(g.__)("Link Color"),onColorChange:function(t){var n,r=ue(f,t);e.setAttributes({style:et(et({},e.attributes.style),{},{color:et(et({},null===(n=e.attributes.style)||void 0===n?void 0:n.color),{},{link:(null==r?void 0:r.slug)?"var:preset|color|".concat(r.slug):t})})})},colorValue:at(f,null==j||null===(o=j.color)||void 0===o?void 0:o.link),clearable:!!(null===(i=e.attributes.style)||void 0===i||null===(a=i.color)||void 0===a?void 0:a.link)}]:[]))})}var ut=Object(p.createHigherOrderComponent)((function(e){return function(t){var n,r,o,c=t.name,i=t.attributes,a=i.backgroundColor,u=i.textColor,d=be("color.palette")||tt;if(!nt(c))return Object(s.createElement)(e,t);var b={color:u?null===(n=le(d,u))||void 0===n?void 0:n.color:void 0,backgroundColor:a?null===(r=le(d,a))||void 0===r?void 0:r.color:void 0},f=t.wrapperProps;return f=et(et({},t.wrapperProps),{},{style:et(et({},b),null===(o=t.wrapperProps)||void 0===o?void 0:o.style)}),Object(s.createElement)(e,Object(l.a)({},t,{wrapperProps:f}))}}));Object(m.addFilter)("blocks.registerBlockType","core/color/addAttribute",(function(e){return nt(e)?(e.attributes.backgroundColor||Object.assign(e.attributes,{backgroundColor:{type:"string"}}),e.attributes.textColor||Object.assign(e.attributes,{textColor:{type:"string"}}),ot(e)&&!e.attributes.gradient&&Object.assign(e.attributes,{gradient:{type:"string"}}),e):e})),Object(m.addFilter)("blocks.getSaveContent.extraProps","core/color/addSaveProps",it),Object(m.addFilter)("blocks.registerBlockType","core/color/addEditProps",(function(e){if(!nt(e))return e;var t=e.getEditWrapperProps;return e.getEditWrapperProps=function(n){var r={};return t&&(r=t(n)),it(r,e,n)},e})),Object(m.addFilter)("editor.BlockListBlock","core/color/with-color-palette-styles",ut);var st=n(19);function dt(e){var t=e.value,n=e.onChange,r=function(e){return void 0!==e&&""!==e}(t),o=r?t:"";return Object(s.createElement)("div",{className:"block-editor-line-height-control"},Object(s.createElement)(h.TextControl,{autoComplete:"off",onKeyDown:function(e){e.keyCode!==st.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(g.__)("Line height"),placeholder:1.5,step:.1,type:"number",value:o,min:0}))}function bt(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 ft(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?bt(Object(n),!0).forEach((function(t){Object(u.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):bt(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function pt(e){var t,n=e.attributes.style;if(mt(e))return null;return Object(s.createElement)(dt,{value:null==n||null===(t=n.typography)||void 0===t?void 0:t.lineHeight,onChange:function(t){var r=ft(ft({},n),{},{typography:ft(ft({},null==n?void 0:n.typography),{},{lineHeight:t})});e.setAttributes({style:he(r)})}})}function mt(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.name,n=!be("typography.customLineHeight");return!Object(c.hasBlockSupport)(t,"lineHeight")||n}var vt=n(156),Ot=n.n(vt),gt=function(e,t,n){if(t){var r=Object(f.find)(e,{slug:t});if(r)return r}return{size:n}};function ht(e,t){var n=Object(f.find)(e,{size:t});return n||{size:t}}function jt(e){if(e)return"has-".concat(Object(f.kebabCase)(e),"-font-size")}var kt=function(e){var t=be("typography.fontSizes"),n=!be("typography.customFontSize");return Object(s.createElement)(h.FontSizePicker,Object(l.a)({},e,{fontSizes:t,disableCustomFontSizes:n}))};function yt(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 _t(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?yt(Object(n),!0).forEach((function(t){Object(u.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):yt(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Et(e,t,n){if(!Object(c.hasBlockSupport)(t,"fontSize"))return e;var r=new Ot.a(e.className);r.add(jt(n.fontSize));var o=r.value;return e.className=o||void 0,e}function Ct(e){var t,n=e.attributes,r=n.fontSize,o=n.style,c=e.setAttributes,i=wt(e),a=be("typography.fontSizes");if(i)return null;var l=gt(a,r,null==o||null===(t=o.typography)||void 0===t?void 0:t.fontSize);return Object(s.createElement)(kt,{value:l.size,onChange:function(e){var t=ht(a,e).slug;c({style:he(_t(_t({},o),{},{typography:_t(_t({},null==o?void 0:o.typography),{},{fontSize:t?void 0:e})})),fontSize:t})}})}function wt(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.name,n=be("typography.fontSizes"),r=!!(null==n?void 0:n.length);return!Object(c.hasBlockSupport)(t,"fontSize")||!r}var St=Object(p.createHigherOrderComponent)((function(e){return function(t){var n,r=be("typography.fontSizes"),o=t.name,i=t.attributes,a=i.fontSize,l=i.style,u=t.wrapperProps,d=_t({},t);if(Object(c.hasBlockSupport)(o,"fontSize")&&a&&!(null==l||null===(n=l.typography)||void 0===n?void 0:n.fontSize)){var b,f=gt(r,a,null==l||null===(b=l.typography)||void 0===b?void 0:b.fontSize).size;d.wrapperProps=_t(_t({},u),{},{style:_t({fontSize:f},null==u?void 0:u.style)})}return Object(s.createElement)(e,d)}}),"withFontSizeInlineStyles");Object(m.addFilter)("blocks.registerBlockType","core/font/addAttribute",(function(e){return Object(c.hasBlockSupport)(e,"fontSize")?(e.attributes.fontSize||Object.assign(e.attributes,{fontSize:{type:"string"}}),e):e})),Object(m.addFilter)("blocks.getSaveContent.extraProps","core/font/addSaveProps",Et),Object(m.addFilter)("blocks.registerBlockType","core/font/addEditProps",(function(e){if(!Object(c.hasBlockSupport)(e,"fontSize"))return e;var t=e.getEditWrapperProps;return e.getEditWrapperProps=function(n){var r={};return t&&(r=t(n)),Et(r,e,n)},e})),Object(m.addFilter)("editor.BlockListBlock","core/font-size/with-font-size-inline-styles",St);var It=["lineHeight","fontSize"];function Bt(e){var t=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=[wt(e),mt(e)];return t.filter(Boolean).length===t.length}(e),n=xt(e.name);return t||!n?null:Object(s.createElement)(qe,null,Object(s.createElement)(h.PanelBody,{title:Object(g.__)("Typography")},Object(s.createElement)(Ct,e),Object(s.createElement)(pt,e)))}var xt=function(e){return"web"===s.Platform.OS&&It.some((function(t){return Object(c.hasBlockSupport)(e,t)}))};function Pt(e){var t=e.units,n=Object(je.a)(e,["units"]),r=Tt(t);return Object(s.createElement)(h.__experimentalUnitControl,Object(l.a)({units:r},n))}function Tt(e){var t=be("spacing.units"),n=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)}))}(t||[],e);return 0!==n.length&&n}function Nt(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 Dt(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Nt(Object(n),!0).forEach((function(t){Object(u.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Nt(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Rt(e){var t,n=e.name,r=e.attributes.style,o=e.setAttributes,i=Tt();if(!function(e){var t=Object(c.getBlockSupport)(e,"spacing");return t&&!1!==t.padding}(n))return null;return s.Platform.select({web:Object(s.createElement)(s.Fragment,null,Object(s.createElement)(h.__experimentalBoxControl,{values:null==r||null===(t=r.spacing)||void 0===t?void 0:t.padding,onChange:function(e){var t=Dt(Dt({},r),{},{spacing:{padding:e}});o({style:he(t)})},onChangeShowVisualizer:function(e){var t=Dt(Dt({},r),{},{visualizers:{padding:e}});o({style:he(t)})},label:Object(g.__)("Padding"),units:i})),native:null})}function At(e){var t=e.children,n=Object(je.a)(e,["children"]);return be("spacing.customPadding")?Object(s.createElement)(qe,n,Object(s.createElement)(h.PanelBody,{title:Object(g.__)("Spacing")},t)):null}function Mt(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 Lt(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Mt(Object(n),!0).forEach((function(t){Object(u.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Mt(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Ft=[].concat(Object(re.a)(It),["color","spacing"]),Vt=function(e){return Ft.some((function(t){return Object(c.hasBlockSupport)(e,t)}))};function Ht(e){if(Object(f.startsWith)(e,"var:")){var t=e.slice("var:".length).split("|").join("--");return"var(--wp--".concat(t,")")}return e}function zt(e,t,n){if(!Vt(t))return e;var r=n.style;return e.style=Lt(Lt({},function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t={};return Object.entries(c.__EXPERIMENTAL_STYLE_PROPERTY).forEach((function(n){var r=Object(ce.a)(n),o=r[0],c=r.slice(1),i=Object(oe.a)(c,1)[0];Object(f.has)(e,i)&&(t[o]=Ht(Object(f.get)(e,i)))})),t}(r)),e.style),e}var Ut=Object(p.createHigherOrderComponent)((function(e){return function(t){var n=t.name,r=Object(c.hasBlockSupport)(n,"spacing");return[Object(s.createElement)(Bt,Object(l.a)({key:"typography"},t)),Object(s.createElement)(lt,Object(l.a)({key:"colors"},t)),Object(s.createElement)(e,Object(l.a)({key:"edit"},t)),r&&Object(s.createElement)(At,{key:"spacing"},Object(s.createElement)(Rt,t))]}}),"withToolbarControls");Object(m.addFilter)("blocks.registerBlockType","core/style/addAttribute",(function(e){return Vt(e)?(e.attributes.style||Object.assign(e.attributes,{style:{type:"object"}}),e):e})),Object(m.addFilter)("blocks.getSaveContent.extraProps","core/style/addSaveProps",zt),Object(m.addFilter)("blocks.registerBlockType","core/style/addEditProps",(function(e){if(!Vt(e))return e;var t=e.getEditWrapperProps;return e.getEditWrapperProps=function(n){var r={};return t&&(r=t(n)),zt(r,e,n)},e})),Object(m.addFilter)("editor.BlockEdit","core/style/with-block-controls",Ut);var Gt=n(22),Wt=n(23),Kt=n(17),qt=n(24),$t=n(25),Yt=n(20);function Xt(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(Yt.a)(e);if(t){var o=Object(Yt.a)(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Object($t.a)(this,n)}}function Qt(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 Zt(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Qt(Object(n),!0).forEach((function(t){Object(u.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Qt(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Jt=[],en=function(e){return Object(p.createHigherOrderComponent)((function(t){return function(n){return Object(s.createElement)(t,Object(l.a)({},n,{colors:e}))}}),"withCustomColorPalette")},tn=function(){return Object(p.createHigherOrderComponent)((function(e){return function(t){var n=be("color.palette")||Jt;return Object(s.createElement)(e,Object(l.a)({},t,{colors:n}))}}),"withEditorColorPalette")};function nn(e,t){var n=Object(f.reduce)(e,(function(e,t){return Zt(Zt({},e),Object(f.isString)(t)?Object(u.a)({},t,Object(f.kebabCase)(t)):t)}),{});return Object(p.compose)([t,function(e){return function(t){Object(qt.a)(o,t);var r=Xt(o);function o(e){var t;return Object(Gt.a)(this,o),(t=r.call(this,e)).setters=t.createSetters(),t.colorUtils={getMostReadableColor:t.getMostReadableColor.bind(Object(Kt.a)(t))},t.state={},t}return Object(Wt.a)(o,[{key:"getMostReadableColor",value:function(e){return function(e,t){return ae.a.mostReadable(t,Object(f.map)(e,"color")).toHexString()}(this.props.colors,e)}},{key:"createSetters",value:function(){var e=this;return Object(f.reduce)(n,(function(t,n,r){var o=Object(f.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=ue(n.props.colors,r);n.props.setAttributes((o={},Object(u.a)(o,e,c&&c.slug?c.slug:void 0),Object(u.a)(o,t,c&&c.slug?void 0:r),o))}}},{key:"render",value:function(){return Object(s.createElement)(e,Zt(Zt(Zt(Zt({},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(f.reduce)(n,(function(e,n,c){var i=le(o,r[c],r["custom".concat(Object(f.upperFirst)(c))]),a=t[c];return(null==a?void 0:a.color)===i.color&&a?e[c]=a:e[c]=Zt(Zt({},i),{},{class:se(n,i.slug)}),e}),{})}}]),o}(s.Component)}])}function rn(e){return function(){for(var t=en(e),n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return Object(p.createHigherOrderComponent)(nn(r,t),"withCustomColors")}}function on(){for(var e=tn(),t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return Object(p.createHigherOrderComponent)(nn(n,e),"withColors")}var cn=n(70),an=n.n(cn);function ln(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 un(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ln(Object(n),!0).forEach((function(t){Object(u.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ln(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var sn=function(e){var t=e.colorSettings,n=Object(je.a)(e,["colorSettings"]),r=t.map((function(e){var t=e.value,n=e.onChange;return un(un({},Object(je.a)(e,["value","onChange"])),{},{colorValue:t,onColorChange:n})}));return Object(s.createElement)(Le,Object(l.a)({settings:r,gradients:[],disableCustomGradients:!0},n))},dn=function(e,t,n){return"function"==typeof e?e(t):!0===e?n:e};function bn(e){var t=e.title,n=e.colorSettings,r=e.colorPanelProps,o=e.contrastCheckers,c=e.detectedBackgroundColor,i=e.detectedColor,a=e.panelChildren,u=e.initialOpen;return Object(s.createElement)(sn,Object(l.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(je.a)(e,["backgroundColor","textColor"]);return t=dn(t,n,c),r=dn(r,n,i),Object(s.createElement)(He,Object(l.a)({key:"".concat(t,"-").concat(r),backgroundColor:t,textColor:r},o))})):Object(f.map)(n,(function(e){var t=e.value,r=o.backgroundColor,a=o.textColor;return r=dn(r||t,n,c),a=dn(a||t,n,i),Object(s.createElement)(He,Object(l.a)({},o,{key:"".concat(r,"-").concat(a),backgroundColor:r,textColor:a}))}))),"function"==typeof a?a(n):a)}function fn(e,t){var n;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return pn(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return pn(e,t)}(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 pn(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 mn(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 vn(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?mn(Object(n),!0).forEach((function(t){Object(u.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):mn(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function On(e){return e.ownerDocument.defaultView.getComputedStyle(e)}var gn=[],hn={textColor:Object(g.__)("Text Color"),backgroundColor:Object(g.__)("Background Color")},jn=function(e){return Object(s.createElement)(qe,null,Object(s.createElement)(bn,e))};function kn(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{panelTitle:Object(g.__)("Color settings")},n=t.panelTitle,r=void 0===n?Object(g.__)("Color settings"):n,o=t.colorPanelProps,c=t.contrastCheckers,i=t.panelChildren,a=t.colorDetector,l=(a=void 0===a?{}:a).targetRef,d=a.backgroundColorTargetRef,p=void 0===d?l:d,m=a.textColorTargetRef,O=void 0===m?l:m,h=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],j=Object(U.b)(),k=j.clientId,y=be("color.palette")||gn,_=Object(v.useSelect)((function(e){return{attributes:(0,e("core/block-editor").getBlockAttributes)(k)}}),[k]),E=_.attributes,C=Object(v.useDispatch)("core/block-editor"),w=C.updateBlockAttributes,S=Object(s.useCallback)((function(e){return w(k,e)}),[w,k]),I=Object(s.useMemo)((function(){return an()((function(e,t,n,r,o,c){return function(i){var a,l=i.children,d=i.className,p=void 0===d?"":d,m=i.style,v=void 0===m?{}:m,O={};r?O=Object(u.a)({},t,o):c&&(O=Object(u.a)({},t,c));var g={className:b()(p,(a={},Object(u.a)(a,"has-".concat(Object(f.kebabCase)(r),"-").concat(Object(f.kebabCase)(t)),r),Object(u.a)(a,n||"has-".concat(Object(f.kebabCase)(e)),r||c),a)),style:vn(vn({},O),v)};return Object(f.isFunction)(l)?l(g):s.Children.map(l,(function(e){return Object(s.cloneElement)(e,{className:b()(e.props.className,g.className),style:vn(vn({},g.style),e.props.style||{})})}))}}),{maxSize:e.length})}),[e.length]),B=Object(s.useMemo)((function(){return an()((function(e,t){return function(n){var r=t.find((function(e){return e.color===n}));S(Object(u.a)({},r?Object(f.camelCase)("custom ".concat(e)):e,void 0)),S(Object(u.a)({},r?e:Object(f.camelCase)("custom ".concat(e)),r?r.slug:n))}}),{maxSize:e.length})}),[S,e.length]),x=Object(s.useState)(),P=Object(oe.a)(x,2),T=P[0],N=P[1],D=Object(s.useState)(),R=Object(oe.a)(D,2),A=R[0],M=R[1];return Object(s.useEffect)((function(){if(c){var e,t=!1,n=!1,r=fn(Object(f.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&&M(On(O.current).color),t){for(var l=p.current,u=On(l).backgroundColor;"rgba(0, 0, 0, 0)"===u&&l.parentNode&&l.parentNode.nodeType===l.parentNode.ELEMENT_NODE;)u=On(l=l.parentNode).backgroundColor;N(u)}}}),[e.reduce((function(e,t){return"".concat(e," | ").concat(E[t.name]," | ").concat(E[Object(f.camelCase)("custom ".concat(t.name))])}),"")].concat(Object(re.a)(h))),Object(s.useMemo)((function(){var t={},n=e.reduce((function(e,n){"string"==typeof n&&(n={name:n});var r=vn(vn({},n),{},{color:E[n.name]}),o=r.name,c=r.property,i=void 0===c?o:c,a=r.className,l=r.panelLabel,u=void 0===l?n.label||hn[o]||Object(f.startCase)(o):l,s=r.componentName,d=void 0===s?Object(f.startCase)(o).replace(/\s/g,""):s,b=r.color,p=void 0===b?n.color:b,m=r.colors,v=void 0===m?y:m,O=E[Object(f.camelCase)("custom ".concat(o))],g=O?void 0:v.find((function(e){return e.slug===p}));return e[d]=I(o,i,a,p,g&&g.color,O),e[d].displayName=d,e[d].color=O||g&&g.color,e[d].slug=p,e[d].setColor=B(o,v),t[d]={value:g?g.color:E[Object(f.camelCase)("custom ".concat(o))],onChange:e[d].setColor,label:u,colors:v},v||delete t[d].colors,e}),{}),a={title:r,initialOpen:!1,colorSettings:t,colorPanelProps:o,contrastCheckers:c,detectedBackgroundColor:T,detectedColor:A,panelChildren:i};return vn(vn({},n),{},{ColorPanel:Object(s.createElement)(bn,a),InspectorControlsColorPanel:Object(s.createElement)(jn,a)})}),[E,S,A,T].concat(Object(re.a)(h)))}function yn(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 _n(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?yn(Object(n),!0).forEach((function(t){Object(u.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):yn(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function En(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(Yt.a)(e);if(t){var o=Object(Yt.a)(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Object($t.a)(this,n)}}var Cn=[],wn=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var r=Object(f.reduce)(t,(function(e,t){return e[t]="custom".concat(Object(f.upperFirst)(t)),e}),{});return Object(p.createHigherOrderComponent)(Object(p.compose)([Object(p.createHigherOrderComponent)((function(e){return function(t){var n=be("typography.fontSizes")||Cn;return Object(s.createElement)(e,Object(l.a)({},t,{fontSizes:n}))}}),"withFontSizes"),function(e){return function(t){Object(qt.a)(o,t);var n=En(o);function o(e){var t;return Object(Gt.a)(this,o),(t=n.call(this,e)).setters=t.createSetters(),t.state={},t}return Object(Wt.a)(o,[{key:"createSetters",value:function(){var e=this;return Object(f.reduce)(r,(function(t,n,r){var o=Object(f.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(f.find)(n.props.fontSizes,{size:Number(r)});n.props.setAttributes((o={},Object(u.a)(o,e,c&&c.slug?c.slug:void 0),Object(u.a)(o,t,c&&c.slug?void 0:r),o))}}},{key:"render",value:function(){return Object(s.createElement)(e,_n(_n(_n({},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(f.some)(r,c))return null;var i=Object(f.reduce)(Object(f.pickBy)(r,c),(function(e,t,r){var c=n[r],i=gt(o,c,n[t]);return e[r]=_n(_n({},i),{},{class:jt(c)}),e}),{});return _n(_n({},t),i)}}]),o}(s.Component)}]),"withFontSizes")},Sn=n(287),In=n(288),Bn=n(289);function xn(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 Pn(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?xn(Object(n),!0).forEach((function(t){Object(u.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):xn(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Tn=[{icon:Sn.a,title:Object(g.__)("Align text left"),align:"left"},{icon:In.a,title:Object(g.__)("Align text center"),align:"center"},{icon:Bn.a,title:Object(g.__)("Align text right"),align:"right"}],Nn={position:"bottom right",isAlternate:!0};var Dn=function(e){var t=e.value,n=e.onChange,r=e.alignmentControls,o=void 0===r?Tn:r,c=e.label,i=void 0===c?Object(g.__)("Change text alignment"):c,a=e.isCollapsed,l=void 0===a||a,u=e.isRTL;function d(e){return function(){return n(t===e?void 0:e)}}var b=Object(f.find)(o,(function(e){return e.align===t}));return Object(s.createElement)(h.ToolbarGroup,{isCollapsed:l,icon:b?b.icon:u?Bn.a:Sn.a,label:i,popoverProps:Nn,controls:o.map((function(e){var n=e.align,r=t===n;return Pn(Pn({},e),{},{isActive:r,role:l?"menuitemradio":void 0,onClick:d(n)})}))})},Rn=function(e){return e.name||""},An=function(e){return e.title},Mn=function(e){return e.keywords||[]},Ln=function(e){return e.category},Fn=function(){return null};function Vn(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return e=(e=(e=Object(f.deburr)(e)).replace(/^\//,"")).toLowerCase()}var Hn=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return Object(f.words)(Vn(e))},zn=function(e,t){return Object(f.differenceWith)(e,Hn(t),(function(e,t){return t.includes(e)}))},Un=function(e,t,n,r){return 0===Hn(r).length?e:Gn(e,r,{getCategory:function(e){var n;return null===(n=Object(f.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},getVariations:function(e){var t=e.variations,n=void 0===t?[]:t;return Array.from(n.reduce((function(e,t){var n=t.title,r=t.keywords,o=void 0===r?[]:r;return e.add(n),o.forEach((function(t){return e.add(t)})),e}),new Set))}})},Gn=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=Hn(t);if(0===r.length)return e;var o=e.map((function(e){return[e,Wn(e,t,n)]})).filter((function(e){return Object(oe.a)(e,2)[1]>0}));return o.sort((function(e,t){var n=Object(oe.a)(e,2)[1];return Object(oe.a)(t,2)[1]-n})),o.map((function(e){return Object(oe.a)(e,1)[0]}))};function Wn(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=n.getName,o=void 0===r?Rn:r,c=n.getTitle,i=void 0===c?An:c,a=n.getKeywords,l=void 0===a?Mn:a,u=n.getCategory,s=void 0===u?Ln:u,d=n.getCollection,b=void 0===d?Fn:d,p=o(e),m=i(e),v=l(e),O=s(e),g=b(e),h=Vn(t),j=Vn(m),k=0;if(h===j)k+=30;else if(j.startsWith(h))k+=20;else{var y=[p,m].concat(Object(re.a)(v),[O,g]).join(" "),_=Object(f.words)(h),E=zn(_,y);0===E.length&&(k+=10)}return 0!==k&&p.startsWith("core/")&&k++,k}var Kn=function(e,t){var n=Object(v.useSelect)((function(t){var n=t("core/block-editor").getInserterItems,r=t("core/blocks"),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,function(e){var n=e.name,r=e.initialAttributes,o=e.innerBlocks,i=Object(c.createBlock)(n,r,Object(c.createBlocksFromInnerBlocksTemplate)(o));t(i)}]},qn=n(160);function $n(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:qn.a});var i=Object(s.createElement)(h.Icon,{icon:n&&n.src?n.src:n}),a=o?{backgroundColor:n&&n.background,color:n&&n.foreground}:{};return Object(s.createElement)("span",{style:a,className:b()("block-editor-block-icon",c,{"has-colors":o})},i)}var Yn={name:"blocks",className:"block-editor-autocompleters__block",triggerPrefix:"/",useItems:function(e){var t=Object(v.useSelect)((function(e){var t=e("core/block-editor"),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=Kn(n,f.noop),c=Object(oe.a)(o,3),i=c[0],a=c[1],l=c[2],u=Object(s.useMemo)((function(){return(e.trim()?Un(i,a,l,e):Object(f.orderBy)(i,["frecency"],["desc"])).filter((function(e){return e.name!==r})).slice(0,9)}),[e,r,i,a,l]);return[Object(s.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(s.createElement)(s.Fragment,null,Object(s.createElement)($n,{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(c.createBlock)(t,n,Object(c.createBlocksFromInnerBlocksTemplate)(r))}}},Xn=[];var Qn=function(e){var t=Object(U.b)().name,n=e.completers,r=void 0===n?Xn:n;return r=Object(s.useMemo)((function(){var e=r;return t===Object(c.getDefaultBlockName)()&&(e=e.concat([Yn])),Object(m.hasFilter)("editor.Autocomplete.completers")&&(e===r&&(e=e.map(f.clone)),e=Object(m.applyFilters)("editor.Autocomplete.completers",e,t)),e}),[r,t]),Object(s.createElement)(h.Autocomplete,Object(l.a)({},e,{completers:r}))};var Zn=function(e){var t=e.label,n=void 0===t?Object(g.__)("Change matrix alignment"):t,r=e.onChange,o=void 0===r?f.noop:r,c=e.value,i=void 0===c?"center":c,a=Object(s.createElement)(h.__experimentalAlignmentMatrixControl.Icon,{value:i}),l="block-editor-block-alignment-matrix-toolbar",u="".concat(l,"__popover");return Object(s.createElement)(h.Dropdown,{position:"bottom right",className:l,popoverProps:{className:u,isAlternate:!0},renderToggle:function(e){var t=e.onToggle,r=e.isOpen;return Object(s.createElement)(h.ToolbarGroup,null,Object(s.createElement)(h.ToolbarButton,{onClick:t,"aria-haspopup":"true","aria-expanded":r,onKeyDown:function(e){r||e.keyCode!==st.DOWN||(e.preventDefault(),e.stopPropagation(),t())},label:n,icon:a,showTooltip:!0}))},renderContent:function(){return Object(s.createElement)(h.__experimentalAlignmentMatrixControl,{hasFocusBorder:!1,onChange:o,value:i})}})};function Jn(e){var t=e.clientId,n=Object(v.useSelect)((function(e){if(!t)return{};var n=e("core/block-editor"),r=n.getBlockName;return{attributes:(0,n.getBlockAttributes)(t),name:r(t)}}),[t]),r=n.attributes,o=n.name;if(!o)return null;var i=Object(c.getBlockType)(o);if(!i)return null;var a=i.title,l=Object(c.__experimentalGetBlockLabel)(i,r);return l!==a?"".concat(a,": ").concat(Object(f.truncate)(l,{length:15})):a}var er=function(){var e=Object(v.useDispatch)("core/block-editor"),t=e.selectBlock,n=e.clearSelectedBlock,r=Object(v.useSelect)((function(e){var t=e("core/block-editor"),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(s.createElement)("ul",{className:"block-editor-block-breadcrumb",role:"list","aria-label":Object(g.__)("Block breadcrumb")},Object(s.createElement)("li",{className:i?void 0:"block-editor-block-breadcrumb__current","aria-current":i?void 0:"true"},i&&Object(s.createElement)(h.Button,{className:"block-editor-block-breadcrumb__button",isTertiary:!0,onClick:n},Object(g.__)("Document")),!i&&Object(g.__)("Document")),c.map((function(e){return Object(s.createElement)("li",{key:e},Object(s.createElement)(h.Button,{className:"block-editor-block-breadcrumb__button",isTertiary:!0,onClick:function(){return t(e)}},Object(s.createElement)(Jn,{clientId:e})))})),!!o&&Object(s.createElement)("li",{className:"block-editor-block-breadcrumb__current","aria-current":"true"},Object(s.createElement)(Jn,{clientId:o})))};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(u.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 rr=Object(s.createContext)({});function or(e){var t=e.value,n=e.children,r=Object(s.useContext)(rr),o=Object(s.useMemo)((function(){return nr(nr({},r),t)}),[r,t]);return Object(s.createElement)(rr.Provider,{value:o,children:n})}var cr=rr,ir=function(){return Object(s.createElement)(h.SVG,{xmlns:"https://www.w3.org/2000/svg",viewBox:"0 0 20 20"},Object(s.createElement)(h.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"}))},ar=function(e){var t=e.style,n=e.className;return Object(s.createElement)("div",{className:"block-library-colors-selector__icon-container"},Object(s.createElement)("div",{className:"".concat(n," block-library-colors-selector__state-selection"),style:t},Object(s.createElement)(ir,null)))},lr=function(e){var t,n,r,o=e.children,c=Object(je.a)(e,["children"]);return Object(s.createElement)(h.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(s.createElement)(h.ToolbarGroup,null,Object(s.createElement)(h.ToolbarButton,{className:"components-toolbar__control block-library-colors-selector__toggle",label:Object(g.__)("Open Colors Selector"),onClick:t,onKeyDown:function(e){o||e.keyCode!==st.DOWN||(e.preventDefault(),e.stopPropagation(),t())},icon:Object(s.createElement)(r,null,Object(s.createElement)(n,null,Object(s.createElement)(ar,null)))}))}),renderContent:function(){return o}})},ur={},sr=Object(h.withFilters)("editor.BlockEdit")((function(e){var t=e.attributes,n=void 0===t?{}:t,r=e.name,o=Object(c.getBlockType)(r),i=Object(s.useContext)(cr),a=Object(s.useMemo)((function(){return o&&o.usesContext?Object(f.pick)(i,o.usesContext):ur}),[o,i]);if(!o)return null;var u=o.edit||o.save;if(o.apiVersion>1||Object(c.hasBlockSupport)(o,"lightBlockWrapper",!1))return Object(s.createElement)(u,Object(l.a)({},e,{context:a}));var d=Object(c.hasBlockSupport)(o,"className",!0)?Object(c.getBlockDefaultClassName)(r):null,p=b()(d,n.className);return Object(s.createElement)(u,Object(l.a)({},e,{context:a,className:p}))}));function dr(e){var t={name:e.name,isSelected:e.isSelected,clientId:e.clientId,onFocus:e.onFocus,onCaretVerticalPositionChange:e.onCaretVerticalPositionChange};return Object(s.createElement)(U.a,{value:Object(s.useMemo)((function(){return t}),Object.values(t))},Object(s.createElement)(sr,e))}var br=Object(h.createSlotFill)("BlockFormatControls"),fr=br.Fill,pr=br.Slot;var mr=function(e){return Object(U.b)().isSelected?Object(s.createElement)(fr,null,(function(t){var n=Object(f.isEmpty)(t)?null:t;return Object(s.createElement)(h.__experimentalToolbarContext.Provider,{value:n},e.children)})):null};mr.Slot=function(e){var t=Object(s.useContext)(h.__experimentalToolbarContext);return Object(s.createElement)(pr,Object(l.a)({},e,{fillProps:t}))};var vr=mr,Or=n(18),gr=n.n(Or),hr=n(37),jr=n(215),kr=n(121),yr=n(31),_r=function(e){return e+1},Er=function(e){return{top:e.offsetTop,left:e.offsetLeft}};var Cr=function(e,t,n,r,o){var c=Object(p.useReducedMotion)()||!r,i=Object(s.useReducer)(_r,0),a=Object(oe.a)(i,2),l=a[0],u=a[1],d=Object(s.useReducer)(_r,0),b=Object(oe.a)(d,2),f=b[0],m=b[1],v=Object(s.useState)({x:0,y:0}),O=Object(oe.a)(v,2),g=O[0],h=O[1],j=Object(s.useMemo)((function(){return e.current?Er(e.current):null}),[o]),k=Object(s.useMemo)((function(){if(!n||!e.current)return function(){};var t=Object(yr.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(s.useLayoutEffect)((function(){l&&m()}),[l]),Object(s.useLayoutEffect)((function(){if(j)if(c)k();else{e.current.style.transform="";var t=Er(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(kr.useSpring)({from:{x:g.x,y:g.y},to:{x:0,y:0},reset:l!==f,config:{mass:5,tension:2e3,friction:200},immediate:c,onFrame:y})},wr=Object(kr.animated)(h.__experimentalTreeGridRow);function Sr(e){var t=e.isSelected,n=e.position,r=e.level,o=e.rowCount,c=e.children,i=e.className,a=e.path,u=Object(je.a)(e,["isSelected","position","level","rowCount","children","className","path"]),d=Object(s.useRef)(null),f=a.join("_"),p=Cr(d,t,!1,!0,f);return Object(s.createElement)(wr,Object(l.a)({ref:d,style:p,className:b()("block-editor-block-navigation-leaf",i),level:r,positionInSet:n,setSize:o},u),c)}var Ir=n(212),Br=n(213),xr=n(214),Pr=n(189);function Tr(e,t,n,r,o,c,i,a){var l=n+1,u=function(e){return"up"===e?"horizontal"===i?a?"right":"left":"up":"down"===e?"horizontal"===i?a?"left":"right":"down":null};if(e>1)return function(e,t,n,r,o){var c=t+1;if(o<0&&n)return Object(g.__)("Blocks cannot be moved up as they are already at the top");if(o>0&&r)return Object(g.__)("Blocks cannot be moved down as they are already at the bottom");if(o<0&&!n)return Object(g.sprintf)(// translators: 1: Number of selected blocks, 2: Position of selected blocks
8
+ Object(g._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);if(o>0&&!r)return Object(g.sprintf)(// translators: 1: Number of selected blocks, 2: Position of selected blocks
9
+ Object(g._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)}(e,n,r,o,c);if(r&&o)return Object(g.sprintf)(// translators: %s: Type of block (i.e. Text, Image etc)
10
+ Object(g.__)("Block %s is the only block, and cannot be moved"),t);if(c>0&&!o){var s=u("down");if("down"===s)return Object(g.sprintf)(// translators: 1: Type of block (i.e. Text, Image etc), 2: Position of selected block, 3: New position
11
+ Object(g.__)("Move %1$s block from position %2$d down to position %3$d"),t,l,l+1);if("left"===s)return Object(g.sprintf)(// translators: 1: Type of block (i.e. Text, Image etc), 2: Position of selected block, 3: New position
12
+ Object(g.__)("Move %1$s block from position %2$d left to position %3$d"),t,l,l+1);if("right"===s)return Object(g.sprintf)(// translators: 1: Type of block (i.e. Text, Image etc), 2: Position of selected block, 3: New position
13
+ Object(g.__)("Move %1$s block from position %2$d right to position %3$d"),t,l,l+1)}if(c>0&&o){var d=u("down");if("down"===d)return Object(g.sprintf)(// translators: 1: Type of block (i.e. Text, Image etc)
14
+ Object(g.__)("Block %1$s is at the end of the content and can’t be moved down"),t);if("left"===d)return Object(g.sprintf)(// translators: 1: Type of block (i.e. Text, Image etc)
15
+ Object(g.__)("Block %1$s is at the end of the content and can’t be moved left"),t);if("right"===d)return Object(g.sprintf)(// translators: 1: Type of block (i.e. Text, Image etc)
16
+ Object(g.__)("Block %1$s is at the end of the content and can’t be moved right"),t)}if(c<0&&!r){var b=u("up");if("up"===b)return Object(g.sprintf)(// translators: 1: Type of block (i.e. Text, Image etc), 2: Position of selected block, 3: New position
17
+ Object(g.__)("Move %1$s block from position %2$d up to position %3$d"),t,l,l-1);if("left"===b)return Object(g.sprintf)(// translators: 1: Type of block (i.e. Text, Image etc), 2: Position of selected block, 3: New position
18
+ Object(g.__)("Move %1$s block from position %2$d left to position %3$d"),t,l,l-1);if("right"===b)return Object(g.sprintf)(// translators: 1: Type of block (i.e. Text, Image etc), 2: Position of selected block, 3: New position
19
+ Object(g.__)("Move %1$s block from position %2$d right to position %3$d"),t,l,l-1)}if(c<0&&r){var f=u("up");if("up"===f)return Object(g.sprintf)(// translators: 1: Type of block (i.e. Text, Image etc)
20
+ Object(g.__)("Block %1$s is at the beginning of the content and can’t be moved up"),t);if("left"===f)return Object(g.sprintf)(// translators: 1: Type of block (i.e. Text, Image etc)
21
+ Object(g.__)("Block %1$s is at the beginning of the content and can’t be moved left"),t);if("right"===f)return Object(g.sprintf)(// translators: 1: Type of block (i.e. Text, Image etc)
22
+ Object(g.__)("Block %1$s is at the beginning of the content and can’t be moved right"),t)}}var Nr=function(e,t,n){return"up"===e?"horizontal"===t?n?Ir.a:Br.a:xr.a:"down"===e?"horizontal"===t?n?Br.a:Ir.a:Pr.a:null},Dr=function(e,t,n){return"up"===e?"horizontal"===t?n?Object(g.__)("Move right"):Object(g.__)("Move left"):Object(g.__)("Move up"):"down"===e?"horizontal"===t?n?Object(g.__)("Move left"):Object(g.__)("Move right"):Object(g.__)("Move down"):null},Rr=Object(s.forwardRef)((function(e,t){var n=e.clientIds,r=e.direction,o=e.orientation,i=Object(je.a)(e,["clientIds","direction","orientation"]),a=Object(p.useInstanceId)(Rr),u=Object(f.castArray)(n).length,d=Object(v.useSelect)((function(e){var t=e("core/block-editor"),i=t.getBlockIndex,a=t.getBlockRootClientId,l=t.getBlockOrder,u=t.getBlock,s=t.getSettings,d=t.getBlockListSettings,b=Object(f.castArray)(n),p=Object(f.first)(b),m=a(p),v=i(p,m),O=i(Object(f.last)(b),m),g=l(m),h=u(p),j=0===v,k=O===g.length-1,y=(d(m)||{}).orientation;return{blockType:h?Object(c.getBlockType)(h.name):null,isDisabled:"up"===r?j:k,rootClientId:m,firstIndex:v,isFirst:j,isLast:k,isRTL:s().isRTL,orientation:o||y}}),[n,r]),m=d.blockType,O=d.isDisabled,g=d.rootClientId,j=d.isFirst,k=d.isLast,y=d.firstIndex,_=d.isRTL,E=d.orientation,C=void 0===E?"vertical":E,w=Object(v.useDispatch)("core/block-editor"),S=w.moveBlocksDown,I=w.moveBlocksUp,B="up"===r?I:S,x="block-editor-block-mover-button__description-".concat(a);return Object(s.createElement)(s.Fragment,null,Object(s.createElement)(h.Button,Object(l.a)({ref:t,className:b()("block-editor-block-mover-button","is-".concat(r,"-button")),icon:Nr(r,C,_),label:Dr(r,C,_),"aria-describedby":x},i,{onClick:O?null:function(e){B(n,g),i.onClick&&i.onClick(e)},"aria-disabled":O})),Object(s.createElement)("span",{id:x,className:"block-editor-block-mover-button__description"},Tr(u,m&&m.title,y,j,k,"up"===r?-1:1,C,_)))})),Ar=Object(s.forwardRef)((function(e,t){return Object(s.createElement)(Rr,Object(l.a)({direction:"up",ref:t},e))})),Mr=Object(s.forwardRef)((function(e,t){return Object(s.createElement)(Rr,Object(l.a)({direction:"down",ref:t},e))}));function Lr(e){var t=e.level,n=e.isLastRow,r=e.terminatedLevels;return Object(f.times)(t-1,(function(e){var o=e+2,c=o===t;return Object(s.createElement)("div",{key:e,"aria-hidden":"true",className:b()("block-editor-block-navigator-descender-line",{"has-item":c,"is-last-row":n,"is-terminated":r.includes(o)})})}))}var Fr=Object(s.createContext)({__experimentalFeatures:!1}),Vr=function(){return Object(s.useContext)(Fr)},Hr=Object(s.createElement)(j.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(s.createElement)(j.Path,{d:"M11 13h2v-2h-2v2zm-6 0h2v-2H5v2zm12-2v2h2v-2h-2z"}));var zr=function(e){var t=e.className,n=e.actions,r=e.children,o=e.secondaryActions;return Object(s.createElement)("div",{className:b()(t,"block-editor-warning")},Object(s.createElement)("div",{className:"block-editor-warning__contents"},Object(s.createElement)("p",{className:"block-editor-warning__message"},r),(s.Children.count(n)>0||o)&&Object(s.createElement)("div",{className:"block-editor-warning__actions"},s.Children.count(n)>0&&s.Children.map(n,(function(e,t){return Object(s.createElement)("span",{key:t,className:"block-editor-warning__action"},e)})),o&&Object(s.createElement)(h.DropdownMenu,{className:"block-editor-warning__secondary",icon:Hr,label:Object(g.__)("More options"),popoverProps:{position:"bottom left",className:"block-editor-warning__dropdown"},noIcons:!0},(function(){return Object(s.createElement)(h.MenuGroup,null,o.map((function(e,t){return Object(s.createElement)(h.MenuItem,{onClick:e.onClick,key:t},e.title)})))})))))},Ur=n(264),Gr=function(e){var t=e.title,n=e.rawContent,r=e.renderedContent,o=e.action,c=e.actionText,i=e.className;return Object(s.createElement)("div",{className:i},Object(s.createElement)("div",{className:"block-editor-block-compare__content"},Object(s.createElement)("h2",{className:"block-editor-block-compare__heading"},t),Object(s.createElement)("div",{className:"block-editor-block-compare__html"},n),Object(s.createElement)("div",{className:"block-editor-block-compare__preview edit-post-visual-editor"},r)),Object(s.createElement)("div",{className:"block-editor-block-compare__action"},Object(s.createElement)(h.Button,{isSecondary:!0,tabIndex:"0",onClick:o},c)))};var Wr=function(e){var t,n,r,o,i=e.block,a=e.onKeep,l=e.onConvert,u=e.convertor,d=e.convertButtonText,p={rawContent:i.originalContent,renderedContent:Object(c.getSaveElement)(i.name,i.attributes)},m=(t=u(i),n=Object(f.castArray)(t),r=n.map((function(e){return Object(c.getSaveContent)(e.name,e.attributes,e.innerBlocks)})),o=n.map((function(e){return Object(c.getSaveElement)(e.name,e.attributes,e.innerBlocks)})),{rawContent:r.join(""),renderedContent:o}),v=function(e,t){return Object(Ur.diffChars)(e,t).map((function(e,t){var n=b()({"block-editor-block-compare__added":e.added,"block-editor-block-compare__removed":e.removed});return Object(s.createElement)("span",{key:t,className:n},e.value)}))}(p.rawContent,m.rawContent);return Object(s.createElement)("div",{className:"block-editor-block-compare__wrapper"},Object(s.createElement)(Gr,{title:Object(g.__)("Current"),className:"block-editor-block-compare__current",action:a,actionText:Object(g.__)("Convert to HTML"),rawContent:p.rawContent,renderedContent:p.renderedContent}),Object(s.createElement)(Gr,{title:Object(g.__)("After Conversion"),className:"block-editor-block-compare__converted",action:l,actionText:d,rawContent:v,renderedContent:m.renderedContent}))};var Kr=function(e){return Object(c.rawHandler)({HTML:e.originalContent})},qr=Object(p.compose)([Object(v.withSelect)((function(e,t){var n=t.clientId;return{block:e("core/block-editor").getBlock(n)}})),Object(v.withDispatch)((function(e,t){var n=t.block,r=e("core/block-editor").replaceBlock;return{convertToClassic:function(){r(n.clientId,function(e){return Object(c.createBlock)("core/freeform",{content:e.originalContent})}(n))},convertToHTML:function(){r(n.clientId,function(e){return Object(c.createBlock)("core/html",{content:e.originalContent})}(n))},convertToBlocks:function(){r(n.clientId,Kr(n))},attemptBlockRecovery:function(){var e,t,o,i;r(n.clientId,(t=(e=n).name,o=e.attributes,i=e.innerBlocks,Object(c.createBlock)(t,o,i)))}}}))])((function(e){var t=e.convertToHTML,n=e.convertToBlocks,r=e.convertToClassic,o=e.attemptBlockRecovery,i=e.block,a=!!Object(c.getBlockType)("core/html"),l=Object(s.useState)(!1),u=Object(oe.a)(l,2),d=u[0],b=u[1],f=Object(s.useCallback)((function(){return b(!0)}),[]),p=Object(s.useCallback)((function(){return b(!1)}),[]),m=Object(s.useMemo)((function(){return[{
23
  // translators: Button to fix block content
24
+ title:Object(g._x)("Resolve","imperative verb"),onClick:f},a&&{title:Object(g.__)("Convert to HTML"),onClick:t},{title:Object(g.__)("Convert to Classic Block"),onClick:r}].filter(Boolean)}),[f,t,r]);return Object(s.createElement)(s.Fragment,null,Object(s.createElement)(zr,{actions:[Object(s.createElement)(h.Button,{key:"recover",onClick:o,isPrimary:!0},Object(g.__)("Attempt Block Recovery"))],secondaryActions:m},Object(g.__)("This block contains unexpected or invalid content.")),d&&Object(s.createElement)(h.Modal,{title:// translators: Dialog title to fix block content
25
+ Object(g.__)("Resolve Block"),onRequestClose:p,className:"block-editor-block-compare"},Object(s.createElement)(Wr,{block:i,onKeep:t,onConvert:n,convertor:Kr,convertButtonText:Object(g.__)("Convert to Blocks")})))})),$r=Object(s.createElement)(zr,{className:"block-editor-block-list__block-crash-warning"},Object(g.__)("This block has encountered an error and cannot be previewed.")),Yr=function(){return $r};function Xr(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(Yt.a)(e);if(t){var o=Object(Yt.a)(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Object($t.a)(this,n)}}var Qr=function(e){Object(qt.a)(n,e);var t=Xr(n);function n(){var e;return Object(Gt.a)(this,n),(e=t.apply(this,arguments)).state={hasError:!1},e}return Object(Wt.a)(n,[{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}}]),n}(s.Component),Zr=n(103),Jr=n.n(Zr);var eo=function(e){var t=e.clientId,n=Object(s.useState)(""),r=Object(oe.a)(n,2),o=r[0],i=r[1],a=Object(v.useSelect)((function(e){return e("core/block-editor").getBlock(t)}),[t]),l=Object(v.useDispatch)("core/block-editor").updateBlock;return Object(s.useEffect)((function(){i(Object(c.getBlockContent)(a))}),[a]),Object(s.createElement)(Jr.a,{className:"block-editor-block-list__block-html-textarea",value:o,onBlur:function(){var e=Object(c.getBlockType)(a.name),n=Object(c.getBlockAttributes)(e,o,a.attributes),r=o||Object(c.getSaveContent)(e,n),u=!o||Object(c.isValidBlockContent)(e,n,r);l(t,{attributes:n,originalContent:r,isValid:u}),o||i({content:r})},onChange:function(e){return i(e.target.value)}})},to=n(35),no=n.n(to);function ro(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 oo(e){var t=e("core/block-editor"),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 co(e,t){Array.from(e.querySelectorAll(".rich-text")).forEach((function(e){t?e.setAttribute("contenteditable",!0):e.removeAttribute("contenteditable")}))}var io=n(161),ao=[Object(s.createInterpolateElement)(Object(g.__)("While writing, you can press <kbd>/</kbd> to quickly insert new blocks."),{kbd:Object(s.createElement)("kbd",null)}),Object(s.createInterpolateElement)(Object(g.__)("Indent a list by pressing <kbd>space</kbd> at the beginning of a line."),{kbd:Object(s.createElement)("kbd",null)}),Object(s.createInterpolateElement)(Object(g.__)("Outdent a list by pressing <kbd>backspace</kbd> at the beginning of a line."),{kbd:Object(s.createElement)("kbd",null)}),Object(g.__)("Drag files into the editor to automatically insert media blocks."),Object(g.__)("Change a block's type by pressing the block icon on the toolbar.")];var lo=function(){var e=Object(s.useState)(Math.floor(Math.random()*ao.length)),t=Object(oe.a)(e,1)[0];return Object(s.createElement)(h.Tip,null,ao[t])},uo=n(132),so=n(131),bo=n(207);var fo=function e(t){var n=t.className,r=t.onChange,o=t.value,c=t.placeholder,i=Object(p.useInstanceId)(e),a=Object(s.useRef)();return Object(s.createElement)("div",{className:b()("block-editor-inserter__search",n)},Object(s.createElement)(h.VisuallyHidden,{as:"label",htmlFor:"block-editor-inserter__search-".concat(i)},c),Object(s.createElement)("input",{ref:a,className:"block-editor-inserter__search-input",id:"block-editor-inserter__search-".concat(i),type:"search",placeholder:c,autoFocus:!0,onChange:function(e){return r(e.target.value)},autoComplete:"off",value:o||""}),Object(s.createElement)("div",{className:"block-editor-inserter__search-icon"},!!o&&Object(s.createElement)(h.Button,{icon:uo.a,label:Object(g.__)("Reset search"),onClick:function(){r(""),a.current.focus()}}),!o&&Object(s.createElement)(so.a,{icon:bo.a})))};var po=function(e){var t=e.blockType;return Object(s.createElement)("div",{className:"block-editor-block-card"},Object(s.createElement)($n,{icon:t.icon,showColors:!0}),Object(s.createElement)("div",{className:"block-editor-block-card__content"},Object(s.createElement)("h2",{className:"block-editor-block-card__title"},t.title),Object(s.createElement)("span",{className:"block-editor-block-card__description"},t.description)))},mo={insertUsage:{}},vo={alignWide:!1,colors:[{name:Object(g.__)("Black"),slug:"black",color:"#000000"},{name:Object(g.__)("Cyan bluish gray"),slug:"cyan-bluish-gray",color:"#abb8c3"},{name:Object(g.__)("White"),slug:"white",color:"#ffffff"},{name:Object(g.__)("Pale pink"),slug:"pale-pink",color:"#f78da7"},{name:Object(g.__)("Vivid red"),slug:"vivid-red",color:"#cf2e2e"},{name:Object(g.__)("Luminous vivid orange"),slug:"luminous-vivid-orange",color:"#ff6900"},{name:Object(g.__)("Luminous vivid amber"),slug:"luminous-vivid-amber",color:"#fcb900"},{name:Object(g.__)("Light green cyan"),slug:"light-green-cyan",color:"#7bdcb5"},{name:Object(g.__)("Vivid green cyan"),slug:"vivid-green-cyan",color:"#00d084"},{name:Object(g.__)("Pale cyan blue"),slug:"pale-cyan-blue",color:"#8ed1fc"},{name:Object(g.__)("Vivid cyan blue"),slug:"vivid-cyan-blue",color:"#0693e3"},{name:Object(g.__)("Vivid purple"),slug:"vivid-purple",color:"#9b51e0"}],fontSizes:[{name:Object(g._x)("Small","font size name"),size:13,slug:"small"},{name:Object(g._x)("Normal","font size name"),size:16,slug:"normal"},{name:Object(g._x)("Medium","font size name"),size:20,slug:"medium"},{name:Object(g._x)("Large","font size name"),size:36,slug:"large"},{name:Object(g._x)("Huge","font size name"),size:42,slug:"huge"}],imageSizes:[{slug:"thumbnail",name:Object(g.__)("Thumbnail")},{slug:"medium",name:Object(g.__)("Medium")},{slug:"large",name:Object(g.__)("Large")},{slug:"full",name:Object(g.__)("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(g.__)("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(g.__)("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(g.__)("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(g.__)("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(g.__)("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(g.__)("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(g.__)("Blush light purple"),gradient:"linear-gradient(135deg,rgb(255,206,236) 0%,rgb(152,150,240) 100%)",slug:"blush-light-purple"},{name:Object(g.__)("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(g.__)("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(g.__)("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(g.__)("Electric grass"),gradient:"linear-gradient(135deg,rgb(202,248,128) 0%,rgb(113,206,126) 100%)",slug:"electric-grass"},{name:Object(g.__)("Midnight"),gradient:"linear-gradient(135deg,rgb(2,3,129) 0%,rgb(40,116,252) 100%)",slug:"midnight"}]};function Oo(e,t,n){return[].concat(Object(re.a)(e.slice(0,n)),Object(re.a)(Object(f.castArray)(t)),Object(re.a)(e.slice(n)))}function go(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:1,o=Object(re.a)(e);return o.splice(t,r),Oo(o,e.slice(t,t+r),n)}function ho(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 jo(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ho(Object(n),!0).forEach((function(t){Object(u.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ho(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function ko(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=Object(u.a)({},t,[]);return e.forEach((function(e){var r=e.clientId,o=e.innerBlocks;n[t].push(r),Object.assign(n,ko(o,r))})),n}function yo(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return e.reduce((function(e,n){return Object.assign(e,Object(u.a)({},n.clientId,t),yo(n.innerBlocks,n.clientId))}),{})}function _o(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:f.identity,n={},r=Object(re.a)(e);r.length;){var o=r.shift(),c=o.innerBlocks,i=Object(je.a)(o,["innerBlocks"]);r.push.apply(r,Object(re.a)(c)),n[i.clientId]=t(i)}return n}function Eo(e){return _o(e,(function(e){return Object(f.omit)(e,"attributes")}))}function Co(e){return _o(e,(function(e){return e.attributes}))}function wo(e,t){return e===t?jo({},e):t}function So(e,t){return"UPDATE_BLOCK_ATTRIBUTES"===e.type&&void 0!==t&&"UPDATE_BLOCK_ATTRIBUTES"===t.type&&Object(f.isEqual)(e.clientIds,t.clientIds)&&(n=e.attributes,r=t.attributes,Object(f.isEqual)(Object(f.keys)(n),Object(f.keys)(r)));var n,r}var Io=function(e){return e.reduce((function(e,t){return e[t]={},e}),{})};var Bo=Object(f.flow)(v.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=jo({},t)).attributes=Object(f.mapValues)(t.attributes,(function(e,n){return"core/block"===t.byClientId[n].name&&e.ref===r?jo(jo({},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(f.mapValues)(_o(n.blocks),(function(){return{}}));break;case"RECEIVE_BLOCKS":case"INSERT_BLOCKS":var c=Object(f.keys)(_o(n.blocks));n.rootClientId&&!t.controlledInnerBlocks[n.rootClientId]&&c.push(n.rootClientId),r.cache=jo(jo({},r.cache),Io(o(c)));break;case"UPDATE_BLOCK":r.cache=jo(jo({},r.cache),Io(o([n.clientId])));break;case"UPDATE_BLOCK_ATTRIBUTES":r.cache=jo(jo({},r.cache),Io(o(n.clientIds)));break;case"REPLACE_BLOCKS_AUGMENTED_WITH_CHILDREN":var i=Io(o(n.replacedClientIds));r.cache=jo(jo(jo({},Object(f.omit)(r.cache,n.replacedClientIds)),Object(f.omit)(i,n.replacedClientIds)),Io(Object(f.keys)(_o(n.blocks))));break;case"REMOVE_BLOCKS_AUGMENTED_WITH_CHILDREN":r.cache=jo(jo({},Object(f.omit)(r.cache,n.removedClientIds)),Io(Object(f.difference)(o(n.clientIds),n.clientIds)));break;case"MOVE_BLOCKS_TO_POSITION":var a=Object(re.a)(n.clientIds);n.fromRootClientId&&a.push(n.fromRootClientId),n.toRootClientId&&a.push(n.toRootClientId),r.cache=jo(jo({},r.cache),Io(o(a)));break;case"MOVE_BLOCKS_UP":case"MOVE_BLOCKS_DOWN":var l=[];n.rootClientId&&l.push(n.rootClientId),r.cache=jo(jo({},r.cache),Io(o(l)));break;case"SAVE_REUSABLE_BLOCK_SUCCESS":var u=Object(f.keys)(Object(f.omitBy)(r.attributes,(function(e,t){return"core/block"!==r.byClientId[t].name||e.ref!==n.updatedId})));r.cache=jo(jo({},r.cache),Io(o(u)))}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(re.a)(r)),(c=r).push.apply(c,Object(re.a)(t.order[r[o]])))}return r};if(t)switch(n.type){case"REMOVE_BLOCKS":n=jo(jo({},n),{},{type:"REMOVE_BLOCKS_AUGMENTED_WITH_CHILDREN",removedClientIds:r(n.clientIds)});break;case"REPLACE_BLOCKS":n=jo(jo({},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(re.a)(n.blocks);o.length;){var c=o.shift(),i=c.innerBlocks,a=Object(je.a)(c,["innerBlocks"]);o.push.apply(o,Object(re.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 u=l;return n.blocks.length&&((u=e(u,jo(jo({},n),{},{type:"INSERT_BLOCKS",index:0}))).order=jo(jo({},u.order),Object(f.reduce)(r,(function(e,n,r){return t.order[r]&&(e[r]=t.order[r]),e}),{}))),u}}),(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(f.reduce)(t[n],(function(n,o){return r[o]?n:[].concat(Object(re.a)(n),[o],Object(re.a)(e(t,o)))}),[])}(t.order,"",t.controlledInnerBlocks),o=Object.keys(Object(f.pickBy)(t.controlledInnerBlocks));return jo(jo({},t),{},{byClientId:jo(jo({},Object(f.omit)(t.byClientId,r)),Eo(n.blocks)),attributes:jo(jo({},Object(f.omit)(t.attributes,r)),Co(n.blocks)),order:jo(jo({},Object(f.omit)(t.order,r)),Object(f.omit)(ko(n.blocks),o)),parents:jo(jo({},Object(f.omit)(t.parents,r)),yo(n.blocks)),cache:jo(jo({},Object(f.omit)(t.cache,r)),Object(f.omit)(Object(f.mapValues)(_o(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:jo(jo({},c),{},{isPersistentChange:l})}return c=jo(jo({},c),{},{isPersistentChange:i?!n:!So(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 Eo(t.blocks);case"RECEIVE_BLOCKS":case"INSERT_BLOCKS":return jo(jo({},e),Eo(t.blocks));case"UPDATE_BLOCK":if(!e[t.clientId])return e;var n=Object(f.omit)(t.updates,"attributes");return Object(f.isEmpty)(n)?e:jo(jo({},e),{},Object(u.a)({},t.clientId,jo(jo({},e[t.clientId]),n)));case"REPLACE_BLOCKS_AUGMENTED_WITH_CHILDREN":return t.blocks?jo(jo({},Object(f.omit)(e,t.replacedClientIds)),Eo(t.blocks)):e;case"REMOVE_BLOCKS_AUGMENTED_WITH_CHILDREN":return Object(f.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 Co(t.blocks);case"RECEIVE_BLOCKS":case"INSERT_BLOCKS":return jo(jo({},e),Co(t.blocks));case"UPDATE_BLOCK":return e[t.clientId]&&t.updates.attributes?jo(jo({},e),{},Object(u.a)({},t.clientId,jo(jo({},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 jo(jo({},n),{},Object(u.a)({},r,Object(f.reduce)(t.attributes,(function(t,n,o){return n!==t[o]&&((t=wo(e[r],t))[o]=n),t}),e[r])))}),{});return t.clientIds.every((function(t){return n[t]===e[t]}))?e:jo(jo({},e),n);case"REPLACE_BLOCKS_AUGMENTED_WITH_CHILDREN":return t.blocks?jo(jo({},Object(f.omit)(e,t.replacedClientIds)),Co(t.blocks)):e;case"REMOVE_BLOCKS_AUGMENTED_WITH_CHILDREN":return Object(f.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 ko(t.blocks);case"RECEIVE_BLOCKS":return jo(jo({},e),Object(f.omit)(ko(t.blocks),""));case"INSERT_BLOCKS":var n=t.rootClientId,r=void 0===n?"":n,o=e[r]||[],c=ko(t.blocks,r),i=t.index,a=void 0===i?o.length:i;return jo(jo(jo({},e),c),{},Object(u.a)({},r,Oo(o,c[r],a)));case"MOVE_BLOCKS_TO_POSITION":var l,s=t.fromRootClientId,d=void 0===s?"":s,b=t.toRootClientId,p=void 0===b?"":b,m=t.clientIds,v=t.index,O=void 0===v?e[p].length:v;if(d===p){var g=e[p],h=g.indexOf(m[0]);return jo(jo({},e),{},Object(u.a)({},p,go(e[p],h,O,m.length)))}return jo(jo({},e),{},(l={},Object(u.a)(l,d,f.without.apply(void 0,[e[d]].concat(Object(re.a)(m)))),Object(u.a)(l,p,Oo(e[p],m,O)),l));case"MOVE_BLOCKS_UP":var j=t.clientIds,k=t.rootClientId,y=void 0===k?"":k,_=Object(f.first)(j),E=e[y];if(!E.length||_===Object(f.first)(E))return e;var C=E.indexOf(_);return jo(jo({},e),{},Object(u.a)({},y,go(E,C,C-1,j.length)));case"MOVE_BLOCKS_DOWN":var w=t.clientIds,S=t.rootClientId,I=void 0===S?"":S,B=Object(f.first)(w),x=Object(f.last)(w),P=e[I];if(!P.length||x===Object(f.last)(P))return e;var T=P.indexOf(B);return jo(jo({},e),{},Object(u.a)({},I,go(P,T,T+1,w.length)));case"REPLACE_BLOCKS_AUGMENTED_WITH_CHILDREN":var N=t.clientIds;if(!t.blocks)return e;var D=ko(t.blocks);return Object(f.flow)([function(e){return Object(f.omit)(e,t.replacedClientIds)},function(e){return jo(jo({},e),Object(f.omit)(D,""))},function(e){return Object(f.mapValues)(e,(function(e){return Object(f.reduce)(e,(function(e,t){return t===N[0]?[].concat(Object(re.a)(e),Object(re.a)(D[""])):(-1===N.indexOf(t)&&e.push(t),e)}),[])}))}])(e);case"REMOVE_BLOCKS_AUGMENTED_WITH_CHILDREN":return Object(f.flow)([function(e){return Object(f.omit)(e,t.removedClientIds)},function(e){return Object(f.mapValues)(e,(function(e){return f.without.apply(void 0,[e].concat(Object(re.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 yo(t.blocks);case"RECEIVE_BLOCKS":return jo(jo({},e),yo(t.blocks));case"INSERT_BLOCKS":return jo(jo({},e),yo(t.blocks,t.rootClientId||""));case"MOVE_BLOCKS_TO_POSITION":return jo(jo({},e),t.clientIds.reduce((function(e,n){return e[n]=t.toRootClientId||"",e}),{}));case"REPLACE_BLOCKS_AUGMENTED_WITH_CHILDREN":return jo(jo({},Object(f.omit)(e,t.replacedClientIds)),yo(t.blocks,e[t.clientIds[0]]));case"REMOVE_BLOCKS_AUGMENTED_WITH_CHILDREN":return Object(f.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?jo(jo({},e),{},Object(u.a)({},r,o)):e}});function xo(){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}var Po=Object(v.combineReducers)({blocks:Bo,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},selectionStart:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"SELECTION_CHANGE":return{clientId:t.clientId,attributeKey:t.attributeKey,offset:t.startOffset};case"RESET_SELECTION":return t.selectionStart;case"MULTI_SELECT":return{clientId:t.start}}return xo(e,t)},selectionEnd:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"SELECTION_CHANGE":return{clientId:t.clientId,attributeKey:t.attributeKey,offset:t.endOffset};case"RESET_SELECTION":return t.selectionEnd;case"MULTI_SELECT":return{clientId:t.end}}return xo(e,t)},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 jo(jo({},e),{},Object(u.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(f.omit)(e,t.clientIds);case"UPDATE_BLOCK_LIST_SETTINGS":var n=t.clientId;return t.settings?Object(f.isEqual)(e[n],t.settings)?e:jo(jo({},e),{},Object(u.a)({},n,t.settings)):e.hasOwnProperty(n)?Object(f.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"SHOW_INSERTION_POINT":var n=t.rootClientId,r=t.index;return{rootClientId:n,index:r};case"HIDE_INSERTION_POINT":return null}return e},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 jo(jo({},e),{},{isValid:t.isValid})}return e},settings:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:vo,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"UPDATE_SETTINGS":return jo(jo({},e),t.settings)}return e},preferences:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:mo,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.name,o={name:n.name};return Object(c.isReusableBlock)(n)&&(o.ref=n.attributes.ref,r+="/"+n.attributes.ref),jo(jo({},e),{},{insertUsage:jo(jo({},e.insertUsage),{},Object(u.a)({},r,{time:t.time,count:e.insertUsage[r]?e.insertUsage[r].count+1:1,insert:o}))})}),e)}return e},lastBlockAttributesChange:function(e,t){switch(t.type){case"UPDATE_BLOCK":if(!t.updates.attributes)break;return Object(u.a)({},t.clientId,t.updates.attributes);case"UPDATE_BLOCK_ATTRIBUTES":return t.clientIds.reduce((function(e,n){return jo(jo({},e),{},Object(u.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: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"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}}),To=n(150),No=n.n(To),Do=n(262),Ro=n.n(Do),Ao=n(36);function Mo(e,t){var n;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return Lo(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Lo(e,t)}(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 Lo(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 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 Vo(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(u.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}var Ho=gr.a.mark(tc),zo=gr.a.mark(lc),Uo=gr.a.mark(uc),Go=gr.a.mark(vc),Wo=gr.a.mark(kc),Ko=gr.a.mark(yc),qo=gr.a.mark(Ec),$o=gr.a.mark(xc),Yo=gr.a.mark($c),Xo=gr.a.mark(Yc),Qo=gr.a.mark(Xc),Zo=gr.a.mark(Qc),Jo=gr.a.mark(Zc),ec=gr.a.mark(ei);function tc(){return gr.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,v.controls.select("core/block-editor","getBlockCount");case 2:if(0!==e.sent){e.next=7;break}return e.next=6,Hc();case 6:return e.abrupt("return",e.sent);case 7:case"end":return e.stop()}}),Ho)}function nc(e){return{type:"RESET_BLOCKS",blocks:e}}function rc(e,t){return{type:"RESET_SELECTION",selectionStart:e,selectionEnd:t}}function oc(e){return{type:"RECEIVE_BLOCKS",blocks:e}}function cc(e,t){return{type:"UPDATE_BLOCK_ATTRIBUTES",clientIds:Object(f.castArray)(e),attributes:t}}function ic(e,t){return{type:"UPDATE_BLOCK",clientId:e,updates:t}}function ac(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return{type:"SELECT_BLOCK",initialPosition:t,clientId:e}}function lc(e){var t;return gr.a.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,v.controls.select("core/block-editor","getPreviousBlockClientId",e);case 2:if(!(t=n.sent)){n.next=7;break}return n.next=6,ac(t,-1);case 6:return n.abrupt("return",[t]);case 7:case"end":return n.stop()}}),zo)}function uc(e){var t;return gr.a.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,v.controls.select("core/block-editor","getNextBlockClientId",e);case 2:if(!(t=n.sent)){n.next=7;break}return n.next=6,ac(t);case 6:return n.abrupt("return",[t]);case 7:case"end":return n.stop()}}),Uo)}function sc(){return{type:"START_MULTI_SELECT"}}function dc(){return{type:"STOP_MULTI_SELECT"}}function bc(e,t){return{type:"MULTI_SELECT",start:e,end:t}}function fc(){return{type:"CLEAR_SELECTED_BLOCK"}}function pc(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];return{type:"TOGGLE_SELECTION",isSelectionEnabled:e}}function mc(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(c.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?void 0:r.includes("is-style-"))return e;var i=e.attributes,a=void 0===i?{}:i,l=o[n];return Vo(Vo({},e),{},{attributes:Vo(Vo({},a),{},{className:"".concat(r||""," is-style-").concat(l).trim()})})}))}function vc(e,t,n,r,o){var c,i,a;return gr.a.wrap((function(l){for(;;)switch(l.prev=l.next){case 0:return e=Object(f.castArray)(e),l.t0=mc,l.t1=Object(f.castArray)(t),l.next=5,v.controls.select("core/block-editor","getSettings");case 5:return l.t2=l.sent,t=(0,l.t0)(l.t1,l.t2),l.next=9,v.controls.select("core/block-editor","getBlockRootClientId",Object(f.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,v.controls.select("core/block-editor","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(tc(),"t3",24);case 24:case"end":return l.stop()}}),Go)}function Oc(e,t){return vc(e,t)}function gc(e){return function(t,n){return{clientIds:Object(f.castArray)(t),type:e,rootClientId:n}}}var hc=gc("MOVE_BLOCKS_DOWN"),jc=gc("MOVE_BLOCKS_UP");function kc(e){var t,n,r,o,c,i=arguments;return gr.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,v.controls.select("core/block-editor","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,v.controls.select("core/block-editor","canInsertBlocks",e,n);case 17:if(!a.sent){a.next=21;break}return a.next=21,c;case 21:case"end":return a.stop()}}),Wo)}function yc(e){var t,n,r,o=arguments;return gr.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,kc([e],t,n,r);case 5:case"end":return c.stop()}}),Ko)}function _c(e,t,n){var r=!(arguments.length>3&&void 0!==arguments[3])||arguments[3];return Ec([e],t,n,r)}function Ec(e,t,n){var r,o,c,i,a,l,u=arguments;return gr.a.wrap((function(s){for(;;)switch(s.prev=s.next){case 0:return r=!(u.length>3&&void 0!==u[3])||u[3],o=u.length>4?u[4]:void 0,s.t0=mc,s.t1=Object(f.castArray)(e),s.next=6,v.controls.select("core/block-editor","getSettings");case 6:s.t2=s.sent,e=(0,s.t0)(s.t1,s.t2),c=[],i=Mo(e),s.prev=10,i.s();case 12:if((a=i.n()).done){s.next=20;break}return l=a.value,s.next=16,v.controls.select("core/block-editor","canInsertBlockType",l.name,n);case 16:s.sent&&c.push(l);case 18:s.next=12;break;case 20:s.next=25;break;case 22:s.prev=22,s.t3=s.catch(10),i.e(s.t3);case 25:return s.prev=25,i.f(),s.finish(25);case 28:if(!c.length){s.next=30;break}return s.abrupt("return",{type:"INSERT_BLOCKS",blocks:c,index:t,rootClientId:n,time:Date.now(),updateSelection:r,meta:o});case 30:case"end":return s.stop()}}),qo,null,[[10,22,25,28]])}function Cc(e,t){return{type:"SHOW_INSERTION_POINT",rootClientId:e,index:t}}function wc(){return{type:"HIDE_INSERTION_POINT"}}function Sc(e){return{type:"SET_TEMPLATE_VALIDITY",isValid:e}}function Ic(){return{type:"SYNCHRONIZE_TEMPLATE"}}function Bc(e,t){return{type:"MERGE_BLOCKS",blocks:[e,t]}}function xc(e){var t,n,r,o,c=arguments;return gr.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(f.castArray)(e),i.next=6,v.controls.select("core/block-editor","getBlockRootClientId",e[0]);case 6:return n=i.sent,i.next=9,v.controls.select("core/block-editor","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,lc(e[0]);case 15:r=i.sent,i.next=21;break;case 18:return i.next=20,v.controls.select("core/block-editor","getPreviousBlockClientId",e[0]);case 20:r=i.sent;case 21:return i.next=23,{type:"REMOVE_BLOCKS",clientIds:e};case 23:return i.delegateYield(tc(),"t0",24);case 24:return o=i.t0,i.abrupt("return",[r||o]);case 26:case"end":return i.stop()}}),$o)}function Pc(e,t){return xc([e],t)}function Tc(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 Nc(e){return{type:"TOGGLE_BLOCK_MODE",clientId:e}}function Dc(){return{type:"START_TYPING"}}function Rc(){return{type:"STOP_TYPING"}}function Ac(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return{type:"START_DRAGGING_BLOCKS",clientIds:e}}function Mc(){return{type:"STOP_DRAGGING_BLOCKS"}}function Lc(){return{type:"ENTER_FORMATTED_TEXT"}}function Fc(){return{type:"EXIT_FORMATTED_TEXT"}}function Vc(e,t,n,r){return{type:"SELECTION_CHANGE",clientId:e,attributeKey:t,startOffset:n,endOffset:r}}function Hc(e,t,n){var r=Object(c.getDefaultBlockName)();if(r)return _c(Object(c.createBlock)(r,e),n,t)}function zc(e,t){return{type:"UPDATE_BLOCK_LIST_SETTINGS",clientId:e,settings:t}}function Uc(e){return{type:"UPDATE_SETTINGS",settings:e}}function Gc(e,t){return{type:"SAVE_REUSABLE_BLOCK_SUCCESS",id:e,updatedId:t}}function Wc(){return{type:"MARK_LAST_CHANGE_AS_PERSISTENT"}}function Kc(){return{type:"MARK_NEXT_CHANGE_AS_NOT_PERSISTENT"}}function qc(){return{type:"MARK_AUTOMATIC_CHANGE"}}function $c(){var e,t=arguments;return gr.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(Fe.speak)(Object(g.__)("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(Fe.speak)(Object(g.__)("You are currently in edit mode. To return to the navigation mode, press Escape."));case 4:case"end":return n.stop()}}),Yo)}function Yc(){var e,t=arguments;return gr.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(Fe.speak)(Object(g.__)("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()}}),Xo)}function Xc(e){var t,n,r,o,i,a,l=arguments;return gr.a.wrap((function(u){for(;;)switch(u.prev=u.next){case 0:if(t=!(l.length>1&&void 0!==l[1])||l[1],e||e.length){u.next=3;break}return u.abrupt("return");case 3:return u.next=5,v.controls.select("core/block-editor","getBlocksByClientId",e);case 5:return n=u.sent,u.next=8,v.controls.select("core/block-editor","getBlockRootClientId",e[0]);case 8:if(r=u.sent,!Object(f.some)(n,(function(e){return!e}))){u.next=11;break}return u.abrupt("return");case 11:if(o=n.map((function(e){return e.name})),!Object(f.some)(o,(function(e){return!Object(c.hasBlockSupport)(e,"multiple",!0)}))){u.next=14;break}return u.abrupt("return");case 14:return u.next=16,v.controls.select("core/block-editor","getBlockIndex",Object(f.last)(Object(f.castArray)(e)),r);case 16:return i=u.sent,a=n.map((function(e){return Object(c.cloneBlock)(e)})),u.next=20,Ec(a,i+1,r,t);case 20:if(!(a.length>1&&t)){u.next=23;break}return u.next=23,bc(Object(f.first)(a).clientId,Object(f.last)(a).clientId);case 23:return u.abrupt("return",a.map((function(e){return e.clientId})));case 24:case"end":return u.stop()}}),Qo)}function Qc(e){var t,n;return gr.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,v.controls.select("core/block-editor","getBlockRootClientId",e);case 4:return t=r.sent,r.next=7,v.controls.select("core/block-editor","getTemplateLock",t);case 7:if(!r.sent){r.next=10;break}return r.abrupt("return");case 10:return r.next=12,v.controls.select("core/block-editor","getBlockIndex",e,t);case 12:return n=r.sent,r.next=15,Hc({},t,n);case 15:return r.abrupt("return",r.sent);case 16:case"end":return r.stop()}}),Zo)}function Zc(e){var t,n;return gr.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,v.controls.select("core/block-editor","getBlockRootClientId",e);case 4:return t=r.sent,r.next=7,v.controls.select("core/block-editor","getTemplateLock",t);case 7:if(!r.sent){r.next=10;break}return r.abrupt("return");case 10:return r.next=12,v.controls.select("core/block-editor","getBlockIndex",e,t);case 12:return n=r.sent,r.next=15,Hc({},t,n+1);case 15:return r.abrupt("return",r.sent);case 16:case"end":return r.stop()}}),Jo)}function Jc(e,t){return{type:"TOGGLE_BLOCK_HIGHLIGHT",clientId:e,isHighlighted:t}}function ei(e){return gr.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,Jc(e,!0);case 2:return t.next=4,{type:"SLEEP",duration:150};case 4:return t.next=6,Jc(e,!1);case 6:case"end":return t.stop()}}),ec)}function ti(e,t){return{type:"SET_HAS_CONTROLLED_INNER_BLOCKS",hasControlledInnerBlocks:t,clientId:e}}var ni=n(49);function ri(e,t){var n;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return oi(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return oi(e,t)}(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 oi(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 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(u.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}var ai=Object(s.createElement)(h.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(s.createElement)(h.Rect,{x:"0",fill:"none",width:"24",height:"24"}),Object(s.createElement)(h.G,null,Object(s.createElement)(h.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"}))),li=[];function ui(e,t){var n=e.blocks.byClientId[t];if("web"!==s.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 si(e,t){var n=e.blocks.byClientId[t];return!!n&&n.isValid}function di(e,t){return e.blocks.byClientId[t]?e.blocks.attributes[t]:null}var bi=Object(ni.a)((function(e,t){var n=e.blocks.byClientId[t];return n?ii(ii({},n),{},{attributes:di(e,t),innerBlocks:Aa(e,t)?li:pi(e,t)}):null}),(function(e,t){return[e.blocks.cache[t]]})),fi=Object(ni.a)((function(e,t){var n=e.blocks.byClientId[t];return n?ii(ii({},n),{},{attributes:di(e,t)}):null}),(function(e,t){return[e.blocks.byClientId[t],e.blocks.attributes[t]]})),pi=Object(ni.a)((function(e,t){return Object(f.map)(Yi(e,t),(function(t){return bi(e,t)}))}),(function(e,t){return Object(f.map)(e.blocks.order[t||""],(function(t){return e.blocks.cache[t]}))})),mi=Object(ni.a)((function(e,t){var n=e.blocks.byClientId[t];return n?ii(ii({},n),{},{attributes:di(e,t),innerBlocks:vi(e,t)}):null}),(function(e){return[e.blocks.byClientId,e.blocks.order,e.blocks.attributes]})),vi=Object(ni.a)((function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return Object(f.map)(Yi(e,t),(function(t){return mi(e,t)}))}),(function(e){return[e.blocks.byClientId,e.blocks.order,e.blocks.attributes]})),Oi=function e(t,n){return Object(f.flatMap)(n,(function(n){var r=Yi(t,n);return[].concat(Object(re.a)(r),Object(re.a)(e(t,r)))}))},gi=Object(ni.a)((function(e){var t=Yi(e);return[].concat(Object(re.a)(t),Object(re.a)(Oi(e,t)))}),(function(e){return[e.blocks.order]})),hi=Object(ni.a)((function(e,t){var n=gi(e);return t?Object(f.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]})),ji=Object(ni.a)((function(e,t){return Object(f.map)(Object(f.castArray)(t),(function(t){return bi(e,t)}))}),(function(e){return[e.blocks.byClientId,e.blocks.order,e.blocks.attributes]}));function ki(e,t){return Yi(e,t).length}function yi(e){return e.selectionStart}function _i(e){return e.selectionEnd}function Ei(e){return e.selectionStart.clientId}function Ci(e){return e.selectionEnd.clientId}function wi(e){var t=Vi(e).length;return t||(e.selectionStart.clientId?1:0)}function Si(e){var t=e.selectionStart,n=e.selectionEnd;return!!t.clientId&&t.clientId===n.clientId}function Ii(e){var t=e.selectionStart,n=e.selectionEnd,r=t.clientId;return r&&r===n.clientId?r:null}function Bi(e){var t=Ii(e);return t?bi(e,t):null}function xi(e,t){return void 0!==e.blocks.parents[t]?e.blocks.parents[t]:null}var Pi=Object(ni.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]})),Ti=Object(ni.a)((function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]&&arguments[3],o=Pi(e,t,r);return Object(f.map)(Object(f.filter)(Object(f.map)(o,(function(t){return{id:t,name:ui(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 Ni(e,t){var n,r=t;do{n=r,r=e.blocks.parents[r]}while(r);return n}function Di(e,t){for(var n,r=Ii(e),o=[].concat(Object(re.a)(Pi(e,t)),[t]),c=[].concat(Object(re.a)(Pi(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 Ri(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;if(void 0===t&&(t=Ii(e)),void 0===t&&(t=n<0?zi(e):Ui(e)),!t)return null;var r=xi(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 Ai(e,t){return Ri(e,t,-1)}function Mi(e,t){return Ri(e,t,1)}function Li(e){return e.initialPosition}var Fi=Object(ni.a)((function(e){var t=e.selectionStart,n=e.selectionEnd;if(void 0===t.clientId||void 0===n.clientId)return li;if(t.clientId===n.clientId)return[t.clientId];var r=xi(e,t.clientId);if(null===r)return li;var o=Yi(e,r),c=o.indexOf(t.clientId),i=o.indexOf(n.clientId);return c>i?o.slice(i,c+1):o.slice(c,i+1)}),(function(e){return[e.blocks.order,e.selectionStart.clientId,e.selectionEnd.clientId]}));function Vi(e){var t=e.selectionStart,n=e.selectionEnd;return t.clientId===n.clientId?li:Fi(e)}var Hi=Object(ni.a)((function(e){var t=Vi(e);return t.length?t.map((function(t){return bi(e,t)})):li}),(function(e){return[].concat(Object(re.a)(Fi.getDependants(e)),[e.blocks.byClientId,e.blocks.order,e.blocks.attributes])}));function zi(e){return Object(f.first)(Vi(e))||null}function Ui(e){return Object(f.last)(Vi(e))||null}function Gi(e,t){return zi(e)===t}function Wi(e,t){return-1!==Vi(e).indexOf(t)}var Ki=Object(ni.a)((function(e,t){for(var n=t,r=!1;n&&!r;)r=Wi(e,n=xi(e,n));return r}),(function(e){return[e.blocks.order,e.selectionStart.clientId,e.selectionEnd.clientId]}));function qi(e){var t=e.selectionStart,n=e.selectionEnd;return t.clientId===n.clientId?null:t.clientId||null}function $i(e){var t=e.selectionStart,n=e.selectionEnd;return t.clientId===n.clientId?null:n.clientId||null}function Yi(e,t){return e.blocks.order[t||""]||li}function Xi(e,t,n){return Yi(e,n).indexOf(t)}function Qi(e,t){var n=e.selectionStart,r=e.selectionEnd;return n.clientId===r.clientId&&n.clientId===t}function Zi(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return Object(f.some)(Yi(e,t),(function(t){return Qi(e,t)||Wi(e,t)||n&&Zi(e,t,n)}))}function Ji(e,t){if(!t)return!1;var n=Vi(e),r=n.indexOf(t);return r>-1&&r<n.length-1}function ea(e){var t=e.selectionStart,n=e.selectionEnd;return t.clientId!==n.clientId}function ta(e){return e.isMultiSelecting}function na(e){return e.isSelectionEnabled}function ra(e,t){return e.blocksMode[t]||"visual"}function oa(e){return e.isTyping}function ca(e){return!!e.draggedBlocks.length}function ia(e){return e.draggedBlocks}function aa(e,t){return e.draggedBlocks.includes(t)}function la(e,t){if(!ca(e))return!1;var n=Pi(e,t);return Object(f.some)(n,(function(t){return aa(e,t)}))}function ua(e){return e.isCaretWithinFormattedText}function sa(e){var t,n,r=e.insertionPoint,o=e.selectionEnd;if(null!==r)return r;var c=o.clientId;return c?(t=xi(e,c)||void 0,n=Xi(e,o.clientId,t)+1):n=Yi(e).length,{rootClientId:t,index:n}}function da(e){return null!==e.insertionPoint}function ba(e){return e.template.isValid}function fa(e){return e.settings.template}function pa(e,t){if(!t)return e.settings.templateLock;var n=Ea(e,t);return n?n.templateLock:null}var ma=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,r=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;return Object(f.isBoolean)(e)?e:Object(f.isArray)(e)?!(!e.includes("core/post-content")||null!==t)||e.includes(t):n},o=Object(c.getBlockType)(t);if(!o)return!1;var i=Ca(e),a=i.allowedBlockTypes,l=r(a,t,!0);if(!l)return!1;var u=!!pa(e,n);if(u)return!1;var s=Ea(e,n);if(n&&void 0===s)return!1;var d=null==s?void 0:s.allowedBlocks,b=r(d,t),p=o.parent,m=ui(e,n),v=r(p,m);return null!==b&&null!==v?b||v:null!==b?b:null===v||v},va=Object(ni.a)(ma,(function(e,t,n){return[e.blockListSettings[n],e.blocks.byClientId[n],e.settings.allowedBlockTypes,e.settings.templateLock]}));function Oa(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;return t.every((function(t){return va(e,ui(e,t),n)}))}function ga(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 ha=function(e,t,n){return!!Object(c.hasBlockSupport)(t,"inserter",!0)&&ma(e,t.name,n)},ja=function(e){return function(t){return ii(ii({},e),{},{id:"".concat(e.id,"-").concat(t.name),icon:t.icon||e.icon,title:t.title||e.title,description:t.description||e.description,example:t.hasOwnProperty("example")?t.example:e.example,initialAttributes:ii(ii({},e.initialAttributes),t.attributes),innerBlocks:t.innerBlocks,keywords:t.keywords||e.keywords})}},ka=Object(ni.a)((function(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,r=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}},o=function(t){var n=t.name,o=!1;Object(c.hasBlockSupport)(t.name,"multiple",!0)||(o=Object(f.some)(ji(e,gi(e)),{name:t.name}));var i=ga(e,n)||{},a=i.time,l=i.count,u=void 0===l?0:l,s=t.variations.filter((function(e){var t=e.scope;return!t||t.includes("inserter")}));return{id:n,name:t.name,initialAttributes:{},title:t.title,description:t.description,icon:t.icon,category:t.category,keywords:t.keywords,variations:s,example:t.example,isDisabled:o,utility:1,frecency:r(a,u)}},i=function(t){var n,o="core/block/".concat(t.id),i=Ia(e,t.id);1===i.length&&(n=Object(c.getBlockType)(i[0].name));var a=ga(e,o)||{},l=a.time,u=a.count,s=r(l,void 0===u?0:u);return{id:o,name:"core/block",initialAttributes:{ref:t.id},title:t.title.raw,icon:n?n.icon:ai,category:"reusable",keywords:[],isDisabled:!1,utility:1,frecency:s}},a=Object(c.getBlockTypes)().filter((function(t){return ha(e,t,n)})).map(o),l=ma(e,"core/block",n)?Pa(e).map(i):[],u=a.filter((function(e){var t=e.variations;return!(void 0===t?[]:t).some((function(e){return e.isDefault}))})),s=[],d=ri(a);try{for(d.s();!(t=d.n()).done;){var b=t.value,p=b.variations,m=void 0===p?[]:p;if(m.length){var v=ja(b);s.push.apply(s,Object(re.a)(m.map(v)))}}}catch(e){d.e(e)}finally{d.f()}return[].concat(Object(re.a)(u),s,Object(re.a)(l))}),(function(e,t){return[e.blockListSettings[t],e.blocks.byClientId,e.blocks.order,e.preferences.insertUsage,e.settings.allowedBlockTypes,e.settings.templateLock,Pa(e),Object(c.getBlockTypes)()]})),ya=Object(ni.a)((function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=Object(f.some)(Object(c.getBlockTypes)(),(function(n){return ha(e,n,t)}));if(n)return!0;var r=ma(e,"core/block",t)&&Pa(e).length>0;return r}),(function(e,t){return[e.blockListSettings[t],e.blocks.byClientId,e.settings.allowedBlockTypes,e.settings.templateLock,Pa(e),Object(c.getBlockTypes)()]})),_a=Object(ni.a)((function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if(t)return Object(f.filter)(Object(c.getBlockTypes)(),(function(n){return ha(e,n,t)}))}),(function(e,t){return[e.blockListSettings[t],e.blocks.byClientId,e.settings.allowedBlockTypes,e.settings.templateLock,Object(c.getBlockTypes)()]}));function Ea(e,t){return e.blockListSettings[t]}function Ca(e){return e.settings}function wa(e){return e.blocks.isPersistentChange}var Sa=Object(ni.a)((function(e,t){return Object(f.filter)(e.blockListSettings,(function(e,n){return t.includes(n)}))}),(function(e){return[e.blockListSettings]})),Ia=Object(ni.a)((function(e,t){var n=Object(f.find)(Pa(e),(function(e){return e.id===t}));return n?Object(c.parse)("string"==typeof n.content.raw?n.content.raw:n.content):null}),(function(e){return[Pa(e)]}));function Ba(e){return e.blocks.isIgnoredChange}function xa(e){return e.lastBlockAttributesChange}function Pa(e){var t,n;return null!==(t=null==e||null===(n=e.settings)||void 0===n?void 0:n.__experimentalReusableBlocks)&&void 0!==t?t:li}function Ta(e){return e.isNavigationMode}function Na(e){return e.hasBlockMovingClientId}function Da(e){return!!e.automaticChangeStatus}function Ra(e,t){return e.highlightedBlock===t}function Aa(e,t){return!!e.blocks.controlledInnerBlocks[t]}var Ma=Object(ni.a)((function(e,t){if(!t.length)return null;var n=Ii(e);if(t.includes(ui(e,n)))return n;var r=Vi(e),o=Ti(e,n||r[0],t);return o?Object(f.last)(o):null}),(function(e,t){return[e.selectionStart.clientId,e.selectionEnd.clientId,t]}));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 Fa(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(u.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}var Va={MERGE_BLOCKS:function(e,t){var n=t.dispatch,r=t.getState(),o=Object(oe.a)(e.blocks,2),a=o[0],l=o[1],u=bi(r,a),s=Object(c.getBlockType)(u.name);if(s.merge){var d=bi(r,l),b=Object(c.getBlockType)(d.name),p=yi(r),m=p.clientId,v=p.attributeKey,O=p.offset,g=(m===a?s:b).attributes[v],h=(m===a||m===l)&&void 0!==v&&void 0!==O&&!!g;g||("number"==typeof v?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(Ao.a)(v))):window.console.error("The RichText identifier prop does not match any attributes defined by the block."));var j=Object(c.cloneBlock)(u),k=Object(c.cloneBlock)(d);if(h){var y=m===a?j:k,_=y.attributes[v],E=g.multiline,C=g.__unstableMultilineWrapperTags,w=g.__unstablePreserveWhiteSpace,S=Object(i.insert)(Object(i.create)({html:_,multilineTag:E,multilineWrapperTags:C,preserveWhiteSpace:w}),"†",O,O);y.attributes[v]=Object(i.toHTMLString)({value:S,multilineTag:E,preserveWhiteSpace:w})}var I=u.name===d.name?[k]:Object(c.switchToBlockType)(k,u.name);if(I&&I.length){var B=s.merge(j.attributes,I[0].attributes);if(h){var x=Object(f.findKey)(B,(function(e){return"string"==typeof e&&-1!==e.indexOf("†")})),P=B[x],T=s.attributes[x],N=T.multiline,D=T.__unstableMultilineWrapperTags,R=T.__unstablePreserveWhiteSpace,A=Object(i.create)({html:P,multilineTag:N,multilineWrapperTags:D,preserveWhiteSpace:R}),M=A.text.indexOf("†"),L=Object(i.remove)(A,M,M+1),F=Object(i.toHTMLString)({value:L,multilineTag:N,preserveWhiteSpace:R});B[x]=F,n(Vc(u.clientId,x,M,M))}n(vc([u.clientId,d.clientId],[Fa(Fa({},u),{},{attributes:Fa(Fa({},u.attributes),B)})].concat(Object(re.a)(I.slice(1)))))}}else n(ac(u.clientId))},RESET_BLOCKS:[function(e,t){var n=t.getState(),r=fa(n),o=pa(n),i=!r||"all"!==o||Object(c.doBlocksMatchTemplate)(e.blocks,r);if(i!==ba(n))return Sc(i)}],MULTI_SELECT:function(e,t){var n=wi((0,t.getState)());Object(Fe.speak)(Object(g.sprintf)(
26
  /* translators: %s: number of selected blocks */
27
+ Object(g._n)("%s block selected.","%s blocks selected.",n),n),"assertive")},SYNCHRONIZE_TEMPLATE:function(e,t){var n=(0,t.getState)(),r=pi(n),o=fa(n);return nc(Object(c.synchronizeBlocksWithTemplate)(r,o))},MARK_AUTOMATIC_CHANGE:function(e,t){var n=window,r=n.setTimeout,o=n.requestIdleCallback;(void 0===o?function(e){return r(e,100)}:o)((function(){t.dispatch({type:"MARK_AUTOMATIC_CHANGE_FINAL"})}))}};var Ha=function(e){var t,n=[No()(Va),Ro.a],r=function(){throw new Error("Dispatching while constructing your middleware is not allowed. Other middleware would not be applied to this dispatch.")},o={getState:e.getState,dispatch:function(){return r.apply(void 0,arguments)}};return t=n.map((function(e){return e(o)})),r=f.flowRight.apply(void 0,Object(re.a)(t))(e.dispatch),e.dispatch=r,e};function za(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 Ua(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?za(Object(n),!0).forEach((function(t){Object(u.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):za(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Ga={reducer:Po,selectors:o,actions:r,controls:{SLEEP:function(e){var t=e.duration;return new Promise((function(e){setTimeout(e,t)}))}}},Wa=Object(v.registerStore)("core/block-editor",Ua(Ua({},Ga),{},{persist:["preferences"]}));Ha(Wa);function Ka(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?f.noop:i,l=e.onInput,u=void 0===l?f.noop:l,d=Object(v.useRegistry)(),b=d.dispatch("core/block-editor"),p=b.resetBlocks,m=b.resetSelection,O=b.replaceInnerBlocks,g=b.setHasControlledInnerBlocks,h=b.__unstableMarkNextChangeAsNotPersistent,j=d.select("core/block-editor"),k=j.getBlockName,y=j.getBlocks,_=Object(s.useRef)({incoming:null,outgoing:[]}),E=Object(s.useRef)(u),C=Object(s.useRef)(a);Object(s.useEffect)((function(){E.current=u,C.current=a}),[u,a]),Object(s.useEffect)((function(){var e,t=d.select("core/block-editor"),r=t.getSelectionStart,o=t.getSelectionEnd,c=t.isLastBlockChangePersistent,i=t.__unstableIsLastBlockChangeIgnored,a=c(),l=!1,u=d.subscribe((function(){if(null===n||null!==k(n)){var t=c(),u=y(n),s=u!==e;if(e=u,s&&(_.current.incoming||i()))return _.current.incoming=null,void(a=t);if(s||l&&!s&&t&&!a)a=t,_.current.outgoing.push(e),(a?C.current:E.current)(e,{selectionStart:r(),selectionEnd:o()});l=s}}));return function(){return u()}}),[d,n]),Object(s.useEffect)((function(){_.current.outgoing.includes(r)?Object(f.last)(_.current.outgoing)===r&&(_.current.outgoing=[]):y(n)!==r&&(_.current.outgoing=[],_.current.incoming=r,r&&(h(),n?(g(n,!0),h(),O(n,r)):p(r)),o&&c&&m(o,c))}),[r,n])}var qa=Object(p.createHigherOrderComponent)((function(e){return Object(v.withRegistry)((function(t){var n=t.useSubRegistry,r=void 0===n||n,o=t.registry,c=Object(je.a)(t,["useSubRegistry","registry"]);if(!r)return Object(s.createElement)(e,Object(l.a)({registry:o},c));var i=Object(s.useState)(null),a=Object(oe.a)(i,2),u=a[0],d=a[1];return Object(s.useEffect)((function(){var e=Object(v.createRegistry)({},o),t=e.registerStore("core/block-editor",Ga);Ha(t),d(e)}),[o]),u?Object(s.createElement)(v.RegistryProvider,{value:u},Object(s.createElement)(e,Object(l.a)({registry:u},c))):null}))}),"withRegistryProvider")((function(e){var t=e.children,n=e.settings,r=Object(v.useDispatch)("core/block-editor").updateSettings;return Object(s.useEffect)((function(){r(n)}),[n]),Ka(e),t})),$a=n(76);var Ya=Object(p.compose)(Object(v.withSelect)((function(e,t){var n=e("core/block-editor"),r=n.getBlockCount,o=n.getBlockName,i=n.isBlockValid,a=n.getSettings,l=n.getTemplateLock,u=!r(t.rootClientId),s=o(t.lastBlockClientId)===Object(c.getDefaultBlockName)(),d=i(t.lastBlockClientId),b=a().bodyPlaceholder;return{isVisible:u||!s||!d,showPrompt:u,isLocked:!!l(t.rootClientId),placeholder:b}})),Object(v.withDispatch)((function(e,t){var n=e("core/block-editor"),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($a.decodeEntities)(c)||Object(g.__)("Start writing or type / to choose a block");return Object(s.createElement)("div",{"data-root-client-id":i||"",className:"wp-block block-editor-default-block-appender"},Object(s.createElement)(Jr.a,{role:"button","aria-label":Object(g.__)("Add block"),className:"block-editor-default-block-appender__content",readOnly:!0,onFocus:r,value:o?a:""}),Object(s.createElement)(cu,{rootClientId:i,position:"bottom right",isAppender:!0,__experimentalIsQuick:!0}))}));var Xa=Object(s.forwardRef)((function(e,t){var n=e.rootClientId,r=e.className,o=e.__experimentalSelectBlockOnInsert,c=e.onFocus,i=e.tabIndex;return Object(s.createElement)(cu,{position:"bottom center",rootClientId:n,__experimentalSelectBlockOnInsert:o,__experimentalIsQuick:!0,renderToggle:function(e){var n,o=e.onToggle,a=e.disabled,l=e.isOpen,u=e.blockTitle,d=e.hasSingleBlockType;n=d?Object(g.sprintf)(// translators: %s: the name of the block when there is only one
28
+ Object(g._x)("Add %s","directly add the only allowed block"),u):Object(g._x)("Add block","Generic label for block inserter button");var f=!d,p=Object(s.createElement)(h.Button,{ref:t,onFocus:c,tabIndex:i,className:b()(r,"block-editor-button-block-appender"),onClick:o,"aria-haspopup":f?"true":void 0,"aria-expanded":f?l:void 0,disabled:a,label:n},!d&&Object(s.createElement)(h.VisuallyHidden,{as:"span"},n),Object(s.createElement)(so.a,{icon:io.a}));return(f||d)&&(p=Object(s.createElement)(h.Tooltip,{text:n},p)),p},isAppender:!0})})),Qa=Object(s.createContext)();function Za(e){e.stopPropagation()}var Ja=Object(v.withSelect)((function(e,t){var n=t.rootClientId,r=e("core/block-editor"),o=r.getBlockOrder,i=r.canInsertBlockType,a=r.getTemplateLock,l=r.getSelectedBlockClientId;return{isLocked:!!a(n),blockClientIds:o(n),canInsertDefaultBlock:i(Object(c.getDefaultBlockName)(),n),selectedBlockClientId:l()}}))((function(e){var t,n=e.blockClientIds,r=e.rootClientId,o=e.canInsertDefaultBlock,c=e.isLocked,i=e.renderAppender,a=e.className,l=e.selectedBlockClientId,u=e.tagName,d=void 0===u?"div":u,p=Object(s.useContext)(Qa);if(c||!1===i)return null;if(i)t=Object(s.createElement)(i,null);else{var m=!r,v=l===r,O=l&&!n.includes(l);if(!m&&!v&&(!l||O))return null;t=o?Object(s.createElement)(Ya,{rootClientId:r,lastBlockClientId:Object(f.last)(n)}):Object(s.createElement)(Xa,{rootClientId:r,className:"block-list-appender__toggle"})}return Object(s.createElement)(d,{tabIndex:-1,onFocus:Za,className:b()("block-list-appender","wp-block",a),ref:function(e){e?p.set(r||"",e):p.delete(r||"")}},t)}));function el(e,t,n,r,o){return function(c){var i=function(e){var t={srcRootClientId:null,srcClientIds:null,srcIndex:null,type:null};if(!e.dataTransfer)return t;try{t=Object.assign(t,JSON.parse(e.dataTransfer.getData("text")))}catch(e){return t}return t}(c),a=i.srcRootClientId,l=i.srcClientIds;if("block"===i.type){var u=n(l[0],a);if(!(a===e&&u===t||l.includes(e)||r(l).some((function(t){return t===e})))){var s=a===e,d=l.length;o(l,a,e,s&&u<t?t-d:t)}}}}function tl(e,t,n,r,o){return function(i){if(n){var a=Object(c.findTransform)(Object(c.getBlockTransforms)("from"),(function(e){return"files"===e.type&&e.isMatch(i)}));if(a){var l=a.transform(i,r);o(l,t,e)}}}}function nl(e,t,n){return function(r){var o=Object(c.pasteHandler)({HTML:r,mode:"BLOCKS"});o.length&&n(o,t,e)}}function rl(e,t){var n=Object(v.useSelect)((function(e){var t=e("core/block-editor");return{getBlockIndex:t.getBlockIndex,getClientIdsOfDescendants:t.getClientIdsOfDescendants,hasUploadPermissions:(0,t.getSettings)().mediaUpload}}),[]),r=n.getBlockIndex,o=n.getClientIdsOfDescendants,c=n.hasUploadPermissions,i=Object(v.useDispatch)("core/block-editor"),a=i.insertBlocks,l=i.moveBlocksToPosition,u=i.updateBlockAttributes;return{onDrop:el(e,t,r,o,l),onFilesDrop:tl(e,t,c,u,a),onHTMLDrop:nl(e,t,a)}}function ol(e,t,n){var r,o="top"===n||"bottom"===n,c=e.x,i=e.y,a=o?c:i,l=o?i:c,u=o?t.left:t.top,s=o?t.right:t.bottom,d=t[n];return r=a>=u&&a<=s?a:a<s?u:s,Math.sqrt(Math.pow(a-r,2)+Math.pow(l-d,2))}function cl(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=ol(e,t,o);(void 0===n||c<n)&&(n=c,r=o)})),[n,r]}function il(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 al(e){var t=e.element,n=e.rootClientId,r=void 0===n?"":n,o=Object(s.useState)(null),c=Object(oe.a)(o,2),i=c[0],a=c[1],l=Object(v.useSelect)((function(e){var t,n=e("core/block-editor"),o=n.getBlockListSettings;return{isLockedAll:"all"===(0,n.getTemplateLock)(r),orientation:null===(t=o(r))||void 0===t?void 0:t.orientation}}),[r]),d=l.isLockedAll,b=l.orientation,f=rl(r,i),p=Object(h.__unstableUseDropZone)(function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?il(Object(n),!0).forEach((function(t){Object(u.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):il(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(s.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=cl(t,a,c),u=Object(oe.a)(l,2),s=u[0],d=u[1];if(void 0===o||s<o){var b="bottom"===d||"right"===d,f=b?1:0,p=b&&e[i+1]&&e[i+1].classList.contains("is-dragging");o=s,r=i+(f+=p?1:0)}}})),r}(Array.from(t.current.children),p,b);a(void 0===e?0:e)}}),[p]),p)return i}var ll=new Map;function ul(e){var t=e.placeholder,n=e.rootClientId,r=e.renderAppender,o=e.__experimentalAppenderTagName,c=e.wrapperRef;var i=Object(v.useSelect)((function(e){var t,r=e("core/block-editor"),o=r.getBlockOrder,c=r.getBlockListSettings,i=r.getSettings,a=r.getSelectedBlockClientId,l=r.getMultiSelectedBlockClientIds,u=r.hasMultiSelection,s=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:u(),enableAnimation:!d()&&s()<=200,activeEntityBlockId:b}}),[n]),a=i.blockClientIds,l=i.selectedBlockClientId,u=i.multiSelectedBlockClientIds,d=i.orientation,f=i.hasMultiSelection,p=i.enableAnimation,m=i.activeEntityBlockId,O=al({element:c,rootClientId:n}),g=O===a.length;return Object(s.createElement)(s.Fragment,null,a.map((function(e,t){var r=f?u.includes(e):l===e,o=O===t;return Object(s.createElement)(v.AsyncModeProvider,{key:e,value:!r},Object(s.createElement)(Ps,{rootClientId:n,clientId:e,index:t,enableAnimation:p,className:b()({"is-drop-target":o,"is-dropping-horizontally":o&&"horizontal"===d,"has-active-entity":m}),activeEntityBlockId:m}))})),a.length<1&&t,Object(s.createElement)(Ja,{tagName:o,rootClientId:n,renderAppender:r,className:b()({"is-drop-target":g,"is-dropping-horizontally":g&&"horizontal"===d})}))}function sl(e){return Object(s.createElement)(v.AsyncModeProvider,{value:!1},Object(s.createElement)(ul,e))}var dl,bl=Object(s.forwardRef)((function(e,t){var n=e.className,r=e.placeholder,o=e.rootClientId,c=e.renderAppender,i=o?"div":gs,a=Object(s.useRef)(),l=t||a;return Object(s.createElement)(Qa.Provider,{value:ll},Object(s.createElement)(i,{ref:l,className:b()("block-editor-block-list__layout",n)},Object(s.createElement)(sl,{placeholder:r,rootClientId:o,renderAppender:c,wrapperRef:l})))}));function fl(e){var t=e.onClick;return Object(s.createElement)("div",{tabIndex:0,role:"button",onClick:t,onKeyPress:t},Object(s.createElement)(h.Disabled,null,Object(s.createElement)(bl,null)))}var pl=function(e){var t=e.viewportWidth,n=e.__experimentalPadding,r=Object(p.useResizeObserver)(),o=Object(oe.a)(r,2),c=o[0],i=o[1].width,a=Object(p.useResizeObserver)(),l=Object(oe.a)(a,2),u=l[0],d=l[1].height;dl=dl||Object(p.pure)(bl);var b=(i-2*n)/t;return Object(s.createElement)("div",{className:"block-editor-block-preview__container editor-styles-wrapper","aria-hidden":!0,style:{height:d*b+2*n}},c,Object(s.createElement)(h.Disabled,{style:{transform:"scale(".concat(b,")"),width:t,left:n,right:n,top:n},className:"block-editor-block-preview__content"},u,Object(s.createElement)(dl,null)))};var ml=Object(s.memo)((function(e){var t=e.blocks,n=e.__experimentalPadding,r=void 0===n?0:n,o=e.viewportWidth,c=void 0===o?700:o,i=e.__experimentalLive,a=void 0!==i&&i,l=e.__experimentalOnClick,u=Object(v.useSelect)((function(e){return e("core/block-editor").getSettings()}),[]),d=Object(s.useMemo)((function(){return Object(f.castArray)(t)}),[t]);return t&&0!==t.length?Object(s.createElement)(qa,{value:d,settings:u},a?Object(s.createElement)(fl,{onClick:l}):Object(s.createElement)(pl,{viewportWidth:c,__experimentalPadding:r})):null}));function vl(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 Ol(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?vl(Object(n),!0).forEach((function(t){Object(u.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):vl(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var gl=function(e){var t,n,r=e.item,o=Object(c.getBlockType)(r.name);return Object(s.createElement)("div",{className:"block-editor-inserter__preview-container"},Object(s.createElement)("div",{className:"block-editor-inserter__preview"},Object(c.isReusableBlock)(r)||o.example?Object(s.createElement)("div",{className:"block-editor-inserter__preview-content"},Object(s.createElement)(ml,{__experimentalPadding:16,viewportWidth:null!==(t=null===(n=o.example)||void 0===n?void 0:n.viewportWidth)&&void 0!==t?t:500,blocks:o.example?Object(c.getBlockFromExample)(r.name,{attributes:Ol(Ol({},o.example.attributes),r.initialAttributes),innerBlocks:o.example.innerBlocks}):Object(c.createBlock)(r.name,r.initialAttributes)})):Object(s.createElement)("div",{className:"block-editor-inserter__preview-content-missing"},Object(g.__)("No Preview Available."))),!Object(c.isReusableBlock)(r)&&Object(s.createElement)(po,{blockType:r}))},hl=n(55),jl=n(117),kl=n(118);var yl=function(e){var t=e.icon,n=e.onClick,r=e.isDisabled,o=e.title,c=e.className,i=e.composite,a=Object(je.a)(e,["icon","onClick","isDisabled","title","className","composite"]),u=t?{backgroundColor:t.background,color:t.foreground}:{};return Object(s.createElement)("div",{className:"block-editor-block-types-list__list-item"},Object(s.createElement)(kl.a,Object(l.a)({role:"option",as:h.Button},i,{className:b()("block-editor-block-types-list__item",c),onClick:function(e){e.preventDefault(),n()},disabled:r},a),Object(s.createElement)("span",{className:"block-editor-block-types-list__item-icon",style:u},Object(s.createElement)($n,{icon:t,showColors:!0})),Object(s.createElement)("span",{className:"block-editor-block-types-list__item-title"},o)))};var _l=function(e){var t=e.items,n=void 0===t?[]:t,r=e.onSelect,o=e.onHover,i=void 0===o?function(){}:o,a=e.children,u=e.label,d=Object(hl.g)(),b=n.reduce((function(e,t){return e+"--"+t.id}),"");return Object(s.useEffect)((function(){d.unstable_sort()}),[d.unstable_sort,b]),Object(s.createElement)(jl.a,Object(l.a)({},d,{role:"listbox",className:"block-editor-block-types-list","aria-label":u}),n.map((function(e){return Object(s.createElement)(yl,{key:e.id,className:Object(c.getBlockMenuDefaultClassName)(e.id),icon:e.icon,onClick:function(){r(e),i(null)},onFocus:function(){return i(e)},onMouseEnter:function(){return i(e)},onMouseLeave:function(){return i(null)},onBlur:function(){return i(null)},isDisabled:e.isDisabled,title:e.title,composite:d})})),a)};function El(e){var t=e.rootClientId,n=e.children,r=Object(v.useSelect)((function(e){var n=(0,e("core/blocks").getBlockType)((0,e("core/block-editor").getBlockName)(t));return{rootBlockTitle:n&&n.title,rootBlockIcon:n&&n.icon}})),o=r.rootBlockTitle,c=r.rootBlockIcon;return Object(s.createElement)("div",{className:"block-editor-inserter__child-blocks"},(c||o)&&Object(s.createElement)("div",{className:"block-editor-inserter__parent-block-header"},Object(s.createElement)($n,{icon:c,showColors:!0}),o&&Object(s.createElement)("h2",null,o)),n)}var Cl=Object(h.createSlotFill)("__experimentalInserterMenuExtension"),wl=Cl.Fill,Sl=Cl.Slot;wl.Slot=Sl;var Il=wl;var Bl=function(e){var t=e.title,n=e.icon,r=e.children;return Object(s.createElement)(s.Fragment,null,Object(s.createElement)("div",{className:"block-editor-inserter__panel-header"},Object(s.createElement)("h2",{className:"block-editor-inserter__panel-title"},t),Object(s.createElement)(h.Icon,{icon:n})),Object(s.createElement)("div",{className:"block-editor-inserter__panel-content"},r))};var xl=function(){return Object(s.createElement)("div",{className:"block-editor-inserter__no-results"},Object(s.createElement)(so.a,{className:"block-editor-inserter__no-results-icon",icon:qn.a}),Object(s.createElement)("p",null,Object(g.__)("No results found.")))};function Pl(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 Tl=Object(h.withSpokenMessages)((function(e){var t=e.rootClientId,n=e.onInsert,r=e.onHover,o=e.filterValue,c=e.debouncedSpeak,i=e.showMostUsedBlocks,a=Kn(t,n),l=Object(oe.a)(a,4),d=l[0],b=l[1],p=l[2],m=l[3],O=Object(v.useSelect)((function(e){var n=e("core/block-editor").getBlockName;return!!(0,e("core/blocks").getChildBlockNames)(n(t)).length}),[t]),h=Object(s.useMemo)((function(){return Un(d,b,p,o)}),[o,d,b,p]),j=Object(s.useMemo)((function(){return Object(f.orderBy)(d,["frecency"],["desc"]).slice(0,6)}),[d]),k=Object(s.useMemo)((function(){return h.filter((function(e){return!e.category}))}),[h]),y=Object(s.useMemo)((function(){var e=function(e){return Object(f.findIndex)(b,(function(t){return t.slug===e.category}))};return Object(f.flow)((function(e){return e.filter((function(e){return e.category&&"reusable"!==e.category}))}),(function(t){return Object(f.sortBy)(t,e)}),(function(e){return Object(f.groupBy)(e,"category")}))(h)}),[h,b]),_=Object(s.useMemo)((function(){var e=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Pl(Object(n),!0).forEach((function(t){Object(u.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Pl(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({},p);return Object.keys(p).forEach((function(t){e[t]=h.filter((function(e){return function(e){return e.name.split("/")[0]}(e)===t})),0===e[t].length&&delete e[t]})),e}),[h,p]);Object(s.useEffect)((function(){return function(){return r(null)}}),[]),Object(s.useEffect)((function(){var e=Object(g.sprintf)(
29
  /* translators: %d: number of results. */
30
+ Object(g._n)("%d result found.","%d results found.",h.length),h.length);c(e)}),[o,c]);var E=!Object(f.isEmpty)(h);return Object(s.createElement)("div",null,O&&Object(s.createElement)(El,{rootClientId:t},Object(s.createElement)(_l,{items:h,onSelect:m,onHover:r,label:Object(g.__)("Child Blocks")})),i&&!O&&!!j.length&&!o&&Object(s.createElement)(Bl,{title:Object(g._x)("Most used","blocks")},Object(s.createElement)(_l,{items:j,onSelect:m,onHover:r,label:Object(g._x)("Most used","blocks")})),!O&&Object(f.map)(b,(function(e){var t=y[e.slug];return t&&t.length?Object(s.createElement)(Bl,{key:e.slug,title:e.title,icon:e.icon},Object(s.createElement)(_l,{items:t,onSelect:m,onHover:r,label:e.title})):null})),!O&&!!k.length&&Object(s.createElement)(Bl,{className:"block-editor-inserter__uncategorized-blocks-panel",title:Object(g.__)("Uncategorized")},Object(s.createElement)(_l,{items:k,onSelect:m,onHover:r,label:Object(g.__)("Uncategorized")})),!O&&Object(f.map)(p,(function(e,t){var n=_[t];return n&&n.length?Object(s.createElement)(Bl,{key:t,title:e.title,icon:e.icon},Object(s.createElement)(_l,{items:n,onSelect:m,onHover:r,label:e.title})):null})),Object(s.createElement)(Il.Slot,{fillProps:{onSelect:m,onHover:r,filterValue:o,hasItems:E}},(function(e){return e.length?e:E?null:Object(s.createElement)(xl,null)})))}));var Nl=function(e){var t,n=e.selectedCategory,r=e.patternCategories,o=e.onClickCategory,c=e.children;return Object(s.createElement)(s.Fragment,null,Object(s.createElement)("div",{className:b()("block-editor-inserter__panel-header","block-editor-inserter__panel-header-patterns")},Object(s.createElement)(h.SelectControl,{className:"block-editor-inserter__panel-dropdown",label:Object(g.__)("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(s.createElement)("div",{className:"block-editor-inserter__panel-content"},c))},Dl=function(e){var t=Object(v.useSelect)((function(e){var t=e("core/block-editor").getSettings();return{patterns:t.__experimentalBlockPatterns,patternCategories:t.__experimentalBlockPatternCategories}}),[]),n=t.patternCategories,r=t.patterns,o=Object(v.useDispatch)("core/notices").createSuccessNotice;return[r,n,Object(s.useCallback)((function(t,n){e(Object(f.map)(n,(function(e){return Object(c.cloneBlock)(e)})),t.name),o(Object(g.sprintf)(
31
  /* translators: %s: block pattern title. */
32
+ Object(g.__)('Block pattern "%s" inserted.'),t.title),{type:"snackbar"})}),[])]};function Rl(e){var t=e.pattern,n=e.onClick,r=t.content,o=t.viewportWidth,i=Object(s.useMemo)((function(){return Object(c.parse)(r)}),[r]),a=Object(p.useInstanceId)(Rl),l="block-editor-block-patterns-list__item-description-".concat(a);return Object(s.createElement)("div",{className:"block-editor-block-patterns-list__item",role:"button",onClick:function(){return n(t,i)},onKeyDown:function(e){st.ENTER!==e.keyCode&&st.SPACE!==e.keyCode||n(t,i)},tabIndex:0,"aria-label":t.title,"aria-describedby":t.description?l:void 0},Object(s.createElement)(ml,{blocks:i,viewportWidth:o}),Object(s.createElement)("div",{className:"block-editor-block-patterns-list__item-title"},t.title),!!t.description&&Object(s.createElement)(h.VisuallyHidden,{id:l},t.description))}function Al(){return Object(s.createElement)("div",{className:"block-editor-block-patterns-list__item is-placeholder"})}var Ml=function(e){var t=e.blockPatterns,n=e.shownPatterns,r=e.onClickPattern;return t.map((function(e){return n.includes(e)?Object(s.createElement)(Rl,{key:e.name,pattern:e,onClick:r}):Object(s.createElement)(Al,{key:e.name})}))};function Ll(e){var t=e.filterValue,n=e.onInsert,r=Dl(n),o=Object(oe.a)(r,3),c=o[0],i=o[2],a=Object(s.useMemo)((function(){return Gn(c,t)}),[t,c]),l=Object(p.useAsyncList)(a);if(t)return a.length?Object(s.createElement)(Bl,{title:Object(g.__)("Search Results")},Object(s.createElement)(Ml,{shownPatterns:l,blockPatterns:a,onClickPattern:i})):Object(s.createElement)(xl,null)}function Fl(e){var t=e.onInsert,n=e.selectedCategory,r=e.onClickCategory,o=Dl(t),c=Object(oe.a)(o,3),i=c[0],a=c[1],l=c[2],u=Object(s.useMemo)((function(){return a.filter((function(e){return i.some((function(t){return t.categories.includes(e.name)}))}))}),[i,a]),d=n||u[0];Object(s.useEffect)((function(){i.some((function(e){return b(e)===1/0}))&&!u.find((function(e){return"uncategorized"===e.name}))&&u.push({name:"uncategorized",label:Object(g._x)("Uncategorized")})}),[u,i]);var b=Object(s.useCallback)((function(e){if(!e.categories||!e.categories.length)return 1/0;var t=Object(f.fromPairs)(u.map((function(e,t){return[e.name,t]})));return Math.min.apply(Math,Object(re.a)(e.categories.map((function(e){return void 0!==t[e]?t[e]:1/0}))))}),[u]),m=Object(s.useMemo)((function(){return i.filter((function(e){return"uncategorized"===d.name?b(e)===1/0:e.categories&&e.categories.includes(d.name)}))}),[i,d]),v=Object(s.useMemo)((function(){return m.sort((function(e,t){return b(e)-b(t)}))}),[m,b]),O=Object(p.useAsyncList)(v);return Object(s.createElement)(s.Fragment,null,!!m.length&&Object(s.createElement)(Nl,{key:d.name,title:d.title,selectedCategory:d,patternCategories:u,onClickCategory:r},Object(s.createElement)(Ml,{shownPatterns:O,blockPatterns:m,onClickPattern:l})))}var Vl=function(e){var t=e.onInsert,n=e.onClickCategory,r=e.filterValue,o=e.selectedCategory;return r?Object(s.createElement)(Ll,{onInsert:t,filterValue:r}):Object(s.createElement)(Fl,{selectedCategory:o,onInsert:t,onClickCategory:n})},Hl=n(28);function zl(e){var t=e.debouncedSpeak,n=e.filterValue,r=e.onHover,o=e.onInsert,c=e.rootClientId,i=Kn(c,o),a=Object(oe.a)(i,4),l=a[0],u=a[1],d=a[2],b=a[3],f=Object(s.useMemo)((function(){var e=l.filter((function(e){return"reusable"===e.category}));return n?Un(e,u,d,n):e}),[n,l,u,d]);return Object(s.useEffect)((function(){var e=Object(g.sprintf)(
33
  /* translators: %d: number of results. */
34
+ Object(g._n)("%d result found.","%d results found.",f.length),f.length);t(e)}),[n,t]),0===f.length?Object(s.createElement)(xl,null):Object(s.createElement)(Bl,{title:n?Object(g.__)("Search Results"):Object(g.__)("Reusable blocks")},Object(s.createElement)(_l,{items:f,onSelect:b,onHover:r,label:n?Object(g.__)("Search Results"):Object(g.__)("Reusable blocks")}))}var Ul=Object(h.withSpokenMessages)((function(e){var t=e.rootClientId,n=e.onInsert,r=e.onHover,o=e.filterValue,c=e.debouncedSpeak;return Object(s.createElement)(s.Fragment,null,Object(s.createElement)(zl,{debouncedSpeak:c,filterValue:o,onHover:r,onInsert:n,rootClientId:t}),Object(s.createElement)("div",{className:"block-editor-inserter__manage-reusable-blocks-container"},Object(s.createElement)("a",{className:"block-editor-inserter__manage-reusable-blocks",href:Object(Hl.addQueryArgs)("edit.php",{post_type:"wp_block"})},Object(g.__)("Manage all reusable blocks"))))}));function Gl(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 Wl=function(e){var t=e.onSelect,n=e.rootClientId,r=e.clientId,o=e.isAppender,i=e.selectBlockOnInsert,a=e.insertionIndex,l=Object(v.useSelect)((function(e){var t,c=e("core/block-editor"),i=c.getSettings,a=c.getBlockRootClientId,l=c.getBlockSelectionEnd,s=n;if(!s&&!r&&!o){var d=l();d&&(s=a(d))}return function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Gl(Object(n),!0).forEach((function(t){Object(u.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Gl(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({hasPatterns:!!(null===(t=i().__experimentalBlockPatterns)||void 0===t?void 0:t.length),destinationRootClientId:s},Object(f.pick)(e("core/block-editor"),["getSelectedBlock","getBlockIndex","getBlockSelectionEnd","getBlockOrder"]))}),[o,r,n]),s=l.destinationRootClientId,d=l.getSelectedBlock,b=l.getBlockIndex,p=l.getBlockSelectionEnd,m=l.getBlockOrder,O=Object(v.useDispatch)("core/block-editor"),h=O.replaceBlocks,j=O.insertBlocks,k=O.showInsertionPoint,y=O.hideInsertionPoint;function _(){if(void 0!==a)return a;if(r)return b(r,s);var e=p();return!o&&e?b(e,s)+1:m(s).length}return[s,function(e,n){var r=d();if(!o&&r&&Object(c.isUnmodifiedDefaultBlock)(r)?h(r.clientId,e,null,null,n):j(e,_(),s,i,n),!i){
35
  // translators: %d: the name of the block that has been added
36
+ var a=Object(g._n)("%d block added.","%d blocks added.",e.length);Object(Fe.speak)(a)}t&&t()},function(e){if(e){var t=_();k(s,t)}else y()}]},Kl={name:"blocks",
37
  /* translators: Blocks tab title in the block inserter. */
38
+ title:Object(g.__)("Blocks")},ql={name:"patterns",
39
  /* translators: Patterns tab title in the block inserter. */
40
+ title:Object(g.__)("Patterns")},$l={name:"reusable",
41
  /* translators: Reusable blocks tab title in the block inserter. */
42
+ title:Object(g.__)("Reusable")};var Yl=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=[Kl];return r&&a.push(ql),c&&a.push($l),Object(s.createElement)(h.TabPanel,{className:"block-editor-inserter__tabs",tabs:a,onSelect:i},t)},Xl=function(e){return e.stopPropagation()};var Ql=function(e){var t=e.rootClientId,n=e.clientId,r=e.isAppender,o=e.__experimentalSelectBlockOnInsert,c=e.__experimentalInsertionIndex,i=e.onSelect,a=e.showInserterHelpPanel,l=e.showMostUsedBlocks,u=Object(s.useState)("blocks"),d=Object(oe.a)(u,2),b=d[0],f=d[1],p=Object(s.useState)(""),m=Object(oe.a)(p,2),O=m[0],j=m[1],k=Object(s.useState)(null),y=Object(oe.a)(k,2),_=y[0],E=y[1],C=Object(s.useState)(null),w=Object(oe.a)(C,2),S=w[0],I=w[1],B=Wl({rootClientId:t,clientId:n,isAppender:r,selectBlockOnInsert:o,insertionIndex:c}),x=Object(oe.a)(B,3),P=x[0],T=x[1],N=x[2],D=Object(v.useSelect)((function(e){var t=e("core/block-editor").getSettings(),n=t.__experimentalBlockPatterns,r=t.__experimentalReusableBlocks;return{hasPatterns:!!(null==n?void 0:n.length),hasReusableBlocks:!!(null==r?void 0:r.length)}}),[]),R=D.hasPatterns,A=D.hasReusableBlocks,M=!P&&R,L=function(e){T(e),i()},F=function(e){N(!!e),E(e)},V=Object(s.createElement)(s.Fragment,null,Object(s.createElement)("div",{className:"block-editor-inserter__block-list"},Object(s.createElement)(Tl,{rootClientId:P,onInsert:L,onHover:F,filterValue:O,showMostUsedBlocks:l})),a&&Object(s.createElement)("div",{className:"block-editor-inserter__tips"},Object(s.createElement)(h.VisuallyHidden,{as:"h2"},Object(g.__)("A tip for using the block editor")),Object(s.createElement)(lo,null))),H=Object(s.createElement)(Vl,{onInsert:function(e,t){T(e,{patternName:t}),i()},filterValue:O,onClickCategory:function(e){I(e)},selectedCategory:S}),z=Object(s.createElement)(Ul,{rootClientId:P,onInsert:L,onHover:F,filterValue:O});return Object(s.createElement)("div",{className:"block-editor-inserter__menu",onKeyPress:Xl,onKeyDown:function(e){[st.LEFT,st.DOWN,st.RIGHT,st.UP,st.BACKSPACE,st.ENTER].includes(e.keyCode)&&e.stopPropagation()}},Object(s.createElement)("div",{className:"block-editor-inserter__main-area"},Object(s.createElement)("div",{className:"block-editor-inserter__content"},Object(s.createElement)(fo,{onChange:function(e){_&&E(null),j(e)},value:O,placeholder:"reusable"===b?Object(g.__)("Search for a reusable block"):"patterns"===b?Object(g.__)("Search for a pattern"):Object(g.__)("Search for a block")}),(M||A)&&Object(s.createElement)(Yl,{showPatterns:M,showReusableBlocks:A,onSelect:f},(function(e){return"blocks"===e.name?V:"patterns"===e.name?H:z})),!M&&!A&&V)),a&&_&&Object(s.createElement)(gl,{item:_}))},Zl=function(e){[st.LEFT,st.DOWN,st.RIGHT,st.UP,st.BACKSPACE,st.ENTER].includes(e.keyCode)&&e.stopPropagation()},Jl=function(e){return e.stopPropagation()};function eu(e){var t=e.blockTypes,n=e.blockPatterns,r=e.onSelectBlockType,o=e.onSelectBlockPattern,c=e.onHover,i=Object(s.useMemo)((function(){return Object(f.orderBy)(t,["frecency"],["desc"]).slice(0,6)}),[t]),a=Object(s.useMemo)((function(){return n.slice(0,2)}),[t]);return Object(s.createElement)("div",{className:"block-editor-inserter__quick-inserter-results"},!i.length&&!a.length&&Object(s.createElement)(xl,null),!!i.length&&Object(s.createElement)(Bl,{title:Object(s.createElement)(h.VisuallyHidden,null,Object(g.__)("Blocks"))},Object(s.createElement)(_l,{items:i,onSelect:r,onHover:c,label:Object(g.__)("Blocks")})),!!i.length&&!!a.length&&Object(s.createElement)("div",{className:"block-editor-inserter__quick-inserter-separator"}),!!a.length&&Object(s.createElement)(Bl,{title:Object(s.createElement)(h.VisuallyHidden,null,Object(g.__)("Blocks"))},Object(s.createElement)("div",{className:"block-editor-inserter__quick-inserter-patterns"},Object(s.createElement)(Ml,{shownPatterns:a,blockPatterns:a,onClickPattern:o}))))}function tu(e){var t=e.onSelect,n=e.rootClientId,r=e.clientId,o=e.isAppender,c=e.selectBlockOnInsert,i=Object(p.useDebounce)(Fe.speak,500),a=Object(s.useState)(""),l=Object(oe.a)(a,2),u=l[0],d=l[1],f=Wl({onSelect:t,rootClientId:n,clientId:r,isAppender:o,selectBlockOnInsert:c}),m=Object(oe.a)(f,3),O=m[0],j=m[1],k=m[2],y=Kn(O,j),_=Object(oe.a)(y,4),E=_[0],C=_[1],w=_[2],S=_[3],I=Dl(j),B=Object(oe.a)(I,3),x=B[0],P=B[2],T=!O&&x.length&&!!u,N=T&&x.length>6||E.length>6,D=Object(s.useMemo)((function(){return Un(E,C,w,u)}),[u,E,C,w]),R=Object(s.useMemo)((function(){return Gn(x,u)}),[u,x]),A=Object(v.useSelect)((function(e){return e("core/block-editor").getSettings().__experimentalSetIsInserterOpened}),[]),M=Object(v.useSelect)((function(e){return e("core/block-editor").getPreviousBlockClientId(r)}),[r]);Object(s.useEffect)((function(){A&&A(!1)}),[A]);var L=Object(v.useDispatch)("core/block-editor").selectBlock;Object(s.useEffect)((function(){if(u){var e=D.length+R.length,t=Object(g.sprintf)(
43
  /* translators: %d: number of results. */
44
+ Object(g._n)("%d result found.","%d results found.",e),e);i(t)}}),[u,i]);return Object(s.createElement)("div",{className:b()("block-editor-inserter__quick-inserter",{"has-search":N,"has-expand":A}),onKeyPress:Jl,onKeyDown:Zl},N&&Object(s.createElement)(fo,{value:u,onChange:function(e){d(e)},placeholder:Object(g.__)("Search for a block")}),Object(s.createElement)(eu,{blockTypes:D,blockPatterns:T?R:[],onSelectBlockPattern:P,onSelectBlockType:S,onHover:k}),A&&Object(s.createElement)(h.Button,{className:"block-editor-inserter__quick-inserter-expand",onClick:function(){L(M),setTimeout((function(){A(!0)}))},"aria-label":Object(g.__)("Browse all. This will open the main inserter panel in the editor toolbar.")},Object(g.__)("Browse all")))}function nu(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(Yt.a)(e);if(t){var o=Object(Yt.a)(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Object($t.a)(this,n)}}var ru=function(e){var t,n=e.onToggle,r=e.disabled,o=e.isOpen,c=e.blockTitle,i=e.hasSingleBlockType,a=e.toggleProps,u=void 0===a?{}:a;t=i?Object(g.sprintf)(// translators: %s: the name of the block when there is only one
45
+ Object(g._x)("Add %s","directly add the only allowed block"),c):Object(g._x)("Add block","Generic label for block inserter button");var d=u.onClick,b=Object(je.a)(u,["onClick"]);return Object(s.createElement)(h.Button,Object(l.a)({icon:io.a,label:t,tooltipPosition:"bottom",onClick:function(e){n&&n(e),d&&d(e)},className:"block-editor-inserter__toggle","aria-haspopup":!i&&"true","aria-expanded":!i&&o,disabled:r},b))},ou=function(e){Object(qt.a)(n,e);var t=nu(n);function n(){var e;return Object(Gt.a)(this,n),(e=t.apply(this,arguments)).onToggle=e.onToggle.bind(Object(Kt.a)(e)),e.renderToggle=e.renderToggle.bind(Object(Kt.a)(e)),e.renderContent=e.renderContent.bind(Object(Kt.a)(e)),e}return Object(Wt.a)(n,[{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,u=r.renderToggle,s=void 0===u?ru:u;return 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(s.createElement)(tu,{onSelect:t,rootClientId:r,clientId:o,isAppender:c,selectBlockOnInsert:a}):Object(s.createElement)(Ql,{onSelect: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;return n?this.renderToggle({onToggle:r}):Object(s.createElement)(h.Dropdown,{className:"block-editor-inserter",contentClassName:b()("block-editor-inserter__popover",{"is-quick":o}),position:t,onToggle:this.onToggle,expandOnMobile:!0,headerTitle:Object(g.__)("Add a block"),renderToggle:this.renderToggle,renderContent:this.renderContent})}}]),n}(s.Component),cu=Object(p.compose)([Object(v.withSelect)((function(e,t){var n=t.clientId,r=t.rootClientId,o=e("core/block-editor"),c=o.getBlockRootClientId,i=o.hasInserterItems,a=o.__experimentalGetAllowedBlocks,l=e("core/blocks").getBlockVariations,u=a(r=r||c(n)||void 0),s=1===Object(f.size)(u)&&0===Object(f.size)(l(u[0].name,"inserter")),d=!1;return s&&(d=u[0]),{hasItems:i(r),hasSingleBlockType:s,blockTitle:d?d.title:"",allowedBlockType:d,rootClientId:r}})),Object(v.withDispatch)((function(e,t,n){var r=n.select;return{insertOnlyAllowedBlock:function(){var n=t.rootClientId,o=t.clientId,i=t.isAppender,a=t.hasSingleBlockType,l=t.allowedBlockType,u=t.__experimentalSelectBlockOnInsert;if(a&&((0,e("core/block-editor").insertBlock)(Object(c.createBlock)(l.name),function(){var e=r("core/block-editor"),t=e.getBlockIndex,c=e.getBlockSelectionEnd,a=e.getBlockOrder;if(o)return t(o,n);var l=c();return!i&&l?t(l,n)+1:a(n).length}(),n,u),!u)){var s=Object(g.sprintf)(// translators: %s: the name of the block that has been added
46
+ Object(g.__)("%s block added"),l.title);Object(Fe.speak)(s)}}}})),Object(p.ifCondition)((function(e){var t=e.hasItems,n=e.isAppender,r=e.rootClientId,o=e.clientId;return t||!n&&!r&&!o}))])(ou),iu=Object(s.forwardRef)((function(e,t){var n=e.selectedClientId,r=e.isReverse,o=e.containerRef,c=e.noCapture,i=e.hasMultiSelection,a=e.multiSelectionContainer,l=Object(v.useSelect)((function(e){return e("core/block-editor").isNavigationMode()})),u=Object(v.useDispatch)("core/block-editor").setNavigationMode;return Object(s.createElement)("div",{ref:t,tabIndex:l?void 0:"0",onFocus:function(){if(c.current)c.current=null;else if(n){var e=$e(n);if(r){var t=yr.focus.tabbable.find(e);(Object(f.last)(t)||e).focus()}else e.focus()}else{if(i)return void a.current.focus();u(!0);var l=yr.focus.tabbable.find(o.current);l.length&&(r?Object(f.last)(l).focus():Object(f.first)(l).focus())}},style:{position:"fixed"}})}));var au=Object(f.overEvery)([yr.isTextField,yr.focus.tabbable.isTabbableIndex]);function lu(e,t,n,r){var o,c=yr.focus.focusable.find(n);return t&&(c=Object(f.reverse)(c)),c=c.slice(c.indexOf(e)+1),r&&(o=e.getBoundingClientRect()),Object(f.find)(c,(function t(n,c,i){if(!yr.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(yr.isTextField)(n))return!0;if(!n.classList.contains("block-editor-block-list__block"))return!1;if(function(e){return e.classList.contains("block-editor-block-list__layout")||!!e.querySelector(".block-editor-block-list__layout")}(n))return!0;if(n.contains(e))return!1;for(var l,u=1;(l=i[c+u])&&n.contains(l);u++)if(t(l,c+u,i))return!1;return!0}))}function uu(e){var t=e("core/block-editor"),n=t.getSelectedBlockClientId,r=t.getMultiSelectedBlocksStartClientId,o=t.getMultiSelectedBlocksEndClientId,c=t.getPreviousBlockClientId,i=t.getNextBlockClientId,a=t.getFirstMultiSelectedBlockClientId,l=t.getLastMultiSelectedBlockClientId,u=t.hasMultiSelection,s=t.getBlockOrder,d=t.isNavigationMode,b=t.hasBlockMovingClientId,f=t.getBlockIndex,p=t.getBlockRootClientId,m=t.getClientIdsOfDescendants,v=t.canInsertBlockType,O=t.getBlockName,g=t.isSelectionEnabled,h=t.getBlockSelectionStart,j=t.isMultiSelecting,k=t.getSettings,y=n(),_=r(),E=o();return{selectedBlockClientId:y,selectionStartClientId:_,selectionBeforeEndClientId:c(E||y),selectionAfterEndClientId:i(E||y),selectedFirstClientId:a(),selectedLastClientId:l(),hasMultiSelection:u(),blocks:s(),isNavigationMode:d(),hasBlockMovingClientId:b,getBlockIndex:f,getBlockRootClientId:p,getClientIdsOfDescendants:m,canInsertBlockType:v,getBlockName:O,isSelectionEnabled:g(),blockSelectionStart:h(),isMultiSelecting:j(),keepCaretInsideBlock:k().keepCaretInsideBlock}}function su(e){var t=e.children,n=Object(s.useRef)(),r=Object(s.useRef)(),o=Object(s.useRef)(),c=Object(s.useRef)(),i=Object(s.useRef)(),a=Object(s.useRef)(),l=Object(s.useRef)(),u=Object(v.useSelect)(uu,[]),d=u.selectedBlockClientId,p=u.selectionStartClientId,m=u.selectionBeforeEndClientId,O=u.selectionAfterEndClientId,h=u.selectedFirstClientId,j=u.selectedLastClientId,k=u.hasMultiSelection,y=u.blocks,_=u.isNavigationMode,E=u.hasBlockMovingClientId,C=u.isSelectionEnabled,w=u.blockSelectionStart,S=u.isMultiSelecting,I=u.getBlockIndex,B=u.getBlockRootClientId,x=u.getClientIdsOfDescendants,P=u.canInsertBlockType,T=u.getBlockName,N=u.keepCaretInsideBlock,D=Object(v.useDispatch)("core/block-editor"),R=D.multiSelect,A=D.selectBlock,M=D.clearSelectedBlock,L=D.setNavigationMode,F=D.setBlockMovingClientId,V=D.moveBlockToPosition,H=Object(s.useState)(!1),z=Object(oe.a)(H,2),U=z[0],G=z[1];Object(s.useEffect)((function(){k&&!S&&c.current.focus()}),[k,S]);var W=b()("block-editor-writing-flow",{"is-navigate-mode":_,"is-block-moving-mode":!!E(),"can-insert-moving-block":U});return Object(s.createElement)("div",{className:W},Object(s.createElement)(iu,{ref:r,selectedClientId:d,containerRef:n,noCapture:a,hasMultiSelection:k,multiSelectionContainer:c}),Object(s.createElement)("div",{ref:n,onKeyDown:function(e){var t=e.keyCode,u=e.target,s=t===st.UP,b=t===st.DOWN,v=t===st.LEFT,g=t===st.RIGHT,C=t===st.TAB,w=t===st.ESCAPE,S=t===st.ENTER,D=t===st.SPACE,H=s||v,z=v||g,U=s||b,W=z||U,K=e.shiftKey,q=K||e.ctrlKey||e.altKey||e.metaKey,$=U?yr.isVerticalEdge:yr.isHorizontalEdge;if(_){var Y,X=C&&K||s,Q=C&&!K||b,Z=v,J=g;if(X)Y=m;else if(Q)Y=O;else if(Z){var ee;Y=null!==(ee=B(d))&&void 0!==ee?ee:d}else if(J){var te;Y=null!==(te=x([d])[0])&&void 0!==te?te:d}var ne=E();if(ne&&Y&&G(P(T(ne),B(Y))),w&&ne&&(F(null),G(!1)),(S||D)&&ne){var re=B(ne),oe=B(d),ce=I(ne,re),ie=I(d,oe);ce<ie&&re===oe&&(ie-=1),V(ne,re,oe,ie),A(ne),F(null)}if(Q||X||Z||J)if(Y)e.preventDefault(),A(Y);else if(C&&d){var ae,le=$e(d);(ae=Q?yr.focus.tabbable.findNext(le):yr.focus.tabbable.findPrevious(le))&&(e.preventDefault(),ae.focus(),M())}}else{if(d)if(C){var ue=$e(d);if(K){if(u===ue)return a.current=!0,void r.current.focus()}else{var se=yr.focus.tabbable.find(ue);if(u===(Object(f.last)(se)||ue))return a.current=!0,void o.current.focus()}}else w&&L(!0);else if(k&&C&&u===c.current)return a.current=!0,void(K?r.current.focus():o.current.focus());var de=n.current.ownerDocument.defaultView;if(U?l.current||(l.current=Object(yr.computeCaretRect)(de)):l.current=null,!W)return st.isKeyboardEvent.primary(e)&&(i.current=Object(yr.isEntirelySelected)(u)),void(st.isKeyboardEvent.primary(e,"a")&&((u.isContentEditable?i.current:Object(yr.isEntirelySelected)(u))&&(R(Object(f.first)(y),Object(f.last)(y)),e.preventDefault()),i.current=!0));if(!e.nativeEvent.defaultPrevented&&function(e,t,n){if((t===st.UP||t===st.DOWN)&&!n)return!0;var r=e.tagName;return"INPUT"!==r&&"TEXTAREA"!==r}(u,t,q)){var be,fe="rtl"===(be=u).ownerDocument.defaultView.getComputedStyle(be).direction?!H:H;if(K)(H&&m||!H&&O)&&(k||function(e,t){var r,o,c=lu(e,t,n.current);return!(c&&(r=e,o=c,r.closest(".block-editor-block-list__block")===o.closest(".block-editor-block-list__block")))}(u,H)&&$(u,H))&&(!function(e){var t=e?m:O;t&&R(p||d,t)}(H),e.preventDefault());else if(k)!function(e){var t=e?h:j;t&&A(t)}(H),e.preventDefault();else if(U&&Object(yr.isVerticalEdge)(u,H)&&!N){var pe=lu(u,H,n.current,!0);pe&&(Object(yr.placeCaretAtVerticalEdge)(pe,H,l.current),e.preventDefault())}else if(z&&de.getSelection().isCollapsed&&Object(yr.isHorizontalEdge)(u,fe)&&!N){var me=lu(u,fe,n.current);Object(yr.placeCaretAtHorizontalEdge)(me,fe),e.preventDefault()}}}},onMouseDown:function(e){if(l.current=null,_&&d&&Ye($e(d),e.target)?(L(!1),F(null)):_&&E()&&Xe(e.target)&&G(P(T(E()),B(Xe(e.target)))),C&&0===e.button){var t=Xe(e.target);t&&(e.shiftKey?w!==t&&(R(w,t),e.preventDefault()):k&&A(t))}}},Object(s.createElement)("div",{ref:c,tabIndex:k?"0":void 0,"aria-label":k?Object(g.__)("Multiple selected blocks"):void 0,style:{position:"fixed"}}),t),Object(s.createElement)(iu,{ref:o,selectedClientId:d,containerRef:n,noCapture:a,hasMultiSelection:k,multiSelectionContainer:c,isReverse:!0}),Object(s.createElement)("div",{"aria-hidden":!0,tabIndex:-1,onClick:function(){var e=yr.focus.focusable.find(n.current),t=Object(f.findLast)(e,au);t&&Object(yr.placeCaretAtHorizontalEdge)(t,!0)},className:"block-editor-writing-flow__click-redirect"}))}function du(e){var t=e.clientId,n=e.setIsInserterForced,r=e.containerRef,o=Object(s.useRef)(),c=Object(v.useSelect)((function(e){var n=e("core/block-editor"),r=n.getMultiSelectedBlockClientIds,o=n.getSelectedBlockClientId,c=n.hasMultiSelection;if((0,n.getSettings)().hasReducedUI)return!0;var i=r(),a=o();return c()?i.includes(t):t===a}),[t]);return Object(s.createElement)("div",{ref:o,onFocus:function(){return n(!0)},onBlur:function(){return n(!1)},onClick:function(e){var n=e.clientX,c=e.clientY,i=e.target;if(i===o.current){var a=i.getBoundingClientRect(),l=c<a.top+a.height/2,u=$e(t),s=lu(u,!0,l?r.current:u)||u,d=new window.DOMRect(n,c,0,16);Object(yr.placeCaretAtVerticalEdge)(s,l,d,!1)}},tabIndex:-1,className:b()("block-editor-block-list__insertion-point-inserter",{"is-inserter-hidden":c})},Object(s.createElement)(cu,{position:"bottom center",clientId:t,__experimentalIsQuick:!0}))}function bu(e){var t=e.clientId,n=e.rootClientId,r=e.isInserterShown,o=e.isInserterForced,c=e.setIsInserterForced,i=e.containerRef,a=e.showInsertionPoint,l=Object(s.useContext)(Qa),u=Object(s.useMemo)((function(){return t?$e(t):l.get(n||"")}),[t,n,l]);return Object(s.createElement)(h.Popover,{noArrow:!0,animate:!1,anchorRef:u,position:"top right left",focusOnMount:!1,className:"block-editor-block-list__insertion-point-popover",__unstableSlotName:"block-toolbar"},Object(s.createElement)("div",{className:"block-editor-block-list__insertion-point",style:{width:null==u?void 0:u.offsetWidth}},a&&Object(s.createElement)("div",{className:"block-editor-block-list__insertion-point-indicator"}),(r||o)&&Object(s.createElement)(du,{clientId:t,setIsInserterForced:c,containerRef:i})))}function fu(e){var t=e.children,n=e.containerRef,r=Object(s.useState)(!1),o=Object(oe.a)(r,2),c=o[0],i=o[1],a=Object(s.useState)(!1),l=Object(oe.a)(a,2),u=l[0],d=l[1],b=Object(s.useState)(null),f=Object(oe.a)(b,2),p=f[0],m=f[1],O=Object(v.useSelect)((function(e){var t=e("core/block-editor"),n=t.isMultiSelecting,r=t.isBlockInsertionPointVisible,o=t.getBlockInsertionPoint,c=t.getBlockOrder,i=o(),a=c(i.rootClientId);return{isMultiSelecting:n(),isInserterVisible:r(),selectedClientId:a[i.index],selectedRootClientId:i.rootClientId}}),[]),g=O.isMultiSelecting,h=O.isInserterVisible,j=O.selectedClientId,k=O.selectedRootClientId;var y=c||u||h;return Object(s.createElement)(s.Fragment,null,!g&&y&&Object(s.createElement)(bu,{clientId:h?j:p,rootClientId:k,isInserterShown:c,isInserterForced:u,setIsInserterForced:d,containerRef:n,showInsertionPoint:h}),Object(s.createElement)("div",{onMouseMove:u||g?void 0:function(e){if(e.target.classList.contains("block-editor-block-list__layout")){var t=e.target.getBoundingClientRect(),n=e.clientY-t.top,r=Array.from(e.target.children).find((function(e){return e.offsetTop>n}));if(r&&(r.id||(r=r.firstElementChild))){var o=r.id.slice("block-".length);if(o){var a=r.getBoundingClientRect();e.clientX>a.right||e.clientX<a.left?c&&i(!1):(i(!0),m(o))}}}else c&&i(!1)}},t))}var pu=function(e){var t=e.clientId,n=e.rootClientId,r=Object(je.a)(e,["clientId","rootClientId"]),o=Object(v.useSelect)((function(e){var r,o=e("core/block-editor"),c=o.__unstableGetBlockWithoutInnerBlocks,i=o.getBlockIndex,a=o.hasBlockMovingClientId,l=o.getBlockListSettings,u=i(t,n),s=c(t);return{index:u,name:s.name,attributes:s.attributes,blockMovingMode:a(),orientation:null===(r=l(n))||void 0===r?void 0:r.orientation}}),[t,n]),i=o.index,a=o.name,u=o.attributes,d=o.blockMovingMode,f=o.orientation,p=Object(v.useDispatch)("core/block-editor"),m=p.setNavigationMode,O=p.removeBlock,g=Object(s.useRef)();Object(s.useEffect)((function(){g.current.focus(),window.navigator.platform.indexOf("Win")>-1&&Object(Fe.speak)(k)}),[]);var j=Object(c.getBlockType)(a),k=Object(c.__experimentalGetAccessibleBlockLabel)(j,u,i+1,f),y=b()("block-editor-block-list__block-selection-button",{"is-block-moving-mode":!!d});return Object(s.createElement)("div",Object(l.a)({className:y},r),Object(s.createElement)(h.Button,{ref:g,onClick:function(){return m(!1)},onKeyDown:function(e){var n=e.keyCode;n!==st.BACKSPACE&&n!==st.DELETE||(O(t),e.preventDefault())},label:k},Object(s.createElement)(Jn,{clientId:t})))};function mu(e){return Array.from(e.querySelectorAll("[data-toolbar-item]"))}function vu(e,t,n,r,o){var c=Object(s.useState)(t),i=Object(oe.a)(c,1)[0],l=Object(s.useState)(r),u=Object(oe.a)(l,1)[0],d=Object(s.useCallback)((function(){var t,n,r;t=e.current,n=yr.focus.tabbable.find(t),(r=Object(oe.a)(n,1)[0])&&r.focus()}),[]);Object(a.useShortcut)("core/block-editor/focus-toolbar",d,{bindGlobal:!0,eventName:"keydown"}),Object(s.useEffect)((function(){i&&d()}),[n,i,d]),Object(s.useEffect)((function(){var t=0;return u&&!i&&(t=window.requestAnimationFrame((function(){var t,n=mu(e.current),r=u||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)}}}),[u,i])}var Ou=function(e){var t=e.children,n=e.focusOnMount,r=e.__experimentalInitialIndex,o=e.__experimentalOnIndexChange,c=Object(je.a)(e,["children","focusOnMount","__experimentalInitialIndex","__experimentalOnIndexChange"]),i=Object(s.useRef)(),a=function(e){var t=Object(s.useState)(!0),n=Object(oe.a)(t,2),r=n[0],o=n[1],c=Object(s.useCallback)((function(){var t=yr.focus.tabbable.find(e.current),n=!t.some((function(e){return!("toolbarItem"in e.dataset)}));n||no()("Using custom components as toolbar controls",{alternative:"ToolbarItem or ToolbarButton components",link:"https://developer.wordpress.org/block-editor/components/toolbar-button/#inside-blockcontrols"}),o(n)}),[]);return Object(s.useLayoutEffect)((function(){var t=new window.MutationObserver(c);return t.observe(e.current,{childList:!0,subtree:!0}),function(){return t.disconnect()}}),[r]),r}(i);return vu(i,n,a,r,o),a?Object(s.createElement)(h.Toolbar,Object(l.a)({label:c["aria-label"],ref:i},c),t):Object(s.createElement)(h.NavigableMenu,Object(l.a)({orientation:"horizontal",role:"toolbar",ref:i},c),t)},gu=Object(s.createElement)(j.SVG,{width:"18",height:"18",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 18 18"},Object(s.createElement)(j.Path,{d:"M5 4h2V2H5v2zm6-2v2h2V2h-2zm-6 8h2V8H5v2zm6 0h2V8h-2v2zm-6 6h2v-2H5v2zm6 0h2v-2h-2v2z"}));function hu(e){var t=e.clientIds,n=Object(v.useSelect)((function(e){var n;if(1===t.length){var r=(0,e("core/block-editor").getBlockName)(Object(oe.a)(t,1)[0]);return null===(n=Object(c.getBlockType)(r))||void 0===n?void 0:n.icon}}),[t]);return Object(s.createElement)("div",{className:"block-editor-block-draggable-chip-wrapper"},Object(s.createElement)("div",{className:"block-editor-block-draggable-chip"},Object(s.createElement)(h.Flex,{justify:"center",className:"block-editor-block-draggable-chip__content"},Object(s.createElement)(h.FlexItem,null,n?Object(s.createElement)($n,{icon:n}):Object(g.sprintf)(
47
  /* translators: %d: Number of blocks. */
48
+ Object(g._n)("%d block","%d blocks",t.length),t.length)),Object(s.createElement)(h.FlexItem,null,Object(s.createElement)($n,{icon:gu})))))}var ju=function(e){var t,n,r,o,c=e.children,i=e.clientIds,a=e.cloneClassname,l=e.onDragStart,u=e.onDragEnd,d=e.elementId,b=Object(v.useSelect)((function(e){var t=e("core/block-editor"),n=t.getBlockRootClientId,r=t.getTemplateLock,o=n(i[0]);return{srcRootClientId:o,isDraggable:"all"!==(o?r(o):null)}}),[i]),f=b.srcRootClientId,p=b.isDraggable,m=Object(s.useRef)(!1),O=(t=Object(s.useRef)(null),n=Object(s.useRef)(null),r=Object(s.useRef)(null),o=Object(s.useRef)(null),Object(s.useEffect)((function(){return function(){o.current&&(clearInterval(o.current),o.current=null)}}),[]),[Object(s.useCallback)((function(e){t.current=e.clientY,r.current=Object(yr.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(s.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 u=Math.max(c-50,0),s=Math.max(c-i-50,0)/u;n.current=-25*s}else n.current=0}}),[]),function(){t.current=null,r.current=null,o.current&&(clearInterval(o.current),o.current=null)}]),g=Object(oe.a)(O,3),j=g[0],k=g[1],y=g[2],_=Object(v.useDispatch)("core/block-editor"),E=_.startDraggingBlocks,C=_.stopDraggingBlocks;if(Object(s.useEffect)((function(){return function(){m.current&&C()}}),[]),!p)return c({isDraggable:!1});var w={type:"block",srcClientIds:i,srcRootClientId:f};return Object(s.createElement)(h.Draggable,{cloneClassname:a,elementId:d||"block-".concat(i[0]),transferData:w,onDragStart:function(e){E(i),m.current=!0,j(e),l&&l()},onDragOver:k,onDragEnd:function(){C(),m.current=!1,y(),u&&u()},__experimentalDragComponent:Object(s.createElement)(hu,{clientIds:i})},(function(e){var t=e.onDraggableStart,n=e.onDraggableEnd;return c({isDraggable:!0,onDraggableStart:t,onDraggableEnd:n})}))};var ku=Object(v.withSelect)((function(e,t){var n,r=t.clientIds,o=e("core/block-editor"),i=o.getBlock,a=o.getBlockIndex,l=o.getBlockListSettings,u=o.getTemplateLock,s=o.getBlockOrder,d=o.getBlockRootClientId,b=Object(f.castArray)(r),p=Object(f.first)(b),m=i(p),v=d(Object(f.first)(b)),O=a(p,v),g=0===O,h=a(Object(f.last)(b),v)===s(v).length-1;return{blockType:m?Object(c.getBlockType)(m.name):null,isLocked:"all"===u(v),rootClientId:v,firstIndex:O,isFirst:g,isLast:h,orientation:null===(n=l(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,i=e.rootClientId,a=e.orientation,u=e.hideDragHandle,d=Object(s.useState)(!1),f=Object(oe.a)(d,2),p=f[0],m=f[1],v=function(){return m(!0)},O=function(){return m(!1)};if(o||t&&n&&!i)return null;var j=1===r.length?Object(g.__)("Drag block"):Object(g.__)("Drag blocks");return Object(s.createElement)("div",{className:b()("block-editor-block-mover",{"is-visible":p||!c,"is-horizontal":"horizontal"===a})},!u&&Object(s.createElement)(ju,{clientIds:r,cloneClassname:"block-editor-block-mover__drag-clone"},(function(e){var t=e.isDraggable,n=e.onDraggableStart,r=e.onDraggableEnd;return Object(s.createElement)(h.Button,{icon:gu,className:"block-editor-block-mover__drag-handle","aria-hidden":"true",label:j,tabIndex:"-1",onDragStart:n,onDragEnd:r,draggable:t})})),Object(s.createElement)(h.ToolbarGroup,{className:"block-editor-block-mover__move-button-container"},Object(s.createElement)(h.ToolbarItem,{onFocus:v,onBlur:O},(function(e){return Object(s.createElement)(Ar,Object(l.a)({clientIds:r},e))})),Object(s.createElement)(h.ToolbarItem,{onFocus:v,onBlur:O},(function(e){return Object(s.createElement)(Mr,Object(l.a)({clientIds:r},e))}))))}));function yu(){var e=Object(v.useDispatch)("core/block-editor").selectBlock,t=Object(v.useSelect)((function(e){var t=e("core/block-editor"),r=t.getBlockName,o=t.getBlockParents,i=t.getSelectedBlockClientId,a=e("core/blocks").hasBlockSupport,l=o(i()),u=l[l.length-1],s=r(u);return{parentBlockType:Object(c.getBlockType)(s),firstParentClientId:u,shouldHide:!a(n,"__experimentalParentSelector",!0)}}),[]),n=t.parentBlockType,r=t.firstParentClientId;return t.shouldHide?null:void 0!==r?Object(s.createElement)("div",{className:"block-editor-block-parent-selector",key:r},Object(s.createElement)(h.ToolbarButton,{className:"block-editor-block-parent-selector__button",onClick:function(){return e(r)},label:Object(g.sprintf)(
49
  /* translators: %s: Name of the block's parent. */
50
+ Object(g.__)("Select parent (%s)"),n.title),showTooltip:!0,icon:Object(s.createElement)($n,{icon:n.icon})})):null}var _u=Object(s.createElement)(j.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(s.createElement)(j.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 Eu(e,t){var n;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return Cu(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Cu(e,t)}(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 Cu(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 wu(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 Su(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?wu(Object(n),!0).forEach((function(t){Object(u.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):wu(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Iu(e){var t=e.genericPreviewBlock,n=e.style,r=e.isActive,o=e.onBlur,c=e.onHover,i=e.onSelect,a=e.styleClassName,l=e.itemRole,u=Object(s.useMemo)((function(){return Su(Su({},t),{},{attributes:Su(Su({},t.attributes),{},{className:a})})}),[t,a]);return Object(s.createElement)("div",{key:n.name,className:b()("block-editor-block-styles__item",{"is-active":r}),onClick:function(){return i()},onKeyDown:function(e){st.ENTER!==e.keyCode&&st.SPACE!==e.keyCode||(e.preventDefault(),i())},onMouseEnter:c,onMouseLeave:o,role:l||"button",tabIndex:"0","aria-label":n.label||n.name},Object(s.createElement)("div",{className:"block-editor-block-styles__item-preview"},Object(s.createElement)(ml,{viewportWidth:500,blocks:u})),Object(s.createElement)("div",{className:"block-editor-block-styles__item-label"},n.label||n.name))}var Bu=function(e){var t=e.clientId,n=e.onSwitch,r=void 0===n?f.noop:n,o=e.onHoverClassName,i=void 0===o?f.noop:o,a=e.itemRole,l=Object(v.useSelect)((function(e){var n=e("core/block-editor").getBlock,r=e("core/blocks").getBlockStyles,o=n(t);return{block:o,type:Object(c.getBlockType)(o.name),styles:r(o.name),className:o.attributes.className||""}}),[t]),u=l.styles,d=l.block,b=l.type,p=l.className,m=Object(v.useDispatch)("core/block-editor").updateBlockAttributes,O=function(e,t){return Object(s.useMemo)((function(){return t.example?Object(c.getBlockFromExample)(e.name,{attributes:t.example.attributes,innerBlocks:t.example.innerBlocks}):Object(c.cloneBlock)(e)}),[t.example?e.name:e,t])}(d,b);if(!u||0===u.length)return null;var h=Object(f.find)(u,"isDefault")?u:[{name:"default",label:Object(g._x)("Default","block style"),isDefault:!0}].concat(Object(re.a)(u)),j=function(e,t){var n,r=Eu(new Ot.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(f.find)(e,{name:c});if(i)return i}}}catch(e){r.e(e)}finally{r.f()}return Object(f.find)(e,"isDefault")}(h,p);return Object(s.createElement)("div",{className:"block-editor-block-styles"},h.map((function(e){var n=function(e,t,n){var r=new Ot.a(e);return t&&r.remove("is-style-"+t.name),r.add("is-style-"+n.name),r.value}(p,j,e);return Object(s.createElement)(Iu,{genericPreviewBlock:O,className:p,isActive:j===e,key:e.name,onSelect:function(){m(t,{className:n}),i(null),r()},onBlur:function(){return i(null)},onHover:function(){return i(n)},style:e,styleClassName:n,itemRole:a})})))},xu=function(e){var t=e.className,n=e.possibleBlockTransformations,r=e.onSelect;return Object(s.createElement)(h.MenuGroup,{label:Object(g.__)("Transform to"),className:t},n.map((function(e){var t=e.name,n=e.icon,o=e.title;return Object(s.createElement)(h.MenuItem,{key:t,className:Object(c.getBlockMenuDefaultClassName)(t),onClick:function(e){e.preventDefault(),r(t)}},Object(s.createElement)($n,{icon:n,showColors:!0}),o)})))};function Pu(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(Yt.a)(e);if(t){var o=Object(Yt.a)(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Object($t.a)(this,n)}}function Tu(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 Nu(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Tu(Object(n),!0).forEach((function(t){Object(u.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Tu(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Du(e){var t=e.hoveredBlock,n=e.hoveredClassName,r=Object(c.getBlockType)(t.name);return Object(s.createElement)("div",{className:"block-editor-block-switcher__popover__preview__parent"},Object(s.createElement)("div",{className:"block-editor-block-switcher__popover__preview__container"},Object(s.createElement)(h.Popover,{className:"block-editor-block-switcher__preview__popover",position:"bottom right",focusOnMount:!1},Object(s.createElement)("div",{className:"block-editor-block-switcher__preview"},Object(s.createElement)("div",{className:"block-editor-block-switcher__preview-title"},Object(g.__)("Preview")),Object(s.createElement)(ml,{viewportWidth:500,blocks:r.example?Object(c.getBlockFromExample)(t.name,{attributes:Nu(Nu({},r.example.attributes),{},{className:n}),innerBlocks:r.example.innerBlocks}):Object(c.cloneBlock)(t,{className:n})})))))}var Ru=function(e){Object(qt.a)(n,e);var t=Pu(n);function n(){var e;return Object(Gt.a)(this,n),(e=t.apply(this,arguments)).state={hoveredClassName:null},e.onHoverClassName=e.onHoverClassName.bind(Object(Kt.a)(e)),e}return Object(Wt.a)(n,[{key:"onHoverClassName",value:function(e){this.setState({hoveredClassName:e})}},{key:"render",value:function(){var e=this,t=this.props,n=t.blocks,r=t.onTransform,o=t.inserterItems,i=t.hasBlockStyles,a=this.state.hoveredClassName;if(!Array.isArray(n)||!n.length)return null;var l,u=Object(oe.a)(n,1)[0],d=Object(f.mapKeys)(o,(function(e){return e.name})),b=Object(f.orderBy)(Object(f.filter)(Object(c.getPossibleBlockTransformations)(n),(function(e){return e&&!!d[e.name]})),(function(e){return d[e.name].frecency}),"desc");if(1===Object(f.uniq)(Object(f.map)(n,"name")).length){var p=u.name,m=Object(c.getBlockType)(p);l=m.icon}else l=_u;var v=!!b.length;if(!i&&!v)return Object(s.createElement)(h.ToolbarGroup,null,Object(s.createElement)(h.ToolbarButton,{disabled:!0,className:"block-editor-block-switcher__no-switcher-icon",title:Object(g.__)("Block icon"),icon:Object(s.createElement)($n,{icon:l,showColors:!0})}));var O=1===n.length?Object(g.__)("Change block type or style"):Object(g.sprintf)(
51
  /* translators: %s: number of blocks. */
52
+ Object(g._n)("Change type of %d block","Change type of %d blocks",n.length),n.length);return Object(s.createElement)(h.ToolbarGroup,null,Object(s.createElement)(h.ToolbarItem,null,(function(t){return Object(s.createElement)(h.DropdownMenu,{className:"block-editor-block-switcher",label:O,popoverProps:{position:"bottom right",isAlternate:!0,className:"block-editor-block-switcher__popover"},icon:Object(s.createElement)($n,{icon:l,className:"block-editor-block-switcher__toggle",showColors:!0}),toggleProps:t,menuProps:{orientation:"both"}},(function(t){var o=t.onClose;return(i||v)&&Object(s.createElement)("div",{className:"block-editor-block-switcher__container"},v&&Object(s.createElement)(xu,{className:"block-editor-block-switcher__transforms__menugroup",possibleBlockTransformations:b,onSelect:function(e){r(n,e),o()}}),i&&Object(s.createElement)(h.MenuGroup,{label:Object(g.__)("Styles"),className:"block-editor-block-switcher__styles__menugroup"},null!==a&&Object(s.createElement)(Du,{hoveredBlock:u,hoveredClassName:a}),Object(s.createElement)(Bu,{clientId:u.clientId,onSwitch:o,onHoverClassName:e.onHoverClassName,itemRole:"menuitem"})))}))})))}}]),n}(s.Component),Au=Object(p.compose)(Object(v.withSelect)((function(e,t){var n=t.clientIds,r=e("core/block-editor"),o=r.getBlocksByClientId,c=r.getBlockRootClientId,i=r.getInserterItems,a=e("core/blocks").getBlockStyles,l=c(Object(f.castArray)(n)[0]),u=o(n),s=u&&1===u.length?u[0]:null,d=s&&a(s.name);return{blocks:u,inserterItems:i(l),hasBlockStyles:d&&d.length>0}})),Object(v.withDispatch)((function(e,t){return{onTransform:function(n,r){e("core/block-editor").replaceBlocks(t.clientIds,Object(c.switchToBlockType)(n,r))}}})))(Ru),Mu=n(46);function Lu(){var e=Object(v.useSelect)((function(e){return e("core/block-editor")}),[]).getBlockName,t=Object(v.useSelect)((function(e){return e("core/blocks")}),[]).getBlockType,n=Object(v.useDispatch)("core/notices").createSuccessNotice;return Object(s.useCallback)((function(r,o){var c="";if(1===o.length){var i=o[0],a=t(e(i)).title;c="copy"===r?Object(g.sprintf)(// Translators: Name of the block being copied, e.g. "Paragraph".
53
+ Object(g.__)('Copied "%s" to clipboard.'),a):Object(g.sprintf)(// Translators: Name of the block being cut, e.g. "Paragraph".
54
+ Object(g.__)('Moved "%s" to clipboard.'),a)}else c="copy"===r?Object(g.sprintf)(// Translators: %d: Number of blocks being copied.
55
+ Object(g._n)("Copied %d block to clipboard.","Copied %d blocks to clipboard.",o.length),o.length):Object(g.sprintf)(// Translators: %d: Number of blocks being cut.
56
+ Object(g._n)("Moved %d block to clipboard.","Moved %d blocks to clipboard.",o.length),o.length);n(c,{type:"snackbar"})}),[])}var Fu=function(e){var t=e.children,n=Object(s.useRef)(),r=Object(v.useSelect)((function(e){return e("core/block-editor")}),[]),o=r.getBlocksByClientId,i=r.getSelectedBlockClientIds,a=r.hasMultiSelection,l=r.getSettings,u=Object(v.useDispatch)("core/block-editor"),d=u.flashBlock,b=u.removeBlocks,p=u.replaceBlocks,m=Lu(),O=l().__experimentalCanUserUseUnfilteredHTML,g=function(e){var t=i();if(0!==t.length){if(!a()){var r=e.target.ownerDocument;if("copy"===e.type||"cut"===e.type?Object(yr.documentHasUncollapsedSelection)(r):Object(yr.documentHasSelection)(r))return}if(n.current.contains(e.target)){if(e.preventDefault(),"copy"===e.type||"cut"===e.type){1===t.length&&d(t[0]),m(e.type,t);var l=o(t),u=Object(c.serialize)(l);e.clipboardData.setData("text/plain",u),e.clipboardData.setData("text/html",u)}if("cut"===e.type)b(t);else if("paste"===e.type){var s=function(e){var t=e.clipboardData,n=t.items,r=t.files;n=Object(f.isNil)(n)?[]:n,r=Object(f.isNil)(r)?[]:r;var o="",c="";try{o=t.getData("text/plain"),c=t.getData("text/html")}catch(e){try{c=t.getData("Text")}catch(e){return}}return r=Array.from(r),Array.from(n).forEach((function(e){if(e.getAsFile){var t=e.getAsFile();if(t){var n=t.name,o=t.type,c=t.size;Object(f.find)(r,{name:n,type:o,size:c})||r.push(t)}}})),(r=r.filter((function(e){var t=e.type;return/^image\/(?:jpe?g|png|gif)$/.test(t)}))).length&&!c&&(c=r.map((function(e){return'<img src="'.concat(Object(Mu.createBlobURL)(e),'">')})).join(""),o=""),{html:c,plainText:o}}(e),v=s.plainText,g=s.html,h=Object(c.pasteHandler)({HTML:g,plainText:v,mode:"BLOCKS",canUserUseUnfilteredHTML:O});p(t,h,h.length-1,-1)}}}};return Object(s.createElement)("div",{ref:n,onCopy:g,onCut:g,onPaste:g},t)};function Vu(e){var t=e.clientIds,n=e.children,r=e.__experimentalUpdateSelection,o=Object(v.useSelect)((function(e){return e("core/block-editor")}),[]),i=o.canInsertBlockType,a=o.getBlockRootClientId,l=o.getBlocksByClientId,u=o.getTemplateLock,s=Object(v.useSelect)((function(e){return e("core/blocks")}),[]),d=s.getDefaultBlockName,b=s.getGroupingBlockName,p=l(t),m=a(t[0]),O=Object(f.every)(p,(function(e){return!!e&&Object(c.hasBlockSupport)(e.name,"multiple",!0)&&i(e.name,m)})),g=i(d(),m),h=Object(v.useDispatch)("core/block-editor"),j=h.removeBlocks,k=h.replaceBlocks,y=h.duplicateBlocks,_=h.insertAfterBlock,E=h.insertBeforeBlock,C=h.flashBlock,w=h.setBlockMovingClientId,S=h.setNavigationMode,I=h.selectBlock,B=Lu();return n({canDuplicate:O,canInsertDefaultBlock:g,isLocked:!!u(m),rootClientId:m,blocks:p,onDuplicate:function(){return y(t,r)},onRemove:function(){return j(t,r)},onInsertBefore:function(){E(Object(f.first)(Object(f.castArray)(t)))},onInsertAfter:function(){_(Object(f.last)(Object(f.castArray)(t)))},onMoveTo:function(){S(!0),I(t[0]),w(t[0])},onGroup:function(){if(p.length){var e=b(),n=Object(c.switchToBlockType)(p,e);n&&k(t,n)}},onUngroup:function(){if(p.length){var e=p[0].innerBlocks;e.length&&k(t,e)}},onCopy:function(){var e=p.map((function(e){return e.clientId}));1===p.length&&C(e[0]),B("copy",e)}})}var Hu=Object(p.compose)([Object(v.withSelect)((function(e,t){var n=t.clientId,r=e("core/block-editor"),o=r.getBlock,i=r.getBlockMode,a=r.getSettings,l=o(n),u=a().codeEditingEnabled;return{mode:i(n),blockType:l?Object(c.getBlockType)(l.name):null,isCodeEditingEnabled:u}})),Object(v.withDispatch)((function(e,t){var n=t.onToggle,r=void 0===n?f.noop:n,o=t.clientId;return{onToggleMode:function(){e("core/block-editor").toggleBlockMode(o),r()}}}))])((function(e){var t=e.blockType,n=e.mode,r=e.onToggleMode,o=e.small,i=void 0!==o&&o,a=e.isCodeEditingEnabled,l=void 0===a||a;if(!Object(c.hasBlockSupport)(t,"html",!0)||!l)return null;var u="visual"===n?Object(g.__)("Edit as HTML"):Object(g.__)("Edit visually");return Object(s.createElement)(h.MenuItem,{onClick:r},!i&&u)}));var zu=Object(p.compose)(Object(v.withSelect)((function(e,t){var n=t.clientId,r=e("core/block-editor").getBlock(n);return{block:r,shouldRender:r&&"core/html"===r.name}})),Object(v.withDispatch)((function(e,t){var n=t.block;return{onClick:function(){return e("core/block-editor").replaceBlocks(n.clientId,Object(c.rawHandler)({HTML:Object(c.getBlockContent)(n)}))}}})))((function(e){var t=e.shouldRender,n=e.onClick,r=e.small;if(!t)return null;var o=Object(g.__)("Convert to Blocks");return Object(s.createElement)(h.MenuItem,{onClick:n},!r&&o)})),Uu=Object(h.createSlotFill)("__experimentalBlockSettingsMenuFirstItem"),Gu=Uu.Fill,Wu=Uu.Slot;Gu.Slot=Wu;var Ku=Gu;function qu(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 $u(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?qu(Object(n),!0).forEach((function(t){Object(u.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):qu(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Yu=Object(h.createSlotFill)("BlockSettingsMenuControls"),Xu=Yu.Fill,Qu=Yu.Slot;Xu.Slot=function(e){var t=e.fillProps,n=e.clientIds,r=void 0===n?null:n,o=Object(v.useSelect)((function(e){var t=e("core/block-editor"),n=t.getBlocksByClientId,o=t.getSelectedBlockClientIds,c=null!==r?r:o();return Object(f.map)(Object(f.compact)(n(c)),(function(e){return e.name}))}),[r]);return Object(s.createElement)(Qu,{fillProps:$u($u({},t),{},{selectedBlocks:o})},(function(e){return!Object(f.isEmpty)(e)&&Object(s.createElement)(h.MenuGroup,null,e)}))};var Zu=Xu,Ju={className:"block-editor-block-settings-menu__popover",position:"bottom right",isAlternate:!0};var es=function(e){var t=e.clientIds,n=e.__experimentalSelectBlock,r=e.children,o=Object(je.a)(e,["clientIds","__experimentalSelectBlock","children"]),i=Object(f.castArray)(t),a=i.length,u=i[0],d=Object(v.useSelect)((function(e){var t=e("core/keyboard-shortcuts").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(s.useCallback)(n?function(){var e=Object(hr.a)(gr.a.mark((function e(t){var r;return gr.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(t){return e.apply(this,arguments)}}():f.noop,[n]),p=1===a?Object(g.__)("Remove block"):Object(g.__)("Remove blocks");return Object(s.createElement)(Vu,{clientIds:t,__experimentalUpdateSelection:!n},(function(e){var n=e.canDuplicate,i=e.canInsertDefaultBlock,m=e.isLocked,v=e.onDuplicate,O=e.onInsertAfter,j=e.onInsertBefore,k=e.onRemove,y=e.onCopy,_=e.onMoveTo,E=e.blocks;return Object(s.createElement)(h.DropdownMenu,Object(l.a)({icon:jr.a,label:Object(g.__)("More options"),className:"block-editor-block-settings-menu",popoverProps:Ju,noIcons:!0},o),(function(e){var o=e.onClose;return Object(s.createElement)(s.Fragment,null,Object(s.createElement)(h.MenuGroup,null,Object(s.createElement)(Ku.Slot,{fillProps:{onClose:o}}),1===a&&Object(s.createElement)(zu,{clientId:u}),Object(s.createElement)(h.ClipboardButton,{text:function(){return Object(c.serialize)(E)},role:"menuitem",className:"components-menu-item__button",onCopy:y},Object(g.__)("Copy")),n&&Object(s.createElement)(h.MenuItem,{onClick:Object(f.flow)(o,v,b),shortcut:d.duplicate},Object(g.__)("Duplicate")),i&&Object(s.createElement)(s.Fragment,null,Object(s.createElement)(h.MenuItem,{onClick:Object(f.flow)(o,j),shortcut:d.insertBefore},Object(g.__)("Insert Before")),Object(s.createElement)(h.MenuItem,{onClick:Object(f.flow)(o,O),shortcut:d.insertAfter},Object(g.__)("Insert After"))),!m&&Object(s.createElement)(h.MenuItem,{onClick:Object(f.flow)(o,_)},Object(g.__)("Move To")),1===a&&Object(s.createElement)(Hu,{clientId:u,onToggle:o})),Object(s.createElement)(Zu.Slot,{fillProps:{onClose:o},clientIds:t}),"function"==typeof r?r({onClose:o}):s.Children.map((function(e){return Object(s.cloneElement)(e,{onClose:o})})),Object(s.createElement)(h.MenuGroup,null,!m&&Object(s.createElement)(h.MenuItem,{onClick:Object(f.flow)(o,k,b),shortcut:d.remove},p)))}))}))};var ts=function(e){var t=e.clientIds,n=Object(je.a)(e,["clientIds"]);return Object(s.createElement)(h.ToolbarGroup,null,Object(s.createElement)(h.ToolbarItem,null,(function(e){return Object(s.createElement)(es,Object(l.a)({clientIds:t,toggleProps:e},n))})))},ns=window,rs=ns.clearTimeout,os=ns.setTimeout;function cs(e){var t=e.ref,n=e.isFocused,r=e.debounceTimeout,o=void 0===r?200:r,c=e.onChange,i=void 0===c?f.noop:c,a=Object(s.useState)(!1),l=Object(oe.a)(a,2),u=l[0],d=l[1],b=Object(s.useRef)(),p=function(e){(null==t?void 0:t.current)&&d(e),i(e)},m=function(){var e=(null==t?void 0:t.current)&&t.current.matches(":hover");return!n&&!e},v=function(){var e=b.current;e&&rs&&rs(e)};return Object(s.useEffect)((function(){return function(){return v()}}),[]),{showMovers:u,debouncedShowMovers:function(e){e&&e.stopPropagation(),v(),u||p(!0)},debouncedHideMovers:function(e){e&&e.stopPropagation(),v(),b.current=os((function(){m()&&p(!1)}),o)}}}var is=n(263);function as(e){var t=e.hideDragHandle,n=e.__experimentalExpandedControl,r=void 0!==n&&n,o=Object(v.useSelect)((function(e){var t=e("core/block-editor"),n=t.getBlockName,r=t.getBlockMode,o=t.getSelectedBlockClientIds,i=t.isBlockValid,a=t.getBlockRootClientId,l=t.getSettings,u=o(),s=u[0],d=a(s),b=l();return{blockClientIds:u,blockClientId:s,blockType:s&&Object(c.getBlockType)(n(s)),hasFixedToolbar:b.hasFixedToolbar,hasReducedUI:b.hasReducedUI,rootClientId:d,isValid:u.every((function(e){return i(e)})),isVisual:u.every((function(e){return"visual"===r(e)}))}}),[]),i=o.blockClientIds,a=o.blockClientId,u=o.blockType,d=o.hasFixedToolbar,m=o.hasReducedUI,g=o.isValid,j=o.isVisual,k=Object(v.useDispatch)("core/block-editor").toggleBlockHighlight,y=Object(s.useRef)(),_=function(e){var t=e.ref,n=e.debounceTimeout,r=void 0===n?200:n,o=e.onChange,c=void 0===o?f.noop:o,i=Object(s.useState)(!1),a=Object(oe.a)(i,2),l=a[0],u=a[1],d=cs({ref:t,debounceTimeout:r,isFocused:l,onChange:c}),b=d.showMovers,p=d.debouncedShowMovers,m=d.debouncedHideMovers,v=Object(s.useRef)(!1),O=function(){return(null==t?void 0:t.current)&&t.current.contains(t.current.ownerDocument.activeElement)};return Object(s.useEffect)((function(){var e=t.current,n=function(){O()&&(u(!0),p())},r=function(){O()||(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:b,gestures:{onMouseMove:p,onMouseLeave:m}}}({ref:y,onChange:function(e){e&&m||k(a,e)}}),E=_.showMovers,C=_.gestures,w=Object(p.useViewportMatch)("medium","<")||d;if(u&&!Object(c.hasBlockSupport)(u,"__experimentalToolbar",!0))return null;var S=w||E;if(0===i.length)return null;var I=g&&j,B=i.length>1,x=b()("block-editor-block-toolbar",S&&"is-showing-movers"),P=r?is.a:"div";return Object(s.createElement)(P,{className:x},Object(s.createElement)("div",Object(l.a)({ref:y},C),!B&&Object(s.createElement)("div",{className:"block-editor-block-toolbar__block-parent-selector-wrapper"},Object(s.createElement)(yu,{clientIds:i})),(I||B)&&Object(s.createElement)(h.ToolbarGroup,{className:"block-editor-block-toolbar__block-controls"},Object(s.createElement)(Au,{clientIds:i}),Object(s.createElement)(ku,{clientIds:i,hideDragHandle:t||m}))),I&&Object(s.createElement)(s.Fragment,null,Object(s.createElement)(O.a.Slot,{bubblesVirtually:!0,className:"block-editor-block-toolbar__slot"}),Object(s.createElement)(vr.Slot,{bubblesVirtually:!0,className:"block-editor-block-toolbar__slot"})),Object(s.createElement)(ts,{clientIds:i}))}var ls=function(e){var t=e.focusOnMount,n=Object(je.a)(e,["focusOnMount"]),r=Object(v.useSelect)((function(e){var t=e("core/block-editor"),n=t.getBlockName,r=t.getSelectedBlockClientIds,o=e("core/blocks").getBlockType,c=r()[0];return{blockType:c&&o(n(c))}}),[]).blockType;return r&&!Object(c.hasBlockSupport)(r,"__experimentalToolbar",!0)?null:Object(s.createElement)("div",{className:"block-editor-block-contextual-toolbar-wrapper"},Object(s.createElement)(Ou,Object(l.a)({focusOnMount:t,className:"block-editor-block-contextual-toolbar"
57
+ /* translators: accessibility text for the block toolbar */,"aria-label":Object(g.__)("Block tools")},n),Object(s.createElement)(as,null)))};function us(e){var t=e("core/block-editor"),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 ss(e){var t=e.clientId,n=e.rootClientId,r=e.isValid,o=e.isEmptyDefaultBlock,c=e.capturingClientId,i=Object(v.useSelect)(us,[]),l=i.isNavigationMode,u=i.isMultiSelecting,d=i.isTyping,f=i.isCaretWithinFormattedText,m=i.hasMultiSelection,O=i.hasFixedToolbar,g=i.lastClientId,j=Object(p.useViewportMatch)("medium"),k=Object(s.useState)(!1),y=Object(oe.a)(k,2),_=y[0],E=y[1],C=Object(s.useState)(!1),w=Object(oe.a)(C,2),S=w[0],I=w[1],B=Object(s.useContext)(ps),x=!d&&!l&&o&&r,P=l,T=!l&&!O&&j&&!x&&!u&&(!d||f),N=!(l||T||O||o);Object(a.useShortcut)("core/block-editor/focus-toolbar",Object(s.useCallback)((function(){return E(!0)}),[]),{bindGlobal:!0,eventName:"keydown",isDisabled:!N});var D=Object(s.useRef)();if(Object(s.useEffect)((function(){D.current=void 0}),[t]),!(P||T||_||x))return null;var R=B[t];if(c&&(R=document.getElementById("block-"+c)),!R)return null;var A=R;if(m){var M=B[g];if(!M)return null;A={top:R,bottom:M}}var L=x?"top left right":"top right left";return Object(s.createElement)(h.Popover,{noArrow:!0,animate:!1,position:L,focusOnMount:!1,anchorRef:A,className:"block-editor-block-list__block-popover",__unstableSticky:!x,__unstableSlotName:"block-toolbar",__unstableBoundaryParent:!0,__unstableObserveElement:R,onBlur:function(){return E(!1)},shouldAnchorIncludePadding:!0},(T||_)&&Object(s.createElement)("div",{onFocus:function(){I(!0)},onBlur:function(){I(!1)},tabIndex:-1,className:b()("block-editor-block-list__block-popover-inserter",{"is-visible":S})},Object(s.createElement)(cu,{clientId:t,rootClientId:n,__experimentalIsQuick:!0})),(T||_)&&Object(s.createElement)(ls,{focusOnMount:_,__experimentalInitialIndex:D.current,__experimentalOnIndexChange:function(e){D.current=e}}),P&&Object(s.createElement)(pu,{clientId:t,rootClientId:n}),x&&Object(s.createElement)("div",{className:"block-editor-block-list__empty-block-inserter"},Object(s.createElement)(cu,{position:"bottom right",rootClientId:n,clientId:t,__experimentalIsQuick:!0})))}function ds(e){var t=e("core/block-editor"),n=t.getSelectedBlockClientId,r=t.getFirstMultiSelectedBlockClientId,o=t.getBlockRootClientId,i=t.__unstableGetBlockWithoutInnerBlocks,a=t.getBlockParents,l=t.__experimentalGetBlockListSettingsForBlocks,u=n()||r();if(u){var s,d=i(u)||{},b=d.name,p=d.attributes,m=void 0===p?{}:p,v=d.isValid,O=a(u),g=l(O),h=Object(f.findIndex)(g,["__experimentalCaptureToolbars",!0]);return-1!==h&&(s=O[h]),{clientId:u,rootClientId:o(u),name:b,isValid:v,isEmptyDefaultBlock:b&&Object(c.isUnmodifiedDefaultBlock)({name:b,attributes:m}),capturingClientId:s}}}function bs(){var e=Object(v.useSelect)(ds,[]);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(s.createElement)(ss,{clientId:t,rootClientId:n,isValid:o,isEmptyDefaultBlock:c,capturingClientId:i}):null}var fs=Object(s.createContext)(),ps=Object(s.createContext)(),ms=Object(s.createContext)();function vs(e){var t=e("core/block-editor"),n=t.getSelectedBlockClientId,r=t.hasMultiSelection;return{selectedBlockClientId:n(),hasMultiSelection:r()}}function Os(e){Xe(e.target)&&e.preventDefault()}var gs=Object(s.forwardRef)((function(e,t){var n=e.children,r=e.className,o=Object(v.useSelect)(vs,[]),c=o.selectedBlockClientId,i=o.hasMultiSelection,a=Object(v.useDispatch)("core/block-editor").selectBlock,l=function(e){var t=Object(v.useSelect)(oo,[]),n=t.isSelectionEnabled,r=t.isMultiSelecting,o=t.multiSelectedBlockClientIds,c=t.hasMultiSelection,i=t.getBlockParents,a=t.selectedBlockClientId,l=Object(v.useDispatch)("core/block-editor"),u=l.startMultiSelect,d=l.stopMultiSelect,b=l.multiSelect,f=l.selectBlock,p=Object(s.useRef)(),m=Object(s.useRef)(),O=Object(s.useRef)();Object(s.useEffect)((function(){var t=e.current.ownerDocument,n=t.defaultView;if(c&&!r){var i=o.length;if(!(i<2)){var l=o[0],u=o[i-1],s=$e(l),d=$e(u),b=n.getSelection(),f=t.createRange();s=ro(s,"start"),d=ro(d,"end"),f.setStartBefore(s),f.setEndAfter(d),b.removeAllRanges(),b.addRange(f)}}else{if(!a||r)return;var p=n.getSelection();if(p.rangeCount&&!p.isCollapsed){var m=$e(a),v=p.getRangeAt(0),O=v.startContainer,g=v.endContainer;!m||m.contains(O)&&m.contains(g)||p.removeAllRanges()}}}),[c,r,o,f,a]);var g=Object(s.useCallback)((function(t){var n=t.isSelectionEnd,r=e.current.ownerDocument.defaultView.getSelection();if(r.rangeCount&&!r.isCollapsed){var o=Xe(r.focusNode);if(m.current===o){if(f(o),n&&(co(e.current,!0),r.rangeCount)){var c=r.getRangeAt(0).commonAncestorContainer;O.current.contains(c)&&O.current.focus()}}else{var a=[].concat(Object(re.a)(i(m.current)),[m.current]),l=[].concat(Object(re.a)(i(o)),[o]),u=Math.min(a.length,l.length)-1;b(a[u],l[u])}}else co(e.current,!0)}),[f,i,b]),h=Object(s.useCallback)((function(){var t=e.current.ownerDocument,n=t.defaultView;t.removeEventListener("selectionchange",g),n.removeEventListener("mouseup",h),p.current=n.requestAnimationFrame((function(){g({isSelectionEnd:!0}),d()}))}),[g,d]);return Object(s.useEffect)((function(){var t=e.current.ownerDocument,n=t.defaultView;return function(){t.removeEventListener("selectionchange",g),n.removeEventListener("mouseup",h),n.cancelAnimationFrame(p.current)}}),[g,h]),Object(s.useCallback)((function(t){if(n){var r=e.current.ownerDocument,o=r.defaultView;m.current=t,O.current=r.activeElement,u(),r.addEventListener("selectionchange",g),o.addEventListener("mouseup",h),co(e.current,!1)}}),[n,u,h])}(t),u=Object(s.useState)({}),d=Object(oe.a)(u,2),f=d[0],p=d[1];return Object(s.createElement)(fu,{containerRef:t},Object(s.createElement)(ps.Provider,{value:f},Object(s.createElement)(bs,null),Object(s.createElement)("div",{ref:t,className:b()(r,"is-root-container"),onFocus:function(e){if(!i){var t=Xe(e.target);t&&t!==c&&a(t)}},onDragStart:Os},Object(s.createElement)(ms.Provider,{value:p},Object(s.createElement)(fs.Provider,{value:l},n)))))})),hs=["p","div","h1","h2","h3","h4","h5","h6","ol","ul","li","figure","nav","pre","header","section","aside","footer","main"];function js(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 ks(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?js(Object(n),!0).forEach((function(t){Object(u.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):js(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function ys(){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(s.useRef)(),o=e.ref||r,c=Object(s.useContext)(fs),i=Object(s.useContext)(ms),a=Object(s.useContext)(Ss),l=a.clientId,d=a.rootClientId,p=a.isSelected,m=a.isFirstMultiSelected,O=a.isLastMultiSelected,h=a.isPartOfMultiSelection,j=a.enableAnimation,k=a.index,y=a.className,_=a.name,E=a.mode,C=a.blockTitle,w=a.wrapperProps,S=void 0===w?{}:w,I=Object(v.useSelect)((function(e){var t=e("core/block-editor"),n=t.getSelectedBlocksInitialCaretPosition,r=t.isMultiSelecting,o=t.isNavigationMode;return{shouldFocusFirstElement:p&&!r()&&!o(),initialPosition:p?n():void 0,isNavigationMode:o}}),[p]),B=I.initialPosition,x=I.shouldFocusFirstElement,P=I.isNavigationMode,T=Object(v.useDispatch)("core/block-editor"),N=T.insertDefaultBlock,D=T.removeBlock,R=Object(s.useState)(!1),A=Object(oe.a)(R,2),M=A[0],L=A[1];Object(s.useEffect)((function(){if(p||m||O){var e=o.current;return i((function(t){return ks(ks({},t),{},Object(u.a)({},l,e))})),function(){i((function(e){return Object(f.omit)(e,l)}))}}}),[p,m,O]),Object(s.useEffect)((function(){var e=o.current;i((function(t){return t[l]&&t[l]!==e?ks(ks({},t),{},Object(u.a)({},l,e)):t}))}));// translators: %s: Type of block (i.e. Text, Image etc)
58
+ var F=Object(g.sprintf)(Object(g.__)("Block: %s"),C),V=function(){var e=o.current.ownerDocument;if(!e.activeElement||!Ye(o.current,e.activeElement)){var t=yr.focus.tabbable.find(o.current).filter((function(e){return Object(yr.isTextField)(e)&&Ye(o.current,e)&&!e.closest(".block-list-appender")})),n=-1===B,r=(n?f.last:f.first)(t)||o.current;Object(yr.placeCaretAtHorizontalEdge)(r,n)}};Object(s.useEffect)((function(){x&&V()}),[x]),Cr(o,p||h,p||m,j,k),Object(s.useEffect)((function(){if(p)return o.current.addEventListener("keydown",e),o.current.addEventListener("mouseleave",t),function(){o.current.removeEventListener("mouseleave",t),o.current.removeEventListener("keydown",e)};function e(e){var t=e.keyCode,n=e.target;t!==st.ENTER&&t!==st.BACKSPACE&&t!==st.DELETE||n!==o.current||Object(yr.isTextField)(n)||(e.preventDefault(),t===st.ENTER?N({},d,k+1):D(l))}function t(e){1===e.buttons&&c(l)}}),[p,c,N,D]),Object(s.useEffect)((function(){if(P)return o.current.addEventListener("mouseover",e),o.current.addEventListener("mouseout",t),function(){o.current.removeEventListener("mouseover",e),o.current.removeEventListener("mouseout",t)};function e(e){e.defaultPrevented||(e.preventDefault(),M||L(!0))}function t(e){e.defaultPrevented||(e.preventDefault(),M&&L(!1))}}),[P,M,L]);var H="html"!==E||n?"":"-visual";return ks(ks(ks({},S),e),{},{ref:o,id:"block-".concat(l).concat(H),tabIndex:0,role:"group","aria-label":F,"data-block":l,"data-type":_,"data-title":C,className:b()(y,e.className,S.className,{"is-hovered":M}),style:ks(ks({},S.style),e.style)})}ys.save=c.__unstableGetBlockProps;var _s=Object(s.forwardRef)((function(e,t){var n=e.children,r=e.tagName,o=void 0===r?"div":r,c=Object(je.a)(e,["children","tagName"]);no()("wp.blockEditor.__experimentalBlock",{alternative:"wp.blockEditor.useBlockProps"});var i=ys(ks(ks({},c),{},{ref:t}));return Object(s.createElement)(o,i,n)})),Es=hs.reduce((function(e,t){return e[t]=Object(s.forwardRef)((function(e,n){return Object(s.createElement)(_s,Object(l.a)({},e,{ref:n,tagName:t}))})),e}),_s);function Cs(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 ws(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Cs(Object(n),!0).forEach((function(t){Object(u.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Cs(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Ss=Object(s.createContext)();function Is(e){var t=e.children,n=e.isHtml,r=Object(je.a)(e,["children","isHtml"]);return Object(s.createElement)("div",ys(r,{__unstableIsHtml:n}),t)}var Bs=Object(v.withSelect)((function(e,t){var n=t.clientId,r=t.rootClientId,o=e("core/block-editor"),c=o.isBlockSelected,i=o.isAncestorMultiSelected,a=o.isBlockMultiSelected,l=o.isFirstMultiSelectedBlock,u=o.getLastMultiSelectedBlockClientId,s=o.isTyping,d=o.getBlockMode,b=o.isSelectionEnabled,f=o.hasSelectedInnerBlock,p=o.getTemplateLock,m=o.__unstableGetBlockWithoutInnerBlocks,v=o.getMultiSelectedBlockClientIds,O=m(n),g=c(n),h=p(r),j=f(n,!0),k=O||{},y=k.name,_=k.attributes,E=k.isValid,C=l(n);return{isMultiSelected:a(n),isPartOfMultiSelection:a(n)||i(n),isFirstMultiSelected:C,isLastMultiSelected:u()===n,multiSelectedClientIds:C?v():void 0,isTypingWithinBlock:(g||j)&&s(),mode:d(n),isSelectionEnabled:b(),isLocked:!!h,block:O,name:y,attributes:_,isValid:E,isSelected:g,isAncestorOfSelectedBlock:j}})),xs=Object(v.withDispatch)((function(e,t,n){var r=n.select,o=e("core/block-editor"),i=o.updateBlockAttributes,a=o.insertBlocks,l=o.mergeBlocks,u=o.replaceBlocks,s=o.toggleSelection,d=o.__unstableMarkLastChangeAsPersistent;return{setAttributes:function(e){var n=t.clientId,r=t.isFirstMultiSelected,o=t.multiSelectedClientIds;i(r?o:[n],e)},onInsertBlocks:function(e,n){var r=t.rootClientId;a(e,n,r)},onInsertBlocksAfter:function(e){var n=t.clientId,o=t.rootClientId,c=(0,r("core/block-editor").getBlockIndex)(n,o);a(e,c+1,o)},onMerge:function(e){var n=t.clientId,o=r("core/block-editor"),c=o.getPreviousBlockClientId,i=o.getNextBlockClientId;if(e){var a=i(n);a&&l(n,a)}else{var u=c(n);u&&l(u,n)}},onReplace:function(e,n,r){e.length&&!Object(c.isUnmodifiedDefaultBlock)(e[e.length-1])&&d(),u([t.clientId],e,n,r)},toggleSelection:function(e){s(e)}}})),Ps=Object(p.compose)(p.pure,Bs,xs,Object(p.ifCondition)((function(e){return!!e.block})),Object(h.withFilters)("editor.BlockListBlock"))((function(e){var t,n,r,o=e.mode,i=e.isLocked,a=e.clientId,u=e.rootClientId,d=e.isSelected,m=e.isMultiSelected,O=e.isPartOfMultiSelection,g=e.isFirstMultiSelected,h=e.isLastMultiSelected,j=e.isTypingWithinBlock,k=e.isAncestorOfSelectedBlock,y=e.isSelectionEnabled,_=e.className,E=e.name,C=e.isValid,w=e.attributes,S=e.wrapperProps,I=e.setAttributes,B=e.onReplace,x=e.onInsertBlocksAfter,P=e.onMerge,T=e.toggleSelection,N=e.index,D=e.enableAnimation,R=e.activeEntityBlockId,A=Object(p.useViewportMatch)("medium"),M=Object(v.useSelect)((function(e){var t=e("core/block-editor"),n=t.isBlockBeingDragged,r=t.isBlockHighlighted,o=t.getSettings;return{isDragging:n(a),isHighlighted:r(a),isFocusMode:o().focusMode}}),[a]),L=M.isDragging,F=M.isHighlighted,V=M.isFocusMode,H=Object(v.useDispatch)("core/block-editor").removeBlock,z=Object(s.useCallback)((function(){return H(a)}),[a]),U=Object(s.useState)(!1),G=Object(oe.a)(U,2),W=G[0],K=G[1],q=Object(c.getBlockType)(E),$=q.apiVersion>1||Object(c.hasBlockSupport)(q,"lightBlockWrapper",!1),Y=E===Object(c.getUnregisteredTypeHandlerName)();q.getEditWrapperProps&&(t=S,n=q.getEditWrapperProps(w),r=ws(ws({},t),n),t&&n&&t.className&&n.className&&(r.className=b()(t.className,n.className)),t&&n&&t.style&&n.style&&(r.style=ws(ws({},t.style),n.style)),S=r);var X=$&&Object(c.hasBlockSupport)(q,"className",!0)?Object(c.getBlockDefaultClassName)(E):null,Q=$?w.className:null,Z=S&&!!S["data-align"],J=b()(X,Q,"block-editor-block-list__block",{"wp-block":!Z,"has-warning":!C||!!W||Y,"is-selected":d&&!L,"is-highlighted":F,"is-multi-selected":m,"is-reusable":Object(c.isReusableBlock)(q),"is-dragging":L,"is-typing":j,"is-focused":V&&A&&(d||k),"is-focus-mode":V&&A,"has-child-selected":k&&!L,"is-active-entity":R===a},_),ee=Object(s.createElement)(dr,{name:E,isSelected:d,attributes:w,setAttributes:I,insertBlocksAfter:i?void 0:x,onReplace:i?void 0:B,onRemove:i?void 0:z,mergeBlocks:i?void 0:P,clientId:a,isSelectionEnabled:y,toggleSelection:T});if(Z){var te={"data-align":S["data-align"]};ee=Object(s.createElement)("div",Object(l.a)({className:"wp-block"},te),ee)}var ne,re={clientId:a,rootClientId:u,isSelected:d,isFirstMultiSelected:g,isLastMultiSelected:h,isPartOfMultiSelection:O,enableAnimation:D,index:N,className:J,isLocked:i,name:E,mode:o,blockTitle:q.title,wrapperProps:Object(f.omit)(S,["data-align"])},ce=Object(s.useMemo)((function(){return re}),Object.values(re));return ne=C?"html"===o?Object(s.createElement)(s.Fragment,null,Object(s.createElement)("div",{style:{display:"none"}},ee),Object(s.createElement)(Is,{isHtml:!0},Object(s.createElement)(eo,{clientId:a}))):$?ee:Object(s.createElement)(Is,S,ee):Object(s.createElement)(Is,null,Object(s.createElement)(qr,{clientId:a}),Object(s.createElement)("div",null,Object(c.getSaveElement)(q,w))),Object(s.createElement)(Ss.Provider,{value:ce},Object(s.createElement)(Qr,{onError:function(){return K(!0)}},ne),!!W&&Object(s.createElement)(Is,null,Object(s.createElement)(Yr,null)))})),Ts=function(e,t,n){return Object(g.sprintf)(
59
  /* translators: 1: The numerical position of the block. 2: The total number of blocks. 3. The level of nesting for the block. */
60
+ Object(g.__)("Block %1$d of %2$d, Level %3$d"),e,t,n)};var Ns=Object(s.forwardRef)((function e(t,n){var r=t.className,o=t.block,i=t.isSelected,a=t.onClick,l=t.position,u=t.siblingBlockCount,d=t.level,f=t.tabIndex,m=t.onFocus,v=t.onDragStart,O=t.onDragEnd,j=t.draggable,k=o.name,y=o.attributes,_=Object(c.getBlockType)(k),E=Object(c.__experimentalGetBlockLabel)(_,y),C=Object(p.useInstanceId)(e),w="block-navigation-block-select-button__".concat(C),S=Ts(l,u,d);return Object(s.createElement)(s.Fragment,null,Object(s.createElement)(h.Button,{className:b()("block-editor-block-navigation-block-select-button",r),onClick:a,"aria-describedby":w,ref:n,tabIndex:f,onFocus:m,onDragStart:v,onDragEnd:O,draggable:j},Object(s.createElement)($n,{icon:_.icon,showColors:!0}),E,i&&Object(s.createElement)(h.VisuallyHidden,null,Object(g.__)("(selected block)"))),Object(s.createElement)("div",{className:"block-editor-block-navigation-block-select-button__description",id:w},S))}));function Ds(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 Rs(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Ds(Object(n),!0).forEach((function(t){Object(u.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ds(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var As=function(e){return"BlockNavigationBlock-".concat(e)};var Ms=Object(s.forwardRef)((function e(t,n){var r=Object(p.useInstanceId)(e),o=t.block.clientId;return Object(s.createElement)(h.Slot,{name:As(o)},(function(e){if(!e.length)return Object(s.createElement)(Ns,Object(l.a)({ref:n},t));var o=t.className,i=t.block,a=t.isSelected,u=t.position,d=t.siblingBlockCount,f=t.level,p=t.tabIndex,m=t.onFocus,v=i.name,O=Object(c.getBlockType)(v),j="block-navigation-block-slot__".concat(r),k=Ts(u,d,f),y={tabIndex:p,onFocus:m,ref:n,"aria-describedby":j};return Object(s.createElement)(s.Fragment,null,Object(s.createElement)("div",{className:b()("block-editor-block-navigation-block-slot",o)},Object(s.createElement)($n,{icon:O.icon,showColors:!0}),s.Children.map(e,(function(e){return Object(s.cloneElement)(e,Rs(Rs({},e.props),y))})),a&&Object(s.createElement)(h.VisuallyHidden,null,Object(g.__)("(selected block)")),Object(s.createElement)("div",{className:"block-editor-block-navigation-block-slot__description",id:j},k)))}))})),Ls=function(e){var t=Object(s.useContext)(Ss).clientId;return Object(s.createElement)(h.Fill,Object(l.a)({},e,{name:As(t)}))},Fs=Object(s.forwardRef)((function(e,t){var n=e.onClick,r=e.block,o=e.isSelected,c=e.position,i=e.siblingBlockCount,a=e.level,u=Object(je.a)(e,["onClick","block","isSelected","position","siblingBlockCount","level"]),d=Vr(),f=d.__experimentalFeatures,p=d.blockDropTarget,m=void 0===p?{}:p,O=r.clientId,g=Object(v.useSelect)((function(e){var t=e("core/block-editor"),n=t.getBlockRootClientId,r=t.hasBlockMovingClientId,o=t.getSelectedBlockClientId;return{rootClientId:n(O)||"",blockMovingClientId:r(),selectedBlockInBlockEditor:o()}}),[O]),h=g.rootClientId,j=g.blockMovingClientId,k=g.selectedBlockInBlockEditor,y=j&&k===O,_=m.rootClientId,E=m.clientId,C=m.dropPosition,w=_===h&&E===O&&"top"===C,S=_===h&&E===O&&"bottom"===C,I=_===O&&"inside"===C,B=b()("block-editor-block-navigation-block-contents",{"is-dropping-before":w||y,"is-dropping-after":S,"is-dropping-to-inner-blocks":I});return Object(s.createElement)(ju,{clientIds:[r.clientId],elementId:"block-navigation-block-".concat(r.clientId)},(function(e){var d=e.isDraggable,b=e.onDraggableStart,p=e.onDraggableEnd;return f?Object(s.createElement)(Ms,Object(l.a)({ref:t,className:B,block:r,onClick:n,isSelected:o,position:c,siblingBlockCount:i,level:a,draggable:d&&f,onDragStart:b,onDragEnd:p},u)):Object(s.createElement)(Ns,Object(l.a)({ref:t,className:B,block:r,onClick:n,isSelected:o,position:c,siblingBlockCount:i,level:a,draggable:d&&f,onDragStart:b,onDragEnd:p},u))}))}));function Vs(e){var t=e.block,n=e.isSelected,r=e.onClick,o=e.position,c=e.level,i=e.rowCount,a=e.siblingBlockCount,l=e.showBlockMovers,u=e.terminatedLevels,d=e.path,f=Object(s.useRef)(null),p=Object(s.useState)(!1),m=Object(oe.a)(p,2),O=m[0],j=m[1],k=Object(s.useState)(!1),y=Object(oe.a)(k,2),_=y[0],E=y[1],C=t.clientId,w=Object(v.useSelect)((function(e){var t=e("core/block-editor"),n=t.isBlockBeingDragged,r=t.isAncestorBeingDragged;return n(C)||r(C)}),[C]),S=Object(v.useDispatch)("core/block-editor").selectBlock,I=l&&a>0,B=O||_,x=b()("block-editor-block-navigation-block__mover-cell",{"is-visible":B}),P=Vr().__experimentalFeatures,T=b()("block-editor-block-navigation-block__menu-cell",{"is-visible":B});return Object(s.useEffect)((function(){P&&n&&f.current.focus()}),[P,n]),Object(s.createElement)(Sr,{className:b()({"is-selected":n,"is-dragging":w}),onMouseEnter:function(){return j(!0)},onMouseLeave:function(){return j(!1)},onFocus:function(){return E(!0)},onBlur:function(){return E(!1)},level:c,position:o,rowCount:i,path:d,id:"block-navigation-block-".concat(C),"data-block":C},Object(s.createElement)(h.__experimentalTreeGridCell,{className:"block-editor-block-navigation-block__contents-cell",colSpan:I?void 0:2,ref:f},(function(e){var l=e.ref,d=e.tabIndex,b=e.onFocus;return Object(s.createElement)("div",{className:"block-editor-block-navigation-block__contents-container"},Object(s.createElement)(Lr,{level:c,isLastRow:o===i,terminatedLevels:u}),Object(s.createElement)(Fs,{block:t,onClick:function(){return r(t.clientId)},isSelected:n,position:o,siblingBlockCount:a,level:c,ref:l,tabIndex:d,onFocus:b}))})),I&&Object(s.createElement)(s.Fragment,null,Object(s.createElement)(h.__experimentalTreeGridCell,{className:x,withoutGridItem:!0},Object(s.createElement)(h.__experimentalTreeGridItem,null,(function(e){var t=e.ref,n=e.tabIndex,r=e.onFocus;return Object(s.createElement)(Ar,{orientation:"vertical",clientIds:[C],ref:t,tabIndex:n,onFocus:r})})),Object(s.createElement)(h.__experimentalTreeGridItem,null,(function(e){var t=e.ref,n=e.tabIndex,r=e.onFocus;return Object(s.createElement)(Mr,{orientation:"vertical",clientIds:[C],ref:t,tabIndex:n,onFocus:r})})))),P&&Object(s.createElement)(h.__experimentalTreeGridCell,{className:T},(function(e){var t=e.ref,n=e.tabIndex,o=e.onFocus;return Object(s.createElement)(es,{clientIds:[C],icon:jr.a,toggleProps:{ref:t,tabIndex:n,onFocus:o},disableOpenOnArrowDown:!0,__experimentalSelectBlock:r},(function(e){var t=e.onClose;return Object(s.createElement)(h.MenuGroup,null,Object(s.createElement)(h.MenuItem,{onClick:Object(hr.a)(gr.a.mark((function e(){return gr.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,S(null);case 2:return e.next=4,S(C);case 4:t();case 5:case"end":return e.stop()}}),e)})))},Object(g.__)("Go to block")))}))})))}function Hs(e){var t=e.parentBlockClientId,n=e.position,r=e.level,o=e.rowCount,c=e.terminatedLevels,i=e.path,a=Object(v.useSelect)((function(e){var n=e("core/block-editor"),r=n.isBlockBeingDragged,o=n.isAncestorBeingDragged;return r(t)||o(t)}),[t]),l=Object(p.useInstanceId)(Hs),u="block-navigation-appender-row__description_".concat(l),d=Object(g.sprintf)(
61
  /* translators: 1: The numerical position of the block that will be inserted. 2: The level of nesting for the block that will be inserted. */
62
+ Object(g.__)("Add block at position %1$d, Level %2$d"),n,r);return Object(s.createElement)(Sr,{className:b()({"is-dragging":a}),level:r,position:n,rowCount:o,path:i},Object(s.createElement)(h.__experimentalTreeGridCell,{className:"block-editor-block-navigation-appender__cell",colSpan:"3"},(function(e){var i=e.ref,a=e.tabIndex,l=e.onFocus;return Object(s.createElement)("div",{className:"block-editor-block-navigation-appender__container"},Object(s.createElement)(Lr,{level:r,isLastRow:n===o,terminatedLevels:c}),Object(s.createElement)(cu,{rootClientId:t,__experimentalIsQuick:!0,__experimentalSelectBlockOnInsert:!1,"aria-describedby":u,toggleProps:{ref:i,tabIndex:a,onFocus:l}}),Object(s.createElement)("div",{className:"block-editor-block-navigation-appender__description",id:u},d))})))}function zs(e){var t=e.blocks,n=e.selectBlock,r=e.selectedBlockClientId,o=e.showAppender,c=e.showBlockMovers,i=e.showNestedBlocks,a=e.parentBlockClientId,l=e.level,u=void 0===l?1:l,d=e.terminatedLevels,b=void 0===d?[]:d,p=e.path,m=void 0===p?[]:p,v=!a,O=Object(f.compact)(t),g=function(e){return o&&!v&&r===e},h=g(a),j=O.length,k=h?j+1:j,y=k;return Object(s.createElement)(s.Fragment,null,Object(f.map)(O,(function(e,t){var a=e.clientId,l=e.innerBlocks,d=t+1,f=k===d?[].concat(Object(re.a)(b),[u]):b,p=[].concat(Object(re.a)(m),[d]),v=i&&!!l&&!!l.length,O=g(a);return Object(s.createElement)(s.Fragment,{key:a},Object(s.createElement)(Vs,{block:e,onClick:n,isSelected:r===a,level:u,position:d,rowCount:k,siblingBlockCount:j,showBlockMovers:c,terminatedLevels:b,path:p}),(v||O)&&Object(s.createElement)(zs,{blocks:l,selectedBlockClientId:r,selectBlock:n,showAppender:o,showBlockMovers:c,showNestedBlocks:i,parentBlockClientId:a,level:u+1,terminatedLevels:f,path:p}))})),h&&Object(s.createElement)(Hs,{parentBlockClientId:a,position:k,rowCount:y,level:u,terminatedLevels:b,path:[].concat(Object(re.a)(m),[y])}))}function Us(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 Gs(e,t){var n;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return Ws(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Ws(e,t)}(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 Ws(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 Ks(e,t){return t.left<=e.x&&t.right>=e.x&&t.top<=e.y&&t.bottom>=e.y}zs.defaultProps={selectBlock:function(){}};var qs=["top","bottom"];function $s(e){var t=Object(s.useState)(),n=Object(oe.a)(t,2),r=n[0],o=void 0===r?{}:r,c=n[1],i=rl(o.rootClientId,o.blockIndex),a=Object(h.__unstableUseDropZone)(function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Us(Object(n),!0).forEach((function(t){Object(u.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Us(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({element:e,withPosition:!0},i)),l=a.position,d=a.type,b=function(e,t,n){var r=Object(v.useSelect)((function(e){var t=e("core/block-editor");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,l=r.canInsertBlocks,u=Object(s.useRef)(),d=!!t;return Object(s.useEffect)((function(){if(e.current&&d){var t="default"===n,r=t?a():void 0,s=Array.from(e.current.querySelectorAll("[data-block]"));u.current=s.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||l(r,a),canInsertDraggedBlocksAsChild:!t||l(r,n)}}))}}),[e,d,n,l,i,c,o,a]),u}(e,l,d);if(Object(s.useEffect)((function(){if(l){var e=function(e,t){var n,r,o,c,i,a=Gs(e);try{for(a.s();!(i=a.n()).done;){var l=i.value;if(!l.isDraggedBlock){var u=l.element.getBoundingClientRect(),s=cl(t,u,qs),d=Object(oe.a)(s,2),b=d[0],f=d[1],p=Ks(t,u);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=u),p)break}}}}catch(e){a.e(e)}finally{a.f()}if(r){var O="bottom"===n;if(O&&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 g=O?1:0;return{rootClientId:r.rootClientId,clientId:r.clientId,blockIndex:r.blockIndex+g,dropPosition:n}}}}(b.current,l);e&&c(e)}}),[b,l]),l)return o}function Ys(e){var t=e.__experimentalFeatures,n=Object(je.a)(e,["__experimentalFeatures"]),r=Object(s.useRef)(),o=$s(r);t||(o=void 0);var c=Object(s.useMemo)((function(){return{__experimentalFeatures:t,blockDropTarget:o}}),[t,o]);return Object(s.createElement)(h.__experimentalTreeGrid,{className:"block-editor-block-navigation-tree","aria-label":Object(g.__)("Block navigation structure"),ref:r},Object(s.createElement)(Fr.Provider,{value:c},Object(s.createElement)(zs,n)))}var Xs=Object(p.compose)(Object(v.withSelect)((function(e){var t=e("core/block-editor"),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(v.withDispatch)((function(e,t){var n=t.onSelect,r=void 0===n?f.noop:n;return{selectBlock:function(t){e("core/block-editor").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(s.createElement)("div",{className:"block-editor-block-navigation__container"},Object(s.createElement)("p",{className:"block-editor-block-navigation__label"},Object(g.__)("List view")),i&&Object(s.createElement)(Ys,{blocks:[t],selectedBlockClientId:r,selectBlock:o,__experimentalFeatures:c,showNestedBlocks:!0}),!i&&Object(s.createElement)(Ys,{blocks:n,selectedBlockClientId:r,selectBlock:o,__experimentalFeatures:c}))})),Qs=Object(s.createElement)(h.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:"24",height:"24"},Object(s.createElement)(h.Path,{d:"M13.8 5.2H3v1.5h10.8V5.2zm-3.6 12v1.5H21v-1.5H10.2zm7.2-6H6.6v1.5h10.8v-1.5z"}));function Zs(e){var t=e.isEnabled,n=e.onToggle,r=e.isOpen,o=e.innerRef,c=Object(je.a)(e,["isEnabled","onToggle","isOpen","innerRef"]);Object(a.useShortcut)("core/edit-post/toggle-block-navigation",Object(s.useCallback)(n,[n]),{bindGlobal:!0,isDisabled:!t});var i=Object(v.useSelect)((function(e){return e("core/keyboard-shortcuts").getShortcutRepresentation("core/edit-post/toggle-block-navigation")}),[]);return Object(s.createElement)(h.Button,Object(l.a)({},c,{ref:o,icon:Qs,"aria-expanded":r,"aria-haspopup":"true",onClick:t?n:void 0
63
+ /* translators: button label text should, if possible, be under 16 characters. */,label:Object(g.__)("Outline"),className:"block-editor-block-navigation",shortcut:i,"aria-disabled":!t}))}var Js=Object(s.forwardRef)((function(e,t){var n=e.isDisabled,r=e.__experimentalFeatures,o=Object(je.a)(e,["isDisabled","__experimentalFeatures"]),c=Object(v.useSelect)((function(e){return!!e("core/block-editor").getBlockCount()}),[])&&!n;return Object(s.createElement)(h.Dropdown,{contentClassName:"block-editor-block-navigation__popover",position:"bottom right",renderToggle:function(e){var n=e.isOpen,r=e.onToggle;return Object(s.createElement)(Zs,Object(l.a)({},o,{innerRef:t,isOpen:n,onToggle:r,isEnabled:c}))},renderContent:function(e){var t=e.onClose;return Object(s.createElement)(Xs,{onSelect:t,__experimentalFeatures:r})}})})),ed=n(130),td=[st.rawShortcut.primary("z"),st.rawShortcut.primaryShift("z"),st.rawShortcut.primary("y")],nd=Object(s.createElement)(h.KeyboardShortcuts,{bindGlobal:!0,shortcuts:Object(f.fromPairs)(td.map((function(e){return[e,function(e){return e.preventDefault()}]})))}),rd=function(){return nd};function od(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(Mu.createBlobURL)(e),'">')})).join("")}var cd={position:"bottom right",isAlternate:!0},id=function(){return Object(s.createElement)("div",{className:"block-editor-format-toolbar"},Object(s.createElement)(h.ToolbarGroup,null,["bold","italic","link","text-color"].map((function(e){return Object(s.createElement)(h.Slot,{name:"RichText.ToolbarControls.".concat(e),key:e})})),Object(s.createElement)(h.Slot,{name:"RichText.ToolbarControls"},(function(e){return 0!==e.length&&Object(s.createElement)(h.ToolbarItem,null,(function(t){return Object(s.createElement)(h.DropdownMenu,{icon:Pr.a,label:Object(g.__)("More rich text controls"),toggleProps:t,controls:Object(f.orderBy)(e.map((function(e){return Object(oe.a)(e,1)[0].props})),"title"),popoverProps:cd})}))}))))},ad=function(e){var t=e.inline,n=e.anchorRef;return t?Object(s.createElement)(h.Popover,{noArrow:!0,position:"top center",focusOnMount:!1,anchorRef:n,className:"block-editor-rich-text__inline-format-toolbar"},Object(s.createElement)(id,null)):Object(s.createElement)(vr,null,Object(s.createElement)(id,null))};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 ud(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(u.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}function sd(e){if(!0===e||"p"===e||"li"===e)return!0===e?"p":e}function dd(e){var t=e.allowedFormats,n=e.formattingControls;return e.disableFormats?dd.EMPTY_ARRAY:t||n?t||(no()("wp.blockEditor.RichText formattingControls prop",{alternative:"allowedFormats"}),n.map((function(e){return"core/".concat(e)}))):void 0}dd.EMPTY_ARRAY=[];var bd=Object(s.forwardRef)((function e(t,n){var r=t.children,o=t.tagName,a=t.value,u=t.onChange,d=t.isSelected,f=t.multiline,m=t.inlineToolbar,O=t.wrapperClassName,g=t.autocompleters,h=t.onReplace,j=t.placeholder,k=t.keepPlaceholderOnFocus,y=t.allowedFormats,_=t.formattingControls,E=t.withoutInteractiveFormatting,C=t.onRemove,w=t.onMerge,S=t.onSplit,I=t.__unstableOnSplitAtEnd,B=t.__unstableOnSplitMiddle,x=t.identifier,P=t.preserveWhiteSpace,T=t.__unstableEmbedURLOnPaste,N=t.__unstableDisableFormats,D=t.disableLineBreaks,R=t.unstableOnFocus,A=t.__unstableAllowPrefixTransformations,M=t.__unstableMultilineRootTag,L=t.__unstableMobileNoFocusOnMount,F=t.deleteEnter,V=t.placeholderTextColor,H=t.textAlign,z=t.selectionColor,G=t.tagsToEliminate,W=t.rootTagsToEliminate,K=t.disableEditingMenu,q=t.fontSize,$=t.fontFamily,Y=t.fontWeight,X=t.fontStyle,Q=t.minWidth,Z=t.maxWidth,J=t.onBlur,ee=t.setRef,te=Object(je.a)(t,["children","tagName","value","onChange","isSelected","multiline","inlineToolbar","wrapperClassName","autocompleters","onReplace","placeholder","keepPlaceholderOnFocus","allowedFormats","formattingControls","withoutInteractiveFormatting","onRemove","onMerge","onSplit","__unstableOnSplitAtEnd","__unstableOnSplitMiddle","identifier","preserveWhiteSpace","__unstableEmbedURLOnPaste","__unstableDisableFormats","disableLineBreaks","unstableOnFocus","__unstableAllowPrefixTransformations","__unstableMultilineRootTag","__unstableMobileNoFocusOnMount","deleteEnter","placeholderTextColor","textAlign","selectionColor","tagsToEliminate","rootTagsToEliminate","disableEditingMenu","fontSize","fontFamily","fontWeight","fontStyle","minWidth","maxWidth","onBlur","setRef"]),ne=Object(p.useInstanceId)(e);x=x||ne;var ce=Object(s.useRef)(),ie=n||ce,ae=Object(U.b)(),le=ae.clientId,ue=ae.onCaretVerticalPositionChange,se=ae.isSelected,de=Object(v.useSelect)((function(e){var t,n=e("core/block-editor"),r=n.isCaretWithinFormattedText,o=n.getSelectionStart,i=n.getSelectionEnd,a=n.getSettings,l=n.didAutomaticChange,u=n.__unstableGetBlockWithoutInnerBlocks,b=n.isMultiSelecting,f=n.hasMultiSelection,p=o(),m=i(),v=a().__experimentalUndo;void 0===d?t=p.clientId===le&&p.attributeKey===x:d&&(t=p.clientId===le);var O={};if("native"===s.Platform.OS){var g=le&&u(le);O={shouldBlurOnUnmount:g&&t&&Object(c.isUnmodifiedDefaultBlock)(g)}}return ud({isCaretWithinFormattedText:r(),selectionStart:t?p.offset:void 0,selectionEnd:t?m.offset:void 0,isSelected:t,didAutomaticChange:l(),disabled:b()||f(),undo:v},O)})),be=de.isCaretWithinFormattedText,fe=de.selectionStart,pe=de.selectionEnd,me=de.isSelected,ve=de.didAutomaticChange,Oe=de.disabled,ge=de.undo,he=de.shouldBlurOnUnmount,ke=Object(v.useDispatch)("core/block-editor"),ye=ke.__unstableMarkLastChangeAsPersistent,_e=ke.enterFormattedText,Ee=ke.exitFormattedText,Ce=ke.selectionChange,we=ke.__unstableMarkAutomaticChange,Se=sd(f),Ie=dd({allowedFormats:y,formattingControls:_,disableFormats:N}),Be=!Ie||Ie.length>0,xe=a,Pe=u;Array.isArray(a)&&(xe=c.children.toHTML(a),Pe=function(e){return u(c.children.fromDOM(Object(i.__unstableCreateElement)(document,e).childNodes))});var Te=Object(s.useCallback)((function(e,t){Ce(le,x,e,t)}),[le,x]),Ne=Object(s.useCallback)((function(e){var t=e.value,n=e.isReverse;w&&w(!n),C&&Object(i.isEmpty)(t)&&n&&C(!n)}),[w,C]),De=Object(s.useCallback)((function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];if(h&&S){var n=[],r=Object(i.split)(e),o=Object(oe.a)(r,2),c=o[0],a=o[1],l=t.length>0,u=-1;l&&Object(i.isEmpty)(c)||(n.push(S(Object(i.toHTMLString)({value:c,multilineTag:Se}))),u+=1),l?(n.push.apply(n,Object(re.a)(t)),u+=t.length):B&&n.push(B()),(l||B)&&Object(i.isEmpty)(a)||n.push(S(Object(i.toHTMLString)({value:a,multilineTag:Se})));var s=l?u:1,d=l?-1:null;h(n,s,d)}}),[h,S,Se,B]),Re=Object(s.useCallback)((function(e){var t=e.value,n=e.onChange,r=e.shiftKey,o=h&&S;if(h){var a=Object(c.getBlockTransforms)("from").filter((function(e){return"enter"===e.type})),l=Object(c.findTransform)(a,(function(e){return e.regExp.test(t.text)}));l&&(h([l.transform({content:t.text})]),we())}if(f)r?D||n(Object(i.insert)(t,"\n")):o&&Object(i.__unstableIsEmptyLine)(t)?De(t):n(Object(i.__unstableInsertLineSeparator)(t));else{var u=t.text,s=t.start,d=t.end,b=I&&s===d&&d===u.length;r||!o&&!b?D||n(Object(i.insert)(t,"\n")):!o&&b?I():o&&De(t)}}),[h,S,we,f,De,I]),Ae=Object(s.useCallback)((function(e){var t=e.value,n=e.onChange,r=e.html,a=e.plainText,l=e.files,u=e.activeFormats;if(l&&l.length&&!r){var s=Object(c.pasteHandler)({HTML:od(l),mode:"BLOCKS",tagName:o,preserveWhiteSpace:P});return window.console.log("Received items:\n\n",l),void(h&&Object(i.isEmpty)(t)?h(s):De(t,s))}var d,b=h&&S?"AUTO":"INLINE";"AUTO"===b&&Object(i.isEmpty)(t)&&(d=a,Object(ed.regexp)(".*").test(d))&&(b="BLOCKS"),T&&Object(i.isEmpty)(t)&&Object(Hl.isURL)(a.trim())&&(b="BLOCKS");var p=Object(c.pasteHandler)({HTML:r,plainText:a,mode:b,tagName:o,preserveWhiteSpace:P});if("string"==typeof p){var m=Object(i.create)({html:p});if(u.length)for(var v=m.formats.length;v--;)m.formats[v]=[].concat(Object(re.a)(u),Object(re.a)(m.formats[v]||[]));f&&(m=Object(i.replace)(m,/\n+/g,i.__UNSTABLE_LINE_SEPARATOR)),n(Object(i.insert)(t,m))}else p.length>0&&(h&&Object(i.isEmpty)(t)?h(p,p.length-1,-1):De(t,p))}),[o,h,S,De,T,f,P]),Me=Object(s.useCallback)((function(e,t){if(h){var n=e.start,r=e.text;if(" "===r.slice(n-1,n)){var o=r.slice(0,n).trim(),a=Object(c.getBlockTransforms)("from").filter((function(e){return"prefix"===e.type})),l=Object(c.findTransform)(a,(function(e){var t=e.prefix;return o===t}));if(l){var u=t(Object(i.slice)(e,n,r.length)),s=l.transform(u);h([s]),we()}}}}),[h,we]),Le=Object(s.createElement)(i.__experimentalRichText,{clientId:le,identifier:x,ref:ie,value:xe,onChange:Pe,selectionStart:fe,selectionEnd:pe,onSelectionChange:Te,tagName:o,placeholder:j,allowedFormats:Ie,withoutInteractiveFormatting:E,onEnter:Re,onDelete:Ne,onPaste:Ae,__unstableIsSelected:me,__unstableInputRule:Me,__unstableMultilineTag:Se,__unstableIsCaretWithinFormattedText:be,__unstableOnEnterFormattedText:_e,__unstableOnExitFormattedText:Ee,__unstableOnCreateUndoLevel:ye,__unstableMarkAutomaticChange:we,__unstableDidAutomaticChange:ve,__unstableUndo:ge,__unstableDisableFormats:N,preserveWhiteSpace:P,disabled:Oe,unstableOnFocus:R,__unstableAllowPrefixTransformations:A,__unstableMultilineRootTag:M,onCaretVerticalPositionChange:ue,blockIsSelected:void 0!==d?d:se,shouldBlurOnUnmount:he,__unstableMobileNoFocusOnMount:L,deleteEnter:F,placeholderTextColor:V,textAlign:H,selectionColor:z,tagsToEliminate:G,rootTagsToEliminate:W,disableEditingMenu:K,fontSize:q,fontFamily:$,fontWeight:Y,fontStyle:X,minWidth:Q,maxWidth:Z,onBlur:J,setRef:ee,id:te.id,style:te.style},(function(e){var t=e.isSelected,n=e.value,o=e.onChange,c=e.onFocus,i=e.editableProps,a=e.editableTagName;return Object(s.createElement)(s.Fragment,null,r&&r({value:n,onChange:o,onFocus:c}),t&&Be&&Object(s.createElement)(ad,{inline:m,anchorRef:ie.current}),t&&Object(s.createElement)(rd,null),Object(s.createElement)(Qn,{onReplace:h,completers:g,record:n,onChange:o,isSelected:t},(function(e){var t=e.listBoxId,n=e.activeId,r=e.onKeyDown;return Object(s.createElement)(a,Object(l.a)({},i,te,{style:te.style?ud(ud({},te.style),i.style):i.style,className:b()("block-editor-rich-text__editable",te.className,i.className,{"keep-placeholder-on-focus":k}),"aria-autocomplete":t?"list":void 0,"aria-owns":t,"aria-activedescendant":n,onKeyDown:function(e){r(e),i.onKeyDown(e)}}))})))}));return O?(no()("wp.blockEditor.RichText wrapperClassName prop",{alternative:"className prop or create your own wrapper div"}),Object(s.createElement)("div",{className:b()("block-editor-rich-text",O)},Le)):Le}));bd.Content=function(e){var t=e.value,n=e.tagName,r=e.multiline,o=Object(je.a)(e,["value","tagName","multiline"]);Array.isArray(t)&&(t=c.children.toHTML(t));var i=sd(r);!t&&i&&(t="<".concat(i,"></").concat(i,">"));var a=Object(s.createElement)(s.RawHTML,null,t);return n?Object(s.createElement)(n,Object(f.omit)(o,["format"]),a):a},bd.isEmpty=function(e){return!e||0===e.length},bd.Content.defaultProps={format:"string",value:""};var fd=bd;function pd(e){var t=e.value,n=e.onChange;return Object(s.createElement)(Ls,null,Object(s.createElement)(fd,{value:t,onChange:n,placeholder:Object(g.__)("Navigation item"),keepPlaceholderOnFocus:!0,withoutInteractiveFormatting:!0,allowedFormats:["core/bold","core/italic","core/image","core/strikethrough"]}))}var md=n(298);var vd=function(e){var t=e.icon,n=void 0===t?md.a:t,r=e.label,o=void 0===r?Object(g.__)("Choose variation"):r,c=e.instructions,i=void 0===c?Object(g.__)("Select a variation to start with."):c,a=e.variations,l=e.onSelect,u=e.allowSkip,d=b()("block-editor-block-variation-picker",{"has-many-variations":a.length>4});return Object(s.createElement)(h.Placeholder,{icon:n,label:o,instructions:i,className:d},Object(s.createElement)("ul",{className:"block-editor-block-variation-picker__variations",role:"list","aria-label":Object(g.__)("Block variations")},a.map((function(e){return Object(s.createElement)("li",{key:e.name},Object(s.createElement)(h.Button,{isSecondary:!0,icon:e.icon,iconSize:48,onClick:function(){return l(e)},className:"block-editor-block-variation-picker__variation",label:e.description||e.title}),Object(s.createElement)("span",{className:"block-editor-block-variation-picker__variation-label",role:"presentation"},e.title))}))),u&&Object(s.createElement)("div",{className:"block-editor-block-variation-picker__skip"},Object(s.createElement)(h.Button,{isLink:!0,onClick:function(){return l()}},Object(g.__)("Skip"))))},Od=Object(s.createElement)(h.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(s.createElement)(h.Path,{d:"M15 4H9v11h6V4zM4 18.5V20h16v-1.5H4z"})),gd=Object(s.createElement)(h.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(s.createElement)(h.Path,{d:"M20 11h-5V4H9v7H4v1.5h5V20h6v-7.5h5z"}));function hd(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 jd(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?hd(Object(n),!0).forEach((function(t){Object(u.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):hd(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var kd={top:{icon:Object(s.createElement)(h.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(s.createElement)(h.Path,{d:"M9 20h6V9H9v11zM4 4v1.5h16V4H4z"})),title:Object(g._x)("Vertically Align Top","Block vertical alignment setting")},center:{icon:gd,title:Object(g._x)("Vertically Align Middle","Block vertical alignment setting")},bottom:{icon:Od,title:Object(g._x)("Vertically Align Bottom","Block vertical alignment setting")}},yd=["top","center","bottom"],_d={isAlternate:!0};var Ed=function(e){var t=e.value,n=e.onChange,r=e.controls,o=void 0===r?yd:r,c=e.isCollapsed,i=void 0===c||c,a=kd[t],l=kd.top;return Object(s.createElement)(h.ToolbarGroup,{popoverProps:_d,isCollapsed:i,icon:a?a.icon:l.icon,label:Object(g._x)("Change vertical alignment","Block vertical alignment setting label"),controls:o.map((function(e){return jd(jd({},kd[e]),{},{isActive:t===e,role:i?"menuitemradio":void 0,onClick:(r=e,function(){return n(t===r?void 0:r)})});var r}))})};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 wd(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(u.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 Sd=Object(p.createHigherOrderComponent)((function(e){return function(t){var n=be("color.palette"),r=!be("color.custom"),o=void 0===t.colors?n:t.colors,c=void 0===t.disableCustomColors?r:t.disableCustomColors,i=!Object(f.isEmpty)(o)||!c;return Object(s.createElement)(e,wd(wd({},t),{},{colors:o,disableCustomColors:c,hasColorsToChoose:i}))}}),"withColorContext"),Id=Sd(h.ColorPalette);function Bd(e){var t=e.onChange,n=e.value,r=Object(je.a)(e,["onChange","value"]);return Object(s.createElement)(Be,Object(l.a)({},r,{onColorChange:t,colorValue:n,gradients:[],disableCustomGradients:!0}))}var xd=[];function Pd(e){var t=be("color.gradients")||xd,n=!be("color.customGradient");return Object(s.createElement)(h.__experimentalGradientPicker,Object(l.a)({gradients:void 0!==e.gradients?e.gradient:t,disableCustomGradients:void 0!==e.disableCustomGradients?e.disableCustomGradients:n},e))}var Td=function(e){var t=void 0!==e.gradients&&void 0!==e.disableCustomGradients?h.__experimentalGradientPicker:Pd;return Object(s.createElement)(t,e)};function Nd(e){var t=e.className,n=e.value,r=e.onChange,o=e.label,c=void 0===o?Object(g.__)("Gradient Presets"):o,i=Object(je.a)(e,["className","value","onChange","label"]),a=be("color.gradients"),u=!be("color.customGradient");return Object(f.isEmpty)(a)&&u?null:Object(s.createElement)(h.BaseControl,{className:b()("block-editor-gradient-picker-control",t)},Object(s.createElement)(h.BaseControl.VisualLabel,null,c),Object(s.createElement)(Td,Object(l.a)({value:n,onChange:r,className:"block-editor-gradient-picker-control__gradient-picker-presets",gradients:a,disableCustomGradients:u},i)))}function Dd(e){var t=be("color.gradients");return Object(f.isEmpty)(t)?null:Object(s.createElement)(h.PanelBody,{title:Object(g.__)("Gradient")},Object(s.createElement)(Nd,e))}var Rd=[25,50,75,100];function Ad(e){var t,n,r=e.imageWidth,o=e.imageHeight,c=e.imageSizeOptions,i=void 0===c?[]:c,a=e.isResizable,l=void 0===a||a,u=e.slug,d=e.width,b=e.height,p=e.onChange,m=e.onChangeImage,v=void 0===m?f.noop:m;function O(e,t){return function(){p({width:e,height:t})}}return Object(s.createElement)(s.Fragment,null,!Object(f.isEmpty)(i)&&Object(s.createElement)(h.SelectControl,{label:Object(g.__)("Image size"),value:u,options:i,onChange:v}),l&&Object(s.createElement)("div",{className:"block-editor-image-size-control"},Object(s.createElement)("p",{className:"block-editor-image-size-control__row"},Object(g.__)("Image dimensions")),Object(s.createElement)("div",{className:"block-editor-image-size-control__row"},Object(s.createElement)(h.TextControl,{type:"number",className:"block-editor-image-size-control__width",label:Object(g.__)("Width"),value:null!==(t=null!=d?d:r)&&void 0!==t?t:"",min:1,onChange:function(e){return p({width:parseInt(e,10)})}}),Object(s.createElement)(h.TextControl,{type:"number",className:"block-editor-image-size-control__height",label:Object(g.__)("Height"),value:null!==(n=null!=b?b:o)&&void 0!==n?n:"",min:1,onChange:function(e){return p({height:parseInt(e,10)})}})),Object(s.createElement)("div",{className:"block-editor-image-size-control__row"},Object(s.createElement)(h.ButtonGroup,{"aria-label":Object(g.__)("Image size presets")},Rd.map((function(e){var t=Math.round(r*(e/100)),n=Math.round(o*(e/100)),c=d===t&&b===n;return Object(s.createElement)(h.Button,{key:e,isSmall:!0,isPrimary:c,isPressed:c,onClick:O(t,n)},e,"%")}))),Object(s.createElement)(h.Button,{isSmall:!0,onClick:O()},Object(g.__)("Reset")))))}var Md=Object(p.createHigherOrderComponent)((function(e){return function(t){var n=Object(U.b)().clientId;return Object(s.createElement)(e,Object(l.a)({},t,{clientId:n}))}}),"withClientId"),Ld=Md((function(e){var t=e.clientId,n=e.showSeparator,r=e.isFloating,o=e.onAddBlock;return Object(s.createElement)(Xa,{rootClientId:t,showSeparator:n,isFloating:r,onAddBlock:o})})),Fd=Object(p.compose)([Md,Object(v.withSelect)((function(e,t){var n=t.clientId,r=(0,e("core/block-editor").getBlockOrder)(n);return{lastBlockClientId:Object(f.last)(r)}}))])((function(e){var t=e.clientId,n=e.lastBlockClientId;return Object(s.createElement)(Ya,{rootClientId:t,lastBlockClientId:n})})),Vd=n(78),Hd=n.n(Vd);var zd=new WeakMap;function Ud(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?Ud(Object(n),!0).forEach((function(t){Object(u.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ud(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Wd(e){var t=e.clientId,n=e.allowedBlocks,r=e.template,o=e.templateLock,i=e.wrapperRef,a=e.templateInsertUpdatesSelection,l=e.__experimentalCaptureToolbars,u=e.__experimentalAppenderTagName,d=e.renderAppender,b=e.orientation,p=e.placeholder,m=e.__experimentalLayout,O=void 0===m?w:m;!function(e,t,n,r,o){var c=Object(v.useDispatch)("core/block-editor").updateBlockListSettings,i=Object(v.useSelect)((function(t){var n=t("core/block-editor").getBlockRootClientId(e);return{blockListSettings:t("core/block-editor").getBlockListSettings(e),parentLock:t("core/block-editor").getTemplateLock(n)}}),[e]),a=i.blockListSettings,l=i.parentLock;Object(s.useLayoutEffect)((function(){var i={allowedBlocks:t,templateLock:void 0===n?l:n};void 0!==r&&(i.__experimentalCaptureToolbars=r),void 0!==o&&(i.orientation=o),Hd()(a,i)||c(e,i)}),[e,a,t,n,l,r,o,c])}(t,n,o,l,b),function(e,t,n,r){var o=Object(v.useDispatch)("core/block-editor").replaceInnerBlocks,i=Object(v.useSelect)((function(t){return t("core/block-editor").getBlocks(e)}),[e]),a=Object(s.useRef)(null);Object(s.useLayoutEffect)((function(){if((0===i.length||"all"===n)&&!Object(f.isEqual)(t,a.current)){a.current=t;var l=Object(c.synchronizeBlocksWithTemplate)(i,t);Object(f.isEqual)(l,i)||o(e,l,0===i.length&&r&&0!==l.length)}}),[i,n,e])}(t,r,o,a);var g=Object(v.useSelect)((function(e){var n=e("core/block-editor").getBlock(t),r=Object(c.getBlockType)(n.name);if(r&&r.providesContext)return function(e,t){zd.has(t)||zd.set(t,new WeakMap);var n=zd.get(t);if(!n.has(e)){var r=Object(f.mapValues)(t.providesContext,(function(t){return e[t]}));n.set(e,r)}return n.get(e)}(n.attributes,r)}),[t]);return Object(s.createElement)(I,{value:O},Object(s.createElement)(or,{value:g},Object(s.createElement)(sl,{rootClientId:t,renderAppender:d,__experimentalAppenderTagName:u,wrapperRef:i,placeholder:p})))}function Kd(e){return Ka(e),Object(s.createElement)(Wd,e)}var qd=Object(s.forwardRef)((function(e,t){var n=$d({ref:t},e);return Object(s.createElement)("div",{className:"block-editor-inner-blocks"},Object(s.createElement)("div",n))}));function $d(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=Object(s.useRef)(),r=Object(U.b)(),o=r.clientId,c=Object(p.useViewportMatch)("medium","<"),i=Object(v.useSelect)((function(e){var t=e("core/block-editor"),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]),a=e.ref||n,u=t.value&&t.onChange?Kd:Wd;return Gd(Gd({},e),{},{ref:a,className:b()(e.className,"block-editor-block-list__layout",{"has-overlay":i}),children:Object(s.createElement)(u,Object(l.a)({},t,{clientId:o,wrapperRef:a}))})}qd.DefaultBlockAppender=Fd,qd.ButtonBlockAppender=Ld,qd.Content=Object(c.withBlockContentContext)((function(e){var t=e.BlockContent;return Object(s.createElement)(t,null)}));var Yd=qd,Xd=n(216);function Qd(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 Zd(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Qd(Object(n),!0).forEach((function(t){Object(u.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Qd(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Jd=[{id:"opensInNewTab",title:Object(g.__)("Open in new tab")}],eb=function(e){var t=e.value,n=e.onChange,r=void 0===n?f.noop:n,o=e.settings,c=void 0===o?Jd:o;if(!c||!c.length)return null;var i=function(e){return function(n){r(Zd(Zd({},t),{},Object(u.a)({},e.id,n)))}},a=c.map((function(e){return Object(s.createElement)(h.ToggleControl,{className:"block-editor-link-control__setting",key:e.id,label:e.title,onChange:i(e),checked:!!t&&!!t[e.id]})}));return Object(s.createElement)("fieldset",{className:"block-editor-link-control__settings"},Object(s.createElement)(h.VisuallyHidden,{as:"legend"},Object(g.__)("Currently selected link settings")),a)},tb=n(127),nb=n.n(tb);function rb(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(Yt.a)(e);if(t){var o=Object(Yt.a)(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Object($t.a)(this,n)}}var ob=function(e){return e.stopPropagation()},cb=function(e){Object(qt.a)(n,e);var t=rb(n);function n(e){var r;return Object(Gt.a)(this,n),(r=t.call(this,e)).onChange=r.onChange.bind(Object(Kt.a)(r)),r.onFocus=r.onFocus.bind(Object(Kt.a)(r)),r.onKeyDown=r.onKeyDown.bind(Object(Kt.a)(r)),r.selectLink=r.selectLink.bind(Object(Kt.a)(r)),r.handleOnClick=r.handleOnClick.bind(Object(Kt.a)(r)),r.bindSuggestionNode=r.bindSuggestionNode.bind(Object(Kt.a)(r)),r.autocompleteRef=e.autocompleteRef||Object(s.createRef)(),r.inputRef=Object(s.createRef)(),r.updateSuggestions=Object(f.debounce)(r.updateSuggestions.bind(Object(Kt.a)(r)),200),r.suggestionNodes=[],r.isUpdatingSuggestions=!1,r.state={suggestions:[],showSuggestions:!1,selectedSuggestion:null,suggestionsListboxId:"",suggestionOptionIdPrefix:""},r}return Object(Wt.a)(n,[{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,nb()(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(Hl.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(g.sprintf)(
64
  /* translators: %s: number of results. */
65
+ Object(g._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(g.__)("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 st.UP:e.stopPropagation(),e.preventDefault();var a=r?r-1:o.length-1;this.setState({selectedSuggestion:a});break;case st.DOWN:e.stopPropagation(),e.preventDefault();var l=null===r||r===o.length-1?0:r+1;this.setState({selectedSuggestion:l});break;case st.TAB:null!==this.state.selectedSuggestion&&(this.selectLink(i),this.props.speak(Object(g.__)("Link selected.")));break;case st.ENTER:null!==this.state.selectedSuggestion&&(e.stopPropagation(),this.selectLink(i))}}else switch(e.keyCode){case st.UP:0!==e.target.selectionStart&&(e.stopPropagation(),e.preventDefault(),e.target.setSelectionRange(0,0));break;case st.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(s.createElement)(s.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(g.__)("Paste URL or type to search"):c,a=e.__experimentalRenderControl,l=e.value,u=void 0===l?"":l,d=e.autoFocus,f=void 0===d||d,p=this.state,m=p.loading,v=p.showSuggestions,O=p.selectedSuggestion,j=p.suggestionsListboxId,k=p.suggestionOptionIdPrefix,y={id:"url-input-control-".concat(o),label:t,className:b()("block-editor-url-input",n,{"is-full-width":r})},_={value:u,required:!0,autoFocus:f,className:"block-editor-url-input__input",type:"text",onChange:this.onChange,onFocus:this.onFocus,onInput:ob,placeholder:i,onKeyDown:this.onKeyDown,role:"combobox","aria-label":Object(g.__)("URL"),"aria-expanded":v,"aria-autocomplete":"list","aria-owns":j,"aria-activedescendant":null!==O?"".concat(k,"-").concat(O):void 0,ref:this.inputRef};return a?a(y,_,m):Object(s.createElement)(h.BaseControl,y,Object(s.createElement)("input",_),m&&Object(s.createElement)(h.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,i=t.__experimentalShowInitialSuggestions,a=void 0!==i&&i,u=this.state,d=u.showSuggestions,p=u.suggestions,m=u.selectedSuggestion,v=u.suggestionsListboxId,O=u.suggestionOptionIdPrefix,g=u.loading,j={id:v,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(f.isFunction)(r)&&d&&p.length?r({suggestions:p,selectedSuggestion:m,suggestionsListProps:j,buildSuggestionItemProps:k,isLoading:g,handleSuggestionClick:this.handleOnClick,isInitialSuggestions:a&&!(c&&c.length)}):!Object(f.isFunction)(r)&&d&&p.length?Object(s.createElement)(h.Popover,{position:"bottom",noArrow:!0,focusOnMount:!1},Object(s.createElement)("div",Object(l.a)({},j,{className:b()("block-editor-url-input__suggestions","".concat(n,"__suggestions"))}),p.map((function(t,n){return Object(s.createElement)(h.Button,Object(l.a)({},k(0,n),{key:t.id,className:b()("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)}}}]),n}(s.Component),ib=Object(p.compose)(p.withSafeTimeout,h.withSpokenMessages,p.withInstanceId,Object(v.withSelect)((function(e,t){if(!Object(f.isFunction)(t.__experimentalFetchLinkSuggestions))return{__experimentalFetchLinkSuggestions:(0,e("core/block-editor").getSettings)().__experimentalFetchLinkSuggestions}})))(cb),ab=Object(s.createElement)(j.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"-2 -2 24 24"},Object(s.createElement)(j.Path,{d:"M10 1c-5 0-9 4-9 9s4 9 9 9 9-4 9-9-4-9-9-9zm0 16c-3.9 0-7-3.1-7-7s3.1-7 7-7 7 3.1 7 7-3.1 7-7 7zm1-11H9v3H6v2h3v3h2v-3h3V9h-3V6zM10 1c-5 0-9 4-9 9s4 9 9 9 9-4 9-9-4-9-9-9zm0 16c-3.9 0-7-3.1-7-7s3.1-7 7-7 7 3.1 7 7-3.1 7-7 7zm1-11H9v3H6v2h3v3h2v-3h3V9h-3V6z"})),lb=function(e){var t,n=e.searchTerm,r=e.onClick,o=e.itemProps,c=e.isSelected,i=e.buttonText;return n?(t=i?Object(f.isFunction)(i)?i(n):i:Object(s.createInterpolateElement)(Object(g.sprintf)(
66
  /* translators: %s: search term. */
67
+ Object(g.__)("Create: <mark>%s</mark>"),n),{mark:Object(s.createElement)("mark",null)}),Object(s.createElement)(h.Button,Object(l.a)({},o,{className:b()("block-editor-link-control__search-create block-editor-link-control__search-item",{"is-selected":c}),onClick:r}),Object(s.createElement)(so.a,{className:"block-editor-link-control__search-item-icon",icon:ab}),Object(s.createElement)("span",{className:"block-editor-link-control__search-item-header"},Object(s.createElement)("span",{className:"block-editor-link-control__search-item-title"},t)))):null},ub=Object(s.createElement)(j.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"-2 -2 24 24"},Object(s.createElement)(j.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"})),sb=function(e){var t=e.itemProps,n=e.suggestion,r=e.isSelected,o=void 0!==r&&r,c=e.onClick,i=e.isURL,a=void 0!==i&&i,u=e.searchTerm,d=void 0===u?"":u,f=e.shouldShowType,p=void 0!==f&&f;return Object(s.createElement)(h.Button,Object(l.a)({},t,{onClick:c,className:b()("block-editor-link-control__search-item",{"is-selected":o,"is-url":a,"is-entity":!a})}),a&&Object(s.createElement)(so.a,{className:"block-editor-link-control__search-item-icon",icon:ub}),Object(s.createElement)("span",{className:"block-editor-link-control__search-item-header"},Object(s.createElement)("span",{className:"block-editor-link-control__search-item-title"},Object(s.createElement)(h.TextHighlight,{text:n.title,highlight:d})),Object(s.createElement)("span",{"aria-hidden":!a,className:"block-editor-link-control__search-item-info"},!a&&(Object(Hl.filterURLForDisplay)(Object(Hl.safeDecodeURI)(n.url))||""),a&&Object(g.__)("Press ENTER to add this link"))),p&&n.type&&Object(s.createElement)("span",{className:"block-editor-link-control__search-item-type"},"post_tag"===n.type?"tag":n.type))};function db(e){var t=e.instanceId,n=e.withCreateSuggestion,r=e.currentInputValue,o=e.handleSuggestionClick,c=e.suggestionsListProps,i=e.buildSuggestionItemProps,a=e.suggestions,u=e.selectedSuggestion,d=e.isLoading,f=e.isInitialSuggestions,p=e.createSuggestionButtonText,m=e.suggestionsQuery,v=b()("block-editor-link-control__search-results",{"is-loading":d}),O=["url","mailto","tel","internal"],j=1===a.length&&O.includes(a[0].type.toLowerCase()),k=n&&!j&&!f,y=!(null==m?void 0:m.type),_="block-editor-link-control-search-results-label-".concat(t),E=f?Object(g.__)("Recently updated"):Object(g.sprintf)(
68
  /* translators: %s: search term. */
69
+ Object(g.__)('Search results for "%s"'),r),C=Object(s.createElement)(f?s.Fragment:h.VisuallyHidden,{},Object(s.createElement)("span",{className:"block-editor-link-control__search-results-label",id:_},E));return Object(s.createElement)("div",{className:"block-editor-link-control__search-results-wrapper"},C,Object(s.createElement)("div",Object(l.a)({},c,{className:v,"aria-labelledby":_}),a.map((function(e,t){return k&&"__CREATE__"===e.type?Object(s.createElement)(lb,{searchTerm:r,buttonText:p,onClick:function(){return o(e)},key:e.type,itemProps:i(e,t),isSelected:t===u}):"__CREATE__"===e.type?null:Object(s.createElement)(sb,{key:"".concat(e.id,"-").concat(e.type),itemProps:i(e,t),suggestion:e,index:t,onClick:function(){o(e)},isSelected:t===u,isURL:O.includes(e.type.toLowerCase()),searchTerm:r,shouldShowType:y})}))))}function bb(e){var t=Object(f.startsWith)(e,"#");return Object(Hl.isURL)(e)||e&&e.includes("www.")||t}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(u.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}var mb=function(){return Promise.resolve([])},vb=function(e){var t="URL",n=Object(Hl.getProtocol)(e)||"";return n.includes("mailto")&&(t="mailto"),n.includes("tel")&&(t="tel"),Object(f.startsWith)(e,"#")&&(t="internal"),Promise.resolve([{id:e,title:e,url:"URL"===t?Object(Hl.prependHTTP)(e):e,type:t}])},Ob=function(){var e=Object(hr.a)(gr.a.mark((function e(t,n,r,o,c,i){var a,l,u;return gr.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,u=!t.includes(" "),l=u&&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",bb(t)||!c?l:l.concat({title:t,url:t,type:"__CREATE__"}));case 9:case"end":return e.stop()}}),e)})));return function(t,n,r,o,c,i){return e.apply(this,arguments)}}();function gb(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 hb(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?gb(Object(n),!0).forEach((function(t){Object(u.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):gb(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var jb=Promise.resolve([]),kb=Object(s.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,l=e.placeholder,u=void 0===l?null:l,d=e.withCreateSuggestion,b=void 0!==d&&d,m=e.onCreateSuggestion,O=void 0===m?f.noop:m,h=e.onChange,j=void 0===h?f.noop:h,k=e.onSelect,y=void 0===k?f.noop:k,_=e.showSuggestions,E=void 0===_||_,C=e.renderSuggestions,w=void 0===C?function(e){return Object(s.createElement)(db,e)}:C,S=e.fetchSuggestions,I=void 0===S?null:S,B=e.allowDirectEntry,x=void 0===B||B,P=e.showInitialSuggestions,T=void 0!==P&&P,N=e.suggestionsQuery,D=void 0===N?{}:N,R=e.withURLSuggestion,A=void 0===R||R,M=e.createSuggestionButtonText,L=function(e,t,n,r){var o=Object(v.useSelect)((function(e){return{fetchSearchSuggestions:(0,e("core/block-editor").getSettings)().__experimentalFetchLinkSuggestions}}),[]).fetchSearchSuggestions,c=t?vb:mb;return Object(s.useCallback)((function(t,i){var a=i.isInitialSuggestions;return bb(t)?c(t,{isInitialSuggestions:a}):Ob(t,pb(pb({},e),{},{isInitialSuggestions:a}),o,c,n,r)}),[c,o,n])}(D,x,b,A),F=E?I||L:jb,V=Object(p.useInstanceId)(kb),H=Object(s.useState)(),z=Object(oe.a)(H,2),U=z[0],G=z[1],W=function(){var e=Object(hr.a)(gr.a.mark((function e(t){var n,r;return gr.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,O(t.title);case 5:n=e.sent,(null===(r=n)||void 0===r?void 0:r.url)&&y(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)&&y(hb(hb({},Object(f.omit)(c,"id","url")),n),n);case 13:case"end":return e.stop()}}),e,null,[[2,9]])})));return function(t){return e.apply(this,arguments)}}();return Object(s.createElement)("form",{onSubmit:function(e){e.preventDefault(),W(U||{url:n})}},Object(s.createElement)(ib,{className:a,value:n,onChange:function(e,t){j(e),G(t)},placeholder:null!=u?u:Object(g.__)("Search or type url"),__experimentalRenderSuggestions:E?function(e){return w(hb(hb({},e),{},{instanceId:V,withCreateSuggestion:b,currentInputValue:n,createSuggestionButtonText:M,suggestionsQuery:D,handleSuggestionClick:function(t){e.handleSuggestionClick&&e.handleSuggestionClick(t),W(t)}}))}:null,__experimentalFetchLinkSuggestions:F,__experimentalHandleURLSuggestions:!0,__experimentalShowInitialSuggestions:T,ref:t}),r)})),yb=kb,_b=Object(h.createSlotFill)("BlockEditorLinkControlViewer"),Eb=_b.Slot,Cb=_b.Fill;function wb(e){var t=e.value,n=e.onEditClick,r=t&&Object(Hl.filterURLForDisplay)(Object(Hl.safeDecodeURI)(t.url))||"";return Object(s.createElement)("div",{"aria-label":Object(g.__)("Currently selected"),"aria-selected":"true",className:b()("block-editor-link-control__search-item",{"is-current":!0})},Object(s.createElement)("span",{className:"block-editor-link-control__search-item-header"},Object(s.createElement)(h.ExternalLink,{className:"block-editor-link-control__search-item-title",href:t.url},t&&t.title||r),t&&t.title&&Object(s.createElement)("span",{className:"block-editor-link-control__search-item-info"},r)),Object(s.createElement)(h.Button,{isSecondary:!0,onClick:function(){return n()},className:"block-editor-link-control__search-item-action"},Object(g.__)("Edit")),Object(s.createElement)(Eb,{fillProps:t}))}var Sb=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 Ib(e){var t=e.searchInputPlaceholder,n=e.value,r=e.settings,o=e.onChange,c=void 0===o?f.noop:o,i=e.noDirectEntry,a=void 0!==i&&i,l=e.showSuggestions,u=void 0===l||l,d=e.showInitialSuggestions,b=e.forceIsEditingLink,p=e.createSuggestion,m=e.withCreateSuggestion,v=e.inputValue,O=void 0===v?"":v,j=e.suggestionsQuery,k=void 0===j?{}:j,y=e.noURLSuggestion,_=void 0!==y&&y,E=e.createSuggestionButtonText;void 0===m&&p&&(m=!0);var C=Object(s.useRef)(),w=Object(s.useState)(n&&n.url||""),S=Object(oe.a)(w,2),I=S[0],B=S[1],x=O||I,P=Object(s.useState)(void 0!==b?b:!n||!n.url),T=Object(oe.a)(P,2),N=T[0],D=T[1],R=Object(s.useRef)(!1);Object(s.useEffect)((function(){void 0!==b&&b!==N&&D(b)}),[b]),Object(s.useEffect)((function(){R.current&&C.current&&!C.current.contains(C.current.ownerDocument.activeElement)&&(yr.focus.focusable.find(C.current)[0]||C.current).focus();R.current=!1}),[N]);var A=function(e){var t=Object(s.useRef)(),n=Object(s.useState)(!1),r=Object(oe.a)(n,2),o=r[0],c=r[1],i=Object(s.useState)(null),a=Object(oe.a)(i,2),l=a[0],u=a[1],d=function(){var n=Object(hr.a)(gr.a.mark((function n(r){return gr.a.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return c(!0),u(null),n.prev=2,t.current=Sb(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(g.__)("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(e){return n.apply(this,arguments)}}();return Object(s.useEffect)((function(){return function(){t.current&&t.current.cancel()}}),[]),{createPage:d,isCreatingPage:o,errorMessage:l}}(p),M=A.createPage,L=A.isCreatingPage,F=A.errorMessage;return Object(s.createElement)("div",{tabIndex:-1,ref:C,className:"block-editor-link-control"},L&&Object(s.createElement)("div",{className:"block-editor-link-control__loading"},Object(s.createElement)(h.Spinner,null)," ",Object(g.__)("Creating"),"…"),(N||!n)&&!L&&Object(s.createElement)(s.Fragment,null,Object(s.createElement)("div",{className:"block-editor-link-control__search-input-wrapper"},Object(s.createElement)(yb,{currentLink:n,className:"block-editor-link-control__search-input",placeholder:t,value:x,withCreateSuggestion:m,onCreateSuggestion:M,onChange:B,onSelect:function(e){var t;c(e),R.current=!!(null===(t=C.current)||void 0===t?void 0:t.contains(C.current.ownerDocument.activeElement)),D(!1)},showInitialSuggestions:d,allowDirectEntry:!a,showSuggestions:u,suggestionsQuery:k,withURLSuggestion:!_,createSuggestionButtonText:E},Object(s.createElement)("div",{className:"block-editor-link-control__search-actions"},Object(s.createElement)(h.Button,{type:"submit",label:Object(g.__)("Submit"),icon:Xd.a,className:"block-editor-link-control__search-submit"})))),F&&Object(s.createElement)(h.Notice,{className:"block-editor-link-control__search-error",status:"error",isDismissible:!1},F)),n&&!N&&!L&&Object(s.createElement)(wb,{value:n,onEditClick:function(){return D(!0)}}),Object(s.createElement)(eb,{value:n,settings:r,onChange:c}))}Ib.ViewerFill=Cb;var Bb=Ib,xb=n(299),Pb=n(217),Tb=Object(h.withFilters)("editor.MediaUpload")((function(){return null}));var Nb=function(e){var t=e.fallback,n=void 0===t?null:t,r=e.children;return Object(v.useSelect)((function(e){return!!(0,e("core/block-editor").getSettings)().mediaUpload}),[])?r:n},Db=Object(p.compose)([Object(v.withDispatch)((function(e){var t=e("core/notices");return{createNotice:t.createNotice,removeNotice:t.removeNotice}})),Object(h.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,l=void 0===a?f.noop:a,u=e.name,d=void 0===u?Object(g.__)("Replace"):u,b=e.createNotice,p=e.removeNotice,m=Object(s.useState)(t),O=Object(oe.a)(m,2),j=O[0],k=O[1],y=Object(v.useSelect)((function(e){return e("core/block-editor").getSettings().mediaUpload}),[]),_=Object(s.createRef)(),E=Object(f.uniqueId)("block-editor/media-replace-flow/error-notice/"),C=function(e){var t=document.createElement("div");t.innerHTML=Object(s.renderToString)(e);var n=t.textContent||t.innerText||"";setTimeout((function(){b("error",n,{speak:!0,id:E,isDismissible:!0})}),1e3)},w=function(e){c(e),k(e.url),Object(Fe.speak)(Object(g.__)("The media file has been replaced")),p(E)},S=function(e){e.keyCode===st.DOWN&&(e.preventDefault(),e.stopPropagation(),e.target.click())};return Object(s.createElement)(h.Dropdown,{popoverProps:{isAlternate:!0},contentClassName:"block-editor-media-replace-flow__options",renderToggle:function(e){var t=e.isOpen,n=e.onToggle;return Object(s.createElement)(h.ToolbarGroup,{className:"media-replace-flow"},Object(s.createElement)(h.ToolbarButton,{ref:_,"aria-expanded":t,"aria-haspopup":"true",onClick:n,onKeyDown:S},d))},renderContent:function(e){e.onClose;return Object(s.createElement)(s.Fragment,null,Object(s.createElement)(h.NavigableMenu,{className:"block-editor-media-replace-flow__media-upload-menu"},Object(s.createElement)(Tb,{value:n,onSelect:function(e){return w(e)},allowedTypes:r,render:function(e){var t=e.open;return Object(s.createElement)(h.MenuItem,{icon:xb.a,onClick:t},Object(g.__)("Open Media Library"))}}),Object(s.createElement)(Nb,null,Object(s.createElement)(h.FormFileUpload,{onChange:function(e){!function(e){var t=e.target.files;l(t);y({allowedTypes:r,filesList:t,onFileChange:function(e){var t=Object(oe.a)(e,1)[0];w(t)},onError:C})}(e)},accept:o,render:function(e){var t=e.openFileDialog;return Object(s.createElement)(h.MenuItem,{icon:Pb.a,onClick:function(){t()}},Object(g.__)("Upload"))}}))),i&&Object(s.createElement)("form",{className:"block-editor-media-flow__url-input",onKeyDown:function(e){e.stopPropagation()},onKeyPress:function(e){e.stopPropagation()}},Object(s.createElement)("span",{className:"block-editor-media-replace-flow__image-url-label"},Object(g.__)("Current media URL:")),Object(s.createElement)(Bb,{value:{url:j},settings:[],showSuggestions:!1,onChange:function(e){var t=e.url;k(t),i(t),_.current.focus()}})))}})})),Rb=n(199);function Ab(e){var t=e.url,n=e.urlLabel,r=e.className,o=b()(r,"block-editor-url-popover__link-viewer-url");return t?Object(s.createElement)(h.ExternalLink,{className:o,href:t},n||Object(Hl.filterURLForDisplay)(Object(Hl.safeDecodeURI)(t))):Object(s.createElement)("span",{className:o})}function Mb(e){var t=e.additionalControls,n=e.children,r=e.renderSettings,o=e.position,c=void 0===o?"bottom center":o,i=e.focusOnMount,a=void 0===i?"firstElement":i,u=Object(je.a)(e,["additionalControls","children","renderSettings","position","focusOnMount"]),d=Object(s.useState)(!1),b=Object(oe.a)(d,2),f=b[0],p=b[1],m=!!r&&f;return Object(s.createElement)(h.Popover,Object(l.a)({className:"block-editor-url-popover",focusOnMount:a,position:c},u),Object(s.createElement)("div",{className:"block-editor-url-popover__input-container"},Object(s.createElement)("div",{className:"block-editor-url-popover__row"},n,!!r&&Object(s.createElement)(h.Button,{className:"block-editor-url-popover__settings-toggle",icon:Pr.a,label:Object(g.__)("Link settings"),onClick:function(){p(!f)},"aria-expanded":f})),m&&Object(s.createElement)("div",{className:"block-editor-url-popover__row block-editor-url-popover__settings"},r())),t&&!m&&Object(s.createElement)("div",{className:"block-editor-url-popover__additional-controls"},t))}Mb.LinkEditor=function(e){var t=e.autocompleteRef,n=e.className,r=e.onChangeInputValue,o=e.value,c=Object(je.a)(e,["autocompleteRef","className","onChangeInputValue","value"]);return Object(s.createElement)("form",Object(l.a)({className:b()("block-editor-url-popover__link-editor",n)},c),Object(s.createElement)(ib,{value:o,onChange:r,autocompleteRef:t}),Object(s.createElement)(h.Button,{icon:Xd.a,label:Object(g.__)("Apply"),type:"submit"}))},Mb.LinkViewer=function(e){var t=e.className,n=e.linkClassName,r=e.onEditLinkClick,o=e.url,c=e.urlLabel,i=Object(je.a)(e,["className","linkClassName","onEditLinkClick","url","urlLabel"]);return Object(s.createElement)("div",Object(l.a)({className:b()("block-editor-url-popover__link-viewer",t)},i),Object(s.createElement)(Ab,{url:o,urlLabel:c,className:n}),r&&Object(s.createElement)(h.Button,{icon:Rb.a,label:Object(g.__)("Edit"),onClick:r}))};var Lb=Mb,Fb=function(e){var t=e.src,n=e.onChange,r=e.onSubmit,o=e.onClose;return Object(s.createElement)(Lb,{onClose:o},Object(s.createElement)("form",{className:"block-editor-media-placeholder__url-input-form",onSubmit:r},Object(s.createElement)("input",{className:"block-editor-media-placeholder__url-input-field",type:"url","aria-label":Object(g.__)("URL"),placeholder:Object(g.__)("Paste or type URL"),onChange:n,value:t}),Object(s.createElement)(h.Button,{className:"block-editor-media-placeholder__url-input-submit-button",icon:Xd.a,label:Object(g.__)("Apply"),type:"submit"})))};var Vb=Object(h.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,l=e.mediaPreview,u=e.notices,d=e.isAppender,p=e.accept,m=e.addToGallery,O=e.multiple,j=void 0!==O&&O,k=e.dropZoneUIOnly,y=e.disableDropZone,_=e.disableMediaButtons,E=e.onError,C=e.onSelect,w=e.onCancel,S=e.onSelectURL,I=e.onDoubleClick,B=e.onFilesPreUpload,x=void 0===B?f.noop:B,P=e.onHTMLDrop,T=void 0===P?f.noop:P,N=e.children,D=Object(v.useSelect)((function(e){return(0,e("core/block-editor").getSettings)().mediaUpload}),[]),R=Object(s.useState)(""),A=Object(oe.a)(R,2),M=A[0],L=A[1],F=Object(s.useState)(!1),V=Object(oe.a)(F,2),H=V[0],z=V[1];Object(s.useEffect)((function(){var e;L(null!==(e=null==n?void 0:n.src)&&void 0!==e?e:"")}),[null==n?void 0:n.src]);var U=function(e){L(e.target.value)},G=function(){z(!0)},W=function(){z(!1)},K=function(e){e.preventDefault(),M&&S&&(S(M),W())},q=function(e){var t;if(x(e),j)if(m){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)}))}));C(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=C;else t=function(e){var t=Object(oe.a)(e,1)[0];return C(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(g.__)("To edit this block, you need permission to upload media.")),void 0===n||void 0===i){var f=null!=r?r:[],p=Object(oe.a)(f,1)[0],m=1===f.length,v=m&&"audio"===p,O=m&&"image"===p,j=m&&"video"===p;void 0===n&&D&&(n=Object(g.__)("Upload a media file or pick one from your media library."),v?n=Object(g.__)("Upload an audio file, pick one from your media library, or add one with a URL."):O?n=Object(g.__)("Upload an image file, pick one from your media library, or add one with a URL."):j&&(n=Object(g.__)("Upload a video file, pick one from your media library, or add one with a URL."))),void 0===i&&(i=Object(g.__)("Media"),v?i=Object(g.__)("Audio"):O?i=Object(g.__)("Image"):j&&(i=Object(g.__)("Video")))}var k=b()("block-editor-media-placeholder",o,{"is-appender":d});return Object(s.createElement)(h.Placeholder,{icon:c,label:i,instructions:n,className:k,notices:u,onClick:t,onDoubleClick:I,preview:l},e,N)},X=function(){return y?null:Object(s.createElement)(h.DropZone,{onFilesDrop:q,onHTMLDrop:T})},Q=function(){return w&&Object(s.createElement)(h.Button,{className:"block-editor-media-placeholder__cancel-button",title:Object(g.__)("Cancel"),isLink:!0,onClick:w},Object(g.__)("Cancel"))},Z=function(){return S&&Object(s.createElement)("div",{className:"block-editor-media-placeholder__url-input-container"},Object(s.createElement)(h.Button,{className:"block-editor-media-placeholder__button",onClick:G,isPressed:H,isTertiary:!0},Object(g.__)("Insert from URL")),H&&Object(s.createElement)(Fb,{src:M,onChange:U,onSubmit:K,onClose:W}))};return k||_?(k&&no()("wp.blockEditor.MediaPlaceholder dropZoneUIOnly prop",{alternative:"disableMediaButtons"}),Object(s.createElement)(Nb,null,X())):Object(s.createElement)(Nb,{fallback:Y(Z())},function(){var e=Object(s.createElement)(Tb,{addToGallery:m,gallery:j&&!(!r||0===r.length)&&r.every((function(e){return"image"===e||e.startsWith("image/")})),multiple:j,onSelect:C,allowedTypes:r,value:Array.isArray(n)?n.map((function(e){return e.id})):n.id,render:function(e){var t=e.open;return Object(s.createElement)(h.Button,{isTertiary:!0,onClick:function(e){e.stopPropagation(),t()}},Object(g.__)("Media Library"))}});if(D&&d)return Object(s.createElement)(s.Fragment,null,X(),Object(s.createElement)(h.FormFileUpload,{onChange:$,accept:p,multiple:j,render:function(t){var n=t.openFileDialog,r=Object(s.createElement)(s.Fragment,null,Object(s.createElement)(h.Button,{isPrimary:!0,className:b()("block-editor-media-placeholder__button","block-editor-media-placeholder__upload-button")},Object(g.__)("Upload")),e,Z(),Q());return Y(r,n)}}));if(D){var t=Object(s.createElement)(s.Fragment,null,X(),Object(s.createElement)(h.FormFileUpload,{isPrimary:!0,className:b()("block-editor-media-placeholder__button","block-editor-media-placeholder__upload-button"),onChange:$,accept:p,multiple:j},Object(g.__)("Upload")),e,Z(),Q());return Y(t)}return Y(e)}())})),Hb=Object(s.forwardRef)((function(e,t){return Object(s.createElement)(fd,Object(l.a)({ref:t},e,{__unstableDisableFormats:!0,preserveWhiteSpace:!0}))}));Hb.Content=function(e){var t=e.value,n=void 0===t?"":t,r=e.tagName,o=void 0===r?"div":r,c=Object(je.a)(e,["value","tagName"]);return Object(s.createElement)(o,c,n)};var zb=Hb,Ub=Object(s.forwardRef)((function(e,t){var n=e.__experimentalVersion,r=Object(je.a)(e,["__experimentalVersion"]);if(2===n)return Object(s.createElement)(zb,Object(l.a)({ref:t},r));var o=r.className,c=r.onChange,i=Object(je.a)(r,["className","onChange"]);return Object(s.createElement)(Jr.a,Object(l.a)({ref:t,className:b()("block-editor-plain-text",o),onChange:function(e){return c(e.target.value)}},i))}));function Gb(e){var t=e.property,n=e.viewport,r=e.desc,o=Object(p.useInstanceId)(Gb),c=r||Object(g.sprintf)(
70
  /* translators: 1: property name. 2: viewport name. */
71
+ Object(g._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(s.createElement)(s.Fragment,null,Object(s.createElement)("span",{"aria-describedby":"rbc-desc-".concat(o)},n.label),Object(s.createElement)(h.VisuallyHidden,{as:"span",id:"rbc-desc-".concat(o)},c))}var Wb=function(e){var t=e.title,n=e.property,r=e.toggleLabel,o=e.onIsResponsiveChange,c=e.renderDefaultControl,i=e.renderResponsiveControls,a=e.isResponsive,l=void 0!==a&&a,u=e.defaultLabel,d=void 0===u?{id:"all",
72
  /* translators: 'Label. Used to signify a layout property (eg: margin, padding) will apply uniformly to all screensizes.' */
73
+ label:Object(g.__)("All")}:u,f=e.viewports,p=void 0===f?[{id:"small",label:Object(g.__)("Small screens")},{id:"medium",label:Object(g.__)("Medium screens")},{id:"large",label:Object(g.__)("Large screens")}]:f;if(!t||!n||!c)return null;var m=r||Object(g.sprintf)(
74
  /* 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) */