!function(){var e={59588:function(e){e.exports=function(e,n){var t,r,i=0;function u(){var u,o,s=t,l=arguments.length;e:for(;s;){if(s.args.length===arguments.length){for(o=0;o<l;o++)if(s.args[o]!==arguments[o]){s=s.next;continue e}return s!==t&&(s===r&&(r=s.prev),s.prev.next=s.next,s.next&&(s.next.prev=s.prev),s.next=t,s.prev=null,t.prev=s,t=s),s.val}s=s.next}for(u=new Array(l),o=0;o<l;o++)u[o]=arguments[o];return s={args:u,val:e.apply(null,u)},t?(t.prev=s,s.next=t):r=s,i===n.maxSize?(r=r.prev).next=null:i++,t=s,s.val}return n=n||{},u.clear=function(){t=null,r=null,i=0},u}}},n={};function t(r){var i=n[r];if(void 0!==i)return i.exports;var u=n[r]={exports:{}};return e[r](u,u.exports,t),u.exports}t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,{a:n}),n},t.d=function(e,n){for(var r in n)t.o(n,r)&&!t.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:n[r]})},t.o=function(e,n){return Object.prototype.hasOwnProperty.call(e,n)},t.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var r={};!function(){"use strict";t.r(r),t.d(r,{PluginArea:function(){return f},canUserCreate:function(){return w},canUserEdit:function(){return x},getMenu:function(){return h},getPlugins:function(){return d},getSearchTypes:function(){return u},isFeatureActive:function(){return m},registerPlugin:function(){return p},registerSearchRender:function(){return i}});var e=window.wp.hooks;const n={};function i(t,r){return n[t]={name:t,...r},(0,e.doAction)("search.typesRegistered",r,t),r}function u(){return Object.values(n)}var o=window.wp.element,s=window.React,l=window.lodash,a=t(59588),c=t.n(a);const g={};function p(n,t){return g[n]={name:n,...t},(0,e.doAction)("plugins.pluginRegistered",t,n),t}function d(){return Object.values(g)}class f extends s.Component{constructor(){super(...arguments),this.setPlugins=this.setPlugins.bind(this),this.memoizedContext=c()((e=>({name:e}))),this.state=this.getCurrentPluginsState()}getCurrentPluginsState(){return{plugins:(0,l.map)(d(this.props.scope),(e=>{let{name:n,render:t}=e;return{Plugin:t,context:this.memoizedContext(n)}}))}}componentDidMount(){(0,e.addAction)("plugins.pluginRegistered","nisje/plugins/plugin-area/plugins-registered",this.setPlugins)}componentWillUnmount(){(0,e.removeAction)("plugins.pluginRegistered","nisje/plugins/plugin-area/plugins-registered")}setPlugins(){this.setState(this.getCurrentPluginsState)}render(){return(0,o.createElement)("div",{style:{display:"none"}},(0,l.map)(this.state.plugins,(e=>{let{context:n,Plugin:t}=e;return(0,o.createElement)(t,{key:n.name})})))}}const v=window?.nisjeSettings||{};function m(e){var n;return null!==(n=v?.features?.[e])&&void 0!==n&&n}function h(e){return v?.menus[e]}function x(e){var n;return null!==(n=v?.userCapabilities?.edit?.[e])&&void 0!==n&&n}function w(e){var n;return null!==(n=v?.userCapabilities?.create?.[e])&&void 0!==n&&n}}(),(window.nisje=window.nisje||{}).settings=r}();