site_oueb_2/wp-includes/js/dist/priority-queue.min.js

2 lines
3.5 KiB
JavaScript
Executable File

/*! This file is auto-generated */
!function(){var e={3159:function(e,t,n){var o,r,i;r=[],void 0===(i="function"==typeof(o=function(){"use strict";var e,t,o,r,i="undefined"!=typeof window?window:null!=typeof n.g?n.g:this||{},u=i.cancelRequestAnimationFrame&&i.requestAnimationFrame||setTimeout,a=i.cancelRequestAnimationFrame||clearTimeout,c=[],l=0,s=!1,d=7,f=35,m=125,p=0,b=0,w=0,v={get didTimeout(){return!1},timeRemaining:function(){var e=d-(Date.now()-b);return e<0?0:e}},g=y((function(){d=22,m=66,f=0}));function y(e){var t,n,o=99,r=function(){var i=Date.now()-n;i<o?t=setTimeout(r,o-i):(t=null,e())};return function(){n=Date.now(),t||(t=setTimeout(r,o))}}function h(){s&&(r&&a(r),o&&clearTimeout(o),s=!1)}function k(){125!=m&&(d=7,m=125,f=35,s&&(h(),q())),g()}function T(){r=null,o=setTimeout(C,0)}function O(){o=null,u(T)}function q(){s||(t=m-(Date.now()-b),e=Date.now(),s=!0,f&&t<f&&(t=f),t>9?o=setTimeout(O,t):(t=0,O()))}function C(){var n,r,i,u=d>9?9:1;if(b=Date.now(),s=!1,o=null,l>2||b-t-50<e)for(r=0,i=c.length;r<i&&v.timeRemaining()>u;r++)n=c.shift(),w++,n&&n(v);c.length?q():l=0}function D(e){return p++,c.push(e),q(),p}function I(e){var t=e-1-w;c[t]&&(c[t]=null)}if(i.requestIdleCallback&&i.cancelIdleCallback)try{i.requestIdleCallback((function(){}),{timeout:0})}catch(e){!function(e){var t,n;if(i.requestIdleCallback=function(t,n){return n&&"number"==typeof n.timeout?e(t,n.timeout):e(t)},i.IdleCallbackDeadline&&(t=IdleCallbackDeadline.prototype)){if(!(n=Object.getOwnPropertyDescriptor(t,"timeRemaining"))||!n.configurable||!n.get)return;Object.defineProperty(t,"timeRemaining",{value:function(){return n.get.call(this)},enumerable:!0,configurable:!0})}}(i.requestIdleCallback)}else i.requestIdleCallback=D,i.cancelIdleCallback=I,i.document&&document.addEventListener&&(i.addEventListener("scroll",k,!0),i.addEventListener("resize",k),document.addEventListener("focus",k,!0),document.addEventListener("mouseover",k,!0),["click","keypress","touchstart","mousedown"].forEach((function(e){document.addEventListener(e,k,{capture:!0,passive:!0})})),i.MutationObserver&&new MutationObserver(k).observe(document.documentElement,{childList:!0,subtree:!0,attributes:!0}));return{request:D,cancel:I}})?o.apply(t,r):o)||(e.exports=i)}},t={};function n(o){var r=t[o];if(void 0!==r)return r.exports;var i=t[o]={exports:{}};return e[o](i,i.exports,n),i.exports}n.d=function(e,t){for(var o in t)n.o(t,o)&&!n.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:t[o]})},n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var o={};!function(){"use strict";n.r(o),n.d(o,{createQueue:function(){return t}});n(3159);var e="undefined"==typeof window?e=>{setTimeout((()=>e(Date.now())),0)}:window.requestIdleCallback;const t=()=>{let t=[],n=new WeakMap,o=!1;const r=i=>{const u="number"==typeof i?()=>!1:()=>i.timeRemaining()>0;do{if(0===t.length)return void(o=!1);const e=t.shift();n.get(e)(),n.delete(e)}while(u());e(r)};return{add:(i,u)=>{n.has(i)||t.push(i),n.set(i,u),o||(o=!0,e(r))},flush:e=>{if(!n.has(e))return!1;const o=t.indexOf(e);t.splice(o,1);const r=n.get(e);return n.delete(e),r(),!0},cancel:e=>{if(!n.has(e))return!1;const o=t.indexOf(e);return t.splice(o,1),n.delete(e),!0},reset:()=>{t=[],n=new WeakMap,o=!1}}}}(),(window.wp=window.wp||{}).priorityQueue=o}();