the-forest/client/node_modules/.cache/babel-loader/386511d72aeade5d04a9f4a99181cebdc218d179ebb385836ac7f264cb7b765a.json
2024-09-17 20:35:18 -04:00

1 line
2.5 KiB
JSON

{"ast":null,"code":"export class Queue {\n #pushStack;\n #shiftStack;\n constructor() {\n this.#pushStack = [];\n this.#shiftStack = [];\n }\n get length() {\n return this.#pushStack.length + this.#shiftStack.length;\n }\n push(elem) {\n this.#pushStack.push(elem);\n }\n shift() {\n if (this.#shiftStack.length === 0 && this.#pushStack.length > 0) {\n this.#shiftStack = this.#pushStack.reverse();\n this.#pushStack = [];\n }\n return this.#shiftStack.pop();\n }\n first() {\n return this.#shiftStack.length !== 0 ? this.#shiftStack[this.#shiftStack.length - 1] : this.#pushStack[0];\n }\n}","map":{"version":3,"names":["Queue","pushStack","shiftStack","constructor","length","push","elem","shift","reverse","pop","first"],"sources":["/Users/shoofle/Projects/the-forest/node_modules/@libsql/hrana-client/lib-esm/queue.js"],"sourcesContent":["export class Queue {\n #pushStack;\n #shiftStack;\n constructor() {\n this.#pushStack = [];\n this.#shiftStack = [];\n }\n get length() {\n return this.#pushStack.length + this.#shiftStack.length;\n }\n push(elem) {\n this.#pushStack.push(elem);\n }\n shift() {\n if (this.#shiftStack.length === 0 && this.#pushStack.length > 0) {\n this.#shiftStack = this.#pushStack.reverse();\n this.#pushStack = [];\n }\n return this.#shiftStack.pop();\n }\n first() {\n return this.#shiftStack.length !== 0\n ? this.#shiftStack[this.#shiftStack.length - 1]\n : this.#pushStack[0];\n }\n}\n"],"mappings":"AAAA,OAAO,MAAMA,KAAK,CAAC;EACf,CAACC,SAAS;EACV,CAACC,UAAU;EACXC,WAAWA,CAAA,EAAG;IACV,IAAI,CAAC,CAACF,SAAS,GAAG,EAAE;IACpB,IAAI,CAAC,CAACC,UAAU,GAAG,EAAE;EACzB;EACA,IAAIE,MAAMA,CAAA,EAAG;IACT,OAAO,IAAI,CAAC,CAACH,SAAS,CAACG,MAAM,GAAG,IAAI,CAAC,CAACF,UAAU,CAACE,MAAM;EAC3D;EACAC,IAAIA,CAACC,IAAI,EAAE;IACP,IAAI,CAAC,CAACL,SAAS,CAACI,IAAI,CAACC,IAAI,CAAC;EAC9B;EACAC,KAAKA,CAAA,EAAG;IACJ,IAAI,IAAI,CAAC,CAACL,UAAU,CAACE,MAAM,KAAK,CAAC,IAAI,IAAI,CAAC,CAACH,SAAS,CAACG,MAAM,GAAG,CAAC,EAAE;MAC7D,IAAI,CAAC,CAACF,UAAU,GAAG,IAAI,CAAC,CAACD,SAAS,CAACO,OAAO,CAAC,CAAC;MAC5C,IAAI,CAAC,CAACP,SAAS,GAAG,EAAE;IACxB;IACA,OAAO,IAAI,CAAC,CAACC,UAAU,CAACO,GAAG,CAAC,CAAC;EACjC;EACAC,KAAKA,CAAA,EAAG;IACJ,OAAO,IAAI,CAAC,CAACR,UAAU,CAACE,MAAM,KAAK,CAAC,GAC9B,IAAI,CAAC,CAACF,UAAU,CAAC,IAAI,CAAC,CAACA,UAAU,CAACE,MAAM,GAAG,CAAC,CAAC,GAC7C,IAAI,CAAC,CAACH,SAAS,CAAC,CAAC,CAAC;EAC5B;AACJ","ignoreList":[]},"metadata":{},"sourceType":"module","externalDependencies":[]}