1234567891011121314151617181920212223242526272829303132333435363738394041424344454647 |
- import {
- r
- } from "./chunk-GZT4BVFP.js";
- // node_modules/@arcgis/core/core/CircularArray.js
- var s = class {
- constructor(t) {
- this.size = 0, this._start = 0, this.maxSize = t, this._buffer = new Array(t);
- }
- get entries() {
- return this._buffer;
- }
- enqueue(t) {
- if (this.size === this.maxSize) {
- const s2 = this._buffer[this._start];
- return this._buffer[this._start] = t, this._start = (this._start + 1) % this.maxSize, s2;
- }
- return this._buffer[(this._start + this.size++) % this.maxSize] = t, null;
- }
- dequeue() {
- if (this.size === 0)
- return null;
- const t = this._buffer[this._start];
- return this._buffer[this._start] = null, this.size--, this._start = (this._start + 1) % this.maxSize, t;
- }
- peek() {
- return this.size === 0 ? null : this._buffer[this._start];
- }
- find(s2) {
- if (this.size === 0)
- return null;
- for (const e of this._buffer)
- if (r(e) && s2(e))
- return e;
- return null;
- }
- clear(s2) {
- let e = this.dequeue();
- for (; r(e); )
- s2 && s2(e), e = this.dequeue();
- }
- };
- export {
- s
- };
- //# sourceMappingURL=chunk-D6FGJON6.js.map
|