Edit File by line
/home/barbar84/public_h.../wp-inclu.../js/dist
File: priority-queue.js
this["wp"] = this["wp"] || {}; this["wp"]["priorityQueue"] =
[0] Fix | Delete
/******/ (function(modules) { // webpackBootstrap
[1] Fix | Delete
/******/ // The module cache
[2] Fix | Delete
/******/ var installedModules = {};
[3] Fix | Delete
/******/
[4] Fix | Delete
/******/ // The require function
[5] Fix | Delete
/******/ function __webpack_require__(moduleId) {
[6] Fix | Delete
/******/
[7] Fix | Delete
/******/ // Check if module is in cache
[8] Fix | Delete
/******/ if(installedModules[moduleId]) {
[9] Fix | Delete
/******/ return installedModules[moduleId].exports;
[10] Fix | Delete
/******/ }
[11] Fix | Delete
/******/ // Create a new module (and put it into the cache)
[12] Fix | Delete
/******/ var module = installedModules[moduleId] = {
[13] Fix | Delete
/******/ i: moduleId,
[14] Fix | Delete
/******/ l: false,
[15] Fix | Delete
/******/ exports: {}
[16] Fix | Delete
/******/ };
[17] Fix | Delete
/******/
[18] Fix | Delete
/******/ // Execute the module function
[19] Fix | Delete
/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
[20] Fix | Delete
/******/
[21] Fix | Delete
/******/ // Flag the module as loaded
[22] Fix | Delete
/******/ module.l = true;
[23] Fix | Delete
/******/
[24] Fix | Delete
/******/ // Return the exports of the module
[25] Fix | Delete
/******/ return module.exports;
[26] Fix | Delete
/******/ }
[27] Fix | Delete
/******/
[28] Fix | Delete
/******/
[29] Fix | Delete
/******/ // expose the modules object (__webpack_modules__)
[30] Fix | Delete
/******/ __webpack_require__.m = modules;
[31] Fix | Delete
/******/
[32] Fix | Delete
/******/ // expose the module cache
[33] Fix | Delete
/******/ __webpack_require__.c = installedModules;
[34] Fix | Delete
/******/
[35] Fix | Delete
/******/ // define getter function for harmony exports
[36] Fix | Delete
/******/ __webpack_require__.d = function(exports, name, getter) {
[37] Fix | Delete
/******/ if(!__webpack_require__.o(exports, name)) {
[38] Fix | Delete
/******/ Object.defineProperty(exports, name, { enumerable: true, get: getter });
[39] Fix | Delete
/******/ }
[40] Fix | Delete
/******/ };
[41] Fix | Delete
/******/
[42] Fix | Delete
/******/ // define __esModule on exports
[43] Fix | Delete
/******/ __webpack_require__.r = function(exports) {
[44] Fix | Delete
/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
[45] Fix | Delete
/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
[46] Fix | Delete
/******/ }
[47] Fix | Delete
/******/ Object.defineProperty(exports, '__esModule', { value: true });
[48] Fix | Delete
/******/ };
[49] Fix | Delete
/******/
[50] Fix | Delete
/******/ // create a fake namespace object
[51] Fix | Delete
/******/ // mode & 1: value is a module id, require it
[52] Fix | Delete
/******/ // mode & 2: merge all properties of value into the ns
[53] Fix | Delete
/******/ // mode & 4: return value when already ns object
[54] Fix | Delete
/******/ // mode & 8|1: behave like require
[55] Fix | Delete
/******/ __webpack_require__.t = function(value, mode) {
[56] Fix | Delete
/******/ if(mode & 1) value = __webpack_require__(value);
[57] Fix | Delete
/******/ if(mode & 8) return value;
[58] Fix | Delete
/******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;
[59] Fix | Delete
/******/ var ns = Object.create(null);
[60] Fix | Delete
/******/ __webpack_require__.r(ns);
[61] Fix | Delete
/******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value });
[62] Fix | Delete
/******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));
[63] Fix | Delete
/******/ return ns;
[64] Fix | Delete
/******/ };
[65] Fix | Delete
/******/
[66] Fix | Delete
/******/ // getDefaultExport function for compatibility with non-harmony modules
[67] Fix | Delete
/******/ __webpack_require__.n = function(module) {
[68] Fix | Delete
/******/ var getter = module && module.__esModule ?
[69] Fix | Delete
/******/ function getDefault() { return module['default']; } :
[70] Fix | Delete
/******/ function getModuleExports() { return module; };
[71] Fix | Delete
/******/ __webpack_require__.d(getter, 'a', getter);
[72] Fix | Delete
/******/ return getter;
[73] Fix | Delete
/******/ };
[74] Fix | Delete
/******/
[75] Fix | Delete
/******/ // Object.prototype.hasOwnProperty.call
[76] Fix | Delete
/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
[77] Fix | Delete
/******/
[78] Fix | Delete
/******/ // __webpack_public_path__
[79] Fix | Delete
/******/ __webpack_require__.p = "";
[80] Fix | Delete
/******/
[81] Fix | Delete
/******/
[82] Fix | Delete
/******/ // Load entry module and return exports
[83] Fix | Delete
/******/ return __webpack_require__(__webpack_require__.s = "XPKI");
[84] Fix | Delete
/******/ })
[85] Fix | Delete
/************************************************************************/
[86] Fix | Delete
/******/ ({
[87] Fix | Delete
[88] Fix | Delete
/***/ "XPKI":
[89] Fix | Delete
/***/ (function(module, __webpack_exports__, __webpack_require__) {
[90] Fix | Delete
[91] Fix | Delete
"use strict";
[92] Fix | Delete
// ESM COMPAT FLAG
[93] Fix | Delete
__webpack_require__.r(__webpack_exports__);
[94] Fix | Delete
[95] Fix | Delete
// EXPORTS
[96] Fix | Delete
__webpack_require__.d(__webpack_exports__, "createQueue", function() { return /* binding */ build_module_createQueue; });
[97] Fix | Delete
[98] Fix | Delete
// CONCATENATED MODULE: ./node_modules/@wordpress/priority-queue/build-module/request-idle-callback.js
[99] Fix | Delete
/**
[100] Fix | Delete
* @typedef {( timeOrDeadline: IdleDeadline | number ) => void} Callback
[101] Fix | Delete
*/
[102] Fix | Delete
[103] Fix | Delete
/**
[104] Fix | Delete
* @return {(callback: Callback) => void} RequestIdleCallback
[105] Fix | Delete
*/
[106] Fix | Delete
function createRequestIdleCallback() {
[107] Fix | Delete
if (typeof window === 'undefined') {
[108] Fix | Delete
return function (callback) {
[109] Fix | Delete
setTimeout(function () {
[110] Fix | Delete
return callback(Date.now());
[111] Fix | Delete
}, 0);
[112] Fix | Delete
};
[113] Fix | Delete
}
[114] Fix | Delete
[115] Fix | Delete
return window.requestIdleCallback || window.requestAnimationFrame;
[116] Fix | Delete
}
[117] Fix | Delete
/* harmony default export */ var request_idle_callback = (createRequestIdleCallback());
[118] Fix | Delete
[119] Fix | Delete
// CONCATENATED MODULE: ./node_modules/@wordpress/priority-queue/build-module/index.js
[120] Fix | Delete
/**
[121] Fix | Delete
* Internal dependencies
[122] Fix | Delete
*/
[123] Fix | Delete
[124] Fix | Delete
/**
[125] Fix | Delete
* Enqueued callback to invoke once idle time permits.
[126] Fix | Delete
*
[127] Fix | Delete
* @typedef {()=>void} WPPriorityQueueCallback
[128] Fix | Delete
*/
[129] Fix | Delete
[130] Fix | Delete
/**
[131] Fix | Delete
* An object used to associate callbacks in a particular context grouping.
[132] Fix | Delete
*
[133] Fix | Delete
* @typedef {{}} WPPriorityQueueContext
[134] Fix | Delete
*/
[135] Fix | Delete
[136] Fix | Delete
/**
[137] Fix | Delete
* Function to add callback to priority queue.
[138] Fix | Delete
*
[139] Fix | Delete
* @typedef {(element:WPPriorityQueueContext,item:WPPriorityQueueCallback)=>void} WPPriorityQueueAdd
[140] Fix | Delete
*/
[141] Fix | Delete
[142] Fix | Delete
/**
[143] Fix | Delete
* Function to flush callbacks from priority queue.
[144] Fix | Delete
*
[145] Fix | Delete
* @typedef {(element:WPPriorityQueueContext)=>boolean} WPPriorityQueueFlush
[146] Fix | Delete
*/
[147] Fix | Delete
[148] Fix | Delete
/**
[149] Fix | Delete
* Reset the queue.
[150] Fix | Delete
*
[151] Fix | Delete
* @typedef {()=>void} WPPriorityQueueReset
[152] Fix | Delete
*/
[153] Fix | Delete
[154] Fix | Delete
/**
[155] Fix | Delete
* Priority queue instance.
[156] Fix | Delete
*
[157] Fix | Delete
* @typedef {Object} WPPriorityQueue
[158] Fix | Delete
*
[159] Fix | Delete
* @property {WPPriorityQueueAdd} add Add callback to queue for context.
[160] Fix | Delete
* @property {WPPriorityQueueFlush} flush Flush queue for context.
[161] Fix | Delete
* @property {WPPriorityQueueReset} reset Reset queue.
[162] Fix | Delete
*/
[163] Fix | Delete
[164] Fix | Delete
/**
[165] Fix | Delete
* Creates a context-aware queue that only executes
[166] Fix | Delete
* the last task of a given context.
[167] Fix | Delete
*
[168] Fix | Delete
* @example
[169] Fix | Delete
*```js
[170] Fix | Delete
* import { createQueue } from '@wordpress/priority-queue';
[171] Fix | Delete
*
[172] Fix | Delete
* const queue = createQueue();
[173] Fix | Delete
*
[174] Fix | Delete
* // Context objects.
[175] Fix | Delete
* const ctx1 = {};
[176] Fix | Delete
* const ctx2 = {};
[177] Fix | Delete
*
[178] Fix | Delete
* // For a given context in the queue, only the last callback is executed.
[179] Fix | Delete
* queue.add( ctx1, () => console.log( 'This will be printed first' ) );
[180] Fix | Delete
* queue.add( ctx2, () => console.log( 'This won\'t be printed' ) );
[181] Fix | Delete
* queue.add( ctx2, () => console.log( 'This will be printed second' ) );
[182] Fix | Delete
*```
[183] Fix | Delete
*
[184] Fix | Delete
* @return {WPPriorityQueue} Queue object with `add`, `flush` and `reset` methods.
[185] Fix | Delete
*/
[186] Fix | Delete
[187] Fix | Delete
var build_module_createQueue = function createQueue() {
[188] Fix | Delete
/** @type {WPPriorityQueueContext[]} */
[189] Fix | Delete
var waitingList = [];
[190] Fix | Delete
/** @type {WeakMap<WPPriorityQueueContext,WPPriorityQueueCallback>} */
[191] Fix | Delete
[192] Fix | Delete
var elementsMap = new WeakMap();
[193] Fix | Delete
var isRunning = false;
[194] Fix | Delete
/**
[195] Fix | Delete
* Callback to process as much queue as time permits.
[196] Fix | Delete
*
[197] Fix | Delete
* @param {IdleDeadline|number} deadline Idle callback deadline object, or
[198] Fix | Delete
* animation frame timestamp.
[199] Fix | Delete
*/
[200] Fix | Delete
[201] Fix | Delete
var runWaitingList = function runWaitingList(deadline) {
[202] Fix | Delete
var hasTimeRemaining = typeof deadline === 'number' ? function () {
[203] Fix | Delete
return false;
[204] Fix | Delete
} : function () {
[205] Fix | Delete
return deadline.timeRemaining() > 0;
[206] Fix | Delete
};
[207] Fix | Delete
[208] Fix | Delete
do {
[209] Fix | Delete
if (waitingList.length === 0) {
[210] Fix | Delete
isRunning = false;
[211] Fix | Delete
return;
[212] Fix | Delete
}
[213] Fix | Delete
[214] Fix | Delete
var nextElement =
[215] Fix | Delete
/** @type {WPPriorityQueueContext} */
[216] Fix | Delete
waitingList.shift();
[217] Fix | Delete
var callback =
[218] Fix | Delete
/** @type {WPPriorityQueueCallback} */
[219] Fix | Delete
elementsMap.get(nextElement);
[220] Fix | Delete
callback();
[221] Fix | Delete
elementsMap.delete(nextElement);
[222] Fix | Delete
} while (hasTimeRemaining());
[223] Fix | Delete
[224] Fix | Delete
request_idle_callback(runWaitingList);
[225] Fix | Delete
};
[226] Fix | Delete
/**
[227] Fix | Delete
* Add a callback to the queue for a given context.
[228] Fix | Delete
*
[229] Fix | Delete
* @type {WPPriorityQueueAdd}
[230] Fix | Delete
*
[231] Fix | Delete
* @param {WPPriorityQueueContext} element Context object.
[232] Fix | Delete
* @param {WPPriorityQueueCallback} item Callback function.
[233] Fix | Delete
*/
[234] Fix | Delete
[235] Fix | Delete
[236] Fix | Delete
var add = function add(element, item) {
[237] Fix | Delete
if (!elementsMap.has(element)) {
[238] Fix | Delete
waitingList.push(element);
[239] Fix | Delete
}
[240] Fix | Delete
[241] Fix | Delete
elementsMap.set(element, item);
[242] Fix | Delete
[243] Fix | Delete
if (!isRunning) {
[244] Fix | Delete
isRunning = true;
[245] Fix | Delete
request_idle_callback(runWaitingList);
[246] Fix | Delete
}
[247] Fix | Delete
};
[248] Fix | Delete
/**
[249] Fix | Delete
* Flushes queue for a given context, returning true if the flush was
[250] Fix | Delete
* performed, or false if there is no queue for the given context.
[251] Fix | Delete
*
[252] Fix | Delete
* @type {WPPriorityQueueFlush}
[253] Fix | Delete
*
[254] Fix | Delete
* @param {WPPriorityQueueContext} element Context object.
[255] Fix | Delete
*
[256] Fix | Delete
* @return {boolean} Whether flush was performed.
[257] Fix | Delete
*/
[258] Fix | Delete
[259] Fix | Delete
[260] Fix | Delete
var flush = function flush(element) {
[261] Fix | Delete
if (!elementsMap.has(element)) {
[262] Fix | Delete
return false;
[263] Fix | Delete
}
[264] Fix | Delete
[265] Fix | Delete
var index = waitingList.indexOf(element);
[266] Fix | Delete
waitingList.splice(index, 1);
[267] Fix | Delete
var callback =
[268] Fix | Delete
/** @type {WPPriorityQueueCallback} */
[269] Fix | Delete
elementsMap.get(element);
[270] Fix | Delete
elementsMap.delete(element);
[271] Fix | Delete
callback();
[272] Fix | Delete
return true;
[273] Fix | Delete
};
[274] Fix | Delete
/**
[275] Fix | Delete
* Reset the queue without running the pending callbacks.
[276] Fix | Delete
*
[277] Fix | Delete
* @type {WPPriorityQueueReset}
[278] Fix | Delete
*/
[279] Fix | Delete
[280] Fix | Delete
[281] Fix | Delete
var reset = function reset() {
[282] Fix | Delete
waitingList = [];
[283] Fix | Delete
elementsMap = new WeakMap();
[284] Fix | Delete
isRunning = false;
[285] Fix | Delete
};
[286] Fix | Delete
[287] Fix | Delete
return {
[288] Fix | Delete
add: add,
[289] Fix | Delete
flush: flush,
[290] Fix | Delete
reset: reset
[291] Fix | Delete
};
[292] Fix | Delete
};
[293] Fix | Delete
[294] Fix | Delete
[295] Fix | Delete
/***/ })
[296] Fix | Delete
[297] Fix | Delete
/******/ });
[298] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function