/*! This file is auto-generated */ this.wp=this.wp||{},this.wp.editWidgets=function(e){var t={};function r(c){if(t[c])return t[c].exports;var n=t[c]={i:c,l:!1,exports:{}};return e[c].call(n.exports,n,n.exports,r),n.l=!0,n.exports}return r.m=e,r.c=t,r.d=function(e,t,c){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:c})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var c=Object.create(null);if(r.r(c),Object.defineProperty(c,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var n in e)r.d(c,n,function(t){return e[t]}.bind(null,n));return c},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s="F35A")}({"//Lo":function(e,t,r){"use strict";var c=r("GRId"),n=r("Tqx9");const i=Object(c.createElement)(n.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(c.createElement)(n.Path,{d:"M19 8h-1V6h-5v2h-2V6H6v2H5c-1.1 0-2 .9-2 2v8c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2v-8c0-1.1-.9-2-2-2zm.5 10c0 .3-.2.5-.5.5H5c-.3 0-.5-.2-.5-.5v-8c0-.3.2-.5.5-.5h14c.3 0 .5.2.5.5v8z"}));t.a=i},"1ZqX":function(e,t){e.exports=window.wp.data},"6aBm":function(e,t){e.exports=window.wp.mediaUtils},Cg8A:function(e,t,r){"use strict";var c=r("GRId"),n=r("Tqx9");const i=Object(c.createElement)(n.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(c.createElement)(n.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=i},F35A:function(e,t,r){"use strict";r.r(t),r.d(t,"initialize",(function(){return mt}));var c={};r.r(c),r.d(c,"persistStubPost",(function(){return B})),r.d(c,"saveEditedWidgetAreas",(function(){return C})),r.d(c,"saveWidgetAreas",(function(){return R})),r.d(c,"saveWidgetArea",(function(){return W})),r.d(c,"setWidgetIdForClientId",(function(){return L})),r.d(c,"setWidgetAreasOpenState",(function(){return P})),r.d(c,"setIsWidgetAreaOpen",(function(){return M})),r.d(c,"setIsInserterOpened",(function(){return G})),r.d(c,"closeGeneralSidebar",(function(){return D})),r.d(c,"moveBlockToWidgetArea",(function(){return F})),r.d(c,"__unstableToggleFeature",(function(){return V}));var n={};r.r(n),r.d(n,"getWidgetAreas",(function(){return U})),r.d(n,"getWidgets",(function(){return q}));var i={};r.r(i),r.d(i,"getWidgets",(function(){return z})),r.d(i,"getWidget",(function(){return H})),r.d(i,"getWidgetAreas",(function(){return K})),r.d(i,"getWidgetAreaForWidgetId",(function(){return Q})),r.d(i,"getEditedWidgetAreas",(function(){return Y})),r.d(i,"getReferenceWidgetBlocks",(function(){return J})),r.d(i,"isSavingWidgetAreas",(function(){return X})),r.d(i,"getIsWidgetAreaOpen",(function(){return Z})),r.d(i,"isInserterOpened",(function(){return $})),r.d(i,"canInsertBlockInWidgetArea",(function(){return ee})),r.d(i,"__unstableIsFeatureActive",(function(){return te}));var o={};r.r(o),r.d(o,"metadata",(function(){return me})),r.d(o,"name",(function(){return ge})),r.d(o,"settings",(function(){return pe}));var a=r("GRId"),s=r("HSyU"),l=r("QyPg"),d=r("jZUy"),u=r("GLVC"),b=r("ywyh"),m=r.n(b),g=r("1ZqX"),p=r("YLtl");const O=Object(p.flow)([g.combineReducers,(j={features:{fixedToolbar:!1,welcomeGuide:!0,showBlockBreadcrumbs:!0,themeStyles:!0}},e=>(t=j,r)=>e(t,r))])({features:(e,t)=>"TOGGLE_FEATURE"===t.type?{...e,[t.feature]:!e[t.feature]}:e});var j,f=Object(g.combineReducers)({blockInserterPanel:function(e=!1,t){switch(t.type){case"SET_IS_INSERTER_OPENED":return t.value}return e},widgetAreasOpenState:function(e={},t){const{type:r}=t;switch(r){case"SET_WIDGET_AREAS_OPEN_STATE":return t.widgetAreasOpenState;case"SET_IS_WIDGET_AREA_OPEN":{const{clientId:r,isOpen:c}=t;return{...e,[r]:c}}default:return e}},preferences:O});const _="root",h=e=>"widget-area-"+e;const E="core/edit-widgets";function w(e,t,...r){return{type:"SELECT",registryName:e,selectorName:t,args:r}}function y(e,t,...r){return{type:"DISPATCH",registryName:e,actionName:t,args:r}}const v={AWAIT_PROMISE:({promise:e})=>e,SELECT:Object(g.createRegistryControl)(e=>({registryName:t,selectorName:r,args:c})=>e.select(t)[r](...c)),GET_PENDING_ACTIONS:Object(g.createRegistryControl)(e=>({postId:t})=>{var r;return(null===(r=k(e).processingQueue[t])||void 0===r?void 0:r.pendingActions)||[]}),IS_PROCESSING_POST:Object(g.createRegistryControl)(e=>({postId:t})=>{var r;return null===(r=k(e).processingQueue[t])||void 0===r?void 0:r.inProgress}),DISPATCH:Object(g.createRegistryControl)(e=>({registryName:t,actionName:r,args:c})=>e.dispatch(t)[r](...c)),RESOLVE_WIDGET_AREAS:Object(g.createRegistryControl)(e=>({query:t})=>e.resolveSelect("core").getEntityRecords(_,"sidebar",t)),RESOLVE_WIDGETS:Object(g.createRegistryControl)(e=>({query:t})=>e.resolveSelect("core").getEntityRecords("root","widget",t))},k=e=>e.stores[E].store.getState();var S=v,I=r("l3Sj"),A=r("onLe"),x=r("U60i");function T(e){if("block"===e.id_base){const t=Object(s.parse)(e.instance.raw.content);return t.length?Object(u.addWidgetIdToBlock)(t[0],e.id):Object(u.addWidgetIdToBlock)(Object(s.createBlock)("core/paragraph",{},[]),e.id)}let t;return t=e._embedded.about[0].is_multi?{idBase:e.id_base,instance:e.instance}:{id:e.id},Object(u.addWidgetIdToBlock)(Object(s.createBlock)("core/legacy-widget",t,[]),e.id)}function N(e,t={}){let r;var c,n,i;"core/legacy-widget"===e.name&&(e.attributes.id||e.attributes.instance)?r={...t,id:null!==(c=e.attributes.id)&&void 0!==c?c:t.id,id_base:null!==(n=e.attributes.idBase)&&void 0!==n?n:t.id_base,instance:null!==(i=e.attributes.instance)&&void 0!==i?i:t.instance}:r={...t,id_base:"block",instance:{raw:{content:Object(s.serialize)(e)}}};return delete r.rendered,delete r.rendered_form,r}const B=function*(e,t){const r=((e,t)=>({id:e,slug:e,status:"draft",type:"page",blocks:t,meta:{widgetAreaId:e}}))(e,t);return yield y("core","receiveEntityRecords",_,"postType",r,{id:r.id},!1),r};function*C(){const e=yield w(E,"getEditedWidgetAreas");if(null!=e&&e.length)try{yield*R(e),yield y(A.store,"createSuccessNotice",Object(I.__)("Widgets saved."),{type:"snackbar"})}catch(e){yield y(A.store,"createErrorNotice",Object(I.sprintf)(Object(I.__)("There was an error. %s"),e.message),{type:"snackbar"})}}function*R(e){try{for(const t of e)yield*W(t.id)}finally{yield y("core","finishResolution","getEntityRecord",_,"sidebar",{per_page:-1})}}function*W(e){const t=yield w(E,"getWidgets"),r=yield w("core","getEditedEntityRecord",_,"postType",h(e)),c=Object.values(t).filter(({sidebar:t})=>t===e),n=[],i=r.blocks.filter(({attributes:{id:e}})=>{if(e){if(n.includes(e))return!1;n.push(e)}return!0}),o=[];for(const e of c){(yield w(E,"getWidgetAreaForWidgetId",e.id))||o.push(e)}const a=[],s=[],l=[];for(let r=0;re("root","widget",n))}else s.push(({saveEntityRecord:t})=>t("root","widget",{...o,sidebar:e}));a.push({block:c,position:r,clientId:c.clientId})}for(const e of o)s.push(({deleteEntityRecord:t})=>t("root","widget",e.id,{force:!0}));const d=(yield y("core","__experimentalBatch",s)).filter(e=>!e.hasOwnProperty("deleted")),b=[];for(let e=0;ee.id===t).clientId,n=(yield w("core/block-editor","getBlockOrder",c)).length;(yield w(E,"getIsWidgetAreaOpen",c))||(yield y(E,"setIsWidgetAreaOpen",c,!0)),yield y("core/block-editor","moveBlocksToPosition",[e],r,c,n)}function V(e){return{type:"TOGGLE_FEATURE",feature:e}}function*U(){const e={per_page:-1};yield function(e={per_page:-1}){return{type:"RESOLVE_WIDGET_AREAS",query:e}}(e);const t=[],r=(yield w("core","getEntityRecords",_,"sidebar",e)).sort((e,t)=>"wp_inactive_widgets"===e.id?1:"wp_inactive_widgets"===t.id?-1:0);for(const e of r)t.push(Object(s.createBlock)("core/widget-area",{id:e.id,name:e.name})),e.widgets.length||(yield B(h(e.id),[]));const c={};t.forEach((e,t)=>{c[e.clientId]=0===t}),yield P(c),yield B("widget-areas",t)}function*q(){const e={per_page:-1,_embed:"about"};yield function(e={per_page:-1,_embed:"about"}){return{type:"RESOLVE_WIDGETS",query:e}}(e);const t=yield w("core","getEntityRecords","root","widget",e),r={};for(const e of t){const t=T(e);r[e.sidebar]=r[e.sidebar]||[],r[e.sidebar].push(t)}for(const e in r)r.hasOwnProperty(e)&&(yield B(h(e),r[e]))}const z=Object(g.createRegistrySelector)(e=>()=>{const t=e("core").getEntityRecords("root","widget",{per_page:-1,_embed:"about"});return Object(p.keyBy)(t,"id")}),H=Object(g.createRegistrySelector)(e=>(t,r)=>e(E).getWidgets()[r]),K=Object(g.createRegistrySelector)(e=>()=>{const t={per_page:-1};return e("core").getEntityRecords(_,"sidebar",t)}),Q=Object(g.createRegistrySelector)(e=>(t,r)=>e(E).getWidgetAreas().find(t=>e("core").getEditedEntityRecord(_,"postType",h(t.id)).blocks.map(e=>Object(u.getWidgetIdFromBlock)(e)).includes(r))),Y=Object(g.createRegistrySelector)(e=>(t,r)=>{let c=e(E).getWidgetAreas();return c?(r&&(c=c.filter(({id:e})=>r.includes(e))),c.filter(({id:t})=>e("core").hasEditsForEntityRecord(_,"postType",h(t))).map(({id:t})=>e("core").getEditedEntityRecord(_,"sidebar",t))):[]}),J=Object(g.createRegistrySelector)(e=>(t,r=null)=>{const c=[],n=e(E).getWidgetAreas();for(const t of n){const n=e("core").getEditedEntityRecord(_,"postType",h(t.id));for(const e of n.blocks){var i;"core/legacy-widget"!==e.name||r&&(null===(i=e.attributes)||void 0===i?void 0:i.referenceWidgetName)!==r||c.push(e)}}return c}),X=Object(g.createRegistrySelector)(e=>()=>{var t;const r=null===(t=e(E).getWidgetAreas())||void 0===t?void 0:t.map(({id:e})=>e);if(!r)return!1;for(const t of r){if(e("core").isSavingEntityRecord(_,"sidebar",t))return!0}const c=[...Object.keys(e(E).getWidgets()),void 0];for(const t of c){if(e("core").isSavingEntityRecord("root","widget",t))return!0}return!1}),Z=(e,t)=>{const{widgetAreasOpenState:r}=e;return!!r[t]};function $(e){return!!e.blockInserterPanel}const ee=Object(g.createRegistrySelector)(e=>(t,r)=>{const c=e("core/block-editor").getBlocks(),[n]=c;return e("core/block-editor").canInsertBlockType(r,n.clientId)});function te(e,t){return Object(p.get)(e.preferences.features,[t],!1)}const re={reducer:f,controls:S,selectors:i,resolvers:n,actions:c,persist:["preferences"]},ce=Object(g.createReduxStore)(E,re);Object(g.registerStore)(E,re),m.a.use((function(e,t){var r;return 0===(null===(r=e.path)||void 0===r?void 0:r.indexOf("/wp/v2/types/widget-area"))?Promise.resolve({}):t(e)}));var ne=r("axFQ"),ie=r("K9lf"),oe=r("g56x");const ae=Object(ie.createHigherOrderComponent)(e=>t=>{const r=Object(u.getWidgetIdFromBlock)(t),c=t.name,{widgetAreas:n,currentWidgetAreaId:i,canInsertBlockInWidgetArea:o}=Object(g.useSelect)(e=>{var t;if("core/widget-area"===c)return{};const n=e(ce);return{widgetAreas:n.getWidgetAreas(),currentWidgetAreaId:r?null===(t=n.getWidgetAreaForWidgetId(r))||void 0===t?void 0:t.id:void 0,canInsertBlockInWidgetArea:n.canInsertBlockInWidgetArea(c)}},[r,c]),{moveBlockToWidgetArea:s}=Object(g.useDispatch)(ce),l=(null==n?void 0:n.length)>1,d="core/widget-area"!==c&&l&&o;return Object(a.createElement)(a.Fragment,null,Object(a.createElement)(e,t),d&&Object(a.createElement)(ne.BlockControls,null,Object(a.createElement)(u.MoveToWidgetArea,{widgetAreas:n,currentWidgetAreaId:i,onSelect:e=>{s(t.clientId,e)}})))},"withMoveToWidgetAreaToolbarItem");Object(oe.addFilter)("editor.BlockEdit","core/edit-widgets/block-edit",ae);var se=r("6aBm");Object(oe.addFilter)("editor.MediaUpload","core/edit-widgets/replace-media-upload",()=>se.MediaUpload);var le=r("tI+e");function de(){const[e,t,r]=Object(d.useEntityBlockEditor)("root","postType");return Object(a.createElement)(ne.InnerBlocks,{value:e,onInput:t,onChange:r,templateLock:!1,renderAppender:ne.InnerBlocks.ButtonBlockAppender})}const ue=e=>{const[t,r]=Object(a.useState)(!1);return Object(a.useEffect)(()=>{const{ownerDocument:t}=e.current;function c(){r(!0)}function n(){r(!1)}return t.addEventListener("dragstart",c),t.addEventListener("dragend",n),()=>{t.removeEventListener("dragstart",c),t.removeEventListener("dragend",n)}},[]),t},be=e=>{const[t,r]=Object(a.useState)(!1);return Object(a.useEffect)(()=>{const{ownerDocument:t}=e.current;function c(e){i(e)}function n(){r(!1)}function i(t){e.current.contains(t.target)?r(!0):r(!1)}return t.addEventListener("dragstart",c),t.addEventListener("dragend",n),t.addEventListener("dragenter",i),()=>{t.removeEventListener("dragstart",c),t.removeEventListener("dragend",n),t.removeEventListener("dragenter",i)}},[]),t},me={name:"core/widget-area",category:"widgets",attributes:{id:{type:"string"},name:{type:"string"}},supports:{html:!1,inserter:!1,customClassName:!1,reusable:!1,__experimentalToolbar:!1,__experimentalParentSelector:!1},editorStyle:"wp-block-widget-area-editor",style:"wp-block-widget-area"},{name:ge}=me,pe={title:Object(I.__)("Widget Area"),description:Object(I.__)("A widget area container."),__experimentalLabel:({name:e})=>e,edit:function({clientId:e,className:t,attributes:{id:r,name:c}}){const n=Object(g.useSelect)(t=>t(ce).getIsWidgetAreaOpen(e),[e]),{setIsWidgetAreaOpen:i}=Object(g.useDispatch)(ce),o=Object(a.useRef)(),s=Object(a.useCallback)(t=>i(e,t),[e]),l=ue(o),u=be(o),[b,m]=Object(a.useState)(!1);return Object(a.useEffect)(()=>{l?u&&!n?(s(!0),m(!0)):!u&&n&&b&&s(!1):m(!1)},[n,l,u,b]),Object(a.createElement)(le.Panel,{className:t,ref:o},Object(a.createElement)(le.PanelBody,{title:c,opened:n,onToggle:()=>{i(e,!n)},scrollAfterOpen:!l},({opened:e})=>Object(a.createElement)(le.__unstableDisclosureContent,{visible:e},Object(a.createElement)("div",{className:"editor-styles-wrapper"},Object(a.createElement)(d.EntityProvider,{kind:"root",type:"postType",id:"widget-area-"+r},Object(a.createElement)(de,null))))))}};var Oe=r("TvNi"),je=r("wx14"),fe=r("diJD"),_e=r("hF7m");function he(){const{redo:e,undo:t}=Object(g.useDispatch)("core"),{saveEditedWidgetAreas:r}=Object(g.useDispatch)(ce);return Object(_e.useShortcut)("core/edit-widgets/undo",e=>{t(),e.preventDefault()},{bindGlobal:!0}),Object(_e.useShortcut)("core/edit-widgets/redo",t=>{e(),t.preventDefault()},{bindGlobal:!0}),Object(_e.useShortcut)("core/edit-widgets/save",e=>{e.preventDefault(),r()},{bindGlobal:!0}),null}he.Register=function(){const{registerShortcut:e}=Object(g.useDispatch)(_e.store);return Object(a.useEffect)(()=>{e({name:"core/edit-widgets/undo",category:"global",description:Object(I.__)("Undo your last changes."),keyCombination:{modifier:"primary",character:"z"}}),e({name:"core/edit-widgets/redo",category:"global",description:Object(I.__)("Redo your last undo."),keyCombination:{modifier:"primaryShift",character:"z"}}),e({name:"core/edit-widgets/save",category:"global",description:Object(I.__)("Save your changes."),keyCombination:{modifier:"primary",character:"s"}}),e({name:"core/edit-widgets/keyboard-shortcuts",category:"main",description:Object(I.__)("Display these keyboard shortcuts."),keyCombination:{modifier:"access",character:"h"}}),e({name:"core/edit-widgets/next-region",category:"global",description:Object(I.__)("Navigate to the next part of the editor."),keyCombination:{modifier:"ctrl",character:"`"},aliases:[{modifier:"access",character:"n"}]}),e({name:"core/edit-widgets/previous-region",category:"global",description:Object(I.__)("Navigate to the previous part of the editor."),keyCombination:{modifier:"ctrlShift",character:"`"},aliases:[{modifier:"access",character:"p"}]})},[e]),null};var Ee=he;var we=()=>Object(g.useSelect)(e=>{var t;const{getBlockSelectionEnd:r,getBlockParents:c,getBlockName:n}=e("core/block-editor"),i=r();if("core/widget-area"===n(i))return i;const o=c(i).find(e=>"core/widget-area"===n(e));if(o)return o;const{getEntityRecord:a}=e("core"),s=a(_,"postType","widget-areas");return null==s||null===(t=s.blocks[0])||void 0===t?void 0:t.clientId},[]);function ye({blockEditorSettings:e,children:t,...r}){const{hasUploadPermissions:c,reusableBlocks:n,isFixedToolbarActive:i,keepCaretInsideBlock:o}=Object(g.useSelect)(e=>({hasUploadPermissions:Object(p.defaultTo)(e("core").canUser("create","media"),!0),widgetAreas:e(ce).getWidgetAreas(),widgets:e(ce).getWidgets(),reusableBlocks:e("core").getEntityRecords("postType","wp_block"),isFixedToolbarActive:e(ce).__unstableIsFeatureActive("fixedToolbar"),keepCaretInsideBlock:e(ce).__unstableIsFeatureActive("keepCaretInsideBlock")}),[]),{setIsInserterOpened:s}=Object(g.useDispatch)(ce),l=Object(a.useMemo)(()=>{let t;return c&&(t=({onError:t,...r})=>{Object(se.uploadMedia)({wpAllowedMimeTypes:e.allowedMimeTypes,onError:({message:e})=>t(e),...r})}),{...e,__experimentalReusableBlocks:n,hasFixedToolbar:i,keepCaretInsideBlock:o,mediaUpload:t,templateLock:"all",__experimentalSetIsInserterOpened:s}},[e,i,o,c,n,s]),u=we(),[b,m,O]=Object(d.useEntityBlockEditor)(_,"postType",{id:"widget-areas"});return Object(a.createElement)(a.Fragment,null,Object(a.createElement)(ne.BlockEditorKeyboardShortcuts.Register,null),Object(a.createElement)(Ee.Register,null),Object(a.createElement)(le.SlotFillProvider,null,Object(a.createElement)(ne.BlockEditorProvider,Object(je.a)({value:b,onInput:m,onChange:O,settings:l,useSubRegistry:!1},r),t,Object(a.createElement)(fe.ReusableBlocksMenuItems,{rootClientId:u}))))}var ve=r("TSYQ"),ke=r.n(ve),Se=r("Cg8A"),Ie=r("//Lo"),Ae=r("Mmq9");function xe({selectedWidgetAreaId:e}){const t=Object(g.useSelect)(e=>e(ce).getWidgetAreas(),[]),r=Object(a.useMemo)(()=>e&&(null==t?void 0:t.find(t=>t.id===e)),[e,t]);let c;return c=r?"wp_inactive_widgets"===e?Object(I.__)("Blocks in this Widget Area will not be displayed in your site."):r.description:Object(I.__)("Widget Areas are global parts in your site’s layout that can accept blocks. These vary by theme, but are typically parts like your Sidebar or Footer."),Object(a.createElement)("div",{className:"edit-widgets-widget-areas"},Object(a.createElement)("div",{className:"edit-widgets-widget-areas__top-container"},Object(a.createElement)(ne.BlockIcon,{icon:Ie.a}),Object(a.createElement)("div",null,Object(a.createElement)("p",null,c),0===(null==t?void 0:t.length)&&Object(a.createElement)("p",null,Object(I.__)("Your theme does not contain any Widget Areas.")),!r&&Object(a.createElement)(le.Button,{href:Object(Ae.addQueryArgs)("customize.php",{"autofocus[panel]":"widgets",return:window.location.pathname}),isTertiary:!0},Object(I.__)("Manage with live preview")))))}const Te=a.Platform.select({web:!0,native:!1});function Ne({identifier:e,label:t,isActive:r}){const{enableComplementaryArea:c}=Object(g.useDispatch)(x.g);return Object(a.createElement)(le.Button,{onClick:()=>c(ce.name,e),className:ke()("edit-widgets-sidebar__panel-tab",{"is-active":r}),"aria-label":r?Object(I.sprintf)(Object(I.__)("%s (selected)"),t):t,"data-label":t},t)}function Be(){const{enableComplementaryArea:e}=Object(g.useDispatch)(x.g),{currentArea:t,hasSelectedNonAreaBlock:r,isGeneralSidebarOpen:c,selectedWidgetAreaBlock:n}=Object(g.useSelect)(e=>{const{getSelectedBlock:t,getBlock:r,getBlockParentsByBlockName:c}=e(ne.store),{getActiveComplementaryArea:n}=e(x.g),i=t(),o=n(ce.name);let a,s=o;return s||(s=i?"edit-widgets/block-inspector":"edit-widgets/block-areas"),i&&(a="core/widget-area"===i.name?i:r(c(i.clientId,"core/widget-area")[0])),{currentArea:s,hasSelectedNonAreaBlock:!(!i||"core/widget-area"===i.name),isGeneralSidebarOpen:!!o,selectedWidgetAreaBlock:a}},[]);return Object(a.useEffect)(()=>{r&&"edit-widgets/block-areas"===t&&c&&e("core/edit-widgets","edit-widgets/block-inspector"),!r&&"edit-widgets/block-inspector"===t&&c&&e("core/edit-widgets","edit-widgets/block-areas")},[r,e]),Object(a.createElement)(x.b,{className:"edit-widgets-sidebar",header:Object(a.createElement)("ul",null,Object(a.createElement)("li",null,Object(a.createElement)(Ne,{identifier:"edit-widgets/block-areas",label:n?n.attributes.name:Object(I.__)("Widget Areas"),isActive:"edit-widgets/block-areas"===t})),Object(a.createElement)("li",null,Object(a.createElement)(Ne,{identifier:"edit-widgets/block-inspector",label:Object(I.__)("Block"),isActive:"edit-widgets/block-inspector"===t}))),headerClassName:"edit-widgets-sidebar__panel-tabs",title:Object(I.__)("Settings"),closeLabel:Object(I.__)("Close settings"),scope:"core/edit-widgets",identifier:t,icon:Se.a,isActiveByDefault:Te},"edit-widgets/block-areas"===t&&Object(a.createElement)(xe,{selectedWidgetAreaId:null==n?void 0:n.attributes.id}),"edit-widgets/block-inspector"===t&&(r?Object(a.createElement)(ne.BlockInspector,null):Object(a.createElement)("span",{className:"block-editor-block-inspector__no-blocks"},Object(I.__)("No block selected."))))}var Ce=r("w95h"),Re=r("Q4Sy");var We=function(){const{hasEditedWidgetAreaIds:e,isSaving:t}=Object(g.useSelect)(e=>{var t;const{getEditedWidgetAreas:r,isSavingWidgetAreas:c}=e(ce);return{hasEditedWidgetAreaIds:(null===(t=r())||void 0===t?void 0:t.length)>0,isSaving:c()}},[]),{saveEditedWidgetAreas:r}=Object(g.useDispatch)(ce);return Object(a.createElement)(le.Button,{isPrimary:!0,isBusy:t,"aria-disabled":t,onClick:t?void 0:r,disabled:!e},t?Object(I.__)("Saving…"):Object(I.__)("Update"))},Le=r("Ntru"),Pe=r("K2cm"),Me=r("RxS6");function Ge(){const e=Object(g.useSelect)(e=>e(d.store).hasUndo()),{undo:t}=Object(g.useDispatch)(d.store);return Object(a.createElement)(le.ToolbarButton,{icon:Object(I.isRTL)()?Pe.a:Le.a,label:Object(I.__)("Undo"),shortcut:Me.displayShortcut.primary("z"),"aria-disabled":!e,onClick:e?t:void 0})}function De(){const e=Object(g.useSelect)(e=>e(d.store).hasRedo()),{redo:t}=Object(g.useDispatch)(d.store);return Object(a.createElement)(le.ToolbarButton,{icon:Object(I.isRTL)()?Le.a:Pe.a,label:Object(I.__)("Redo"),shortcut:Me.displayShortcut.primaryShift("z"),"aria-disabled":!e,onClick:e?t:void 0})}var Fe=r("VKE3"),Ve=r("K+tz"),Ue=r("RMJe"),qe=r("gdqT");function ze({label:e,info:t,messageActivated:r,messageDeactivated:c,shortcut:n,feature:i}){const o=Object(g.useSelect)(e=>e(ce).__unstableIsFeatureActive(i),[i]),{__unstableToggleFeature:s}=Object(g.useDispatch)(ce);return Object(a.createElement)(le.MenuItem,{icon:o&&Ue.a,isSelected:o,onClick:()=>{s(i),o?Object(qe.speak)(c||Object(I.__)("Feature deactivated")):Object(qe.speak)(r||Object(I.__)("Feature activated"))},role:"menuitemcheckbox",info:t,shortcut:n},e)}const He=[{keyCombination:{modifier:"primary",character:"b"},description:Object(I.__)("Make the selected text bold.")},{keyCombination:{modifier:"primary",character:"i"},description:Object(I.__)("Make the selected text italic.")},{keyCombination:{modifier:"primary",character:"k"},description:Object(I.__)("Convert the selected text into a link.")},{keyCombination:{modifier:"primaryShift",character:"k"},description:Object(I.__)("Remove a link.")},{keyCombination:{modifier:"primary",character:"u"},description:Object(I.__)("Underline the selected text.")}];function Ke({keyCombination:e,forceAriaLabel:t}){const r=e.modifier?Me.displayShortcutList[e.modifier](e.character):e.character,c=e.modifier?Me.shortcutAriaLabel[e.modifier](e.character):e.character;return Object(a.createElement)("kbd",{className:"edit-widgets-keyboard-shortcut-help-modal__shortcut-key-combination","aria-label":t||c},Object(p.castArray)(r).map((e,t)=>"+"===e?Object(a.createElement)(a.Fragment,{key:t},e):Object(a.createElement)("kbd",{key:t,className:"edit-widgets-keyboard-shortcut-help-modal__shortcut-key"},e)))}var Qe=function({description:e,keyCombination:t,aliases:r=[],ariaLabel:c}){return Object(a.createElement)(a.Fragment,null,Object(a.createElement)("div",{className:"edit-widgets-keyboard-shortcut-help-modal__shortcut-description"},e),Object(a.createElement)("div",{className:"edit-widgets-keyboard-shortcut-help-modal__shortcut-term"},Object(a.createElement)(Ke,{keyCombination:t,forceAriaLabel:c}),r.map((e,t)=>Object(a.createElement)(Ke,{keyCombination:e,forceAriaLabel:c,key:t}))))};var Ye=function({name:e}){const{keyCombination:t,description:r,aliases:c}=Object(g.useSelect)(t=>{const{getShortcutKeyCombination:r,getShortcutDescription:c,getShortcutAliases:n}=t(_e.store);return{keyCombination:r(e),aliases:n(e),description:c(e)}});return t?Object(a.createElement)(Qe,{keyCombination:t,description:r,aliases:c}):null};const Je=({shortcuts:e})=>Object(a.createElement)("ul",{className:"edit-widgets-keyboard-shortcut-help-modal__shortcut-list",role:"list"},e.map((e,t)=>Object(a.createElement)("li",{className:"edit-widgets-keyboard-shortcut-help-modal__shortcut",key:t},Object(p.isString)(e)?Object(a.createElement)(Ye,{name:e}):Object(a.createElement)(Qe,e)))),Xe=({title:e,shortcuts:t,className:r})=>Object(a.createElement)("section",{className:ke()("edit-widgets-keyboard-shortcut-help-modal__section",r)},!!e&&Object(a.createElement)("h2",{className:"edit-widgets-keyboard-shortcut-help-modal__section-title"},e),Object(a.createElement)(Je,{shortcuts:t})),Ze=({title:e,categoryName:t,additionalShortcuts:r=[]})=>{const c=Object(g.useSelect)(e=>e(_e.store).getCategoryShortcuts(t),[t]);return Object(a.createElement)(Xe,{title:e,shortcuts:c.concat(r)})};function $e({isModalActive:e,toggleModal:t}){return Object(_e.useShortcut)("core/edit-widgets/keyboard-shortcuts",t,{bindGlobal:!0}),e?Object(a.createElement)(le.Modal,{className:"edit-widgets-keyboard-shortcut-help-modal",title:Object(I.__)("Keyboard shortcuts"),closeLabel:Object(I.__)("Close"),onRequestClose:t},Object(a.createElement)(Xe,{className:"edit-widgets-keyboard-shortcut-help-modal__main-shortcuts",shortcuts:["core/edit-widgets/keyboard-shortcuts"]}),Object(a.createElement)(Ze,{title:Object(I.__)("Global shortcuts"),categoryName:"global"}),Object(a.createElement)(Ze,{title:Object(I.__)("Selection shortcuts"),categoryName:"selection"}),Object(a.createElement)(Ze,{title:Object(I.__)("Block shortcuts"),categoryName:"block",additionalShortcuts:[{keyCombination:{character:"/"},description:Object(I.__)("Change the block type after adding a new paragraph."),ariaLabel:Object(I.__)("Forward-slash")}]}),Object(a.createElement)(Xe,{title:Object(I.__)("Text formatting"),shortcuts:He})):null}const et={className:"edit-widgets-more-menu__content",position:"bottom left"},tt={tooltipPosition:"bottom"};function rt(){const[e,t]=Object(a.useState)(!1),r=()=>t(!e);Object(_e.useShortcut)("core/edit-widgets/keyboard-shortcuts",r,{bindGlobal:!0});const c=Object(ie.useViewportMatch)("medium");return Object(a.createElement)(a.Fragment,null,Object(a.createElement)(le.DropdownMenu,{className:"edit-widgets-more-menu",icon:Fe.a,label:Object(I.__)("Options"),popoverProps:et,toggleProps:tt},()=>Object(a.createElement)(a.Fragment,null,c&&Object(a.createElement)(le.MenuGroup,{label:Object(I._x)("View","noun")},Object(a.createElement)(ze,{feature:"fixedToolbar",label:Object(I.__)("Top toolbar"),info:Object(I.__)("Access all block and document tools in a single place"),messageActivated:Object(I.__)("Top toolbar activated"),messageDeactivated:Object(I.__)("Top toolbar deactivated")})),Object(a.createElement)(le.MenuGroup,{label:Object(I.__)("Tools")},Object(a.createElement)(le.MenuItem,{onClick:()=>{t(!0)},shortcut:Me.displayShortcut.access("h")},Object(I.__)("Keyboard shortcuts")),Object(a.createElement)(ze,{feature:"welcomeGuide",label:Object(I.__)("Welcome Guide")}),Object(a.createElement)(le.MenuItem,{role:"menuitem",icon:Ve.a,href:Object(I.__)("https://wordpress.org/support/article/wordpress-editor/"),target:"_blank",rel:"noopener noreferrer"},Object(I.__)("Help"),Object(a.createElement)(le.VisuallyHidden,{as:"span"},Object(I.__)("(opens in a new tab)")))),Object(a.createElement)(le.MenuGroup,{label:Object(I.__)("Preferences")},Object(a.createElement)(ze,{feature:"keepCaretInsideBlock",label:Object(I.__)("Contain text cursor inside block"),info:Object(I.__)("Aids screen readers by stopping text caret from leaving blocks."),messageActivated:Object(I.__)("Contain text cursor inside block activated"),messageDeactivated:Object(I.__)("Contain text cursor inside block deactivated")}),Object(a.createElement)(ze,{feature:"themeStyles",info:Object(I.__)("Make the editor look like your theme."),label:Object(I.__)("Use theme styles")}),c&&Object(a.createElement)(ze,{feature:"showBlockBreadcrumbs",label:Object(I.__)("Display block breadcrumbs"),info:Object(I.__)("Shows block breadcrumbs at the bottom of the editor."),messageActivated:Object(I.__)("Display block breadcrumbs activated"),messageDeactivated:Object(I.__)("Display block breadcrumbs deactivated")})))),Object(a.createElement)($e,{isModalActive:e,toggleModal:r}))}var ct=function(){const e=Object(ie.useViewportMatch)("medium"),t=Object(a.useRef)(),r=we(),c=Object(g.useSelect)(e=>e(ce).getIsWidgetAreaOpen(r),[r]),n=Object(g.useSelect)(e=>e(ce).isInserterOpened()),{setIsWidgetAreaOpen:i,setIsInserterOpened:o}=Object(g.useDispatch)(ce),{selectBlock:s}=Object(g.useDispatch)(ne.store);return Object(a.createElement)(a.Fragment,null,Object(a.createElement)("div",{className:"edit-widgets-header"},Object(a.createElement)("div",{className:"edit-widgets-header__navigable-toolbar-wrapper"},e&&Object(a.createElement)("h1",{className:"edit-widgets-header__title"},Object(I.__)("Widgets")),!e&&Object(a.createElement)(le.VisuallyHidden,{as:"h1",className:"edit-widgets-header__title"},Object(I.__)("Widgets")),Object(a.createElement)(ne.NavigableToolbar,{className:"edit-widgets-header-toolbar","aria-label":Object(I.__)("Document tools")},Object(a.createElement)(le.ToolbarItem,{ref:t,as:le.Button,className:"edit-widgets-header-toolbar__inserter-toggle",isPrimary:!0,isPressed:n,onMouseDown:e=>{e.preventDefault()},onClick:()=>{n?t.current.focus():(c||(s(r),i(r,!0)),window.requestAnimationFrame(()=>o(!0)))},icon:Re.a,label:Object(I._x)("Add block","Generic label for block inserter button")}),e&&Object(a.createElement)(a.Fragment,null,Object(a.createElement)(Ge,null),Object(a.createElement)(De,null),Object(a.createElement)(le.ToolbarItem,{as:ne.BlockNavigationDropdown})))),Object(a.createElement)("div",{className:"edit-widgets-header__actions"},Object(a.createElement)(We,null),Object(a.createElement)(x.f.Slot,{scope:"core/edit-widgets"}),Object(a.createElement)(rt,null))))};var nt=function(){const{removeNotice:e}=Object(g.useDispatch)(A.store),{notices:t}=Object(g.useSelect)(e=>({notices:e(A.store).getNotices()}),[]),r=Object(p.filter)(t,{isDismissible:!0,type:"default"}),c=Object(p.filter)(t,{isDismissible:!1,type:"default"}),n=Object(p.filter)(t,{type:"snackbar"});return Object(a.createElement)(a.Fragment,null,Object(a.createElement)(le.NoticeList,{notices:c,className:"edit-widgets-notices__pinned"}),Object(a.createElement)(le.NoticeList,{notices:r,className:"edit-widgets-notices__dismissible",onRemove:e}),Object(a.createElement)(le.SnackbarList,{notices:n,className:"edit-widgets-notices__snackbar",onRemove:e}))};function it({blockEditorSettings:e}){const{hasThemeStyles:t}=Object(g.useSelect)(e=>({hasThemeStyles:e(ce).__unstableIsFeatureActive("themeStyles")})),r=Object(a.useMemo)(()=>t?e.styles:[],[e,t]);return Object(a.createElement)("div",{className:"edit-widgets-block-editor"},Object(a.createElement)(nt,null),Object(a.createElement)(ne.BlockTools,null,Object(a.createElement)(Ee,null),Object(a.createElement)(ne.BlockEditorKeyboardShortcuts,null),Object(a.createElement)(ne.__unstableEditorStyles,{styles:r}),Object(a.createElement)(ne.BlockSelectionClearer,null,Object(a.createElement)(ne.WritingFlow,null,Object(a.createElement)(ne.ObserveTyping,null,Object(a.createElement)(ne.BlockList,{className:"edit-widgets-main-block-list"}))))))}var ot=()=>{const e=Object(g.useSelect)(e=>{var t;const{getEntityRecord:r}=e("core"),c=r(_,"postType","widget-areas");return null==c||null===(t=c.blocks[0])||void 0===t?void 0:t.clientId},[]);return Object(g.useSelect)(t=>{const{getBlockRootClientId:r,getBlockSelectionEnd:c,getBlockOrder:n,getBlockIndex:i}=t(ne.store),o=c()||e,a=r(o);return o&&""===a?{rootClientId:o,insertionIndex:n(o).length}:{rootClientId:a,insertionIndex:i(o,a)+1}},[e])};const at={header:Object(I.__)("Widgets top bar"),body:Object(I.__)("Widgets and blocks"),sidebar:Object(I.__)("Widgets settings"),footer:Object(I.__)("Widgets footer")};var st=function({blockEditorSettings:e}){const t=Object(ie.useViewportMatch)("medium","<"),r=Object(ie.useViewportMatch)("huge",">="),{setIsInserterOpened:c,closeGeneralSidebar:n}=Object(g.useDispatch)(ce),{rootClientId:i,insertionIndex:o}=ot(),{hasBlockBreadCrumbsEnabled:s,hasSidebarEnabled:l,isInserterOpened:d,previousShortcut:u,nextShortcut:b}=Object(g.useSelect)(e=>({hasSidebarEnabled:!!e(x.g).getActiveComplementaryArea(ce.name),isInserterOpened:!!e(ce).isInserterOpened(),hasBlockBreadCrumbsEnabled:e(ce).__unstableIsFeatureActive("showBlockBreadcrumbs"),previousShortcut:e(_e.store).getAllShortcutRawKeyCombinations("core/edit-widgets/previous-region"),nextShortcut:e(_e.store).getAllShortcutRawKeyCombinations("core/edit-widgets/next-region")}),[]);Object(a.useEffect)(()=>{l&&!r&&c(!1)},[l,r]),Object(a.useEffect)(()=>{d&&!r&&n()},[d,r]);const[m,p]=Object(ie.__experimentalUseDialog)({onClose:()=>c(!1)});return Object(a.createElement)(x.e,{labels:at,header:Object(a.createElement)(ct,null),secondarySidebar:d&&Object(a.createElement)("div",Object(je.a)({ref:m},p,{className:"edit-widgets-layout__inserter-panel"}),Object(a.createElement)("div",{className:"edit-widgets-layout__inserter-panel-header"},Object(a.createElement)(le.Button,{icon:Ce.a,onClick:()=>c(!1)})),Object(a.createElement)("div",{className:"edit-widgets-layout__inserter-panel-content"},Object(a.createElement)(ne.__experimentalLibrary,{showInserterHelpPanel:!0,shouldFocusBlock:t,rootClientId:i,__experimentalInsertionIndex:o}))),sidebar:l&&Object(a.createElement)(x.b.Slot,{scope:"core/edit-widgets"}),content:Object(a.createElement)(it,{blockEditorSettings:e}),footer:s&&!t&&Object(a.createElement)("div",{className:"edit-widgets-layout__footer"},Object(a.createElement)(ne.BlockBreadcrumb,{rootLabelText:Object(I.__)("Widgets")})),shortcuts:{previous:u,next:b}})};function lt(){const e=Object(g.useSelect)(e=>{const{getEditedWidgetAreas:t}=e(ce),r=t();return(null==r?void 0:r.length)>0},[]);return Object(a.useEffect)(()=>{const t=t=>{if(e)return t.returnValue=Object(I.__)("You have unsaved changes. If you proceed, they will be lost."),t.returnValue};return window.addEventListener("beforeunload",t),()=>{window.removeEventListener("beforeunload",t)}},[e]),null}function dt(){var e;const t=Object(g.useSelect)(e=>e(ce).__unstableIsFeatureActive("welcomeGuide"),[]),{__unstableToggleFeature:r}=Object(g.useDispatch)(ce),c=Object(g.useSelect)(e=>e(ce).getWidgetAreas({per_page:-1}));if(!t)return null;const n=null==c?void 0:c.every(e=>"wp_inactive_widgets"===e.id||e.widgets.every(e=>e.startsWith("block-"))),i=null!==(e=null==c?void 0:c.filter(e=>"wp_inactive_widgets"!==e.id).length)&&void 0!==e?e:0;return Object(a.createElement)(le.Guide,{className:"edit-widgets-welcome-guide",contentLabel:Object(I.__)("Welcome to block Widgets"),finishButtonText:Object(I.__)("Get started"),onFinish:()=>r("welcomeGuide"),pages:[{image:Object(a.createElement)(ut,{nonAnimatedSrc:"https://s.w.org/images/block-editor/welcome-canvas.svg",animatedSrc:"https://s.w.org/images/block-editor/welcome-canvas.gif"}),content:Object(a.createElement)(a.Fragment,null,Object(a.createElement)("h1",{className:"edit-widgets-welcome-guide__heading"},Object(I.__)("Welcome to block Widgets")),n?Object(a.createElement)(a.Fragment,null,Object(a.createElement)("p",{className:"edit-widgets-welcome-guide__text"},Object(I.sprintf)(Object(I._n)("Your theme provides %s “block” area for you to add and edit content. Try adding a search bar, social icons, or other types of blocks here and see how they’ll look on your site.","Your theme provides %s different “block” areas for you to add and edit content. Try adding a search bar, social icons, or other types of blocks here and see how they’ll look on your site.",i),i))):Object(a.createElement)(a.Fragment,null,Object(a.createElement)("p",{className:"edit-widgets-welcome-guide__text"},Object(I.__)("You can now add any block to your site’s widget areas. Don’t worry, all of your favorite widgets still work flawlessly.")),Object(a.createElement)("p",{className:"edit-widgets-welcome-guide__text"},Object(a.createElement)("strong",null,Object(I.__)("Want to stick with the old widgets?"))," ",Object(a.createElement)(le.ExternalLink,{href:Object(I.__)("https://wordpress.org/plugins/classic-widgets/")},Object(I.__)("Get the Classic Widgets plugin.")))))},{image:Object(a.createElement)(ut,{nonAnimatedSrc:"https://s.w.org/images/block-editor/welcome-editor.svg",animatedSrc:"https://s.w.org/images/block-editor/welcome-editor.gif"}),content:Object(a.createElement)(a.Fragment,null,Object(a.createElement)("h1",{className:"edit-widgets-welcome-guide__heading"},Object(I.__)("Make each block your own")),Object(a.createElement)("p",{className:"edit-widgets-welcome-guide__text"},Object(I.__)("Each block comes with its own set of controls for changing things like color, width, and alignment. These will show and hide automatically when you have a block selected.")))},{image:Object(a.createElement)(ut,{nonAnimatedSrc:"https://s.w.org/images/block-editor/welcome-library.svg",animatedSrc:"https://s.w.org/images/block-editor/welcome-library.gif"}),content:Object(a.createElement)(a.Fragment,null,Object(a.createElement)("h1",{className:"edit-widgets-welcome-guide__heading"},Object(I.__)("Get to know the block library")),Object(a.createElement)("p",{className:"edit-widgets-welcome-guide__text"},Object(a.createInterpolateElement)(Object(I.__)("All of the blocks available to you live in the block library. You’ll find it wherever you see the icon."),{InserterIconImage:Object(a.createElement)("img",{className:"edit-widgets-welcome-guide__inserter-icon",alt:Object(I.__)("inserter"),src:"data:image/svg+xml,%3Csvg width='18' height='18' viewBox='0 0 18 18' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Crect width='18' height='18' rx='2' fill='%231E1E1E'/%3E%3Cpath d='M9.22727 4V14M4 8.77273H14' stroke='white' stroke-width='1.5'/%3E%3C/svg%3E%0A"})})))},{image:Object(a.createElement)(ut,{nonAnimatedSrc:"https://s.w.org/images/block-editor/welcome-documentation.svg",animatedSrc:"https://s.w.org/images/block-editor/welcome-documentation.gif"}),content:Object(a.createElement)(a.Fragment,null,Object(a.createElement)("h1",{className:"edit-widgets-welcome-guide__heading"},Object(I.__)("Learn how to use the block editor")),Object(a.createElement)("p",{className:"edit-widgets-welcome-guide__text"},Object(I.__)("New to the block editor? Want to learn more about using it? "),Object(a.createElement)(le.ExternalLink,{href:Object(I.__)("https://wordpress.org/support/article/wordpress-editor/")},Object(I.__)("Here's a detailed guide."))))}]})}function ut({nonAnimatedSrc:e,animatedSrc:t}){return Object(a.createElement)("picture",{className:"edit-widgets-welcome-guide__image"},Object(a.createElement)("source",{srcSet:e,media:"(prefers-reduced-motion: reduce)"}),Object(a.createElement)("img",{src:t,width:"312",height:"240",alt:""}))}var bt=function({blockEditorSettings:e}){return Object(a.createElement)(ye,{blockEditorSettings:e},Object(a.createElement)(st,{blockEditorSettings:e}),Object(a.createElement)(Be,null),Object(a.createElement)(le.Popover.Slot,null),Object(a.createElement)(Oe.PluginArea,null),Object(a.createElement)(lt,null),Object(a.createElement)(dt,null))};function mt(e,t){const r=Object(l.__experimentalGetCoreBlocks)().filter(e=>!["core/more","core/freeform"].includes(e.name));Object(l.registerCoreBlocks)(r),Object(u.registerLegacyWidgetBlock)(),Object(u.registerLegacyWidgetVariations)(t),gt(o),t.__experimentalFetchLinkSuggestions=(e,r)=>Object(d.__experimentalFetchLinkSuggestions)(e,r,t),Object(a.render)(Object(a.createElement)(bt,{blockEditorSettings:t}),document.getElementById(e))}const gt=e=>{if(!e)return;const{metadata:t,settings:r,name:c}=e;t&&Object(s.unstable__bootstrapServerSideBlockDefinitions)({[c]:t}),Object(s.registerBlockType)(c,r)}},GLVC:function(e,t){e.exports=window.wp.widgets},GRId:function(e,t){e.exports=window.wp.element},HSyU:function(e,t){e.exports=window.wp.blocks},"K+tz":function(e,t,r){"use strict";var c=r("GRId"),n=r("Tqx9");const i=Object(c.createElement)(n.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(c.createElement)(n.Path,{d:"M18.2 17c0 .7-.6 1.2-1.2 1.2H7c-.7 0-1.2-.6-1.2-1.2V7c0-.7.6-1.2 1.2-1.2h3.2V4.2H7C5.5 4.2 4.2 5.5 4.2 7v10c0 1.5 1.2 2.8 2.8 2.8h10c1.5 0 2.8-1.2 2.8-2.8v-3.6h-1.5V17zM14.9 3v1.5h3.7l-6.4 6.4 1.1 1.1 6.4-6.4v3.7h1.5V3h-6.3z"}));t.a=i},K2cm:function(e,t,r){"use strict";var c=r("GRId"),n=r("Tqx9");const i=Object(c.createElement)(n.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(c.createElement)(n.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=i},K9lf:function(e,t){e.exports=window.wp.compose},KEfo:function(e,t){e.exports=window.wp.viewport},Mmq9:function(e,t){e.exports=window.wp.url},Ntru:function(e,t,r){"use strict";var c=r("GRId"),n=r("Tqx9");const i=Object(c.createElement)(n.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(c.createElement)(n.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=i},Q4Sy:function(e,t,r){"use strict";var c=r("GRId"),n=r("Tqx9");const i=Object(c.createElement)(n.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(c.createElement)(n.Path,{d:"M18 11.2h-5.2V6h-1.6v5.2H6v1.6h5.2V18h1.6v-5.2H18z"}));t.a=i},QyPg:function(e,t){e.exports=window.wp.blockLibrary},RMJe:function(e,t,r){"use strict";var c=r("GRId"),n=r("Tqx9");const i=Object(c.createElement)(n.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(c.createElement)(n.Path,{d:"M18.3 5.6L9.9 16.9l-4.6-3.4-.9 1.2 5.8 4.3 9.3-12.6z"}));t.a=i},RxS6:function(e,t){e.exports=window.wp.keycodes},TSYQ:function(e,t,r){var c; /*! Copyright (c) 2018 Jed Watson. Licensed under the MIT License (MIT), see http://jedwatson.github.io/classnames */!function(){"use strict";var r={}.hasOwnProperty;function n(){for(var e=[],t=0;t({icon:t.icon||e.icon,identifier:t.identifier||`${e.name}/${t.name}`}));var N=T((function({as:e=w.Button,scope:t,identifier:r,icon:c,selectedIcon:n,...a}){const s=e,l=Object(i.useSelect)(e=>e(j).getActiveComplementaryArea(t)===r,[r]),{enableComplementaryArea:d,disableComplementaryArea:u}=Object(i.useDispatch)(j);return Object(_.createElement)(s,Object(f.a)({icon:n&&l?n:c,onClick:()=>{l?u(t):d(t,r)}},Object(o.omit)(a,["name"])))}));var B=({smallScreenTitle:e,children:t,className:r,toggleButtonProps:c})=>{const n=Object(_.createElement)(N,Object(f.a)({icon:A.a},c));return Object(_.createElement)(_.Fragment,null,Object(_.createElement)("div",{className:"components-panel__header interface-complementary-area-header__small"},e&&Object(_.createElement)("span",{className:"interface-complementary-area-header__small-title"},e),n),Object(_.createElement)("div",{className:E()("components-panel__header","interface-complementary-area-header",r),tabIndex:-1},t,n))};function C({name:e,as:t=w.Button,onClick:r,...c}){return Object(_.createElement)(w.Fill,{name:e},({onClick:e})=>Object(_.createElement)(t,Object(f.a)({onClick:r||e?(...t)=>{(r||o.noop)(...t),(e||o.noop)(...t)}:void 0},c)))}C.Slot=function({name:e,as:t=w.ButtonGroup,fillProps:r={},bubblesVirtually:c,...n}){return Object(_.createElement)(w.Slot,{name:e,bubblesVirtually:c,fillProps:r},e=>{if(Object(o.isEmpty)(_.Children.toArray(e)))return null;const r=[];_.Children.forEach(e,({props:{__unstableExplicitMenuItem:e,__unstableTarget:t}})=>{t&&e&&r.push(t)});const c=_.Children.map(e,e=>!e.props.__unstableExplicitMenuItem&&r.includes(e.props.__unstableTarget)?null:e);return Object(_.createElement)(t,n,c)})};var R=C;const W=e=>Object(_.createElement)(w.MenuItem,Object(o.omit)(e,["__unstableExplicitMenuItem","__unstableTarget"]));function L({scope:e,target:t,__unstableExplicitMenuItem:r,...c}){return Object(_.createElement)(N,Object(f.a)({as:c=>Object(_.createElement)(R,Object(f.a)({__unstableExplicitMenuItem:r,__unstableTarget:`${e}/${t}`,as:W,name:e+"/plugin-more-menu"},c)),role:"menuitemcheckbox",selectedIcon:v.a,name:t,scope:e},c))}function P({scope:e,...t}){return Object(_.createElement)(w.Fill,Object(f.a)({name:"PinnedItems/"+e},t))}P.Slot=function({scope:e,className:t,...r}){return Object(_.createElement)(w.Slot,Object(f.a)({name:"PinnedItems/"+e},r),e=>!Object(o.isEmpty)(e)&&Object(_.createElement)("div",{className:E()(t,"interface-pinned-items")},e))};var M=P;function G({scope:e,children:t,className:r}){return Object(_.createElement)(w.Fill,{name:"ComplementaryArea/"+e},Object(_.createElement)("div",{className:r},t))}const D=T((function({children:e,className:t,closeLabel:r=Object(y.__)("Close plugin"),identifier:c,header:n,headerClassName:o,icon:a,isPinnable:s=!0,panelClassName:l,scope:d,name:u,smallScreenTitle:b,title:m,toggleShortcut:g,isActiveByDefault:p,showIconLabels:O=!1}){const{isActive:f,isPinned:h,activeArea:A,isSmall:x,isLarge:T}=Object(i.useSelect)(e=>{const{getActiveComplementaryArea:t,isItemPinned:r}=e(j),n=t(d);return{isActive:n===c,isPinned:r(d,c),activeArea:n,isSmall:e(I.store).isViewportMatch("< medium"),isLarge:e(I.store).isViewportMatch("large")}},[c,d]);!function(e,t,r,c,n){const o=Object(_.useRef)(!1),a=Object(_.useRef)(!1),{enableComplementaryArea:s,disableComplementaryArea:l}=Object(i.useDispatch)(j);Object(_.useEffect)(()=>{c&&n&&!o.current?(l(e),a.current=!0):a.current&&!n&&o.current?(a.current=!1,s(e,t)):a.current&&r&&r!==t&&(a.current=!1),n!==o.current&&(o.current=n)},[c,n,e,t,r])}(d,c,A,f,x);const{enableComplementaryArea:C,disableComplementaryArea:R,pinItem:W,unpinItem:P}=Object(i.useDispatch)(j);return Object(_.useEffect)(()=>{p&&void 0===A&&!x&&C(d,c)},[A,p,d,c,x]),Object(_.createElement)(_.Fragment,null,s&&Object(_.createElement)(M,{scope:d},h&&Object(_.createElement)(N,{scope:d,identifier:c,isPressed:f&&(!O||T),"aria-expanded":f,label:m,icon:O?v.a:a,showTooltip:!O,isTertiary:O})),u&&s&&Object(_.createElement)(L,{target:u,scope:d,icon:a},m),f&&Object(_.createElement)(G,{className:E()("interface-complementary-area",t),scope:d},Object(_.createElement)(B,{className:o,closeLabel:r,onClose:()=>R(d),smallScreenTitle:b,toggleButtonProps:{label:r,shortcut:g,scope:d,identifier:c}},n||Object(_.createElement)(_.Fragment,null,Object(_.createElement)("strong",null,m),s&&Object(_.createElement)(w.Button,{className:"interface-complementary-area__pin-unpin-item",icon:h?k.a:S.a,label:h?Object(y.__)("Unpin from toolbar"):Object(y.__)("Pin to toolbar"),onClick:()=>(h?P:W)(d,c),isPressed:h,"aria-expanded":h}))),Object(_.createElement)(w.Panel,{className:l},e)))}));D.Slot=function({scope:e,...t}){return Object(_.createElement)(w.Slot,Object(f.a)({name:"ComplementaryArea/"+e},t))};var F=D;class V extends _.Component{componentDidMount(){this.isSticky=!1,this.sync(),document.body.classList.contains("sticky-menu")&&(this.isSticky=!0,document.body.classList.remove("sticky-menu"))}componentWillUnmount(){this.isSticky&&document.body.classList.add("sticky-menu"),this.props.isActive&&document.body.classList.remove("is-fullscreen-mode")}componentDidUpdate(e){this.props.isActive!==e.isActive&&this.sync()}sync(){const{isActive:e}=this.props;e?document.body.classList.add("is-fullscreen-mode"):document.body.classList.remove("is-fullscreen-mode")}render(){return null}}var U=V,q=r("K9lf");var z=Object(_.forwardRef)((function({footer:e,header:t,sidebar:r,secondarySidebar:c,content:n,drawer:i,actions:o,labels:a,className:s,shortcuts:l},d){const u=Object(_.useRef)(),b=Object(w.__unstableUseNavigateRegions)(u,l);!function(e){Object(_.useEffect)(()=>{const t=document&&document.querySelector(`html:not(.${e})`);if(t)return t.classList.toggle(e),()=>{t.classList.toggle(e)}},[e])}("interface-interface-skeleton__html-container");const m={...{drawer:Object(y.__)("Drawer"),header:Object(y.__)("Header"),body:Object(y.__)("Content"),secondarySidebar:Object(y.__)("Block Library"),sidebar:Object(y.__)("Settings"),actions:Object(y.__)("Publish"),footer:Object(y.__)("Footer")},...a};return Object(_.createElement)("div",{ref:Object(q.useMergeRefs)([d,u]),className:E()(s,"interface-interface-skeleton",b,!!e&&"has-footer")},!!i&&Object(_.createElement)("div",{className:"interface-interface-skeleton__drawer",role:"region","aria-label":m.drawer},i),Object(_.createElement)("div",{className:"interface-interface-skeleton__editor"},!!t&&Object(_.createElement)("div",{className:"interface-interface-skeleton__header",role:"region","aria-label":m.header,tabIndex:"-1"},t),Object(_.createElement)("div",{className:"interface-interface-skeleton__body"},!!c&&Object(_.createElement)("div",{className:"interface-interface-skeleton__secondary-sidebar",role:"region","aria-label":m.secondarySidebar,tabIndex:"-1"},c),Object(_.createElement)("div",{className:"interface-interface-skeleton__content",role:"region","aria-label":m.body,tabIndex:"-1"},n),!!r&&Object(_.createElement)("div",{className:"interface-interface-skeleton__sidebar",role:"region","aria-label":m.sidebar,tabIndex:"-1"},r),!!o&&Object(_.createElement)("div",{className:"interface-interface-skeleton__actions",role:"region","aria-label":m.actions,tabIndex:"-1"},o))),!!e&&Object(_.createElement)("div",{className:"interface-interface-skeleton__footer",role:"region","aria-label":m.footer,tabIndex:"-1"},e))}))},URob:function(e,t,r){"use strict";var c=r("GRId"),n=r("Tqx9");const i=Object(c.createElement)(n.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(c.createElement)(n.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=i},VKE3:function(e,t,r){"use strict";var c=r("GRId"),n=r("Tqx9");const i=Object(c.createElement)(n.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(c.createElement)(n.Path,{d:"M13 19h-2v-2h2v2zm0-6h-2v-2h2v2zm0-6h-2V5h2v2z"}));t.a=i},Xxwi:function(e,t,r){"use strict";var c=r("GRId"),n=r("Tqx9");const i=Object(c.createElement)(n.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(c.createElement)(n.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=i},YLtl:function(e,t){e.exports=window.lodash},axFQ:function(e,t){e.exports=window.wp.blockEditor},bWcr:function(e,t,r){"use strict";var c=r("GRId"),n=r("Tqx9");const i=Object(c.createElement)(n.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(c.createElement)(n.Path,{d:"M12 13.06l3.712 3.713 1.061-1.06L13.061 12l3.712-3.712-1.06-1.06L12 10.938 8.288 7.227l-1.061 1.06L10.939 12l-3.712 3.712 1.06 1.061L12 13.061z"}));t.a=i},diJD:function(e,t){e.exports=window.wp.reusableBlocks},g56x:function(e,t){e.exports=window.wp.hooks},gdqT:function(e,t){e.exports=window.wp.a11y},hF7m:function(e,t){e.exports=window.wp.keyboardShortcuts},jZUy:function(e,t){e.exports=window.wp.coreData},l3Sj:function(e,t){e.exports=window.wp.i18n},onLe:function(e,t){e.exports=window.wp.notices},"tI+e":function(e,t){e.exports=window.wp.components},w95h:function(e,t,r){"use strict";var c=r("GRId"),n=r("Tqx9");const i=Object(c.createElement)(n.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(c.createElement)(n.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=i},wx14:function(e,t,r){"use strict";function c(){return(c=Object.assign||function(e){for(var t=1;t