Gutenberg - Version 8.5.1

Version Description

Download this release

Release Info

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

Code changes from version 8.5.0 to 8.5.1

build/edit-site/index.asset.php CHANGED
@@ -1 +1 @@
1
- <?php return array('dependencies' => array('lodash', 'wp-api-fetch', 'wp-block-editor', 'wp-block-library', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-core-data', 'wp-data', 'wp-data-controls', 'wp-editor', 'wp-element', 'wp-hooks', 'wp-i18n', 'wp-keyboard-shortcuts', 'wp-keycodes', 'wp-media-utils', 'wp-notices', 'wp-plugins', 'wp-polyfill', 'wp-primitives', 'wp-url'), 'version' => 'f705c250c84e020c090f996fc4ff9759');
1
+ <?php return array('dependencies' => array('lodash', 'wp-api-fetch', 'wp-block-editor', 'wp-block-library', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-core-data', 'wp-data', 'wp-data-controls', 'wp-editor', 'wp-element', 'wp-hooks', 'wp-i18n', 'wp-keyboard-shortcuts', 'wp-keycodes', 'wp-media-utils', 'wp-notices', 'wp-plugins', 'wp-polyfill', 'wp-primitives', 'wp-url'), 'version' => 'cb59575d907e5934e38e88520aa53a60');
build/edit-site/index.js CHANGED
@@ -1,5 +1,5 @@
1
- this.wp=this.wp||{},this.wp.editSite=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=383)}({0:function(e,t){!function(){e.exports=this.wp.element}()},1:function(e,t){!function(){e.exports=this.wp.i18n}()},10:function(e,t,n){var r;!function(){"use strict";var n={}.hasOwnProperty;function c(){for(var e=[],t=0;t<arguments.length;t++){var r=arguments[t];if(r){var a=typeof r;if("string"===a||"number"===a)e.push(r);else if(Array.isArray(r))e.push(c.apply(null,r));else if("object"===a)for(var o in r)n.call(r,o)&&r[o]&&e.push(o)}}return e.join(" ")}e.exports?e.exports=c:void 0===(r=function(){return c}.apply(t,[]))||(e.exports=r)}()},11:function(e,t){!function(){e.exports=this.wp.blocks}()},12:function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(36);var c=n(29),a=n(37);function o(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,a=void 0;try{for(var o,i=e[Symbol.iterator]();!(r=(o=i.next()).done)&&(n.push(o.value),!t||n.length!==t);r=!0);}catch(e){c=!0,a=e}finally{try{r||null==i.return||i.return()}finally{if(c)throw a}}return n}}(e,t)||Object(c.a)(e,t)||Object(a.a)()}},120:function(e,t,n){"use strict";var r=n(5),c=n(14),a=n(0);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}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(a.cloneElement)(t,function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?o(Object(n),!0).forEach((function(t){Object(r.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):o(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({width:i,height:i},l))}},121:function(e,t,n){"use strict";var r=n(0),c=n(7),a=Object(r.createElement)(c.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(r.createElement)(c.Path,{d:"M9 18.6L3.5 13l1-1L9 16.4l9.5-9.9 1 1z"}));t.a=a},13: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}))},132:function(e,t,n){"use strict";var r=n(0),c=n(7),a=Object(r.createElement)(c.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(r.createElement)(c.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=a},133:function(e,t,n){"use strict";var r=n(0),c=n(7),a=Object(r.createElement)(c.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(r.createElement)(c.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=a},14:function(e,t,n){"use strict";n.d(t,"a",(function(){return c}));var r=n(41);function c(e,t){if(null==e)return{};var n,c,a=Object(r.a)(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(c=0;c<o.length;c++)n=o[c],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}},15: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}))},16:function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(27);var c=n(35),a=n(29);function o(e){return function(e){if(Array.isArray(e))return Object(r.a)(e)}(e)||Object(c.a)(e)||Object(a.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.")}()}},166:function(e,t,n){"use strict";var r=n(0),c=n(7),a=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=a},167:function(e,t,n){"use strict";var r=n(0),c=n(7),a=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=a},18: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 c(e,t,n){return t&&r(e.prototype,t),n&&r(e,n),e}n.d(t,"a",(function(){return c}))},19: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}))},193:function(e,t,n){"use strict";var r=n(0),c=n(7),a=Object(r.createElement)(c.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(r.createElement)(c.Path,{d:"M18 11.2h-5.2V6h-1.6v5.2H6v1.6h5.2V18h1.6v-5.2H18z"}));t.a=a},194:function(e,t,n){"use strict";var r=n(0),c=n(7),a=Object(r.createElement)(c.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(r.createElement)(c.Path,{d:"M13 19h-2v-2h2v2zm0-6h-2v-2h2v2zm0-6h-2V5h2v2z"}));t.a=a},197:function(e,t,n){"use strict";var r=n(0),c=n(7),a=Object(r.createElement)(c.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"-2 -2 24 24"},Object(r.createElement)(c.Path,{d:"M13.89 3.39l2.71 2.72c.46.46.42 1.24.03 1.64l-8.01 8.02-5.56 1.16 1.16-5.58s7.6-7.63 7.99-8.03c.39-.39 1.22-.39 1.68.07zm-2.73 2.79l-5.59 5.61 1.11 1.11 5.54-5.65zm-2.97 8.23l5.58-5.6-1.07-1.08-5.59 5.6zM13.89 3.39l2.71 2.72c.46.46.42 1.24.03 1.64l-8.01 8.02-5.56 1.16 1.16-5.58s7.6-7.63 7.99-8.03c.39-.39 1.22-.39 1.68.07zm-2.73 2.79l-5.59 5.61 1.11 1.11 5.54-5.65zm-2.97 8.23l5.58-5.6-1.07-1.08-5.59 5.6z"}));t.a=a},2:function(e,t){!function(){e.exports=this.lodash}()},20:function(e,t){!function(){e.exports=this.wp.keycodes}()},21: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 c(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 c}))},22:function(e,t){!function(){e.exports=this.regeneratorRuntime}()},23:function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var r=n(40),c=n(13);function a(e,t){return!t||"object"!==Object(r.a)(t)&&"function"!=typeof t?Object(c.a)(e):t}},232:function(e,t,n){"use strict";var r=n(0),c=n(7),a=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:"M10.289 4.836A1 1 0 0111.275 4h1.306a1 1 0 01.987.836l.244 1.466c.787.26 1.503.679 2.108 1.218l1.393-.522a1 1 0 011.216.437l.653 1.13a1 1 0 01-.23 1.273l-1.148.944a6.025 6.025 0 010 2.435l1.149.946a1 1 0 01.23 1.272l-.653 1.13a1 1 0 01-1.216.437l-1.394-.522c-.605.54-1.32.958-2.108 1.218l-.244 1.466a1 1 0 01-.987.836h-1.306a1 1 0 01-.986-.836l-.244-1.466a5.995 5.995 0 01-2.108-1.218l-1.394.522a1 1 0 01-1.217-.436l-.653-1.131a1 1 0 01.23-1.272l1.149-.946a6.026 6.026 0 010-2.435l-1.148-.944a1 1 0 01-.23-1.272l.653-1.131a1 1 0 011.217-.437l1.393.522a5.994 5.994 0 012.108-1.218l.244-1.466zM14.929 12a3 3 0 11-6 0 3 3 0 016 0z",clipRule:"evenodd"}));t.a=a},233:function(e,t,n){"use strict";var r=n(0),c=n(7),a=Object(r.createElement)(c.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(r.createElement)(c.Path,{d:"M18.3 11.7c-.6-.6-1.4-.9-2.3-.9H6.7l2.9-3.3-1.1-1-4.5 5L8.5 16l1-1-2.7-2.7H16c.5 0 .9.2 1.3.5 1 1 1 3.4 1 4.5v.3h1.5v-.2c0-1.5 0-4.3-1.5-5.7z"}));t.a=a},234:function(e,t,n){"use strict";var r=n(0),c=n(7),a=Object(r.createElement)(c.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(r.createElement)(c.Path,{d:"M15.6 6.5l-1.1 1 2.9 3.3H8c-.9 0-1.7.3-2.3.9-1.4 1.5-1.4 4.2-1.4 5.6v.2h1.5v-.3c0-1.1 0-3.5 1-4.5.3-.3.7-.5 1.3-.5h9.2L14.5 15l1.1 1.1 4.6-4.6-4.6-5z"}));t.a=a},255:function(e,t,n){var r,c,a;c=[],void 0===(a="function"==typeof(r=function(){return function e(t,n,r){var c,a,o=window,i="application/octet-stream",l=r||i,u=t,s=!n&&!r&&u,p=document.createElement("a"),b=function(e){return String(e)},m=o.Blob||o.MozBlob||o.WebKitBlob||b,f=n||"download";if(m=m.call?m.bind(o):Blob,"true"===String(this)&&(l=(u=[u,l])[0],u=u[1]),s&&s.length<2048&&(f=s.split("/").pop().split("?")[0],p.href=s,-1!==p.href.indexOf(s))){var d=new XMLHttpRequest;return d.open("GET",s,!0),d.responseType="blob",d.onload=function(t){e(t.target.response,f,i)},setTimeout((function(){d.send()}),0),d}if(/^data:([\w+-]+\/[\w+.-]+)?[,;]/.test(u)){if(!(u.length>2096103.424&&m!==b))return navigator.msSaveBlob?navigator.msSaveBlob(y(u),f):g(u);l=(u=y(u)).type||i}else if(/([\x80-\xff])/.test(u)){for(var O=0,j=new Uint8Array(u.length),v=j.length;O<v;++O)j[O]=u.charCodeAt(O);u=new m([j],{type:l})}function y(e){for(var t=e.split(/[:;,]/),n=t[1],r=("base64"==t[2]?atob:decodeURIComponent)(t.pop()),c=r.length,a=0,o=new Uint8Array(c);a<c;++a)o[a]=r.charCodeAt(a);return new m([o],{type:n})}function g(e,t){if("download"in p)return p.href=e,p.setAttribute("download",f),p.className="download-js-link",p.innerHTML="downloading...",p.style.display="none",document.body.appendChild(p),setTimeout((function(){p.click(),document.body.removeChild(p),!0===t&&setTimeout((function(){o.URL.revokeObjectURL(p.href)}),250)}),66),!0;if(/(Version)\/(\d+)\.(\d+)(?:\.(\d+))?.*Safari\//.test(navigator.userAgent))return/^data:/.test(e)&&(e="data:"+e.replace(/^data:([\w\/\-\+]+)/,i)),window.open(e)||confirm("Displaying New Document\n\nUse Save As... to download, then click back to return to this page.")&&(location.href=e),!0;var n=document.createElement("iframe");document.body.appendChild(n),!t&&/^data:/.test(e)&&(e="data:"+e.replace(/^data:([\w\/\-\+]+)/,i)),n.src=e,setTimeout((function(){document.body.removeChild(n)}),333)}if(c=u instanceof m?u:new m([u],{type:l}),navigator.msSaveBlob)return navigator.msSaveBlob(c,f);if(o.URL)g(o.URL.createObjectURL(c),!0);else{if("string"==typeof c||c.constructor===b)try{return g("data:"+l+";base64,"+o.btoa(c))}catch(e){return g("data:"+l+","+encodeURIComponent(c))}(a=new FileReader).onload=function(e){g(this.result)},a.readAsDataURL(c)}return!0}})?r.apply(t,c):r)||(e.exports=a)},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}))},28:function(e,t){!function(){e.exports=this.wp.url}()},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(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Object(r.a)(e,t):void 0}}},3:function(e,t){!function(){e.exports=this.wp.components}()},32:function(e,t){!function(){e.exports=this.wp.hooks}()},33:function(e,t){!function(){e.exports=this.wp.editor}()},34:function(e,t){!function(){e.exports=this.wp.dataControls}()},35: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}))},36:function(e,t,n){"use strict";function r(e){if(Array.isArray(e))return e}n.d(t,"a",(function(){return r}))},360:function(e,t,n){"use strict";var r=n(0),c=n(7),a=Object(r.createElement)(c.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"-2 -2 24 24"},Object(r.createElement)(c.Path,{d:"M20 10c0-5.51-4.49-10-10-10C4.48 0 0 4.49 0 10c0 5.52 4.48 10 10 10 5.51 0 10-4.48 10-10zM7.78 15.37L4.37 6.22c.55-.02 1.17-.08 1.17-.08.5-.06.44-1.13-.06-1.11 0 0-1.45.11-2.37.11-.18 0-.37 0-.58-.01C4.12 2.69 6.87 1.11 10 1.11c2.33 0 4.45.87 6.05 2.34-.68-.11-1.65.39-1.65 1.58 0 .74.45 1.36.9 2.1.35.61.55 1.36.55 2.46 0 1.49-1.4 5-1.4 5l-3.03-8.37c.54-.02.82-.17.82-.17.5-.05.44-1.25-.06-1.22 0 0-1.44.12-2.38.12-.87 0-2.33-.12-2.33-.12-.5-.03-.56 1.2-.06 1.22l.92.08 1.26 3.41zM17.41 10c.24-.64.74-1.87.43-4.25.7 1.29 1.05 2.71 1.05 4.25 0 3.29-1.73 6.24-4.4 7.78.97-2.59 1.94-5.2 2.92-7.78zM6.1 18.09C3.12 16.65 1.11 13.53 1.11 10c0-1.3.23-2.48.72-3.59C3.25 10.3 4.67 14.2 6.1 18.09zm4.03-6.63l2.58 6.98c-.86.29-1.76.45-2.71.45-.79 0-1.57-.11-2.29-.33.81-2.38 1.62-4.74 2.42-7.1z"}));t.a=a},37: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}))},38:function(e,t){!function(){e.exports=this.wp.apiFetch}()},383:function(e,t,n){"use strict";n.r(t),n.d(t,"initialize",(function(){return bt})),n.d(t,"__experimentalFullscreenModeClose",(function(){return qe}));var r={};n.r(r),n.d(r,"toggleFeature",(function(){return z})),n.d(r,"__experimentalSetPreviewDeviceType",(function(){return V})),n.d(r,"setTemplate",(function(){return U})),n.d(r,"addTemplate",(function(){return H})),n.d(r,"removeTemplate",(function(){return q})),n.d(r,"setTemplatePart",(function(){return W})),n.d(r,"setPage",(function(){return Q}));var c={};n.r(c),n.d(c,"isFeatureActive",(function(){return $})),n.d(c,"__experimentalGetPreviewDeviceType",(function(){return J})),n.d(c,"getCanUserCreateMedia",(function(){return ee})),n.d(c,"getSettings",(function(){return te})),n.d(c,"getHomeTemplateId",(function(){return ne})),n.d(c,"getTemplateId",(function(){return re})),n.d(c,"getTemplatePartId",(function(){return ce})),n.d(c,"getTemplateType",(function(){return ae})),n.d(c,"getTemplateIds",(function(){return oe})),n.d(c,"getTemplatePartIds",(function(){return ie})),n.d(c,"getPage",(function(){return le})),n.d(c,"getShowOnFront",(function(){return ue}));var a=n(0),o=n(38),i=n.n(o),l=n(28),u=n(1),s=(n(69),n(66)),p=n(255),b=n.n(p),m=n(3),f=n(51),d=n(2),O=Object(m.createSlotFill)("ToolsMoreMenuGroup"),j=O.Fill,v=O.Slot;j.Slot=function(e){var t=e.fillProps;return Object(a.createElement)(v,{fillProps:t},(function(e){return!Object(d.isEmpty)(e)&&Object(a.createElement)(m.MenuGroup,{label:Object(u.__)("Tools")},e)}))};var y=j;Object(f.registerPlugin)("edit-site",{render:function(){return Object(a.createElement)(a.Fragment,null,Object(a.createElement)(y,null,Object(a.createElement)(m.MenuItem,{role:"menuitem",icon:"download",onClick:function(){return i()({path:"/__experimental/edit-site/v1/export",parse:!1}).then((function(e){return e.blob()})).then((function(e){return b()(e,"edit-site-export.zip","application/zip")}))},info:Object(u.__)("Download your templates and template parts.")},Object(u.__)("Export")),Object(a.createElement)(m.MenuItem,{role:"menuitem",href:Object(l.addQueryArgs)("edit.php",{post_type:"wp_block"})},Object(u.__)("Manage all reusable blocks")),Object(a.createElement)(m.MenuItem,{role:"menuitem",href:Object(u.__)("https://wordpress.org/support/article/wordpress-editor/"),target:"_blank",rel:"noopener noreferrer"},Object(u.__)("Help"))))}});var g=n(32),h=n(73);Object(g.addFilter)("editor.MediaUpload","core/edit-site/components/media-upload",(function(){return h.MediaUpload}));var E=n(5),_=n(4),w=n(34),P=n(16);function S(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function T(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?S(Object(n),!0).forEach((function(t){Object(E.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):S(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var x,I=Object(d.flow)([_.combineReducers,(x={features:{fullscreenMode:!0}},function(e){return function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:x,n=arguments.length>1?arguments[1]:void 0;return e(t,n)}})])({features:function(e,t){return"TOGGLE_FEATURE"===t.type?T({},e,Object(E.a)({},t.feature,!e[t.feature])):e}});var k=Object(_.combineReducers)({preferences:I,deviceType:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"Desktop",t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"SET_PREVIEW_DEVICE_TYPE":return t.deviceType}return e},settings:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"UPDATE_SETTINGS":return T({},e,{},t.settings)}return e},homeTemplateId:function(e){return e},templateId:function(e,t){switch(t.type){case"SET_TEMPLATE":case"ADD_TEMPLATE":case"SET_PAGE":return t.templateId}return e},templatePartId:function(e,t){switch(t.type){case"SET_TEMPLATE_PART":return t.templatePartId}return e},templateType:function(e,t){switch(t.type){case"SET_TEMPLATE":case"ADD_TEMPLATE":case"SET_PAGE":return"wp_template";case"SET_TEMPLATE_PART":return"wp_template_part"}return e},templateIds:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"ADD_TEMPLATE":return[].concat(Object(P.a)(e),[t.templateId]);case"REMOVE_TEMPLATE":return e.filter((function(e){return e!==t.templateId}))}return e},templatePartIds:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return e},page: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_PAGE":return t.page}return e},showOnFront:function(e){return e}}),A=n(22),M=n.n(A),D=n(43),C=window.fetch;function R(e,t){return L.apply(this,arguments)}function L(){return(L=Object(D.a)(M.a.mark((function e(t,n){var r,c,a;return M.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,C(Object(l.addQueryArgs)(t,{"_wp-find-template":!0})).then((function(e){return e.json()}));case 2:if(r=e.sent,c=r.data,null!==(a=c.ID)){e.next=9;break}return e.next=8,n("postType","wp_template",{resolved:!0,slug:c.post_name});case 8:a=e.sent[0].id;case 9:return e.abrupt("return",a);case 10:case"end":return e.stop()}}),e)})))).apply(this,arguments)}var N={FIND_TEMPLATE:Object(_.createRegistryControl)((function(e){return function(t){return R(t.path,e.__experimentalResolveSelect("core").getEntityRecords)}}))},B=M.a.mark(H),F=M.a.mark(q),G=M.a.mark(Q);function z(e){return{type:"TOGGLE_FEATURE",feature:e}}function V(e){return{type:"SET_PREVIEW_DEVICE_TYPE",deviceType:e}}function U(e){return{type:"SET_TEMPLATE",templateId:e}}function H(e){var t;return M.a.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,Object(w.dispatch)("core","saveEntityRecord","postType","wp_template",e);case 2:return t=n.sent,n.abrupt("return",{type:"ADD_TEMPLATE",templateId:t.id});case 4:case"end":return n.stop()}}),B)}function q(e){return M.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,Object(w.apiFetch)({path:"/wp/v2/templates/".concat(e),method:"DELETE"});case 2:return t.t0=w.dispatch,t.next=5,Object(w.select)("core/edit-site","getPage");case 5:return t.t1=t.sent,t.next=8,(0,t.t0)("core/edit-site","setPage",t.t1);case 8:return t.abrupt("return",{type:"REMOVE_TEMPLATE",templateId:e});case 9:case"end":return t.stop()}}),F)}function W(e){return{type:"SET_TEMPLATE_PART",templatePartId:e}}function Q(e){var t;return M.a.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,{type:"FIND_TEMPLATE",path:e.path};case 2:return t=n.sent,n.abrupt("return",{type:"SET_PAGE",page:e,templateId:t});case 4:case"end":return n.stop()}}),G)}var K=n(14),Y=n(44);function X(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 Z(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?X(Object(n),!0).forEach((function(t){Object(E.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):X(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function $(e,t){return Object(d.get)(e.preferences.features,[t],!1)}function J(e){return e.deviceType}var ee=Object(_.createRegistrySelector)((function(e){return function(){return e("core").canUser("create","media")}})),te=Object(Y.a)((function(e){return ee(e)?Z({},e.settings,{focusMode:$(e,"focusMode"),hasFixedToolbar:$(e,"fixedToolbar"),mediaUpload:function(t){var n=t.onError,r=Object(K.a)(t,["onError"]);Object(h.uploadMedia)(Z({wpAllowedMimeTypes:e.settings.allowedMimeTypes,onError:function(e){var t=e.message;return n(t)}},r))}}):e.settings}),(function(e){return[ee(e),e.settings,$(e,"focusMode"),$(e,"fixedToolbar")]}));function ne(e){return e.homeTemplateId}function re(e){return e.templateId}function ce(e){return e.templatePartId}function ae(e){return e.templateType}function oe(e){return e.templateIds}function ie(e){return e.templatePartIds}function le(e){return e.page}function ue(e){return e.showOnFront}function se(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?se(Object(n),!0).forEach((function(t){Object(E.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):se(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var be=n(12),me=n(47),fe=n(6),de=n(9),Oe=n(49),je=n(33),ve=n(133);function ye(){var e=Object(_.useSelect)((function(e){return e("core/notices").getNotices().filter((function(e){return"snackbar"===e.type}))}),[]),t=Object(_.useDispatch)("core/notices").removeNotice;return Object(a.createElement)(m.SnackbarList,{className:"edit-site-notices",notices:e,onRemove:t})}var ge=n(193),he=n(194),Ee=n(121);var _e=Object(m.withSpokenMessages)((function(e){var t=e.feature,n=e.label,r=e.info,c=e.messageActivated,o=e.messageDeactivated,i=e.speak,l=Object(_.useSelect)((function(e){return e("core/edit-site").isFeatureActive(t)}),[]),s=Object(_.useDispatch)("core/edit-site").toggleFeature;return Object(a.createElement)(m.MenuItem,{icon:l&&Ee.a,isSelected:l,onClick:Object(d.flow)(s.bind(null,t),(function(){i(l?o||Object(u.__)("Feature deactivated"):c||Object(u.__)("Feature activated"))})),role:"menuitemcheckbox",info:r},n)})),we={className:"edit-site-more-menu__content",position:"bottom left"},Pe={tooltipPosition:"bottom"},Se=function(){return Object(a.createElement)(m.DropdownMenu,{className:"edit-site-more-menu",icon:he.a,label:Object(u.__)("More tools & options"),popoverProps:we,toggleProps:Pe},(function(e){var t=e.onClose;return Object(a.createElement)(a.Fragment,null,Object(a.createElement)(m.MenuGroup,{label:Object(u._x)("View","noun")},Object(a.createElement)(_e,{feature:"fixedToolbar",label:Object(u.__)("Top toolbar"),info:Object(u.__)("Access all block and document tools in a single place"),messageActivated:Object(u.__)("Top toolbar activated"),messageDeactivated:Object(u.__)("Top toolbar deactivated")}),Object(a.createElement)(_e,{feature:"focusMode",label:Object(u.__)("Spotlight mode"),info:Object(u.__)("Focus on one block at a time"),messageActivated:Object(u.__)("Spotlight mode activated"),messageDeactivated:Object(u.__)("Spotlight mode deactivated")}),Object(a.createElement)(_e,{feature:"fullscreenMode",label:Object(u.__)("Fullscreen mode"),info:Object(u.__)("Work without distraction"),messageActivated:Object(u.__)("Fullscreen mode activated"),messageDeactivated:Object(u.__)("Fullscreen mode deactivated")}),Object(a.createElement)(Oe.a.Slot,{name:"core/edit-site/plugin-more-menu",label:Object(u.__)("Plugins"),as:[m.MenuGroup,m.MenuItem],fillProps:{onClick:t}})),Object(a.createElement)(y.Slot,{fillProps:{onClose:t}}))}))},Te=n(120),xe=n(7),Ie=Object(a.createElement)(xe.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(a.createElement)(xe.Path,{d:"M12 4L4 7.9V20h16V7.9L12 4zm6.5 14.5H14V13h-4v5.5H5.5V8.8L12 5.7l6.5 3.1v9.7z"}));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 Ae(e){var t,n=e.showOnFront,r=e.activePage,c=e.onActivePageChange,o=Object(_.useSelect)((function(e){var t,r,c=e("core").getEntityRecords,o={pages:null===(t=c("postType","page"))||void 0===t?void 0:t.map((function(e){var t=Object(l.getPathAndQueryString)(e.link);return{label:"/"===t?Object(a.createElement)(a.Fragment,null,e.title.rendered,Object(a.createElement)(m.Tooltip,{text:Object(u.__)("Home")},Object(a.createElement)("div",null,Object(a.createElement)(Te.a,{icon:Ie})))):e.title.rendered,type:"page",slug:e.slug,value:t,context:{postType:"page",postId:e.id}}})),categories:null===(r=c("taxonomy","category"))||void 0===r?void 0:r.map((function(e){var t=Object(l.getPathAndQueryString)(e.link);return{label:e.name,type:"category",slug:e.slug,value:t,context:{query:{categoryIds:[e.id]},queryContext:{page:1}}}})),posts:[]};return"posts"===n&&o.posts.unshift({label:Object(a.createElement)(a.Fragment,null,Object(u.__)("All Posts"),Object(a.createElement)(m.Tooltip,{text:Object(u.__)("Home")},Object(a.createElement)("div",null,Object(a.createElement)(Te.a,{icon:Ie})))),value:"/",context:{query:{categoryIds:[]},queryContext:{page:1}}}),o}),[n]),i=o.pages,s=void 0===i?[]:i,p=o.categories,b=void 0===p?[]:p,f=o.posts,d=void 0===f?[]:f,O=function(e){var t=[].concat(Object(P.a)(s),Object(P.a)(b),Object(P.a)(d)).find((function(t){return t.value===e})),n=t.value,r=Object(K.a)(t,["value"]);c(function(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(E.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}({},r,{path:n}))},j=function(e){return c({type:"post",slug:e.slug,path:Object(l.getPathAndQueryString)(e.url),context:{postType:e.type,postId:e.id}})};return Object(a.createElement)(m.DropdownMenu,{icon:null,label:Object(u.__)("Switch Page"),toggleProps:{children:(null===(t=[].concat(Object(P.a)(s),Object(P.a)(b),Object(P.a)(d)).find((function(e){return e.value===r.path})))||void 0===t?void 0:t.label)||r.path},menuProps:{className:"edit-site-page-switcher__menu"}},(function(){return Object(a.createElement)(a.Fragment,null,Object(a.createElement)(m.MenuGroup,{label:Object(u.__)("Pages")},Object(a.createElement)(m.MenuItemsChoice,{choices:s,value:r.path,onSelect:O})),Object(a.createElement)(m.MenuGroup,{label:Object(u.__)("Categories")},Object(a.createElement)(m.MenuItemsChoice,{choices:b,value:r.path,onSelect:O})),Object(a.createElement)(m.MenuGroup,{label:Object(u.__)("Posts")},Object(a.createElement)(m.MenuItemsChoice,{choices:d,value:r.path,onSelect:O}),Object(a.createElement)(fe.__experimentalLinkControl,{searchInputPlaceholder:Object(u.__)("Search for Post"),onChange:j,settings:{},noDirectEntry:!0,showInitialSuggestions:!0})))}))}var Me=n(233),De=n(11);var Ce=function(e){var t=e.item,n=Object(_.useSelect)((function(e){return e("core").getEntityRecord("postType","template"===t.type?"wp_template":"wp_template_part",t.id)}),[t]),r=Object(a.useMemo)((function(){var e;return n?Object(De.parse)((null==n||null===(e=n.content)||void 0===e?void 0:e.raw)||""):[]}),[n]);return Object(a.createElement)("div",{className:"edit-site-template-switcher__template-preview"},!!r&&Object(a.createElement)(fe.BlockPreview,{blocks:r,viewportWidth:1200}))};var Re=function(e){var t=e.theme,n=t.author,r=t.description,c=t.name,o=t.screenshot,i=t.version;return Object(a.createElement)("div",{className:"edit-site-template-switcher__theme-preview"},Object(a.createElement)("span",{className:"edit-site-template-switcher__theme-preview-name",dangerouslySetInnerHTML:{__html:c.rendered}})," ",Object(a.createElement)("span",{className:"edit-site-template-switcher__theme-preview-version"},"v"+i),Object(a.createElement)("div",{className:"edit-site-template-switcher__theme-preview-byline"},// translators: %s: theme author name.
2
- Object(u.sprintf)(Object(u.__)("By %s"),[n.raw])),Object(a.createElement)("img",{className:"edit-site-template-switcher__theme-preview-screenshot",src:o,alt:"Theme Preview"}),Object(a.createElement)("div",{className:"edit-site-template-switcher__theme-preview-description"},Object(d.truncate)(r.raw,{length:120,separator:/\. +/})))},Le={page:function(e){return"page-".concat(e)},category:function(e){return"category-".concat(e)},post:function(e){return"single-post-".concat(e)}};function Ne(e){var t=e.template,n=e.homeId;return Object(a.createElement)(a.Fragment,null,t.slug," ",t.id===n&&Object(a.createElement)(m.Tooltip,{text:Object(u.__)("Home")},Object(a.createElement)("div",{className:"edit-site-template-switcher__label-home-icon"},Object(a.createElement)(Te.a,{icon:Ie}))),"auto-draft"!==t.status&&Object(a.createElement)(m.Tooltip,{text:Object(u.__)("Customized")},Object(a.createElement)("span",{className:"edit-site-template-switcher__label-customized-dot"})))}function Be(e){var t=e.page,n=e.activeId,r=e.activeTemplatePartId,c=e.isTemplatePart,o=e.onActiveIdChange,i=e.onActiveTemplatePartIdChange,l=e.onAddTemplate,s=e.onRemoveTemplate,p=Object(a.useState)(),b=Object(be.a)(p,2),f=b[0],d=b[1],O=Object(a.useState)(!1),j=Object(be.a)(O,2),v=j[0],y=j[1],g=function(e){d({id:e,type:"template-part"})},h=function(){y((function(){return!0}))},E=function(){y((function(){return!1}))},w=Object(_.useRegistry)(),P=Object(a.useState)(),S=Object(be.a)(P,2),T=S[0],x=S[1];Object(a.useEffect)((function(){R("/",w.__experimentalResolveSelect("core").getEntityRecords).then((function(e){return x(e)}),(function(){return x(null)}))}),[w]);var I=Object(_.useSelect)((function(e){var t=e("core"),r=t.getCurrentTheme,c=t.getEntityRecord,a=t.getEntityRecords,o=c("postType","wp_template",n);return{currentTheme:r(),template:o,templateParts:o?a("postType","wp_template_part",{resolved:!0,template:o.slug}):null}}),[n]),k=I.currentTheme,A=I.template,C=I.templateParts,L={label:A?Object(a.createElement)(Ne,{template:A,homeId:T}):Object(u.__)("Loading…"),value:n,slug:A?A.slug:Object(u.__)("Loading…"),content:null==A?void 0:A.content},N=null==C?void 0:C.map((function(e){return{label:Object(a.createElement)(Ne,{template:e}),value:e.id,slug:e.slug}})),B=Le[t.type]&&t.slug&&Le[t.type](t.slug),F=function(){return l({slug:B,title:B,status:"publish",content:L.content.raw})},G=function(){var e=Object(D.a)(M.a.mark((function e(){return M.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:s(n);case 1:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();return Object(a.createElement)(a.Fragment,null,Object(a.createElement)(m.DropdownMenu,{popoverProps:{className:"edit-site-template-switcher__popover",position:"bottom right"},icon:null,label:Object(u.__)("Switch Template"),toggleProps:{children:(c?N:[L]).find((function(e){return e.value===(c?r:n)})).slug}},(function(){return Object(a.createElement)(a.Fragment,null,Object(a.createElement)(m.MenuGroup,{label:Object(u.__)("Template")},Object(a.createElement)(m.MenuItem,{onClick:function(){return o(n)}},L.label),B&&B!==L.slug&&Object(a.createElement)(m.MenuItem,{icon:ge.a,onClick:F},Object(u.__)("Overwrite Template")),B===L.slug&&Object(a.createElement)(m.MenuItem,{icon:Me.a,onClick:G},Object(u.__)("Revert to Parent"))),Object(a.createElement)(m.MenuGroup,{label:Object(u.__)("Template Parts")},Object(a.createElement)(m.MenuItemsChoice,{choices:N,value:c?r:void 0,onSelect:i,onHover:g})),Object(a.createElement)(m.MenuGroup,{label:Object(u.__)("Current theme")},Object(a.createElement)(m.MenuItem,{onMouseEnter:h,onMouseLeave:E},k.name.raw)),!!(null==f?void 0:f.id)&&Object(a.createElement)(Ce,{item:f}),v&&Object(a.createElement)(Re,{theme:k}),Object(a.createElement)("div",{className:"edit-site-template-switcher__footer"}))})))}function Fe(e){var t=e.openEntitiesSavedStates,n=Object(_.useSelect)((function(e){var t=e("core"),n=t.__experimentalGetDirtyEntityRecords,r=t.isSavingEntityRecord,c=n();return{isDirty:c.length>0,isSaving:Object(d.some)(c,(function(e){return r(e.kind,e.name,e.key)})),templateType:e("core/edit-site").getTemplateType()}})),r=n.isDirty,c=n.isSaving,o=!r||c;return Object(a.createElement)(a.Fragment,null,Object(a.createElement)(m.Button,{isPrimary:!0,className:"edit-site-save-button__button","aria-disabled":o,disabled:o,isBusy:c,onClick:o?void 0:t},Object(u.__)("Update Design")))}var Ge=n(20);function ze(){var e=Object(_.useSelect)((function(e){return e("core").hasUndo()})),t=Object(_.useDispatch)("core").undo;return Object(a.createElement)(m.Button,{icon:Me.a,label:Object(u.__)("Undo"),shortcut:Ge.displayShortcut.primary("z"),"aria-disabled":!e,onClick:e?t:void 0})}var Ve=n(234);function Ue(){var e=Object(_.useSelect)((function(e){return e("core").hasRedo()})),t=Object(_.useDispatch)("core").redo;return Object(a.createElement)(m.Button,{icon:Ve.a,label:Object(u.__)("Redo"),shortcut:Ge.displayShortcut.primaryShift("z"),"aria-disabled":!e,onClick:e?t:void 0})}var He=n(360);var qe=function(e){var t=e.icon;if(!Object(_.useSelect)((function(e){return e("core/edit-site").isFeatureActive("fullscreenMode")}),[]))return null;var n=t||He.a;return Object(a.createElement)(m.Button,{className:"edit-site-fullscreen-mode-close",icon:n,iconSize:36,href:"index.php",label:Object(u.__)("Back")})};function We(e){var t=e.openEntitiesSavedStates,n=e.isInserterOpen,r=e.onToggleInserter,c=Object(_.useSelect)((function(e){var t=e("core/edit-site"),n=t.__experimentalGetPreviewDeviceType,r=t.isFeatureActive,c=t.getTemplateId,a=t.getTemplatePartId,o=t.getTemplateType,i=t.getPage,l=t.getShowOnFront;return{deviceType:n(),hasFixedToolbar:r("fixedToolbar"),templateId:c(),templatePartId:a(),templateType:o(),page:i(),showOnFront:l()}}),[]),o=c.deviceType,i=c.hasFixedToolbar,l=c.templateId,s=c.templatePartId,p=c.templateType,b=c.page,f=c.showOnFront,d=Object(_.useDispatch)("core/edit-site"),O=d.__experimentalSetPreviewDeviceType,j=d.setTemplate,v=d.addTemplate,y=d.removeTemplate,g=d.setTemplatePart,h=d.setPage,E=!Object(de.useViewportMatch)("medium")||"Desktop"!==o||i;return Object(a.createElement)("div",{className:"edit-site-header"},Object(a.createElement)(Oe.g.Slot,null,Object(a.createElement)(qe,null)),Object(a.createElement)("div",{className:"edit-site-header__toolbar"},Object(a.createElement)(m.Button,{isPrimary:!0,isPressed:n,onClick:r,icon:ge.a,label:Object(u._x)("Add block","Generic label for block inserter button")}),Object(a.createElement)(fe.ToolSelector,null),Object(a.createElement)(ze,null),Object(a.createElement)(Ue,null),Object(a.createElement)(fe.BlockNavigationDropdown,null),E&&Object(a.createElement)("div",{className:"edit-site-header-toolbar__block-toolbar"},Object(a.createElement)(fe.BlockToolbar,{hideDragHandle:!0})),Object(a.createElement)("div",{className:"edit-site-header__toolbar-switchers"},Object(a.createElement)(Ae,{showOnFront:f,activePage:b,onActivePageChange:h}),Object(a.createElement)("div",{className:"edit-site-header__toolbar-switchers-separator"},"/"),Object(a.createElement)(Be,{page:b,activeId:l,activeTemplatePartId:s,isTemplatePart:"wp_template_part"===p,onActiveIdChange:j,onActiveTemplatePartIdChange:g,onAddTemplate:v,onRemoveTemplate:y}))),Object(a.createElement)("div",{className:"edit-site-header__actions"},Object(a.createElement)(fe.__experimentalPreviewOptions,{deviceType:o,setDeviceType:O}),Object(a.createElement)(Fe,{openEntitiesSavedStates:t}),Object(a.createElement)(Oe.f.Slot,{scope:"core/edit-site"}),Object(a.createElement)(Se,null)))}var Qe=n(232),Ke=n(197),Ye=Object(m.createSlotFill)("EditSiteSidebarInspector"),Xe=Ye.Slot,Ze=Ye.Fill,$e=a.Platform.select({web:!0,native:!1}),Je=function(e){var t=e.identifier,n=e.title,r=e.icon,c=e.children;return Object(a.createElement)(a.Fragment,null,Object(a.createElement)(Oe.b,{scope:"core/edit-site",identifier:t,title:n,icon:r},c),Object(a.createElement)(Oe.c,{scope:"core/edit-site",identifier:t,icon:r},n))};function et(){return Object(a.createElement)(a.Fragment,null,Object(a.createElement)(Je,{identifier:"edit-site/block-inspector",title:Object(u.__)("Block Inspector"),icon:Qe.a,isActiveByDefault:$e},Object(a.createElement)(Xe,{bubblesVirtually:!0})),Object(a.createElement)(Je,{identifier:"edit-site/global-styles",title:Object(u.__)("Global Styles"),icon:Ke.a},Object(a.createElement)("p",null,"Global Styles area")))}var tt=n(8);function nt(e){var t=e.type,n=e.id,r=e.activePage,c=e.onActivePageChange,o=Object(_.useSelect)((function(e){return t&&n&&"URL"!==t&&e("core").getEntityRecord("postType",t,n)}),[t,n]),i=Object(_.useRegistry)(),s=Object(a.useState)(),p=Object(be.a)(s,2),b=p[0],f=p[1];Object(a.useEffect)((function(){o&&R(o.link,i.__experimentalResolveSelect("core").getEntityRecords).then((function(e){return f(e)}),(function(){return f(null)}))}),[null==o?void 0:o.link,i]);var d=Object(a.useMemo)((function(){if(!o||!b)return null;var e=Object(l.getPathAndQueryString)(o.link);return e===r.path?null:function(){return c({type:t,slug:o.slug,path:e,context:{postType:o.type,postId:o.id}})}}),[o,b,r.path,c]);return d&&Object(a.createElement)(m.Button,{icon:"welcome-write-blog",label:Object(u.__)("Edit Page Template"),onClick:d})}function rt(){var e=Object(_.useSelect)((function(e){var t=e("core/edit-site"),n=t.getSettings,r=t.getTemplateType,c=t.getPage;return{settings:n(),templateType:r(),page:c()}}),[]),t=e.settings,n=e.templateType,r=e.page,c=Object(me.useEntityBlockEditor)("postType",n),o=Object(be.a)(c,3),i=o[0],l=o[1],u=o[2],s=Object(_.useDispatch)("core/edit-site").setPage;return Object(a.createElement)(fe.BlockEditorProvider,{settings:t,value:i,onInput:l,onChange:u,useSubRegistry:!1},Object(a.createElement)(fe.BlockEditorKeyboardShortcuts,null),Object(a.createElement)(fe.__experimentalLinkControl.ViewerFill,null,Object(a.useCallback)((function(e){return Object(a.createElement)(nt,Object(tt.a)({},e,{activePage:r,onActivePageChange:s}))}),[r])),Object(a.createElement)(Ze,null,Object(a.createElement)(fe.BlockInspector,null)),Object(a.createElement)("div",{className:"editor-styles-wrapper edit-site-block-editor__editor-styles-wrapper"},Object(a.createElement)(fe.WritingFlow,null,Object(a.createElement)(fe.ObserveTyping,null,Object(a.createElement)(fe.BlockList,{className:"edit-site-block-editor__block-list"})))))}var ct=n(48);function at(){var e=Object(_.useDispatch)("core"),t=e.redo,n=e.undo;return Object(ct.useShortcut)("core/edit-site/undo",(function(e){n(),e.preventDefault()}),{bindGlobal:!0}),Object(ct.useShortcut)("core/edit-site/redo",(function(e){t(),e.preventDefault()}),{bindGlobal:!0}),null}at.Register=function(){var e=Object(_.useDispatch)("core/keyboard-shortcuts").registerShortcut;return Object(a.useEffect)((function(){e({name:"core/edit-site/undo",category:"global",description:Object(u.__)("Undo your last changes."),keyCombination:{modifier:"primary",character:"z"}}),e({name:"core/edit-site/redo",category:"global",description:Object(u.__)("Redo your last undo."),keyCombination:{modifier:"primaryShift",character:"z"}})}),[e]),null};var ot=at;function it(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?it(Object(n),!0).forEach((function(t){Object(E.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):it(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var ut={leftSidebar:Object(u.__)("Block Library")};var st=function(){var e=Object(a.useState)(!1),t=Object(be.a)(e,2),n=t[0],r=t[1],c=Object(de.useViewportMatch)("medium","<"),o=Object(_.useSelect)((function(e){var t=e("core/edit-site"),n=t.isFeatureActive,r=t.__experimentalGetPreviewDeviceType,c=t.getSettings,a=t.getTemplateId,o=t.getTemplatePartId,i=t.getTemplateType,l=t.getPage,u=a(),s=o(),p=i();return{isFullscreenActive:n("fullscreenMode"),deviceType:r(),sidebarIsOpened:!!e("core/interface").getActiveComplementaryArea("core/edit-site"),settings:c(),templateId:u,templatePartId:s,templateType:p,page:l(),template:e("core").getEntityRecord("postType",p,"wp_template"===p?u:s),select:e}}),[]),i=o.isFullscreenActive,l=o.deviceType,s=o.sidebarIsOpened,p=o.settings,b=o.templateId,d=o.templatePartId,O=o.templateType,j=o.page,v=o.template,y=o.select,g=Object(_.useDispatch)("core").editEntityRecord,h=Object(_.useDispatch)("core/edit-site").setPage,E=Object(fe.__experimentalUseResizeCanvas)(l),w=Object(a.useState)(!1),P=Object(be.a)(w,2),S=P[0],T=P[1],x=Object(a.useCallback)((function(){return T(!0)}),[]),I=Object(a.useCallback)((function(e){if(e){var t=y("core").getEditedEntityRecord;e.forEach((function(e){var n=e.kind,r=e.name,c=e.key,a=t(n,r,c);g(n,r,c,{status:"publish",title:a.slug})}))}T(!1)}),[y]),k=Object(a.useMemo)((function(){return lt({},j.context,{query:j.context.query||{categoryIds:[]},queryContext:[j.context.queryContext||{page:1},function(e){return h(lt({},j,{context:lt({},j.context,{queryContext:lt({},j.context.queryContext,{},e)})}))}]})}),[j.context]);return Object(a.createElement)(a.Fragment,null,Object(a.createElement)(fe.__unstableEditorStyles,{styles:p.styles}),Object(a.createElement)(Oe.d,{isActive:i}),Object(a.createElement)(m.SlotFillProvider,null,Object(a.createElement)(m.DropZoneProvider,null,Object(a.createElement)(me.EntityProvider,{kind:"root",type:"site"},Object(a.createElement)(me.EntityProvider,{kind:"postType",type:O,id:"wp_template"===O?b:d},Object(a.createElement)(fe.BlockContextProvider,{value:k},Object(a.createElement)(m.FocusReturnProvider,null,Object(a.createElement)(ot.Register,null),Object(a.createElement)(et,null),Object(a.createElement)(Oe.e,{labels:ut,leftSidebar:n&&Object(a.createElement)("div",{className:"edit-site-editor__inserter-panel"},Object(a.createElement)("div",{className:"edit-site-editor__inserter-panel-header"},Object(a.createElement)(m.Button,{icon:ve.a,onClick:function(){return r(!1)}})),Object(a.createElement)("div",{className:"edit-site-editor__inserter-panel-content"},Object(a.createElement)(fe.__experimentalLibrary,{showInserterHelpPanel:!0,onSelect:function(){c&&r(!1)}}))),sidebar:s&&Object(a.createElement)(Oe.b.Slot,{scope:"core/edit-site"}),header:Object(a.createElement)(We,{openEntitiesSavedStates:x,isInserterOpen:n,onToggleInserter:function(){return r(!n)}}),content:Object(a.createElement)(fe.BlockSelectionClearer,{className:"edit-site-visual-editor",style:E},Object(a.createElement)(ye,null),Object(a.createElement)(m.Popover.Slot,{name:"block-toolbar"}),v&&Object(a.createElement)(rt,null),Object(a.createElement)(ot,null)),actions:Object(a.createElement)(a.Fragment,null,Object(a.createElement)(je.EntitiesSavedStates,{isOpen:S,close:I}),!S&&Object(a.createElement)("div",{className:"edit-site-editor__toggle-save-panel"},Object(a.createElement)(m.Button,{isSecondary:!0,className:"edit-site-editor__toggle-save-panel-button",onClick:x,"aria-expanded":!1},Object(u.__)("Open save panel")))),footer:Object(a.createElement)(fe.BlockBreadcrumb,null)}),Object(a.createElement)(m.Popover.Slot,null),Object(a.createElement)(f.PluginArea,null))))))))},pt=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.perPage,r=void 0===n?20:n;return i()({path:Object(l.addQueryArgs)("/wp/v2/search",{per_page:r,search:e,type:"post",subtype:"post"})}).then((function(e){return Promise.all(e.map((function(e){return i()({url:e._links.self[0].href})})))})).then((function(e){return e.map((function(e){return{url:e.link,type:e.type,id:e.id,slug:e.slug,title:e.title.rendered||Object(u.__)("(no title)")}}))}))};function bt(e,t){t.__experimentalFetchLinkSuggestions=pt;var n=t.editSiteInitialState;delete t.editSiteInitialState,n.settings=t,function(e){var t=Object(_.registerStore)("core/edit-site",{reducer:k,actions:r,selectors:c,controls:pe({},w.controls,{},N),persist:["preferences"],initialState:e});t.dispatch(Q(e.page))}(n),Object(s.registerCoreBlocks)(),Object(s.__experimentalRegisterExperimentalCoreBlocks)(t),Object(a.render)(Object(a.createElement)(st,null),document.getElementById(e))}},4:function(e,t){!function(){e.exports=this.wp.data}()},40: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}))},41:function(e,t,n){"use strict";function r(e,t){if(null==e)return{};var n,r,c={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||(c[n]=e[n]);return c}n.d(t,"a",(function(){return r}))},43:function(e,t,n){"use strict";function r(e,t,n,r,c,a,o){try{var i=e[a](o),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,a){var o=e.apply(t,n);function i(e){r(o,c,a,i,l,"next",e)}function l(e){r(o,c,a,i,l,"throw",e)}i(void 0)}))}}n.d(t,"a",(function(){return c}))},44:function(e,t,n){"use strict";var r,c;function a(e){return[e]}function o(){var e={clear:function(){e.head=null}};return e}function i(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={},c="undefined"!=typeof WeakMap,t.a=function(e,t){var n,l;function u(){n=c?new WeakMap:o()}function s(){var n,r,c,a,o,u=arguments.length;for(a=new Array(u),c=0;c<u;c++)a[c]=arguments[c];for(o=t.apply(null,a),(n=l(o)).isUniqueByDependants||(n.lastDependants&&!i(o,n.lastDependants,0)&&n.clear(),n.lastDependants=o),r=n.head;r;){if(i(r.args,a,1))return r!==n.head&&(r.prev.next=r.next,r.next&&(r.next.prev=r.prev),r.next=n.head,r.prev=null,n.head.prev=r,n.head=r),r.val;r=r.next}return r={val:e.apply(null,a)},a[0]=null,r.args=a,n.head&&(n.head.prev=r,r.next=n.head),n.head=r,r.val}return t||(t=a),l=c?function(e){var t,c,a,i,l,u=n,s=!0;for(t=0;t<e.length;t++){if(c=e[t],!(l=c)||"object"!=typeof l){s=!1;break}u.has(c)?u=u.get(c):(a=new WeakMap,u.set(c,a),u=a)}return u.has(r)||((i=o()).isUniqueByDependants=s,u.set(r,i)),u.get(r)}:function(){return n},s.getDependants=t,s.clear=u,u(),s}},47:function(e,t){!function(){e.exports=this.wp.coreData}()},48:function(e,t){!function(){e.exports=this.wp.keyboardShortcuts}()},49:function(e,t,n){"use strict";n.d(t,"b",(function(){return B})),n.d(t,"c",(function(){return q})),n.d(t,"d",(function(){return $})),n.d(t,"e",(function(){return ee})),n.d(t,"f",(function(){return R})),n.d(t,"g",(function(){return oe})),n.d(t,"a",(function(){return H}));var r={};n.r(r),n.d(r,"enableComplementaryArea",(function(){return m})),n.d(r,"disableComplementaryArea",(function(){return f})),n.d(r,"pinItem",(function(){return O})),n.d(r,"unpinItem",(function(){return j}));var c={};n.r(c),n.d(c,"getActiveComplementaryArea",(function(){return v})),n.d(c,"isItemPinned",(function(){return y}));var a=n(4),o=n(5),i=n(2);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 u(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){Object(o.a)(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 s=Object(a.combineReducers)({singleEnableItems: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.itemType,c=t.scope,a=t.item;return"SET_SINGLE_ENABLE_ITEM"===n&&r&&c?u({},e,Object(o.a)({},r,u({},e[r],Object(o.a)({},c,a||null)))):e},multipleEnableItems: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.itemType,c=t.scope,a=t.item,l=t.isEnable;if("SET_MULTIPLE_ENABLE_ITEM"!==n||!r||!c||!a||Object(i.get)(e,[r,c,a])===l)return e;var s=e[r]||{},p=s[c]||{};return u({},e,Object(o.a)({},r,u({},s,Object(o.a)({},c,u({},p,Object(o.a)({},a,l||!1))))))}}),p=Object(a.combineReducers)({enableItems:s});function b(e,t,n){return{type:"SET_SINGLE_ENABLE_ITEM",itemType:e,scope:t,item:n}}function m(e,t){return b("complementaryArea",e,t)}function f(e){return b("complementaryArea",e,void 0)}function d(e,t,n,r){return{type:"SET_MULTIPLE_ENABLE_ITEM",itemType:e,scope:t,item:n,isEnable:r}}function O(e,t){return d("pinnedItems",e,t,!0)}function j(e,t){return d("pinnedItems",e,t,!1)}function v(e,t){return function(e,t,n){return Object(i.get)(e.enableItems.singleEnableItems,[t,n])}(e,"complementaryArea",t)}function y(e,t,n){return!1!==function(e,t,n,r){return Object(i.get)(e.enableItems.multipleEnableItems,[t,n,r])}(e,"pinnedItems",t,n)}Object(a.registerStore)("core/interface",{reducer:p,actions:r,selectors:c,persist:["enableItems"]});var g=n(8),h=n(14),E=n(0),_=n(10),w=n.n(_),P=n(3),S=n(1),T=n(166),x=n(167),I=n(132),k=n(51),A=Object(k.withPluginContext)((function(e,t){return{icon:t.icon||e.icon,identifier:t.identifier||"".concat(e.name,"/").concat(t.name)}}));var M=A((function(e){var t=e.as,n=void 0===t?P.Button:t,r=e.scope,c=e.identifier,o=e.icon,l=e.selectedIcon,u=Object(h.a)(e,["as","scope","identifier","icon","selectedIcon"]),s=n,p=Object(a.useSelect)((function(e){return e("core/interface").getActiveComplementaryArea(r)===c}),[c]),b=Object(a.useDispatch)("core/interface"),m=b.enableComplementaryArea,f=b.disableComplementaryArea;return Object(E.createElement)(s,Object(g.a)({icon:l&&p?l:o,onClick:function(){p?f(r):m(r,c)}},Object(i.omit)(u,["name"])))})),D=function(e){var t=e.smallScreenTitle,n=e.children,r=e.className,c=e.toggleButtonProps,a=Object(E.createElement)(M,Object(g.a)({icon:I.a},c));return Object(E.createElement)(E.Fragment,null,Object(E.createElement)("div",{className:"components-panel__header interface-complementary-area-header__small"},t&&Object(E.createElement)("span",{className:"interface-complementary-area-header__small-title"},t),a),Object(E.createElement)("div",{className:w()("components-panel__header","interface-complementary-area-header",r),tabIndex:-1},n,a))};function C(e){var t=e.scope,n=Object(h.a)(e,["scope"]);return Object(E.createElement)(P.Fill,Object(g.a)({name:"PinnedItems/".concat(t)},n))}C.Slot=function(e){var t=e.scope,n=e.className,r=Object(h.a)(e,["scope","className"]);return Object(E.createElement)(P.Slot,Object(g.a)({name:"PinnedItems/".concat(t)},r),(function(e){return!Object(i.isEmpty)(e)&&Object(E.createElement)("div",{className:w()(n,"interface-pinned-items")},e)}))};var R=C;function L(e){var t=e.scope,n=e.children,r=e.className;return Object(E.createElement)(P.Fill,{name:"ComplementaryArea/".concat(t)},Object(E.createElement)(P.Animate,{type:"slide-in",options:{origin:"left"}},(function(){return Object(E.createElement)("div",{className:r},n)})))}var N=A((function(e){var t=e.children,n=e.className,r=e.closeLabel,c=void 0===r?Object(S.__)("Close plugin"):r,o=e.identifier,i=e.header,l=e.headerClassName,u=e.icon,s=e.isPinnable,p=void 0===s||s,b=e.panelClassName,m=e.scope,f=e.smallScreenTitle,d=e.title,O=e.toggleShortcut,j=e.isActiveByDefault,v=Object(a.useSelect)((function(e){var t=e("core/interface"),n=t.getActiveComplementaryArea,r=t.isItemPinned,c=n(m);return{isActive:c===o,isPinned:r(m,o),activeArea:c,isSmall:e("core/viewport").isViewportMatch("< medium")}}),[o,m]),y=v.isActive,g=v.isPinned,h=v.activeArea,_=v.isSmall;!function(e,t,n,r,c){var o=Object(E.useRef)(!1),i=Object(E.useRef)(!1),l=Object(a.useDispatch)("core/interface"),u=l.enableComplementaryArea,s=l.disableComplementaryArea;Object(E.useEffect)((function(){r&&c&&!o.current?(s(e),i.current=!0):i.current&&!c&&o.current?(i.current=!1,u(e,t)):i.current&&n&&n!==t&&(i.current=!1),c!==o.current&&(o.current=c)}),[r,c,e,t,n])}(m,o,h,y,_);var I=Object(a.useDispatch)("core/interface"),k=I.enableComplementaryArea,A=I.disableComplementaryArea,C=I.pinItem,N=I.unpinItem;return Object(E.useEffect)((function(){j&&void 0===h&&!_&&k(m,o)}),[h,j,m,o,_]),Object(E.createElement)(E.Fragment,null,g&&p&&Object(E.createElement)(R,{scope:m},Object(E.createElement)(M,{scope:m,identifier:o,isPressed:y,"aria-expanded":y,label:d,icon:u})),y&&Object(E.createElement)(L,{className:w()("interface-complementary-area",n),scope:m},Object(E.createElement)(D,{className:l,closeLabel:c,onClose:function(){return A(m)},smallScreenTitle:f,toggleButtonProps:{label:c,shortcut:O,scope:m,identifier:o}},i||Object(E.createElement)(E.Fragment,null,Object(E.createElement)("strong",null,d),p&&Object(E.createElement)(P.Button,{className:"interface-complementary-area__pin-unpin-item",icon:g?T.a:x.a,label:g?Object(S.__)("Unpin from toolbar"):Object(S.__)("Pin to toolbar"),onClick:function(){return(g?N:C)(m,o)},isPressed:g,"aria-expanded":g}))),Object(E.createElement)(P.Panel,{className:b},t)))}));N.Slot=function(e){var t=e.scope,n=Object(h.a)(e,["scope"]);return Object(E.createElement)(P.Slot,Object(g.a)({name:"ComplementaryArea/".concat(t)},n))};var B=N,F=n(121),G=n(12);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 V(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){Object(o.a)(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}function U(e){var t=e.name,n=e.as,r=e.onClick,c=Object(h.a)(e,["name","as","onClick"]);return Object(E.createElement)(P.Fill,{name:t},(function(e){var t=e.onClick,a=e.as,o=n||a||P.Button;return Object(E.createElement)(o,Object(g.a)({onClick:r||t?function(){(r||i.noop).apply(void 0,arguments),(t||i.noop).apply(void 0,arguments)}:void 0},c))}))}U.Slot=function(e){var t=e.name,n=e.as,r=void 0===n?[P.ButtonGroup,P.Button]:n,c=e.fillProps,a=void 0===c?{}:c,o=e.bubblesVirtually,l=Object(h.a)(e,["name","as","fillProps","bubblesVirtually"]),u=Object(G.a)(r,2),s=u[0],p=u[1];return Object(E.createElement)(P.Slot,{name:t,bubblesVirtually:o,fillProps:V({as:p},a)},(function(e){return!Object(i.isEmpty)(e)&&Object(E.createElement)(s,l,e)}))};var H=U;function q(e){var t=e.scope,n=e.target,r=Object(h.a)(e,["scope","target"]);return Object(E.createElement)(M,Object(g.a)({as:function(e){return Object(E.createElement)(H,Object(g.a)({name:"".concat(t,"/plugin-more-menu")},e))},role:"menuitemcheckbox",selectedIcon:F.a,name:n,scope:t},r))}var W=n(19),Q=n(18),K=n(23),Y=n(15),X=n(21);function Z(){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}}var $=function(e){Object(X.a)(r,e);var t,n=(t=r,function(){var e,n=Object(Y.a)(t);if(Z()){var r=Object(Y.a)(this).constructor;e=Reflect.construct(n,arguments,r)}else e=n.apply(this,arguments);return Object(K.a)(this,e)});function r(){return Object(W.a)(this,r),n.apply(this,arguments)}return Object(Q.a)(r,[{key:"componentDidMount",value:function(){this.isSticky=!1,this.sync(),document.body.classList.contains("sticky-menu")&&(this.isSticky=!0,document.body.classList.remove("sticky-menu"))}},{key:"componentWillUnmount",value:function(){this.isSticky&&document.body.classList.add("sticky-menu")}},{key:"componentDidUpdate",value:function(e){this.props.isActive!==e.isActive&&this.sync()}},{key:"sync",value:function(){this.props.isActive?document.body.classList.add("is-fullscreen-mode"):document.body.classList.remove("is-fullscreen-mode")}},{key:"render",value:function(){return null}}]),r}(E.Component);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}var ee=Object(P.navigateRegions)((function(e){var t=e.footer,n=e.header,r=e.sidebar,c=e.leftSidebar,a=e.content,i=e.actions,l=e.labels,u=e.className;!function(e){Object(E.useEffect)((function(){var t=document&&document.querySelector("html:not(.".concat(e,")"));if(t)return t.classList.toggle(e),function(){t.classList.toggle(e)}}),[e])}("interface-interface-skeleton__html-container");var s=function(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(o.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}({},{
3
  /* translators: accessibility text for the top bar landmark region. */
4
  header:Object(S.__)("Header"),
5
  /* translators: accessibility text for the content landmark region. */
1
+ this.wp=this.wp||{},this.wp.editSite=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=383)}({0:function(e,t){!function(){e.exports=this.wp.element}()},1:function(e,t){!function(){e.exports=this.wp.i18n}()},10:function(e,t,n){var r;!function(){"use strict";var n={}.hasOwnProperty;function c(){for(var e=[],t=0;t<arguments.length;t++){var r=arguments[t];if(r){var a=typeof r;if("string"===a||"number"===a)e.push(r);else if(Array.isArray(r))e.push(c.apply(null,r));else if("object"===a)for(var o in r)n.call(r,o)&&r[o]&&e.push(o)}}return e.join(" ")}e.exports?e.exports=c:void 0===(r=function(){return c}.apply(t,[]))||(e.exports=r)}()},11:function(e,t){!function(){e.exports=this.wp.blocks}()},12:function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(36);var c=n(29),a=n(37);function o(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,a=void 0;try{for(var o,i=e[Symbol.iterator]();!(r=(o=i.next()).done)&&(n.push(o.value),!t||n.length!==t);r=!0);}catch(e){c=!0,a=e}finally{try{r||null==i.return||i.return()}finally{if(c)throw a}}return n}}(e,t)||Object(c.a)(e,t)||Object(a.a)()}},120:function(e,t,n){"use strict";var r=n(5),c=n(14),a=n(0);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}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(a.cloneElement)(t,function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?o(Object(n),!0).forEach((function(t){Object(r.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):o(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({width:i,height:i},l))}},121:function(e,t,n){"use strict";var r=n(0),c=n(7),a=Object(r.createElement)(c.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(r.createElement)(c.Path,{d:"M9 18.6L3.5 13l1-1L9 16.4l9.5-9.9 1 1z"}));t.a=a},13: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}))},132:function(e,t,n){"use strict";var r=n(0),c=n(7),a=Object(r.createElement)(c.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(r.createElement)(c.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=a},133:function(e,t,n){"use strict";var r=n(0),c=n(7),a=Object(r.createElement)(c.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(r.createElement)(c.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=a},14:function(e,t,n){"use strict";n.d(t,"a",(function(){return c}));var r=n(41);function c(e,t){if(null==e)return{};var n,c,a=Object(r.a)(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(c=0;c<o.length;c++)n=o[c],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}},15: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}))},16:function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(27);var c=n(35),a=n(29);function o(e){return function(e){if(Array.isArray(e))return Object(r.a)(e)}(e)||Object(c.a)(e)||Object(a.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.")}()}},166:function(e,t,n){"use strict";var r=n(0),c=n(7),a=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=a},167:function(e,t,n){"use strict";var r=n(0),c=n(7),a=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=a},18: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 c(e,t,n){return t&&r(e.prototype,t),n&&r(e,n),e}n.d(t,"a",(function(){return c}))},19: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}))},193:function(e,t,n){"use strict";var r=n(0),c=n(7),a=Object(r.createElement)(c.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(r.createElement)(c.Path,{d:"M18 11.2h-5.2V6h-1.6v5.2H6v1.6h5.2V18h1.6v-5.2H18z"}));t.a=a},194:function(e,t,n){"use strict";var r=n(0),c=n(7),a=Object(r.createElement)(c.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(r.createElement)(c.Path,{d:"M13 19h-2v-2h2v2zm0-6h-2v-2h2v2zm0-6h-2V5h2v2z"}));t.a=a},197:function(e,t,n){"use strict";var r=n(0),c=n(7),a=Object(r.createElement)(c.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"-2 -2 24 24"},Object(r.createElement)(c.Path,{d:"M13.89 3.39l2.71 2.72c.46.46.42 1.24.03 1.64l-8.01 8.02-5.56 1.16 1.16-5.58s7.6-7.63 7.99-8.03c.39-.39 1.22-.39 1.68.07zm-2.73 2.79l-5.59 5.61 1.11 1.11 5.54-5.65zm-2.97 8.23l5.58-5.6-1.07-1.08-5.59 5.6zM13.89 3.39l2.71 2.72c.46.46.42 1.24.03 1.64l-8.01 8.02-5.56 1.16 1.16-5.58s7.6-7.63 7.99-8.03c.39-.39 1.22-.39 1.68.07zm-2.73 2.79l-5.59 5.61 1.11 1.11 5.54-5.65zm-2.97 8.23l5.58-5.6-1.07-1.08-5.59 5.6z"}));t.a=a},2:function(e,t){!function(){e.exports=this.lodash}()},20:function(e,t){!function(){e.exports=this.wp.keycodes}()},21: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 c(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 c}))},22:function(e,t){!function(){e.exports=this.regeneratorRuntime}()},23:function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var r=n(40),c=n(13);function a(e,t){return!t||"object"!==Object(r.a)(t)&&"function"!=typeof t?Object(c.a)(e):t}},232:function(e,t,n){"use strict";var r=n(0),c=n(7),a=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:"M10.289 4.836A1 1 0 0111.275 4h1.306a1 1 0 01.987.836l.244 1.466c.787.26 1.503.679 2.108 1.218l1.393-.522a1 1 0 011.216.437l.653 1.13a1 1 0 01-.23 1.273l-1.148.944a6.025 6.025 0 010 2.435l1.149.946a1 1 0 01.23 1.272l-.653 1.13a1 1 0 01-1.216.437l-1.394-.522c-.605.54-1.32.958-2.108 1.218l-.244 1.466a1 1 0 01-.987.836h-1.306a1 1 0 01-.986-.836l-.244-1.466a5.995 5.995 0 01-2.108-1.218l-1.394.522a1 1 0 01-1.217-.436l-.653-1.131a1 1 0 01.23-1.272l1.149-.946a6.026 6.026 0 010-2.435l-1.148-.944a1 1 0 01-.23-1.272l.653-1.131a1 1 0 011.217-.437l1.393.522a5.994 5.994 0 012.108-1.218l.244-1.466zM14.929 12a3 3 0 11-6 0 3 3 0 016 0z",clipRule:"evenodd"}));t.a=a},233:function(e,t,n){"use strict";var r=n(0),c=n(7),a=Object(r.createElement)(c.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(r.createElement)(c.Path,{d:"M18.3 11.7c-.6-.6-1.4-.9-2.3-.9H6.7l2.9-3.3-1.1-1-4.5 5L8.5 16l1-1-2.7-2.7H16c.5 0 .9.2 1.3.5 1 1 1 3.4 1 4.5v.3h1.5v-.2c0-1.5 0-4.3-1.5-5.7z"}));t.a=a},234:function(e,t,n){"use strict";var r=n(0),c=n(7),a=Object(r.createElement)(c.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(r.createElement)(c.Path,{d:"M15.6 6.5l-1.1 1 2.9 3.3H8c-.9 0-1.7.3-2.3.9-1.4 1.5-1.4 4.2-1.4 5.6v.2h1.5v-.3c0-1.1 0-3.5 1-4.5.3-.3.7-.5 1.3-.5h9.2L14.5 15l1.1 1.1 4.6-4.6-4.6-5z"}));t.a=a},255:function(e,t,n){var r,c,a;c=[],void 0===(a="function"==typeof(r=function(){return function e(t,n,r){var c,a,o=window,i="application/octet-stream",l=r||i,u=t,s=!n&&!r&&u,p=document.createElement("a"),b=function(e){return String(e)},m=o.Blob||o.MozBlob||o.WebKitBlob||b,f=n||"download";if(m=m.call?m.bind(o):Blob,"true"===String(this)&&(l=(u=[u,l])[0],u=u[1]),s&&s.length<2048&&(f=s.split("/").pop().split("?")[0],p.href=s,-1!==p.href.indexOf(s))){var d=new XMLHttpRequest;return d.open("GET",s,!0),d.responseType="blob",d.onload=function(t){e(t.target.response,f,i)},setTimeout((function(){d.send()}),0),d}if(/^data:([\w+-]+\/[\w+.-]+)?[,;]/.test(u)){if(!(u.length>2096103.424&&m!==b))return navigator.msSaveBlob?navigator.msSaveBlob(y(u),f):g(u);l=(u=y(u)).type||i}else if(/([\x80-\xff])/.test(u)){for(var O=0,j=new Uint8Array(u.length),v=j.length;O<v;++O)j[O]=u.charCodeAt(O);u=new m([j],{type:l})}function y(e){for(var t=e.split(/[:;,]/),n=t[1],r=("base64"==t[2]?atob:decodeURIComponent)(t.pop()),c=r.length,a=0,o=new Uint8Array(c);a<c;++a)o[a]=r.charCodeAt(a);return new m([o],{type:n})}function g(e,t){if("download"in p)return p.href=e,p.setAttribute("download",f),p.className="download-js-link",p.innerHTML="downloading...",p.style.display="none",document.body.appendChild(p),setTimeout((function(){p.click(),document.body.removeChild(p),!0===t&&setTimeout((function(){o.URL.revokeObjectURL(p.href)}),250)}),66),!0;if(/(Version)\/(\d+)\.(\d+)(?:\.(\d+))?.*Safari\//.test(navigator.userAgent))return/^data:/.test(e)&&(e="data:"+e.replace(/^data:([\w\/\-\+]+)/,i)),window.open(e)||confirm("Displaying New Document\n\nUse Save As... to download, then click back to return to this page.")&&(location.href=e),!0;var n=document.createElement("iframe");document.body.appendChild(n),!t&&/^data:/.test(e)&&(e="data:"+e.replace(/^data:([\w\/\-\+]+)/,i)),n.src=e,setTimeout((function(){document.body.removeChild(n)}),333)}if(c=u instanceof m?u:new m([u],{type:l}),navigator.msSaveBlob)return navigator.msSaveBlob(c,f);if(o.URL)g(o.URL.createObjectURL(c),!0);else{if("string"==typeof c||c.constructor===b)try{return g("data:"+l+";base64,"+o.btoa(c))}catch(e){return g("data:"+l+","+encodeURIComponent(c))}(a=new FileReader).onload=function(e){g(this.result)},a.readAsDataURL(c)}return!0}})?r.apply(t,c):r)||(e.exports=a)},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}))},28:function(e,t){!function(){e.exports=this.wp.url}()},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(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Object(r.a)(e,t):void 0}}},3:function(e,t){!function(){e.exports=this.wp.components}()},32:function(e,t){!function(){e.exports=this.wp.hooks}()},33:function(e,t){!function(){e.exports=this.wp.editor}()},34:function(e,t){!function(){e.exports=this.wp.dataControls}()},35: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}))},36:function(e,t,n){"use strict";function r(e){if(Array.isArray(e))return e}n.d(t,"a",(function(){return r}))},360:function(e,t,n){"use strict";var r=n(0),c=n(7),a=Object(r.createElement)(c.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"-2 -2 24 24"},Object(r.createElement)(c.Path,{d:"M20 10c0-5.51-4.49-10-10-10C4.48 0 0 4.49 0 10c0 5.52 4.48 10 10 10 5.51 0 10-4.48 10-10zM7.78 15.37L4.37 6.22c.55-.02 1.17-.08 1.17-.08.5-.06.44-1.13-.06-1.11 0 0-1.45.11-2.37.11-.18 0-.37 0-.58-.01C4.12 2.69 6.87 1.11 10 1.11c2.33 0 4.45.87 6.05 2.34-.68-.11-1.65.39-1.65 1.58 0 .74.45 1.36.9 2.1.35.61.55 1.36.55 2.46 0 1.49-1.4 5-1.4 5l-3.03-8.37c.54-.02.82-.17.82-.17.5-.05.44-1.25-.06-1.22 0 0-1.44.12-2.38.12-.87 0-2.33-.12-2.33-.12-.5-.03-.56 1.2-.06 1.22l.92.08 1.26 3.41zM17.41 10c.24-.64.74-1.87.43-4.25.7 1.29 1.05 2.71 1.05 4.25 0 3.29-1.73 6.24-4.4 7.78.97-2.59 1.94-5.2 2.92-7.78zM6.1 18.09C3.12 16.65 1.11 13.53 1.11 10c0-1.3.23-2.48.72-3.59C3.25 10.3 4.67 14.2 6.1 18.09zm4.03-6.63l2.58 6.98c-.86.29-1.76.45-2.71.45-.79 0-1.57-.11-2.29-.33.81-2.38 1.62-4.74 2.42-7.1z"}));t.a=a},37: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}))},38:function(e,t){!function(){e.exports=this.wp.apiFetch}()},383:function(e,t,n){"use strict";n.r(t),n.d(t,"initialize",(function(){return st})),n.d(t,"__experimentalFullscreenModeClose",(function(){return Ve}));var r={};n.r(r),n.d(r,"toggleFeature",(function(){return G})),n.d(r,"__experimentalSetPreviewDeviceType",(function(){return z})),n.d(r,"setTemplate",(function(){return U})),n.d(r,"addTemplate",(function(){return V})),n.d(r,"removeTemplate",(function(){return H})),n.d(r,"setTemplatePart",(function(){return q})),n.d(r,"setPage",(function(){return W}));var c={};n.r(c),n.d(c,"isFeatureActive",(function(){return Z})),n.d(c,"__experimentalGetPreviewDeviceType",(function(){return $})),n.d(c,"getCanUserCreateMedia",(function(){return J})),n.d(c,"getSettings",(function(){return ee})),n.d(c,"getHomeTemplateId",(function(){return te})),n.d(c,"getTemplateId",(function(){return ne})),n.d(c,"getTemplatePartId",(function(){return re})),n.d(c,"getTemplateType",(function(){return ce})),n.d(c,"getPage",(function(){return ae})),n.d(c,"getShowOnFront",(function(){return oe}));var a=n(0),o=n(38),i=n.n(o),l=n(28),u=n(1),s=(n(69),n(66)),p=n(255),b=n.n(p),m=n(3),f=n(51),d=n(2),O=Object(m.createSlotFill)("ToolsMoreMenuGroup"),j=O.Fill,v=O.Slot;j.Slot=function(e){var t=e.fillProps;return Object(a.createElement)(v,{fillProps:t},(function(e){return!Object(d.isEmpty)(e)&&Object(a.createElement)(m.MenuGroup,{label:Object(u.__)("Tools")},e)}))};var y=j;Object(f.registerPlugin)("edit-site",{render:function(){return Object(a.createElement)(a.Fragment,null,Object(a.createElement)(y,null,Object(a.createElement)(m.MenuItem,{role:"menuitem",icon:"download",onClick:function(){return i()({path:"/__experimental/edit-site/v1/export",parse:!1}).then((function(e){return e.blob()})).then((function(e){return b()(e,"edit-site-export.zip","application/zip")}))},info:Object(u.__)("Download your templates and template parts.")},Object(u.__)("Export")),Object(a.createElement)(m.MenuItem,{role:"menuitem",href:Object(l.addQueryArgs)("edit.php",{post_type:"wp_block"})},Object(u.__)("Manage all reusable blocks")),Object(a.createElement)(m.MenuItem,{role:"menuitem",href:Object(u.__)("https://wordpress.org/support/article/wordpress-editor/"),target:"_blank",rel:"noopener noreferrer"},Object(u.__)("Help"))))}});var g=n(32),h=n(73);Object(g.addFilter)("editor.MediaUpload","core/edit-site/components/media-upload",(function(){return h.MediaUpload}));var E=n(5),_=n(4),w=n(34);function P(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?P(Object(n),!0).forEach((function(t){Object(E.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):P(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var T,x=Object(d.flow)([_.combineReducers,(T={features:{fullscreenMode:!0}},function(e){return function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:T,n=arguments.length>1?arguments[1]:void 0;return e(t,n)}})])({features:function(e,t){return"TOGGLE_FEATURE"===t.type?S({},e,Object(E.a)({},t.feature,!e[t.feature])):e}});var k=Object(_.combineReducers)({preferences:x,deviceType:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"Desktop",t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"SET_PREVIEW_DEVICE_TYPE":return t.deviceType}return e},settings:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"UPDATE_SETTINGS":return S({},e,{},t.settings)}return e},homeTemplateId:function(e){return e},templateId:function(e,t){switch(t.type){case"SET_TEMPLATE":case"SET_PAGE":return t.templateId}return e},templatePartId:function(e,t){switch(t.type){case"SET_TEMPLATE_PART":return t.templatePartId}return e},templateType:function(e,t){switch(t.type){case"SET_TEMPLATE":case"SET_PAGE":return"wp_template";case"SET_TEMPLATE_PART":return"wp_template_part"}return e},page: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_PAGE":return t.page}return e},showOnFront:function(e){return e}}),I=n(22),A=n.n(I),M=n(43),C=window.fetch;function D(e,t){return N.apply(this,arguments)}function N(){return(N=Object(M.a)(A.a.mark((function e(t,n){var r,c,a;return A.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,C(Object(l.addQueryArgs)(t,{"_wp-find-template":!0})).then((function(e){return e.json()}));case 2:if(r=e.sent,c=r.data,null!==(a=c.ID)){e.next=9;break}return e.next=8,n("postType","wp_template",{resolved:!0,slug:c.post_name});case 8:a=e.sent[0].id;case 9:return e.abrupt("return",a);case 10:case"end":return e.stop()}}),e)})))).apply(this,arguments)}var R={FIND_TEMPLATE:Object(_.createRegistryControl)((function(e){return function(t){return D(t.path,e.__experimentalResolveSelect("core").getEntityRecords)}}))},B=A.a.mark(V),F=A.a.mark(H),L=A.a.mark(W);function G(e){return{type:"TOGGLE_FEATURE",feature:e}}function z(e){return{type:"SET_PREVIEW_DEVICE_TYPE",deviceType:e}}function U(e){return{type:"SET_TEMPLATE",templateId:e}}function V(e){var t;return A.a.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,Object(w.dispatch)("core","saveEntityRecord","postType","wp_template",e);case 2:return t=n.sent,n.abrupt("return",{type:"SET_TEMPLATE",templateId:t.id});case 4:case"end":return n.stop()}}),B)}function H(e){return A.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,Object(w.apiFetch)({path:"/wp/v2/templates/".concat(e),method:"DELETE"});case 2:return t.t0=w.dispatch,t.next=5,Object(w.select)("core/edit-site","getPage");case 5:return t.t1=t.sent,t.abrupt("return",(0,t.t0)("core/edit-site","setPage",t.t1));case 7:case"end":return t.stop()}}),F)}function q(e){return{type:"SET_TEMPLATE_PART",templatePartId:e}}function W(e){var t;return A.a.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,{type:"FIND_TEMPLATE",path:e.path};case 2:return t=n.sent,n.abrupt("return",{type:"SET_PAGE",page:e,templateId:t});case 4:case"end":return n.stop()}}),L)}var Q=n(14),K=n(44);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(E.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}function Z(e,t){return Object(d.get)(e.preferences.features,[t],!1)}function $(e){return e.deviceType}var J=Object(_.createRegistrySelector)((function(e){return function(){return e("core").canUser("create","media")}})),ee=Object(K.a)((function(e){return J(e)?X({},e.settings,{focusMode:Z(e,"focusMode"),hasFixedToolbar:Z(e,"fixedToolbar"),mediaUpload:function(t){var n=t.onError,r=Object(Q.a)(t,["onError"]);Object(h.uploadMedia)(X({wpAllowedMimeTypes:e.settings.allowedMimeTypes,onError:function(e){var t=e.message;return n(t)}},r))}}):e.settings}),(function(e){return[J(e),e.settings,Z(e,"focusMode"),Z(e,"fixedToolbar")]}));function te(e){return e.homeTemplateId}function ne(e){return e.templateId}function re(e){return e.templatePartId}function ce(e){return e.templateType}function ae(e){return e.page}function oe(e){return e.showOnFront}function ie(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 le(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ie(Object(n),!0).forEach((function(t){Object(E.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ie(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var ue=n(12),se=n(47),pe=n(6),be=n(9),me=n(49),fe=n(33),de=n(133);function Oe(){var e=Object(_.useSelect)((function(e){return e("core/notices").getNotices().filter((function(e){return"snackbar"===e.type}))}),[]),t=Object(_.useDispatch)("core/notices").removeNotice;return Object(a.createElement)(m.SnackbarList,{className:"edit-site-notices",notices:e,onRemove:t})}var je=n(193),ve=n(194),ye=n(121);var ge=Object(m.withSpokenMessages)((function(e){var t=e.feature,n=e.label,r=e.info,c=e.messageActivated,o=e.messageDeactivated,i=e.speak,l=Object(_.useSelect)((function(e){return e("core/edit-site").isFeatureActive(t)}),[]),s=Object(_.useDispatch)("core/edit-site").toggleFeature;return Object(a.createElement)(m.MenuItem,{icon:l&&ye.a,isSelected:l,onClick:Object(d.flow)(s.bind(null,t),(function(){i(l?o||Object(u.__)("Feature deactivated"):c||Object(u.__)("Feature activated"))})),role:"menuitemcheckbox",info:r},n)})),he={className:"edit-site-more-menu__content",position:"bottom left"},Ee={tooltipPosition:"bottom"},_e=function(){return Object(a.createElement)(m.DropdownMenu,{className:"edit-site-more-menu",icon:ve.a,label:Object(u.__)("More tools & options"),popoverProps:he,toggleProps:Ee},(function(e){var t=e.onClose;return Object(a.createElement)(a.Fragment,null,Object(a.createElement)(m.MenuGroup,{label:Object(u._x)("View","noun")},Object(a.createElement)(ge,{feature:"fixedToolbar",label:Object(u.__)("Top toolbar"),info:Object(u.__)("Access all block and document tools in a single place"),messageActivated:Object(u.__)("Top toolbar activated"),messageDeactivated:Object(u.__)("Top toolbar deactivated")}),Object(a.createElement)(ge,{feature:"focusMode",label:Object(u.__)("Spotlight mode"),info:Object(u.__)("Focus on one block at a time"),messageActivated:Object(u.__)("Spotlight mode activated"),messageDeactivated:Object(u.__)("Spotlight mode deactivated")}),Object(a.createElement)(ge,{feature:"fullscreenMode",label:Object(u.__)("Fullscreen mode"),info:Object(u.__)("Work without distraction"),messageActivated:Object(u.__)("Fullscreen mode activated"),messageDeactivated:Object(u.__)("Fullscreen mode deactivated")}),Object(a.createElement)(me.a.Slot,{name:"core/edit-site/plugin-more-menu",label:Object(u.__)("Plugins"),as:[m.MenuGroup,m.MenuItem],fillProps:{onClick:t}})),Object(a.createElement)(y.Slot,{fillProps:{onClose:t}}))}))},we=n(16),Pe=n(120),Se=n(7),Te=Object(a.createElement)(Se.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(a.createElement)(Se.Path,{d:"M12 4L4 7.9V20h16V7.9L12 4zm6.5 14.5H14V13h-4v5.5H5.5V8.8L12 5.7l6.5 3.1v9.7z"}));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 ke(e){var t,n=e.showOnFront,r=e.activePage,c=e.onActivePageChange,o=Object(_.useSelect)((function(e){var t,r,c=e("core").getEntityRecords,o={pages:null===(t=c("postType","page"))||void 0===t?void 0:t.map((function(e){var t=Object(l.getPathAndQueryString)(e.link);return{label:"/"===t?Object(a.createElement)(a.Fragment,null,e.title.rendered,Object(a.createElement)(m.Tooltip,{text:Object(u.__)("Home")},Object(a.createElement)("div",null,Object(a.createElement)(Pe.a,{icon:Te})))):e.title.rendered,type:"page",slug:e.slug,value:t,context:{postType:"page",postId:e.id}}})),categories:null===(r=c("taxonomy","category"))||void 0===r?void 0:r.map((function(e){var t=Object(l.getPathAndQueryString)(e.link);return{label:e.name,type:"category",slug:e.slug,value:t,context:{query:{categoryIds:[e.id]},queryContext:{page:1}}}})),posts:[]};return"posts"===n&&o.posts.unshift({label:Object(a.createElement)(a.Fragment,null,Object(u.__)("All Posts"),Object(a.createElement)(m.Tooltip,{text:Object(u.__)("Home")},Object(a.createElement)("div",null,Object(a.createElement)(Pe.a,{icon:Te})))),value:"/",context:{query:{categoryIds:[]},queryContext:{page:1}}}),o}),[n]),i=o.pages,s=void 0===i?[]:i,p=o.categories,b=void 0===p?[]:p,f=o.posts,d=void 0===f?[]:f,O=function(e){var t=[].concat(Object(we.a)(s),Object(we.a)(b),Object(we.a)(d)).find((function(t){return t.value===e})),n=t.value,r=Object(Q.a)(t,["value"]);c(function(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(E.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}({},r,{path:n}))},j=function(e){return c({type:"post",slug:e.slug,path:Object(l.getPathAndQueryString)(e.url),context:{postType:e.type,postId:e.id}})};return Object(a.createElement)(m.DropdownMenu,{icon:null,label:Object(u.__)("Switch Page"),toggleProps:{children:(null===(t=[].concat(Object(we.a)(s),Object(we.a)(b),Object(we.a)(d)).find((function(e){return e.value===r.path})))||void 0===t?void 0:t.label)||r.path},menuProps:{className:"edit-site-page-switcher__menu"}},(function(){return Object(a.createElement)(a.Fragment,null,Object(a.createElement)(m.MenuGroup,{label:Object(u.__)("Pages")},Object(a.createElement)(m.MenuItemsChoice,{choices:s,value:r.path,onSelect:O})),Object(a.createElement)(m.MenuGroup,{label:Object(u.__)("Categories")},Object(a.createElement)(m.MenuItemsChoice,{choices:b,value:r.path,onSelect:O})),Object(a.createElement)(m.MenuGroup,{label:Object(u.__)("Posts")},Object(a.createElement)(m.MenuItemsChoice,{choices:d,value:r.path,onSelect:O}),Object(a.createElement)(pe.__experimentalLinkControl,{searchInputPlaceholder:Object(u.__)("Search for Post"),onChange:j,settings:{},noDirectEntry:!0,showInitialSuggestions:!0})))}))}var Ie=n(233),Ae=n(11);var Me=function(e){var t=e.item,n=Object(_.useSelect)((function(e){return e("core").getEntityRecord("postType","template"===t.type?"wp_template":"wp_template_part",t.id)}),[t]),r=Object(a.useMemo)((function(){var e;return n?Object(Ae.parse)((null==n||null===(e=n.content)||void 0===e?void 0:e.raw)||""):[]}),[n]);return Object(a.createElement)("div",{className:"edit-site-template-switcher__template-preview"},!!r&&Object(a.createElement)(pe.BlockPreview,{blocks:r,viewportWidth:1200}))};var Ce=function(e){var t=e.theme,n=t.author,r=t.description,c=t.name,o=t.screenshot,i=t.version;return Object(a.createElement)("div",{className:"edit-site-template-switcher__theme-preview"},Object(a.createElement)("span",{className:"edit-site-template-switcher__theme-preview-name",dangerouslySetInnerHTML:{__html:c.rendered}})," ",Object(a.createElement)("span",{className:"edit-site-template-switcher__theme-preview-version"},"v"+i),Object(a.createElement)("div",{className:"edit-site-template-switcher__theme-preview-byline"},// translators: %s: theme author name.
2
+ Object(u.sprintf)(Object(u.__)("By %s"),[n.raw])),Object(a.createElement)("img",{className:"edit-site-template-switcher__theme-preview-screenshot",src:o,alt:"Theme Preview"}),Object(a.createElement)("div",{className:"edit-site-template-switcher__theme-preview-description"},Object(d.truncate)(r.raw,{length:120,separator:/\. +/})))},De={page:function(e){return"page-".concat(e)},category:function(e){return"category-".concat(e)},post:function(e){return"single-post-".concat(e)}};function Ne(e){var t=e.template,n=e.homeId;return Object(a.createElement)(a.Fragment,null,t.slug," ",t.id===n&&Object(a.createElement)(m.Tooltip,{text:Object(u.__)("Home")},Object(a.createElement)("div",{className:"edit-site-template-switcher__label-home-icon"},Object(a.createElement)(Pe.a,{icon:Te}))),"auto-draft"!==t.status&&Object(a.createElement)(m.Tooltip,{text:Object(u.__)("Customized")},Object(a.createElement)("span",{className:"edit-site-template-switcher__label-customized-dot"})))}function Re(e){var t=e.page,n=e.activeId,r=e.activeTemplatePartId,c=e.isTemplatePart,o=e.onActiveIdChange,i=e.onActiveTemplatePartIdChange,l=e.onAddTemplate,s=e.onRemoveTemplate,p=Object(a.useState)(),b=Object(ue.a)(p,2),f=b[0],d=b[1],O=Object(a.useState)(!1),j=Object(ue.a)(O,2),v=j[0],y=j[1],g=function(e){d({id:e,type:"template-part"})},h=function(){y((function(){return!0}))},E=function(){y((function(){return!1}))},w=Object(_.useRegistry)(),P=Object(a.useState)(),S=Object(ue.a)(P,2),T=S[0],x=S[1];Object(a.useEffect)((function(){D("/",w.__experimentalResolveSelect("core").getEntityRecords).then((function(e){return x(e)}),(function(){return x(null)}))}),[w]);var k=Object(_.useSelect)((function(e){var t=e("core"),r=t.getCurrentTheme,c=t.getEntityRecord,a=t.getEntityRecords,o=c("postType","wp_template",n);return{currentTheme:r(),template:o,templateParts:o?a("postType","wp_template_part",{resolved:!0,template:o.slug}):null}}),[n]),I=k.currentTheme,C=k.template,N=k.templateParts,R={label:C?Object(a.createElement)(Ne,{template:C,homeId:T}):Object(u.__)("Loading…"),value:n,slug:C?C.slug:Object(u.__)("Loading…"),content:null==C?void 0:C.content},B=null==N?void 0:N.map((function(e){return{label:Object(a.createElement)(Ne,{template:e}),value:e.id,slug:e.slug}})),F=De[t.type]&&t.slug&&De[t.type](t.slug),L=function(){return l({slug:F,title:F,status:"publish",content:R.content.raw})},G=function(){var e=Object(M.a)(A.a.mark((function e(){return A.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:s(n);case 1:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();return Object(a.createElement)(a.Fragment,null,Object(a.createElement)(m.DropdownMenu,{popoverProps:{className:"edit-site-template-switcher__popover",position:"bottom right"},icon:null,label:Object(u.__)("Switch Template"),toggleProps:{children:(c?B:[R]).find((function(e){return e.value===(c?r:n)})).slug}},(function(){return Object(a.createElement)(a.Fragment,null,Object(a.createElement)(m.MenuGroup,{label:Object(u.__)("Template")},Object(a.createElement)(m.MenuItem,{onClick:function(){return o(n)}},R.label),F&&F!==R.slug&&Object(a.createElement)(m.MenuItem,{icon:je.a,onClick:L},Object(u.__)("Overwrite Template")),F===R.slug&&Object(a.createElement)(m.MenuItem,{icon:Ie.a,onClick:G},Object(u.__)("Revert to Parent"))),Object(a.createElement)(m.MenuGroup,{label:Object(u.__)("Template Parts")},Object(a.createElement)(m.MenuItemsChoice,{choices:B,value:c?r:void 0,onSelect:i,onHover:g})),Object(a.createElement)(m.MenuGroup,{label:Object(u.__)("Current theme")},Object(a.createElement)(m.MenuItem,{onMouseEnter:h,onMouseLeave:E},I.name.raw)),!!(null==f?void 0:f.id)&&Object(a.createElement)(Me,{item:f}),v&&Object(a.createElement)(Ce,{theme:I}),Object(a.createElement)("div",{className:"edit-site-template-switcher__footer"}))})))}function Be(e){var t=e.openEntitiesSavedStates,n=Object(_.useSelect)((function(e){var t=e("core"),n=t.__experimentalGetDirtyEntityRecords,r=t.isSavingEntityRecord,c=n();return{isDirty:c.length>0,isSaving:Object(d.some)(c,(function(e){return r(e.kind,e.name,e.key)})),templateType:e("core/edit-site").getTemplateType()}})),r=n.isDirty,c=n.isSaving,o=!r||c;return Object(a.createElement)(a.Fragment,null,Object(a.createElement)(m.Button,{isPrimary:!0,className:"edit-site-save-button__button","aria-disabled":o,disabled:o,isBusy:c,onClick:o?void 0:t},Object(u.__)("Update Design")))}var Fe=n(20);function Le(){var e=Object(_.useSelect)((function(e){return e("core").hasUndo()})),t=Object(_.useDispatch)("core").undo;return Object(a.createElement)(m.Button,{icon:Ie.a,label:Object(u.__)("Undo"),shortcut:Fe.displayShortcut.primary("z"),"aria-disabled":!e,onClick:e?t:void 0})}var Ge=n(234);function ze(){var e=Object(_.useSelect)((function(e){return e("core").hasRedo()})),t=Object(_.useDispatch)("core").redo;return Object(a.createElement)(m.Button,{icon:Ge.a,label:Object(u.__)("Redo"),shortcut:Fe.displayShortcut.primaryShift("z"),"aria-disabled":!e,onClick:e?t:void 0})}var Ue=n(360);var Ve=function(e){var t=e.icon;if(!Object(_.useSelect)((function(e){return e("core/edit-site").isFeatureActive("fullscreenMode")}),[]))return null;var n=t||Ue.a;return Object(a.createElement)(m.Button,{className:"edit-site-fullscreen-mode-close",icon:n,iconSize:36,href:"index.php",label:Object(u.__)("Back")})};function He(e){var t=e.openEntitiesSavedStates,n=e.isInserterOpen,r=e.onToggleInserter,c=Object(_.useSelect)((function(e){var t=e("core/edit-site"),n=t.__experimentalGetPreviewDeviceType,r=t.isFeatureActive,c=t.getTemplateId,a=t.getTemplatePartId,o=t.getTemplateType,i=t.getPage,l=t.getShowOnFront;return{deviceType:n(),hasFixedToolbar:r("fixedToolbar"),templateId:c(),templatePartId:a(),templateType:o(),page:i(),showOnFront:l()}}),[]),o=c.deviceType,i=c.hasFixedToolbar,l=c.templateId,s=c.templatePartId,p=c.templateType,b=c.page,f=c.showOnFront,d=Object(_.useDispatch)("core/edit-site"),O=d.__experimentalSetPreviewDeviceType,j=d.setTemplate,v=d.addTemplate,y=d.removeTemplate,g=d.setTemplatePart,h=d.setPage,E=!Object(be.useViewportMatch)("medium")||"Desktop"!==o||i;return Object(a.createElement)("div",{className:"edit-site-header"},Object(a.createElement)(me.g.Slot,null,Object(a.createElement)(Ve,null)),Object(a.createElement)("div",{className:"edit-site-header__toolbar"},Object(a.createElement)(m.Button,{isPrimary:!0,isPressed:n,onClick:r,icon:je.a,label:Object(u._x)("Add block","Generic label for block inserter button")}),Object(a.createElement)(pe.ToolSelector,null),Object(a.createElement)(Le,null),Object(a.createElement)(ze,null),Object(a.createElement)(pe.BlockNavigationDropdown,null),E&&Object(a.createElement)("div",{className:"edit-site-header-toolbar__block-toolbar"},Object(a.createElement)(pe.BlockToolbar,{hideDragHandle:!0})),Object(a.createElement)("div",{className:"edit-site-header__toolbar-switchers"},Object(a.createElement)(ke,{showOnFront:f,activePage:b,onActivePageChange:h}),Object(a.createElement)("div",{className:"edit-site-header__toolbar-switchers-separator"},"/"),Object(a.createElement)(Re,{page:b,activeId:l,activeTemplatePartId:s,isTemplatePart:"wp_template_part"===p,onActiveIdChange:j,onActiveTemplatePartIdChange:g,onAddTemplate:v,onRemoveTemplate:y}))),Object(a.createElement)("div",{className:"edit-site-header__actions"},Object(a.createElement)(pe.__experimentalPreviewOptions,{deviceType:o,setDeviceType:O}),Object(a.createElement)(Be,{openEntitiesSavedStates:t}),Object(a.createElement)(me.f.Slot,{scope:"core/edit-site"}),Object(a.createElement)(_e,null)))}var qe=n(232),We=n(197),Qe=Object(m.createSlotFill)("EditSiteSidebarInspector"),Ke=Qe.Slot,Ye=Qe.Fill,Xe=a.Platform.select({web:!0,native:!1}),Ze=function(e){var t=e.identifier,n=e.title,r=e.icon,c=e.children;return Object(a.createElement)(a.Fragment,null,Object(a.createElement)(me.b,{scope:"core/edit-site",identifier:t,title:n,icon:r},c),Object(a.createElement)(me.c,{scope:"core/edit-site",identifier:t,icon:r},n))};function $e(){return Object(a.createElement)(a.Fragment,null,Object(a.createElement)(Ze,{identifier:"edit-site/block-inspector",title:Object(u.__)("Block Inspector"),icon:qe.a,isActiveByDefault:Xe},Object(a.createElement)(Ke,{bubblesVirtually:!0})),Object(a.createElement)(Ze,{identifier:"edit-site/global-styles",title:Object(u.__)("Global Styles"),icon:We.a},Object(a.createElement)("p",null,"Global Styles area")))}var Je=n(8);function et(e){var t=e.type,n=e.id,r=e.activePage,c=e.onActivePageChange,o=Object(_.useSelect)((function(e){return t&&n&&"URL"!==t&&e("core").getEntityRecord("postType",t,n)}),[t,n]),i=Object(_.useRegistry)(),s=Object(a.useState)(),p=Object(ue.a)(s,2),b=p[0],f=p[1];Object(a.useEffect)((function(){o&&D(o.link,i.__experimentalResolveSelect("core").getEntityRecords).then((function(e){return f(e)}),(function(){return f(null)}))}),[null==o?void 0:o.link,i]);var d=Object(a.useMemo)((function(){if(!o||!b)return null;var e=Object(l.getPathAndQueryString)(o.link);return e===r.path?null:function(){return c({type:t,slug:o.slug,path:e,context:{postType:o.type,postId:o.id}})}}),[o,b,r.path,c]);return d&&Object(a.createElement)(m.Button,{icon:"welcome-write-blog",label:Object(u.__)("Edit Page Template"),onClick:d})}function tt(){var e=Object(_.useSelect)((function(e){var t=e("core/edit-site"),n=t.getSettings,r=t.getTemplateType,c=t.getPage;return{settings:n(),templateType:r(),page:c()}}),[]),t=e.settings,n=e.templateType,r=e.page,c=Object(se.useEntityBlockEditor)("postType",n),o=Object(ue.a)(c,3),i=o[0],l=o[1],u=o[2],s=Object(_.useDispatch)("core/edit-site").setPage;return Object(a.createElement)(pe.BlockEditorProvider,{settings:t,value:i,onInput:l,onChange:u,useSubRegistry:!1},Object(a.createElement)(pe.BlockEditorKeyboardShortcuts,null),Object(a.createElement)(pe.__experimentalLinkControl.ViewerFill,null,Object(a.useCallback)((function(e){return Object(a.createElement)(et,Object(Je.a)({},e,{activePage:r,onActivePageChange:s}))}),[r])),Object(a.createElement)(Ye,null,Object(a.createElement)(pe.BlockInspector,null)),Object(a.createElement)("div",{className:"editor-styles-wrapper edit-site-block-editor__editor-styles-wrapper"},Object(a.createElement)(pe.WritingFlow,null,Object(a.createElement)(pe.ObserveTyping,null,Object(a.createElement)(pe.BlockList,{className:"edit-site-block-editor__block-list"})))))}var nt=n(48);function rt(){var e=Object(_.useDispatch)("core"),t=e.redo,n=e.undo;return Object(nt.useShortcut)("core/edit-site/undo",(function(e){n(),e.preventDefault()}),{bindGlobal:!0}),Object(nt.useShortcut)("core/edit-site/redo",(function(e){t(),e.preventDefault()}),{bindGlobal:!0}),null}rt.Register=function(){var e=Object(_.useDispatch)("core/keyboard-shortcuts").registerShortcut;return Object(a.useEffect)((function(){e({name:"core/edit-site/undo",category:"global",description:Object(u.__)("Undo your last changes."),keyCombination:{modifier:"primary",character:"z"}}),e({name:"core/edit-site/redo",category:"global",description:Object(u.__)("Redo your last undo."),keyCombination:{modifier:"primaryShift",character:"z"}})}),[e]),null};var ct=rt;function at(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?at(Object(n),!0).forEach((function(t){Object(E.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):at(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var it={leftSidebar:Object(u.__)("Block Library")};var lt=function(){var e=Object(a.useState)(!1),t=Object(ue.a)(e,2),n=t[0],r=t[1],c=Object(be.useViewportMatch)("medium","<"),o=Object(_.useSelect)((function(e){var t=e("core/edit-site"),n=t.isFeatureActive,r=t.__experimentalGetPreviewDeviceType,c=t.getSettings,a=t.getTemplateId,o=t.getTemplatePartId,i=t.getTemplateType,l=t.getPage,u=a(),s=o(),p=i();return{isFullscreenActive:n("fullscreenMode"),deviceType:r(),sidebarIsOpened:!!e("core/interface").getActiveComplementaryArea("core/edit-site"),settings:c(),templateId:u,templatePartId:s,templateType:p,page:l(),template:e("core").getEntityRecord("postType",p,"wp_template"===p?u:s),select:e}}),[]),i=o.isFullscreenActive,l=o.deviceType,s=o.sidebarIsOpened,p=o.settings,b=o.templateId,d=o.templatePartId,O=o.templateType,j=o.page,v=o.template,y=o.select,g=Object(_.useDispatch)("core").editEntityRecord,h=Object(_.useDispatch)("core/edit-site").setPage,E=Object(pe.__experimentalUseResizeCanvas)(l),w=Object(a.useState)(!1),P=Object(ue.a)(w,2),S=P[0],T=P[1],x=Object(a.useCallback)((function(){return T(!0)}),[]),k=Object(a.useCallback)((function(e){if(e){var t=y("core").getEditedEntityRecord;e.forEach((function(e){var n=e.kind,r=e.name,c=e.key,a=t(n,r,c);g(n,r,c,{status:"publish",title:a.slug})}))}T(!1)}),[y]),I=Object(a.useMemo)((function(){return ot({},j.context,{query:j.context.query||{categoryIds:[]},queryContext:[j.context.queryContext||{page:1},function(e){return h(ot({},j,{context:ot({},j.context,{queryContext:ot({},j.context.queryContext,{},e)})}))}]})}),[j.context]);return Object(a.createElement)(a.Fragment,null,Object(a.createElement)(pe.__unstableEditorStyles,{styles:p.styles}),Object(a.createElement)(me.d,{isActive:i}),Object(a.createElement)(m.SlotFillProvider,null,Object(a.createElement)(m.DropZoneProvider,null,Object(a.createElement)(se.EntityProvider,{kind:"root",type:"site"},Object(a.createElement)(se.EntityProvider,{kind:"postType",type:O,id:"wp_template"===O?b:d},Object(a.createElement)(pe.BlockContextProvider,{value:I},Object(a.createElement)(m.FocusReturnProvider,null,Object(a.createElement)(ct.Register,null),Object(a.createElement)($e,null),Object(a.createElement)(me.e,{labels:it,leftSidebar:n&&Object(a.createElement)("div",{className:"edit-site-editor__inserter-panel"},Object(a.createElement)("div",{className:"edit-site-editor__inserter-panel-header"},Object(a.createElement)(m.Button,{icon:de.a,onClick:function(){return r(!1)}})),Object(a.createElement)("div",{className:"edit-site-editor__inserter-panel-content"},Object(a.createElement)(pe.__experimentalLibrary,{showInserterHelpPanel:!0,onSelect:function(){c&&r(!1)}}))),sidebar:s&&Object(a.createElement)(me.b.Slot,{scope:"core/edit-site"}),header:Object(a.createElement)(He,{openEntitiesSavedStates:x,isInserterOpen:n,onToggleInserter:function(){return r(!n)}}),content:Object(a.createElement)(pe.BlockSelectionClearer,{className:"edit-site-visual-editor",style:E},Object(a.createElement)(Oe,null),Object(a.createElement)(m.Popover.Slot,{name:"block-toolbar"}),v&&Object(a.createElement)(tt,null),Object(a.createElement)(ct,null)),actions:Object(a.createElement)(a.Fragment,null,Object(a.createElement)(fe.EntitiesSavedStates,{isOpen:S,close:k}),!S&&Object(a.createElement)("div",{className:"edit-site-editor__toggle-save-panel"},Object(a.createElement)(m.Button,{isSecondary:!0,className:"edit-site-editor__toggle-save-panel-button",onClick:x,"aria-expanded":!1},Object(u.__)("Open save panel")))),footer:Object(a.createElement)(pe.BlockBreadcrumb,null)}),Object(a.createElement)(m.Popover.Slot,null),Object(a.createElement)(f.PluginArea,null))))))))},ut=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.perPage,r=void 0===n?20:n;return i()({path:Object(l.addQueryArgs)("/wp/v2/search",{per_page:r,search:e,type:"post",subtype:"post"})}).then((function(e){return Promise.all(e.map((function(e){return i()({url:e._links.self[0].href})})))})).then((function(e){return e.map((function(e){return{url:e.link,type:e.type,id:e.id,slug:e.slug,title:e.title.rendered||Object(u.__)("(no title)")}}))}))};function st(e,t){t.__experimentalFetchLinkSuggestions=ut;var n=t.editSiteInitialState;delete t.editSiteInitialState,n.settings=t,function(e){var t=Object(_.registerStore)("core/edit-site",{reducer:k,actions:r,selectors:c,controls:le({},w.controls,{},R),persist:["preferences"],initialState:e});t.dispatch(W(e.page))}(n),Object(s.registerCoreBlocks)(),Object(s.__experimentalRegisterExperimentalCoreBlocks)(t),Object(a.render)(Object(a.createElement)(lt,null),document.getElementById(e))}},4:function(e,t){!function(){e.exports=this.wp.data}()},40: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}))},41:function(e,t,n){"use strict";function r(e,t){if(null==e)return{};var n,r,c={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||(c[n]=e[n]);return c}n.d(t,"a",(function(){return r}))},43:function(e,t,n){"use strict";function r(e,t,n,r,c,a,o){try{var i=e[a](o),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,a){var o=e.apply(t,n);function i(e){r(o,c,a,i,l,"next",e)}function l(e){r(o,c,a,i,l,"throw",e)}i(void 0)}))}}n.d(t,"a",(function(){return c}))},44:function(e,t,n){"use strict";var r,c;function a(e){return[e]}function o(){var e={clear:function(){e.head=null}};return e}function i(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={},c="undefined"!=typeof WeakMap,t.a=function(e,t){var n,l;function u(){n=c?new WeakMap:o()}function s(){var n,r,c,a,o,u=arguments.length;for(a=new Array(u),c=0;c<u;c++)a[c]=arguments[c];for(o=t.apply(null,a),(n=l(o)).isUniqueByDependants||(n.lastDependants&&!i(o,n.lastDependants,0)&&n.clear(),n.lastDependants=o),r=n.head;r;){if(i(r.args,a,1))return r!==n.head&&(r.prev.next=r.next,r.next&&(r.next.prev=r.prev),r.next=n.head,r.prev=null,n.head.prev=r,n.head=r),r.val;r=r.next}return r={val:e.apply(null,a)},a[0]=null,r.args=a,n.head&&(n.head.prev=r,r.next=n.head),n.head=r,r.val}return t||(t=a),l=c?function(e){var t,c,a,i,l,u=n,s=!0;for(t=0;t<e.length;t++){if(c=e[t],!(l=c)||"object"!=typeof l){s=!1;break}u.has(c)?u=u.get(c):(a=new WeakMap,u.set(c,a),u=a)}return u.has(r)||((i=o()).isUniqueByDependants=s,u.set(r,i)),u.get(r)}:function(){return n},s.getDependants=t,s.clear=u,u(),s}},47:function(e,t){!function(){e.exports=this.wp.coreData}()},48:function(e,t){!function(){e.exports=this.wp.keyboardShortcuts}()},49:function(e,t,n){"use strict";n.d(t,"b",(function(){return F})),n.d(t,"c",(function(){return q})),n.d(t,"d",(function(){return $})),n.d(t,"e",(function(){return ee})),n.d(t,"f",(function(){return N})),n.d(t,"g",(function(){return oe})),n.d(t,"a",(function(){return H}));var r={};n.r(r),n.d(r,"enableComplementaryArea",(function(){return m})),n.d(r,"disableComplementaryArea",(function(){return f})),n.d(r,"pinItem",(function(){return O})),n.d(r,"unpinItem",(function(){return j}));var c={};n.r(c),n.d(c,"getActiveComplementaryArea",(function(){return v})),n.d(c,"isItemPinned",(function(){return y}));var a=n(4),o=n(5),i=n(2);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 u(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){Object(o.a)(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 s=Object(a.combineReducers)({singleEnableItems: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.itemType,c=t.scope,a=t.item;return"SET_SINGLE_ENABLE_ITEM"===n&&r&&c?u({},e,Object(o.a)({},r,u({},e[r],Object(o.a)({},c,a||null)))):e},multipleEnableItems: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.itemType,c=t.scope,a=t.item,l=t.isEnable;if("SET_MULTIPLE_ENABLE_ITEM"!==n||!r||!c||!a||Object(i.get)(e,[r,c,a])===l)return e;var s=e[r]||{},p=s[c]||{};return u({},e,Object(o.a)({},r,u({},s,Object(o.a)({},c,u({},p,Object(o.a)({},a,l||!1))))))}}),p=Object(a.combineReducers)({enableItems:s});function b(e,t,n){return{type:"SET_SINGLE_ENABLE_ITEM",itemType:e,scope:t,item:n}}function m(e,t){return b("complementaryArea",e,t)}function f(e){return b("complementaryArea",e,void 0)}function d(e,t,n,r){return{type:"SET_MULTIPLE_ENABLE_ITEM",itemType:e,scope:t,item:n,isEnable:r}}function O(e,t){return d("pinnedItems",e,t,!0)}function j(e,t){return d("pinnedItems",e,t,!1)}function v(e,t){return function(e,t,n){return Object(i.get)(e.enableItems.singleEnableItems,[t,n])}(e,"complementaryArea",t)}function y(e,t,n){return!1!==function(e,t,n,r){return Object(i.get)(e.enableItems.multipleEnableItems,[t,n,r])}(e,"pinnedItems",t,n)}Object(a.registerStore)("core/interface",{reducer:p,actions:r,selectors:c,persist:["enableItems"]});var g=n(8),h=n(14),E=n(0),_=n(10),w=n.n(_),P=n(3),S=n(1),T=n(166),x=n(167),k=n(132),I=n(51),A=Object(I.withPluginContext)((function(e,t){return{icon:t.icon||e.icon,identifier:t.identifier||"".concat(e.name,"/").concat(t.name)}}));var M=A((function(e){var t=e.as,n=void 0===t?P.Button:t,r=e.scope,c=e.identifier,o=e.icon,l=e.selectedIcon,u=Object(h.a)(e,["as","scope","identifier","icon","selectedIcon"]),s=n,p=Object(a.useSelect)((function(e){return e("core/interface").getActiveComplementaryArea(r)===c}),[c]),b=Object(a.useDispatch)("core/interface"),m=b.enableComplementaryArea,f=b.disableComplementaryArea;return Object(E.createElement)(s,Object(g.a)({icon:l&&p?l:o,onClick:function(){p?f(r):m(r,c)}},Object(i.omit)(u,["name"])))})),C=function(e){var t=e.smallScreenTitle,n=e.children,r=e.className,c=e.toggleButtonProps,a=Object(E.createElement)(M,Object(g.a)({icon:k.a},c));return Object(E.createElement)(E.Fragment,null,Object(E.createElement)("div",{className:"components-panel__header interface-complementary-area-header__small"},t&&Object(E.createElement)("span",{className:"interface-complementary-area-header__small-title"},t),a),Object(E.createElement)("div",{className:w()("components-panel__header","interface-complementary-area-header",r),tabIndex:-1},n,a))};function D(e){var t=e.scope,n=Object(h.a)(e,["scope"]);return Object(E.createElement)(P.Fill,Object(g.a)({name:"PinnedItems/".concat(t)},n))}D.Slot=function(e){var t=e.scope,n=e.className,r=Object(h.a)(e,["scope","className"]);return Object(E.createElement)(P.Slot,Object(g.a)({name:"PinnedItems/".concat(t)},r),(function(e){return!Object(i.isEmpty)(e)&&Object(E.createElement)("div",{className:w()(n,"interface-pinned-items")},e)}))};var N=D;function R(e){var t=e.scope,n=e.children,r=e.className;return Object(E.createElement)(P.Fill,{name:"ComplementaryArea/".concat(t)},Object(E.createElement)(P.Animate,{type:"slide-in",options:{origin:"left"}},(function(){return Object(E.createElement)("div",{className:r},n)})))}var B=A((function(e){var t=e.children,n=e.className,r=e.closeLabel,c=void 0===r?Object(S.__)("Close plugin"):r,o=e.identifier,i=e.header,l=e.headerClassName,u=e.icon,s=e.isPinnable,p=void 0===s||s,b=e.panelClassName,m=e.scope,f=e.smallScreenTitle,d=e.title,O=e.toggleShortcut,j=e.isActiveByDefault,v=Object(a.useSelect)((function(e){var t=e("core/interface"),n=t.getActiveComplementaryArea,r=t.isItemPinned,c=n(m);return{isActive:c===o,isPinned:r(m,o),activeArea:c,isSmall:e("core/viewport").isViewportMatch("< medium")}}),[o,m]),y=v.isActive,g=v.isPinned,h=v.activeArea,_=v.isSmall;!function(e,t,n,r,c){var o=Object(E.useRef)(!1),i=Object(E.useRef)(!1),l=Object(a.useDispatch)("core/interface"),u=l.enableComplementaryArea,s=l.disableComplementaryArea;Object(E.useEffect)((function(){r&&c&&!o.current?(s(e),i.current=!0):i.current&&!c&&o.current?(i.current=!1,u(e,t)):i.current&&n&&n!==t&&(i.current=!1),c!==o.current&&(o.current=c)}),[r,c,e,t,n])}(m,o,h,y,_);var k=Object(a.useDispatch)("core/interface"),I=k.enableComplementaryArea,A=k.disableComplementaryArea,D=k.pinItem,B=k.unpinItem;return Object(E.useEffect)((function(){j&&void 0===h&&!_&&I(m,o)}),[h,j,m,o,_]),Object(E.createElement)(E.Fragment,null,g&&p&&Object(E.createElement)(N,{scope:m},Object(E.createElement)(M,{scope:m,identifier:o,isPressed:y,"aria-expanded":y,label:d,icon:u})),y&&Object(E.createElement)(R,{className:w()("interface-complementary-area",n),scope:m},Object(E.createElement)(C,{className:l,closeLabel:c,onClose:function(){return A(m)},smallScreenTitle:f,toggleButtonProps:{label:c,shortcut:O,scope:m,identifier:o}},i||Object(E.createElement)(E.Fragment,null,Object(E.createElement)("strong",null,d),p&&Object(E.createElement)(P.Button,{className:"interface-complementary-area__pin-unpin-item",icon:g?T.a:x.a,label:g?Object(S.__)("Unpin from toolbar"):Object(S.__)("Pin to toolbar"),onClick:function(){return(g?B:D)(m,o)},isPressed:g,"aria-expanded":g}))),Object(E.createElement)(P.Panel,{className:b},t)))}));B.Slot=function(e){var t=e.scope,n=Object(h.a)(e,["scope"]);return Object(E.createElement)(P.Slot,Object(g.a)({name:"ComplementaryArea/".concat(t)},n))};var F=B,L=n(121),G=n(12);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 U(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){Object(o.a)(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}function V(e){var t=e.name,n=e.as,r=e.onClick,c=Object(h.a)(e,["name","as","onClick"]);return Object(E.createElement)(P.Fill,{name:t},(function(e){var t=e.onClick,a=e.as,o=n||a||P.Button;return Object(E.createElement)(o,Object(g.a)({onClick:r||t?function(){(r||i.noop).apply(void 0,arguments),(t||i.noop).apply(void 0,arguments)}:void 0},c))}))}V.Slot=function(e){var t=e.name,n=e.as,r=void 0===n?[P.ButtonGroup,P.Button]:n,c=e.fillProps,a=void 0===c?{}:c,o=e.bubblesVirtually,l=Object(h.a)(e,["name","as","fillProps","bubblesVirtually"]),u=Object(G.a)(r,2),s=u[0],p=u[1];return Object(E.createElement)(P.Slot,{name:t,bubblesVirtually:o,fillProps:U({as:p},a)},(function(e){return!Object(i.isEmpty)(e)&&Object(E.createElement)(s,l,e)}))};var H=V;function q(e){var t=e.scope,n=e.target,r=Object(h.a)(e,["scope","target"]);return Object(E.createElement)(M,Object(g.a)({as:function(e){return Object(E.createElement)(H,Object(g.a)({name:"".concat(t,"/plugin-more-menu")},e))},role:"menuitemcheckbox",selectedIcon:L.a,name:n,scope:t},r))}var W=n(19),Q=n(18),K=n(23),Y=n(15),X=n(21);function Z(){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}}var $=function(e){Object(X.a)(r,e);var t,n=(t=r,function(){var e,n=Object(Y.a)(t);if(Z()){var r=Object(Y.a)(this).constructor;e=Reflect.construct(n,arguments,r)}else e=n.apply(this,arguments);return Object(K.a)(this,e)});function r(){return Object(W.a)(this,r),n.apply(this,arguments)}return Object(Q.a)(r,[{key:"componentDidMount",value:function(){this.isSticky=!1,this.sync(),document.body.classList.contains("sticky-menu")&&(this.isSticky=!0,document.body.classList.remove("sticky-menu"))}},{key:"componentWillUnmount",value:function(){this.isSticky&&document.body.classList.add("sticky-menu")}},{key:"componentDidUpdate",value:function(e){this.props.isActive!==e.isActive&&this.sync()}},{key:"sync",value:function(){this.props.isActive?document.body.classList.add("is-fullscreen-mode"):document.body.classList.remove("is-fullscreen-mode")}},{key:"render",value:function(){return null}}]),r}(E.Component);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}var ee=Object(P.navigateRegions)((function(e){var t=e.footer,n=e.header,r=e.sidebar,c=e.leftSidebar,a=e.content,i=e.actions,l=e.labels,u=e.className;!function(e){Object(E.useEffect)((function(){var t=document&&document.querySelector("html:not(.".concat(e,")"));if(t)return t.classList.toggle(e),function(){t.classList.toggle(e)}}),[e])}("interface-interface-skeleton__html-container");var s=function(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(o.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}({},{
3
  /* translators: accessibility text for the top bar landmark region. */
4
  header:Object(S.__)("Header"),
5
  /* translators: accessibility text for the content landmark region. */
changelog.txt CHANGED
@@ -1,5 +1,13 @@
1
  == Changelog ==
2
 
 
 
 
 
 
 
 
 
3
  = 8.5.0 =
4
 
5
  ### Features
1
  == Changelog ==
2
 
3
+ = 8.5.1 =
4
+
5
+ ### Bug Fixes
6
+
7
+ - Improve the performance of the Site builder page.
8
+ - Load external images if local images not present.
9
+
10
+
11
  = 8.5.0 =
12
 
13
  ### Features
gutenberg.php CHANGED
@@ -5,7 +5,7 @@
5
  * Description: Printing since 1440. This is the development plugin for the new block editor in core.
6
  * Requires at least: 5.3
7
  * Requires PHP: 5.6
8
- * Version: 8.5.0
9
  * Author: Gutenberg Team
10
  * Text Domain: gutenberg
11
  *
@@ -13,8 +13,8 @@
13
  */
14
 
15
  ### BEGIN AUTO-GENERATED DEFINES
16
- define( 'GUTENBERG_VERSION', '8.5.0' );
17
- define( 'GUTENBERG_GIT_COMMIT', '1e095fd65747a526736a77939a4d51f491e5b59e' );
18
  ### END AUTO-GENERATED DEFINES
19
 
20
  gutenberg_pre_init();
5
  * Description: Printing since 1440. This is the development plugin for the new block editor in core.
6
  * Requires at least: 5.3
7
  * Requires PHP: 5.6
8
+ * Version: 8.5.1
9
  * Author: Gutenberg Team
10
  * Text Domain: gutenberg
11
  *
13
  */
14
 
15
  ### BEGIN AUTO-GENERATED DEFINES
16
+ define( 'GUTENBERG_VERSION', '8.5.1' );
17
+ define( 'GUTENBERG_GIT_COMMIT', '8fc3eca451067f12cd2435995c63f5cb41b8221e' );
18
  ### END AUTO-GENERATED DEFINES
19
 
20
  gutenberg_pre_init();
lib/class-wp-rest-image-editor-controller.php CHANGED
@@ -147,7 +147,15 @@ class WP_REST_Image_Editor_Controller extends WP_REST_Controller {
147
  return new WP_Error( 'rest_image_not_edited', $error, array( 'status' => 400 ) );
148
  }
149
 
150
- $image_editor = wp_get_image_editor( $image_file );
 
 
 
 
 
 
 
 
151
 
152
  if ( is_wp_error( $image_editor ) ) {
153
  // This image cannot be edited.
147
  return new WP_Error( 'rest_image_not_edited', $error, array( 'status' => 400 ) );
148
  }
149
 
150
+ // If the file doesn't exist, attempt a URL fopen on the src link.
151
+ // This can occur with certain file replication plugins.
152
+ // Keep the original file path to get a modified name later.
153
+ $image_file_to_edit = $image_file;
154
+ if ( ! file_exists( $image_file_to_edit ) ) {
155
+ $image_file_to_edit = _load_image_to_edit_path( $attachment_id );
156
+ }
157
+
158
+ $image_editor = wp_get_image_editor( $image_file_to_edit );
159
 
160
  if ( is_wp_error( $image_editor ) ) {
161
  // This image cannot be edited.
lib/edit-site-page.php CHANGED
@@ -145,30 +145,11 @@ function gutenberg_edit_site_init( $hook ) {
145
  }
146
  $settings['styles'] = gutenberg_get_editor_styles();
147
 
148
- $template_ids = array();
149
- $template_part_ids = array();
150
- foreach ( get_template_types() as $template_type ) {
151
- // Skip 'embed' for now because it is not a regular template type.
152
- // Skip 'index' because it's a fallback that we handle differently.
153
- if ( in_array( $template_type, array( 'embed', 'index' ), true ) ) {
154
- continue;
155
- }
156
-
157
- $current_template = gutenberg_find_template_post_and_parts( $template_type );
158
- if ( isset( $current_template ) ) {
159
- $template_ids[ $template_type ] = $current_template['template_post']->ID;
160
- $template_part_ids = $template_part_ids + $current_template['template_part_ids'];
161
- }
162
- }
163
-
164
  $settings['editSiteInitialState'] = array();
165
 
166
- $settings['editSiteInitialState']['templateType'] = 'wp_template';
167
- $settings['editSiteInitialState']['templateIds'] = array_values( $template_ids );
168
- $settings['editSiteInitialState']['templatePartIds'] = array_values( $template_part_ids );
169
-
170
- $settings['editSiteInitialState']['showOnFront'] = get_option( 'show_on_front' );
171
- $settings['editSiteInitialState']['page'] = array(
172
  'path' => '/',
173
  'context' => 'page' === $settings['editSiteInitialState']['showOnFront'] ? array(
174
  'postType' => 'page',
145
  }
146
  $settings['styles'] = gutenberg_get_editor_styles();
147
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
148
  $settings['editSiteInitialState'] = array();
149
 
150
+ $settings['editSiteInitialState']['templateType'] = 'wp_template';
151
+ $settings['editSiteInitialState']['showOnFront'] = get_option( 'show_on_front' );
152
+ $settings['editSiteInitialState']['page'] = array(
 
 
 
153
  'path' => '/',
154
  'context' => 'page' === $settings['editSiteInitialState']['showOnFront'] ? array(
155
  'postType' => 'page',
lib/template-loader.php CHANGED
@@ -431,7 +431,7 @@ function gutenberg_template_loader_filter_block_editor_settings( $settings ) {
431
  }
432
 
433
  // If this is the Site Editor, auto-drafts for template parts have already been generated
434
- // through `gutenberg_find_template_post_and_parts` in `gutenberg_edit_site_init`.
435
  if ( isset( $settings['editSiteInitialState'] ) ) {
436
  return $settings;
437
  }
431
  }
432
 
433
  // If this is the Site Editor, auto-drafts for template parts have already been generated
434
+ // through `filter_rest_wp_template_part_query`, when called via the REST API.
435
  if ( isset( $settings['editSiteInitialState'] ) ) {
436
  return $settings;
437
  }
readme.txt CHANGED
@@ -3,7 +3,7 @@ Contributors: matveb, joen, karmatosed
3
  Requires at least: 5.3.0
4
  Tested up to: 5.4
5
  Requires PHP: 5.6
6
- Stable tag: 8.4.0
7
  License: GPLv2 or later
8
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
9
 
@@ -53,4 +53,4 @@ The four phases of the project are Editing, Customization, Collaboration, and Mu
53
 
54
  == Changelog ==
55
 
56
- To read the changelog for Gutenberg 8.5.0, please navigate to the <a href="https://github.com/WordPress/gutenberg/releases/tag/v8.5.0">release page</a>.
3
  Requires at least: 5.3.0
4
  Tested up to: 5.4
5
  Requires PHP: 5.6
6
+ Stable tag: 8.5.0
7
  License: GPLv2 or later
8
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
9
 
53
 
54
  == Changelog ==
55
 
56
+ To read the changelog for Gutenberg 8.5.1, please navigate to the <a href="https://github.com/WordPress/gutenberg/releases/tag/v8.5.1">release page</a>.