!function(){"use strict";vare={n:function(n){varr=n&&n.__esModule?function(){returnn.default}:function(){returnn};returne.d(r,{a:r}),r},d:function(n,r){for(vartinr)e.o(r,t)&&!e.o(n,t)&&Object.defineProperty(n,t,{enumerable:!0,get:r[t]})},o:function(e,n){returnObject.prototype.hasOwnProperty.call(e,n)},r:function(e){"undefined"!=typeofSymbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}},n={};e.r(n),e.d(n,{PluginArea:function(){returnx},getPlugin:function(){returnw},getPlugins:function(){returnh},registerPlugin:function(){returnm},unregisterPlugin:function(){returnv},usePluginContext:function(){returna},withPluginContext:function(){returnc}});varr=window.wp.element;vart=window.wp.hooks,o=window.wp.isShallowEqual,i=e.n(o),u=window.wp.compose;constl=(0,r.createContext)({name:null,icon:null}),s=l.Provider;functiona(){return(0,r.useContext)(l)}constc=e=>(0,u.createHigherOrderComponent)((n=>t=>(0,r.createElement)(l.Consumer,null,(o=>(0,r.createElement)(n,{...t,...e(o,t)})))),"withPluginContext");classpextendsr.Component{constructor(e){super(e),this.state={hasError:!1}}staticgetDerivedStateFromError(){return{hasError:!0}}componentDidCatch(e){const{name:n,onError:r}=this.props;r&&r(n,e)}render(){returnthis.state.hasError?null:this.props.children}}varg=window.wp.primitives;vard=(0,r.createElement)(g.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,r.createElement)(g.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"}));constf={};functionm(e,n){if("object"!=typeofn)returnconsole.error("No settings object provided!"),null;if("string"!=typeofe)returnconsole.error("Plugin name must be string."),null;if(!/^[a-z][a-z0-9-]*$/.test(e))returnconsole.error('Plugin name must include only lowercase alphanumeric characters or dashes, and start with a letter. Example: "my-plugin".'),null;f[e]&&console.error(`Plugin "${e}" is already registered.`),n=(0,t.applyFilters)("plugins.registerPlugin",n,e);const{render:r,scope:o}=n;if("function"!=typeofr)returnconsole.error('The "render" property must be specified and must be a valid function.'),null;if(o){if("string"!=typeofo)returnconsole.error("Plugin scope must be string."),null;if(!/^[a-z][a-z0-9-]*$/.test(o))returnconsole.error('Plugin scope must include only lowercase alphanumeric characters or dashes, and start with a letter. Example: "my-page".'),null}returnf[e]={name:e,icon:d,...n},(0,t.doAction)("plugins.pluginRegistered",n,e),n}functionv(e){if(!f[e])returnvoidconsole.error('Plugin "'+e+'" is not registered.');constn=f[e];returndeletef[e],(0,t.doAction)("plugins.pluginUnregistered",n,e),n}functionw(e){returnf[e]}functionh(e){returnObject.values(f).filter((n=>n.scope===e))}consty=function(e,n){varr,t,o=0;functioni(){vari,u,l=r,s=arguments.length;e:for(;l;){if(l.args.length===arguments.length){for(u=0;u<s;u++)if(l.args[u]!==arguments[u]){l=l.next;continuee}returnl!==r&&(l===t&&(t=l.prev),l.prev.next=l.next,l.next&&(l.next.prev=l.prev),l.next=r,l.prev=null,r.prev=l,r=l),l.val}l=l.next}for(i=newArray(s),u=0;u<s;u++)i[u]=arguments[u];returnl={args:i,val:e.apply(null,i)},r?(r.prev=l,l.next=r):t=l,o===n.maxSize?(t=t.prev).next=null:o++,r=l,l.val}returnn=n||{},i.clear=function(){r=null,t=null,o=0},i}(((e,n)=>({icon:e,name:n})));varx=function({scope:e,onError:n}){consto=(0,r.useMemo)((()=>{letn=[];return{subscribe(e){return(0,t.addAction)("plugins.pluginRegistered","core/plugins/plugin-area/plugins-registered",e),(0,t.addAction)("plugins.pluginUnregistered","core/plugins/plugin-area/plugins-unregistered",e),()=>{(0,t.removeAction)("plugins.pluginRegistered","core/plugins/plugin-area/plugins-registered"),(0,t.removeAction)("plugins.pluginUnregistered","core/plugins/plugin-area/plugins-unregistered")}},getValue(){constr=h(e);returni()(n,r)||(n=r),n}}}),[e]),u=(0,r.useSyncExternalStore)(o.subscribe,o.getValue);return(0,r.createElement)("div",{styl