(()=>{"use strict";var e={2991:e=>{e.exports=function e(t,r){if(t===r)return!0;if(t&&r&&"object"==typeof t&&"object"==typeof r){if(t.constructor!==r.constructor)return!1;var o,n,a;if(Array.isArray(t)){if((o=t.length)!=r.length)return!1;for(n=o;0!=n--;)if(!e(t[n],r[n]))return!1;return!0}if(t instanceof Map&&r instanceof Map){if(t.size!==r.size)return!1;for(n of t.entries())if(!r.has(n[0]))return!1;for(n of t.entries())if(!e(n[1],r.get(n[0])))return!1;return!0}if(t instanceof Set&&r instanceof Set){if(t.size!==r.size)return!1;for(n of t.entries())if(!r.has(n[0]))return!1;return!0}if(ArrayBuffer.isView(t)&&ArrayBuffer.isView(r)){if((o=t.length)!=r.length)return!1;for(n=o;0!=n--;)if(t[n]!==r[n])return!1;return!0}if(t.constructor===RegExp)return t.source===r.source&&t.flags===r.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===r.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===r.toString();if((o=(a=Object.keys(t)).length)!==Object.keys(r).length)return!1;for(n=o;0!=n--;)if(!Object.prototype.hasOwnProperty.call(r,a[n]))return!1;for(n=o;0!=n--;){var l=a[n];if(!e(t[l],r[l]))return!1}return!0}return t!=t&&r!=r}}},t={};function r(o){var n=t[o];if(void 0!==n)return n.exports;var a=t[o]={exports:{}};return e[o](a,a.exports,r),a.exports}r.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return r.d(t,{a:t}),t},r.d=(e,t)=>{for(var o in t)r.o(t,o)&&!r.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:t[o]})},r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),(()=>{const e=lodash,t=wp.i18n,o=wp.hooks,n=wp.components,a=wp.blocks,l=wp.element,s=wp.data,i=wp.blockEditor;function u(){return u=Object.assign?Object.assign.bind():function(e){for(var t=1;t{k.current&&m===C.current&&e&&A(e.rendered)})).catch((e=>{k.current&&m===C.current&&A({error:!0,errorMsg:e.message})})).finally((()=>{k.current&&m===C.current&&T(!1)}));return m}const P=(0,h.useDebounce)(M,500);(0,l.useEffect)((()=>()=>{k.current=!1}),[]),(0,l.useEffect)((()=>{void 0===O?M():c()(O,e)||P()})),(0,l.useEffect)((()=>{if(!x)return;const e=setTimeout((()=>{S(!0)}),1e3);return()=>clearTimeout(e)}),[x]);const j=!!E,R=""===E,L=E?.error;return x?(0,l.createElement)(w,u({},e,{showLoader:v}),j&&(0,l.createElement)(l.RawHTML,{className:o},E)):R||!j?(0,l.createElement)(p,e):L?(0,l.createElement)(m,u({response:E},e)):(0,l.createElement)(l.RawHTML,{className:o},E)}const k={},v=(0,s.withSelect)((e=>{const t=e("core/editor");if(t){const e=t.getCurrentPostId();if(e&&"number"==typeof e)return{currentPostId:e}}return k}))((({urlQueryArgs:e=k,currentPostId:t,...r})=>{const o=(0,l.useMemo)((()=>t?{post_id:t,...e}:e),[t,e]);return(0,l.createElement)(w,u({urlQueryArgs:o},r))}));function S(e){return S="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},S(e)}function C(e,t,r){return(t=A(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function E(e,t){for(var r=0;r-1?l.splice(t,1):l.push(e),r.props.setAttributes({show_days:l.toString()})}}))})),o.push(wp.element.createElement(n.ToggleControl,{label:(0,t.__)("Hide Closed Days","rank-math-pro"),checked:this.props.attributes.hide_closed_days,onChange:function(e){return r.props.setAttributes({hide_closed_days:e})}})),o.push(wp.element.createElement(n.ToggleControl,{label:(0,t.__)("Show open now label after opening hour for current day","rank-math-pro"),checked:this.props.attributes.show_opening_now_label,onChange:function(e){return r.props.setAttributes({show_opening_now_label:e})}})),this.props.attributes.show_opening_now_label&&o.push(wp.element.createElement(n.TextControl,{label:(0,t.__)("Show open now label after opening hour for current day","rank-math-pro"),value:this.props.attributes.opening_hours_note,onChange:function(e){return r.props.setAttributes({opening_hours_note:e})}}))}return o}}])&&E(o.prototype,a),l&&E(o,l),Object.defineProperty(o,"prototype",{writable:!1}),u}(l.Component);const j=(0,s.withSelect)((function(e){var r=e("core").getEntityRecords("postType","rank_math_locations",{per_page:-1}),o=[];r&&(o.push({value:0,label:(0,t.__)("All Locations","rank-math-pro")}),r.forEach((function(e){o.push({value:e.id,label:e.title.rendered})})));var n=e("core").getEntityRecords("taxonomy","rank_math_location_category",{per_page:-1}),a=[];return n&&n.forEach((function(e){a.push({value:e.id,label:e.name})})),{locationsData:o,termsData:a}}))(P);function R(e){return function(e){if(Array.isArray(e))return L(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return L(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return L(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function L(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,o=new Array(t);r0&&(n[o]=t.questions[o+e],n[o+e]=t.questions[o],r({questions:n}))}};(0,o.addFilter)("rank_math_block_faq_actions","rank-math-pro",(function(e,r){var o=r.questions,a=r.index;if(!(o.length<2))return wp.element.createElement(React.Fragment,null,wp.element.createElement(n.Button,{icon:"arrow-up",className:0===a?"rank-math-item-move move-up rank-math-item-disabled":"rank-math-item-move move-up",title:(0,t.__)("Move up","rank-math-pro"),onClick:D(-1,r)}),wp.element.createElement(n.Button,{icon:"arrow-down",className:a===o.length-1?"rank-math-item-move move-down rank-math-item-disabled ":"rank-math-item-move move-down",onClick:D(1,r),title:(0,t.__)("Move down","rank-math-pro")}))})),(0,o.addFilter)("rank_math_block_schema_attributes","rank-math-pro",(function(e){return e.id={type:"string",default:""},e}))})()})();