%PDF- %PDF-
Direktori : /var/www/projetos/vagas.ongrace.com/wp-includes/js/dist/ |
Current File : /var/www/projetos/vagas.ongrace.com/wp-includes/js/dist/router.min.js |
/*! This file is auto-generated */ !function(){"use strict";var e={d:function(n,t){for(var r in t)e.o(t,r)&&!e.o(n,r)&&Object.defineProperty(n,r,{enumerable:!0,get:t[r]})},o:function(e,n){return Object.prototype.hasOwnProperty.call(e,n)},r:function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}},n={};e.r(n),e.d(n,{privateApis:function(){return A}});var t,r=window.wp.element;function o(){return o=Object.assign?Object.assign.bind():function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var r in t)({}).hasOwnProperty.call(t,r)&&(e[r]=t[r])}return e},o.apply(null,arguments)}!function(e){e.Pop="POP",e.Push="PUSH",e.Replace="REPLACE"}(t||(t={}));var a=function(e){return e};var u="beforeunload",i="popstate";function c(e){e.preventDefault(),e.returnValue=""}function s(){var e=[];return{get length(){return e.length},push:function(n){return e.push(n),function(){e=e.filter((function(e){return e!==n}))}},call:function(n){e.forEach((function(e){return e&&e(n)}))}}}function l(){return Math.random().toString(36).substr(2,8)}function f(e){var n=e.pathname,t=void 0===n?"/":n,r=e.search,o=void 0===r?"":r,a=e.hash,u=void 0===a?"":a;return o&&"?"!==o&&(t+="?"===o.charAt(0)?o:"?"+o),u&&"#"!==u&&(t+="#"===u.charAt(0)?u:"#"+u),t}function h(e){var n={};if(e){var t=e.indexOf("#");t>=0&&(n.hash=e.substr(t),e=e.substr(0,t));var r=e.indexOf("?");r>=0&&(n.search=e.substr(r),e=e.substr(0,r)),e&&(n.pathname=e)}return n}var d=window.wp.url;const p=function(e){void 0===e&&(e={});var n=e.window,r=void 0===n?document.defaultView:n,d=r.history;function p(){var e=r.location,n=e.pathname,t=e.search,o=e.hash,u=d.state||{};return[u.idx,a({pathname:n,search:t,hash:o,state:u.usr||null,key:u.key||"default"})]}var v=null;r.addEventListener(i,(function(){if(v)P.call(v),v=null;else{var e=t.Pop,n=p(),r=n[0],o=n[1];if(P.length){if(null!=r){var a=w-r;a&&(v={action:e,location:o,retry:function(){E(-1*a)}},E(a))}}else x(e)}}));var g=t.Pop,y=p(),w=y[0],b=y[1],m=s(),P=s();function O(e){return"string"==typeof e?e:f(e)}function k(e,n){return void 0===n&&(n=null),a(o({pathname:b.pathname,hash:"",search:""},"string"==typeof e?h(e):e,{state:n,key:l()}))}function A(e,n){return[{usr:e.state,key:e.key,idx:n},O(e)]}function S(e,n,t){return!P.length||(P.call({action:e,location:n,retry:t}),!1)}function x(e){g=e;var n=p();w=n[0],b=n[1],m.call({action:g,location:b})}function E(e){d.go(e)}null==w&&(w=0,d.replaceState(o({},d.state,{idx:w}),""));var j={get action(){return g},get location(){return b},createHref:O,push:function e(n,o){var a=t.Push,u=k(n,o);if(S(a,u,(function(){e(n,o)}))){var i=A(u,w+1),c=i[0],s=i[1];try{d.pushState(c,"",s)}catch(e){r.location.assign(s)}x(a)}},replace:function e(n,r){var o=t.Replace,a=k(n,r);if(S(o,a,(function(){e(n,r)}))){var u=A(a,w),i=u[0],c=u[1];d.replaceState(i,"",c),x(o)}},go:E,back:function(){E(-1)},forward:function(){E(1)},listen:function(e){return m.push(e)},block:function(e){var n=P.push(e);return 1===P.length&&r.addEventListener(u,c),function(){n(),P.length||r.removeEventListener(u,c)}}};return j}(),v=p.push,g=p.replace;p.push=function(e,n){const t=(0,d.getQueryArgs)(window.location.href),r=(0,d.removeQueryArgs)(window.location.href,...Object.keys(t)),o=(0,d.addQueryArgs)(r,e);return v.call(p,o,n)},p.replace=function(e,n){const t=(0,d.getQueryArgs)(window.location.href),r=(0,d.removeQueryArgs)(window.location.href,...Object.keys(t)),o=(0,d.addQueryArgs)(r,e);return g.call(p,o,n)};var y=p;const w=(0,r.createContext)(),b=(0,r.createContext)();function m(e){const n=new URLSearchParams(e.search);return{...e,params:Object.fromEntries(n.entries())}}var P=window.wp.privateApis;const{lock:O,unlock:k}=(0,P.__dangerousOptInToUnstableAPIsOnlyForCoreModules)("I know using unstable features means my plugin or theme will inevitably break on the next WordPress release.","@wordpress/router"),A={};O(A,{useHistory:function(){return(0,r.useContext)(b)},useLocation:function(){return(0,r.useContext)(w)},RouterProvider:function({children:e}){const[n,t]=(0,r.useState)((()=>m(y.location)));return(0,r.useEffect)((()=>y.listen((({location:e})=>{t(m(e))}))),[]),(0,r.createElement)(b.Provider,{value:y},(0,r.createElement)(w.Provider,{value:n},e))}}),(window.wp=window.wp||{}).router=n}();