PNG  IHDR;IDATxܻn0K )(pA 7LeG{ §㻢|ذaÆ 6lذaÆ 6lذaÆ 6lom$^yذag5bÆ 6lذaÆ 6lذa{ 6lذaÆ `}HFkm,mӪôô! x|'ܢ˟;E:9&ᶒ}{v]n&6 h_tڠ͵-ҫZ;Z$.Pkž)!o>}leQfJTu іچ\X=8Rن4`Vwl>nG^is"ms$ui?wbs[m6K4O.4%/bC%t Mז -lG6mrz2s%9s@-k9=)kB5\+͂Zsٲ Rn~GRC wIcIn7jJhۛNCS|j08yiHKֶۛkɈ+;SzL/F*\Ԕ#"5m2[S=gnaPeғL lذaÆ 6l^ḵaÆ 6lذaÆ 6lذa; _ذaÆ 6lذaÆ 6lذaÆ RIENDB` /* MIT License http://www.opensource.org/licenses/mit-license.php Author Tobias Koppers @sokra */ "use strict"; const TupleSet = require("./TupleSet"); /** * @template {any[]} T */ class TupleQueue { /** * @param {Iterable=} items The initial elements. */ constructor(items) { /** @private @type {TupleSet} */ this._set = new TupleSet(items); /** @private @type {Iterator} */ this._iterator = this._set[Symbol.iterator](); } /** * Returns the number of elements in this queue. * @returns {number} The number of elements in this queue. */ get length() { return this._set.size; } /** * Appends the specified element to this queue. * @param {T} item The element to add. * @returns {void} */ enqueue(...item) { this._set.add(...item); } /** * Retrieves and removes the head of this queue. * @returns {T | undefined} The head of the queue of `undefined` if this queue is empty. */ dequeue() { const result = this._iterator.next(); if (result.done) { if (this._set.size > 0) { this._iterator = this._set[Symbol.iterator](); const value = this._iterator.next().value; this._set.delete(...value); return value; } return undefined; } this._set.delete(...result.value); return result.value; } } module.exports = TupleQueue;