Current File : /home/resuelf/www/wp-content/plugins/gutenberg/build/interactivity/query.min.js
import*as t from"@wordpress/interactivity";var e,a,n={d:function(t,e){for(var a in e)n.o(e,a)&&!n.o(t,a)&&Object.defineProperty(t,a,{enumerable:!0,get:e[a]})},o:function(t,e){return Object.prototype.hasOwnProperty.call(t,e)}},i=(e={getContext:()=>t.getContext,getElement:()=>t.getElement,navigate:()=>t.navigate,prefetch:()=>t.prefetch,store:()=>t.store},a={},n.d(a,e),a);const o=t=>t&&t instanceof window.HTMLAnchorElement&&t.href&&(!t.target||"_self"===t.target)&&t.origin===window.location.origin;(0,i.store)("core/query",{state:{get startAnimation(){return"start"===(0,i.getContext)().animation},get finishAnimation(){return"finish"===(0,i.getContext)().animation}},actions:{*navigate(t){const e=(0,i.getContext)(),{ref:a}=(0,i.getElement)(),n=a.closest("[data-wp-navigation-id]")?.dataset.wpNavigationDisabled;if(o(a)&&(t=>!(0!==t.button||t.metaKey||t.ctrlKey||t.altKey||t.shiftKey||t.defaultPrevented))(t)&&!n){t.preventDefault();const n=a.closest("[data-wp-navigation-id]").dataset.wpNavigationId,o=setTimeout((()=>{e.message=e.loadingText,e.animation="start"}),400);yield(0,i.navigate)(a.href),clearTimeout(o),e.message=e.loadedText+(e.message===e.loadedText?" ":""),e.animation="finish",e.url=a.href;const r=`[data-wp-navigation-id=${n}] .wp-block-post-template a[href]`;document.querySelector(r)?.focus()}},*prefetch(){const{ref:t}=(0,i.getElement)(),e=t.closest("[data-wp-navigation-id]")?.dataset.wpNavigationDisabled;o(t)&&!e&&(yield(0,i.prefetch)(t.href))}},callbacks:{*prefetch(){const{url:t}=(0,i.getContext)(),{ref:e}=(0,i.getElement)();t&&o(e)&&(yield(0,i.prefetch)(e.href))}}});
//# sourceMappingURL=query.min.js.map