!function(){"use strict";var n={45:function(n,e,t){t.d(e,{A:function(){return o}});var r=t(8587);function o(n,e){if(null==n)return{};var t,o,u=(0,r.A)(n,e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(n);for(o=0;o<i.length;o++)t=i[o],e.includes(t)||{}.propertyIsEnumerable.call(n,t)&&(u[t]=n[t])}return u}},296:function(n,e,t){t.d(e,{A:function(){return o}});var r=t(7800);function o(n,e){return function(n){if(Array.isArray(n))return n}(n)||function(n,e){var t=null==n?null:"undefined"!=typeof Symbol&&n[Symbol.iterator]||n["@@iterator"];if(null!=t){var r,o,u,i,a=[],c=!0,f=!1;try{if(u=(t=t.call(n)).next,0===e){if(Object(t)!==t)return;c=!1}else for(;!(c=(r=u.call(t)).done)&&(a.push(r.value),a.length!==e);c=!0);}catch(n){f=!0,o=n}finally{try{if(!c&&null!=t.return&&(i=t.return(),Object(i)!==i))return}finally{if(f)throw o}}return a}}(n,e)||(0,r.A)(n,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}},1609:function(n){n.exports=window.React},3145:function(n,e,t){function r(n,e){(null==e||e>n.length)&&(e=n.length);for(var t=0,r=Array(e);t<e;t++)r[t]=n[t];return r}t.d(e,{A:function(){return r}})},4164:function(n,e,t){function r(n){var e,t,o="";if("string"==typeof n||"number"==typeof n)o+=n;else if("object"==typeof n)if(Array.isArray(n)){var u=n.length;for(e=0;e<u;e++)n[e]&&(t=r(n[e]))&&(o&&(o+=" "),o+=t)}else for(t in n)n[t]&&(o&&(o+=" "),o+=t);return o}e.A=function(){for(var n,e,t=0,o="",u=arguments.length;t<u;t++)(n=arguments[t])&&(e=r(n))&&(o&&(o+=" "),o+=e);return o}},4268:function(n,e){e.A={dropdownMenu:"SPGTBbvePU6CUwTswTz3","is-selected":"Yco2UYs5yfVpH5THiZW9"}},6087:function(n){n.exports=window.wp.element},7800:function(n,e,t){t.d(e,{A:function(){return o}});var r=t(3145);function o(n,e){if(n){if("string"==typeof n)return(0,r.A)(n,e);var t={}.toString.call(n).slice(8,-1);return"Object"===t&&n.constructor&&(t=n.constructor.name),"Map"===t||"Set"===t?Array.from(n):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?(0,r.A)(n,e):void 0}}},8587:function(n,e,t){function r(n,e){if(null==n)return{};var t={};for(var r in n)if({}.hasOwnProperty.call(n,r)){if(e.includes(r))continue;t[r]=n[r]}return t}t.d(e,{A:function(){return r}})}},e={};function t(r){var o=e[r];if(void 0!==o)return o.exports;var u=e[r]={exports:{}};return n[r](u,u.exports,t),u.exports}t.n=function(n){var e=n&&n.__esModule?function(){return n.default}:function(){return n};return t.d(e,{a:e}),e},t.d=function(n,e){for(var r in e)t.o(e,r)&&!t.o(n,r)&&Object.defineProperty(n,r,{enumerable:!0,get:e[r]})},t.o=function(n,e){return Object.prototype.hasOwnProperty.call(n,e)};var r=t(296),o=t(45),u=t(6087),i=t(1609),a=t(4164),c=t(4268),f=["items","command","visible"];(0,i.forwardRef)(function(n,e){var t=n.items,l=void 0===t?[]:t,s=n.command,d=n.visible,v=((0,o.A)(n,f),(0,i.useState)(0)),y=(0,r.A)(v,2),m=y[0],p=y[1],A=function(n){var e=l[n];e&&s({id:"".concat(e,"}")})};return(0,i.useEffect)(function(){return p(0)},[l]),(0,i.useImperativeHandle)(e,function(){return{onKeyDown:function(n){var e=n.event;return"ArrowUp"===e.key?(p((m+l.length-1)%l.length),!0):"ArrowDown"===e.key?(p((m+1)%l.length),!0):"Enter"===e.key&&(A(m),!0)}}}),d?(0,u.createElement)("div",{className:c.A.dropdownMenu},l.length?l.map(function(n,e){return(0,u.createElement)("button",{className:(0,a.A)(e===m?"is-selected":""),key:e,onMouseDown:function(n){n.preventDefault(),A(e)}},n)}):(0,u.createElement)("div",{className:"item"},"No result")):(0,u.createElement)(u.Fragment,null)})}();